purplemux-improved 0.5.2 → 0.5.3

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 (209) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +69 -69
  3. package/.next/standalone/.next/prerender-manifest.json +3 -3
  4. package/.next/standalone/.next/required-server-files.json +7 -21
  5. package/.next/standalone/.next/routes-manifest.json +7 -7
  6. package/.next/standalone/.next/server/chunks/[root-of-the-server]__02xv7~4._.js +1 -1
  7. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0pg7_fw._.js +1 -1
  8. package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_pages-api_0mp1c0x.js +1 -1
  9. package/.next/standalone/.next/server/chunks/src_lib_0-6-4gr._.js +2 -2
  10. package/.next/standalone/.next/server/chunks/src_lib_0bfz8tg._.js +1 -1
  11. package/.next/standalone/.next/server/chunks/src_lib_0bybf96._.js +2 -2
  12. package/.next/standalone/.next/server/chunks/src_lib_0e70lm~._.js +2 -2
  13. package/.next/standalone/.next/server/chunks/src_lib_0~0m7l8._.js +3 -3
  14. package/.next/standalone/.next/server/chunks/src_lib_10z0zpi._.js +3 -3
  15. package/.next/standalone/.next/server/chunks/src_lib_11q_ije._.js +1 -1
  16. package/.next/standalone/.next/server/chunks/src_lib_11wf1py._.js +1 -1
  17. package/.next/standalone/.next/server/chunks/src_lib_workspace-store_ts_0vqt073._.js +1 -1
  18. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0vtc~z4._.js → [root-of-the-server]__0o8awmh._.js} +2 -2
  19. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0u.5ow5._.js +1 -1
  20. package/.next/standalone/.next/server/chunks/ssr/{_0~_rluj._.js → _0059b4o._.js} +2 -2
  21. package/.next/standalone/.next/server/chunks/ssr/{_1190squ._.js → _02invsz._.js} +2 -2
  22. package/.next/standalone/.next/server/chunks/ssr/{_10wet_j._.js → _02j9520._.js} +2 -2
  23. package/.next/standalone/.next/server/chunks/ssr/{_0-w3tj9._.js → _05ml6cg._.js} +2 -2
  24. package/.next/standalone/.next/server/chunks/ssr/_05olxum._.js +3 -0
  25. package/.next/standalone/.next/server/chunks/ssr/_064b9hu._.js +5 -5
  26. package/.next/standalone/.next/server/chunks/ssr/_07wt20b._.js +1 -1
  27. package/.next/standalone/.next/server/chunks/ssr/{_0_b3~d3._.js → _084qsmh._.js} +2 -2
  28. package/.next/standalone/.next/server/chunks/ssr/_08vx_j-._.js +6 -6
  29. package/.next/standalone/.next/server/chunks/ssr/_0d67vca._.js +1 -1
  30. package/.next/standalone/.next/server/chunks/ssr/_0eraxg9._.js +3 -0
  31. package/.next/standalone/.next/server/chunks/ssr/{_04vwo8q._.js → _0ilxd4s._.js} +2 -2
  32. package/.next/standalone/.next/server/chunks/ssr/_0jss17t._.js +1 -1
  33. package/.next/standalone/.next/server/chunks/ssr/_0ofci7p._.js +1 -1
  34. package/.next/standalone/.next/server/chunks/ssr/_0q4nv97._.js +3 -0
  35. package/.next/standalone/.next/server/chunks/ssr/{_0a.akhg._.js → _0vcyslc._.js} +2 -2
  36. package/.next/standalone/.next/server/chunks/ssr/{_0sy436f._.js → _0yi73t0._.js} +2 -2
  37. package/.next/standalone/.next/server/chunks/ssr/_0z9eed4._.js +3 -0
  38. package/.next/standalone/.next/server/chunks/ssr/_0~.pyem._.js +3 -0
  39. package/.next/standalone/.next/server/chunks/ssr/_11m23bw._.js +1 -1
  40. package/.next/standalone/.next/server/chunks/ssr/_12iupnk._.js +1 -1
  41. package/.next/standalone/.next/server/chunks/ssr/{_0hxmihd._.js → _13ha_i-._.js} +2 -2
  42. package/.next/standalone/.next/server/chunks/ssr/_13p_yuf._.js +3 -0
  43. package/.next/standalone/.next/server/chunks/ssr/node_modules_020ffk6._.js +7 -0
  44. package/.next/standalone/.next/server/chunks/ssr/node_modules_0j2..z3._.js +7 -0
  45. package/.next/standalone/.next/server/chunks/ssr/{src_components_00t92p_._.js → src_components_06-~ul0._.js} +1 -1
  46. package/.next/standalone/.next/server/chunks/ssr/{src_components_0377vog._.js → src_components_0_6iijk._.js} +1 -1
  47. package/.next/standalone/.next/server/chunks/ssr/{src_components_07zb5pr._.js → src_components_0pai.m-._.js} +1 -1
  48. package/.next/standalone/.next/server/chunks/ssr/{src_components_0i.w8vm._.js → src_components_0u595gy._.js} +1 -1
  49. package/.next/standalone/.next/server/chunks/ssr/src_components_features_workspace_terminal-page_tsx_0wuq-jl._.js +1 -1
  50. package/.next/standalone/.next/server/chunks/ssr/src_hooks_use-browser-title_ts_0bw6.cb._.js +2 -1
  51. package/.next/standalone/.next/server/chunks/ssr/src_lib_00ztu0a._.js +1 -1
  52. package/.next/standalone/.next/server/chunks/ssr/src_lib_workspace-store_ts_00x-rec._.js +1 -1
  53. package/.next/standalone/.next/server/middleware-build-manifest.js +69 -69
  54. package/.next/standalone/.next/server/pages/_app/build-manifest.json +4 -4
  55. package/.next/standalone/.next/server/pages/_app/client-build-manifest.json +1 -1
  56. package/.next/standalone/.next/server/pages/de/404.html +1 -1
  57. package/.next/standalone/.next/server/pages/de/500.html +1 -1
  58. package/.next/standalone/.next/server/pages/en/404.html +1 -1
  59. package/.next/standalone/.next/server/pages/en/500.html +1 -1
  60. package/.next/standalone/.next/server/pages/es/404.html +1 -1
  61. package/.next/standalone/.next/server/pages/es/500.html +1 -1
  62. package/.next/standalone/.next/server/pages/fr/404.html +1 -1
  63. package/.next/standalone/.next/server/pages/fr/500.html +1 -1
  64. package/.next/standalone/.next/server/pages/index/build-manifest.json +15 -15
  65. package/.next/standalone/.next/server/pages/index/client-build-manifest.json +1 -1
  66. package/.next/standalone/.next/server/pages/index/react-loadable-manifest.json +3 -3
  67. package/.next/standalone/.next/server/pages/index.js +13 -13
  68. package/.next/standalone/.next/server/pages/index.js.nft.json +1 -1
  69. package/.next/standalone/.next/server/pages/ja/404.html +1 -1
  70. package/.next/standalone/.next/server/pages/ja/500.html +1 -1
  71. package/.next/standalone/.next/server/pages/ko/404.html +1 -1
  72. package/.next/standalone/.next/server/pages/ko/500.html +1 -1
  73. package/.next/standalone/.next/server/pages/login/build-manifest.json +2 -2
  74. package/.next/standalone/.next/server/pages/login/client-build-manifest.json +1 -1
  75. package/.next/standalone/.next/server/pages/login.js +1 -1
  76. package/.next/standalone/.next/server/pages/login.js.nft.json +1 -1
  77. package/.next/standalone/.next/server/pages/pt-BR/404.html +1 -1
  78. package/.next/standalone/.next/server/pages/pt-BR/500.html +1 -1
  79. package/.next/standalone/.next/server/pages/reports/build-manifest.json +14 -14
  80. package/.next/standalone/.next/server/pages/reports/client-build-manifest.json +1 -1
  81. package/.next/standalone/.next/server/pages/reports.js +10 -10
  82. package/.next/standalone/.next/server/pages/reports.js.nft.json +1 -1
  83. package/.next/standalone/.next/server/pages/ru/404.html +1 -1
  84. package/.next/standalone/.next/server/pages/ru/500.html +1 -1
  85. package/.next/standalone/.next/server/pages/stats/build-manifest.json +14 -14
  86. package/.next/standalone/.next/server/pages/stats/client-build-manifest.json +1 -1
  87. package/.next/standalone/.next/server/pages/stats/react-loadable-manifest.json +6 -6
  88. package/.next/standalone/.next/server/pages/stats.js +12 -12
  89. package/.next/standalone/.next/server/pages/stats.js.nft.json +1 -1
  90. package/.next/standalone/.next/server/pages/tools-required/build-manifest.json +2 -2
  91. package/.next/standalone/.next/server/pages/tools-required/client-build-manifest.json +1 -1
  92. package/.next/standalone/.next/server/pages/tools-required.js +1 -1
  93. package/.next/standalone/.next/server/pages/tools-required.js.nft.json +1 -1
  94. package/.next/standalone/.next/server/pages/tr/404.html +1 -1
  95. package/.next/standalone/.next/server/pages/tr/500.html +1 -1
  96. package/.next/standalone/.next/server/pages/webview/build-manifest.json +15 -15
  97. package/.next/standalone/.next/server/pages/webview/client-build-manifest.json +1 -1
  98. package/.next/standalone/.next/server/pages/webview.js +10 -10
  99. package/.next/standalone/.next/server/pages/webview.js.nft.json +1 -1
  100. package/.next/standalone/.next/server/pages/zh-CN/404.html +1 -1
  101. package/.next/standalone/.next/server/pages/zh-CN/500.html +1 -1
  102. package/.next/standalone/.next/server/pages/zh-TW/404.html +1 -1
  103. package/.next/standalone/.next/server/pages/zh-TW/500.html +1 -1
  104. package/.next/standalone/.next/static/{On_wePGLL9YXlfIjczKYI → UHztd2pPm5tP-rfJo0yff}/_buildManifest.js +6 -6
  105. package/.next/standalone/.next/static/chunks/{0ufg~2sx5w0q6.js → 0-g3am_gzwzwd.js} +1 -1
  106. package/.next/standalone/.next/static/chunks/0.a6w~4mo~suj.js +2 -0
  107. package/.next/standalone/.next/static/chunks/0.d64vss.3awb.css +1 -0
  108. package/.next/standalone/.next/static/chunks/02ev50wluxvcx.js +1 -0
  109. package/.next/standalone/.next/static/chunks/{06w1--pdmty56.js → 049b5vs0i6rna.js} +2 -2
  110. package/.next/standalone/.next/static/chunks/{0svd2jz7l-n8i.js → 06rg~j6wmmytz.js} +2 -2
  111. package/.next/standalone/.next/static/chunks/{0ish~.lc4dqaa.js → 081jl5~o5h9du.js} +14 -14
  112. package/.next/standalone/.next/static/chunks/0_zjtcpi2jcwf.js +1 -0
  113. package/.next/standalone/.next/static/chunks/{05um_2_jf6u-o.js → 0atvxjqkwkugq.js} +1 -1
  114. package/.next/standalone/.next/static/chunks/0c7~xc2o50kjt.js +1 -0
  115. package/.next/standalone/.next/static/chunks/0e.mey7h6wj2b.js +1 -0
  116. package/.next/standalone/.next/static/chunks/0fl7n0tduqd.0.js +1 -0
  117. package/.next/standalone/.next/static/chunks/0h-f9j1n7wcx3.js +150 -0
  118. package/.next/standalone/.next/static/chunks/{01d14n3l-ybtl.js → 0i6s179mghaer.js} +2 -2
  119. package/.next/standalone/.next/static/chunks/0iahqhf-y5869.js +1 -0
  120. package/.next/standalone/.next/static/chunks/{0kpgr8k1uqb3_.js → 0iwh2lfx65m7p.js} +2 -2
  121. package/.next/standalone/.next/static/chunks/{083cd8-e1gu--.js → 0j04r3eihwb66.js} +2 -2
  122. package/.next/standalone/.next/static/chunks/{0ky~8c1u-ed8u.js → 0jganbk2suwn8.js} +1 -1
  123. package/.next/standalone/.next/static/chunks/{0rno186pvdtz-.js → 0jnplj30cyvfh.js} +1 -1
  124. package/.next/standalone/.next/static/chunks/{0k-f3k2jk1cqf.js → 0lbq6hdeuuzdx.js} +15 -15
  125. package/.next/standalone/.next/static/chunks/{0vtdtc3pmhuu-.js → 0ozj.0fasw2py.js} +1 -1
  126. package/.next/standalone/.next/static/chunks/{0dzynjxwt0u-..js → 0q.z2axs6_a-m.js} +6 -6
  127. package/.next/standalone/.next/static/chunks/{0vrmd-9mba1~c.js → 0rtgpogmd~y_c.js} +14 -14
  128. package/.next/standalone/.next/static/chunks/{14uzf~8w~t4i3.js → 0tn-uaxyd_fvq.js} +15 -15
  129. package/.next/standalone/.next/static/chunks/{076w32tkf608u.js → 0u_~0xd2vsw7u.js} +1 -1
  130. package/.next/standalone/.next/static/chunks/0v9.cau2tvhow.js +1 -0
  131. package/.next/standalone/.next/static/chunks/0wemfqqeae_h1.js +13 -0
  132. package/.next/standalone/.next/static/chunks/{0xm__1-o56cs5.js → 0xvdvw-o4a13j.js} +1 -1
  133. package/.next/standalone/.next/static/chunks/{0ep5k6xk05.ih.js → 0yf331j_dueg9.js} +1 -1
  134. package/.next/standalone/.next/static/chunks/{0jb4mng6q_r35.js → 0ypg5k0qyvbqt.js} +1 -1
  135. package/.next/standalone/.next/static/chunks/0zefn_3i--_49.js +1 -0
  136. package/.next/standalone/.next/static/chunks/{0z7uk1lobx6w9.js → 0~8_rxg-~pc.f.js} +4 -4
  137. package/.next/standalone/.next/static/chunks/108_z_hy~82hp.js +1 -0
  138. package/.next/standalone/.next/static/chunks/10jc5_.djl2io.js +1 -0
  139. package/.next/standalone/.next/static/chunks/{086h6i-juasej.js → 146_~wm2dgy_g.js} +1 -1
  140. package/.next/standalone/.next/static/chunks/{turbopack-0puk~e1j8~on3.js → turbopack-062s3oenu.cik.js} +1 -1
  141. package/.next/standalone/.next/static/chunks/{turbopack-0tlap~o-h1ms2.js → turbopack-079qvmf.y3wb5.js} +1 -1
  142. package/.next/standalone/.next/static/chunks/{turbopack-0.-80~ro-hloo.js → turbopack-0aj6sy.io9dz3.js} +1 -1
  143. package/.next/standalone/.next/static/chunks/{turbopack-0hoib2z8ebbe..js → turbopack-0b92yc936hzvu.js} +1 -1
  144. package/.next/standalone/.next/static/chunks/{turbopack-0pvadga.pxb8w.js → turbopack-0j~doma34nwgv.js} +1 -1
  145. package/.next/standalone/.next/static/chunks/{turbopack-0u-uf-f.oh-ca.js → turbopack-13n362cn_9xg-.js} +1 -1
  146. package/.next/standalone/.next/static/chunks/{turbopack-0dthsyrf8i0dg.js → turbopack-17hit5zepvc-9.js} +1 -1
  147. package/.next/standalone/messages/de/diff.json +8 -1
  148. package/.next/standalone/messages/de/notification.json +6 -0
  149. package/.next/standalone/messages/de/workspace.json +20 -0
  150. package/.next/standalone/messages/en/diff.json +8 -1
  151. package/.next/standalone/messages/en/notification.json +6 -0
  152. package/.next/standalone/messages/en/workspace.json +20 -0
  153. package/.next/standalone/messages/es/diff.json +8 -1
  154. package/.next/standalone/messages/es/notification.json +6 -0
  155. package/.next/standalone/messages/es/workspace.json +20 -0
  156. package/.next/standalone/messages/fr/diff.json +8 -1
  157. package/.next/standalone/messages/fr/notification.json +6 -0
  158. package/.next/standalone/messages/fr/workspace.json +20 -0
  159. package/.next/standalone/messages/ja/diff.json +8 -1
  160. package/.next/standalone/messages/ja/notification.json +6 -0
  161. package/.next/standalone/messages/ja/workspace.json +20 -0
  162. package/.next/standalone/messages/ko/diff.json +8 -1
  163. package/.next/standalone/messages/ko/notification.json +6 -0
  164. package/.next/standalone/messages/ko/workspace.json +20 -0
  165. package/.next/standalone/messages/pt-BR/diff.json +8 -1
  166. package/.next/standalone/messages/pt-BR/notification.json +6 -0
  167. package/.next/standalone/messages/pt-BR/workspace.json +20 -0
  168. package/.next/standalone/messages/ru/diff.json +8 -1
  169. package/.next/standalone/messages/ru/notification.json +6 -0
  170. package/.next/standalone/messages/ru/workspace.json +20 -0
  171. package/.next/standalone/messages/tr/diff.json +8 -1
  172. package/.next/standalone/messages/tr/notification.json +6 -0
  173. package/.next/standalone/messages/tr/workspace.json +20 -0
  174. package/.next/standalone/messages/zh-CN/diff.json +8 -1
  175. package/.next/standalone/messages/zh-CN/notification.json +6 -0
  176. package/.next/standalone/messages/zh-CN/workspace.json +20 -0
  177. package/.next/standalone/messages/zh-TW/diff.json +8 -1
  178. package/.next/standalone/messages/zh-TW/notification.json +6 -0
  179. package/.next/standalone/messages/zh-TW/workspace.json +20 -0
  180. package/.next/standalone/package.json +10 -4
  181. package/.next/standalone/server.js +1 -1
  182. package/bin/feature-commands.js +4 -4
  183. package/dist/server.js +44 -10
  184. package/package.json +10 -4
  185. package/.next/standalone/.next/server/chunks/ssr/_0-0n2jc._.js +0 -3
  186. package/.next/standalone/.next/server/chunks/ssr/_05oyq08._.js +0 -3
  187. package/.next/standalone/.next/server/chunks/ssr/_0cu43h7._.js +0 -3
  188. package/.next/standalone/.next/server/chunks/ssr/_0dbg67a._.js +0 -3
  189. package/.next/standalone/.next/server/chunks/ssr/_0lgqh-j._.js +0 -3
  190. package/.next/standalone/.next/server/chunks/ssr/_0urnl2~._.js +0 -3
  191. package/.next/standalone/.next/server/chunks/ssr/_12h1.4d._.js +0 -3
  192. package/.next/standalone/.next/server/chunks/ssr/node_modules_07i.2e~._.js +0 -7
  193. package/.next/standalone/.next/server/chunks/ssr/node_modules_0cx6hl6._.js +0 -7
  194. package/.next/standalone/.next/static/chunks/0-kj.6-iswtbg.js +0 -150
  195. package/.next/standalone/.next/static/chunks/080eo5_ldwk3p.js +0 -1
  196. package/.next/standalone/.next/static/chunks/08y.1_n96kgfo.js +0 -1
  197. package/.next/standalone/.next/static/chunks/09oqlv_7-xd4j.js +0 -1
  198. package/.next/standalone/.next/static/chunks/0_l9a48xds5zi.js +0 -1
  199. package/.next/standalone/.next/static/chunks/0e0ppim1c2..1.js +0 -1
  200. package/.next/standalone/.next/static/chunks/0jw.t~mrlg7qe.js +0 -1
  201. package/.next/standalone/.next/static/chunks/0sf75lq1jkebs.js +0 -1
  202. package/.next/standalone/.next/static/chunks/0v.15sf3jc67_.js +0 -1
  203. package/.next/standalone/.next/static/chunks/0x5zj~zxcqph6.js +0 -1
  204. package/.next/standalone/.next/static/chunks/0z4hai42j2v6w.js +0 -1
  205. package/.next/standalone/.next/static/chunks/1262.lq7n7w2a.js +0 -13
  206. package/.next/standalone/.next/static/chunks/142pcflu2ao60.js +0 -1
  207. package/.next/standalone/.next/static/chunks/16ckq99o7tw~2.css +0 -1
  208. /package/.next/standalone/.next/static/{On_wePGLL9YXlfIjczKYI → UHztd2pPm5tP-rfJo0yff}/_clientMiddlewareManifest.js +0 -0
  209. /package/.next/standalone/.next/static/{On_wePGLL9YXlfIjczKYI → UHztd2pPm5tP-rfJo0yff}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,131464,e=>{"use strict";let t=(0,e.i(205270).default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);e.s(["Sparkles",0,t],131464)},162591,638084,248771,e=>{"use strict";e.s([],162591),e.i(350461);var t=e.i(579907),r=e.i(191788);let l=r.createContext(null),a=r.createContext(null);function n(e,t,r){return null==e||null==t?Object.is(e,t):r(e,t)}e.s(["SelectFloatingContext",0,a,"SelectRootContext",0,l,"useSelectFloatingContext",0,function(){let e=r.useContext(a);if(null===e)throw Error((0,t.default)(61));return e},"useSelectRootContext",0,function(){let e=r.useContext(l);if(null===e)throw Error((0,t.default)(60));return e}],638084),e.s(["compareItemEquality",0,n,"defaultItemEquality",0,(e,t)=>Object.is(e,t),"findItemIndex",0,function(e,t,r){return e&&0!==e.length?e.findIndex(e=>void 0!==e&&n(e,t,r)):-1},"removeItem",0,function(e,t,r){return e.filter(e=>!n(t,e,r))},"selectedValueIncludes",0,function(e,t,r){return!!e&&0!==e.length&&e.some(e=>void 0!==e&&n(t,e,r))}],248771)},308665,e=>{"use strict";e.s(["serializeValue",0,function(e){if(null==e)return"";if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}}])},690176,e=>{"use strict";var t=e.i(391398);e.i(162591);var r=e.i(191788),l=e.i(931497),a=e.i(978054),n=e.i(713579),s=e.i(937425),i=e.i(532932),o=e.i(176955),d=e.i(95349),c=e.i(25104),u=e.i(656124),m=e.i(225644),h=e.i(978730),p=e.i(562912),f=e.i(735859),x=e.i(674316),g=e.i(105721),v=e.i(414224),y=e.i(202526),b=e.i(34776),j=e.i(638084),w=e.i(660566),k=e.i(390940),C=e.i(552413),S=e.i(276149),N=e.i(659594),M=e.i(248771),E=e.i(308665);function D(e){return null!=e&&e.length>0&&"object"==typeof e[0]&&null!=e[0]&&"items"in e[0]}function T(e,t){if(t&&null!=e)return t(e)??"";if(e&&"object"==typeof e){if("label"in e&&null!=e.label)return String(e.label);if("value"in e)return String(e.value)}return(0,E.serializeValue)(e)}function A(e,t){return t&&null!=e?t(e)??"":e&&"object"==typeof e&&"value"in e&&"label"in e?(0,E.serializeValue)(e.value):(0,E.serializeValue)(e)}function R(e,t,r){if(r&&null!=e)return r(e);if(e&&"object"==typeof e&&"label"in e&&null!=e.label)return e.label;if(t&&!Array.isArray(t))return t[e]??T(e,r);if(Array.isArray(t)){let l=D(t)?t.flatMap(e=>e.items):t;if(null==e||"object"!=typeof e){let t=l.find(t=>t.value===e);return t&&null!=t.label?t.label:T(e,r)}if("value"in e){let t=l.find(t=>t&&t.value===e.value);if(t&&null!=t.label)return t.label}}return T(e,r)}let I={id:(0,N.createSelector)(e=>e.id),labelId:(0,N.createSelector)(e=>e.labelId),modal:(0,N.createSelector)(e=>e.modal),multiple:(0,N.createSelector)(e=>e.multiple),items:(0,N.createSelector)(e=>e.items),itemToStringLabel:(0,N.createSelector)(e=>e.itemToStringLabel),itemToStringValue:(0,N.createSelector)(e=>e.itemToStringValue),isItemEqualToValue:(0,N.createSelector)(e=>e.isItemEqualToValue),value:(0,N.createSelector)(e=>e.value),hasSelectedValue:(0,N.createSelector)(e=>{let{value:t,multiple:r,itemToStringValue:l}=e;return null!=t&&(r&&Array.isArray(t)?t.length>0:""!==A(t,l))}),hasNullItemLabel:(0,N.createSelector)((e,t)=>!!t&&function(e){if(!Array.isArray(e))return null!=e&&"null"in e;if(D(e)){for(let t of e)for(let e of t.items)if(e&&null==e.value&&null!=e.label)return!0;return!1}for(let t of e)if(t&&null==t.value&&null!=t.label)return!0;return!1}(e.items)),open:(0,N.createSelector)(e=>e.open),mounted:(0,N.createSelector)(e=>e.mounted),forceMount:(0,N.createSelector)(e=>e.forceMount),transitionStatus:(0,N.createSelector)(e=>e.transitionStatus),openMethod:(0,N.createSelector)(e=>e.openMethod),activeIndex:(0,N.createSelector)(e=>e.activeIndex),selectedIndex:(0,N.createSelector)(e=>e.selectedIndex),isActive:(0,N.createSelector)((e,t)=>e.activeIndex===t),isSelected:(0,N.createSelector)((e,t,r)=>{let l=e.isItemEqualToValue,a=e.value;return e.multiple?Array.isArray(a)&&a.some(e=>(0,M.compareItemEquality)(r,e,l)):e.selectedIndex===t&&null!==e.selectedIndex||(0,M.compareItemEquality)(r,a,l)}),isSelectedByFocus:(0,N.createSelector)((e,t)=>e.selectedIndex===t),popupProps:(0,N.createSelector)(e=>e.popupProps),triggerProps:(0,N.createSelector)(e=>e.triggerProps),triggerElement:(0,N.createSelector)(e=>e.triggerElement),positionerElement:(0,N.createSelector)(e=>e.positionerElement),listElement:(0,N.createSelector)(e=>e.listElement),scrollUpArrowVisible:(0,N.createSelector)(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:(0,N.createSelector)(e=>e.scrollDownArrowVisible),hasScrollArrows:(0,N.createSelector)(e=>e.hasScrollArrows)};var P=e.i(245925),L=e.i(203799),B=e.i(657681),O=e.i(598634),z=e.i(944306),F=e.i(748030);function V(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MIN_SAFE_INTEGER,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.MAX_SAFE_INTEGER;return Math.max(t,Math.min(e,r))}function H(e,t){return Math.max(0,e-t)}function U(e,t){if(t<=0)return 0;let r=V(e,0,t),l=t-r,a=r<=1,n=l<=1;return a&&n?r<=l?0:t:a?0:n?t:r}var q=e.i(977848);e.i(350461);var G=e.i(542151),K=e.i(408372),_=e.i(115293);let $=r.forwardRef(function(e,t){let{render:r,className:l,style:a,...n}=e;delete n.id;let s=(0,w.useFieldRootContext)(),{store:i}=(0,j.useSelectRootContext)(),o=(0,m.useStore)(i,I.triggerElement),d=(0,m.useStore)(i,I.id),c=null==d?void 0:`${d}-label`,u=(0,_.useLabel)({id:c,fallbackControlId:o?.id??d,setLabelId(e){i.set("labelId",e)}});return(0,G.useRenderElement)("div",e,{ref:t,state:s.state,props:[u,n],stateAttributesMapping:K.fieldValidityMapping})});var W=e.i(232897),Y=e.i(242608),X=e.i(653054),J=e.i(469843),Z=e.i(327421),Q=e.i(154532),ee=e.i(360233),et=e.i(817806);let er={...J.pressableTriggerOpenStateMapping,...K.fieldValidityMapping,value:()=>null},el=r.forwardRef(function(e,t){let{render:l,className:n,id:s,disabled:i=!1,nativeButton:o=!0,style:d,...h}=e,{setTouched:p,setFocused:f,validationMode:x,state:g,disabled:v}=(0,w.useFieldRootContext)(),{labelId:y}=(0,X.useLabelableContext)(),{store:b,setOpen:k,selectionRef:S,validation:N,readOnly:M,required:E,alignItemWithTriggerActiveRef:D,disabled:T,keyboardActiveRef:A}=(0,j.useSelectRootContext)(),R=v||T||i,B=(0,m.useStore)(b,I.open),O=(0,m.useStore)(b,I.value),z=(0,m.useStore)(b,I.triggerProps),F=(0,m.useStore)(b,I.positionerElement),V=(0,m.useStore)(b,I.listElement),H=(0,m.useStore)(b,I.id),U=(0,m.useStore)(b,I.labelId),K=(0,m.useStore)(b,I.hasSelectedValue),_=!K&&B,$=(0,m.useStore)(b,I.hasNullItemLabel,_),J=s??H;(0,C.useLabelableId)({id:J});let el=(0,u.useValueAsRef)(F),ea=r.useRef(null),{getButtonProps:en,buttonRef:es}=(0,et.useButton)({disabled:R,native:o}),ei=(0,c.useStableCallback)(e=>{b.set("triggerElement",e)}),eo=(0,a.useMergedRefs)(t,ea,es,ei),ed=(0,Y.useTimeout)(),ec=(0,Y.useTimeout)(),eu=(0,Y.useTimeout)(),em=(0,Y.useTimeout)();r.useEffect(()=>{if(B)return K||$?em.start(200,()=>{S.current.allowUnselectedMouseUp=!0,eu.start(200,()=>{S.current.allowSelectedMouseUp=!0})}):eu.start(400,()=>{S.current.allowUnselectedMouseUp=!0,S.current.allowSelectedMouseUp=!0}),()=>{eu.clear(),em.clear()};S.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},ec.clear()},[B,K,$,S,ec,eu,em]);let eh=r.useMemo(()=>V?.id??(0,ee.getFloatingFocusElement)(F)?.id,[V,F]),ep=(0,q.mergeProps)(z,{id:J,role:"combobox","aria-expanded":B?"true":"false","aria-haspopup":"listbox","aria-controls":B?eh:void 0,"aria-labelledby":y??U,"aria-readonly":M||void 0,"aria-required":E||void 0,tabIndex:R?-1:0,ref:eo,onFocus(e){f(!0),B&&D.current&&k(!1,(0,P.createChangeEventDetails)(L.REASONS.none,e.nativeEvent)),ed.start(0,()=>{b.set("forceMount",!0)})},onBlur(e){(0,Q.contains)(F,e.relatedTarget)||(p(!0),f(!1),"onBlur"===x&&N.commit(O))},onPointerMove(){A.current=!1},onKeyDown(){A.current=!0},onMouseDown(e){if(B)return;let t=(0,W.ownerDocument)(e.currentTarget);function r(e){if(!ea.current)return;let t=e.target;if((0,Q.contains)(ea.current,t)||(0,Q.contains)(el.current,t)||t===ea.current)return;let r=(0,Z.getPseudoElementBounds)(ea.current);e.clientX>=r.left-2&&e.clientX<=r.right+2&&e.clientY>=r.top-2&&e.clientY<=r.bottom+2||k(!1,(0,P.createChangeEventDetails)(L.REASONS.cancelOpen,e))}ec.start(0,()=>{t.addEventListener("mouseup",r,{once:!0})})}},N.getValidationProps,h,en);ep.role="combobox";let ef={...g,open:B,disabled:R,value:O,readOnly:M,placeholder:!K};return(0,G.useRenderElement)("button",e,{ref:[t,ea],state:ef,stateAttributesMapping:er,props:ep})}),ea={value:()=>null},en=r.forwardRef(function(e,l){let{className:a,render:n,children:s,placeholder:i,style:o,...d}=e,{store:c,valueRef:u}=(0,j.useSelectRootContext)(),h=(0,m.useStore)(c,I.value),p=(0,m.useStore)(c,I.items),f=(0,m.useStore)(c,I.itemToStringLabel),x=(0,m.useStore)(c,I.hasSelectedValue),g=(0,m.useStore)(c,I.hasNullItemLabel,!x&&null!=i&&null==s),v=null;if("function"==typeof s)v=s(h);else if(null!=s)v=s;else if(x||null==i||g)if(Array.isArray(h))v=h.reduce((e,l,a)=>(a>0&&e.push(", "),e.push((0,t.jsx)(r.Fragment,{children:R(l,p,f)},a)),e),[]);else v=R(h,p,f);else v=i;return(0,G.useRenderElement)("span",e,{state:{value:h,placeholder:!x},ref:[l,u],props:[{children:v},d],stateAttributesMapping:ea})}),es=r.forwardRef(function(e,t){let{className:r,render:l,style:a,...n}=e,{store:s}=(0,j.useSelectRootContext)(),i=(0,m.useStore)(s,I.open);return(0,G.useRenderElement)("span",e,{state:{open:i},ref:t,props:[{"aria-hidden":!0,children:"▼"},n],stateAttributesMapping:J.triggerOpenStateMapping})});var ei=e.i(117767);let eo=r.createContext(void 0),ed=r.forwardRef(function(e,r){let{store:l}=(0,j.useSelectRootContext)(),a=(0,m.useStore)(l,I.mounted),n=(0,m.useStore)(l,I.forceMount);return a||n?(0,t.jsx)(eo.Provider,{value:!0,children:(0,t.jsx)(ei.FloatingPortal,{ref:r,...e})}):null});var ec=e.i(872863);let eu={...J.popupStateMapping,...ec.transitionStatusMapping},em=r.forwardRef(function(e,t){let{className:r,render:l,style:a,...n}=e,{store:s}=(0,j.useSelectRootContext)(),i=(0,m.useStore)(s,I.open),o=(0,m.useStore)(s,I.mounted),d=(0,m.useStore)(s,I.transitionStatus);return(0,G.useRenderElement)("div",e,{state:{open:i,transitionStatus:d},ref:t,props:[{role:"presentation",hidden:!o,style:{userSelect:"none",WebkitUserSelect:"none"}},n],stateAttributesMapping:eu})});var eh=e.i(455577),ep=e.i(344884),ef=e.i(23461),ex=e.i(579907);let eg=r.createContext(void 0);function ev(){let e=r.useContext(eg);if(!e)throw Error((0,ex.default)(59));return e}var ey=e.i(556856),eb=e.i(11338);function ej(e,t){e&&Object.assign(e.style,t)}let ew={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"};var ek=e.i(914935),eC=e.i(187663);let eS={position:"fixed"},eN=r.forwardRef(function(e,l){let{anchor:a,positionMethod:n="absolute",className:s,render:i,side:o="bottom",align:u="center",sideOffset:h=0,alignOffset:p=0,collisionBoundary:f="clipping-ancestors",collisionPadding:x,arrowPadding:g=5,sticky:v=!1,disableAnchorTracking:y,alignItemWithTrigger:b=!0,collisionAvoidance:w=eb.DROPDOWN_COLLISION_AVOIDANCE,style:k,...C}=e,{store:S,listRef:N,labelsRef:E,alignItemWithTriggerActiveRef:D,selectedItemTextRef:T,valuesRef:A,initialValueRef:R,popupRef:B,setValue:O}=(0,j.useSelectRootContext)(),z=(0,j.useSelectFloatingContext)(),F=(0,m.useStore)(S,I.open),V=(0,m.useStore)(S,I.mounted),H=(0,m.useStore)(S,I.modal),U=(0,m.useStore)(S,I.value),q=(0,m.useStore)(S,I.openMethod),G=(0,m.useStore)(S,I.positionerElement),K=(0,m.useStore)(S,I.triggerElement),_=(0,m.useStore)(S,I.isItemEqualToValue),$=(0,m.useStore)(S,I.transitionStatus),W=r.useRef(null),Y=r.useRef(null),[X,J]=r.useState(b),Z=V&&X&&"touch"!==q;V||X===b||J(b),(0,d.useIsoLayoutEffect)(()=>{!V&&(I.scrollUpArrowVisible(S.state)&&S.set("scrollUpArrowVisible",!1),I.scrollDownArrowVisible(S.state)&&S.set("scrollDownArrowVisible",!1))},[S,V]),r.useImperativeHandle(D,()=>Z),(0,eC.useAnchoredPopupScrollLock)((Z||H)&&F,"touch"===q,G,K);let Q=(0,ef.useAnchorPositioning)({anchor:a,floatingRootContext:z,positionMethod:n,mounted:V,side:o,sideOffset:h,align:u,alignOffset:p,arrowPadding:g,collisionBoundary:f,collisionPadding:x,sticky:v,disableAnchorTracking:y??Z,collisionAvoidance:w,keepMounted:!0}),ee=Z?"none":Q.side,et=Z?eS:Q.positionerStyles,er={open:F,side:ee,align:Q.align,anchorHidden:Q.anchorHidden},el=(0,c.useStableCallback)(e=>{S.set("positionerElement",e)}),ea=(0,ek.usePositioner)(e,er,{styles:et,transitionStatus:$,props:C,refs:[l,el],hidden:!V,inert:!F}),en=r.useRef(0),es=(0,c.useStableCallback)(e=>{if(0===e.size&&0===en.current||0===A.current.length)return;let t=en.current;if(en.current=e.size,e.size===t)return;let r=(0,P.createChangeEventDetails)(L.REASONS.none);if(0!==t&&!S.state.multiple&&null!==U&&-1===(0,M.findItemIndex)(A.current,U,_)){let e=R.current,t=null!=e&&-1!==(0,M.findItemIndex)(A.current,e,_)?e:null;O(t,r),null===t&&(S.set("selectedIndex",null),T.current=null)}if(0!==t&&S.state.multiple&&Array.isArray(U)){let e=U.filter(e=>-1!==(0,M.findItemIndex)(A.current,e,_));(e.length!==U.length||e.some(e=>!(0,M.selectedValueIncludes)(U,e,_)))&&(O(e,r),0===e.length&&(S.set("selectedIndex",null),T.current=null))}if(F&&Z){S.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:""};ej(G,e),ej(B.current,e)}}),ei=r.useMemo(()=>({...Q,side:ee,alignItemWithTriggerActive:Z,setControlledAlignItemWithTrigger:J,scrollUpArrowRef:W,scrollDownArrowRef:Y}),[Q,ee,Z,J]);return(0,t.jsx)(ep.CompositeList,{elementsRef:N,labelsRef:E,onMapChange:es,children:(0,t.jsxs)(eg.Provider,{value:ei,children:[V&&H&&(0,t.jsx)(ey.InternalBackdrop,{inert:(0,eh.inertValue)(!F),cutout:K}),ea]})})});var eM=e.i(32572),eE=e.i(152628),eD=e.i(473121),eT=e.i(537349),eA=e.i(988915),eR=e.i(245041),eI=e.i(95963);let eP="base-ui-disable-scrollbar";var eL=e.i(729718),eB=e.i(113292),eO=e.i(613580),ez=e.i(240787),eF=e.i(265513);let eV={...J.popupStateMapping,...ec.transitionStatusMapping},eH=r.forwardRef(function(e,l){let a,{render:n,className:s,style:i,finalFocus:o,...u}=e,{store:h,popupRef:p,onOpenChangeComplete:f,setOpen:x,valueRef:g,selectedItemTextRef:v,keyboardActiveRef:y,multiple:b,handleScrollArrowVisibility:w,scrollHandlerRef:k,listRef:C,highlightItemOnHover:S}=(0,j.useSelectRootContext)(),{side:N,align:M,alignItemWithTriggerActive:E,isPositioned:D,setControlledAlignItemWithTrigger:T,scrollDownArrowRef:A,scrollUpArrowRef:R}=ev(),O=null!=(0,eL.useToolbarRootContext)(!0),z=(0,j.useSelectFloatingContext)(),F=(0,eF.useDirection)(),{nonce:H,disableStyleElements:U}=(0,ez.useCSPContext)(),q=(0,m.useStore)(h,I.id),K=(0,m.useStore)(h,I.open),_=(0,m.useStore)(h,I.mounted),$=(0,m.useStore)(h,I.popupProps),Y=(0,m.useStore)(h,I.transitionStatus),X=(0,m.useStore)(h,I.triggerElement),J=(0,m.useStore)(h,I.positionerElement),Z=(0,m.useStore)(h,I.listElement),Q=r.useRef(!1),ee=r.useRef(!1),et=r.useRef({}),er=(0,eA.useAnimationFrame)(),el=(0,c.useStableCallback)(e=>{var t;if(!J||!p.current||!ee.current)return;if(Q.current||!E)return void w();let r="0px"===J.style.top,l="0px"===J.style.bottom;if(!r&&!l)return void w();let a=eG(J),n=(t=J.getBoundingClientRect().height,t/a.y),s=(0,W.ownerDocument)(J),i=getComputedStyle(J),o=parseFloat(i.marginTop),d=parseFloat(i.marginBottom),c=eU(getComputedStyle(p.current)),u=Math.min(s.documentElement.clientHeight-o-d,c),m=e.scrollTop,h=eq(e),f=0,x=null,g=!1,v=!1,y=e=>{J.style.height=`${e}px`},b=r?h-m:m,j=Math.min(n+b,u);if(f=j,b<=1){let t;return void((t=V(b,0,u-n))>0&&y(n+t),e.scrollTop=r?h:0,u-(n+t)<=1&&(Q.current=!0),w())}if(u-j>1)r?v=!0:x=0;else if(g=!0,l&&m<h){let e=n+b-u;x=m-(b-e)}if(0!==(f=Math.ceil(f))&&y(f),v||null!=x){let t=eq(e),r=v?t:V(x,0,t);Math.abs(e.scrollTop-r)>1&&(e.scrollTop=r)}(g||f>=u-1)&&(Q.current=!0),w()});r.useImperativeHandle(k,()=>el,[el]),(0,B.useOpenChangeComplete)({open:K,ref:p,onComplete(){K&&f?.(!0)}}),(0,d.useIsoLayoutEffect)(()=>{J&&p.current&&!Object.keys(et.current).length&&(et.current={top:J.style.top||"0",left:J.style.left||"0",right:J.style.right,height:J.style.height,bottom:J.style.bottom,minHeight:J.style.minHeight,maxHeight:J.style.maxHeight,marginTop:J.style.marginTop,marginBottom:J.style.marginBottom})},[p,J]),(0,d.useIsoLayoutEffect)(()=>{K||E||(ee.current=!1,Q.current=!1,ej(J,et.current))},[K,E,J,p]),(0,d.useIsoLayoutEffect)(()=>{let e=p.current;if(!K||!X||!J||!e||E&&!D||"ending"===h.state.transitionStatus)return;if(!E){ee.current=!0,er.request(w),e.style.removeProperty("--transform-origin");return}let t=function(e){let{style:t}=e,r={};for(let[e,l]of e_)r[e]=t.getPropertyValue(e),t.setProperty(e,l,"important");return()=>{for(let[e]of e_){let l=r[e];l?t.setProperty(e,l):t.removeProperty(e)}}}(e);e.style.removeProperty("--transform-origin");try{let t,r=v.current,l=g.current,a=getComputedStyle(J),n=getComputedStyle(e),s=(0,W.ownerDocument)(X),i=(0,eT.ownerWindow)(J),o=eG(X),d=eK(X.getBoundingClientRect(),o),c=eK(J.getBoundingClientRect(),o),u=d.height,m=Z||e,p=m.scrollHeight,f=parseFloat(n.borderBottomWidth),x=parseFloat(a.marginTop)||10,y=parseFloat(a.marginBottom)||10,b=parseFloat(a.minHeight)||100,j=eU(n),k=s.documentElement.clientHeight-x-y,N=s.documentElement.clientWidth,M=k-d.bottom+u,E="rtl"===F?d.right-c.width:d.left,D=0;if(r&&l){let e=eK(l.getBoundingClientRect(),o);t=eK(r.getBoundingClientRect(),o),E=c.left+("rtl"===F?e.right-t.right:e.left-t.left);let a=e.top-d.top+e.height/2;D=t.top-c.top+t.height/2-a}let A=M+D+y+f,R=Math.min(k,A),I=k-x-y,P=A-R;J.style.left=`${V(E,5,N-5-c.width)}px`,J.style.height=`${R}px`,J.style.maxHeight="auto",J.style.marginTop=`${x}px`,J.style.marginBottom=`${y}px`,e.style.height="100%";let L=eq(m),B=P>=L-1;B&&(R=Math.min(k,c.height)-(P-L));let O=d.top<20||d.bottom>k-20||Math.ceil(R)+1<Math.min(p,b),z=(i.visualViewport?.scale??1)!==1&&eD.isWebKit;if(O||z){ee.current=!0,ej(J,et.current),T(!1);return}let H=Math.max(b,R);if(B){let e=Math.max(0,k-A);J.style.top=c.height>=I?"0":`${e}px`,J.style.height=`${R}px`,m.scrollTop=eq(m)}else J.style.bottom="0",m.scrollTop=P;if(t){let r=c.top,l=c.height,a=t.top+t.height/2,n=V(l>0?(a-r)/l*100:50,0,100);e.style.setProperty("--transform-origin",`50% ${n}%`)}(H===k||R>=j)&&(Q.current=!0),w(),S&&null===h.state.selectedIndex&&null===h.state.activeIndex&&null!=C.current[0]&&h.set("activeIndex",0),ee.current=!0}finally{t()}},[h,K,J,X,g,v,p,w,E,T,er,A,R,Z,C,S,F,D]),r.useEffect(()=>{if(!E||!J||!K)return;let e=(0,eT.ownerWindow)(J);return(0,eE.addEventListener)(e,"resize",function(e){x(!1,(0,P.createChangeEventDetails)(L.REASONS.windowResize,e))})},[x,E,J,K]);let ea={...Z?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":b||void 0,id:`${q}-list`},onKeyDown(e){y.current=!0,O&&eB.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()},onMouseMove(){y.current=!1},onScroll(e){Z||el(e.currentTarget)},...E&&{style:Z?{height:"100%"}:ew}},en=(0,G.useRenderElement)("div",e,{ref:[l,p],state:{open:K,transitionStatus:Y,side:N,align:M},stateAttributesMapping:eV,props:[$,ea,(0,eO.getDisabledMountTransitionStyles)(Y),{className:!Z&&E?eP:void 0},u]});return(0,t.jsxs)(r.Fragment,{children:[!U&&(a=H,(0,t.jsx)("style",{nonce:a,href:eP,precedence:"base-ui:low",children:`.${eP}{scrollbar-width:none}.${eP}::-webkit-scrollbar{display:none}`})),(0,t.jsx)(eR.FloatingFocusManager,{context:z,modal:!1,disabled:!_,returnFocus:o,restoreFocus:!0,children:en})]})});function eU(e){let t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function eq(e){return H(e.scrollHeight,e.clientHeight)}function eG(e){return eI.platform.getScale(e)}function eK(e,t){return(0,eM.rectToClientRect)({x:e.x/t.x,y:e.y/t.y,width:e.width/t.x,height:e.height/t.y})}let e_=[["transform","none"],["scale","1"],["translate","0 0"]],e$=r.forwardRef(function(e,t){let{className:r,render:l,style:a,...n}=e,{store:s,scrollHandlerRef:i}=(0,j.useSelectRootContext)(),{alignItemWithTriggerActive:o}=ev(),d=(0,m.useStore)(s,I.hasScrollArrows),u=(0,m.useStore)(s,I.openMethod),h=(0,m.useStore)(s,I.multiple),p=(0,m.useStore)(s,I.id),f={id:`${p}-list`,role:"listbox","aria-multiselectable":h||void 0,onScroll(e){i.current?.(e.currentTarget)},...o&&{style:ew},className:d&&"touch"!==u?eP:void 0},x=(0,c.useStableCallback)(e=>{s.set("listElement",e)});return(0,G.useRenderElement)("div",e,{ref:[t,x],props:[f,n]})});var eW=e.i(399674);let eY=r.createContext(void 0);function eX(){let e=r.useContext(eY);if(!e)throw Error((0,ex.default)(57));return e}let eJ=r.memo(r.forwardRef(function(e,l){let{render:a,className:n,value:s=null,label:i,disabled:o=!1,nativeButton:c=!1,style:h,...p}=e,f=r.useRef(null),x=(0,eW.useCompositeListItem)({label:i,textRef:f,indexGuessBehavior:eW.IndexGuessBehavior.GuessFromOrder}),{store:g,getItemProps:v,setOpen:y,setValue:b,selectionRef:w,typingRef:k,valuesRef:C,multiple:S,selectedItemTextRef:N}=(0,j.useSelectRootContext)(),E=(0,m.useStore)(g,I.isActive,x.index),D=(0,m.useStore)(g,I.isSelected,x.index,s),T=(0,m.useStore)(g,I.isSelectedByFocus,x.index),A=(0,m.useStore)(g,I.isItemEqualToValue),R=x.index,B=-1!==R,O=r.useRef(null),z=(0,u.useValueAsRef)(R);(0,d.useIsoLayoutEffect)(()=>{if(!B)return;let e=C.current;return e[R]=s,()=>{delete e[R]}},[B,R,s,C]),(0,d.useIsoLayoutEffect)(()=>{if(!B)return;let e=g.state.value,t=e;S&&Array.isArray(e)&&e.length>0&&(t=e[e.length-1]),void 0!==t&&(0,M.compareItemEquality)(s,t,A)&&(g.set("selectedIndex",R),f.current&&(N.current=f.current))},[B,R,S,A,g,s,N]);let F=v({active:E,selected:D});F.id=void 0;let V=r.useRef(null),H=r.useRef("mouse"),U=r.useRef(!1),{getButtonProps:q,buttonRef:K}=(0,et.useButton)({disabled:o,focusableWhenDisabled:!0,native:c,composite:!0}),_=(0,G.useRenderElement)("div",e,{ref:[K,l,x.ref,O],state:{disabled:o,selected:D,highlighted:E},props:[F,{role:"option","aria-selected":D,tabIndex:E?0:-1,onTouchStart(){w.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(e){V.current=e.key,g.set("activeIndex",R)," "===e.key&&k.current&&e.preventDefault()},onClick(e){if((U.current=!1,"keydown"!==e.type||null!==V.current)&&!o&&("keydown"!==e.type||" "!==V.current||!k.current)&&("touch"===H.current||E)){V.current=null;var t=e.nativeEvent;let r=g.state.value;if(S){let e=Array.isArray(r)?r:[];b(D?(0,M.removeItem)(e,s,A):[...e,s],(0,P.createChangeEventDetails)(L.REASONS.itemPress,t))}else b(s,(0,P.createChangeEventDetails)(L.REASONS.itemPress,t)),y(!1,(0,P.createChangeEventDetails)(L.REASONS.itemPress,t))}},onPointerEnter(e){H.current=e.pointerType},onPointerDown(e){H.current=e.pointerType,U.current=!0},onMouseUp(){if(o)return;if(U.current){U.current=!1;return}let e=!w.current.allowSelectedMouseUp&&D,t=!w.current.allowUnselectedMouseUp&&!D;e||t||"touch"!==H.current&&!E||O.current?.click()}},p,q]}),$=r.useMemo(()=>({selected:D,indexRef:z,textRef:f,selectedByFocus:T,hasRegistered:B}),[D,z,f,T,B]);return(0,t.jsx)(eY.Provider,{value:$,children:_})})),eZ=r.forwardRef(function(e,r){let l=e.keepMounted??!1,{selected:a}=eX();return l||a?(0,t.jsx)(eQ,{...e,ref:r}):null}),eQ=r.memo(r.forwardRef((e,t)=>{let{render:l,className:a,style:n,keepMounted:s,...i}=e,{selected:o}=eX(),d=r.useRef(null),{transitionStatus:c,setMounted:u}=(0,S.useTransitionStatus)(o),m=(0,G.useRenderElement)("span",e,{ref:[t,d],state:{selected:o,transitionStatus:c},props:[{"aria-hidden":!0,children:"✔️"},i],stateAttributesMapping:ec.transitionStatusMapping});return(0,B.useOpenChangeComplete)({open:o,ref:d,onComplete(){o||u(!1)}}),m})),e0=r.memo(r.forwardRef(function(e,t){let{indexRef:l,textRef:a,selectedByFocus:n,hasRegistered:s}=eX(),{selectedItemTextRef:i}=(0,j.useSelectRootContext)(),{className:o,render:d,style:c,...u}=e,m=r.useCallback(e=>{if(!e||!s)return;let t=null===i.current||!i.current.isConnected;(n||t&&0===l.current)&&(i.current=e)},[i,l,n,s]);return(0,G.useRenderElement)("div",e,{ref:[m,t,a],props:u})})),e1={...J.popupStateMapping,...ec.transitionStatusMapping},e2=r.forwardRef(function(e,t){let{className:r,render:l,style:a,...n}=e,{store:s}=(0,j.useSelectRootContext)(),{side:i,align:o,arrowRef:d,arrowStyles:c,arrowUncentered:u,alignItemWithTriggerActive:h}=ev(),p=(0,m.useStore)(s,I.open,!0),f=(0,G.useRenderElement)("div",e,{state:{open:p,side:i,align:o,uncentered:u},ref:[d,t],props:[{style:c,"aria-hidden":!0},n],stateAttributesMapping:e1});return h?null:f}),e5=r.forwardRef(function(e,t){let{render:r,className:l,style:a,direction:n,keepMounted:s=!1,...i}=e,o="up"===n,{store:c,popupRef:u,listRef:h,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:f}=(0,j.useSelectRootContext)(),{side:x,scrollDownArrowRef:g,scrollUpArrowRef:v}=ev(),y=o?I.scrollUpArrowVisible:I.scrollDownArrowVisible,b=(0,m.useStore)(c,y),w=(0,m.useStore)(c,I.openMethod),k=b&&"touch"!==w,C=(0,Y.useTimeout)(),N=o?v:g,{transitionStatus:M,setMounted:E}=(0,S.useTransitionStatus)(k);(0,d.useIsoLayoutEffect)(()=>(f.current+=1,c.state.hasScrollArrows||c.set("hasScrollArrows",!0),()=>{f.current=Math.max(0,f.current-1),0===f.current&&c.state.hasScrollArrows&&c.set("hasScrollArrows",!1)}),[c,f]),(0,B.useOpenChangeComplete)({open:k,ref:N,onComplete(){k||E(!1)}});let D=(0,G.useRenderElement)("div",e,{ref:[t,N],state:{direction:n,visible:k,side:x,transitionStatus:M},props:[{"aria-hidden":!0,children:o?"▲":"▼",style:{position:"absolute"},onMouseMove(e){0===e.movementX&&0===e.movementY||C.isStarted()||(c.set("activeIndex",null),C.start(40,function e(){let t=c.state.listElement??u.current;if(!t)return;c.set("activeIndex",null),p();let r=H(t.scrollHeight,t.clientHeight),l=U(t.scrollTop,r),a=l===(o?0:r),n=h.current;if(l!==t.scrollTop&&(t.scrollTop=l),0===n.length&&c.set(o?"scrollUpArrowVisible":"scrollDownArrowVisible",!a),a)return void C.clear();if(n.length>0){let e=N.current?.offsetHeight||0;t.scrollTop=function(e,t,r,l,a,n){if(t){let t=0,l=r+a-1;for(let r=0;r<e.length;r+=1){let a=e[r];if(a&&a.offsetTop>=l){t=r;break}}let s=Math.max(0,t-1),i=e[s];return s<t&&i?U(i.offsetTop-a,n):0}let s=e.length-1,i=r+l-a+1;for(let t=0;t<e.length;t+=1){let r=e[t];if(r&&r.offsetTop+r.offsetHeight>i){s=Math.max(0,t-1);break}}let o=Math.min(e.length-1,s+1),d=e[o];return o>s&&d?U(d.offsetTop+d.offsetHeight-l+a,n):n}(n,o,l,t.clientHeight,e,r)}C.start(40,e)}))},onMouseLeave(){C.clear()}},i]});return k||s?D:null}),e3=r.forwardRef(function(e,r){return(0,t.jsx)(e5,{...e,ref:r,direction:"down"})}),e4=r.forwardRef(function(e,r){return(0,t.jsx)(e5,{...e,ref:r,direction:"up"})}),e8=r.createContext(void 0),e6=r.forwardRef(function(e,l){let{className:a,render:n,style:s,...i}=e,[o,d]=r.useState(),c=r.useMemo(()=>({labelId:o,setLabelId:d}),[o,d]),u=(0,G.useRenderElement)("div",e,{ref:l,props:[{role:"group","aria-labelledby":o},i]});return(0,t.jsx)(e8.Provider,{value:c,children:u})});var e9=e.i(333961);let e7=r.forwardRef(function(e,t){let{className:l,render:a,id:n,style:s,...i}=e,{setLabelId:o}=function(){let e=r.useContext(e8);if(void 0===e)throw Error((0,ex.default)(56));return e}(),c=(0,e9.useBaseUiId)(n);return(0,d.useIsoLayoutEffect)(()=>{o(c)},[c,o]),(0,G.useRenderElement)("div",e,{ref:t,props:[{id:c},i]})});var te=e.i(227384);e.s(["Arrow",0,e2,"Backdrop",0,em,"Group",0,e6,"GroupLabel",0,e7,"Icon",0,es,"Item",0,eJ,"ItemIndicator",0,eZ,"ItemText",0,e0,"Label",0,$,"List",0,e$,"Popup",0,eH,"Portal",0,ed,"Positioner",0,eN,"Root",0,function(e){let{id:N,value:E,defaultValue:D=null,onValueChange:R,open:V,defaultOpen:G=!1,onOpenChange:K,name:_,form:$,autoComplete:W,disabled:Y=!1,readOnly:X=!1,required:J=!1,modal:Z=!0,actionsRef:Q,inputRef:ee,onOpenChangeComplete:et,items:er,multiple:el=!1,itemToStringLabel:ea,itemToStringValue:en,isItemEqualToValue:es=M.defaultItemEquality,highlightItemOnHover:ei=!0,children:eo}=e,{clearErrors:ed}=(0,O.useFormContext)(),{setDirty:ec,setTouched:eu,setFocused:em,shouldValidateOnChange:eh,validityData:ep,setFilled:ef,name:ex,disabled:eg,validation:ev,validationMode:ey}=(0,w.useFieldRootContext)(),eb=(0,C.useLabelableId)({id:N}),ej=eg||Y,ew=ex??_,[ek,eC]=(0,o.useControlled)({controlled:E,default:el?D??p.EMPTY_ARRAY:D,name:"Select",state:"value"}),[eS,eN]=(0,o.useControlled)({controlled:V,default:G,name:"Select",state:"open"}),eM=r.useRef([]),eE=r.useRef([]),eD=r.useRef(null),eT=r.useRef(null),eA=r.useRef(0),eR=r.useRef(null),eI=r.useRef([]),eP=r.useRef(!1),eL=r.useRef(!1),eB=r.useRef(null),eO=r.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),ez=r.useRef(!1),{mounted:eF,setMounted:eV,transitionStatus:eH}=(0,S.useTransitionStatus)(eS),{openMethod:eU,triggerProps:eq}=(0,F.useOpenInteractionType)(eS),eG=(0,n.useRefWithInit)(()=>new h.Store({id:eb,labelId:void 0,modal:Z,multiple:el,itemToStringLabel:ea,itemToStringValue:en,isItemEqualToValue:es,value:ek,open:eS,mounted:eF,transitionStatus:eH,items:er,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,eK=(0,m.useStore)(eG,I.activeIndex),e_=(0,m.useStore)(eG,I.selectedIndex),e$=(0,m.useStore)(eG,I.triggerElement),eW=(0,m.useStore)(eG,I.positionerElement),eY=(0,i.usePreviousValue)(eU),eX=eU??eY,eJ=r.useMemo(()=>el&&Array.isArray(ek)&&0===ek.length?"":A(ek,en),[el,ek,en]),eZ=r.useMemo(()=>el&&Array.isArray(ek)?ek.map(e=>A(e,en)):A(ek,en),[el,ek,en]),eQ=(0,u.useValueAsRef)(eG.state.triggerElement),e0=(0,c.useStableCallback)(()=>eZ);(0,k.useRegisterFieldControl)(eQ,{id:eb,value:ek,getValue:e0});let e1=r.useRef(ek);(0,d.useIsoLayoutEffect)(()=>{ek!==e1.current&&eG.set("forceMount",!0)},[eG,ek]),(0,d.useIsoLayoutEffect)(()=>{ef(el?Array.isArray(ek)&&ek.length>0:null!=ek)},[el,ek,ef]),(0,d.useIsoLayoutEffect)(function(){if(eS)return;let e=eI.current;if(el){let t=Array.isArray(ek)?ek:[];if(0===t.length)return void eG.set("selectedIndex",null);let r=t[t.length-1],l=(0,M.findItemIndex)(e,r,es);return void eG.set("selectedIndex",-1===l?null:l)}let t=(0,M.findItemIndex)(e,ek,es);eG.set("selectedIndex",-1===t?null:t)},[el,eS,ek,eI,es,eG]),(0,z.useValueChanged)(ek,()=>{ed(ew),ec(ek!==ep.initialValue),eh()?ev.commit(ek):ev.commit(ek,!0)});let e2=(0,c.useStableCallback)((e,t)=>{if(K?.(e,t),!t.isCanceled&&(eN(e),e||t.reason!==L.REASONS.focusOut&&t.reason!==L.REASONS.outsidePress||(eu(!0),em(!1),"onBlur"===ey&&ev.commit(ek)),!e&&null!==eG.state.activeIndex)){let e=eM.current[eG.state.activeIndex];queueMicrotask(()=>{e?.setAttribute("tabindex","-1")})}}),e5=(0,c.useStableCallback)(()=>{eV(!1),eG.update({activeIndex:null,openMethod:null}),et?.(!1)});(0,B.useOpenChangeComplete)({enabled:!Q,open:eS,ref:eD,onComplete(){eS||e5()}}),r.useImperativeHandle(Q,()=>({unmount:e5}),[e5]);let e3=(0,c.useStableCallback)((e,t)=>{R?.(e,t),t.isCanceled||eC(e)}),e4=(0,c.useStableCallback)(()=>{let e=eG.state.listElement||eD.current;if(!e)return;let t=H(e.scrollHeight,e.clientHeight),r=U(e.scrollTop,t),l=r>0,a=r<t;eG.state.scrollUpArrowVisible!==l&&eG.set("scrollUpArrowVisible",l),eG.state.scrollDownArrowVisible!==a&&eG.set("scrollDownArrowVisible",a)}),e8=(0,g.useFloatingRootContext)({open:eS,onOpenChange:e2,elements:{reference:e$,floating:eW}}),e6=(0,f.useClick)(e8,{enabled:!X&&!ej,event:"mousedown"}),e9=(0,x.useDismiss)(e8,{bubbles:!1}),e7=(0,y.useListNavigation)(e8,{enabled:!X&&!ej,listRef:eM,activeIndex:eK,selectedIndex:e_,disabledIndices:p.EMPTY_ARRAY,onNavigate(e){(null!==e||eS)&&eG.set("activeIndex",e)},focusItemOnHover:ei}),te=(0,b.useTypeahead)(e8,{enabled:!X&&!ej&&(eS||!el),listRef:eE,activeIndex:eK,selectedIndex:e_,onMatch(e){eS?eG.set("activeIndex",e):e3(eI.current[e],(0,P.createChangeEventDetails)("none"))},onTypingChange(e){eP.current=e}}),{getReferenceProps:tt,getFloatingProps:tr,getItemProps:tl}=(0,v.useInteractions)([e6,e9,e7,te]),ta=r.useMemo(()=>(0,q.mergeProps)(tt(),eq,eb?{id:eb}:p.EMPTY_OBJECT),[tt,eq,eb]);(0,s.useOnFirstRender)(()=>{eG.update({popupProps:tr(),triggerProps:ta})}),(0,d.useIsoLayoutEffect)(()=>{eG.update({id:eb,modal:Z,multiple:el,value:ek,open:eS,mounted:eF,transitionStatus:eH,popupProps:tr(),triggerProps:ta,items:er,itemToStringLabel:ea,itemToStringValue:en,isItemEqualToValue:es,openMethod:eX})},[eG,eb,Z,el,ek,eS,eF,eH,tr,ta,er,ea,en,es,eX]);let tn=r.useMemo(()=>({store:eG,name:ew,required:J,disabled:ej,readOnly:X,multiple:el,highlightItemOnHover:ei,setValue:e3,setOpen:e2,listRef:eM,popupRef:eD,scrollHandlerRef:eT,handleScrollArrowVisibility:e4,scrollArrowsMountedCountRef:eA,getItemProps:tl,events:e8.context.events,valueRef:eR,valuesRef:eI,labelsRef:eE,typingRef:eP,selectionRef:eO,selectedItemTextRef:eB,validation:ev,onOpenChangeComplete:et,keyboardActiveRef:eL,alignItemWithTriggerActiveRef:ez,initialValueRef:e1}),[eG,ew,J,ej,X,el,ei,e3,e2,tl,e8.context.events,ev,et,e4]),ts=(0,a.useMergedRefs)(ee,ev.inputRef),ti=el&&Array.isArray(ek)&&ek.length>0,to=el?void 0:ew,td=r.useMemo(()=>el&&Array.isArray(ek)&&ew?ek.map(e=>{let r=A(e,en);return(0,t.jsx)("input",{type:"hidden",form:$,name:ew,value:r},r)}):null,[el,ek,$,ew,en]);return(0,t.jsx)(j.SelectRootContext.Provider,{value:tn,children:(0,t.jsxs)(j.SelectFloatingContext.Provider,{value:e8,children:[eo,(0,t.jsx)("input",{...ev.getInputValidationProps({onFocus(){eG.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.currentTarget.value,r=(0,P.createChangeEventDetails)(L.REASONS.none,e.nativeEvent);eG.set("forceMount",!0),queueMicrotask(function(){if(el)return;let e=eI.current.find(e=>A(e,en).toLowerCase()===t.toLowerCase()||T(e,ea).toLowerCase()===t.toLowerCase());null!=e&&(ec(e!==ep.initialValue),e3(e,r),eh()&&ev.commit(e))})}}),id:eb&&null==to?`${eb}-hidden-input`:void 0,form:$,name:to,autoComplete:W,value:eJ,disabled:ej,required:J&&!ti,readOnly:X,ref:ts,style:ew?l.visuallyHiddenInput:l.visuallyHidden,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),td]})})},"ScrollDownArrow",0,e3,"ScrollUpArrow",0,e4,"Separator",()=>te.Separator,"Trigger",0,el,"Value",0,en],105575);var tt=e.i(105575),tt=tt,tr=e.i(353533),tl=e.i(372357),tl=tl,ta=e.i(268006),tn=e.i(513079),tn=tn;let ts=tt.Root;function ti(e){let{className:r,...l}=e;return(0,t.jsx)(tt.ScrollUpArrow,{"data-slot":"select-scroll-up-button",className:(0,tr.cn)("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",r),...l,children:(0,t.jsx)(tn.default,{})})}function to(e){let{className:r,...l}=e;return(0,t.jsx)(tt.ScrollDownArrow,{"data-slot":"select-scroll-down-button",className:(0,tr.cn)("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",r),...l,children:(0,t.jsx)(tl.default,{})})}e.s(["Select",0,ts,"SelectContent",0,function(e){let{className:r,children:l,side:a="bottom",sideOffset:n=4,align:s="start",alignOffset:i=0,alignItemWithTrigger:o=!1,...d}=e;return(0,t.jsx)(tt.Portal,{children:(0,t.jsx)(tt.Positioner,{side:a,sideOffset:n,align:s,alignOffset:i,alignItemWithTrigger:o,className:"isolate z-50",children:(0,t.jsxs)(tt.Popup,{"data-slot":"select-content","data-align-trigger":o,className:(0,tr.cn)("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",r),...d,children:[(0,t.jsx)(ti,{}),(0,t.jsx)(tt.List,{children:l}),(0,t.jsx)(to,{})]})})})},"SelectItem",0,function(e){let{className:r,children:l,...a}=e;return(0,t.jsxs)(tt.Item,{"data-slot":"select-item",className:(0,tr.cn)("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",r),...a,children:[(0,t.jsx)(tt.ItemText,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:l}),(0,t.jsx)(tt.ItemIndicator,{render:(0,t.jsx)("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:(0,t.jsx)(ta.CheckIcon,{className:"pointer-events-none"})})]})},"SelectTrigger",0,function(e){let{className:r,size:l="default",children:a,...n}=e;return(0,t.jsxs)(tt.Trigger,{"data-slot":"select-trigger","data-size":l,className:(0,tr.cn)("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",r),...n,children:[a,(0,t.jsx)(tt.Icon,{render:(0,t.jsx)(tl.default,{className:"pointer-events-none size-4 text-muted-foreground"})})]})},"SelectValue",0,function(e){let{className:r,...l}=e;return(0,t.jsx)(tt.Value,{"data-slot":"select-value",className:(0,tr.cn)("flex flex-1 text-left",r),...l})}],690176)},734549,456992,644113,390995,75769,e=>{"use strict";var t=e.i(191788),r=e.i(950323),l=e.i(679935),a=e.i(844044);let n=e=>fetch(e).then(e=>{if(!e.ok)throw Error("fetch failed");return e.json()}),s={builtins:[],custom:[],order:[]},i=(e,t)=>{if(0===t.length)return e;let r=new Map(e.map(e=>[e.id,e])),l=[];for(let e of t){let t=r.get(e);t&&(l.push(t),r.delete(e))}for(let e of r.values())l.push(e);return l};e.s(["default",0,()=>{let{data:e,isLoading:o,mutate:d}=(0,r.default)("/api/sidebar-items",n,{revalidateOnFocus:!1}),c=e??s,u=(0,t.useMemo)(()=>i([...c.builtins,...c.custom].filter(e=>e.enabled),c.order),[c]),m=(0,t.useMemo)(()=>i([...c.builtins,...c.custom],c.order),[c]),h=(0,t.useCallback)(async(e,t,r)=>{let l=e.filter(e=>!e.enabled).map(e=>e.id);if(!(await fetch("/api/sidebar-items",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({custom:t,disabledBuiltinIds:l,order:r})})).ok)throw Error("save failed")},[]),p=(0,t.useCallback)(async(e,t)=>{let r=r=>({...r,builtins:r.builtins.map(r=>r.id===e?{...r,enabled:t}:r)});await d(async e=>{let t=r(e??s);return await h(t.builtins,t.custom,t.order),t},{optimisticData:e=>r(e??s),rollbackOnError:!0,revalidate:!1}).catch(()=>l.toast.error((0,a.t)("settings","saveFailed")))},[d,h]),f=(0,t.useCallback)(async e=>{let t=t=>({...t,custom:e});await d(async e=>{let r=t(e??s);return await h(r.builtins,r.custom,r.order),r},{optimisticData:e=>t(e??s),rollbackOnError:!0,revalidate:!1}).catch(()=>l.toast.error((0,a.t)("settings","saveFailed")))},[d,h]),x=(0,t.useCallback)(async e=>{let t=t=>({...t,order:e});await d(async e=>{let r=t(e??s);return await h(r.builtins,r.custom,r.order),r},{optimisticData:e=>t(e??s),rollbackOnError:!0,revalidate:!1}).catch(()=>l.toast.error((0,a.t)("settings","saveFailed")))},[d,h]),g=(0,t.useCallback)(async e=>{let t=t=>({...t,custom:t.custom.filter(t=>t.id!==e),order:t.order.filter(t=>t!==e)});await d(async e=>{let r=t(e??s);return await h(r.builtins,r.custom,r.order),r},{optimisticData:e=>t(e??s),rollbackOnError:!0,revalidate:!1}).catch(()=>l.toast.error((0,a.t)("settings","saveFailed")))},[d,h]),v=(0,t.useCallback)(async()=>{let e=e=>({builtins:e.builtins.map(e=>({...e,enabled:!0})),custom:[],order:[]});await d(async t=>{let r=e(t??s);return await h(r.builtins,r.custom,r.order),r},{optimisticData:t=>e(t??s),rollbackOnError:!0,revalidate:!1}).catch(()=>l.toast.error((0,a.t)("settings","saveFailed")))},[d,h]);return{items:u,allOrderedItems:m,builtinItems:c.builtins,customItems:c.custom,order:c.order,isLoading:o,toggleBuiltin:p,saveCustom:f,saveOrder:x,deleteItem:g,resetAll:v}}],734549);var o=e.i(205270);let d=(0,o.default)("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);e.s(["Link",0,d],456992);let c=(0,o.default)("bookmark",[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]]);e.s(["Bookmark",0,c],644113);let u=(0,o.default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);e.s(["Star",0,u],390995);let m=(0,o.default)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]);e.s(["Home",0,m],75769)},292057,e=>{"use strict";let t=(0,e.i(205270).default)("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);e.s(["BarChart3",0,t],292057)},595838,405624,545719,920814,477254,809852,575461,398024,409155,e=>{"use strict";var t=e.i(205270);let r=(0,t.default)("chart-pie",[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]]);e.s(["PieChart",0,r],595838);let l=(0,t.default)("chart-line",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);e.s(["LineChart",0,l],405624);let a=(0,t.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["Code",0,a],545719);let n=(0,t.default)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);e.s(["Database",0,n],920814);let s=(0,t.default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);e.s(["Server",0,s],477254);let i=(0,t.default)("cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);e.s(["Cloud",0,i],809852);let o=(0,t.default)("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);e.s(["Key",0,o],575461);let d=(0,t.default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["User",0,d],398024);let c=(0,t.default)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]);e.s(["Mail",0,c],409155)},983832,e=>{"use strict";let t=(0,e.i(205270).default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]);e.s(["Bell",0,t],983832)},218516,798656,e=>{"use strict";var t=e.i(205270);let r=(0,t.default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);e.s(["Calendar",0,r],218516);let l=(0,t.default)("camera",[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);e.s(["Camera",0,l],798656)},676618,e=>{"use strict";let t=(0,e.i(205270).default)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);e.s(["default",0,t])},674389,201692,786428,985044,117595,526251,536586,606306,504838,143547,e=>{"use strict";var t=e.i(676618);e.s(["Image",()=>t.default],674389);var r=e.i(205270);let l=(0,r.default)("film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);e.s(["Film",0,l],201692);let a=(0,r.default)("music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);e.s(["Music",0,a],786428);let n=(0,r.default)("headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);e.s(["Headphones",0,n],985044);let s=(0,r.default)("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]);e.s(["Mic",0,s],117595);let i=(0,r.default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);e.s(["File",0,i],526251);let o=(0,r.default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);e.s(["Upload",0,o],536586);let d=(0,r.default)("git-fork",[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]]);e.s(["GitFork",0,d],606306);let c=(0,r.default)("bug",[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]);e.s(["Bug",0,c],504838);let u=(0,r.default)("sliders-vertical",[["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M12 21v-9",key:"17s77i"}],["path",{d:"M12 8V3",key:"13r4qs"}],["path",{d:"M17 16h4",key:"h1uq16"}],["path",{d:"M19 12V3",key:"o1uvq1"}],["path",{d:"M19 21v-5",key:"qua636"}],["path",{d:"M3 14h4",key:"bcjad9"}],["path",{d:"M5 10V3",key:"cb8scm"}],["path",{d:"M5 21v-7",key:"1w1uti"}]]);e.s(["Sliders",0,u],143547)},401686,e=>{"use strict";let t=(0,e.i(205270).default)("palette",[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]]);e.s(["Palette",0,t],401686)},593828,353028,686047,348916,230129,561275,258769,503808,520688,472930,976977,47091,506495,239845,993101,548361,836294,749141,502599,e=>{"use strict";var t=e.i(205270);let r=(0,t.default)("brush",[["path",{d:"m11 10 3 3",key:"fzmg1i"}],["path",{d:"M6.5 21A3.5 3.5 0 1 0 3 17.5a2.62 2.62 0 0 1-.708 1.792A1 1 0 0 0 3 21z",key:"p4q2r7"}],["path",{d:"M9.969 17.031 21.378 5.624a1 1 0 0 0-3.002-3.002L6.967 14.031",key:"wy6l02"}]]);e.s(["Brush",0,r],593828);let l=(0,t.default)("map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);e.s(["Map",0,l],353028);let a=(0,t.default)("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);e.s(["MapPin",0,a],686047);let n=(0,t.default)("navigation",[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]]);e.s(["Navigation",0,n],348916);let s=(0,t.default)("compass",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}]]);e.s(["Compass",0,s],230129);let i=(0,t.default)("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);e.s(["Wifi",0,i],561275);let o=(0,t.default)("tablet",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["line",{x1:"12",x2:"12.01",y1:"18",y2:"18",key:"1dp563"}]]);e.s(["Tablet",0,o],258769);let d=(0,t.default)("laptop",[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]]);e.s(["Laptop",0,d],503808);let c=(0,t.default)("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]);e.s(["Cpu",0,c],520688);let u=(0,t.default)("hard-drive",[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]]);e.s(["HardDrive",0,u],472930);let m=(0,t.default)("memory-stick",[["path",{d:"M12 12v-2",key:"fwoke6"}],["path",{d:"M12 18v-2",key:"qj6yno"}],["path",{d:"M16 12v-2",key:"heuere"}],["path",{d:"M16 18v-2",key:"s1ct0w"}],["path",{d:"M2 11h1.5",key:"15p63e"}],["path",{d:"M20 18v-2",key:"12ehxp"}],["path",{d:"M20.5 11H22",key:"khsy7a"}],["path",{d:"M4 18v-2",key:"1c3oqr"}],["path",{d:"M8 12v-2",key:"1mwtfd"}],["path",{d:"M8 18v-2",key:"qcmpov"}],["rect",{x:"2",y:"6",width:"20",height:"10",rx:"2",key:"1qcswk"}]]);e.s(["MemoryStick",0,m],976977);let h=(0,t.default)("circuit-board",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M11 9h4a2 2 0 0 0 2-2V3",key:"1ve2rv"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"M7 21v-4a2 2 0 0 1 2-2h4",key:"1fwkro"}],["circle",{cx:"15",cy:"15",r:"2",key:"3i40o0"}]]);e.s(["CircuitBoard",0,h],47091);let p=(0,t.default)("radio",[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);e.s(["Radio",0,p],506495);let f=(0,t.default)("bluetooth",[["path",{d:"m7 7 10 10-5 5V2l5 5L7 17",key:"1q5490"}]]);e.s(["Bluetooth",0,f],239845);let x=(0,t.default)("heart",[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]]);e.s(["Heart",0,x],993101);let g=(0,t.default)("thumbs-up",[["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}],["path",{d:"M7 10v12",key:"1qc93n"}]]);e.s(["ThumbsUp",0,g],548361);let v=(0,t.default)("smile",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]]);e.s(["Smile",0,v],836294);let y=(0,t.default)("coffee",[["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M14 2v2",key:"6buw04"}],["path",{d:"M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1",key:"pwadti"}],["path",{d:"M6 2v2",key:"colzsn"}]]);e.s(["Coffee",0,y],749141);let b=(0,t.default)("rocket",[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]]);e.s(["Rocket",0,b],502599)},19080,760709,629679,289133,401399,e=>{"use strict";var t=e.i(205270);let r=(0,t.default)("award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);e.s(["Award",0,r],19080);let l=(0,t.default)("target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);e.s(["Target",0,l],760709);let a=(0,t.default)("flag",[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]);e.s(["Flag",0,a],629679);let n=(0,t.default)("crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);e.s(["Crosshair",0,n],289133);let s=(0,t.default)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);e.s(["Layers",0,s],401399)},40546,e=>{"use strict";let t=(0,e.i(205270).default)("panels-top-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]);e.s(["Layout",0,t],40546)},274489,e=>{"use strict";var t=e.i(191788),r=e.i(878528),l=e.i(456992),a=e.i(23826),n=e.i(644113),s=e.i(390995),i=e.i(75769),o=e.i(781641),d=e.i(292057),c=e.i(595838),u=e.i(405624),m=e.i(383751),h=e.i(815242),p=e.i(21152),f=e.i(545719),x=e.i(920814),g=e.i(477254),v=e.i(809852),y=e.i(470656),b=e.i(769480),j=e.i(575461),w=e.i(398024),k=e.i(665263),C=e.i(409155),S=e.i(918703),N=e.i(983832),M=e.i(218516),E=e.i(484862),D=e.i(550309),T=e.i(609104),A=e.i(798656),R=e.i(674389),I=e.i(201692),P=e.i(786428),L=e.i(985044),B=e.i(117595),O=e.i(835838),z=e.i(526251),F=e.i(661059),V=e.i(883210),H=e.i(536586),U=e.i(817908),q=e.i(932268),G=e.i(735299),K=e.i(606306),_=e.i(504838),$=e.i(399366),W=e.i(480778),Y=e.i(143547),X=e.i(401686),J=e.i(593828),Z=e.i(353028),Q=e.i(686047),ee=e.i(348916),et=e.i(230129),er=e.i(561275),el=e.i(584166),ea=e.i(830422),en=e.i(258769),es=e.i(503808),ei=e.i(520688),eo=e.i(472930),ed=e.i(976977),ec=e.i(47091),eu=e.i(506495),em=e.i(239845),eh=e.i(993101),ep=e.i(548361),ef=e.i(836294),ex=e.i(749141),eg=e.i(502599),ev=e.i(718581),ey=e.i(692127),eb=e.i(582809),ej=e.i(131464),ew=e.i(19080),ek=e.i(186534),eC=e.i(760709),eS=e.i(629679),eN=e.i(289133),eM=e.i(401399),eE=e.i(40546),eD=e.i(205270);let eT=(0,eD.default)("grid-3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]),eA=(0,eD.default)("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]),eR=(0,eD.default)("table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]),eI=(0,eD.default)("kanban",[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]]);var eP=e.i(977356);let eL=(0,eD.default)("brain",[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]]),eB=(0,eD.default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]),eO=(0,eD.default)("graduation-cap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]),ez=(0,eD.default)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]),eF={Globe:r.Globe,Link:l.Link,ExternalLink:a.ExternalLink,Bookmark:n.Bookmark,Star:s.Star,Home:i.Home,FileText:o.FileText,BarChart3:d.BarChart3,PieChart:c.PieChart,LineChart:u.LineChart,Activity:m.Activity,Zap:h.Zap,Terminal:p.Terminal,Code:f.Code,Database:x.Database,Server:g.Server,Cloud:v.Cloud,Shield:y.Shield,Lock:b.Lock,Key:j.Key,User:w.User,Users:k.Users,Mail:C.Mail,MessageSquare:S.MessageSquare,Bell:N.Bell,Calendar:M.Calendar,Clock:E.Clock,Search:D.Search,Eye:T.Eye,Camera:A.Camera,Image:R.Image,Film:I.Film,Music:P.Music,Headphones:L.Headphones,Mic:B.Mic,Folder:O.Folder,File:z.File,Archive:F.Archive,Download:V.Download,Upload:H.Upload,GitBranch:U.GitBranch,GitCommit:q.GitCommit,GitPullRequest:G.GitPullRequest,GitFork:K.GitFork,Bug:_.Bug,Wrench:$.Wrench,Settings:W.Settings,Sliders:Y.Sliders,Palette:X.Palette,Brush:J.Brush,Map:Z.Map,MapPin:Q.MapPin,Navigation:ee.Navigation,Compass:et.Compass,Wifi:er.Wifi,Monitor:el.Monitor,Smartphone:ea.Smartphone,Tablet:en.Tablet,Laptop:es.Laptop,Cpu:ei.Cpu,HardDrive:eo.HardDrive,MemoryStick:ed.MemoryStick,CircuitBoard:ec.CircuitBoard,Radio:eu.Radio,Bluetooth:em.Bluetooth,Heart:eh.Heart,ThumbsUp:ep.ThumbsUp,Smile:ef.Smile,Coffee:ex.Coffee,Rocket:eg.Rocket,Flame:ev.Flame,Sun:ey.Sun,Moon:eb.Moon,Sparkles:ej.Sparkles,Award:ew.Award,Trophy:ek.Trophy,Target:eC.Target,Flag:eS.Flag,Crosshair:eN.Crosshair,Layers:eM.Layers,Layout:eE.Layout,Grid:eT,List:eA,Table:eR,Kanban:eI,Bot:eP.Bot,Brain:eL,Lightbulb:eB,GraduationCap:eO,BookOpen:ez};e.s(["default",0,e=>{let{name:r,className:l,style:a}=e,n=eF[r];return n?(0,t.createElement)(n,{className:l,style:a}):null},"getIcon",0,e=>eF[e]],274489)},518313,e=>{"use strict";var t=e.i(391398),r=e.i(191788),l=e.i(352819),a=e.i(679935),n=e.i(939310),s=e.i(45124),i=e.i(31050),o=e.i(246618);e.s(["default",0,()=>{let e=(0,l.useTranslations)("settings.typography"),d=(0,i.default)(e=>e.regionTypography),c=(0,i.default)(e=>e.setRegionTypography),[u,m]=(0,r.useState)(null),[h,p]=(0,r.useState)(!1),f=u??d,x=(0,o.isValidRegionTypography)(f),g=!(0,o.regionTypographyEqual)(f,d),v=(e,t,r)=>{let l={...f[e],[t]:r};void 0===r&&delete l[t];let a={...f,[e]:l};0===Object.keys(l).length&&delete a[e],m(a)},y=async()=>{p(!0);try{await c(f),m(null),a.toast.success(e("applied"))}catch(t){a.toast.error(e("failed"),{description:t instanceof Error?t.message:void 0})}finally{p(!1)}};return(0,t.jsxs)("fieldset",{disabled:h,className:"space-y-4 border-b pb-4",children:[(0,t.jsx)("legend",{className:"text-sm font-medium",children:e("title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("description")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e("fontHelp")}),o.TYPOGRAPHY_REGIONS.map(r=>{let l=f[r]??{},a=(0,o.isValidRegionTypography)({[r]:l})?l:{};return(0,t.jsxs)("div",{className:"space-y-3 rounded-md border p-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e(`regions.${r}`)}),(0,t.jsx)(n.Button,{type:"button",variant:"ghost",size:"sm",disabled:!f[r],onClick:()=>{let e={...f};delete e[r],m(e)},children:e("reset")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,t.jsxs)("label",{className:"space-y-1 text-xs sm:col-span-2",children:[(0,t.jsx)("span",{children:e("fontFamily")}),(0,t.jsx)(s.Input,{value:l.fontFamily??"",maxLength:200,placeholder:e("fontPlaceholder"),onChange:e=>v(r,"fontFamily",e.target.value||void 0)})]}),(0,t.jsxs)("label",{className:"space-y-1 text-xs",children:[(0,t.jsx)("span",{children:e("fontSize")}),(0,t.jsx)(s.Input,{type:"number",min:o.MIN_REGION_FONT_SIZE,max:o.MAX_REGION_FONT_SIZE,step:"1",value:l.fontSize??"",placeholder:e("default"),onChange:e=>v(r,"fontSize",""===e.target.value?void 0:Number(e.target.value))})]}),(0,t.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,t.jsx)("label",{htmlFor:`typography-color-${r}`,children:e("color")}),(0,t.jsxs)("div",{className:"flex gap-2",children:[l.color&&!(0,o.isValidTypographyColor)(l.color)?(0,t.jsx)("span",{role:"img","aria-label":e("invalid"),className:"flex h-9 w-9 shrink-0 items-center justify-center rounded border border-destructive text-destructive",children:"!"}):(0,t.jsx)("input",{type:"color",className:"h-9 w-9 shrink-0 cursor-pointer rounded border bg-transparent","aria-label":`${e(`regions.${r}`)} ${e("color")}`,title:l.color??e("default"),value:l.color??"#808080",onChange:e=>v(r,"color",e.target.value)}),(0,t.jsx)(s.Input,{id:`typography-color-${r}`,value:l.color??"",maxLength:7,placeholder:e("default"),"aria-invalid":!!l.color&&!(0,o.isValidTypographyColor)(l.color),onChange:e=>v(r,"color",e.target.value||void 0)})]})]})]}),(0,t.jsx)("div",{className:"overflow-auto rounded bg-muted/30 p-2",style:{fontFamily:a.fontFamily?(0,o.regionFontFamily)(a.fontFamily):void 0,fontSize:a.fontSize,color:a.color},children:e("preview")})]},r)}),!x&&(0,t.jsx)("p",{role:"alert",className:"text-xs text-destructive",children:e("invalid")}),(0,t.jsxs)("div",{className:"flex flex-wrap justify-between gap-2",children:[(0,t.jsx)(n.Button,{type:"button",variant:"outline",size:"sm",disabled:0===Object.keys(f).length,onClick:()=>m({}),children:e("resetAll")}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(n.Button,{type:"button",variant:"outline",size:"sm",disabled:!g,onClick:()=>m(null),children:e("cancel")}),(0,t.jsx)(n.Button,{type:"button",size:"sm",disabled:!g||!x,onClick:y,children:e(h?"saving":"apply")})]})]})]})}])},524845,(e,t,r)=>{t.exports={name:"purplemux-improved",version:"0.5.3",description:"Manage multiple Claude Code sessions from your browser",license:"MIT",author:"subicura",repository:{type:"git",url:"https://github.com/stirp/purplemux-improved.git"},homepage:"https://github.com/stirp/purplemux-improved",bugs:{url:"https://github.com/stirp/purplemux-improved/issues"},keywords:["claude","terminal","multiplexer","tmux","claude-code"],engines:{node:">=24.0.0"},packageManager:"pnpm@12.11.2",browserslist:["chrome 111","edge 111","firefox 111","safari 15.4","ios_saf 15.4"],main:"dist-electron/main.js",bin:{"purplemux-improved":"./bin/purplemux.js"},files:["bin/","dist/",".next/standalone/","src/config/tmux.conf"],scripts:{dev:"tsx watch server.ts",build:"next build && node scripts/post-build.js && tsup","build:landing":"eleventy","dev:landing":"eleventy --serve","build:server":"tsup","build:electron:main":"tsup --config electron/tsup.config.ts","build:electron":"next build && node scripts/post-build.js --electron && tsup && pnpm build:electron:main","dev:electron":"ELECTRON_DEV_URL=http://localhost:8022 electron .","pack:electron":"pnpm build:electron && electron-builder --mac","pack:electron:dev":"pnpm build:electron && CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --mac -c.mac.identity=null -c.mac.notarize=false",start:"NODE_ENV=production tsx server.ts",lint:"eslint",test:"vitest run && pnpm test:cli","test:cli":"node --test tests/cli/*.test.cjs","test:watch":"vitest",ralph:"node ralph-loop.js",prepublishOnly:"rm -rf .next dist dist-electron && pnpm build",postinstall:"chmod +x node_modules/.pnpm/node-pty@*/node_modules/node-pty/prebuilds/*/spawn-helper 2>/dev/null; exit 0"},dependencies:{"@base-ui/react":"^1.3.0","@dnd-kit/core":"^6.3.1","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@git-diff-view/core":"^0.1.3","@git-diff-view/file":"^0.1.3","@git-diff-view/react":"^0.1.3","@tailwindcss/typography":"^0.5.19","@xterm/addon-clipboard":"^0.2.0","@xterm/addon-fit":"^0.11.0","@xterm/addon-unicode11":"^0.9.0","@xterm/addon-web-links":"^0.12.0","@xterm/xterm":"^6.0.0",acorn:"^8.18.0","class-variance-authority":"^0.7.1",clsx:"^2.1.1",cmdk:"^1.1.1",dayjs:"^1.11.20",diff:"^9.0.0","electron-updater":"^6.8.3",jose:"^6.2.2","lucide-react":"^1.7.0",motion:"^12.38.0",nanoid:"^5.1.7",next:"16.2.6","next-intl":"^4.11.0","next-themes":"^0.4.6","node-pty":"1.2.0-beta.12",pino:"^10.3.1","pino-pretty":"^13.1.3","pino-roll":"^4.0.0",react:"19.2.5","react-dom":"19.2.5","react-hotkeys-hook":"^5.2.4","react-icons":"^5.6.0","react-markdown":"^10.1.0","react-resizable-panels":"^4.10.0",recharts:"^3.8.0","rehype-highlight":"^7.0.2","rehype-raw":"^7.0.0","remark-gfm":"^4.0.1","smol-toml":"^1.6.1",sonner:"^2.0.7",swr:"^2.4.1","tailwind-merge":"^3.5.0","tw-animate-css":"^1.4.0","update-notifier":"^7.3.1","use-stick-to-bottom":"^1.1.3",vaul:"^1.1.2","web-push":"^3.6.7",ws:"^8.20.0",zod:"^4.3.6",zustand:"^5.0.12"},devDependencies:{"@11ty/eleventy":"^3.1.5","@electron/rebuild":"^4.0.3","@tailwindcss/postcss":"^4","@types/node":"^24.12.0","@types/react":"^19","@types/react-dom":"^19","@types/web-push":"^3.6.4","@types/ws":"^8.18.1",chalk:"^5.6.2",electron:"^41.1.1","electron-builder":"^26.8.1",eslint:"^9","eslint-config-next":"16.2.5",jsdom:"^26.1.0",shadcn:"^4.1.2",tailwindcss:"^4",tsup:"^8.5.1",tsx:"^4.21.0",typescript:"^5.9.3",vitest:"^4.1.4"}}},374255,e=>{"use strict";let t=(0,e.i(205270).default)("dices",[["rect",{width:"12",height:"12",x:"2",y:"10",rx:"2",ry:"2",key:"6agr2n"}],["path",{d:"m17.92 14 3.5-3.5a2.24 2.24 0 0 0 0-3l-5-4.92a2.24 2.24 0 0 0-3 0L10 6",key:"1o487t"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"M10 14h.01",key:"ssrbsk"}],["path",{d:"M15 6h.01",key:"cblpky"}],["path",{d:"M18 9h.01",key:"2061c0"}]]);e.s(["Dices",0,t],374255)},833060,e=>{"use strict";var t=e.i(676618);e.s(["ImageIcon",()=>t.default])},425560,e=>{"use strict";let t=(0,e.i(205270).default)("monitor-smartphone",[["path",{d:"M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8",key:"10dyio"}],["path",{d:"M10 19v-3.96 3.15",key:"1irgej"}],["path",{d:"M7 19h5",key:"qswx4l"}],["rect",{width:"6",height:"10",x:"16",y:"12",rx:"2",key:"1egngj"}]]);e.s(["MonitorSmartphone",0,t],425560)},208501,621504,48543,562020,117385,e=>{"use strict";var t,r=e.i(391398);e.i(977848),e.i(542151);var l=e.i(648684),a=e.i(353533);e.i(227384);let n=(0,l.cva)("flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",{variants:{orientation:{horizontal:"*:data-slot:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg! [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0",vertical:"flex-col *:data-slot:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg! [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0"}},defaultVariants:{orientation:"horizontal"}});e.s(["ButtonGroup",0,function(e){let{className:t,orientation:l,...s}=e;return(0,r.jsx)("div",{role:"group","data-slot":"button-group","data-orientation":l,className:(0,a.cn)(n({orientation:l}),t),...s})}],208501);var s=e.i(191788),i=e.i(91762);let o=(0,l.cva)("group/field flex w-full gap-3 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],horizontal:["flex-row items-center","[&>[data-slot=field-label]]:flex-auto","has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"],responsive:["flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto","@md/field-group:[&>[data-slot=field-label]]:flex-auto","@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"]}},defaultVariants:{orientation:"vertical"}});e.s(["Field",0,function(e){let{className:t,orientation:l="vertical",...n}=e;return(0,r.jsx)("div",{role:"group","data-slot":"field","data-orientation":l,className:(0,a.cn)(o({orientation:l}),t),...n})},"FieldDescription",0,function(e){let{className:t,...l}=e;return(0,r.jsx)("p",{"data-slot":"field-description",className:(0,a.cn)("text-muted-foreground text-sm leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance","last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5","[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",t),...l})},"FieldLabel",0,function(e){let{className:t,...l}=e;return(0,r.jsx)(i.Label,{"data-slot":"field-label",className:(0,a.cn)("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4","has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",t),...l})}],621504),e.s([],48543);var d=e.i(872863),c=e.i(408372);let u=((t={}).checked="data-checked",t.unchecked="data-unchecked",t.disabled="data-disabled",t.readonly="data-readonly",t.required="data-required",t.valid="data-valid",t.invalid="data-invalid",t.touched="data-touched",t.dirty="data-dirty",t.filled="data-filled",t.focused="data-focused",t),m={checked:e=>e?{[u.checked]:""}:{[u.unchecked]:""},...d.transitionStatusMapping,...c.fieldValidityMapping};e.s(["stateAttributesMapping",0,m],562020),e.i(350461);let h=s.createContext(void 0);e.s(["RadioGroupContext",0,h,"useRadioGroupContext",0,function(){return s.useContext(h)}],117385)},636989,e=>{"use strict";var t=e.i(391398);e.i(48543),e.i(350461);var r=e.i(191788),l=e.i(978054),a=e.i(95349),n=e.i(25104),s=e.i(931497),i=e.i(562912),o=e.i(245925),d=e.i(203799),c=e.i(562020),u=e.i(333961),m=e.i(542151),h=e.i(817806),p=e.i(495247),f=e.i(623377),x=e.i(660566),g=e.i(699140),v=e.i(653054),y=e.i(780023),b=e.i(552413),j=e.i(117385),w=e.i(308665),k=e.i(579907);let C=r.createContext(void 0),S=r.forwardRef(function(e,k){let{render:S,className:N,disabled:M=!1,readOnly:E=!1,required:D=!1,"aria-labelledby":T,value:A,inputRef:R,nativeButton:I=!1,id:P,style:L,...B}=e,O=(0,j.useRadioGroupContext)(),{disabled:z,readOnly:F,required:V,form:H,checkedValue:U,touched:q=!1,validation:G,name:K}=O??{},_=O?.setCheckedValue??i.NOOP,$=O?.setTouched??i.NOOP,W=O?.registerControlRef??i.NOOP,Y=O?.registerInputRef??i.NOOP,{setDirty:X,validityData:J,setTouched:Z,setFilled:Q,state:ee,disabled:et}=(0,x.useFieldRootContext)(),er=(0,g.useFieldItemContext)(),{labelId:el,getDescriptionProps:ea}=(0,v.useLabelableContext)(),en=et||er.disabled||z||M,es=F||E,ei=V||D,eo=O?U===A:""===A,ed=r.useMemo(()=>(0,w.serializeValue)(A),[A]),ec=r.useRef(null),eu=r.useRef(null),em=(0,n.useStableCallback)(e=>{e&&W(e,en)}),eh=(0,l.useMergedRefs)(R,eu,Y);(0,a.useIsoLayoutEffect)(()=>{eu.current?.checked&&Q(!0)},[Q]),(0,a.useIsoLayoutEffect)(()=>{if(eu.current){if(en&&eo)return void Y(null);ec.current&&W(ec.current,en),Y(eu.current)}},[eo,en,W,Y]);let ep=(0,u.useBaseUiId)(),ef=(0,b.useLabelableId)({id:P,implicit:!1,controlRef:ec}),ex=I?void 0:ef,eg={role:"radio","aria-checked":eo,"aria-required":ei||void 0,"aria-readonly":es||void 0,"aria-labelledby":(0,y.useAriaLabelledBy)(T,el,eu,!I,ex),[p.ACTIVE_COMPOSITE_ITEM]:eo?"":void 0,id:I?ef:ep,onKeyDown(e){"Enter"===e.key&&e.preventDefault()},onClick(e){e.defaultPrevented||en||es||(e.preventDefault(),eu.current?.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey})))},onFocus(e){e.defaultPrevented||en||es||!q||(eu.current?.click(),$(!1))}},{getButtonProps:ev,buttonRef:ey}=(0,h.useButton)({disabled:en,native:I}),eb={type:"radio",ref:eh,form:H,id:ex,name:K,tabIndex:-1,style:K?s.visuallyHiddenInput:s.visuallyHidden,"aria-hidden":!0,...void 0!==A?{value:ed}:i.EMPTY_OBJECT,disabled:en,checked:eo,required:ei,readOnly:es,onChange(e){if(e.nativeEvent.defaultPrevented||en||es||void 0===A)return;let t=(0,o.createChangeEventDetails)(d.REASONS.none,e.nativeEvent);t.isCanceled||(Z(!0),X(A!==J.initialValue),Q(!0),_(A,t))},onFocus(){ec.current?.focus()}},ej=r.useMemo(()=>({...ee,required:ei,disabled:en,readOnly:es,checked:eo}),[ee,en,es,eo,ei]),ew=void 0!==O,ek=[k,ec,ey,em],eC=[eg,ea,G?.getValidationProps??i.EMPTY_OBJECT,B,ev],eS=(0,m.useRenderElement)("span",e,{enabled:!ew,state:ej,ref:ek,props:eC,stateAttributesMapping:c.stateAttributesMapping});return(0,t.jsxs)(C.Provider,{value:ej,children:[ew?(0,t.jsx)(f.CompositeItem,{tag:"span",render:S,className:N,style:L,state:ej,refs:ek,props:eC,stateAttributesMapping:c.stateAttributesMapping}):eS,(0,t.jsx)("input",{...eb,suppressHydrationWarning:!0})]})});var N=e.i(657681),M=e.i(276149);let E=r.forwardRef(function(e,t){let{render:l,className:a,style:n,keepMounted:s=!1,...i}=e,o=function(){let e=r.useContext(C);if(void 0===e)throw Error((0,k.default)(52));return e}(),d=o.checked,{mounted:u,transitionStatus:h,setMounted:p}=(0,M.useTransitionStatus)(d),f={...o,transitionStatus:h},x=r.useRef(null),g=(0,m.useRenderElement)("span",e,{ref:[t,x],state:f,props:i,stateAttributesMapping:c.stateAttributesMapping});return((0,N.useOpenChangeComplete)({open:d,ref:x,onComplete(){d||p(!1)}}),s||u)?g:null});e.s(["Indicator",0,E,"Root",0,S],648646);var D=e.i(648646),D=D,T=e.i(176955),A=e.i(154532),R=e.i(113292),I=e.i(324083),P=e.i(390940),L=e.i(408372),B=e.i(935942),O=e.i(598634),z=e.i(944306);let F=[R.SHIFT],V=r.forwardRef(function(e,l){let{render:a,className:s,disabled:i,readOnly:o,required:d,onValueChange:c,value:m,defaultValue:h,form:p,name:f,inputRef:g,id:y,style:b,...w}=e,{setTouched:k,setFocused:C,shouldValidateOnChange:S,validationMode:N,name:M,disabled:E,state:D,validation:R,setDirty:V,setFilled:H,validityData:U}=(0,x.useFieldRootContext)(),{labelId:q}=(0,v.useLabelableContext)(),{clearErrors:G}=(0,O.useFormContext)(),K=(0,B.useFieldsetRootContext)(!0),_=E||i,$=M??f,W=(0,u.useBaseUiId)(y),[Y,X]=(0,T.useControlled)({controlled:m,default:h,name:"RadioGroup",state:"value"}),J=(0,n.useStableCallback)(c),Z=(0,n.useStableCallback)((e,t)=>{J(e,t),t.isCanceled||X(e)}),Q=r.useRef(null),ee=r.useRef(null),et=r.useRef(null);function er(e){let t;return g&&("function"==typeof g?t=g(e):g.current=e),ee.current=e,R.inputRef.current=e,t}let el=(0,n.useStableCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){if(t){Q.current===e&&(Q.current=null);return}null==Q.current&&(Q.current=e)}}),ea=(0,n.useStableCallback)(e=>{if(!e||e.disabled)return;et.current||(et.current=e);let t=ee.current;if(e.checked||null==t||t.disabled)return er(e)}),en=(0,n.useStableCallback)(()=>Y??null);(0,P.useRegisterFieldControl)(Q,{id:W,value:Y,getValue:en}),(0,z.useValueChanged)(Y,()=>{G($),V(Y!==U.initialValue),H(null!=Y),S()?R.commit(Y):R.commit(Y,!0);let e=et.current;null==Y&&e&&!e.disabled&&er(e)});let[es,ei]=r.useState(!1),eo=w["aria-labelledby"]??q??K?.legendId,ed={...D,disabled:_??!1,required:d??!1,readOnly:o??!1},ec=r.useMemo(()=>({...D,checkedValue:Y,disabled:_,form:p,validation:R,name:$,onValueChange:J,readOnly:o,registerControlRef:el,registerInputRef:ea,required:d,setCheckedValue:Z,setTouched:ei,touched:es}),[Y,_,p,R,D,$,J,o,el,ea,d,Z,ei,es]);return(0,t.jsx)(j.RadioGroupContext.Provider,{value:ec,children:(0,t.jsx)(I.CompositeRoot,{render:a,className:s,style:b,state:ed,props:[{role:"radiogroup","aria-required":d||void 0,"aria-disabled":_||void 0,"aria-readonly":o||void 0,"aria-labelledby":eo,onFocus(){C(!0)},onBlur(e){(0,A.contains)(e.currentTarget,e.relatedTarget)||(k(!0),C(!1),"onBlur"===N&&R.commit(Y))},onKeyDownCapture(e){e.key.startsWith("Arrow")&&(k(!0),ei(!0),C(!0))}},R.getValidationProps,w],refs:[l],stateAttributesMapping:L.fieldValidityMapping,enableHomeAndEndKeys:!1,modifierKeys:F})})});var H=e.i(353533);e.s(["RadioGroup",0,function(e){let{className:r,...l}=e;return(0,t.jsx)(V,{"data-slot":"radio-group",className:(0,H.cn)("grid w-full gap-2",r),...l})},"RadioGroupItem",0,function(e){let{className:r,...l}=e;return(0,t.jsx)(D.Root,{"data-slot":"radio-group-item",className:(0,H.cn)("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",r),...l,children:(0,t.jsx)(D.Indicator,{"data-slot":"radio-group-indicator",className:"flex size-4 items-center justify-center",children:(0,t.jsx)("span",{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground"})})})}],636989)},170004,146341,59295,706277,849271,468528,e=>{"use strict";let t;e.s(["TOAST_POSITIONS",0,["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"]],170004);var r,l,a,n,s,i,o,d,c,u,m,h,p,f,x,g,v,y,b,j=e.i(391398),w=e.i(191788),k=e.i(352819),C=e.i(745725),S=e.i(730943);function N(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,w.useMemo)(()=>e=>{t.forEach(t=>t(e))},t)}let M="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function E(e){let t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function D(e){return"nodeType"in e}function T(e){var t,r;return e?E(e)?e:D(e)&&null!=(t=null==(r=e.ownerDocument)?void 0:r.defaultView)?t:window:window}function A(e){let{Document:t}=T(e);return e instanceof t}function R(e){return!E(e)&&e instanceof T(e).HTMLElement}function I(e){return e instanceof T(e).SVGElement}function P(e){return e?E(e)?e.document:D(e)?A(e)?e:R(e)||I(e)?e.ownerDocument:document:document:document}let L=M?w.useLayoutEffect:w.useEffect;function B(e){let t=(0,w.useRef)(e);return L(()=>{t.current=e}),(0,w.useCallback)(function(){for(var e=arguments.length,r=Array(e),l=0;l<e;l++)r[l]=arguments[l];return null==t.current?void 0:t.current(...r)},[])}function O(){let e=(0,w.useRef)(null);return[(0,w.useCallback)((t,r)=>{e.current=setInterval(t,r)},[]),(0,w.useCallback)(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}function z(e,t){void 0===t&&(t=[e]);let r=(0,w.useRef)(e);return L(()=>{r.current!==e&&(r.current=e)},t),r}function F(e,t){let r=(0,w.useRef)();return(0,w.useMemo)(()=>{let t=e(r.current);return r.current=t,t},[...t])}function V(e){let t=B(e),r=(0,w.useRef)(null),l=(0,w.useCallback)(e=>{e!==r.current&&(null==t||t(e,r.current)),r.current=e},[]);return[r,l]}function H(e){let t=(0,w.useRef)();return(0,w.useEffect)(()=>{t.current=e},[e]),t.current}let U={};function q(e,t){return(0,w.useMemo)(()=>{if(t)return t;let r=null==U[e]?0:U[e]+1;return U[e]=r,e+"-"+r},[e,t])}function G(e){return function(t){for(var r=arguments.length,l=Array(r>1?r-1:0),a=1;a<r;a++)l[a-1]=arguments[a];return l.reduce((t,r)=>{for(let[l,a]of Object.entries(r)){let r=t[l];null!=r&&(t[l]=r+e*a)}return t},{...t})}}let K=G(1),_=G(-1);function $(e){if(!e)return!1;let{KeyboardEvent:t}=T(e.target);return t&&e instanceof t}function W(e){if(function(e){if(!e)return!1;let{TouchEvent:t}=T(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return"clientX"in e&&"clientY"in e?{x:e.clientX,y:e.clientY}:null}let Y=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[Y.Translate.toString(e),Y.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:l}=e;return t+" "+r+"ms "+l}}}),X="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function J(e){return e.matches(X)?e:e.querySelector(X)}e.s(["CSS",0,Y,"add",0,K,"canUseDOM",0,M,"findFirstFocusableNode",0,J,"getEventCoordinates",0,W,"getOwnerDocument",0,P,"getWindow",0,T,"isDocument",0,A,"isHTMLElement",0,R,"isKeyboardEvent",0,$,"isNode",0,D,"isSVGElement",0,I,"isWindow",0,E,"subtract",0,_,"useCombinedRefs",0,N,"useEvent",0,B,"useInterval",0,O,"useIsomorphicLayoutEffect",0,L,"useLatestValue",0,z,"useLazyMemo",0,F,"useNodeRef",0,V,"usePrevious",0,H,"useUniqueId",0,q],146341);let Z={display:"none"};function Q(e){let{id:t,value:r}=e;return w.default.createElement("div",{id:t,style:Z},r)}function ee(e){let{id:t,announcement:r,ariaLiveType:l="assertive"}=e;return w.default.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":l,"aria-atomic":!0},r)}let et=(0,w.createContext)(null),er={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},el={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function ea(e){var t;let r,{announcements:l=el,container:a,hiddenTextDescribedById:n,screenReaderInstructions:s=er}=e,{announce:i,announcement:o}=function(){let[e,t]=(0,w.useState)("");return{announce:(0,w.useCallback)(e=>{null!=e&&t(e)},[]),announcement:e}}(),d=q("DndLiveRegion"),[c,u]=(0,w.useState)(!1);if((0,w.useEffect)(()=>{u(!0)},[]),t=(0,w.useMemo)(()=>({onDragStart(e){let{active:t}=e;i(l.onDragStart({active:t}))},onDragMove(e){let{active:t,over:r}=e;l.onDragMove&&i(l.onDragMove({active:t,over:r}))},onDragOver(e){let{active:t,over:r}=e;i(l.onDragOver({active:t,over:r}))},onDragEnd(e){let{active:t,over:r}=e;i(l.onDragEnd({active:t,over:r}))},onDragCancel(e){let{active:t,over:r}=e;i(l.onDragCancel({active:t,over:r}))}}),[i,l]),r=(0,w.useContext)(et),(0,w.useEffect)(()=>{if(!r)throw Error("useDndMonitor must be used within a children of <DndContext>");return r(t)},[t,r]),!c)return null;let m=w.default.createElement(w.default.Fragment,null,w.default.createElement(Q,{id:n,value:s.draggable}),w.default.createElement(ee,{id:d,announcement:o}));return a?(0,S.createPortal)(m,a):m}function en(){}function es(e,t){return(0,w.useMemo)(()=>({sensor:e,options:null!=t?t:{}}),[e,t])}function ei(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,w.useMemo)(()=>[...t].filter(e=>null!=e),[...t])}(r=u||(u={})).DragStart="dragStart",r.DragMove="dragMove",r.DragEnd="dragEnd",r.DragCancel="dragCancel",r.DragOver="dragOver",r.RegisterDroppable="registerDroppable",r.SetDroppableDisabled="setDroppableDisabled",r.UnregisterDroppable="unregisterDroppable";let eo=Object.freeze({x:0,y:0});function ed(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ec(e,t){let{data:{value:r}}=e,{data:{value:l}}=t;return r-l}function eu(e,t){let{data:{value:r}}=e,{data:{value:l}}=t;return l-r}function em(e){let{left:t,top:r,height:l,width:a}=e;return[{x:t,y:r},{x:t+a,y:r},{x:t,y:r+l},{x:t+a,y:r+l}]}function eh(e,t){if(!e||0===e.length)return null;let[r]=e;return t?r[t]:r}function ep(e,t,r){return void 0===t&&(t=e.left),void 0===r&&(r=e.top),{x:t+.5*e.width,y:r+.5*e.height}}let ef=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:l}=e,a=ep(t,t.left,t.top),n=[];for(let e of l){let{id:t}=e,l=r.get(t);if(l){let r=ed(ep(l),a);n.push({id:t,data:{droppableContainer:e,value:r}})}}return n.sort(ec)},ex=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:l}=e,a=[];for(let e of l){let{id:l}=e,n=r.get(l);if(n){let r=function(e,t){let r=Math.max(t.top,e.top),l=Math.max(t.left,e.left),a=Math.min(t.left+t.width,e.left+e.width),n=Math.min(t.top+t.height,e.top+e.height);if(l<a&&r<n){let s=t.width*t.height,i=e.width*e.height,o=(a-l)*(n-r);return Number((o/(s+i-o)).toFixed(4))}return 0}(n,t);r>0&&a.push({id:l,data:{droppableContainer:e,value:r}})}}return a.sort(eu)};function eg(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:eo}let ev=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),l=1;l<t;l++)r[l-1]=arguments[l];return r.reduce((e,t)=>({...e,top:e.top+ +t.y,bottom:e.bottom+ +t.y,left:e.left+ +t.x,right:e.right+ +t.x}),{...e})},ey={ignoreTransform:!1};function eb(e,t){void 0===t&&(t=ey);let r=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:l}=T(e).getComputedStyle(e);t&&(r=function(e,t,r){let l=function(e){if(e.startsWith("matrix3d(")){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!l)return e;let{scaleX:a,scaleY:n,x:s,y:i}=l,o=e.left-s-(1-a)*parseFloat(r),d=e.top-i-(1-n)*parseFloat(r.slice(r.indexOf(" ")+1)),c=a?e.width/a:e.width,u=n?e.height/n:e.height;return{width:c,height:u,top:d,right:o+c,bottom:d+u,left:o}}(r,t,l))}let{top:l,left:a,width:n,height:s,bottom:i,right:o}=r;return{top:l,left:a,width:n,height:s,bottom:i,right:o}}function ej(e){return eb(e,{ignoreTransform:!0})}function ew(e,t){let r=[];return e?function l(a){var n,s;let i;if(null!=t&&r.length>=t||!a)return r;if(A(a)&&null!=a.scrollingElement&&!r.includes(a.scrollingElement))return r.push(a.scrollingElement),r;if(!R(a)||I(a)||r.includes(a))return r;let o=T(e).getComputedStyle(a);return(a!==e&&(void 0===(n=o)&&(n=T(a).getComputedStyle(a)),i=/(auto|scroll|overlay)/,["overflow","overflowX","overflowY"].some(e=>{let t=n[e];return"string"==typeof t&&i.test(t)}))&&r.push(a),void 0===(s=o)&&(s=T(a).getComputedStyle(a)),"fixed"===s.position)?r:l(a.parentNode)}(e):r}function ek(e){let[t]=ew(e,1);return null!=t?t:null}function eC(e){return M&&e?E(e)?e:D(e)?A(e)||e===P(e).scrollingElement?window:R(e)?e:null:null:null}function eS(e){return E(e)?e.scrollX:e.scrollLeft}function eN(e){return E(e)?e.scrollY:e.scrollTop}function eM(e){return{x:eS(e),y:eN(e)}}function eE(e){return!!M&&!!e&&e===document.scrollingElement}function eD(e){let t={x:0,y:0},r=eE(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},l={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},a=e.scrollTop<=t.y,n=e.scrollLeft<=t.x;return{isTop:a,isLeft:n,isBottom:e.scrollTop>=l.y,isRight:e.scrollLeft>=l.x,maxScroll:l,minScroll:t}}(l=m||(m={}))[l.Forward=1]="Forward",l[l.Backward=-1]="Backward";let eT={x:.2,y:.2};function eA(e){return e.reduce((e,t)=>K(e,eM(t)),eo)}let eR=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+eS(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+eN(t),0)}]];class eI{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=ew(t),l=eA(r);for(const[t,a,n]of(this.rect={...e},this.width=e.width,this.height=e.height,eR))for(const e of a)Object.defineProperty(this,e,{get:()=>{let a=n(r),s=l[t]-a;return this.rect[e]+s},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class eP{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,r){var l;null==(l=this.target)||l.addEventListener(e,t,r),this.listeners.push([e,t,r])}}function eL(e,t){let r=Math.abs(e.x),l=Math.abs(e.y);return"number"==typeof t?Math.sqrt(r**2+l**2)>t:"x"in t&&"y"in t?r>t.x&&l>t.y:"x"in t?r>t.x:"y"in t&&l>t.y}function eB(e){e.preventDefault()}function eO(e){e.stopPropagation()}(a=h||(h={})).Click="click",a.DragStart="dragstart",a.Keydown="keydown",a.ContextMenu="contextmenu",a.Resize="resize",a.SelectionChange="selectionchange",a.VisibilityChange="visibilitychange",(n=p||(p={})).Space="Space",n.Down="ArrowDown",n.Right="ArrowRight",n.Left="ArrowLeft",n.Up="ArrowUp",n.Esc="Escape",n.Enter="Enter",n.Tab="Tab";let ez={start:[p.Space,p.Enter],cancel:[p.Esc],end:[p.Space,p.Enter,p.Tab]},eF=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case p.Right:return{...r,x:r.x+25};case p.Left:return{...r,x:r.x-25};case p.Down:return{...r,y:r.y+25};case p.Up:return{...r,y:r.y-25}}};class eV{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new eP(P(t)),this.windowListeners=new eP(T(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(h.Resize,this.handleCancel),this.windowListeners.add(h.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(h.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,r=e.node.current;r&&function(e,t){if(void 0===t&&(t=eb),!e)return;let{top:r,left:l,bottom:a,right:n}=t(e);ek(e)&&(a<=0||n<=0||r>=window.innerHeight||l>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(r),t(eo)}handleKeyDown(e){if($(e)){let{active:t,context:r,options:l}=this.props,{keyboardCodes:a=ez,coordinateGetter:n=eF,scrollBehavior:s="smooth"}=l,{code:i}=e;if(a.end.includes(i))return void this.handleEnd(e);if(a.cancel.includes(i))return void this.handleCancel(e);let{collisionRect:o}=r.current,d=o?{x:o.left,y:o.top}:eo;this.referenceCoordinates||(this.referenceCoordinates=d);let c=n(e,{active:t,context:r.current,currentCoordinates:d});if(c){let t=_(c,d),l={x:0,y:0},{scrollableAncestors:a}=r.current;for(let r of a){let a=e.code,{isTop:n,isRight:i,isLeft:o,isBottom:d,maxScroll:u,minScroll:m}=eD(r),h=function(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:r,right:l,bottom:a}=e.getBoundingClientRect();return{top:t,left:r,right:l,bottom:a,width:e.clientWidth,height:e.clientHeight}}(r),f={x:Math.min(a===p.Right?h.right-h.width/2:h.right,Math.max(a===p.Right?h.left:h.left+h.width/2,c.x)),y:Math.min(a===p.Down?h.bottom-h.height/2:h.bottom,Math.max(a===p.Down?h.top:h.top+h.height/2,c.y))},x=a===p.Right&&!i||a===p.Left&&!o,g=a===p.Down&&!d||a===p.Up&&!n;if(x&&f.x!==c.x){let e=r.scrollLeft+t.x,n=a===p.Right&&e<=u.x||a===p.Left&&e>=m.x;if(n&&!t.y)return void r.scrollTo({left:e,behavior:s});n?l.x=r.scrollLeft-e:l.x=a===p.Right?r.scrollLeft-u.x:r.scrollLeft-m.x,l.x&&r.scrollBy({left:-l.x,behavior:s});break}if(g&&f.y!==c.y){let e=r.scrollTop+t.y,n=a===p.Down&&e<=u.y||a===p.Up&&e>=m.y;if(n&&!t.x)return void r.scrollTo({top:e,behavior:s});n?l.y=r.scrollTop-e:l.y=a===p.Down?r.scrollTop-u.y:r.scrollTop-m.y,l.y&&r.scrollBy({top:-l.y,behavior:s});break}}this.handleMove(e,K(_(c,this.referenceCoordinates),l))}}}handleMove(e,t){let{onMove:r}=this.props;e.preventDefault(),r(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function eH(e){return!!(e&&"distance"in e)}function eU(e){return!!(e&&"delay"in e)}eV.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:l=ez,onActivation:a}=t,{active:n}=r,{code:s}=e.nativeEvent;if(l.start.includes(s)){let t=n.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==a||a({event:e.nativeEvent}),!0)}return!1}}];class eq{constructor(e,t,r){var l;void 0===r&&(r=function(e){let{EventTarget:t}=T(e);return e instanceof t?e:P(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:a}=e,{target:n}=a;this.props=e,this.events=t,this.document=P(n),this.documentListeners=new eP(this.document),this.listeners=new eP(r),this.windowListeners=new eP(T(n)),this.initialCoordinates=null!=(l=W(a))?l:eo,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:r}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(h.Resize,this.handleCancel),this.windowListeners.add(h.DragStart,eB),this.windowListeners.add(h.VisibilityChange,this.handleCancel),this.windowListeners.add(h.ContextMenu,eB),this.documentListeners.add(h.Keydown,this.handleKeydown),t){if(null!=r&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(eU(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(eH(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:r,onPending:l}=this.props;l(r,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(h.Click,eO,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(h.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;let{activated:r,initialCoordinates:l,props:a}=this,{onMove:n,options:{activationConstraint:s}}=a;if(!l)return;let i=null!=(t=W(e))?t:eo,o=_(l,i);if(!r&&s){if(eH(s)){if(null!=s.tolerance&&eL(o,s.tolerance))return this.handleCancel();if(eL(o,s.distance))return this.handleStart()}return eU(s)&&eL(o,s.tolerance)?this.handleCancel():void this.handlePending(s,o)}e.cancelable&&e.preventDefault(),n(i)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===p.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}let eG={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class eK extends eq{constructor(e){const{event:t}=e;super(e,eG,P(t.target))}}eK.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:l}=t;return!!r.isPrimary&&0===r.button&&(null==l||l({event:r}),!0)}}];(s=f||(f={}))[s.RightClick=2]="RightClick";(i=x||(x={}))[i.Pointer=0]="Pointer",i[i.DraggableRect=1]="DraggableRect",(o=g||(g={}))[o.TreeOrder=0]="TreeOrder",o[o.ReversedTreeOrder=1]="ReversedTreeOrder";let e_={x:{[m.Backward]:!1,[m.Forward]:!1},y:{[m.Backward]:!1,[m.Forward]:!1}};(d=v||(v={}))[d.Always=0]="Always",d[d.BeforeDragging=1]="BeforeDragging",d[d.WhileDragging=2]="WhileDragging",(y||(y={})).Optimized="optimized";let e$=new Map;function eW(e,t){return F(r=>e?r||("function"==typeof t?t(e):e):null,[t,e])}function eY(e){let{callback:t,disabled:r}=e,l=B(t),a=(0,w.useMemo)(()=>{if(r||"u"<typeof window||void 0===window.ResizeObserver)return;let{ResizeObserver:e}=window;return new e(l)},[r]);return(0,w.useEffect)(()=>()=>null==a?void 0:a.disconnect(),[a]),a}function eX(e){return new eI(eb(e),e)}function eJ(e,t,r){void 0===t&&(t=eX);let[l,a]=(0,w.useState)(null);function n(){a(l=>{if(!e)return null;if(!1===e.isConnected){var a;return null!=(a=null!=l?l:r)?a:null}let n=t(e);return JSON.stringify(l)===JSON.stringify(n)?l:n})}let s=function(e){let{callback:t,disabled:r}=e,l=B(t),a=(0,w.useMemo)(()=>{if(r||"u"<typeof window||void 0===window.MutationObserver)return;let{MutationObserver:e}=window;return new e(l)},[l,r]);return(0,w.useEffect)(()=>()=>null==a?void 0:a.disconnect(),[a]),a}({callback(t){if(e)for(let r of t){let{type:t,target:l}=r;if("childList"===t&&l instanceof HTMLElement&&l.contains(e)){n();break}}}}),i=eY({callback:n});return L(()=>{n(),e?(null==i||i.observe(e),null==s||s.observe(document.body,{childList:!0,subtree:!0})):(null==i||i.disconnect(),null==s||s.disconnect())},[e]),l}let eZ=[];function eQ(e,t){void 0===t&&(t=[]);let r=(0,w.useRef)(null);return(0,w.useEffect)(()=>{r.current=null},t),(0,w.useEffect)(()=>{let t=e!==eo;t&&!r.current&&(r.current=e),!t&&r.current&&(r.current=null)},[e]),r.current?_(e,r.current):eo}function e0(e){return(0,w.useMemo)(()=>{let t,r;return e?(t=e.innerWidth,{top:0,left:0,right:t,bottom:r=e.innerHeight,width:t,height:r}):null},[e])}let e1=[],e2=[{sensor:eK,options:{}},{sensor:eV,options:{}}],e5={current:{}},e3={draggable:{measure:ej},droppable:{measure:ej,strategy:v.WhileDragging,frequency:y.Optimized},dragOverlay:{measure:eb}};class e4 extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,r;return null!=(t=null==(r=this.get(e))?void 0:r.node.current)?t:void 0}}let e8={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new e4,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:en},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:e3,measureDroppableContainers:en,windowRect:null,measuringScheduled:!1},e6={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:en,draggableNodes:new Map,over:null,measureDroppableContainers:en},e9=(0,w.createContext)(e6),e7=(0,w.createContext)(e8);function te(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new e4}}}function tt(e,t){switch(t.type){case u.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case u.DragMove:if(null==e.draggable.active)return e;return{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case u.DragEnd:case u.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case u.RegisterDroppable:{let{element:r}=t,{id:l}=r,a=new e4(e.droppable.containers);return a.set(l,r),{...e,droppable:{...e.droppable,containers:a}}}case u.SetDroppableDisabled:{let{id:r,key:l,disabled:a}=t,n=e.droppable.containers.get(r);if(!n||l!==n.key)return e;let s=new e4(e.droppable.containers);return s.set(r,{...n,disabled:a}),{...e,droppable:{...e.droppable,containers:s}}}case u.UnregisterDroppable:{let{id:r,key:l}=t,a=e.droppable.containers.get(r);if(!a||l!==a.key)return e;let n=new e4(e.droppable.containers);return n.delete(r),{...e,droppable:{...e.droppable,containers:n}}}default:return e}}function tr(e){let{disabled:t}=e,{active:r,activatorEvent:l,draggableNodes:a}=(0,w.useContext)(e9),n=H(l),s=H(null==r?void 0:r.id);return(0,w.useEffect)(()=>{if(!t&&!l&&n&&null!=s){if(!$(n)||document.activeElement===n.target)return;let e=a.get(s);if(!e)return;let{activatorNode:t,node:r}=e;(t.current||r.current)&&requestAnimationFrame(()=>{for(let e of[t.current,r.current]){if(!e)continue;let t=J(e);if(t){t.focus();break}}})}},[l,t,a,s,n]),null}let tl=(0,w.createContext)({...eo,scaleX:1,scaleY:1});(c=b||(b={}))[c.Uninitialized=0]="Uninitialized",c[c.Initializing=1]="Initializing",c[c.Initialized=2]="Initialized";let ta=(0,w.memo)(function(e){var t,r,l,a,n,s,i,o;let d,c,h,p,f,y,j,k,{id:C,accessibility:N,autoScroll:E=!0,children:D,sensors:A=e2,collisionDetection:I=ex,measuring:P,modifiers:B,...U}=e,[G,_]=(0,w.useReducer)(tt,void 0,te),[$,Y]=function(){let[e]=(0,w.useState)(()=>new Set),t=(0,w.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,w.useCallback)(t=>{let{type:r,event:l}=t;e.forEach(e=>{var t;return null==(t=e[r])?void 0:t.call(e,l)})},[e]),t]}(),[X,J]=(0,w.useState)(b.Uninitialized),Z=X===b.Initialized,{draggable:{active:Q,nodes:ee,translate:er},droppable:{containers:el}}=G,en=null!=Q?ee.get(Q):null,es=(0,w.useRef)({initial:null,translated:null}),ei=(0,w.useMemo)(()=>{var e;return null!=Q?{id:Q,data:null!=(e=null==en?void 0:en.data)?e:e5,rect:es}:null},[Q,en]),ed=(0,w.useRef)(null),[ec,eu]=(0,w.useState)(null),[em,ep]=(0,w.useState)(null),ef=z(U,Object.values(U)),ey=q("DndDescribedBy",C),ej=(0,w.useMemo)(()=>el.getEnabled(),[el]),eS=(0,w.useMemo)(()=>({draggable:{...e3.draggable,...null==P?void 0:P.draggable},droppable:{...e3.droppable,...null==P?void 0:P.droppable},dragOverlay:{...e3.dragOverlay,...null==P?void 0:P.dragOverlay}}),[null==P?void 0:P.draggable,null==P?void 0:P.droppable,null==P?void 0:P.dragOverlay]),{droppableRects:eN,measureDroppableContainers:eR,measuringScheduled:eP}=function(e,t){let{dragging:r,dependencies:l,config:a}=t,[n,s]=(0,w.useState)(null),{frequency:i,measure:o,strategy:d}=a,c=(0,w.useRef)(e),u=function(){switch(d){case v.Always:return!1;case v.BeforeDragging:return r;default:return!r}}(),m=z(u),h=(0,w.useCallback)(function(e){void 0===e&&(e=[]),m.current||s(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[m]),p=(0,w.useRef)(null),f=F(t=>{if(u&&!r)return e$;if(!t||t===e$||c.current!==e||null!=n){let t=new Map;for(let r of e){if(!r)continue;if(n&&n.length>0&&!n.includes(r.id)&&r.rect.current){t.set(r.id,r.rect.current);continue}let e=r.node.current,l=e?new eI(o(e),e):null;r.rect.current=l,l&&t.set(r.id,l)}return t}return t},[e,n,r,u,o]);return(0,w.useEffect)(()=>{c.current=e},[e]),(0,w.useEffect)(()=>{u||h()},[r,u]),(0,w.useEffect)(()=>{n&&n.length>0&&s(null)},[JSON.stringify(n)]),(0,w.useEffect)(()=>{u||"number"!=typeof i||null!==p.current||(p.current=setTimeout(()=>{h(),p.current=null},i))},[i,u,h,...l]),{droppableRects:f,measureDroppableContainers:h,measuringScheduled:null!=n}}(ej,{dragging:Z,dependencies:[er.x,er.y],config:eS.droppable}),eL=F(e=>{var t;return null==Q?null:null!=(t=null!=f?f:e)?t:null},[f=(p=null!=Q?ee.get(Q):void 0)?p.node.current:null,Q]),eB=(0,w.useMemo)(()=>em?W(em):null,[em]),eO=(d=(null==ec?void 0:ec.autoScrollEnabled)===!1,c="object"==typeof E?!1===E.enabled:!1===E,h=Z&&!d&&!c,"object"==typeof E?{...E,enabled:h}:{enabled:h}),ez=eW(eL,eS.draggable.measure);!function(e){let{activeNode:t,measure:r,initialRect:l,config:a=!0}=e,n=(0,w.useRef)(!1),{x:s,y:i}="boolean"==typeof a?{x:a,y:a}:a;L(()=>{if(!s&&!i||!t){n.current=!1;return}if(n.current||!l)return;let e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;let a=eg(r(e),l);if(s||(a.x=0),i||(a.y=0),n.current=!0,Math.abs(a.x)>0||Math.abs(a.y)>0){let t=ek(e);t&&t.scrollBy({top:a.y,left:a.x})}},[t,s,i,l,r])}({activeNode:null!=Q?ee.get(Q):null,config:eO.layoutShiftCompensation,initialRect:ez,measure:eS.draggable.measure});let eF=eJ(eL,eS.draggable.measure,ez),eV=eJ(eL?eL.parentElement:null),eH=(0,w.useRef)({activatorEvent:null,active:null,activeNode:eL,collisionRect:null,collisions:null,droppableRects:eN,draggableNodes:ee,draggingNode:null,draggingNodeRect:null,droppableContainers:el,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),eU=el.getNodeFor(null==(t=eH.current.over)?void 0:t.id),eq=function(e){let{measure:t}=e,[r,l]=(0,w.useState)(null),a=eY({callback:(0,w.useCallback)(e=>{for(let{target:r}of e)if(R(r)){l(e=>{let l=t(r);return e?{...e,width:l.width,height:l.height}:l});break}},[t])}),[n,s]=V((0,w.useCallback)(e=>{let r=function(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return R(t)?t:e}(e);null==a||a.disconnect(),r&&(null==a||a.observe(r)),l(r?t(r):null)},[t,a]));return(0,w.useMemo)(()=>({nodeRef:n,rect:r,setRef:s}),[r,n,s])}({measure:eS.dragOverlay.measure}),eG=null!=(r=eq.nodeRef.current)?r:eL,eK=Z?null!=(l=eq.rect)?l:eF:null,eX=!!(eq.nodeRef.current&&eq.rect),e4=(y=eW(n=eX?null:eF),eg(n,y)),e8=e0(eG?T(eG):null),e6=(s=Z?null!=eU?eU:eL:null,j=(0,w.useRef)(s),k=F(e=>s?e&&e!==eZ&&s&&j.current&&s.parentNode===j.current.parentNode?e:ew(s):eZ,[s]),(0,w.useEffect)(()=>{j.current=s},[s]),k),ta=function(e,t){void 0===t&&(t=eb);let[r]=e,l=e0(r?T(r):null),[a,n]=(0,w.useState)(e1);function s(){n(()=>e.length?e.map(e=>eE(e)?l:new eI(t(e),e)):e1)}let i=eY({callback:s});return L(()=>{null==i||i.disconnect(),s(),e.forEach(e=>null==i?void 0:i.observe(e))},[e]),a}(e6),tn=function(e,t){let{transform:r,...l}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...l}),r):r}(B,{transform:{x:er.x-e4.x,y:er.y-e4.y,scaleX:1,scaleY:1},activatorEvent:em,active:ei,activeNodeRect:eF,containerNodeRect:eV,draggingNodeRect:eK,over:eH.current.over,overlayNodeRect:eq.rect,scrollableAncestors:e6,scrollableAncestorRects:ta,windowRect:e8}),ts=eB?K(eB,er):null,ti=function(e){let[t,r]=(0,w.useState)(null),l=(0,w.useRef)(e),a=(0,w.useCallback)(e=>{let t=eC(e.target);t&&r(e=>e?(e.set(t,eM(t)),new Map(e)):null)},[]);return(0,w.useEffect)(()=>{let t=l.current;if(e!==t){n(t);let s=e.map(e=>{let t=eC(e);return t?(t.addEventListener("scroll",a,{passive:!0}),[t,eM(t)]):null}).filter(e=>null!=e);r(s.length?new Map(s):null),l.current=e}return()=>{n(e),n(t)};function n(e){e.forEach(e=>{let t=eC(e);null==t||t.removeEventListener("scroll",a)})}},[a,e]),(0,w.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>K(e,t),eo):eA(e):eo,[e,t])}(e6),to=eQ(ti),td=eQ(ti,[eF]),tc=K(tn,to),tu=eK?ev(eK,tn):null,tm=ei&&tu?I({active:ei,collisionRect:tu,droppableRects:eN,droppableContainers:ej,pointerCoordinates:ts}):null,th=eh(tm,"id"),[tp,tf]=(0,w.useState)(null),tx=(i=eX?tn:K(tn,td),o=null!=(a=null==tp?void 0:tp.rect)?a:null,{...i,scaleX:o&&eF?o.width/eF.width:1,scaleY:o&&eF?o.height/eF.height:1}),tg=(0,w.useRef)(null),tv=(0,w.useCallback)((e,t)=>{let{sensor:r,options:l}=t;if(null==ed.current)return;let a=ee.get(ed.current);if(!a)return;let n=e.nativeEvent,s=new r({active:ed.current,activeNode:a,event:n,options:l,context:eH,onAbort(e){if(!ee.get(e))return;let{onDragAbort:t}=ef.current,r={id:e};null==t||t(r),$({type:"onDragAbort",event:r})},onPending(e,t,r,l){if(!ee.get(e))return;let{onDragPending:a}=ef.current,n={id:e,constraint:t,initialCoordinates:r,offset:l};null==a||a(n),$({type:"onDragPending",event:n})},onStart(e){let t=ed.current;if(null==t)return;let r=ee.get(t);if(!r)return;let{onDragStart:l}=ef.current,a={activatorEvent:n,active:{id:t,data:r.data,rect:es}};(0,S.unstable_batchedUpdates)(()=>{null==l||l(a),J(b.Initializing),_({type:u.DragStart,initialCoordinates:e,active:t}),$({type:"onDragStart",event:a}),eu(tg.current),ep(n)})},onMove(e){_({type:u.DragMove,coordinates:e})},onEnd:i(u.DragEnd),onCancel:i(u.DragCancel)});function i(e){return async function(){let{active:t,collisions:r,over:l,scrollAdjustedTranslate:a}=eH.current,s=null;if(t&&a){let{cancelDrop:i}=ef.current;s={activatorEvent:n,active:t,collisions:r,delta:a,over:l},e===u.DragEnd&&"function"==typeof i&&await Promise.resolve(i(s))&&(e=u.DragCancel)}ed.current=null,(0,S.unstable_batchedUpdates)(()=>{_({type:e}),J(b.Uninitialized),tf(null),eu(null),ep(null),tg.current=null;let t=e===u.DragEnd?"onDragEnd":"onDragCancel";if(s){let e=ef.current[t];null==e||e(s),$({type:t,event:s})}})}}tg.current=s},[ee]),ty=(0,w.useCallback)((e,t)=>(r,l)=>{let a=r.nativeEvent,n=ee.get(l);null!==ed.current||!n||a.dndKit||a.defaultPrevented||!0===e(r,t.options,{active:n})&&(a.dndKit={capturedBy:t.sensor},ed.current=l,tv(r,t))},[ee,tv]),tb=(0,w.useMemo)(()=>A.reduce((e,t)=>{let{sensor:r}=t;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:ty(e.handler,t)}))]},[]),[A,ty]);(0,w.useEffect)(()=>{if(!M)return;let e=A.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(let t of e)null==t||t()}},A.map(e=>{let{sensor:t}=e;return t})),L(()=>{eF&&X===b.Initializing&&J(b.Initialized)},[eF,X]),(0,w.useEffect)(()=>{let{onDragMove:e}=ef.current,{active:t,activatorEvent:r,collisions:l,over:a}=eH.current;if(!t||!r)return;let n={active:t,activatorEvent:r,collisions:l,delta:{x:tc.x,y:tc.y},over:a};(0,S.unstable_batchedUpdates)(()=>{null==e||e(n),$({type:"onDragMove",event:n})})},[tc.x,tc.y]),(0,w.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:r,droppableContainers:l,scrollAdjustedTranslate:a}=eH.current;if(!e||null==ed.current||!t||!a)return;let{onDragOver:n}=ef.current,s=l.get(th),i=s&&s.rect.current?{id:s.id,rect:s.rect.current,data:s.data,disabled:s.disabled}:null,o={active:e,activatorEvent:t,collisions:r,delta:{x:a.x,y:a.y},over:i};(0,S.unstable_batchedUpdates)(()=>{tf(i),null==n||n(o),$({type:"onDragOver",event:o})})},[th]),L(()=>{eH.current={activatorEvent:em,active:ei,activeNode:eL,collisionRect:tu,collisions:tm,droppableRects:eN,draggableNodes:ee,draggingNode:eG,draggingNodeRect:eK,droppableContainers:el,over:tp,scrollableAncestors:e6,scrollAdjustedTranslate:tc},es.current={initial:eK,translated:tu}},[ei,eL,tm,tu,ee,eG,eK,eN,el,tp,e6,tc]),function(e){let{acceleration:t,activator:r=x.Pointer,canScroll:l,draggingRect:a,enabled:n,interval:s=5,order:i=g.TreeOrder,pointerCoordinates:o,scrollableAncestors:d,scrollableAncestorRects:c,delta:u,threshold:h}=e,p=function(e){let{delta:t,disabled:r}=e,l=H(t);return F(e=>{if(r||!l||!e)return e_;let a={x:Math.sign(t.x-l.x),y:Math.sign(t.y-l.y)};return{x:{[m.Backward]:e.x[m.Backward]||-1===a.x,[m.Forward]:e.x[m.Forward]||1===a.x},y:{[m.Backward]:e.y[m.Backward]||-1===a.y,[m.Forward]:e.y[m.Forward]||1===a.y}}},[r,t,l])}({delta:u,disabled:!n}),[f,v]=O(),y=(0,w.useRef)({x:0,y:0}),b=(0,w.useRef)({x:0,y:0}),j=(0,w.useMemo)(()=>{switch(r){case x.Pointer:return o?{top:o.y,bottom:o.y,left:o.x,right:o.x}:null;case x.DraggableRect:return a}},[r,a,o]),k=(0,w.useRef)(null),C=(0,w.useCallback)(()=>{let e=k.current;if(!e)return;let t=y.current.x*b.current.x,r=y.current.y*b.current.y;e.scrollBy(t,r)},[]),S=(0,w.useMemo)(()=>i===g.TreeOrder?[...d].reverse():d,[i,d]);(0,w.useEffect)(()=>{if(!n||!d.length||!j)return void v();for(let e of S){if((null==l?void 0:l(e))===!1)continue;let r=c[d.indexOf(e)];if(!r)continue;let{direction:a,speed:n}=function(e,t,r,l,a){let{top:n,left:s,right:i,bottom:o}=r;void 0===l&&(l=10),void 0===a&&(a=eT);let{isTop:d,isBottom:c,isLeft:u,isRight:h}=eD(e),p={x:0,y:0},f={x:0,y:0},x={height:t.height*a.y,width:t.width*a.x};return!d&&n<=t.top+x.height?(p.y=m.Backward,f.y=l*Math.abs((t.top+x.height-n)/x.height)):!c&&o>=t.bottom-x.height&&(p.y=m.Forward,f.y=l*Math.abs((t.bottom-x.height-o)/x.height)),!h&&i>=t.right-x.width?(p.x=m.Forward,f.x=l*Math.abs((t.right-x.width-i)/x.width)):!u&&s<=t.left+x.width&&(p.x=m.Backward,f.x=l*Math.abs((t.left+x.width-s)/x.width)),{direction:p,speed:f}}(e,r,j,t,h);for(let e of["x","y"])p[e][a[e]]||(n[e]=0,a[e]=0);if(n.x>0||n.y>0){v(),k.current=e,f(C,s),y.current=n,b.current=a;return}}y.current={x:0,y:0},b.current={x:0,y:0},v()},[t,C,l,v,n,s,JSON.stringify(j),JSON.stringify(p),f,d,S,c,JSON.stringify(h)])}({...eO,delta:er,draggingRect:tu,pointerCoordinates:ts,scrollableAncestors:e6,scrollableAncestorRects:ta});let tj=(0,w.useMemo)(()=>({active:ei,activeNode:eL,activeNodeRect:eF,activatorEvent:em,collisions:tm,containerNodeRect:eV,dragOverlay:eq,draggableNodes:ee,droppableContainers:el,droppableRects:eN,over:tp,measureDroppableContainers:eR,scrollableAncestors:e6,scrollableAncestorRects:ta,measuringConfiguration:eS,measuringScheduled:eP,windowRect:e8}),[ei,eL,eF,em,tm,eV,eq,ee,el,eN,tp,eR,e6,ta,eS,eP,e8]),tw=(0,w.useMemo)(()=>({activatorEvent:em,activators:tb,active:ei,activeNodeRect:eF,ariaDescribedById:{draggable:ey},dispatch:_,draggableNodes:ee,over:tp,measureDroppableContainers:eR}),[em,tb,ei,eF,_,ey,ee,tp,eR]);return w.default.createElement(et.Provider,{value:Y},w.default.createElement(e9.Provider,{value:tw},w.default.createElement(e7.Provider,{value:tj},w.default.createElement(tl.Provider,{value:tx},D)),w.default.createElement(tr,{disabled:(null==N?void 0:N.restoreFocus)===!1})),w.default.createElement(ea,{...N,hiddenTextDescribedById:ey}))}),tn=(0,w.createContext)(null),ts="button";function ti(e){let{id:t,data:r,disabled:l=!1,attributes:a}=e,n=q("Draggable"),{activators:s,activatorEvent:i,active:o,activeNodeRect:d,ariaDescribedById:c,draggableNodes:u,over:m}=(0,w.useContext)(e9),{role:h=ts,roleDescription:p="draggable",tabIndex:f=0}=null!=a?a:{},x=(null==o?void 0:o.id)===t,g=(0,w.useContext)(x?tl:tn),[v,y]=V(),[b,j]=V(),k=(0,w.useMemo)(()=>s.reduce((e,r)=>{let{eventName:l,handler:a}=r;return e[l]=e=>{a(e,t)},e},{}),[s,t]),C=z(r);return L(()=>(u.set(t,{id:t,key:n,node:v,activatorNode:b,data:C}),()=>{let e=u.get(t);e&&e.key===n&&u.delete(t)}),[u,t]),{active:o,activatorEvent:i,activeNodeRect:d,attributes:(0,w.useMemo)(()=>({role:h,tabIndex:f,"aria-disabled":l,"aria-pressed":!!x&&h===ts||void 0,"aria-roledescription":p,"aria-describedby":c.draggable}),[l,h,f,x,p,c.draggable]),isDragging:x,listeners:l?void 0:k,node:v,over:m,setNodeRef:y,setActivatorNodeRef:j,transform:g}}function to(){return(0,w.useContext)(e7)}let td={timeout:25};function tc(e){let{data:t,disabled:r=!1,id:l,resizeObserverConfig:a}=e,n=q("Droppable"),{active:s,dispatch:i,over:o,measureDroppableContainers:d}=(0,w.useContext)(e9),c=(0,w.useRef)({disabled:r}),m=(0,w.useRef)(!1),h=(0,w.useRef)(null),p=(0,w.useRef)(null),{disabled:f,updateMeasurementsFor:x,timeout:g}={...td,...a},v=z(null!=x?x:l),y=eY({callback:(0,w.useCallback)(()=>{if(!m.current){m.current=!0;return}null!=p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{d(Array.isArray(v.current)?v.current:[v.current]),p.current=null},g)},[g]),disabled:f||!s}),[b,j]=V((0,w.useCallback)((e,t)=>{y&&(t&&(y.unobserve(t),m.current=!1),e&&y.observe(e))},[y])),k=z(t);return(0,w.useEffect)(()=>{y&&b.current&&(y.disconnect(),m.current=!1,y.observe(b.current))},[b,y]),(0,w.useEffect)(()=>(i({type:u.RegisterDroppable,element:{id:l,key:n,disabled:r,node:b,rect:h,data:k}}),()=>i({type:u.UnregisterDroppable,key:n,id:l})),[l]),(0,w.useEffect)(()=>{r!==c.current.disabled&&(i({type:u.SetDroppableDisabled,id:l,key:n,disabled:r}),c.current.disabled=r)},[l,n,r,i]),{active:s,rect:h,isOver:(null==o?void 0:o.id)===l,node:b,over:o,setNodeRef:j}}let tu={position:"fixed",touchAction:"none"},tm=e=>$(e)?"transform 250ms ease":void 0;function th(e,t,r){let l=e.slice();return l.splice(r<0?l.length+r:r,0,l.splice(t,1)[0]),l}function tp(e){return null!==e&&e>=0}t={styles:{active:{opacity:"0"}}},e.s(["DndContext",0,ta,"KeyboardCode",0,p,"PointerSensor",0,eK,"closestCenter",0,ef,"closestCorners",0,e=>{let{collisionRect:t,droppableRects:r,droppableContainers:l}=e,a=em(t),n=[];for(let e of l){let{id:t}=e,l=r.get(t);if(l){let r=em(l),s=Number((a.reduce((e,t,l)=>e+ed(r[l],t),0)/4).toFixed(4));n.push({id:t,data:{droppableContainer:e,value:s}})}}return n.sort(ec)},"getClientRect",0,eb,"getFirstCollision",0,eh,"getScrollableAncestors",0,ew,"useDndContext",0,to,"useDraggable",0,ti,"useDroppable",0,tc,"useSensor",0,es,"useSensors",0,ei],59295);let tf=e=>{let{rects:t,activeIndex:r,overIndex:l,index:a}=e,n=th(t,l,r),s=t[a],i=n[a];return i&&s?{x:i.left-s.left,y:i.top-s.top,scaleX:i.width/s.width,scaleY:i.height/s.height}:null},tx={scaleX:1,scaleY:1},tg=e=>{var t,r,l,a;let n,s,i,{activeIndex:o,activeNodeRect:d,index:c,rects:u,overIndex:m}=e,h=null!=(t=u[o])?t:d;if(!h)return null;if(c===o){let e=u[m];return e?{x:0,y:o<m?e.top+e.height-(h.top+h.height):e.top-h.top,...tx}:null}let p=(r=u,l=c,a=o,n=r[l],s=r[l-1],i=r[l+1],n?a<l?s?n.top-(s.top+s.height):i?i.top-(n.top+n.height):0:i?i.top-(n.top+n.height):s?n.top-(s.top+s.height):0:0);return c>o&&c<=m?{x:0,y:-h.height-p,...tx}:c<o&&c>=m?{x:0,y:h.height+p,...tx}:{x:0,y:0,...tx}},tv="Sortable",ty=w.default.createContext({activeIndex:-1,containerId:tv,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:tf,disabled:{draggable:!1,droppable:!1}});function tb(e){let{children:t,id:r,items:l,strategy:a=tf,disabled:n=!1}=e,{active:s,dragOverlay:i,droppableRects:o,over:d,measureDroppableContainers:c}=to(),u=q(tv,r),m=null!==i.rect,h=(0,w.useMemo)(()=>l.map(e=>"object"==typeof e&&"id"in e?e.id:e),[l]),p=null!=s,f=s?h.indexOf(s.id):-1,x=d?h.indexOf(d.id):-1,g=(0,w.useRef)(h),v=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}(h,g.current),y=-1!==x&&-1===f||v,b="boolean"==typeof n?{draggable:n,droppable:n}:n;L(()=>{v&&p&&c(h)},[v,h,p,c]),(0,w.useEffect)(()=>{g.current=h},[h]);let j=(0,w.useMemo)(()=>({activeIndex:f,containerId:u,disabled:b,disableTransforms:y,items:h,overIndex:x,useDragOverlay:m,sortedRects:h.reduce((e,t,r)=>{let l=o.get(t);return l&&(e[r]=l),e},Array(h.length)),strategy:a}),[f,u,b.draggable,b.droppable,y,h,x,o,m,a]);return w.default.createElement(ty.Provider,{value:j},t)}let tj=e=>{let{id:t,items:r,activeIndex:l,overIndex:a}=e;return th(r,l,a).indexOf(t)},tw=e=>{let{containerId:t,isSorting:r,wasDragging:l,index:a,items:n,newIndex:s,previousItems:i,previousContainerId:o,transition:d}=e;return!!d&&!!l&&(i===n||a!==s)&&(!!r||s!==a&&t===o)},tk={duration:200,easing:"ease"},tC="transform",tS=Y.Transition.toString({property:tC,duration:0,easing:"linear"}),tN={roleDescription:"sortable"};function tM(e){var t,r,l,a;let{animateLayoutChanges:n=tw,attributes:s,disabled:i,data:o,getNewIndex:d=tj,id:c,strategy:u,resizeObserverConfig:m,transition:h=tk}=e,{items:p,containerId:f,activeIndex:x,disabled:g,disableTransforms:v,sortedRects:y,overIndex:b,useDragOverlay:j,strategy:k}=(0,w.useContext)(ty),C=(t=i,r=g,"boolean"==typeof t?{draggable:t,droppable:!1}:{draggable:null!=(l=null==t?void 0:t.draggable)?l:r.draggable,droppable:null!=(a=null==t?void 0:t.droppable)?a:r.droppable}),S=p.indexOf(c),M=(0,w.useMemo)(()=>({sortable:{containerId:f,index:S,items:p},...o}),[f,o,S,p]),E=(0,w.useMemo)(()=>p.slice(p.indexOf(c)),[p,c]),{rect:D,node:T,isOver:A,setNodeRef:R}=tc({id:c,data:M,disabled:C.droppable,resizeObserverConfig:{updateMeasurementsFor:E,...m}}),{active:I,activatorEvent:P,activeNodeRect:B,attributes:O,setNodeRef:z,listeners:F,isDragging:V,over:H,setActivatorNodeRef:U,transform:q}=ti({id:c,data:M,attributes:{...tN,...s},disabled:C.draggable}),G=N(R,z),K=!!I,_=K&&!v&&tp(x)&&tp(b),W=!j&&V,X=W&&_?q:null,J=_?null!=X?X:(null!=u?u:k)({rects:y,activeNodeRect:B,activeIndex:x,overIndex:b,index:S}):null,Z=tp(x)&&tp(b)?d({id:c,items:p,activeIndex:x,overIndex:b}):S,Q=null==I?void 0:I.id,ee=(0,w.useRef)({activeId:Q,items:p,newIndex:Z,containerId:f}),et=p!==ee.current.items,er=n({active:I,containerId:f,isDragging:V,isSorting:K,id:c,index:S,items:p,newIndex:ee.current.newIndex,previousItems:ee.current.items,previousContainerId:ee.current.containerId,transition:h,wasDragging:null!=ee.current.activeId}),el=function(e){let{disabled:t,index:r,node:l,rect:a}=e,[n,s]=(0,w.useState)(null),i=(0,w.useRef)(r);return L(()=>{if(!t&&r!==i.current&&l.current){let e=a.current;if(e){let t=eb(l.current,{ignoreTransform:!0}),r={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(r.x||r.y)&&s(r)}}r!==i.current&&(i.current=r)},[t,r,l,a]),(0,w.useEffect)(()=>{n&&s(null)},[n]),n}({disabled:!er,index:S,node:T,rect:D});return(0,w.useEffect)(()=>{K&&ee.current.newIndex!==Z&&(ee.current.newIndex=Z),f!==ee.current.containerId&&(ee.current.containerId=f),p!==ee.current.items&&(ee.current.items=p)},[K,Z,f,p]),(0,w.useEffect)(()=>{if(Q===ee.current.activeId)return;if(null!=Q&&null==ee.current.activeId){ee.current.activeId=Q;return}let e=setTimeout(()=>{ee.current.activeId=Q},50);return()=>clearTimeout(e)},[Q]),{active:I,activeIndex:x,attributes:O,data:M,rect:D,index:S,newIndex:Z,items:p,isOver:A,isSorting:K,isDragging:V,listeners:F,node:T,overIndex:b,over:H,setNodeRef:G,setActivatorNodeRef:U,setDroppableNodeRef:R,setDraggableNodeRef:z,transform:null!=el?el:J,transition:el||et&&ee.current.newIndex===S?tS:(!W||$(P))&&h&&(K||er)?Y.Transition.toString({...h,property:tC}):void 0}}p.Down,p.Right,p.Up,p.Left,e.s(["SortableContext",0,tb,"arrayMove",0,th,"useSortable",0,tM,"verticalListSortingStrategy",0,tg],706277);let tE=(0,e.i(205270).default)("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);e.s(["GripVertical",0,tE],849271);var tD=e.i(861416),tT=e.i(265524),tA=e.i(749999),tR=e.i(620216),tI=e.i(939310),tP=e.i(45124),tL=e.i(130027),tB=e.i(443915),tO=e.i(212283),tz=e.i(639530);let tF=e=>{let{transform:t}=e;return{...t,x:0}},tV=e=>{let{prompt:t,onToggle:r}=e,{attributes:l,listeners:a,setNodeRef:n,setActivatorNodeRef:s,transform:i,transition:o,isDragging:d}=tM({id:t.id}),c={transform:Y.Translate.toString(i),transition:o,zIndex:d?1:void 0,position:d?"relative":void 0};return(0,j.jsxs)("div",{ref:n,className:"flex items-center gap-1 bg-background py-2.5 pl-1 pr-3",style:c,children:[(0,j.jsx)("div",{ref:s,...l,...a,className:"flex shrink-0 cursor-grab items-center text-muted-foreground/50 active:cursor-grabbing",children:(0,j.jsx)(tE,{className:"h-4 w-4"})}),(0,j.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,j.jsx)("p",{className:"text-sm font-medium",children:t.name}),(0,j.jsx)("p",{className:"truncate font-mono text-xs text-muted-foreground",children:t.prompt})]}),(0,j.jsx)("div",{className:"flex shrink-0 items-center",children:(0,j.jsx)(tL.Switch,{checked:t.enabled,onCheckedChange:e=>r(t.id,e)})})]})},tH=e=>{let{prompt:t,onEdit:r,onDelete:l,onToggle:a}=e,{attributes:n,listeners:s,setNodeRef:i,setActivatorNodeRef:o,transform:d,transition:c,isDragging:u}=tM({id:t.id}),m={transform:Y.Translate.toString(d),transition:c,zIndex:u?1:void 0,position:u?"relative":void 0};return(0,j.jsxs)("div",{ref:i,className:"flex items-center gap-1 bg-background py-2.5 pl-1 pr-3",style:m,children:[(0,j.jsx)("div",{ref:o,...n,...s,className:"flex shrink-0 cursor-grab items-center text-muted-foreground/50 active:cursor-grabbing",children:(0,j.jsx)(tE,{className:"h-4 w-4"})}),(0,j.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,j.jsx)("p",{className:"text-sm font-medium",children:t.name}),(0,j.jsx)("p",{className:"truncate font-mono text-xs text-muted-foreground",children:t.prompt})]}),(0,j.jsxs)("div",{className:"flex shrink-0 items-center gap-1",children:[(0,j.jsx)(tI.Button,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>r(t),children:(0,j.jsx)(tD.Pencil,{className:"h-3.5 w-3.5"})}),(0,j.jsx)(tI.Button,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 text-ui-red hover:text-ui-red/80",onClick:()=>l(t.id),children:(0,j.jsx)(tR.Trash2,{className:"h-3.5 w-3.5"})}),(0,j.jsx)(tL.Switch,{checked:t.enabled,onCheckedChange:e=>a(t.id,e)})]})]})};e.s(["default",0,()=>{let e=(0,k.useTranslations)("settings.quickPrompts"),{allOrderedPrompts:t,customPrompts:r,toggleBuiltin:l,saveCustom:a,saveOrder:n,deletePrompt:s,resetAll:i}=(0,tz.default)(),[o,d]=(0,w.useState)(null),[c,u]=(0,w.useState)(!1),[m,h]=(0,w.useState)(null),p=ei(es(eK,{activationConstraint:{distance:5}})),f=(0,w.useCallback)((e,t)=>{e.startsWith("builtin-")?l(e,t):a(r.map(r=>r.id===e?{...r,enabled:t}:r))},[r,l,a]),x=(0,w.useCallback)(e=>{h(e)},[]),g=(0,w.useCallback)(()=>{m&&(s(m),h(null))},[m,s]),v=(0,w.useCallback)(e=>{d({mode:"edit",id:e.id,name:e.name,prompt:e.prompt})},[]),y=(0,w.useCallback)(()=>{d({mode:"add",name:"",prompt:""})},[]),b=(0,w.useCallback)(()=>{o&&o.name.trim()&&o.prompt.trim()&&("edit"===o.mode&&o.id?a(r.map(e=>e.id===o.id?{...e,name:o.name.trim(),prompt:o.prompt}:e)):a([...r,{id:`custom-${(0,C.nanoid)(8)}`,name:o.name.trim(),prompt:o.prompt,enabled:!0}]),d(null))},[o,r,a]),S=(0,w.useCallback)(()=>{i(),u(!1)},[i]),N=(0,w.useCallback)(e=>{let{active:r,over:l}=e;if(!l||r.id===l.id)return;let a=t.findIndex(e=>e.id===r.id),s=t.findIndex(e=>e.id===l.id);-1===a||-1===s||n(th(t,a,s).map(e=>e.id))},[t,n]),M=!!o&&o.name.trim().length>0&&o.prompt.trim().length>0;return(0,j.jsxs)("div",{className:"space-y-6",children:[(0,j.jsxs)("div",{children:[(0,j.jsx)("p",{className:"text-sm font-medium",children:e("title")}),(0,j.jsx)("p",{className:"text-sm text-muted-foreground",children:e("description")})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:e("itemsSection")}),t.length>0&&(0,j.jsx)(ta,{sensors:p,collisionDetection:ef,modifiers:[tF],onDragEnd:N,children:(0,j.jsx)(tb,{items:t.map(e=>e.id),strategy:tg,children:(0,j.jsx)("div",{className:"overflow-hidden rounded-lg border",children:t.map(e=>e.id.startsWith("builtin-")?(0,j.jsx)(tV,{prompt:e,onToggle:f},e.id):(0,j.jsx)(tH,{prompt:e,onEdit:v,onDelete:x,onToggle:f},e.id))})})}),o&&(0,j.jsxs)("div",{className:"space-y-3 rounded-lg border p-3",children:[(0,j.jsx)("p",{className:"text-sm font-medium",children:e("add"===o.mode?"addPrompt":"editPrompt")}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)("label",{className:"text-xs text-muted-foreground",children:e("nameLabel")}),(0,j.jsx)(tP.Input,{value:o.name,onChange:e=>d({...o,name:e.target.value}),placeholder:e("namePlaceholder"),autoFocus:!0})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)("label",{className:"text-xs text-muted-foreground",children:e("promptLabel")}),(0,j.jsx)(tB.Textarea,{value:o.prompt,onChange:e=>d({...o,prompt:e.target.value}),placeholder:e("promptPlaceholder"),rows:3})]}),(0,j.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,j.jsx)(tI.Button,{variant:"outline",size:"sm",onClick:()=>d(null),children:e("cancel")}),(0,j.jsx)(tI.Button,{size:"sm",onClick:b,disabled:!M,children:e("save")})]})]}),!o&&(0,j.jsxs)(tI.Button,{variant:"outline",size:"sm",onClick:y,children:[(0,j.jsx)(tT.Plus,{className:"mr-1 h-3.5 w-3.5"}),e("addButton")]})]}),(0,j.jsxs)(tI.Button,{variant:"ghost",size:"sm",className:"text-muted-foreground",onClick:()=>u(!0),children:[(0,j.jsx)(tA.RotateCcw,{className:"mr-1 h-3.5 w-3.5"}),e("resetToDefault")]}),(0,j.jsx)(tO.AlertDialog,{open:!!m,onOpenChange:e=>!e&&h(null),children:(0,j.jsxs)(tO.AlertDialogContent,{children:[(0,j.jsxs)(tO.AlertDialogHeader,{children:[(0,j.jsx)(tO.AlertDialogTitle,{children:e("deleteTitle")}),(0,j.jsx)(tO.AlertDialogDescription,{children:e("deleteDescription")})]}),(0,j.jsxs)(tO.AlertDialogFooter,{children:[(0,j.jsx)(tO.AlertDialogCancel,{children:e("deleteCancel")}),(0,j.jsx)(tO.AlertDialogAction,{onClick:g,children:e("deleteConfirm")})]})]})}),(0,j.jsx)(tO.AlertDialog,{open:c,onOpenChange:u,children:(0,j.jsxs)(tO.AlertDialogContent,{children:[(0,j.jsxs)(tO.AlertDialogHeader,{children:[(0,j.jsx)(tO.AlertDialogTitle,{children:e("resetTitle")}),(0,j.jsx)(tO.AlertDialogDescription,{children:e("resetDescription")})]}),(0,j.jsxs)(tO.AlertDialogFooter,{children:[(0,j.jsx)(tO.AlertDialogCancel,{children:e("resetCancel")}),(0,j.jsx)(tO.AlertDialogAction,{onClick:S,children:e("resetConfirm")})]})]})})]})}],468528)},934048,e=>{"use strict";e.i(350461);var t=e.i(391398),r=e.i(518313),l=e.i(191788),a=e.i(352819),n=e.i(679935),s=e.i(603331),i=e.i(524845),o=e.i(29803),d=e.i(983832),c=e.i(977356),u=e.i(444957),m=e.i(377216),h=e.i(374255),p=e.i(511892),f=e.i(878528),x=e.i(833060),g=e.i(958282),v=e.i(40546),y=e.i(769480),b=e.i(584166),j=e.i(425560),w=e.i(582809),k=e.i(112285),C=e.i(401686),S=e.i(749999),N=e.i(480778),M=e.i(692127),E=e.i(21152),D=e.i(620216),T=e.i(399366),A=e.i(909725),R=e.i(815242),I=e.i(939310),P=e.i(208501),L=e.i(45124),B=e.i(130027),O=e.i(621504),z=e.i(91762),F=e.i(636989),V=e.i(550292),H=e.i(296202),U=e.i(212283),q=e.i(690176),G=e.i(353533),K=e.i(117369),_=e.i(31050),$=e.i(841250),W=e.i(170004),Y=e.i(490034),X=e.i(535099),J=e.i(998234),Z=e.i(700599),Q=e.i(468528),ee=e.i(745725),et=e.i(59295),er=e.i(706277),el=e.i(146341),ea=e.i(849271),en=e.i(861416),es=e.i(265524),ei=e.i(734549),eo=e.i(348370),ed=e.i(274489);let ec=["Globe","Link","ExternalLink","Bookmark","Star","Home","FileText","BarChart3","PieChart","LineChart","Activity","Zap","Terminal","Code","Database","Server","Cloud","Shield","Lock","Key","User","Users","Mail","MessageSquare","Bell","Calendar","Clock","Search","Eye","Camera","Image","Film","Music","Headphones","Mic","Folder","File","Archive","Download","Upload","GitBranch","GitCommit","GitPullRequest","GitFork","Bug","Wrench","Settings","Sliders","Palette","Brush","Map","MapPin","Navigation","Compass","Wifi","Monitor","Smartphone","Tablet","Laptop","Cpu","HardDrive","MemoryStick","CircuitBoard","Radio","Bluetooth","Heart","ThumbsUp","Smile","Coffee","Rocket","Flame","Sun","Moon","Sparkles","Award","Trophy","Target","Flag","Crosshair","Layers","Layout","Grid","List","Table","Kanban","Bot","Brain","Lightbulb","GraduationCap","BookOpen"],eu=e=>{let{value:r,onChange:n,readonly:s,size:i=16}=e,o=(0,a.useTranslations)("settings.sidebarItems"),[d,c]=(0,l.useState)(!1),[u,m]=(0,l.useState)(""),h=(0,l.useMemo)(()=>{if(!u.trim())return ec;let e=u.toLowerCase();return ec.filter(t=>t.toLowerCase().includes(e))},[u]);return s?(0,t.jsx)(ed.default,{name:r,className:"shrink-0 text-muted-foreground",style:{width:i,height:i}}):(0,t.jsxs)(eo.Popover,{open:d,onOpenChange:c,children:[(0,t.jsxs)(eo.PopoverTrigger,{className:"inline-flex h-9 items-center justify-center gap-2 rounded-md border border-input bg-background px-3 text-sm font-medium shadow-xs transition-colors hover:bg-accent hover:text-accent-foreground",children:[(0,t.jsx)(ed.default,{name:r,className:"h-4 w-4"}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:r})]}),(0,t.jsxs)(eo.PopoverContent,{className:"w-72 p-2",align:"start",children:[(0,t.jsx)(L.Input,{placeholder:o("iconSearch"),value:u,onChange:e=>m(e.target.value),className:"mb-2 h-8 text-xs",autoFocus:!0}),(0,t.jsx)("div",{className:"grid max-h-48 grid-cols-8 gap-0.5 overflow-y-auto p-1",children:h.map(e=>(0,ed.getIcon)(e)?(0,t.jsx)("button",{type:"button",className:(0,G.cn)("flex h-8 w-8 items-center justify-center rounded transition-colors hover:bg-accent",r===e&&"bg-accent ring-1 ring-primary"),onClick:()=>{n?.(e),c(!1),m("")},title:e,children:(0,t.jsx)(ed.default,{name:e,className:"h-4 w-4"})},e):null)}),0===h.length&&(0,t.jsx)("p",{className:"py-4 text-center text-xs text-muted-foreground",children:o("iconNotFound")})]})]})},em=e=>{let{transform:t}=e;return{...t,x:0}},eh=e=>{let{item:r,onEdit:l,onDelete:a,onToggle:n}=e,{attributes:s,listeners:i,setNodeRef:o,setActivatorNodeRef:d,transform:c,transition:u,isDragging:m}=(0,er.useSortable)({id:r.id}),h={transform:el.CSS.Translate.toString(c),transition:u,zIndex:m?1:void 0,position:m?"relative":void 0};return(0,t.jsxs)("div",{ref:o,className:"flex items-center gap-1 bg-background py-2.5 pl-1 pr-3",style:h,children:[(0,t.jsx)("div",{ref:d,...s,...i,className:"flex shrink-0 cursor-grab items-center text-muted-foreground/50 active:cursor-grabbing",children:(0,t.jsx)(ea.GripVertical,{className:"h-4 w-4"})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(eu,{value:r.icon,readonly:!0,size:14}),(0,t.jsx)("p",{className:"text-sm font-medium",children:r.name})]}),(0,t.jsx)("p",{className:"truncate font-mono text-xs text-muted-foreground",children:r.url})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-1",children:[(0,t.jsx)(I.Button,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>l(r),children:(0,t.jsx)(en.Pencil,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(I.Button,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 text-ui-red hover:text-ui-red/80",onClick:()=>a(r.id),children:(0,t.jsx)(D.Trash2,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(B.Switch,{checked:r.enabled,onCheckedChange:e=>n(r.id,e)})]})]})},ep=e=>{let{item:r,onToggle:l}=e,{attributes:a,listeners:n,setNodeRef:s,setActivatorNodeRef:i,transform:o,transition:d,isDragging:c}=(0,er.useSortable)({id:r.id}),u={transform:el.CSS.Translate.toString(o),transition:d,zIndex:c?1:void 0,position:c?"relative":void 0};return(0,t.jsxs)("div",{ref:s,className:"flex items-center gap-1 bg-background py-2.5 pl-1 pr-3",style:u,children:[(0,t.jsx)("div",{ref:i,...a,...n,className:"flex shrink-0 cursor-grab items-center text-muted-foreground/50 active:cursor-grabbing",children:(0,t.jsx)(ea.GripVertical,{className:"h-4 w-4"})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(eu,{value:r.icon,readonly:!0,size:14}),(0,t.jsx)("p",{className:"text-sm font-medium",children:r.name})]}),(0,t.jsx)("p",{className:"truncate font-mono text-xs text-muted-foreground",children:r.url})]}),(0,t.jsx)("div",{className:"flex shrink-0 items-center",children:(0,t.jsx)(B.Switch,{checked:r.enabled,onCheckedChange:e=>l(r.id,e)})})]})},ef=()=>{let e=(0,a.useTranslations)("settings.sidebarItems"),{allOrderedItems:r,customItems:n,toggleBuiltin:s,saveCustom:i,saveOrder:o,deleteItem:d,resetAll:c}=(0,ei.default)(),[u,m]=(0,l.useState)(null),[h,p]=(0,l.useState)(!1),[f,x]=(0,l.useState)(null),g=(0,et.useSensors)((0,et.useSensor)(et.PointerSensor,{activationConstraint:{distance:5}})),v=(0,l.useCallback)((e,t)=>{e.startsWith("builtin-")?s(e,t):i(n.map(r=>r.id===e?{...r,enabled:t}:r))},[n,s,i]),y=(0,l.useCallback)(e=>{x(e)},[]),b=(0,l.useCallback)(()=>{f&&(d(f),x(null))},[f,d]),j=(0,l.useCallback)(e=>{m({mode:"edit",id:e.id,name:e.name,icon:e.icon,url:e.url})},[]),w=(0,l.useCallback)(()=>{m({mode:"add",name:"",icon:"Globe",url:""})},[]),k=(0,l.useCallback)(()=>{u&&u.name.trim()&&u.url.trim()&&("edit"===u.mode&&u.id?i(n.map(e=>e.id===u.id?{...e,name:u.name.trim(),icon:u.icon,url:u.url.trim()}:e)):i([...n,{id:`custom-${(0,ee.nanoid)(8)}`,name:u.name.trim(),icon:u.icon,url:u.url.trim(),enabled:!0}]),m(null))},[u,n,i]),C=(0,l.useCallback)(()=>{c(),p(!1)},[c]),N=(0,l.useCallback)(e=>{let{active:t,over:l}=e;if(!l||t.id===l.id)return;let a=r.findIndex(e=>e.id===t.id),n=r.findIndex(e=>e.id===l.id);-1===a||-1===n||o((0,er.arrayMove)(r,a,n).map(e=>e.id))},[r,o]),M=!!u&&u.name.trim().length>0&&u.url.trim().length>0;return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("description")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:e("itemsSection")}),r.length>0&&(0,t.jsx)(et.DndContext,{sensors:g,collisionDetection:et.closestCenter,modifiers:[em],onDragEnd:N,children:(0,t.jsx)(er.SortableContext,{items:r.map(e=>e.id),strategy:er.verticalListSortingStrategy,children:(0,t.jsx)("div",{className:"overflow-hidden rounded-lg border",children:r.map(e=>e.id.startsWith("builtin-")?(0,t.jsx)(ep,{item:e,onToggle:v},e.id):(0,t.jsx)(eh,{item:e,onEdit:j,onDelete:y,onToggle:v},e.id))})})}),u&&(0,t.jsxs)("div",{className:"space-y-3 rounded-lg border p-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eu,{value:u.icon,onChange:e=>m({...u,icon:e})}),(0,t.jsx)(L.Input,{value:u.name,onChange:e=>m({...u,name:e.target.value}),placeholder:e("namePlaceholder"),autoFocus:!0})]}),(0,t.jsx)(L.Input,{value:u.url,onChange:e=>m({...u,url:e.target.value}),placeholder:e("urlPlaceholder")}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(I.Button,{variant:"outline",size:"sm",onClick:()=>m(null),children:e("cancel")}),(0,t.jsx)(I.Button,{size:"sm",onClick:k,disabled:!M,children:e("save")})]})]}),!u&&(0,t.jsxs)(I.Button,{variant:"outline",size:"sm",onClick:w,children:[(0,t.jsx)(es.Plus,{className:"mr-1 h-3.5 w-3.5"}),e("addButton")]})]}),(0,t.jsxs)(I.Button,{variant:"ghost",size:"sm",className:"text-muted-foreground",onClick:()=>p(!0),children:[(0,t.jsx)(S.RotateCcw,{className:"mr-1 h-3.5 w-3.5"}),e("resetToDefault")]}),(0,t.jsx)(U.AlertDialog,{open:!!f,onOpenChange:e=>!e&&x(null),children:(0,t.jsxs)(U.AlertDialogContent,{children:[(0,t.jsxs)(U.AlertDialogHeader,{children:[(0,t.jsx)(U.AlertDialogTitle,{children:e("deleteTitle")}),(0,t.jsx)(U.AlertDialogDescription,{children:e("deleteDescription")})]}),(0,t.jsxs)(U.AlertDialogFooter,{children:[(0,t.jsx)(U.AlertDialogCancel,{children:e("deleteCancel")}),(0,t.jsx)(U.AlertDialogAction,{onClick:b,children:e("deleteConfirm")})]})]})}),(0,t.jsx)(U.AlertDialog,{open:h,onOpenChange:p,children:(0,t.jsxs)(U.AlertDialogContent,{children:[(0,t.jsxs)(U.AlertDialogHeader,{children:[(0,t.jsx)(U.AlertDialogTitle,{children:e("resetTitle")}),(0,t.jsx)(U.AlertDialogDescription,{children:e("resetDescription")})]}),(0,t.jsxs)(U.AlertDialogFooter,{children:[(0,t.jsx)(U.AlertDialogCancel,{children:e("resetCancel")}),(0,t.jsx)(U.AlertDialogAction,{onClick:C,children:e("resetConfirm")})]})]})})]})};var ex=e.i(189257),eg=e.i(26857),ev=e.i(23826),ey=e.i(894915),eb=e.i(53073),ej=e.i(880179),ew=e.i(199648),ek=e.i(13628);let eC=e=>{let{text:r}=e,[a,n]=(0,l.useState)(!1),s=async()=>{await (0,ek.copyToClipboard)(r)&&(n(!0),setTimeout(()=>n(!1),1500))};return(0,t.jsx)(I.Button,{variant:"ghost",size:"icon",className:"h-6 w-6 shrink-0",onClick:s,children:a?(0,t.jsx)(ex.Check,{className:"h-3 w-3 text-positive"}):(0,t.jsx)(eg.Copy,{className:"h-3 w-3"})})},eS=()=>{let e=(0,a.useTranslations)("settings.tailscale");return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3 rounded-md border border-ui-amber/30 bg-ui-amber/5 p-4",children:[(0,t.jsx)(ej.AlertTriangle,{className:"mt-0.5 h-5 w-5 shrink-0 text-ui-amber"}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("notInstalled")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("notInstalledDescription")})]})]}),(0,t.jsxs)("div",{className:"rounded-md bg-muted p-3 font-mono text-xs leading-relaxed",children:[(0,t.jsx)("p",{className:"text-muted-foreground/60",children:e("commentMac")}),(0,t.jsx)("p",{children:"brew install tailscale"}),(0,t.jsx)("p",{className:"mt-2 text-muted-foreground/60",children:e("commentMacAppStore")}),(0,t.jsx)("p",{className:"mt-2 text-muted-foreground/60",children:e("commentLinux")}),(0,t.jsx)("p",{children:"curl -fsSL https://tailscale.com/install.sh | sh"}),(0,t.jsx)("p",{className:"mt-2 text-muted-foreground/60",children:e("commentAfterInstall")}),(0,t.jsx)("p",{children:"tailscale up"})]}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e.rich("installGuide",{link:e=>(0,t.jsxs)("a",{href:"https://tailscale.com/download",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 underline hover:text-foreground",children:[e,(0,t.jsx)(ev.ExternalLink,{className:"h-3 w-3"})]})})})]})},eN=()=>{let e=(0,a.useTranslations)("settings.tailscale"),[r,s]=(0,l.useState)(null),[i,d]=(0,l.useState)(!0),[c,u]=(0,l.useState)(null),m=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/tailscale/status");if(!e.ok)throw Error();let t=await e.json();s(t)}catch{s(null)}finally{d(!1)}},[]);(0,l.useEffect)(()=>{m()},[m]);let h=async t=>{u(`remove-${t}`);try{let r=await fetch("/api/tailscale/serve",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({httpsPort:t})});if(!r.ok){let t=await r.json();throw Error(t.error||e("removeFailed"))}n.toast.success(e("removedToast",{httpsPort:t})),await m()}catch(t){n.toast.error(t instanceof Error?t.message:e("removeFailed"))}finally{u(null)}};if(i)return(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(ew.default,{className:"h-4 w-4 text-muted-foreground"})});if(!r||!r.installed)return(0,t.jsx)(eS,{});if(!r.running)return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3 rounded-md border border-ui-amber/30 bg-ui-amber/5 p-4",children:[(0,t.jsx)(ej.AlertTriangle,{className:"mt-0.5 h-5 w-5 shrink-0 text-ui-amber"}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("notRunning")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("notRunningDescription")})]})]}),(0,t.jsx)("div",{className:"rounded-md bg-muted p-3 font-mono text-xs leading-relaxed",children:(0,t.jsx)("p",{children:"tailscale up"})})]});let p=r.serveEntries,f=r.serverPort,x=8022!==f;return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("deviceInfo")}),(0,t.jsx)(I.Button,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{d(!0),m()},children:(0,t.jsx)(eb.RefreshCw,{className:"h-3.5 w-3.5"})})]}),(0,t.jsx)("div",{className:"rounded-md border p-3 text-sm",children:(0,t.jsxs)("div",{className:"grid grid-cols-[auto_1fr] items-center gap-x-4 gap-y-1.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:e("host")}),(0,t.jsx)("span",{className:"font-mono text-xs",children:r.hostname}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"DNS"}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"font-mono text-xs",children:r.dnsName}),r.dnsName&&(0,t.jsx)(eC,{text:r.dnsName})]}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"IP"}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"font-mono text-xs",children:r.tailscaleIp}),r.tailscaleIp&&(0,t.jsx)(eC,{text:r.tailscaleIp})]}),(0,t.jsx)("span",{className:"text-muted-foreground",children:e("version")}),(0,t.jsx)("span",{className:"font-mono text-xs",children:r.version})]})})]}),x&&(0,t.jsxs)("div",{className:"flex items-start gap-3 rounded-md border border-accent-color/30 bg-accent-color/5 p-4",children:[(0,t.jsx)(ey.Info,{className:"mt-0.5 h-5 w-5 shrink-0 text-accent-color"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("nonDefaultPortTitle",{port:f})}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("nonDefaultPortDescription",{defaultPort:8022,currentPort:f,restartAction:o.default?e("appRestart"):e("serverRestart")})}),(0,t.jsxs)("div",{className:"rounded-md bg-muted p-2.5 font-mono text-xs leading-relaxed",children:[(0,t.jsx)("p",{className:"text-muted-foreground/60",children:e("commentFixedPort",{port:8022})}),(0,t.jsxs)("p",{children:["PORT=",8022," purplemux"]}),(0,t.jsx)("p",{className:"mt-1.5 text-muted-foreground/60",children:e("commentOrTerminate",{port:8022})})]})]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("serveStatus")}),0===p.length?(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("noActiveServe")}):(0,t.jsx)("div",{className:"rounded-md border",children:(0,t.jsxs)("table",{className:"w-full text-sm",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"border-b text-muted-foreground",children:[(0,t.jsx)("th",{className:"px-3 py-2 text-left font-medium",children:e("httpsPort")}),(0,t.jsx)("th",{className:"px-3 py-2 text-left font-medium",children:e("proxyTarget")}),(0,t.jsx)("th",{className:"px-3 py-2 text-left font-medium",children:e("url")}),(0,t.jsx)("th",{className:"w-10 px-3 py-2"})]})}),(0,t.jsx)("tbody",{children:p.map(e=>{let l="443"===e.httpsPort?`https://${r.dnsName}`:`https://${r.dnsName}:${e.httpsPort}`;return(0,t.jsxs)("tr",{className:"border-b last:border-b-0",children:[(0,t.jsx)("td",{className:"px-3 py-2 font-mono text-xs",children:e.httpsPort}),(0,t.jsx)("td",{className:"px-3 py-2 font-mono text-xs",children:e.proxy}),(0,t.jsx)("td",{className:"px-3 py-2",children:(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"font-mono text-xs underline hover:text-foreground",children:l}),(0,t.jsx)(eC,{text:l})]})}),(0,t.jsx)("td",{className:"px-3 py-2",children:(0,t.jsx)(I.Button,{variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:text-destructive",disabled:null!==c,onClick:()=>h(e.httpsPort),children:c===`remove-${e.httpsPort}`?(0,t.jsx)(ew.default,{className:"h-3 w-3"}):(0,t.jsx)(D.Trash2,{className:"h-3.5 w-3.5"})})})]},e.httpsPort)})})]})})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("setupGuide")}),(0,t.jsxs)("div",{className:"rounded-md bg-muted p-3 font-mono text-xs leading-relaxed",children:[(0,t.jsx)("p",{className:"text-muted-foreground/60",children:e("commentStep1Install")}),(0,t.jsx)("p",{children:"brew install tailscale"}),(0,t.jsx)("p",{className:"mt-2 text-muted-foreground/60",children:e("commentStep2Activate")}),(0,t.jsx)("p",{children:"tailscale up"}),(0,t.jsx)("p",{className:"mt-2 text-muted-foreground/60",children:e("commentStep3Add")}),(0,t.jsxs)("p",{children:["tailscale serve --bg --https=443 http://localhost:",f]})]})]})]})};var eM=e.i(489623);function eE(){let e=(0,a.useTranslations)("settings.branchName"),r=(0,a.useTranslations)("common"),s=(0,_.default)(e=>e.branchNameProvider),i=(0,_.default)(e=>e.branchNamePrompt),o=(0,_.default)(e=>e.setBranchNameSettings),[d,c]=(0,l.useState)(null),[u,m]=(0,l.useState)(!1),h=d??{provider:s,prompt:i},p=(0,eM.isValidBranchNamePrompt)(h.prompt),f=async()=>{m(!0);try{await o(h.provider,h.prompt),c(null),n.toast.success(r("saved"))}catch(e){n.toast.error(r("error"),{description:e instanceof Error?e.message:String(e)})}finally{m(!1)}};return(0,t.jsxs)("fieldset",{disabled:u,className:"space-y-3",children:[(0,t.jsx)("legend",{className:"text-sm font-medium",children:e("title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("description")}),(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-sm",children:[e("agent"),(0,t.jsxs)("select",{className:"rounded-md border bg-background p-2",value:h.provider,"aria-describedby":"branch-name-provider-help",onChange:e=>c({...h,provider:e.target.value}),children:[(0,t.jsx)("option",{value:"claude",children:"Claude Code"}),(0,t.jsx)("option",{value:"codex",disabled:!0,children:"Codex CLI"})]})]}),(0,t.jsx)("p",{id:"branch-name-provider-help",className:"rounded-md border bg-muted/50 p-3 text-sm text-muted-foreground",children:e("codexUnavailable")}),(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-sm",children:[e("prompt"),(0,t.jsx)("textarea",{className:"min-h-48 w-full rounded-md border border-input bg-transparent px-3 py-2 font-mono text-sm",value:h.prompt,maxLength:1e4,spellCheck:!1,"aria-invalid":!p,"aria-describedby":"branch-name-variables",onChange:e=>c({...h,prompt:e.target.value})})]}),(0,t.jsx)("p",{id:"branch-name-variables",className:"text-xs text-muted-foreground",children:e("variables")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:eM.BRANCH_NAME_VARIABLES.map(e=>(0,t.jsx)(I.Button,{type:"button",size:"sm",variant:"outline",onClick:()=>c({...h,prompt:`${h.prompt}{{${e}}}`}),children:`{{${e}}}`},e))}),!p&&(0,t.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:e("invalid")}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(I.Button,{type:"button",onClick:()=>void f(),disabled:u||"codex"===h.provider||!p||h.provider===s&&h.prompt===i,children:u?r("loading"):r("save")}),(0,t.jsx)(I.Button,{type:"button",variant:"outline",onClick:()=>c({...h,prompt:eM.DEFAULT_BRANCH_NAME_PROMPT}),children:e("reset")})]})]})}var eD=e.i(133214);function eT(e){let{promptKey:r}=e,s=(0,a.useTranslations)("settings.gitGenerationPrompts"),i=(0,a.useTranslations)("common"),o=(0,_.default)(e=>e[r]),d=(0,_.default)(e=>e.setGitGenerationPrompt),[c,u]=(0,l.useState)(null),[m,h]=(0,l.useState)(!1),p=c??o,f=(0,eD.isValidGitGenerationPrompt)(r,p),x=eD.GIT_GENERATION_PROMPTS[r],g=async()=>{if(!m&&f){h(!0);try{await d(r,p),u(null),n.toast.success(i("saved"))}catch(e){n.toast.error(i("error"),{description:e instanceof Error?e.message:String(e)})}finally{h(!1)}}};return(0,t.jsxs)("fieldset",{disabled:m,className:"space-y-3",children:[(0,t.jsx)("legend",{className:"text-sm font-medium",children:s(`${r}.title`)}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:s(`${r}.description`)}),(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-sm",children:[s("prompt"),(0,t.jsx)("textarea",{className:"min-h-40 w-full rounded-md border border-input bg-transparent px-3 py-2 font-mono text-sm",value:p,maxLength:1e4,spellCheck:!1,"aria-invalid":!f,"aria-describedby":`${r}-variables`,onChange:e=>u(e.target.value)})]}),(0,t.jsx)("p",{id:`${r}-variables`,className:"text-xs text-muted-foreground",children:s("variables")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:x.variables.map(e=>(0,t.jsx)(I.Button,{type:"button",size:"sm",variant:"outline",disabled:p.length+e.length+4>1e4,onClick:()=>u(`${p}{{${e}}}`),children:`{{${e}}}`},e))}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:s("evidenceHint")}),!f&&(0,t.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:s("invalid")}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(I.Button,{type:"button",onClick:()=>void g(),disabled:m||!f||p===o,children:m?i("loading"):i("save")}),(0,t.jsx)(I.Button,{type:"button",variant:"outline",onClick:()=>u(x.defaultPrompt),children:s("reset")})]})]})}var eA=e.i(983040);let eR=e=>{let{provider:r}=e,s=`${r}-environment`,i=(0,a.useTranslations)("settings.claude"),o=(0,a.useTranslations)("common"),d=(0,_.default)(e=>e[`${r}Environment`]),c=(0,_.default)(e=>"codex"===r?e.setCodexEnvironment:e.setClaudeEnvironment),[u,m]=(0,l.useState)(null),[h,p]=(0,l.useState)(!1),[f,x]=(0,l.useState)(!1),g=(0,eA.formatAgentEnvironment)(d),v=u??g,y=async()=>{let e;try{e=(0,eA.parseAgentEnvironment)(v)}catch{x(!0);return}p(!0);try{await c(e),m(null),n.toast.success(o("saved"))}catch(e){n.toast.error(o("error"),{description:e instanceof Error?e.message:String(e)})}finally{p(!1)}};return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(z.Label,{htmlFor:s,children:i("environmentTitle",{agent:"codex"===r?"Codex":"Claude"})}),(0,t.jsx)("p",{id:`${s}-description`,className:"text-sm text-muted-foreground",children:i("environmentDescription",{agent:"codex"===r?"Codex":"Claude"})}),(0,t.jsx)("textarea",{id:s,"aria-describedby":`${s}-description${f?` ${s}-error`:""}`,"aria-invalid":f,className:"min-h-32 w-full rounded-md border border-input bg-transparent px-3 py-2 font-mono text-sm",value:v,onChange:e=>{m(e.target.value),x(!1)},placeholder:"HTTP_PROXY=http://127.0.0.1:7890\nHTTPS_PROXY=http://127.0.0.1:7890\nNO_PROXY=localhost,127.0.0.1",spellCheck:!1,autoCapitalize:"off",autoCorrect:"off",disabled:h}),f&&(0,t.jsx)("p",{id:`${s}-error`,role:"alert",className:"text-sm text-destructive",children:i("environmentInvalid")}),(0,t.jsx)(I.Button,{onClick:y,disabled:h||v===g,children:h?o("loading"):o("save")})]})};var eI=e.i(260449);function eP(){let e=(0,a.useTranslations)("settings.browserStorage"),r=(0,a.useTranslations)("common"),[n,s]=(0,l.useState)(!1),[i,o]=(0,l.useState)(!1),[d,c]=(0,l.useState)(!1),u=async()=>{if(!i){o(!0),c(!1);try{await (0,eI.clearBrowserStorage)(),(0,eI.reloadWithFreshPage)()}catch{c(!0),o(!1)}}};return(0,t.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("description")})]}),(0,t.jsx)(I.Button,{variant:"outline",className:"shrink-0",onClick:()=>{c(!1),s(!0)},children:e("action")}),(0,t.jsx)(U.AlertDialog,{open:n,onOpenChange:e=>{i||s(e)},children:(0,t.jsxs)(U.AlertDialogContent,{children:[(0,t.jsxs)(U.AlertDialogHeader,{children:[(0,t.jsx)(U.AlertDialogTitle,{children:e("title")}),(0,t.jsx)(U.AlertDialogDescription,{children:e("confirm")})]}),d&&(0,t.jsx)("p",{role:"alert",className:"text-sm text-ui-red",children:e("failed")}),(0,t.jsxs)(U.AlertDialogFooter,{children:[(0,t.jsx)(I.Button,{variant:"outline",disabled:i,onClick:()=>s(!1),children:r("cancel")}),d&&(0,t.jsx)(I.Button,{variant:"outline",onClick:eI.reloadWithFreshPage,children:e("reload")}),(0,t.jsx)(I.Button,{variant:"destructive",disabled:i,onClick:()=>void u(),children:e(i?"clearing":"action")})]})]})})]})}let eL=[{id:"general",labelKey:"general",icon:(0,t.jsx)(N.Settings,{className:"h-4 w-4"})},{id:"appearance",labelKey:"appearance",icon:(0,t.jsx)(C.Palette,{className:"h-4 w-4"})},{id:"terminal",labelKey:"terminal",icon:(0,t.jsx)(E.Terminal,{className:"h-4 w-4"})},{id:"claude",labelKey:"agent",icon:(0,t.jsx)(c.Bot,{className:"h-4 w-4"})},{id:"notification",labelKey:"notification",icon:(0,t.jsx)(d.Bell,{className:"h-4 w-4"})},{id:"editor",labelKey:"editor",icon:(0,t.jsx)(p.FolderCode,{className:"h-4 w-4"})},{id:"auth",labelKey:"auth",icon:(0,t.jsx)(y.Lock,{className:"h-4 w-4"})},{id:"tailscale",labelKey:"tailscale",icon:(0,t.jsx)(f.Globe,{className:"h-4 w-4"})},{id:"quick-prompts",labelKey:"quickPrompts",icon:(0,t.jsx)(R.Zap,{className:"h-4 w-4"})},{id:"sidebar-items",labelKey:"sidebarItems",icon:(0,t.jsx)(v.Layout,{className:"h-4 w-4"})},{id:"system",labelKey:"system",icon:(0,t.jsx)(T.Wrench,{className:"h-4 w-4"})}],eB=[{id:"en",label:"English"},{id:"ko",label:"한국어"},{id:"ja",label:"日本語"},{id:"zh-CN",label:"中文(简体)"},{id:"zh-TW",label:"中文(繁體)"},{id:"es",label:"Español"},{id:"fr",label:"Français"},{id:"de",label:"Deutsch"},{id:"pt-BR",label:"Português (BR)"},{id:"ru",label:"Русский"},{id:"tr",label:"Türkçe"}],eO=[{id:"normal",labelKey:"fontSizeNormal"},{id:"large",labelKey:"fontSizeLarge"},{id:"x-large",labelKey:"fontSizeXLarge"}],ez=[{id:"tight",labelKey:"lineSpacingTight"},{id:"normal",labelKey:"lineSpacingNormal"},{id:"relaxed",labelKey:"lineSpacingRelaxed"},{id:"custom",labelKey:"lineSpacingCustom"}],eF=()=>{let e=(0,a.useTranslations)("settings.general"),r=(0,a.useTranslations)("common"),{theme:n,setTheme:o}=(0,s.useTheme)(),d=(0,_.default)(e=>e.locale),c=(0,_.default)(e=>e.setLocale),u=(0,_.default)(e=>e.fontSize),h=(0,_.default)(e=>e.setFontSize),p=(0,_.default)(e=>e.lineHeight),f=(0,_.default)(e=>e.setLineHeight),x=(0,_.default)(e=>e.lineHeightCustom),v=(0,_.default)(e=>e.setLineHeightCustom),y=(0,Y.default)(e=>e.setSettingsDialogOpen),[j,k]=(0,l.useState)(null),C=j??String(x),S=(0,Y.default)(e=>e.setCheatSheetOpen),N=e=>{o(e),fetch("/api/config",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({appTheme:e})}).catch(()=>{}),window.electronAPI&&window.electronAPI.setNativeTheme(e)};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("language")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("languageDescription")})]}),(0,t.jsxs)(q.Select,{items:eB.map(e=>({label:e.label,value:e.id})),value:d,onValueChange:e=>e&&c(e),children:[(0,t.jsx)(q.SelectTrigger,{className:"min-w-[200px]",children:(0,t.jsx)(q.SelectValue,{})}),(0,t.jsx)(q.SelectContent,{children:eB.map(e=>(0,t.jsx)(q.SelectItem,{value:e.id,children:e.label},e.id))})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("theme")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("themeDescription")})]}),(0,t.jsxs)(P.ButtonGroup,{children:[(0,t.jsxs)(I.Button,{variant:"light"===n?"default":"outline",size:"sm",onClick:()=>N("light"),children:[(0,t.jsx)(M.Sun,{className:"h-4 w-4"}),r("light")]}),(0,t.jsxs)(I.Button,{variant:"dark"===n?"default":"outline",size:"sm",onClick:()=>N("dark"),children:[(0,t.jsx)(w.Moon,{className:"h-4 w-4"}),r("dark")]}),(0,t.jsxs)(I.Button,{variant:"system"===n?"default":"outline",size:"sm",onClick:()=>N("system"),children:[(0,t.jsx)(b.Monitor,{className:"h-4 w-4"}),r("system")]})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("fontSize")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("fontSizeDescription")})]}),(0,t.jsx)(P.ButtonGroup,{children:eO.map(r=>(0,t.jsx)(I.Button,{variant:u===r.id?"default":"outline",size:"sm",onClick:()=>h(r.id),children:e(r.labelKey)},r.id))})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("lineSpacing")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("lineSpacingDescription")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:["custom"===p&&(0,t.jsx)(L.Input,{type:"number",min:$.LINE_HEIGHT_CUSTOM_MIN,max:$.LINE_HEIGHT_CUSTOM_MAX,step:$.LINE_HEIGHT_CUSTOM_STEP,value:C,onChange:e=>k(e.target.value),onBlur:()=>{let e=Number(j);if(k(null),!Number.isFinite(e))return;let t=(0,$.clampCustomLineHeight)(Math.round(100*e)/100);t!==x&&v(t)},onKeyDown:e=>{"Enter"===e.key&&e.target.blur()},className:"h-8 w-20 text-sm","aria-label":e("lineSpacingCustom")}),(0,t.jsx)(P.ButtonGroup,{children:ez.map(r=>(0,t.jsx)(I.Button,{variant:p===r.id?"default":"outline",size:"sm",onClick:()=>f(r.id),children:e(r.labelKey)},r.id))})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("keyboardShortcuts")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("keyboardShortcutsDescription")})]}),(0,t.jsxs)(I.Button,{variant:"outline",size:"sm",onClick:()=>{y(!1),S(!0)},children:[(0,t.jsx)(g.Keyboard,{className:"h-4 w-4"}),e("openShortcuts"),(0,t.jsx)(m.ChevronRight,{className:"h-3.5 w-3.5"})]})]}),(0,t.jsx)(eP,{}),(0,t.jsxs)("a",{href:"https://github.com/stirp/purplemux-improved/releases",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground/50 hover:text-muted-foreground hover:underline w-fit",children:[i.default.version,"(","5ecdf9b",")"]})]})},eV=[{label:"Surface",vars:["--background","--card","--popover","--muted","--secondary","--accent","--sidebar"]},{label:"Text",vars:["--foreground","--card-foreground","--popover-foreground","--muted-foreground","--secondary-foreground","--accent-foreground","--sidebar-foreground"]},{label:"Interactive",vars:["--primary","--primary-foreground","--destructive"]},{label:"Border",vars:["--border","--input","--ring"]},{label:"Palette",vars:["--ui-blue","--ui-teal","--ui-coral","--ui-amber","--ui-purple","--ui-pink","--ui-green","--ui-gray","--ui-red"]},{label:"Semantic",vars:["--positive","--negative","--accent-color","--brand","--focus-indicator","--claude-active"]}],eH=()=>{let e=(0,a.useTranslations)("settings.appearance"),s=(0,a.useTranslations)("common"),i=(0,_.default)(e=>e.customCSS),o=(0,_.default)(e=>e.setCustomCSS),[d,c]=(0,l.useState)(i),[m,h]=(0,l.useState)(!1);(0,l.useEffect)(()=>{c(i)},[i]);let p=d!==i;return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(r.default,{}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("customCSS")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("customCSSDescription")})]}),(0,t.jsx)("textarea",{className:"h-56 w-full resize-y rounded-md border border-input bg-muted/30 p-3 font-mono text-xs leading-relaxed text-foreground placeholder:text-muted-foreground/40 focus:border-ring focus:outline-none",placeholder:e("placeholder"),value:d,onChange:e=>c(e.target.value),spellCheck:!1}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)(U.AlertDialog,{children:[(0,t.jsx)(U.AlertDialogTrigger,{render:(0,t.jsx)(I.Button,{variant:"outline",size:"sm",disabled:!i,children:e("reset")})}),(0,t.jsxs)(U.AlertDialogContent,{children:[(0,t.jsxs)(U.AlertDialogHeader,{children:[(0,t.jsx)(U.AlertDialogTitle,{children:e("reset")}),(0,t.jsx)(U.AlertDialogDescription,{children:e("resetConfirm")})]}),(0,t.jsxs)(U.AlertDialogFooter,{children:[(0,t.jsx)(U.AlertDialogCancel,{children:s("cancel")}),(0,t.jsx)(U.AlertDialogAction,{onClick:()=>{c(""),o("")},children:e("reset")})]})]})]}),(0,t.jsx)(I.Button,{size:"sm",disabled:!p,onClick:()=>{o(d),n.toast.success(e("applied"))},children:e("apply")})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("button",{type:"button",className:"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground",onClick:()=>h(!m),children:[(0,t.jsx)(u.ChevronDown,{className:(0,G.cn)("h-3.5 w-3.5 transition-transform",m&&"rotate-180")}),e("availableVariables")]}),m&&(0,t.jsx)("div",{className:"mt-2 space-y-3",children:eV.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-1 text-[11px] font-medium text-muted-foreground",children:e.label}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:e.vars.map(e=>(0,t.jsx)("code",{className:"rounded bg-muted px-1.5 py-0.5 text-[11px]",children:e},e))})]},e.label))})]})]})},eU=e=>{let{list:r,selectedId:l,onSelect:a}=e;return(0,t.jsx)("div",{className:"grid grid-cols-2 gap-2 md:grid-cols-3",children:r.map(e=>{let r;return(0,t.jsxs)("button",{type:"button",onClick:()=>a(e.id),className:(0,G.cn)("flex flex-col gap-2 rounded-lg border p-3 text-left transition-colors",l===e.id?"border-primary bg-accent":"border-border hover:border-muted-foreground/50"),children:[(0,t.jsx)("span",{className:"text-xs font-medium",children:e.name}),(0,t.jsx)("div",{className:"flex h-5 items-center gap-1 rounded px-2",style:{backgroundColor:e.colors.background},children:[(r=e.colors).red,r.green,r.yellow,r.blue,r.magenta,r.cyan,r.white].map((e,r)=>(0,t.jsx)("div",{className:"h-2.5 w-2.5 rounded-full",style:{backgroundColor:e}},r))})]},e.id)})})},eq=["auto","always","never"],eG=()=>{let e=(0,a.useTranslations)("settings.terminal"),r=(0,a.useTranslations)("common"),{mode:l,themeIds:n,setTerminalTheme:s,themes:i}=(0,K.default)(),o=(0,_.default)(e=>e.terminalKeyBar),d=(0,_.default)(e=>e.setTerminalKeyBar),c=i.filter(e=>"dark"===e.variant),u=i.filter(e=>"light"===e.variant);return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("theme")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("themeDescription")})]}),(0,t.jsxs)(V.Tabs,{defaultValue:l,children:[(0,t.jsxs)(V.TabsList,{children:[(0,t.jsx)(V.TabsTrigger,{value:"dark",children:r("dark")}),(0,t.jsx)(V.TabsTrigger,{value:"light",children:r("light")})]}),(0,t.jsx)(V.TabsContent,{value:"dark",className:"mt-3",children:(0,t.jsx)(eU,{list:c,selectedId:n.dark,onSelect:e=>s("dark",e)})}),(0,t.jsx)(V.TabsContent,{value:"light",className:"mt-3",children:(0,t.jsx)(eU,{list:u,selectedId:n.light,onSelect:e=>s("light",e)})})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 border-t pt-6 md:flex-row md:items-center md:justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("keyBar")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("keyBarDescription")})]}),(0,t.jsx)(P.ButtonGroup,{children:eq.map(r=>(0,t.jsx)(I.Button,{variant:o===r?"default":"outline",size:"sm",onClick:()=>d(r),children:e(`keyBarOptions.${r}`)},r))})]})]})},eK=()=>{let e=(0,a.useTranslations)("settings.editor"),r=(0,a.useTranslations)("common"),s=(0,_.default)(e=>e.editorUrl),i=(0,_.default)(e=>e.editorPreset),o=(0,_.default)(e=>e.setEditorUrl),d=(0,_.default)(e=>e.setEditorPreset),[c,u]=(0,l.useState)(s),[m,h]=(0,l.useState)(i),p="vscode-remote"===m,f="code-server"===m||"custom"===m||p,x=m!==i||f&&c.trim()!==s,g=(0,J.buildEditorUrl)(m,c,"/Users/me/project"),v=()=>{let t=f?c.trim():"";if(p&&!(0,J.isValidSshHost)(t))return void n.toast.error(e("errorSshHost"));if("code-server"===m&&t)try{let r=new URL(t);if("http:"!==r.protocol&&"https:"!==r.protocol)return void n.toast.error(e("errorHttpRequired"))}catch{n.toast.error(e("errorHttpRequired"));return}"custom"!==m||!t||t.includes("{folder}")||t.includes("{folderEncoded}")?(u(t),o(t),d(m),n.toast.success(r("saved"))):n.toast.error(e("errorCustomTemplate"))};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("preset")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("presetDescription")})]}),(0,t.jsx)(F.RadioGroup,{value:m,onValueChange:e=>h(e),className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:J.EDITOR_PRESETS.map(r=>(0,t.jsxs)(z.Label,{htmlFor:`editor-preset-${r}`,className:(0,G.cn)("flex cursor-pointer items-center gap-2 rounded-md border border-border px-3 py-2 text-sm font-normal",m===r&&"border-foreground/30 bg-accent"),children:[(0,t.jsx)(F.RadioGroupItem,{id:`editor-preset-${r}`,value:r}),(0,t.jsx)(Z.EditorIcon,{preset:r,className:"h-5 w-5 shrink-0"}),e(`presets.${r}`)]},r))})]}),f&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:p?e("sshHost"):"custom"===m?e("customTemplate"):e("url")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:p?e("sshHostDescription"):"custom"===m?e("customTemplateDescription"):e("urlDescription")}),(0,t.jsx)(L.Input,{placeholder:p?"my-server":"custom"===m?"myeditor://open?path={folderEncoded}":"https://example.com:8080",value:c,onChange:e=>u(e.target.value),onKeyDown:e=>{"Enter"===e.key&&v()}}),"code-server"===m&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e.rich("urlHelp",{link:e=>(0,t.jsx)("a",{href:"https://github.com/coder/code-server",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-foreground",children:e}),code:()=>(0,t.jsx)("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:"?folder="})})}),(0,t.jsxs)("div",{className:"rounded-md bg-muted p-3 font-mono text-xs leading-relaxed",children:[(0,t.jsx)("p",{className:"text-muted-foreground/60",children:"# Install on macOS"}),(0,t.jsx)("p",{children:"brew install code-server"}),(0,t.jsx)("p",{className:"mt-2 text-muted-foreground/60",children:"# Run"}),(0,t.jsx)("p",{children:"code-server --port 8080"}),(0,t.jsx)("p",{className:"mt-2 text-muted-foreground/60",children:"# External access via Tailscale (optional)"}),(0,t.jsx)("p",{children:"tailscale serve --bg --https=8443 http://localhost:8080"})]})]}),"custom"===m&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e.rich("customHelp",{folder:()=>(0,t.jsx)("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:"{folder}"}),folderEncoded:()=>(0,t.jsx)("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:"{folderEncoded}"})})})]}),!f&&"off"!==m&&(0,t.jsx)("p",{className:"rounded-md border border-border bg-muted/30 p-3 text-sm text-muted-foreground",children:e("localIdeHint")}),"off"===m&&(0,t.jsx)("p",{className:"rounded-md border border-border bg-muted/30 p-3 text-sm text-muted-foreground",children:e("offHint")}),g&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:e("preview")}),(0,t.jsx)("code",{className:"block break-all rounded-md bg-muted p-2 font-mono text-xs",children:g})]}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(I.Button,{disabled:!x,onClick:v,children:r("save")})})]})},e_=()=>{let e=(0,a.useTranslations)("settings.claude"),r=(0,_.default)(e=>e.dangerouslySkipPermissions),l=(0,_.default)(e=>e.setDangerouslySkipPermissions),n=(0,_.default)(e=>e.claudeShowTerminal),s=(0,_.default)(e=>e.setClaudeShowTerminal),i=(0,_.default)(e=>e.gitAskProvider),o=(0,_.default)(e=>e.setGitAskProvider),d=(0,_.default)(e=>e.noteSummaryProvider),c=(0,_.default)(e=>e.setNoteSummaryProvider);return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(eR,{provider:"claude"}),(0,t.jsx)(eR,{provider:"codex"}),(0,t.jsx)(eE,{}),(0,t.jsx)(eT,{promptKey:"commitMessagePrompt"}),(0,t.jsx)(eT,{promptKey:"reviewDescriptionPrompt"}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"space-y-0.5",children:[(0,t.jsx)(z.Label,{htmlFor:"skip-permissions",className:"text-sm font-medium",children:e("skipPermissions")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("skipPermissionsDescription")}),(0,t.jsxs)("div",{className:"mt-1 flex flex-wrap gap-1.5 text-xs text-muted-foreground",children:[(0,t.jsxs)("span",{children:["Claude: ",(0,t.jsx)("code",{className:"rounded bg-muted px-1 py-0.5 font-mono",children:"--dangerously-skip-permissions"})]}),(0,t.jsxs)("span",{children:["Codex: ",(0,t.jsx)("code",{className:"rounded bg-muted px-1 py-0.5 font-mono",children:"--yolo"})]})]})]}),(0,t.jsx)(B.Switch,{id:"skip-permissions",checked:r,onCheckedChange:l})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"space-y-0.5",children:[(0,t.jsx)(z.Label,{htmlFor:"show-terminal",className:"text-sm font-medium",children:e("showTerminal")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("showTerminalDescription")})]}),(0,t.jsx)(B.Switch,{id:"show-terminal",checked:n,onCheckedChange:s})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"space-y-0.5",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("gitAskProvider")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("gitAskProviderDescription")})]}),(0,t.jsx)(F.RadioGroup,{value:i,onValueChange:e=>o(e),className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:["claude","codex"].map(r=>(0,t.jsxs)(z.Label,{htmlFor:`git-ask-provider-${r}`,className:(0,G.cn)("flex cursor-pointer items-center gap-2 rounded-md border border-border px-3 py-2 text-sm font-normal",i===r&&"border-foreground/30 bg-accent"),children:[(0,t.jsx)(F.RadioGroupItem,{id:`git-ask-provider-${r}`,value:r}),e(`gitAskProviderOptions.${r}`)]},r))})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"space-y-0.5",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("noteSummaryProvider")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("noteSummaryProviderDescription")})]}),(0,t.jsx)(F.RadioGroup,{value:d,onValueChange:e=>c(e),className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:["claude","codex"].map(r=>(0,t.jsxs)(z.Label,{htmlFor:`note-summary-provider-${r}`,className:(0,G.cn)("flex cursor-pointer items-center gap-2 rounded-md border border-border px-3 py-2 text-sm font-normal",d===r&&"border-foreground/30 bg-accent"),children:[(0,t.jsx)(F.RadioGroupItem,{id:`note-summary-provider-${r}`,value:r}),e(`noteSummaryProviderOptions.${r}`)]},r))})]})]})},e$=e=>{let{value:r,onChange:l,ariaLabel:n}=e,s=(0,a.useTranslations)("settings.notification"),i=W.TOAST_POSITIONS.map(e=>({label:s(`positions.${e}`),value:e}));return(0,t.jsxs)(q.Select,{items:i,value:r,onValueChange:e=>e&&l(e),children:[(0,t.jsx)(q.SelectTrigger,{"aria-label":n,className:"min-w-[160px]",children:(0,t.jsx)(q.SelectValue,{})}),(0,t.jsx)(q.SelectContent,{children:i.map(e=>(0,t.jsx)(q.SelectItem,{value:e.value,children:e.label},e.value))})]})},eW=()=>{let e=(0,a.useTranslations)("settings.notification"),r=(0,_.default)(e=>e.notificationsEnabled),s=(0,_.default)(e=>e.setNotificationsEnabled),i=(0,_.default)(e=>e.toastOnCompleteEnabled),o=(0,_.default)(e=>e.setToastOnCompleteEnabled),d=(0,_.default)(e=>e.toastDuration),c=(0,_.default)(e=>e.setToastDuration),u=(0,_.default)(e=>e.toastPositionDesktop),m=(0,_.default)(e=>e.setToastPositionDesktop),h=(0,_.default)(e=>e.toastPositionMobile),p=(0,_.default)(e=>e.setToastPositionMobile),[f,x]=(0,l.useState)(null),g=f??String(Math.round(d/1e3)),[v,y]=(0,l.useState)([]),[b,w]=(0,l.useState)(null),k=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/push/subscribe"),t=await e.json();return Array.isArray(t.devices)?t.devices:[]}catch{return[]}},[]);(0,l.useEffect)(()=>{k().then(y),(0,X.getEndpoint)().then(w)},[k]);let C=async t=>{try{await fetch("/api/push/subscribe",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({endpoint:t})}),n.toast.success(e("deviceRemoved")),y(await k())}catch{n.toast.error(e("deviceRemoveFailed"))}},S=!window.electronAPI&&!("PushManager"in window),N=!window.electronAPI&&"Notification"in window&&"denied"===Notification.permission;return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"space-y-0.5",children:[(0,t.jsx)(z.Label,{htmlFor:"notifications-enabled",className:"text-sm font-medium",children:e("enable")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("enableDescription")})]}),(0,t.jsx)(B.Switch,{id:"notifications-enabled",checked:r,onCheckedChange:s,disabled:S||N})]}),N&&(0,t.jsx)("p",{className:"text-sm text-destructive",children:e("permissionDenied")}),S&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("notSupported")})]}),v.length>0&&(0,t.jsxs)("div",{className:"border-t pt-6 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("devicesSection")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("devicesSectionDescription")})]}),(0,t.jsx)("div",{className:"space-y-2",children:v.map(r=>{let l=!!b&&r.endpoint===b;return(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-md border px-3 py-2",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)(j.MonitorSmartphone,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"truncate text-sm",children:(e=>{try{let t=new URL(e).host;if(t.includes("apple"))return"Apple";if(t.includes("fcm")||t.includes("google"))return"Chrome / Android";if(t.includes("mozilla"))return"Firefox";if(t.includes("windows")||t.includes("wns"))return"Windows";return t}catch{return"Unknown"}})(r.endpoint)}),l&&(0,t.jsx)("span",{className:"shrink-0 rounded-full bg-primary/10 px-2 py-0.5 text-xs text-primary",children:e("deviceThis")})]}),(0,t.jsx)(I.Button,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>C(r.endpoint),"aria-label":e("deviceRemove"),children:(0,t.jsx)(D.Trash2,{className:"h-4 w-4"})})]},r.endpoint)})})]}),(0,t.jsxs)("div",{className:"border-t pt-6 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("toastSection")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("toastSectionDescription")})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"space-y-0.5",children:[(0,t.jsx)(z.Label,{htmlFor:"toast-enabled",className:"text-sm font-medium",children:e("toastEnable")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("toastEnableDescription")})]}),(0,t.jsx)(B.Switch,{id:"toast-enabled",checked:i,onCheckedChange:o})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("toastDuration")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("toastDurationDescription")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(L.Input,{type:"number",min:1,max:60,step:1,value:g,onChange:e=>x(e.target.value),onBlur:()=>{let e=Number(f);if(x(null),!Number.isFinite(e))return;let t=1e3*Math.min(60,Math.max(1,Math.round(e)));t!==d&&c(t)},onKeyDown:e=>{"Enter"===e.key&&e.target.blur()},disabled:!i,className:"h-8 w-20 text-sm"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:e("toastDurationUnit")})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("toastPositionDesktop")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("toastPositionDesktopDescription")})]}),(0,t.jsx)(e$,{value:u,onChange:m,ariaLabel:e("toastPositionDesktop")})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("toastPositionMobile")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("toastPositionMobileDescription")})]}),(0,t.jsx)(e$,{value:h,onChange:p,ariaLabel:e("toastPositionMobile")})]})]})]})},eY=()=>{let e=(0,a.useTranslations)("settings.auth"),r=(0,a.useTranslations)("common"),s=(0,_.default)(e=>e.hasAuthPassword),i=(0,_.default)(e=>e.changePassword),[d,c]=(0,l.useState)(""),[u,m]=(0,l.useState)(!1),p=u&&d.trim().length>=4,f=e=>{c(e),m(!0)};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)(O.Field,{children:[(0,t.jsx)(O.FieldLabel,{htmlFor:"auth-password",children:e("changePassword")}),(0,t.jsx)(O.FieldDescription,{children:e("changePasswordDescription")}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(L.Input,{id:"auth-password",placeholder:s?e("newPasswordPlaceholder"):e("passwordPlaceholder"),value:d,onChange:e=>f(e.target.value)}),(0,t.jsx)(I.Button,{variant:"outline",size:"icon",className:"shrink-0",onClick:()=>{let e;return f((e=new Uint8Array(8),crypto.getRandomValues(e),Array.from(e,e=>e.toString(16).padStart(2,"0")).join("").slice(0,8)))},children:(0,t.jsx)(h.Dices,{className:"h-4 w-4"})})]})]}),(0,t.jsx)(O.FieldDescription,{children:e("resetHint",{action:o.default?e("restartApp"):e("restartServer")})}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(I.Button,{disabled:!p,onClick:()=>{i(d.trim()),c(""),m(!1),n.toast.success(e("savedRestart",{action:o.default?e("restartAppAction"):e("restartServerAction")}))},children:r("save")})})]})},eX=()=>{let e=(0,a.useTranslations)("settings.system"),r=(0,a.useTranslations)("common"),s=(0,_.default)(e=>e.systemResourcesEnabled),i=(0,_.default)(e=>e.setSystemResourcesEnabled),d=(0,_.default)(e=>e.networkAccess),c=(0,_.default)(e=>e.setNetworkAccess),u=(0,_.default)(e=>e.hostEnvLocked),m=(0,_.default)(e=>e.bindHostIsLocal),[h,p]=(0,l.useState)(!1),[f,g]=(0,l.useState)(null),[v,y]=(0,l.useState)(!1),b=window.electronAPI,j=o.default&&b?.platform==="darwin",w=o.default&&j&&"function"==typeof b?.getServerLaunchAgentStatus&&"function"==typeof b?.setServerLaunchAgentEnabled;(0,l.useEffect)(()=>{if(!w)return;let e=window.electronAPI;if("function"!=typeof e?.getServerLaunchAgentStatus)return;let t=!1;return e.getServerLaunchAgentStatus().then(e=>{t||g(e)}).catch(()=>{t||g({supported:!1,enabled:!1,loaded:!1,stale:!1,path:""})}),()=>{t=!0}},[w]);let C=async t=>{if(!w)return;let l=window.electronAPI;if("function"==typeof l?.setServerLaunchAgentEnabled){y(!0);try{let r=await l.setServerLaunchAgentEnabled(t);g(r),n.toast.success(t?e("startupEnabled"):e("startupDisabled"))}catch(e){n.toast.error(e instanceof Error?e.message:r("error"))}finally{y(!1)}}},N=async()=>{p(!0);try{let t=await fetch("/api/uploads/cleanup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:"all"})});if(!t.ok)throw Error(`HTTP ${t.status}`);let r=await t.json();r.deleted>0?n.toast.success(e("attachedImagesCleaned",{count:r.deleted})):n.toast.info(e("attachedImagesNothing"))}catch{n.toast.error(r("error"))}finally{p(!1)}},[M,E]=(0,l.useState)(d);(0,l.useEffect)(()=>{E(d)},[d]);let T=M!==d,A=m&&"localhost"!==M;return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(k.Network,{className:"mt-0.5 h-4 w-4 text-muted-foreground"}),(0,t.jsxs)("div",{className:"flex-1 space-y-0.5",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("networkAccess")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:u?e("networkAccessLocked"):e("networkAccessDescription")})]})]}),(0,t.jsx)(F.RadioGroup,{value:M,onValueChange:e=>E(e),disabled:u,className:"gap-2",children:["localhost","tailscale","all"].map(r=>(0,t.jsxs)("label",{htmlFor:`network-access-${r}`,className:"flex cursor-pointer items-start gap-3 rounded-md border bg-background px-3 py-2.5 aria-disabled:cursor-not-allowed aria-disabled:opacity-60","aria-disabled":u||void 0,children:[(0,t.jsx)(F.RadioGroupItem,{value:r,id:`network-access-${r}`,className:"mt-0.5"}),(0,t.jsxs)("div",{className:"flex-1 space-y-0.5",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e(`networkAccessOptions.${r}.label`)}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e(`networkAccessOptions.${r}.description`)})]})]},r))}),!u&&(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:A?e("restartRequired"):""}),(0,t.jsx)(I.Button,{size:"sm",onClick:()=>{c(M),n.toast.success(A?e("restartRequired"):r("saved"))},disabled:!T,children:r("save")})]})]}),j&&(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsxs)("div",{className:"space-y-0.5",children:[(0,t.jsx)(z.Label,{htmlFor:"server-startup",className:"text-sm font-medium",children:e("startServerAtLogin")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:f?.supported===!1?e("startServerAtLoginUnsupported"):e("startServerAtLoginDescription")})]}),(0,t.jsx)(B.Switch,{id:"server-startup",checked:!!(f?.enabled||f?.stale),onCheckedChange:C,disabled:!w||v||!f?.supported&&!f?.stale})]}),o.default&&(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"space-y-0.5",children:[(0,t.jsx)(z.Label,{htmlFor:"system-resources",className:"text-sm font-medium",children:e("showResources")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("showResourcesDescription")})]}),(0,t.jsx)(B.Switch,{id:"system-resources",checked:s,onCheckedChange:i})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(x.ImageIcon,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("attachedImages")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("attachedImagesDescription")})]})]}),(0,t.jsxs)(I.Button,{variant:"outline",size:"sm",className:"gap-1.5 shrink-0",onClick:N,disabled:h,children:[(0,t.jsx)(D.Trash2,{className:"h-3.5 w-3.5"}),e("cleanAttachedImages")]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("tmuxReset")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("tmuxResetDescription",{action:o.default?e("restartApp"):e("restartServer")})})]}),(0,t.jsxs)(U.AlertDialog,{children:[(0,t.jsx)(U.AlertDialogTrigger,{render:(0,t.jsxs)(I.Button,{variant:"destructive",size:"sm",className:"gap-1.5 shrink-0",children:[(0,t.jsx)(S.RotateCcw,{className:"h-3.5 w-3.5"}),r("reset")]})}),(0,t.jsxs)(U.AlertDialogContent,{children:[(0,t.jsxs)(U.AlertDialogHeader,{children:[(0,t.jsx)(U.AlertDialogTitle,{children:e("tmuxReset")}),(0,t.jsx)(U.AlertDialogDescription,{children:e("tmuxResetConfirm")})]}),(0,t.jsxs)(U.AlertDialogFooter,{children:[(0,t.jsx)(U.AlertDialogCancel,{children:r("cancel")}),(0,t.jsx)(U.AlertDialogAction,{className:"bg-ui-red hover:bg-ui-red/80",onClick:()=>{window.location.href="/reset"},children:r("reset")})]})]})]})]})]})};e.s(["default",0,e=>{let{open:r,onOpenChange:n}=e,s=(0,a.useTranslations)("settings"),i=(0,a.useTranslations)("common"),[d,c]=(0,l.useState)("general"),u=eL.find(e=>e.id===d);return(0,t.jsx)(H.Dialog,{open:r,onOpenChange:n,children:(0,t.jsx)(H.DialogContent,{className:"inset-0 max-w-none sm:max-w-none translate-x-0 translate-y-0 gap-0 overflow-hidden rounded-none p-0 md:inset-auto md:top-1/2 md:left-1/2 md:h-auto md:w-[calc(100%-2rem)] md:min-w-3xl md:max-w-3xl md:-translate-x-1/2 md:-translate-y-1/2 md:rounded-xl",showCloseButton:!1,children:(0,t.jsxs)("div",{className:"flex h-full min-h-0 min-w-0 w-full flex-col overflow-hidden md:h-[520px] md:flex-row",children:[(0,t.jsxs)("div",{className:"flex shrink-0 flex-col border-b bg-muted/30 px-3 pt-3 pb-0 md:p-3 md:w-48 md:border-b-0 md:border-r",children:[(0,t.jsxs)("div",{className:"mb-2 flex items-center justify-between px-2 md:mb-4",children:[(0,t.jsx)(H.DialogTitle,{className:"text-base font-semibold",children:s("title")}),(0,t.jsxs)(I.Button,{variant:"ghost",size:"icon",onClick:()=>n(!1),className:"h-6 w-6 opacity-70 hover:opacity-100",children:[(0,t.jsx)(A.X,{className:"h-[18px] w-[18px]"}),(0,t.jsx)("span",{className:"sr-only",children:i("close")})]})]}),(0,t.jsx)("nav",{className:"flex gap-1 overflow-x-auto px-1 pb-2 md:flex-col md:px-0 md:pb-0",children:eL.filter(e=>!e.electronOnly||o.default).map(e=>(0,t.jsxs)(I.Button,{variant:"ghost",onClick:()=>c(e.id),className:(0,G.cn)("shrink-0 justify-start gap-2 whitespace-nowrap px-3 py-2 text-sm font-medium md:gap-3",d===e.id?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground"),children:[e.icon,s(`tabs.${e.labelKey}`)]},e.id))})]}),(0,t.jsxs)("div",{className:"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto p-4 md:p-6",children:[(0,t.jsx)("h2",{className:"mb-6 text-lg font-semibold",children:u?s(`tabs.${u.labelKey}`):""}),"general"===d&&(0,t.jsx)(eF,{}),"appearance"===d&&(0,t.jsx)(eH,{}),"terminal"===d&&(0,t.jsx)(eG,{}),"notification"===d&&(0,t.jsx)(eW,{}),"editor"===d&&(0,t.jsx)(eK,{}),"claude"===d&&(0,t.jsx)(e_,{}),"auth"===d&&(0,t.jsx)(eY,{}),"tailscale"===d&&(0,t.jsx)(eN,{}),"quick-prompts"===d&&(0,t.jsx)(Q.default,{}),"sidebar-items"===d&&(0,t.jsx)(ef,{}),"system"===d&&(0,t.jsx)(eX,{})]})]})})})}],934048)}]);
@@ -2,12 +2,12 @@ __turbopack_load_page_chunks__("/tools-required", [
2
2
  "static/chunks/077plqqmtpbqd.js",
3
3
  "static/chunks/0yo.llzzy~hac.js",
4
4
  "static/chunks/0_1vopg02tz_b.js",
5
- "static/chunks/0z4hai42j2v6w.js",
5
+ "static/chunks/0zefn_3i--_49.js",
6
6
  "static/chunks/001l6ikr875rr.js",
7
7
  "static/chunks/0qxtlcmfu_xkd.js",
8
8
  "static/chunks/03snjn_okgxa4.js",
9
9
  "static/chunks/0xz_epq5cvuy9.js",
10
10
  "static/chunks/17ozrryn3apke.js",
11
11
  "static/chunks/09gle~-0lfi7..js",
12
- "static/chunks/turbopack-0tlap~o-h1ms2.js"
12
+ "static/chunks/turbopack-079qvmf.y3wb5.js"
13
13
  ])
@@ -9,8 +9,8 @@ __turbopack_load_page_chunks__("/login", [
9
9
  "static/chunks/09gle~-0lfi7..js",
10
10
  "static/chunks/0xz_epq5cvuy9.js",
11
11
  "static/chunks/03snjn_okgxa4.js",
12
- "static/chunks/0ufg~2sx5w0q6.js",
12
+ "static/chunks/0-g3am_gzwzwd.js",
13
13
  "static/chunks/17-eqahl-ffu4.js",
14
14
  "static/chunks/01q45a~d0-t0v.js",
15
- "static/chunks/turbopack-0u-uf-f.oh-ca.js"
15
+ "static/chunks/turbopack-13n362cn_9xg-.js"
16
16
  ])
@@ -2,24 +2,24 @@ __turbopack_load_page_chunks__("/reports", [
2
2
  "static/chunks/0vtqyfpugt3xk.js",
3
3
  "static/chunks/0jy3pnh1yadq..js",
4
4
  "static/chunks/0cirqrl74bser.js",
5
- "static/chunks/0v.15sf3jc67_.js",
5
+ "static/chunks/108_z_hy~82hp.js",
6
6
  "static/chunks/10az_6dd4l3ee.js",
7
- "static/chunks/0qxtlcmfu_xkd.js",
8
- "static/chunks/07uj5sy9586t~.js",
9
- "static/chunks/0ky~8c1u-ed8u.js",
10
- "static/chunks/0e0ppim1c2..1.js",
11
- "static/chunks/09oqlv_7-xd4j.js",
12
7
  "static/chunks/08qqv~sdwm8pn.js",
13
- "static/chunks/09gle~-0lfi7..js",
14
- "static/chunks/05toklz07yrgl.js",
8
+ "static/chunks/07uj5sy9586t~.js",
9
+ "static/chunks/0jganbk2suwn8.js",
10
+ "static/chunks/0_zjtcpi2jcwf.js",
11
+ "static/chunks/0pmama1vb7wu6.js",
12
+ "static/chunks/10jc5_.djl2io.js",
13
+ "static/chunks/0qxtlcmfu_xkd.js",
14
+ "static/chunks/0u_~0xd2vsw7u.js",
15
15
  "static/chunks/10yt_6qu076cy.js",
16
- "static/chunks/080eo5_ldwk3p.js",
17
- "static/chunks/0_l9a48xds5zi.js",
18
- "static/chunks/076w32tkf608u.js",
16
+ "static/chunks/02ev50wluxvcx.js",
17
+ "static/chunks/0.a6w~4mo~suj.js",
18
+ "static/chunks/05toklz07yrgl.js",
19
19
  "static/chunks/03snjn_okgxa4.js",
20
20
  "static/chunks/001l6ikr875rr.js",
21
- "static/chunks/0kpgr8k1uqb3_.js",
22
- "static/chunks/0pmama1vb7wu6.js",
21
+ "static/chunks/0iwh2lfx65m7p.js",
23
22
  "static/chunks/0qw2crf5t0~yy.js",
24
- "static/chunks/turbopack-0puk~e1j8~on3.js"
23
+ "static/chunks/09gle~-0lfi7..js",
24
+ "static/chunks/turbopack-062s3oenu.cik.js"
25
25
  ])