@openchambery/web 1.19.13 → 1.19.15-beta.1

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 (120) hide show
  1. package/dist/assets/{AgentAvatar-mbvX7YlW.js → AgentAvatar-m1jNq4bX.js} +1 -1
  2. package/dist/assets/AssistantView-D5rEZ-Ss.js +2 -0
  3. package/dist/assets/{DiagramView-BdI4PT2H.js → DiagramView-DaB9Sb7S.js} +1 -1
  4. package/dist/assets/{FadeInOnReveal-moBbL8Ll.js → FadeInOnReveal-UGwClbL_.js} +1 -1
  5. package/dist/assets/Icon-D1BcR8Tz.js +1 -0
  6. package/dist/assets/MarkdownRenderer-emLeoNjI.js +2 -0
  7. package/dist/assets/{MarkdownRendererImpl-2ewbRZE2.js → MarkdownRendererImpl-BWCAPlqn.js} +3 -3
  8. package/dist/assets/{MarkstreamRendererImpl-DXewO7S_.js → MarkstreamRendererImpl-BD_NFKUv.js} +2 -2
  9. package/dist/assets/MobileDetailNavigation-DqXVAIap.js +1 -0
  10. package/dist/assets/MobileShareBridge-Bk2fdkJk.js +4 -0
  11. package/dist/assets/MobileSurface-C4mpcOCh.js +2 -0
  12. package/dist/assets/{MultiRunWindow-C8ukIdLA.js → MultiRunWindow-rs49_K1E.js} +1 -1
  13. package/dist/assets/{OnboardingScreen-j0iCyH7f.js → OnboardingScreen-bIWeMLVx.js} +1 -1
  14. package/dist/assets/{OverlayScrollbar-CDC5B3RH.js → OverlayScrollbar-Bahg_P3r.js} +1 -1
  15. package/dist/assets/SettingsView-b8LUjoad.js +25 -0
  16. package/dist/assets/{SettingsWindow-CSePZ_V8.js → SettingsWindow-D8JFlPdA.js} +1 -1
  17. package/dist/assets/{TerminalView-BmSIrZ81.js → TerminalView-DCd-Godi.js} +1 -1
  18. package/dist/assets/{ToolOutputDialog-2BYaWLo1.js → ToolOutputDialog-B50L_nUP.js} +1 -1
  19. package/dist/assets/{appThemeRegistry-Dk4gBaOu.js → appThemeRegistry-BWtCaTMe.js} +1 -1
  20. package/dist/assets/{button-xx1UOBA5.js → button-9R-WgVMl.js} +1 -1
  21. package/dist/assets/{clipboard-CUasgPiF.js → clipboard-GUUNlWIv.js} +1 -1
  22. package/dist/assets/{collapsible-CACHBRYZ.js → collapsible-Bbz9KiJf.js} +1 -1
  23. package/dist/assets/{context-menu-CYbm4wBZ.js → context-menu-CSyOhRz8.js} +1 -1
  24. package/dist/assets/{desktopHosts-DILvrAok.js → desktopHosts-B052a4UK.js} +1 -1
  25. package/dist/assets/{desktopRelayRestore-t8asCr3m.js → desktopRelayRestore-OjKNXr10.js} +1 -1
  26. package/dist/assets/{diagram-u0BC9uuY.js → diagram-NdsZih8P.js} +1 -1
  27. package/dist/assets/{dialog-BwQ3rY_x.js → dialog-DhMGbF_B.js} +1 -1
  28. package/dist/assets/{es-CRjOwvYM.js → es-BQb6I8gl.js} +2 -2
  29. package/dist/assets/fileMentionTouchSelection-DKYkoypI.js +4 -0
  30. package/dist/assets/{fileQueries-Bgly-E8f.js → fileQueries-B_s_B-fH.js} +1 -1
  31. package/dist/assets/{fr-D9taEN9L.js → fr-BjGouC_l.js} +2 -2
  32. package/dist/assets/{gitApi-DtPf-h-O.js → gitApi-D4PyYgLZ.js} +3 -3
  33. package/dist/assets/{input-CI730njs.js → input-Cd_1HyQv.js} +1 -1
  34. package/dist/assets/insertionBoundaries-Bnnx03Wj.js +1 -0
  35. package/dist/assets/{ja-CYQ5aoWp.js → ja-Cw9zliYY.js} +2 -2
  36. package/dist/assets/{ko-BwASV0Q0.js → ko-Dyz0Dk9b.js} +2 -2
  37. package/dist/assets/main-BRiQTNFX.js +169 -0
  38. package/dist/assets/{main-Ci3JmtpW.js → main-CnY0LWNc.js} +2 -2
  39. package/dist/assets/{markdownHeightCache-DEjGKLv8.js → markdownHeightCache-BL8CUQ0M.js} +1 -1
  40. package/dist/assets/miniChat-B0pw_mUs.js +2 -0
  41. package/dist/assets/mobile-BKHmxwXz.js +2 -0
  42. package/dist/assets/{multirun-CmaTeZON.js → multirun-BQKqVfFT.js} +1 -1
  43. package/dist/assets/{persistence-YbQKzHUQ.js → persistence-DwRBC4zl.js} +2 -2
  44. package/dist/assets/{pl-DUI1vPil.js → pl-C7EY-dTH.js} +1 -1
  45. package/dist/assets/platform-DQ5_LNKO.js +2 -0
  46. package/dist/assets/{projectMeta-cw9nrwpr.js → projectMeta-BvG8sdtC.js} +2 -2
  47. package/dist/assets/{pt-BR-CZQFJllP.js → pt-BR-B1uHpjFW.js} +2 -2
  48. package/dist/assets/renderElectronMiniChatApp-E5a0yy7E.js +2 -0
  49. package/dist/assets/renderMobileApp-DT0L4Ah6.js +28 -0
  50. package/dist/assets/{runtimeConfig-DI8l0VyZ.js → runtimeConfig-utWzrDwa.js} +1 -1
  51. package/dist/assets/runtimeEndpointReset-DE6lwHyg.js +147 -0
  52. package/dist/assets/sessionChangeSummary-BG7l2heP.js +2 -0
  53. package/dist/assets/sessionLookup-12zVOR0J.js +1 -0
  54. package/dist/assets/{sortable-tabs-strip-Dom6Sthu.js → sortable-tabs-strip-dYW6SH62.js} +1 -1
  55. package/dist/assets/src-CFUi4riW.css +2 -0
  56. package/dist/assets/{store-CSnH_QXM.js → store-ClnJdJSj.js} +3 -3
  57. package/dist/assets/{terminalApi-noa4Cdbh.js → terminalApi-CfgOfnZk.js} +1 -1
  58. package/dist/assets/{textarea-BfNtUdJE.js → textarea-B9CmN13Z.js} +1 -1
  59. package/dist/assets/{tooltip-DPxumadF.js → tooltip-DSjr26A_.js} +1 -1
  60. package/dist/assets/{uk-C1FYZlmA.js → uk-DgG8v2md.js} +2 -2
  61. package/dist/assets/{url-CVhsI9kR.js → url-CMQwHq4k.js} +1 -1
  62. package/dist/assets/{useAppFontEffects-BDFUND4v.js → useAppFontEffects-BhYuP4L2.js} +43 -44
  63. package/dist/assets/useDesktopWindowControlsLayout-DPNMRkrI.js +1 -0
  64. package/dist/assets/{useEffectiveDirectory-e9HjIqGz.js → useEffectiveDirectory-Ji8AKgzY.js} +1 -1
  65. package/dist/assets/{useFontPreferences-CB-cGo3I.js → useFontPreferences-DCaY8NbU.js} +1 -1
  66. package/dist/assets/useMobileNavigationStore-BYdpuwL7.js +413 -0
  67. package/dist/assets/useSessionAutoCleanup-CADZCvZL.js +2 -0
  68. package/dist/assets/{useWorkerHighlightedLines-DTGE0CDs.js → useWorkerHighlightedLines-CuG88Lsj.js} +1 -1
  69. package/dist/assets/{utils-BHTVlVov.js → utils-2ZK8yboQ.js} +1 -1
  70. package/dist/assets/{vendor-reactuses-core-DDoDDyM9.js → vendor-reactuses-core-BnW6GxJt.js} +1 -1
  71. package/dist/assets/{zh-CN-C96qP1ip.js → zh-CN-C6OFKjeT.js} +2 -2
  72. package/dist/assets/{zh-TW-BsRk1Rbb.js → zh-TW-BVP99aMr.js} +2 -2
  73. package/dist/index.html +8 -8
  74. package/dist/mini-chat.html +8 -8
  75. package/dist/mobile.html +8 -8
  76. package/package.json +1 -1
  77. package/server/index.js +1 -0
  78. package/server/lib/assistants/DOCUMENTATION.md +120 -22
  79. package/server/lib/assistants/assign.js +117 -12
  80. package/server/lib/assistants/assign.test.js +79 -0
  81. package/server/lib/assistants/bubbles.js +1 -1
  82. package/server/lib/assistants/contact-store.js +520 -11
  83. package/server/lib/assistants/contact-store.test.js +362 -12
  84. package/server/lib/assistants/contact-tools.js +305 -54
  85. package/server/lib/assistants/contact-tools.test.js +239 -7
  86. package/server/lib/assistants/contracts.js +31 -0
  87. package/server/lib/assistants/harness.js +295 -132
  88. package/server/lib/assistants/harness.test.js +662 -10
  89. package/server/lib/assistants/pi-tools.js +2 -0
  90. package/server/lib/assistants/pi-tools.test.js +8 -0
  91. package/server/lib/assistants/routes.js +3 -0
  92. package/server/lib/assistants/service.js +861 -79
  93. package/server/lib/assistants/service.test.js +1234 -8
  94. package/server/lib/llm/DOCUMENTATION.md +10 -3
  95. package/server/lib/llm/completions.js +4 -0
  96. package/server/lib/llm/completions.test.js +3 -0
  97. package/server/lib/llm/generate.js +57 -11
  98. package/server/lib/llm/generate.test.js +92 -0
  99. package/server/lib/opencode/feature-routes-runtime.js +5 -0
  100. package/dist/assets/AssistantView-CKmIS1cS.js +0 -2
  101. package/dist/assets/Icon-CkzzhaLr.js +0 -1
  102. package/dist/assets/MarkdownRenderer-CLQ4Z8Z0.js +0 -2
  103. package/dist/assets/MobileDetailNavigation-BGaAyuBH.js +0 -1
  104. package/dist/assets/MobileShareBridge-BAZoyeIP.js +0 -4
  105. package/dist/assets/MobileSurface-BVb3xNWt.js +0 -2
  106. package/dist/assets/SettingsView-CkQ61pbr.js +0 -25
  107. package/dist/assets/insertionBoundaries-BMhzPFft.js +0 -4
  108. package/dist/assets/main-BjeOhdcG.js +0 -169
  109. package/dist/assets/miniChat-BYrjYEXJ.js +0 -2
  110. package/dist/assets/mobile-BVMNnPK2.js +0 -2
  111. package/dist/assets/platform-DzsGqlGW.js +0 -2
  112. package/dist/assets/renderElectronMiniChatApp-COwia8Cs.js +0 -2
  113. package/dist/assets/renderMobileApp-CXwwpY1t.js +0 -28
  114. package/dist/assets/runtimeEndpointReset-BkAQXmXJ.js +0 -147
  115. package/dist/assets/sessionChangeSummary-DQDZ5HW-.js +0 -1
  116. package/dist/assets/sessionLookup-Imc995rW.js +0 -1
  117. package/dist/assets/src-AA-5nXsF.css +0 -2
  118. package/dist/assets/useDesktopWindowControlsLayout-C5hZD1co.js +0 -1
  119. package/dist/assets/useMobileNavigationStore-CYbDxRTM.js +0 -413
  120. package/dist/assets/useSessionAutoCleanup-BGy9_AhN.js +0 -2
@@ -1 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{nt as t,rt as n}from"./vendor-base-ui-CnHfUmDN.js";import{t as r}from"./utils-BHTVlVov.js";var i=e(n(),1),a={add:`<path d="M5 12h14" /> <path d="M12 5v14" />`,"add-circle":`<circle cx="12" cy="12" r="10" /> <path d="M8 12h8" /> <path d="M12 8v8" />`,"ai-agent":`<path d="M12 8V4H8" /> <rect width="16" height="12" x="4" y="8" rx="2" /> <path d="M2 14h2" /> <path d="M20 14h2" /> <path d="M15 13v2" /> <path d="M9 13v2" />`,"ai-agent-fill":`<path d="M12 8V4H8" fill="currentColor"/> <rect width="16" height="12" x="4" y="8" rx="2" /> <path d="M2 14h2" fill="currentColor"/> <path d="M20 14h2" fill="currentColor"/> <path d="M15 13v2" fill="currentColor"/> <path d="M9 13v2" fill="currentColor"/>`,"ai-generate-2":`<path d="m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72" /> <path d="m14 7 3 3" /> <path d="M5 6v4" /> <path d="M19 14v4" /> <path d="M10 2v2" /> <path d="M7 8H3" /> <path d="M21 16h-4" /> <path d="M11 3H9" />`,alert:`<circle cx="12" cy="12" r="10" /> <line x1="12" x2="12" y1="8" y2="12" /> <line x1="12" x2="12.01" y1="16" y2="16" />`,"alert-fill":`<path d="M12.8659 3.00017L22.3922 19.5002C22.6684 19.9785 22.5045 20.5901 22.0262 20.8662C21.8742 20.954 21.7017 21.0002 21.5262 21.0002H2.47363C1.92135 21.0002 1.47363 20.5525 1.47363 20.0002C1.47363 19.8246 1.51984 19.6522 1.60761 19.5002L11.1339 3.00017C11.41 2.52187 12.0216 2.358 12.4999 2.63414C12.6519 2.72191 12.7782 2.84815 12.8659 3.00017ZM10.9999 16.0002V18.0002H12.9999V16.0002H10.9999ZM10.9999 9.00017V14.0002H12.9999V9.00017H10.9999Z" fill="currentColor"/>`,"align-justify":`<path d="M3 5h18" /> <path d="M3 12h18" /> <path d="M3 19h18" />`,apple:`<path d="M12 6.528V3a1 1 0 0 1 1-1h0" /> <path d="M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21" />`,"apps-2-ai":`<rect width="7" height="7" x="3" y="3" rx="1" /> <rect width="7" height="7" x="14" y="3" rx="1" /> <rect width="7" height="7" x="14" y="14" rx="1" /> <rect width="7" height="7" x="3" y="14" rx="1" />`,archive:`<rect width="20" height="5" x="2" y="3" rx="1" /> <path d="M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8" /> <path d="M10 12h4" />`,"archive-stack":`<rect width="20" height="5" x="2" y="3" rx="1" /> <path d="M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8" /> <path d="M10 12h4" />`,"arrow-down":`<path d="M12 5v14" /> <path d="m19 12-7 7-7-7" />`,"arrow-down-s":`<path d="m6 9 6 6 6-6" />`,"arrow-go-back":`<path d="M9 14 4 9l5-5" /><path d="M4 9h10.5a5.5 5.5 0 0 1 0 11H12" />`,"arrow-go-forward":`<path d="m15 14 5-5-5-5" /> <path d="M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13" />`,"arrow-left":`<path d="m12 19-7-7 7-7" /> <path d="M19 12H5" />`,"arrow-left-long":`<path d="m12 19-7-7 7-7" /> <path d="M19 12H5" />`,"arrow-left-right":`<path d="M8 7H3v5" /><path d="m3 7 7 7" /><path d="M16 17h5v-5" /><path d="m21 17-7-7" />`,"arrow-left-s":`<path d="m15 18-6-6 6-6" />`,"arrow-right":`<path d="M5 12h14" /> <path d="m12 5 7 7-7 7" />`,"arrow-right-s":`<path d="m9 18 6-6-6-6" />`,"arrow-up":`<path d="m5 12 7-7 7 7" /> <path d="M12 19V5" />`,"arrow-up-double":`<path d="m17 11-5-5-5 5" /> <path d="m17 18-5-5-5 5" />`,"arrow-up-s":`<path d="m18 15-6-6-6 6" />`,"attachment-2":`<path d="m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551" />`,"bar-chart-2":`<path d="M3 3v16a2 2 0 0 0 2 2h16" /> <path d="M18 17V9" /> <path d="M13 17V5" /> <path d="M8 17v-3" />`,"bar-chart-box":`<path d="M3 3v16a2 2 0 0 0 2 2h16" /> <path d="M18 17V9" /> <path d="M13 17V5" /> <path d="M8 17v-3" />`,book:`<path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" />`,"book-open":`<path d="M12 7v14" /> <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" />`,booklet:`<path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" />`,brain:`<path d="M12 18V5" /> <path d="M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4" /> <path d="M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5" /> <path d="M17.997 5.125a4 4 0 0 1 2.526 5.77" /> <path d="M18 18a4 4 0 0 0 2-7.464" /> <path d="M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517" /> <path d="M6 18a4 4 0 0 1-2-7.464" /> <path d="M6.003 5.125a4 4 0 0 0-2.526 5.77" />`,"brain-ai-3":`<path d="M12 18V5" /> <path d="M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4" /> <path d="M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5" /> <path d="M17.997 5.125a4 4 0 0 1 2.526 5.77" /> <path d="M18 18a4 4 0 0 0 2-7.464" /> <path d="M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517" /> <path d="M6 18a4 4 0 0 1-2-7.464" /> <path d="M6.003 5.125a4 4 0 0 0-2.526 5.77" />`,briefcase:`<path d="M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16" /> <rect width="20" height="14" x="2" y="6" rx="2" />`,bug:`<path d="M12 20v-9" /> <path d="M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z" /> <path d="M14.12 3.88 16 2" /> <path d="M21 21a4 4 0 0 0-3.81-4" /> <path d="M21 5a4 4 0 0 1-3.55 3.97" /> <path d="M22 13h-4" /> <path d="M3 21a4 4 0 0 1 3.81-4" /> <path d="M3 5a4 4 0 0 0 3.55 3.97" /> <path d="M6 13H2" /> <path d="m8 2 1.88 1.88" /> <path d="M9 7.13V6a3 3 0 1 1 6 0v1.13" />`,calendar:`<path d="M8 2v4" /> <path d="M16 2v4" /> <rect width="18" height="18" x="3" y="4" rx="2" /> <path d="M3 10h18" />`,"calendar-schedule":`<path d="M16 14v2.2l1.6 1" /> <path d="M16 2v4" /> <path d="M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5" /> <path d="M3 10h5" /> <path d="M8 2v4" /> <circle cx="16" cy="16" r="6" />`,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" /> <circle cx="12" cy="13" r="3" />`,"chat-1":`<path d="M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" />`,"chat-3":`<path d="M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" />`,"chat-4":`<path d="M12 3a9 9 0 0 1 7.45 14.05L21 21l-4.05-1.55A9 9 0 1 1 12 3Z" />`,"chat-ai-3":`<path d="M12 6V2H8" /> <path d="M15 11v2" /> <path d="M2 12h2" /> <path d="M20 12h2" /> <path d="M20 16a2 2 0 0 1-2 2H8.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 4 20.286V8a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2z" /> <path d="M9 11v2" />`,"chat-history":`<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" /> <path d="M3 3v5h5" /> <path d="M12 7v5l4 2" />`,"chat-new":`<path d="M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" /> <path d="M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z" />`,"chat-thread":`<path d="M10.5 7C11.3 4.9 13.1 3.5 15.25 3.5c3.45 0 6.25 2.45 6.25 5.5 0 1.13-.38 2.18-1.03 3.06l.58 2.14-2.3-.75c-.4.18-.8.32-1.2.43" /><path d="M8.5 8.25c-3.6 0-6.5 2.55-6.5 5.75 0 1.21.42 2.33 1.13 3.25l-.63 2.27 2.48-.8c1.04.56 2.24.88 3.52.88 3.6 0 6.5-2.55 6.5-5.75S12.1 8.25 8.5 8.25Z" />`,check:`<path d="M20 6 9 17l-5-5" />`,checkbox:`<rect width="18" height="18" x="3" y="3" rx="2" /> <path d="m9 12 2 2 4-4" />`,"checkbox-blank":`<rect width="18" height="18" x="3" y="3" rx="2" />`,"checkbox-blank-circle-fill":`<circle cx="12" cy="12" r="10" fill="currentColor"/>`,"checkbox-circle":`<circle cx="12" cy="12" r="10" /> <path d="m9 12 2 2 4-4" />`,"checkbox-circle-fill":`<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM17.4571 9.45711L11 15.9142L6.79289 11.7071L8.20711 10.2929L11 13.0858L16.0429 8.04289L17.4571 9.45711Z" fill="currentColor"/>`,"checkbox-multiple":`<path d="m12 15 2 2 4-4" /> <rect width="14" height="14" x="8" y="8" rx="2" ry="2" /> <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />`,clipboard:`<rect width="8" height="4" x="8" y="2" rx="1" ry="1" /> <path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" />`,close:`<path d="M18 6 6 18" /> <path d="m6 6 12 12" />`,"close-circle":`<circle cx="12" cy="12" r="10" /> <path d="m15 9-6 6" /> <path d="m9 9 6 6" />`,cloud:`<path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z" />`,"cloud-off":`<path d="M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057" /> <path d="M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78" /> <path d="m2 2 20 20" />`,code:`<path d="m16 18 6-6-6-6" /> <path d="m8 6-6 6 6 6" />`,"code-ai":`<path d="m16 18 6-6-6-6" /> <path d="m8 6-6 6 6 6" />`,"code-box":`<path d="m18 16 4-4-4-4" /> <path d="m6 8-4 4 4 4" /> <path d="m14.5 4-5 16" />`,"code-sslash":`<path d="m16 18 6-6-6-6" /> <path d="m8 6-6 6 6 6" />`,command:`<path d="M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3" />`,"compass-3":`<circle cx="12" cy="12" r="10" /> <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" />`,computer:`<rect width="20" height="14" x="2" y="3" rx="2" /> <line x1="8" x2="16" y1="21" y2="21" /> <line x1="12" x2="12" y1="17" y2="21" />`,"contract-up-down":`<path d="m7 20 5-5 5 5" /> <path d="m7 4 5 5 5-5" />`,"corner-down-left":`<path d="M20 4v7a4 4 0 0 1-4 4H4" /> <path d="m9 10-5 5 5 5" />`,cursor:`<path d="M12.586 12.586 19 19" /> <path d="M3.688 3.037a.497.497 0 0 0-.651.651l6.5 15.999a.501.501 0 0 0 .947-.062l1.569-6.083a2 2 0 0 1 1.448-1.479l6.124-1.579a.5.5 0 0 0 .063-.947z" />`,"database-2":`<ellipse cx="12" cy="5" rx="9" ry="3" /> <path d="M3 5V19A9 3 0 0 0 21 19V5" /> <path d="M3 12A9 3 0 0 0 21 12" />`,"delete-bin":`<path d="M10 11v6" /> <path d="M14 11v6" /> <path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" /> <path d="M3 6h18" /> <path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />`,"discord-fill":`<path d="M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719" fill="currentColor"/>`,"donut-chart":`<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" /> <path d="M21.21 15.89A10 10 0 1 1 8 2.83" />`,"donut-chart-fill":`<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" fill="currentColor"/> <path d="M21.21 15.89A10 10 0 1 1 8 2.83" fill="currentColor"/>`,download:`<path d="M12 15V3" /> <path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /> <path d="m7 10 5 5 5-5" />`,"download-cloud":`<path d="M12 13v8l-4-4" /> <path d="m12 21 4-4" /> <path d="M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284" />`,"drag-move-2":`<circle cx="9" cy="12" r="1" /> <circle cx="9" cy="5" r="1" /> <circle cx="9" cy="19" r="1" /> <circle cx="15" cy="12" r="1" /> <circle cx="15" cy="5" r="1" /> <circle cx="15" cy="19" r="1" />`,draggable:`<circle cx="9" cy="12" r="1" /> <circle cx="9" cy="5" r="1" /> <circle cx="9" cy="19" r="1" /> <circle cx="15" cy="12" r="1" /> <circle cx="15" cy="5" r="1" /> <circle cx="15" cy="19" r="1" />`,earth:`<circle cx="12" cy="12" r="10" /> <path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" /> <path d="M2 12h20" />`,edit:`<path d="M15 5.5 18.5 9" /><path d="M4.5 19.5 5.75 14.75 15.25 5.25a2.1 2.1 0 0 1 3 0l.5.5a2.1 2.1 0 0 1 0 3L9.25 18.25Z" />`,"edit-2":`<path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" />`,"emotion-happy":`<circle cx="12" cy="12" r="10" /> <path d="M8 14s1.5 2 4 2 4-2 4-2" /> <line x1="9" x2="9.01" y1="9" y2="9" /> <line x1="15" x2="15.01" y1="9" y2="9" />`,"equalizer-2":`<path d="M10 5H3" /> <path d="M12 19H3" /> <path d="M14 3v4" /> <path d="M16 17v4" /> <path d="M21 12h-9" /> <path d="M21 19h-5" /> <path d="M21 5h-7" /> <path d="M8 10v4" /> <path d="M8 12H3" />`,"error-warning":`<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" /> <path d="M12 9v4" /> <path d="M12 17h.01" />`,"error-warning-fill":`<path d="M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM11 15V17H13V15H11ZM11 7V13H13V7H11Z" fill="currentColor"/>`,"expand-up-down":`<path d="m7 15 5 5 5-5" /> <path d="m7 9 5-5 5 5" />`,"external-link":`<path d="M15 3h6v6" /> <path d="M10 14 21 3" /> <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />`,eye:`<path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" /> <circle cx="12" cy="12" r="3" />`,"eye-off":`<path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" /> <path d="M14.084 14.158a3 3 0 0 1-4.242-4.242" /> <path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" /> <path d="m2 2 20 20" />`,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" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" />`,"file-add":`<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" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M9 15h6" /> <path d="M12 18v-6" />`,"file-check":`<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" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="m9 15 2 2 4-4" />`,"file-check-fill":`<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" fill="currentColor"/> <path d="M14 2v5a1 1 0 0 0 1 1h5" fill="currentColor"/> <path d="m9 15 2 2 4-4" fill="currentColor"/>`,"file-code":`<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" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M10 12.5 8 15l2 2.5" /> <path d="m14 12.5 2 2.5-2 2.5" />`,"file-copy":`<rect width="14" height="14" x="8" y="8" rx="3.5" ry="3.5" /><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />`,"file-copy-2":`<path d="M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8" /> <path d="M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z" /> <path d="M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1" />`,"file-download":`<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" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M12 18v-6" /> <path d="m9 15 3 3 3-3" />`,"file-edit":`<path d="M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z" />`,"file-image":`<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" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <circle cx="10" cy="12" r="2" /> <path d="m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22" />`,"file-list-2":`<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" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M10 9H8" /> <path d="M16 13H8" /> <path d="M16 17H8" />`,"file-music":`<path d="M11.65 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v10.35" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M8 20v-7l3 1.474" /> <circle cx="6" cy="20" r="2" />`,"file-pdf":`<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" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M10 9H8" /> <path d="M16 13H8" /> <path d="M16 17H8" />`,"file-search":`<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" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <circle cx="11.5" cy="14.5" r="2.5" /> <path d="M13.3 16.3 15 18" />`,"file-text":`<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" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M10 9H8" /> <path d="M16 13H8" /> <path d="M16 17H8" />`,"file-transfer":`<path d="M4 11V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-1" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M2 15h10" /> <path d="m9 18 3-3-3-3" />`,"file-video":`<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" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M15.033 13.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56v-4.704a.645.645 0 0 1 .967-.56z" />`,flashlight:`<path d="M12 13v1" /> <path d="M17 2a1 1 0 0 1 1 1v4a3 3 0 0 1-.6 1.8l-.6.8A4 4 0 0 0 16 12v8a2 2 0 0 1-2 2H10a2 2 0 0 1-2-2v-8a4 4 0 0 0-.8-2.4l-.6-.8A3 3 0 0 1 6 7V3a1 1 0 0 1 1-1z" /> <path d="M6 6h12" />`,flask:`<path d="M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2" /> <path d="M6.453 15h11.094" /> <path d="M8.5 2h7" />`,"fold-vertical":`<path d="M12 22v-6" /> <path d="M12 8V2" /> <path d="M4 12H2" /> <path d="M10 12H8" /> <path d="M16 12h-2" /> <path d="M22 12h-2" /> <path d="m15 19-3-3-3 3" /> <path d="m15 5-3 3-3-3" />`,folder:`<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" />`,"folder-3":`<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" />`,"folder-3-fill":`<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" />`,"folder-6":`<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" />`,"folder-add":`<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" /><path d="M12 11v6" /><path d="M9 14h6" />`,"folder-open":`<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" />`,"folder-open-fill":`<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" />`,"folder-received":`<path d="M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1" /> <path d="M2 13h10" /> <path d="m9 16 3-3-3-3" />`,folders:`<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" />`,fullscreen:`<path d="M8 3H5a2 2 0 0 0-2 2v3" /> <path d="M21 8V5a2 2 0 0 0-2-2h-3" /> <path d="M3 16v3a2 2 0 0 0 2 2h3" /> <path d="M16 21h3a2 2 0 0 0 2-2v-3" />`,"fullscreen-exit":`<path d="M8 3v3a2 2 0 0 1-2 2H3" /> <path d="M21 8h-3a2 2 0 0 1-2-2V3" /> <path d="M3 16h3a2 2 0 0 1 2 2v3" /> <path d="M16 21v-3a2 2 0 0 1 2-2h3" />`,gamepad:`<line x1="6" x2="10" y1="11" y2="11" /> <line x1="8" x2="8" y1="9" y2="13" /> <line x1="15" x2="15.01" y1="12" y2="12" /> <line x1="18" x2="18.01" y1="10" y2="10" /> <path d="M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z" />`,"git-branch":`<circle cx="18" cy="6" r="2.6" /><circle cx="6" cy="18" r="2.6" /><path d="M6 15.4V3" /><path d="M18 8.6c0 4.6-3.4 7.4-9.4 8" />`,"git-close-pull-request":`<circle cx="6" cy="6" r="3" /> <path d="M6 9v12" /> <path d="m21 3-6 6" /> <path d="m21 9-6-6" /> <path d="M18 11.5V15" /> <circle cx="18" cy="18" r="3" />`,"git-commit":`<circle cx="12" cy="12" r="3" /> <line x1="3" x2="9" y1="12" y2="12" /> <line x1="15" x2="21" y1="12" y2="12" />`,"git-merge":`<circle cx="18" cy="18" r="3" /> <circle cx="6" cy="6" r="3" /> <path d="M6 21V9a9 9 0 0 0 9 9" />`,"git-pr-draft":`<circle cx="18" cy="18" r="3" /> <circle cx="6" cy="6" r="3" /> <path d="M18 6V5" /> <path d="M18 11v-1" /> <line x1="6" x2="6" y1="9" y2="21" />`,"git-pull-request":`<circle cx="18" cy="18" r="3" /> <circle cx="6" cy="6" r="3" /> <path d="M13 6h3a2 2 0 0 1 2 2v7" /> <line x1="6" x2="6" y1="9" y2="21" />`,"git-repository":`<path d="M18 19a5 5 0 0 1-5-5v8" /> <path d="M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5" /> <circle cx="13" cy="12" r="2" /> <circle cx="20" cy="19" r="2" />`,github:`<path d="M5.88401 18.6533C5.58404 18.4526 5.32587 18.1975 5.0239 17.8369C4.91473 17.7065 4.47283 17.1524 4.55811 17.2583C4.09533 16.6833 3.80296 16.417 3.50156 16.3089C2.9817 16.1225 2.7114 15.5499 2.89784 15.0301C3.08428 14.5102 3.65685 14.2399 4.17672 14.4263C4.92936 14.6963 5.43847 15.1611 6.12425 16.0143C6.03025 15.8974 6.46364 16.441 6.55731 16.5529C6.74784 16.7804 6.88732 16.9182 6.99629 16.9911C7.20118 17.1283 7.58451 17.1874 8.14709 17.1311C8.17065 16.7489 8.24136 16.3783 8.34919 16.0358C5.38097 15.3104 3.70116 13.3952 3.70116 9.63971C3.70116 8.40085 4.0704 7.28393 4.75917 6.3478C4.5415 5.45392 4.57433 4.37284 5.06092 3.15636C5.1725 2.87739 5.40361 2.66338 5.69031 2.57352C5.77242 2.54973 5.81791 2.53915 5.89878 2.52673C6.70167 2.40343 7.83573 2.69705 9.31449 3.62336C10.181 3.41879 11.0885 3.315 12.0012 3.315C12.9129 3.315 13.8196 3.4186 14.6854 3.62277C16.1619 2.69 17.2986 2.39649 18.1072 2.52651C18.1919 2.54013 18.2645 2.55783 18.3249 2.57766C18.6059 2.66991 18.8316 2.88179 18.9414 3.15636C19.4279 4.37256 19.4608 5.45344 19.2433 6.3472C19.9342 7.28337 20.3012 8.39208 20.3012 9.63971C20.3012 13.3968 18.627 15.3048 15.6588 16.032C15.7837 16.447 15.8496 16.9105 15.8496 17.4121C15.8496 18.0765 15.8471 18.711 15.8424 19.4225C15.8412 19.6127 15.8397 19.8159 15.8375 20.1281C16.2129 20.2109 16.5229 20.5077 16.6031 20.9089C16.7114 21.4504 16.3602 21.9773 15.8186 22.0856C14.6794 22.3134 13.8353 21.5538 13.8353 20.5611C13.8353 20.4708 13.836 20.3417 13.8375 20.1145C13.8398 19.8015 13.8412 19.599 13.8425 19.4094C13.8471 18.7019 13.8496 18.0716 13.8496 17.4121C13.8496 16.7148 13.6664 16.2602 13.4237 16.051C12.7627 15.4812 13.0977 14.3973 13.965 14.2999C16.9314 13.9666 18.3012 12.8177 18.3012 9.63971C18.3012 8.68508 17.9893 7.89571 17.3881 7.23559C17.1301 6.95233 17.0567 6.54659 17.199 6.19087C17.3647 5.77663 17.4354 5.23384 17.2941 4.57702L17.2847 4.57968C16.7928 4.71886 16.1744 5.0198 15.4261 5.5285C15.182 5.69438 14.8772 5.74401 14.5932 5.66413C13.7729 5.43343 12.8913 5.315 12.0012 5.315C11.111 5.315 10.2294 5.43343 9.40916 5.66413C9.12662 5.74359 8.82344 5.69492 8.57997 5.53101C7.8274 5.02439 7.2056 4.72379 6.71079 4.58376C6.56735 5.23696 6.63814 5.77782 6.80336 6.19087C6.94565 6.54659 6.87219 6.95233 6.61423 7.23559C6.01715 7.8912 5.70116 8.69376 5.70116 9.63971C5.70116 12.8116 7.07225 13.9683 10.023 14.2999C10.8883 14.3971 11.2246 15.4769 10.5675 16.0482C10.3751 16.2156 10.1384 16.7802 10.1384 17.4121V20.5611C10.1384 21.5474 9.30356 22.2869 8.17878 22.09C7.63476 21.9948 7.27093 21.4766 7.36613 20.9326C7.43827 20.5204 7.75331 20.2116 8.13841 20.1276V19.1381C7.22829 19.1994 6.47656 19.0498 5.88401 18.6533Z" fill="currentColor"/>`,"github-fill":`<path d="M12.001 2C6.47598 2 2.00098 6.475 2.00098 12C2.00098 16.425 4.86348 20.1625 8.83848 21.4875C9.33848 21.575 9.52598 21.275 9.52598 21.0125C9.52598 20.775 9.51348 19.9875 9.51348 19.15C7.00098 19.6125 6.35098 18.5375 6.15098 17.975C6.03848 17.6875 5.55098 16.8 5.12598 16.5625C4.77598 16.375 4.27598 15.9125 5.11348 15.9C5.90098 15.8875 6.46348 16.625 6.65098 16.925C7.55098 18.4375 8.98848 18.0125 9.56348 17.75C9.65098 17.1 9.91348 16.6625 10.201 16.4125C7.97598 16.1625 5.65098 15.3 5.65098 11.475C5.65098 10.3875 6.03848 9.4875 6.67598 8.7875C6.57598 8.5375 6.22598 7.5125 6.77598 6.1375C6.77598 6.1375 7.61348 5.875 9.52598 7.1625C10.326 6.9375 11.176 6.825 12.026 6.825C12.876 6.825 13.726 6.9375 14.526 7.1625C16.4385 5.8625 17.276 6.1375 17.276 6.1375C17.826 7.5125 17.476 8.5375 17.376 8.7875C18.0135 9.4875 18.401 10.375 18.401 11.475C18.401 15.3125 16.0635 16.1625 13.8385 16.4125C14.201 16.725 14.5135 17.325 14.5135 18.2625C14.5135 19.6 14.501 20.675 14.501 21.0125C14.501 21.275 14.6885 21.5875 15.1885 21.4875C19.259 20.1133 21.9999 16.2963 22.001 12C22.001 6.475 17.526 2 12.001 2Z" fill="currentColor"/>`,global:`<circle cx="12" cy="12" r="10" /> <path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" /> <path d="M2 12h20" />`,"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" /> <path d="M22 10v6" /> <path d="M6 12.5V16a6 3 0 0 0 12 0v-3.5" />`,hammer:`<path d="m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9" /> <path d="m18 15 4-4" /> <path d="m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5" />`,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" />`,history:`<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" /> <path d="M3 3v5h5" /> <path d="M12 7v5l4 2" />`,home:`<path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8" /> <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" />`,hourglass:`<path d="M8 3.5h8c.8 0 1.5.7 1.5 1.5 0 2.6-1.8 4.5-3.8 5.9-.4.3-.7.6-.7 1.1s.3.8.7 1.1c2 1.4 3.8 3.3 3.8 5.9 0 .8-.7 1.5-1.5 1.5H8c-.8 0-1.5-.7-1.5-1.5 0-2.6 1.8-4.5 3.8-5.9.4-.3.7-.6.7-1.1s-.3-.8-.7-1.1C8.3 9.5 6.5 7.6 6.5 5c0-.8.7-1.5 1.5-1.5z" />`,"hourglass-fill":`<path d="M5 22h14" fill="currentColor"/> <path d="M5 2h14" fill="currentColor"/> <path d="M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22" fill="currentColor"/> <path d="M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2" fill="currentColor"/>`,"image-download":`<path d="M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21" /> <path d="m14 19 3 3v-5.5" /> <path d="m17 22 3-3" /> <circle cx="9" cy="9" r="2" />`,"inbox-archive":`<rect width="20" height="5" x="2" y="3" rx="1" /> <path d="M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8" /> <path d="M10 12h4" />`,"inbox-unarchive":`<rect width="20" height="5" x="2" y="3" rx="1" /> <path d="M4 8v11a2 2 0 0 0 2 2h2" /> <path d="M20 8v11a2 2 0 0 1-2 2h-2" /> <path d="m9 15 3-3 3 3" /> <path d="M12 12v9" />`,"inbox-unarchive-fill":`<rect width="20" height="5" x="2" y="3" rx="1" /> <path d="M4 8v11a2 2 0 0 0 2 2h2" fill="currentColor"/> <path d="M20 8v11a2 2 0 0 1-2 2h-2" fill="currentColor"/> <path d="m9 15 3-3 3 3" fill="currentColor"/> <path d="M12 12v9" fill="currentColor"/>`,information:`<circle cx="12" cy="12" r="10" /> <path d="M12 16v-4" /> <path d="M12 8h.01" />`,"information-fill":`<path d="M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM11 11V17H13V11H11ZM11 7V9H13V7H11Z" fill="currentColor"/>`,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" /> <path d="m21 2-9.6 9.6" /> <circle cx="7.5" cy="15.5" r="5.5" />`,"layout-column":`<rect width="18" height="18" x="3" y="3" rx="2" /> <path d="M12 3v18" />`,"layout-left":`<rect width="18" height="18" x="3" y="3" rx="2" /> <path d="M9 3v18" />`,"layout-left-rounded":`<rect width="18" height="18" x="3" y="3" rx="4" /><path d="M9.5 3v18" />`,"layout-right":`<rect width="18" height="18" x="3" y="3" rx="2" /> <path d="M15 3v18" />`,leaf:`<path d="M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z" /> <path d="M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12" />`,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" /> <path d="M9 18h6" /> <path d="M10 22h4" />`,"link-unlink-m":`<path d="m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71" /> <path d="m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71" /> <line x1="8" x2="8" y1="2" y2="5" /> <line x1="2" x2="5" y1="8" y2="8" /> <line x1="16" x2="16" y1="19" y2="22" /> <line x1="19" x2="22" y1="16" y2="16" />`,"list-check-2":`<path d="M13 5h8" /> <path d="M13 12h8" /> <path d="M13 19h8" /> <path d="m3 17 2 2 4-4" /> <path d="m3 7 2 2 4-4" />`,"list-check-3":`<path d="M13 5h8" /> <path d="M13 12h8" /> <path d="M13 19h8" /> <path d="m3 17 2 2 4-4" /> <rect x="3" y="4" width="6" height="6" rx="1" />`,"list-unordered":`<path d="M3 5h.01" /> <path d="M3 12h.01" /> <path d="M3 19h.01" /> <path d="M8 5h13" /> <path d="M8 12h13" /> <path d="M8 19h13" />`,loader:`<path d="M12 2v4" /> <path d="m16.2 7.8 2.9-2.9" /> <path d="M18 12h4" /> <path d="m16.2 16.2 2.9 2.9" /> <path d="M12 18v4" /> <path d="m4.9 19.1 2.9-2.9" /> <path d="M2 12h4" /> <path d="m4.9 4.9 2.9 2.9" />`,"loader-4":`<path d="M21 12a9 9 0 1 1-6.219-8.56" />`,lock:`<rect width="18" height="11" x="3" y="11" rx="2" ry="2" /> <path d="M7 11V7a5 5 0 0 1 10 0v4" />`,"lock-2":`<rect width="18" height="11" x="3" y="11" rx="2" ry="2" /> <path d="M7 11V7a5 5 0 0 1 10 0v4" />`,"lock-unlock":`<rect width="18" height="11" x="3" y="11" rx="2" ry="2" /> <path d="M7 11V7a5 5 0 0 1 9.9-1" />`,"loop-right-ai":`<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" /> <path d="M21 3v5h-5" /> <path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" /> <path d="M8 16H3v5" />`,macbook:`<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" /> <path d="M20.054 15.987H3.946" />`,"menu-2":`<path d="M4 5h16" /> <path d="M4 12h16" /> <path d="M4 19h16" />`,"menu-fold-2":`<rect width="18" height="18" x="3" y="3" rx="2" /> <path d="M9 3v18" /> <path d="m16 15-3-3 3-3" />`,"menu-search":`<path d="m21 21-4.34-4.34" /> <circle cx="11" cy="11" r="8" />`,mic:`<path d="M12 19v3" /> <path d="M19 10v2a7 7 0 0 1-14 0v-2" /> <rect x="9" y="2" width="6" height="13" rx="3" />`,more:`<circle cx="12" cy="12" r="1" /> <circle cx="19" cy="12" r="1" /> <circle cx="5" cy="12" r="1" />`,"more-2":`<circle cx="12" cy="12" r="1" /> <circle cx="19" cy="12" r="1" /> <circle cx="5" cy="12" r="1" />`,"more-2-fill":`<circle cx="12" cy="12" r="1" fill="currentColor"/> <circle cx="19" cy="12" r="1" fill="currentColor"/> <circle cx="5" cy="12" r="1" fill="currentColor"/>`,music:`<path d="M9 18V5l12-2v13" /> <circle cx="6" cy="18" r="3" /> <circle cx="18" cy="16" r="3" />`,"node-tree":`<rect x="16" y="16" width="6" height="6" rx="1" /> <rect x="2" y="16" width="6" height="6" rx="1" /> <rect x="9" y="2" width="6" height="6" rx="1" /> <path d="M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3" /> <path d="M12 12V8" />`,"notification-3":`<path d="M10.268 21a2 2 0 0 0 3.464 0" /> <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" />`,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" /> <circle cx="13.5" cy="6.5" r=".5" fill="currentColor" /> <circle cx="17.5" cy="10.5" r=".5" fill="currentColor" /> <circle cx="6.5" cy="12.5" r=".5" fill="currentColor" /> <circle cx="8.5" cy="7.5" r=".5" fill="currentColor" />`,pause:`<path d="M6 5H8V19H6V5ZM16 5H18V19H16V5Z" fill="currentColor"/>`,pencil:`<path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" /> <path d="m15 5 4 4" />`,"pencil-ai":`<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" /> <path d="M20 2v4" /> <path d="M22 4h-4" /> <circle cx="4" cy="20" r="2" />`,"pencil-ai-2":`<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" /> <path d="M20 2v4" /> <path d="M22 4h-4" /> <circle cx="4" cy="20" r="2" />`,"picture-in-picture-2":`<path d="M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4" /> <rect width="10" height="7" x="12" y="13" rx="2" />`,"pie-chart":`<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" /> <path d="M21.21 15.89A10 10 0 1 1 8 2.83" />`,play:`<path d="M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z" />`,"play-list-add":`<path d="M16 5H3" /> <path d="M11 12H3" /> <path d="M16 19H3" /> <path d="M18 9v6" /> <path d="M21 12h-6" />`,plug:`<path d="M12 22v-5" /> <path d="M15 8V2" /> <path d="M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z" /> <path d="M9 8V2" />`,"plug-2":`<path d="M12 22v-5" /> <path d="M15 8V2" /> <path d="M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z" /> <path d="M9 8V2" />`,pulse:`<path d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2" />`,pushpin:`<path d="M12 17v5" /> <path d="M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z" />`,"pushpin-2":`<path d="M12 17v5" /> <path d="M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z" />`,"pushpin-2-fill":`<path d="M22.3126 10.1753L20.8984 11.5895L20.1913 10.8824L15.9486 15.125L15.2415 18.6606L13.8273 20.0748L9.58466 15.8321L4.63492 20.7819L3.2207 19.3677L8.17045 14.4179L3.92781 10.1753L5.34202 8.76107L8.87756 8.05396L13.1202 3.81132L12.4131 3.10422L13.8273 1.69L22.3126 10.1753Z" fill="currentColor" />`,question:`<circle cx="12" cy="12" r="10" /> <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" /> <path d="M12 17h.01" />`,"record-circle":`<circle cx="12" cy="12" r="10" /> <circle cx="12" cy="12" r="1" />`,refresh:`<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" /> <path d="M21 3v5h-5" /> <path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" /> <path d="M8 16H3v5" />`,restart:`<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" /> <path d="M3 3v5h5" />`,robot:`<path d="M12 8V4H8" /> <rect width="16" height="12" x="4" y="8" rx="2" /> <path d="M2 14h2" /> <path d="M20 14h2" /> <path d="M15 13v2" /> <path d="M9 13v2" />`,"robot-2":`<path d="M12 8V4H8" /> <rect width="16" height="12" x="4" y="8" rx="2" /> <path d="M2 14h2" /> <path d="M20 14h2" /> <path d="M15 13v2" /> <path d="M9 13v2" />`,rocket:`<path d="M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5" /> <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" /> <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" /> <path d="M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05" />`,"save-3":`<path d="M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z" /> <path d="M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7" /> <path d="M7 3v4a1 1 0 0 0 1 1h7" />`,"scales-3":`<path d="M12 3v18" /> <path d="m19 8 3 8a5 5 0 0 1-6 0zV7" /> <path d="M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1" /> <path d="m5 8 3 8a5 5 0 0 1-6 0zV7" /> <path d="M7 21h10" />`,"scan-2":`<path d="M3 7V5a2 2 0 0 1 2-2h2" /> <path d="M17 3h2a2 2 0 0 1 2 2v2" /> <path d="M21 17v2a2 2 0 0 1-2 2h-2" /> <path d="M7 21H5a2 2 0 0 1-2-2v-2" />`,scissors:`<circle cx="6" cy="6" r="3" /> <path d="M8.12 8.12 12 12" /> <path d="M20 4 8.12 15.88" /> <circle cx="6" cy="18" r="3" /> <path d="M14.8 14.8 20 20" />`,search:`<path d="m21 21-4.34-4.34" /> <circle cx="11" cy="11" r="8" />`,"search-eye":`<path d="M3 7V5a2 2 0 0 1 2-2h2" /> <path d="M17 3h2a2 2 0 0 1 2 2v2" /> <path d="M21 17v2a2 2 0 0 1-2 2h-2" /> <path d="M7 21H5a2 2 0 0 1-2-2v-2" /> <circle cx="12" cy="12" r="3" /> <path d="m16 16-1.9-1.9" />`,"send-plane":`<path d="M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z" /> <path d="m21.854 2.147-10.94 10.939" />`,"send-plane-2":`<path d="M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z" /> <path d="M6 12h16" />`,server:`<rect width="20" height="8" x="2" y="2" rx="2" ry="2" /> <rect width="20" height="8" x="2" y="14" rx="2" ry="2" /> <line x1="6" x2="6.01" y1="6" y2="6" /> <line x1="6" x2="6.01" y1="18" y2="18" />`,"settings-3":`<path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" /> <circle cx="12" cy="12" r="3" />`,"share-2":`<path d="M12 2v13" /> <path d="m16 6-4-4-4 4" /> <path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8" />`,shield:`<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" />`,"shield-check":`<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" /> <path d="m9 12 2 2 4-4" />`,"shield-keyhole":`<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" />`,"shield-user":`<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" /> <path d="M6.376 18.91a6 6 0 0 1 11.249.003" /> <circle cx="12" cy="11" r="4" />`,shuffle:`<path d="m18 14 4 4-4 4" /> <path d="m18 2 4 4-4 4" /> <path d="M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22" /> <path d="M2 6h1.972a4 4 0 0 1 3.6 2.2" /> <path d="M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45" />`,"slash-commands-2":`<path d="M12 19h8" /> <path d="m4 17 6-6-6-6" />`,smartphone:`<rect width="14" height="20" x="5" y="2" rx="2" ry="2" /> <path d="M12 18h.01" />`,sparkling:`<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" /> <path d="M20 2v4" /> <path d="M22 4h-4" /> <circle cx="4" cy="20" r="2" />`,"split-cells-horizontal":`<path d="M8 19H5c-1 0-2-1-2-2V7c0-1 1-2 2-2h3" /> <path d="M16 5h3c1 0 2 1 2 2v10c0 1-1 2-2 2h-3" /> <line x1="12" x2="12" y1="4" y2="20" />`,stack:`<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" /> <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" /> <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" />`,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" />`,"star-fill":`<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" fill="currentColor"/>`,"sticky-note":`<path d="M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z" /> <path d="M15 3v5a1 1 0 0 0 1 1h5" />`,stop:`<rect width="18" height="18" x="3" y="3" rx="2" />`,"stop-circle":`<circle cx="12" cy="12" r="9" /><rect x="9.25" y="9.25" width="5.5" height="5.5" rx="1.25" />`,subtract:`<path d="M5 12h14" />`,survey:`<rect width="8" height="4" x="8" y="2" rx="1" ry="1" /> <path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" /> <path d="M12 11h4" /> <path d="M12 16h4" /> <path d="M8 11h.01" /> <path d="M8 16h.01" />`,target:`<circle cx="12" cy="12" r="10" /> <circle cx="12" cy="12" r="6" /> <circle cx="12" cy="12" r="2" />`,task:`<path d="M21.801 10A10 10 0 1 1 17 3.335" /> <path d="m9 11 3 3L22 4" />`,terminal:`<path d="M12 19h8" /> <path d="m4 17 6-6-6-6" />`,"terminal-box":`<path d="M12 19h8" /> <path d="m4 17 6-6-6-6" />`,"terminal-window":`<path d="m7 11 2-2-2-2" /> <path d="M11 13h4" /> <rect width="18" height="18" x="3" y="3" rx="2" ry="2" />`,text:`<path d="M12 4v16" /> <path d="M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2" /> <path d="M9 20h6" />`,"text-wrap":`<path d="m16 16-3 3 3 3" /> <path d="M3 12h14.5a1 1 0 0 1 0 7H13" /> <path d="M3 19h6" /> <path d="M3 5h18" />`,time:`<circle cx="12" cy="12" r="9" /><path d="M12 7v5.25l3.25 1.75" />`,timer:`<line x1="10" x2="14" y1="2" y2="2" /> <line x1="12" x2="15" y1="14" y2="11" /> <circle cx="12" cy="14" r="8" />`,tools:`<path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z" />`,"twitter-xfill":`<path d="M17.6874 3.0625L12.6907 8.77425L8.37045 3.0625H2.11328L9.58961 12.8387L2.50378 20.9375H5.53795L11.0068 14.6886L15.7863 20.9375H21.8885L14.095 10.6342L20.7198 3.0625H17.6874ZM16.6232 19.1225L5.65436 4.78217H7.45745L18.3034 19.1225H16.6232Z" fill="currentColor"/>`,unpin:`<path d="M12 17v5" /> <path d="M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89" /> <path d="m2 2 20 20" /> <path d="M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11" />`,user:`<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" /> <circle cx="12" cy="7" r="4" />`,"user-3":`<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" /> <circle cx="12" cy="7" r="4" />`,"video-chat":`<path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5" /> <rect x="2" y="6" width="14" height="12" rx="2" />`,"volume-up":`<path d="M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z" /> <path d="M16 9a5 5 0 0 1 0 6" /> <path d="M19.364 18.364a9 9 0 0 0 0-12.728" />`,window:`<rect x="2" y="4" width="20" height="16" rx="2" /> <path d="M10 4v4" /> <path d="M2 8h20" /> <path d="M6 4v4" />`},o=t(),s=`openchamber-icon-sprite-v2`,c=1.5,l=(()=>{let e=2166136261;for(let[t,n]of Object.entries(a)){let r=`${t}:${n};`;for(let t=0;t<r.length;t+=1)e=Math.imul(e^r.charCodeAt(t),16777619)}return(e>>>0).toString(36)})(),u=!1,d=new Set,f=null;function p(e){if(u&&d.has(e)&&f===l||typeof document>`u`)return;let t=document.body;if(!t)return;let n=document.getElementById(s);if(n){let t=new Set(Array.from(n.querySelectorAll(`symbol[id^="oc-"]`),e=>e.id.slice(3)));if(!n.innerHTML.includes(`--oc-icon-stroke`)||n.dataset.spriteSignature!==l||!t.has(e))n.remove();else{u=!0,d=t,f=l;return}}let r=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);r.id=s,r.setAttribute(`aria-hidden`,`true`),r.dataset.spriteSignature=l,r.style.display=`none`,r.innerHTML=Object.entries(a).map(([e,t])=>`<symbol id="oc-${e}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--oc-icon-stroke, ${c})" stroke-linecap="round" stroke-linejoin="round">${t}</symbol>`).join(``),t.insertBefore(r,t.firstChild),u=!0,d=new Set(Object.keys(a)),f=l}var m=i.memo(({name:e,className:t,weight:n=`regular`,style:i,...a})=>{typeof document<`u`&&p(e);let s=n===`medium`?2:c;return(0,o.jsx)(`svg`,{className:r(`oc-icon`,t),viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,stroke:`currentColor`,strokeWidth:s,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,style:{"--oc-icon-stroke":s,...i},...a,children:(0,o.jsx)(`use`,{href:`#oc-${e}`})})});m.displayName=`Icon`;export{m as n,a as r,c as t};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MarkstreamRendererImpl-DXewO7S_.js","assets/rolldown-runtime-C0FnF6B9.js","assets/vendor-base-ui-CnHfUmDN.js","assets/vendor-react-DLPElpoQ.js","assets/vendor-markstream-react-DX55XLGO.js","assets/vendor-aparajita-capacitor-secure-storage-CjQdwfjS.js","assets/vendor-markstream-core-Cm34iPLL.js","assets/vendor-floating-ui-dom-BHhLtF5l.js","assets/vendor-floating-ui-core-Co1I1lFV.js","assets/vendor-reactuses-core-DDoDDyM9.js","assets/vendor-lodash-es-DfLbG5Af.js","assets/vendor-js-cookie-hSOiFTtX.js","assets/useMobileNavigationStore-CYbDxRTM.js","assets/runtime-auth-D66yq6ie.js","assets/runtime-switch-LvWDU-SL.js","assets/runtime-fetch-zIalUnbb.js","assets/persistence-YbQKzHUQ.js","assets/vendor-zustand-B4dlGEM2.js","assets/useUIStore-CxOoCv7B.js","assets/vendor-pathe-vBmvQE8f.js","assets/vendor-tanstack-query-core-BWz0ose6.js","assets/platform-DzsGqlGW.js","assets/vendor-opencode-sdk-C07HQypa.js","assets/vendor-tanstack-react-query-D7pys_c9.js","assets/vendor-sonner-DVzioF3d.js","assets/clipboard-CUasgPiF.js","assets/store-CSnH_QXM.js","assets/useAssistantUIStore-CLPCNoj_.js","assets/vendor-fuse.js-DB5wDJbI.js","assets/utils-BHTVlVov.js","assets/vendor-class-variance-authority-BLUaYARZ.js","assets/vendor-tailwind-merge-BicNWLTg.js","assets/useThemeSystem-DMzWVJaW.js","assets/useRuntimeAPIs-DSLXJybW.js","assets/url-CVhsI9kR.js","assets/useEffectiveDirectory-e9HjIqGz.js","assets/markdownHeightCache-DEjGKLv8.js","assets/dualLimitLru-D8Sphgua.js","assets/MarkdownRendererImpl-2ewbRZE2.js","assets/vendor-katex--B5dHUyk.js","assets/markdownTheme-DOfGg-A7.js","assets/vendor-pierre-diffs-DX7XTPG3.js","assets/vendor-hast-util-to-html-B0p1k5Xa.js","assets/vendor-character-entities-legacy-Wut6vMuj.js","assets/vendor-character-entities-html4-DlN_yAFd.js","assets/vendor-ccount-CyGsA0u7.js","assets/vendor-comma-separated-tokens-B9ouxNNS.js","assets/vendor-oniguruma-to-es-CrHzjjSU.js","assets/vendor-oniguruma-parser-D2DIvhSP.js","assets/vendor-diff-Dq7CZNim.js","assets/vendor-lru_map-DpDied8H.js","assets/markdown-worker-CptoICmq.js","assets/FadeInOnReveal-moBbL8Ll.js","assets/imageSource-BlAJJUEI.js","assets/relay-image-stream-DM7atqJs.js","assets/vendor-morphdom-BbKiNDAu.js","assets/vendor-beautiful-mermaid-DykqIK5D.js","assets/vendor-dompurify-CeJNOzik.js","assets/vendor-marked-WVekxjAN.js","assets/vendor-remend-C3cXc-tf.js","assets/MarkstreamRendererImpl-DKhVy3nF.css"])))=>i.map(i=>d[i]);
2
- import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{a as t}from"./vendor-zustand-B4dlGEM2.js";import{nt as n,rt as r}from"./vendor-base-ui-CnHfUmDN.js";import{o as i}from"./vendor-aparajita-capacitor-secure-storage-CjQdwfjS.js";import{n as a}from"./vendor-react-DLPElpoQ.js";import{t as o}from"./utils-BHTVlVov.js";import{i as s,n as c,t as l}from"./markdownHeightCache-DEjGKLv8.js";var u=a(),d=e(r(),1),f=`openchamber:chunk-import-reload`,p=250,m=3e4,h=[/Importing a module script failed/i,/Failed to fetch dynamically imported module/i,/error loading dynamically imported module/i,/Loading chunk \S+ failed/i,/ChunkLoadError/i];function g(e){if(e instanceof Error)return`${e.name}\n${e.message}\n${e.stack??``}`;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function _(e){let t=g(e);return h.some(e=>e.test(t))}function v(e){return`1.19.13:${g(e).slice(0,500)}`}function y(e){if(typeof window>`u`)return;let t=Date.now(),n=v(e),r=null;try{let e=window.sessionStorage.getItem(f);if(e)try{r=JSON.parse(e)}catch{r=null}}catch{return}let i=typeof r?.timestamp==`number`?r.timestamp:0;if(!(r?.signature===n&&t-i<m)){try{window.sessionStorage.setItem(f,JSON.stringify({signature:n,timestamp:t}))}catch{return}console.error(`[refresh-debug] chunk-import-reload`,{error:g(e).slice(0,1e3)}),window.setTimeout(()=>{window.location.reload()},0)}}async function b(e,t={}){let n=t.retries??1,r;for(let t=0;t<=n;t+=1)try{return await e()}catch(e){if(r=e,!_(e)||t>=n)break;await new Promise(e=>setTimeout(e,p*(t+1)))}throw _(r)&&y(r),r}var x=e=>(0,d.lazy)(()=>b(e)),S=(e,t)=>{try{let n=t??(typeof localStorage>`u`?null:localStorage);return n?n.getItem(e)===`1`:!1}catch{return!1}},C=(e,t)=>{try{let n=t??(typeof localStorage>`u`?null:localStorage);return!n||n.getItem(e)!==`0`}catch{return!0}},w=(e,t)=>{try{typeof localStorage<`u`&&localStorage.setItem(e,t?`1`:`0`)}catch{}},T=`oc:legend-timeline`,E=e=>S(T,e),D=`oc:markstream-react`,O=e=>C(D,e),k=t(e=>({legendTimelineEnabled:E(),setLegendTimelineEnabled:t=>{w(T,t),e({legendTimelineEnabled:t})},markstreamReactEnabled:O(),setMarkstreamReactEnabled:t=>{w(D,t),e({markstreamReactEnabled:t})}})),A=null,j=()=>(A??=i(()=>import(`./MarkstreamRendererImpl-DXewO7S_.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60])).catch(e=>{throw A=null,e}),A),M=()=>{j().catch(()=>void 0)},N=null,P=()=>(N??=i(()=>import(`./MarkdownRendererImpl-2ewbRZE2.js`).then(e=>e.n),__vite__mapDeps([38,1,14,13,15,16,17,2,18,19,3,20,21,22,5,39,9,10,11,25,26,12,23,24,27,28,29,30,31,32,40,41,42,43,44,45,46,47,48,49,50,33,34,51,37,35,52,53,54,36,55,56,57,58,59])).catch(e=>{throw N=null,e}),N),F=()=>{P().catch(()=>void 0),O()&&M()},I=class extends d.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){console.warn(`[markstream-react] falling back to the current Markdown renderer`,e)}render(){return this.state.hasError?this.props.fallback:this.props.children}},L=d.createContext(!0),R=()=>d.useContext(L),z=n(),B=x(()=>P().then(e=>({default:e.MarkdownRenderer}))),V=x(()=>j().then(e=>({default:e.MarkstreamRenderer}))),H=x(()=>P().then(e=>({default:e.SimpleMarkdownRenderer}))),U=e=>e===`tool`?`markdown-content markdown-tool`:e===`reasoning`?`markdown-content markdown-reasoning`:`markdown-content leading-relaxed`,W=e=>{let t=(0,u.c)(15),n=k(q),r=typeof e.content==`string`?e.content:``,i=typeof e.variant==`string`?e.variant:`assistant`,a;t[0]!==r||t[1]!==n||t[2]!==e.reserveMeasuredHeight||t[3]!==i?(a=e.reserveMeasuredHeight?c(l(r,n?`markstream:${i}`:i)):void 0,t[0]=r,t[1]=n,t[2]=e.reserveMeasuredHeight,t[3]=i,t[4]=a):a=t[4];let d=a,f;t[5]!==e.className||t[6]!==e.variant?(f=o(`relative break-words w-full min-w-0`,U(e.variant),typeof e.className==`string`?e.className:void 0),t[5]=e.className,t[6]=e.variant,t[7]=f):f=t[7];let p;t[8]!==r||t[9]!==e.animated||t[10]!==d?(p=(0,z.jsx)(s,{animated:e.animated,content:r,reservedHeight:d}),t[8]=r,t[9]=e.animated,t[10]=d,t[11]=p):p=t[11];let m;return t[12]!==f||t[13]!==p?(m=(0,z.jsx)(`div`,{className:f,"aria-busy":`true`,"data-markdown-hydration":`deferred`,"data-markdown-ready":`false`,children:p}),t[12]=f,t[13]=p,t[14]=m):m=t[14],m},G=e=>{let t=(0,u.c)(9),n=R(),r=k(J);if(!n&&e.isStreaming!==!0){let n;return t[0]===e?n=t[1]:(n=(0,z.jsx)(W,{...e,animated:!1,reserveMeasuredHeight:!0}),t[0]=e,t[1]=n),n}let i;t[2]===e?i=t[3]:(i=(0,z.jsx)(d.Suspense,{fallback:(0,z.jsx)(W,{...e,reserveMeasuredHeight:!0}),children:(0,z.jsx)(B,{...e})}),t[2]=e,t[3]=i);let a=i;if(!r)return a;let o;t[4]===e?o=t[5]:(o=(0,z.jsx)(d.Suspense,{fallback:(0,z.jsx)(W,{...e,reserveMeasuredHeight:!0}),children:(0,z.jsx)(V,{...e})}),t[4]=e,t[5]=o);let s;return t[6]!==a||t[7]!==o?(s=(0,z.jsx)(I,{fallback:a,children:o}),t[6]=a,t[7]=o,t[8]=s):s=t[8],s},K=e=>{let t=(0,u.c)(4);if(!R()){let n;return t[0]===e?n=t[1]:(n=(0,z.jsx)(W,{...e,animated:!1}),t[0]=e,t[1]=n),n}let n;return t[2]===e?n=t[3]:(n=(0,z.jsx)(d.Suspense,{fallback:(0,z.jsx)(W,{...e}),children:(0,z.jsx)(H,{...e})}),t[2]=e,t[3]=n),n};function q(e){return e.markstreamReactEnabled}function J(e){return e.markstreamReactEnabled}export{k as a,F as i,K as n,x as o,L as r,G as t};
@@ -1 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{i as t,n}from"./runtime-switch-LvWDU-SL.js";import{n as r}from"./runtime-fetch-zIalUnbb.js";import{u as i}from"./persistence-YbQKzHUQ.js";import{nt as a,rt as o}from"./vendor-base-ui-CnHfUmDN.js";import{n as s}from"./vendor-react-DLPElpoQ.js";import{s as c}from"./vendor-tanstack-react-query-D7pys_c9.js";import{Do as l,Oo as u}from"./useMobileNavigationStore-CYbDxRTM.js";import{t as d}from"./utils-BHTVlVov.js";import{n as f}from"./Icon-CkzzhaLr.js";import{t as p}from"./button-xx1UOBA5.js";var m=e(o(),1),h=s(),g=async(e,t)=>{try{let t=await e.json();if(t&&typeof t.error==`string`&&t.error.trim().length>0)return t.error}catch{return t}return t},_=e=>{let t=typeof e==`string`?e.trim():``;if(!t)throw Error(`projectId is required`);return t},v=e=>e===null||typeof e==`string`,y=e=>e===null||typeof e==`number`&&Number.isFinite(e),b=e=>typeof e==`number`&&Number.isFinite(e)&&e>=0&&e<=864e13,x=e=>e===null||b(e),S=e=>{if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;return typeof t.id==`string`&&t.id.length>0&&typeof t.projectId==`string`&&t.projectId.length>0&&typeof t.taskId==`string`&&t.taskId.length>0&&typeof t.taskName==`string`&&(t.trigger===`scheduled`||t.trigger===`manual`)&&(t.status===`running`||t.status===`success`||t.status===`error`)&&v(t.sessionId)&&v(t.directory)&&v(t.error)&&b(t.startedAt)&&x(t.finishedAt)&&y(t.durationMs)&&(t.durationMs===null||t.durationMs>=0)},C=e=>{if(!e||typeof e!=`object`||Array.isArray(e))throw Error(`Malformed scheduled task runs response`);let t=e;if(!Array.isArray(t.runs)||!t.runs.every(S)||!v(t.nextCursor)||typeof t.complete!=`boolean`||t.complete!==(t.nextCursor===null)||t.nextCursor!==null&&t.nextCursor.length===0)throw Error(`Malformed scheduled task runs response`);return{runs:t.runs,nextCursor:t.nextCursor,complete:t.complete}},w=async(e,t)=>{let n=new URLSearchParams;e.before&&n.set(`before`,e.before);let i=e.limit??20;if(!Number.isInteger(i)||i<1)throw Error(`limit must be a positive integer`);n.set(`limit`,String(i)),e.projectId&&n.set(`projectId`,e.projectId),e.taskId&&n.set(`taskId`,e.taskId);let a=await r(`/api/openchamber/scheduled-task-runs?${n.toString()}`,{signal:t});if(!a.ok)throw Error(await g(a,`Failed to load scheduled task history`));return C(await a.json().catch(()=>null))},T=async()=>{let e=await r(`/api/openchamber/scheduled-tasks`);if(!e.ok)throw Error(await g(e,`Failed to load schedules`));let t=await e.json().catch(()=>null);return{tasks:Array.isArray(t?.tasks)?t.tasks:[],failedProjectIds:Array.isArray(t?.failedProjectIds)?t.failedProjectIds.filter(e=>typeof e==`string`):[]}},E=async(e,t)=>{let n=_(e),i=await r(`/api/projects/${encodeURIComponent(n)}/scheduled-tasks`,{method:`PUT`,headers:{"content-type":`application/json`,accept:`application/json`},body:JSON.stringify({task:t})});if(!i.ok)throw Error(await g(i,`Failed to save schedule`));let a=await i.json().catch(()=>null);return!a||!Array.isArray(a.tasks)?[]:a.tasks},D=async(e,t)=>{let n=_(e),i=_(t),a=await r(`/api/projects/${encodeURIComponent(n)}/scheduled-tasks/${encodeURIComponent(i)}`,{method:`DELETE`,headers:{accept:`application/json`}});if(!a.ok)throw Error(await g(a,`Failed to delete schedule`));let o=await a.json().catch(()=>null);return!o||!Array.isArray(o.tasks)?[]:o.tasks},O=async(e,t)=>{let n=_(e),i=_(t),a=await r(`/api/projects/${encodeURIComponent(n)}/scheduled-tasks/${encodeURIComponent(i)}/run`,{method:`POST`,headers:{accept:`application/json`}});if(!a.ok)throw Error(await g(a,`Failed to run schedule`));let o=await a.json().catch(()=>null);return{sessionId:typeof o?.sessionId==`string`&&o.sessionId.length>0?o.sessionId:void 0}},k=class extends Error{code;status;resource;constructor(e,t,n,r){super(typeof r==`string`&&r.trim()?r.trim():e),this.code=e,this.status=t,this.resource=n}},A=e=>{if(!e||typeof e!=`object`)return!1;let t=`name`in e?String(e.name):``;return t===`AbortError`||t===`TimeoutError`},j=class extends k{operation;constructor(e,t,n){super(e,t,`share_operation`),this.operation=n}},M=(e,t=200)=>{throw new k(`invalid_${e}_response`,t,e)},N=(e,t)=>e&&typeof e==`object`&&!Array.isArray(e)?e:M(t),P=(e,t)=>typeof e==`string`?e:M(t),F=(e,t)=>e===null||typeof e==`string`?e:M(t),I=(e,t)=>typeof e==`number`&&Number.isFinite(e)?e:M(t),L=(e,t)=>e===null?null:I(e,t),R=(e,t)=>typeof e==`boolean`?e:M(t),z=(e,t,n)=>t.includes(e)?e:M(n),ee=e=>{let t=N(e,`capability`);return{supported:R(t.supported,`capability`),enabled:R(t.enabled,`capability`),revision:I(t.revision,`capability`),serverInstanceID:F(t.serverInstanceID,`capability`)}},te=e=>{if(e==null)return null;let t=N(e,`assistant`);return{turnID:P(t.turnID,`assistant`),messageID:P(t.messageID,`assistant`),status:z(t.status,[`queued`,`running`],`assistant`),admittedAt:I(t.admittedAt,`assistant`)}},ne=e=>{if(e==null)return null;let t=N(e,`assistant_preview`),n=I(t.ordinal,`assistant_preview`);return!Number.isSafeInteger(n)||n<0?M(`assistant_preview`):{messageID:P(t.messageID,`assistant_preview`),ordinal:n,role:z(t.role,[`user`,`assistant`],`assistant_preview`),text:P(t.text,`assistant_preview`),fallbackKind:t.fallbackKind===null?null:z(t.fallbackKind,[`image`,`file`,`session`,`assistant`,`schedule`],`assistant_preview`)}},B=e=>{let t=N(e,`assistant`),n=Array.isArray(t.historySessionIDs)?t.historySessionIDs.map(e=>P(e,`assistant`)):[],r=t.historySessionCount===void 0?n.length:I(t.historySessionCount,`assistant`);if(!Number.isSafeInteger(r)||r<n.length)return M(`assistant`);let i=Array.isArray(t.assignedSessionIDs)?t.assignedSessionIDs.map(e=>P(e,`assistant`)):[],a=t.activeContactTurn===void 0?null:te(t.activeContactTurn),o=t.working===void 0?a!=null:R(t.working,`assistant`);return{latestMessagePreview:ne(t.latestMessagePreview),id:P(t.id,`assistant`),revision:I(t.revision,`assistant`),enabled:R(t.enabled,`assistant`),name:P(t.name,`assistant`),defaultPrompt:P(t.defaultPrompt,`assistant`),workspacePath:F(t.workspacePath,`assistant`),effectiveWorkspacePath:P(t.effectiveWorkspacePath,`assistant`),managedWorkspacePath:F(t.managedWorkspacePath??null,`assistant`),providerID:P(t.providerID,`assistant`),modelID:P(t.modelID,`assistant`),agent:F(t.agent,`assistant`),variant:F(t.variant??null,`assistant`),mode:z(t.mode,[`continuous`,`stateless`],`assistant`),sessionID:F(t.sessionID,`assistant`),sessionGeneration:I(t.sessionGeneration,`assistant`),historySessionIDs:n,historySessionCount:r,assignedSessionIDs:i,working:o,activeContactTurn:a,createdAt:L(t.createdAt,`assistant`),updatedAt:I(t.updatedAt,`assistant`),tombstoneAt:L(t.tombstoneAt,`assistant`)}},re=e=>{let t=N(e,`snapshot`);return{revision:I(t.revision,`snapshot`),enabled:R(t.enabled,`snapshot`),assistants:Array.isArray(t.assistants)?t.assistants.map(B):M(`snapshot`)}},ie=e=>{let t=N(e,`binding`);return{sessionID:F(t.sessionID,`binding`),directory:P(t.directory,`binding`),sessionGeneration:I(t.sessionGeneration,`binding`)}},ae=e=>{let t=N(e,`message_admission`);if(t.admitted!==!0)return M(`message_admission`);let n=t.revision===void 0||t.revision===null?null:I(t.revision,`message_admission`);return{binding:ie(t.binding),messageID:P(t.messageID,`message_admission`),admitted:!0,revision:n,...t.replayed===!0?{replayed:!0}:{}}},oe=e=>{let t=N(e,`share_operation`);return{operationID:P(t.operationID,`share_operation`),assistantID:P(t.assistantID,`share_operation`),sessionID:F(t.sessionID,`share_operation`),messageID:F(t.messageID,`share_operation`),state:z(t.state,[`submitting`,`running`,`completed`,`failed`,`unresolved`],`share_operation`),phase:P(t.phase,`share_operation`),attempt:I(t.attempt,`share_operation`),leaseExpiresAt:L(t.leaseExpiresAt,`share_operation`),errorCode:F(t.errorCode,`share_operation`)}},se=e=>{let t=N(e,`assistant_contact_part`);if(t.type===`text`)return{type:`text`,text:P(t.text,`assistant_contact_part`)};if(t.type===`file`){let e=t.filename===void 0||t.filename===null?void 0:P(t.filename,`assistant_contact_part`),n=P(t.mime,`assistant_contact_part`),r=t.url!==void 0&&t.url!==null,i=t.attachmentID!==void 0&&t.attachmentID!==null;if(r&&i)return M(`assistant_contact_part`);if(i){let r=I(t.size,`assistant_contact_part`);return!Number.isSafeInteger(r)||r<0?M(`assistant_contact_part`):{type:`file`,mime:n,attachmentID:P(t.attachmentID,`assistant_contact_part`),sha256:P(t.sha256,`assistant_contact_part`),size:r,...e?{filename:e}:{}}}return r?{type:`file`,mime:n,url:P(t.url,`assistant_contact_part`),...e?{filename:e}:{}}:M(`assistant_contact_part`)}if(t.type===`card`){let e=z(t.cardType,[`session`,`assistant`,`schedule`],`assistant_contact_part`);return e===`session`?{type:`card`,cardType:`session`,sessionID:P(t.sessionID,`assistant_contact_part`),directory:P(t.directory,`assistant_contact_part`),title:F(t.title??null,`assistant_contact_part`),status:F(t.status??null,`assistant_contact_part`),branch:F(t.branch??null,`assistant_contact_part`)}:e===`assistant`?{type:`card`,cardType:`assistant`,assistantID:P(t.assistantID,`assistant_contact_part`),name:P(t.name,`assistant_contact_part`),providerID:P(t.providerID,`assistant_contact_part`),modelID:P(t.modelID,`assistant_contact_part`),mode:z(t.mode??`continuous`,[`continuous`,`stateless`],`assistant_contact_part`)}:{type:`card`,cardType:`schedule`,taskID:P(t.taskID,`assistant_contact_part`),projectID:P(t.projectID,`assistant_contact_part`),name:P(t.name,`assistant_contact_part`),kind:F(t.kind??null,`assistant_contact_part`),time:F(t.time??null,`assistant_contact_part`),timezone:F(t.timezone??null,`assistant_contact_part`),prompt:F(t.prompt??null,`assistant_contact_part`)}}return M(`assistant_contact_part`)},ce=e=>{let t=N(e,`assistant_contact`),n=F(t.nextCursor,`assistant_contact`),r=R(t.complete,`assistant_contact`);if(!r&&!n||r&&n||!Array.isArray(t.messages))return M(`assistant_contact`);let i=I(t.generation,`assistant_contact`),a=I(t.revision,`assistant_contact`);return!Number.isSafeInteger(i)||i<0||!Number.isSafeInteger(a)||a<0?M(`assistant_contact`):{messages:t.messages.map(e=>{let t=N(e,`assistant_contact_message`);if(!Array.isArray(t.parts))return M(`assistant_contact_message`);let n=t.parts.map(se);return{messageID:P(t.messageID,`assistant_contact_message`),assistantID:P(t.assistantID,`assistant_contact_message`),role:z(t.role,[`user`,`assistant`,`peer`],`assistant_contact_message`),turnID:P(t.turnID,`assistant_contact_message`),bubbleIndex:I(t.bubbleIndex,`assistant_contact_message`),createdAt:I(t.createdAt,`assistant_contact_message`),ordinal:I(t.ordinal,`assistant_contact_message`),status:P(t.status,`assistant_contact_message`),fromAssistantID:F(t.fromAssistantID??null,`assistant_contact_message`),fromAssistantName:F(t.fromAssistantName??null,`assistant_contact_message`),parts:n,text:typeof t.text==`string`?t.text:n.filter(e=>e.type===`text`).map(e=>e.text).join(``),cards:n.filter(e=>e.type===`card`)}}),nextCursor:n,complete:r,generation:i,revision:a}},le=e=>{let t=N(e,`assistant_scheduled_tasks`);return Array.isArray(t.tasks)?{tasks:t.tasks.map(e=>{let t=N(e,`assistant_scheduled_task`),n=t.task===null||t.task===void 0?null:N(t.task,`assistant_scheduled_task_live`);return{assistantID:P(t.assistantID,`assistant_scheduled_task`),projectID:P(t.projectID,`assistant_scheduled_task`),taskID:P(t.taskID,`assistant_scheduled_task`),createdAt:I(t.createdAt,`assistant_scheduled_task`),projectPath:F(t.projectPath??null,`assistant_scheduled_task`),projectLabel:F(t.projectLabel??null,`assistant_scheduled_task`),task:n}})}:M(`assistant_scheduled_tasks`)},ue=()=>({messages:[],generation:-1,revision:0,olderCursor:null,olderComplete:!0,hasMessageGap:!1,gapCursor:null,gapRequestIDs:null,gapTargetIDs:null,liveWindowIDs:[]}),V=e=>!!(e&&e.generation>=0),de=(e,t)=>e.ordinal===t.ordinal?e.messageID.localeCompare(t.messageID):e.ordinal-t.ordinal,H=(e,t,n=`incoming`)=>{let r=new Map;for(let t of e)r.set(t.messageID,t);for(let e of t)(n===`incoming`||!r.has(e.messageID))&&r.set(e.messageID,e);return[...r.values()].sort(de)},fe=e=>{let t=1/0;for(let n of e)n.ordinal<t&&(t=n.ordinal);return Number.isFinite(t)?t:null},U=e=>e.map(e=>e.messageID),pe=(e,t)=>{for(let n of e)if(t.has(n))return!0;return!1},me=e=>new Set(e),he=(e,t)=>!e||!t||e.length!==t.length?!1:e.every((e,n)=>e===t[n]),ge=e=>({...e,hasMessageGap:!1,gapCursor:null,gapRequestIDs:null,gapTargetIDs:null}),_e=(e,t)=>{let n=e??ue(),r=V(n),i=[...t.messages].sort(de),a=U(i);if(r&&t.generation<n.generation)return n;if(r&&t.generation>n.generation)return{messages:i,generation:t.generation,revision:t.revision,olderCursor:t.nextCursor,olderComplete:t.complete,hasMessageGap:!1,gapCursor:null,gapRequestIDs:null,gapTargetIDs:null,liveWindowIDs:a};if(!r)return{messages:i,generation:t.generation,revision:t.revision,olderCursor:t.complete?null:t.nextCursor,olderComplete:t.complete,hasMessageGap:!1,gapCursor:null,gapRequestIDs:null,gapTargetIDs:null,liveWindowIDs:a};if(i.length===0)return{...n,generation:t.generation,revision:Math.max(n.revision,t.revision),olderCursor:n.olderCursor??t.nextCursor,olderComplete:n.olderComplete&&t.complete,liveWindowIDs:[],hasMessageGap:n.hasMessageGap,gapCursor:n.hasMessageGap?t.nextCursor??n.gapCursor:null,gapRequestIDs:n.hasMessageGap?n.gapRequestIDs:null,gapTargetIDs:n.hasMessageGap?n.gapTargetIDs:null};let o=fe(i),s=H(n.messages.filter(e=>e.ordinal<o),H(n.messages.filter(e=>e.ordinal>=o),i,t.revision>=n.revision?`incoming`:`existing`),`incoming`),c=n.liveWindowIDs,l=me(a),u=c.length>0&&pe(c,l),d=n.hasMessageGap,f=n.gapCursor,p=n.gapRequestIDs,m=n.gapTargetIDs;if(!u&&c.length>0&&t.nextCursor){d=!0,f=t.nextCursor;let e=c.filter(e=>!l.has(e));p=e.length>0?e:[...c],m=n.hasMessageGap&&n.gapTargetIDs&&n.gapTargetIDs.length>0?n.gapTargetIDs:p}else n.hasMessageGap?(d=!0,f=n.gapCursor,p=n.gapRequestIDs,m=n.gapTargetIDs):(d=!1,f=null,p=null,m=null);return{messages:s,generation:t.generation,revision:Math.max(n.revision,t.revision),olderCursor:n.liveWindowIDs.length===0&&n.messages.length===0?t.complete?null:t.nextCursor:n.olderCursor,olderComplete:!r||n.liveWindowIDs.length===0&&n.messages.length===0?t.complete:n.olderComplete,hasMessageGap:d,gapCursor:d?f:null,gapRequestIDs:d?p:null,gapTargetIDs:d?m:null,liveWindowIDs:a}},ve=(e,t)=>{if(!V(e)||t.generation!==e.generation)return e;let n=t.revision>=e.revision?`incoming`:`existing`,r=H(e.messages,t.messages,n);return{...e,messages:r,revision:Math.max(e.revision,t.revision),olderCursor:t.complete?null:t.nextCursor,olderComplete:t.complete}},ye=(e,t,n)=>{if(!V(e)||t.generation!==e.generation)return e;let r=t.revision>=e.revision?`incoming`:`existing`,i=H(e.messages,t.messages,r),a=Math.max(e.revision,t.revision),o=n?.requestIDs??e.gapRequestIDs;if(!(e.hasMessageGap&&o&&e.gapRequestIDs&&he(o,e.gapRequestIDs)))return{...e,messages:i,revision:a};let s=U(t.messages),c=e.gapTargetIDs??[],l=me(c);return c.length>0&&pe(s,l)||t.complete||!t.nextCursor?ge({...e,messages:i,revision:a}):{...e,messages:i,revision:a,hasMessageGap:!0,gapCursor:t.nextCursor??e.gapCursor,gapRequestIDs:e.gapRequestIDs,gapTargetIDs:e.gapTargetIDs}},W={snapshot:(e=t())=>[e,`assistants`,`snapshot`],capability:(e=t())=>[e,`assistants`,`capability`],history:(e,r,i,a=t(),o=n())=>[a,o,`assistants`,`history`,e,r,i],contact:(e,r=t(),i=n())=>[r,i,`assistants`,`contact`,e],scheduledTasks:(e,r=t(),i=n())=>[r,i,`assistants`,`scheduled-tasks`,e],globalScheduledTasks:(e=t())=>[e,`scheduled-tasks`]},G=async(e,t={})=>{let n=await r(e,t),i=await n.json().catch(()=>null);if(!n.ok){let e=i&&typeof i==`object`&&`error`in i&&typeof i.error==`string`?i.error:`request_failed`,t=i&&typeof i==`object`&&`message`in i&&typeof i.message==`string`?i.message:void 0;throw new k(e,n.status,void 0,t)}return i},K=(e,t)=>({method:e,headers:{"Content-Type":`application/json`},body:t===void 0?void 0:JSON.stringify(t)}),q=(e,r)=>{if(t()!==e||n()!==r)throw new k(`runtime_stale`,409)},be=(e,t,r)=>{i.setQueryData(W.snapshot(r),n=>n&&{...n,assistants:n.assistants.map(n=>n.id!==e||n.sessionGeneration>t.sessionGeneration?n:{...n,sessionID:t.sessionID,sessionGeneration:t.sessionGeneration,effectiveWorkspacePath:t.directory})}),i.invalidateQueries({queryKey:W.snapshot(r)}),i.invalidateQueries({queryKey:[r,n(),`assistants`,`history`,e]})},xe=(e,t)=>{i.setQueryData(W.snapshot(t),t=>t&&{...t,assistants:t.assistants.some(t=>t.id===e.id)?t.assistants.map(t=>t.id===e.id?e:t):[...t.assistants,e]}),i.invalidateQueries({queryKey:W.snapshot(t)})},Se=2500,Ce=15e3,we=e=>!!e?.assistants.some(e=>e.working||e.activeContactTurn),Te=(e,t={})=>{if(t.assistantID){let n=e?.assistants.find(e=>e.id===t.assistantID);return n?.working||n?.activeContactTurn?Se:Ce}return we(e)?Se:Ce},J=(e=t())=>({queryKey:W.snapshot(e),queryFn:async({signal:e})=>re(await G(`/api/openchamber/assistants/snapshot`,{signal:e})),retry:2,refetchInterval:e=>Te(e.state.data),refetchIntervalInBackground:!1,refetchOnWindowFocus:!0,refetchOnReconnect:!0}),Ee=()=>{let e=(0,h.c)(5),n,r,a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=t(),n=c,r=J(a),e[0]=n,e[1]=r,e[2]=a):(n=e[0],r=e[1],a=e[2]);let o=n(r),s,l;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>u(e=>{if(t()!==a)return;if(e.type===`event-stream-ready`){i.invalidateQueries({queryKey:W.snapshot(a),exact:!0});return}if(e.type===`contact-turn-start`||e.type===`contact-turn-end`){i.invalidateQueries({queryKey:W.snapshot(a),exact:!0});return}if(e.type!==`assistants-changed`)return;let n=i.getQueryData(W.snapshot(a));(!n||e.revision>n.revision)&&i.invalidateQueries({queryKey:W.snapshot(a),exact:!0})}),l=[a],e[3]=s,e[4]=l):(s=e[3],l=e[4]),m.useEffect(s,l),o},De=(e,t={})=>{let n=new URLSearchParams;return n.set(`limit`,String(t.limit??20)),t.before&&n.set(`before`,t.before),t.messageID&&n.set(`messageID`,t.messageID),`/api/openchamber/assistants/${encodeURIComponent(e)}/contact/messages?${n}`},Y=async(e,t,n)=>ce(await G(De(e,t),n?{signal:n}:{})),Oe=(e,t)=>e.generation===t.generation&&e.revision===t.revision&&e.olderCursor===t.olderCursor&&e.olderComplete===t.olderComplete&&e.hasMessageGap===t.hasMessageGap&&e.gapCursor===t.gapCursor&&e.messages===t.messages&&e.liveWindowIDs===t.liveWindowIDs&&e.gapRequestIDs===t.gapRequestIDs&&e.gapTargetIDs===t.gapTargetIDs,X=new Map,Z=new Map,Q=e=>e.join(``),ke=async(e,t,n,r,a)=>{let o=Q(t),s=Z.get(o);if(s)return s;let c=(async()=>{let o=i.getQueryData(t)??n,s=0,c=!1,l=!1,u=o.gapRequestIDs?[...o.gapRequestIDs]:null,d=o.gapCursor;for(;o.hasMessageGap&&o.gapCursor&&s<5&&!a?.aborted;){q(r.transport,r.runtimeGeneration),s+=1;let n=o.gapCursor;try{let s=await Y(e,{limit:20,before:n},a);q(r.transport,r.runtimeGeneration);let l=i.getQueryData(t)??o;if(s.generation!==l.generation){o=l;break}let f=!u||!!(l.hasMessageGap&&l.gapRequestIDs&&l.gapRequestIDs.length===u.length&&l.gapRequestIDs.every((e,t)=>e===u[t]));if(o=ye(l,s,u?{requestIDs:u,cursor:d}:void 0),i.setQueryData(t,o),!f)break;if(!o.hasMessageGap){c=!0;break}if(o.gapCursor&&o.gapCursor!==n)c=!0;else break}catch(e){if(a?.aborted||A(e))break;l=!0,o=i.getQueryData(t)??o;break}}return{view:i.getQueryData(t)??o,failed:l,progressed:c}})();Z.set(o,c);try{return await c}finally{Z.get(o)===c&&Z.delete(o)}},Ae=(e,r=t(),a=n(),o={})=>({queryKey:W.contact(e,r,a),queryFn:async({signal:t})=>{q(r,a),await l(),q(r,a);let n=W.contact(e,r,a),o=i.getQueryData(n),s=await Y(e,{limit:20},t);q(r,a);let c=_e(i.getQueryData(n)??o??null,s);i.setQueryData(n,c);let u=Q(n);if(c.hasMessageGap&&c.gapCursor){X.delete(u);let i=await ke(e,n,c,{transport:r,runtimeGeneration:a},t);c=i.view,(i.failed||i.view.hasMessageGap&&!i.progressed)&&i.view.gapCursor&&X.set(u,i.view.gapCursor)}else X.delete(u);q(r,a);let d=i.getQueryData(n)??c;return o&&Oe(o,d)?o:d},retry:2,refetchInterval:()=>o.reconcileInForeground?Te(i.getQueryData(W.snapshot(r)),{assistantID:e}):!1,refetchIntervalInBackground:!1,refetchOnWindowFocus:!0,refetchOnReconnect:!0,structuralSharing:!0}),je=(e,r=!0)=>{let a=t(),o=n(),[s,l]=m.useState(!1),[d,f]=m.useState(null),[p,h]=m.useState(!1),g=m.useRef(null),_=m.useRef(null),v=m.useRef(null),y=m.useRef(null),b=m.useRef({assistantID:e,transport:a,runtimeGeneration:o,enabled:r});b.current={assistantID:e,transport:a,runtimeGeneration:o,enabled:r};let x=c({...Ae(e,a,o,{reconcileInForeground:!0}),enabled:r&&!!e});m.useEffect(()=>u(n=>{t()===a&&(n.type===`assistants-changed`||n.type===`event-stream-ready`||n.type===`contact-turn-end`)&&(n.type===`contact-turn-end`&&`assistantID`in n&&n.assistantID!==e||i.invalidateQueries({queryKey:W.contact(e,a,o),exact:!0}))}),[e,o,a]),m.useEffect(()=>{let t=Q(W.contact(e,a,o));return()=>{v.current?.abort(),y.current?.abort(),v.current=null,y.current=null,g.current=null,_.current=null,X.delete(t)}},[e,a,o,r]);let S=x.data,C=W.contact(e,a,o),w=async()=>{if(!e||!r)return;if(g.current)return g.current;let t=i.getQueryData(C)??S;if(!t||t.olderComplete||!t.olderCursor)return;f(null),l(!0);let n=new AbortController;y.current?.abort(),y.current=n;let s={transport:a,runtimeGeneration:o,assistantID:e,cursor:t.olderCursor},c=(async()=>{try{q(s.transport,s.runtimeGeneration);let e=await Y(s.assistantID,{limit:20,before:s.cursor},n.signal);if(n.signal.aborted||(q(s.transport,s.runtimeGeneration),b.current.assistantID!==s.assistantID||b.current.transport!==s.transport||b.current.runtimeGeneration!==s.runtimeGeneration))return;let r=i.getQueryData(C)??t;if(e.generation!==r.generation)return;i.setQueryData(C,ve(r,e))}catch(e){if(n.signal.aborted||A(e))return;let t=e instanceof Error?e:Error(String(e));throw f(t),t}finally{y.current===n&&(y.current=null),l(!1),g.current=null}})();return g.current=c,c},T=async(t=`explicit`)=>{if(!e||!r)return;if(_.current)return _.current;let n=i.getQueryData(C)??S;if(!n?.hasMessageGap||!n.gapCursor)return;let s=Q(C);if(t===`auto`&&X.get(s)===n.gapCursor)return;t===`explicit`&&X.delete(s),h(!0);let c=new AbortController;v.current?.abort(),v.current=c;let l={transport:a,runtimeGeneration:o,assistantID:e,cursor:n.gapCursor},u=(async()=>{try{q(l.transport,l.runtimeGeneration);let e=await ke(l.assistantID,C,n,{transport:l.transport,runtimeGeneration:l.runtimeGeneration},c.signal);if(c.signal.aborted)return;if(q(l.transport,l.runtimeGeneration),e.failed||!e.progressed){e.view.gapCursor&&X.set(s,e.view.gapCursor);return}e.view.hasMessageGap||X.delete(s)}catch(e){if(c.signal.aborted||A(e))return;throw X.set(s,l.cursor),e}finally{v.current===c&&(v.current=null),h(!1),_.current=null}})();return _.current=u,u};return m.useEffect(()=>{if(!r||!e||!S?.hasMessageGap||!S.gapCursor||x.isFetching||p)return;let t=Q(C);X.get(t)!==S.gapCursor&&T(`auto`).catch(()=>void 0)},[r,e,S?.hasMessageGap,S?.gapCursor,x.isFetching,p,C]),{data:S?{messages:S.messages,generation:S.generation,revision:S.revision,nextCursor:S.olderCursor,complete:S.olderComplete}:void 0,status:x.status,fetchStatus:x.fetchStatus,isError:x.isError,isPending:x.isPending,isFetching:x.isFetching,isSuccess:x.isSuccess,error:x.error instanceof Error?x.error:x.error?Error(String(x.error)):null,refetch:()=>x.refetch(),fetchPreviousPage:w,hasPreviousPage:!!(S&&!S.olderComplete&&S.olderCursor),isFetchingPreviousPage:s,previousPageError:d,hasMessageGap:!!S?.hasMessageGap,isFillingMessageGap:p,retryMessageGap:()=>T(`explicit`)}},Me=async(e,r)=>{let a=t(),o=n();await l(),q(a,o);let s=await Y(e,{messageID:r,limit:1});if(q(a,o),!s.messages.some(e=>e.messageID===r&&e.role===`user`))return null;i.invalidateQueries({queryKey:W.contact(e,a,o),exact:!0}),i.invalidateQueries({queryKey:W.snapshot(a),exact:!0});let c=i.getQueryData(W.snapshot(a));return{admitted:!0,messageID:r,revision:s.revision??c?.revision??null}},Ne=(e,r=t(),i=n())=>({queryKey:W.scheduledTasks(e,r,i),queryFn:async({signal:t})=>{q(r,i);let n=le(await G(`/api/openchamber/assistants/${encodeURIComponent(e)}/scheduled-tasks`,{signal:t}));return q(r,i),n},refetchOnMount:`always`,retry:(e,t)=>!(t instanceof k&&t.status===404)&&e<2}),Pe=(e,r)=>{let i=(0,h.c)(6),a=r===void 0||r,o,s;if(i[0]!==e){let r=t(),a=n();s=c,o=Ne(e,r,a),i[0]=e,i[1]=o,i[2]=s}else o=i[1],s=i[2];let l=a&&!!e,u;return i[3]!==o||i[4]!==l?(u={...o,enabled:l},i[3]=o,i[4]=l,i[5]=u):u=i[5],s(u)},Fe=(e=t())=>({queryKey:W.globalScheduledTasks(e),queryFn:T,refetchOnMount:`always`}),Ie=e=>{let t=(0,h.c)(3),n=e===void 0||e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=Fe(),t[0]=r):r=t[0];let i;return t[1]===n?i=t[2]:(i={...r,enabled:n},t[1]=n,t[2]=i),c(i)},Le=(e,r=t())=>{i.invalidateQueries({queryKey:[r,n(),`assistants`,`contact`,e]})},Re=(e=t())=>({queryKey:W.capability(e),queryFn:()=>$e(),retry:!1}),ze=()=>{let e=(0,h.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=Re(),e[0]=t):t=e[0],c(t)},Be=(e=i,n=t())=>e.getQueryData(W.snapshot(n)),Ve=(e=i,n=t())=>e.fetchQuery(J(n)),He=async(e=i)=>{let r=t(),a=n();await e.invalidateQueries({queryKey:W.snapshot(r),exact:!0}),q(r,a);let o=await e.fetchQuery(J(r));return q(r,a),o},Ue=15e3,We=e=>{throw e instanceof k?e:A(e)?new k(`admission_timeout`,408):e},Ge=async(e,r,i)=>{let a=t(),o=n(),s=typeof i==`string`?[{type:`text`,text:i}]:Array.isArray(i.parts)&&i.parts.length>0?i.parts:[{type:`text`,text:i.text??``}],c=AbortSignal.timeout(Ue);try{let t=ae(await G(`/api/openchamber/assistants/${encodeURIComponent(e)}/messages`,{...K(`POST`,{messageID:r,parts:s}),signal:c}));return q(a,o),be(e,t.binding,a),Le(e,a),t}catch(e){return We(e)}},Ke=async(e,r,i,a,o)=>{let s=t(),c=n(),l=oe(await G(`/api/openchamber/assistants/${encodeURIComponent(e)}/share`,K(`POST`,{operationID:r,payload:{messageID:i,parts:a,source:o}})));return q(s,c),l},qe=async(e,r=t(),i=n())=>{q(r,i);let a=oe(await G(`/api/openchamber/assistants/share-operations/${encodeURIComponent(e)}`));return q(r,i),a},Je=async(e,r=t(),i=n())=>{let a=e;for(let e=0;e<60&&(a.state===`running`||a.state===`submitting`);e+=1)q(r,i),await new Promise(e=>setTimeout(e,750)),a=await qe(a.operationID,r,i);if(q(r,i),a.state===`completed`)return a;throw a.state===`failed`?new j(a.errorCode??`share_failed`,400,a):new j(`share_unresolved`,408,a)},Ye=async(e,n)=>{await G(`/api/openchamber/assistants/settings`,K(`PUT`,{enabled:e,expectedRevision:n}));let r=t();await Promise.all([i.invalidateQueries({queryKey:W.snapshot(r),exact:!0}),i.invalidateQueries({queryKey:W.capability(r),exact:!0})])},Xe=async e=>{let n=t(),r=B(await G(`/api/openchamber/assistants`,K(`POST`,e)));return xe(r,n),r},Ze=async(e,r)=>{let i=t(),a=n(),o=B(await G(`/api/openchamber/assistants/${encodeURIComponent(e.id)}`,K(`PATCH`,{...r,expectedRevision:e.revision})));return q(i,a),xe(o,i),o},Qe=async e=>{await G(`/api/openchamber/assistants/${encodeURIComponent(e.id)}`,K(`DELETE`,{expectedRevision:e.revision})),await i.invalidateQueries({queryKey:W.snapshot(t())})},$e=async()=>ee(await G(`/api/openchamber/assistants/capability`)),$=a();function et(e){let t=(0,h.c)(32),{title:n,subtitle:r,backAriaLabel:i,onBack:a,backDisabled:o,actions:s,trailing:c,sticky:l,overlay:u,elevated:m}=e,g=o!==void 0&&o,_;t[0]===s?_=t[1]:(_=s===void 0?[]:s,t[0]=s,t[1]=_);let v=_,y=l!==void 0&&l,b=u!==void 0&&u,x=m!==void 0&&m,S=!!c||v.length>0,C=x||v.some(nt),w=y&&`oc-mobile-detail-navigation-sticky`,T=b&&`absolute inset-x-0 top-0`,E=C?`z-[60]`:b?`z-30`:void 0,D;t[2]!==w||t[3]!==T||t[4]!==E?(D=d(`oc-mobile-detail-navigation relative shrink-0 pt-[max(0.25rem,var(--oc-safe-area-top,0px))]`,w,T,E),t[2]=w,t[3]=T,t[4]=E,t[5]=D):D=t[5];let O=S&&v.length+ +!!c>1?`grid-cols-[2.75rem_minmax(0,1fr)_auto]`:`grid-cols-[2.75rem_minmax(0,1fr)_2.75rem]`,k;t[6]===O?k=t[7]:(k=d(`oc-mobile-detail-navigation-content grid items-center gap-1 px-4`,O),t[6]=O,t[7]=k);let A;t[8]!==i||t[9]!==g||t[10]!==a?(A=a?(0,$.jsx)(p,{type:`button`,variant:`mobileGlass`,size:`mobileIcon`,className:`justify-self-start`,onClick:a,disabled:g,"aria-label":i,children:(0,$.jsx)(f,{name:`arrow-left-s`,className:`size-5`})}):(0,$.jsx)(`span`,{"aria-hidden":`true`}),t[8]=i,t[9]=g,t[10]=a,t[11]=A):A=t[11];let j;t[12]===n?j=t[13]:(j=(0,$.jsx)(`div`,{className:`oc-mobile-detail-title w-full truncate typography-ui-label font-medium text-foreground`,children:n}),t[12]=n,t[13]=j);let M;t[14]===r?M=t[15]:(M=r?(0,$.jsx)(`div`,{className:`oc-mobile-detail-subtitle w-full truncate text-muted-foreground`,"aria-live":`polite`,children:r}):null,t[14]=r,t[15]=M);let N;t[16]!==j||t[17]!==M?(N=(0,$.jsxs)(`div`,{className:`flex w-full max-w-72 min-w-0 flex-col items-center justify-center justify-self-center px-1`,children:[j,M]}),t[16]=j,t[17]=M,t[18]=N):N=t[18];let P;t[19]===v?P=t[20]:(P=v.map(tt),t[19]=v,t[20]=P);let F;t[21]!==P||t[22]!==c?(F=(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center justify-end gap-2`,children:[c,P]}),t[21]=P,t[22]=c,t[23]=F):F=t[23];let I;t[24]!==k||t[25]!==A||t[26]!==N||t[27]!==F?(I=(0,$.jsxs)(`div`,{className:k,children:[A,N,F]}),t[24]=k,t[25]=A,t[26]=N,t[27]=F,t[28]=I):I=t[28];let L;return t[29]!==D||t[30]!==I?(L=(0,$.jsx)(`header`,{className:D,children:I}),t[29]=D,t[30]=I,t[31]=L):L=t[31],L}function tt(e,t){return(0,$.jsx)(p,{type:`button`,variant:`mobileGlass`,size:`mobileIcon`,className:d(e.elevated&&`relative z-[60]`),onClick:e.onClick,disabled:e.disabled,"aria-label":e.ariaLabel,"aria-expanded":e.pressed,title:e.title,children:(0,$.jsx)(f,{name:e.icon,className:`size-5`})},`${e.icon}:${t}`)}function nt(e){return e.elevated}export{T as C,E,D as S,O as T,Ie as _,Ve as a,j as b,Be as c,Ye as d,Ze as f,Ee as g,Pe as h,Qe as i,Ge as l,je as m,Me as n,$e as o,ze as p,Xe as r,He as s,et as t,Ke as u,Je as v,w,A as x,k as y};
@@ -1,4 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-aparajita-capacitor-secure-storage-CjQdwfjS.js","assets/rolldown-runtime-C0FnF6B9.js","assets/assistant-attachment-cache-C0aRnFkj.js","assets/runtime-auth-D66yq6ie.js","assets/runtime-switch-LvWDU-SL.js","assets/runtime-fetch-zIalUnbb.js","assets/relay-image-stream-DM7atqJs.js","assets/dualLimitLru-D8Sphgua.js","assets/useAssistantUIStore-CLPCNoj_.js","assets/vendor-zustand-B4dlGEM2.js","assets/vendor-base-ui-CnHfUmDN.js","assets/useUIStore-CxOoCv7B.js"])))=>i.map(i=>d[i]);
2
- import{o as e,r as t}from"./rolldown-runtime-C0FnF6B9.js";import{E as n,b as r,w as i}from"./runtime-auth-D66yq6ie.js";import{c as a,i as o,l as s,n as c,r as l,t as u}from"./runtime-switch-LvWDU-SL.js";import{n as d}from"./runtime-fetch-zIalUnbb.js";import{Ot as f,bt as p,et as m,nt as h,yt as g}from"./persistence-YbQKzHUQ.js";import{nt as _,rt as v}from"./vendor-base-ui-CnHfUmDN.js";import{n as y,r as b}from"./platform-DzsGqlGW.js";import{a as ee,n as x,o as S,t as te}from"./vendor-aparajita-capacitor-secure-storage-CjQdwfjS.js";import{n as ne}from"./vendor-react-DLPElpoQ.js";import{n as C}from"./vendor-reactuses-core-DDoDDyM9.js";import{n as re}from"./clipboard-CUasgPiF.js";import{r as ie,wo as w}from"./useMobileNavigationStore-CYbDxRTM.js";import{a as ae,b as oe,o as T,s as se,t as ce,u as le,v as ue}from"./MobileDetailNavigation-BGaAyuBH.js";import{i as E,n as de}from"./useAssistantUIStore-CLPCNoj_.js";import{n as fe,t as pe}from"./dialog-BwQ3rY_x.js";import{t as me}from"./AgentAvatar-mbvX7YlW.js";import{n as he}from"./Icon-CkzzhaLr.js";var ge=ne(),D=e(v(),1),_e=`openchamber.mobile.connections.v1`,ve=`openchamber.mobile.`,ye=`openchamber.mobile.deviceId`,be=()=>{try{let e=window.localStorage.getItem(ye);if(e&&e.trim())return e.trim();let t=m();return window.localStorage.setItem(ye,t),t}catch{return m()}},xe=()=>`mobile:${be()}`,Se=()=>{try{let e=x.getPlatform();return e===`ios`||e===`android`?e:void 0}catch{return}},Ce=12,we=8e3,Te=2500,Ee=3e3,De=2500,O=e=>{let t=e.trim();if(!t)return``;let n=/^https?:\/\//i.test(t)?t:`http://${t}`,r=new URL(n);return r.hash=``,r.search=``,r.pathname=r.pathname.replace(/\/+$/,``),r.toString().replace(/\/+$/,``)},Oe=e=>{try{return new URL(e).host}catch{return e}},k=e=>{try{return O(e)}catch{return e.trim().replace(/\/+$/g,``)}},ke=(e,t)=>k(e)===k(t),Ae=e=>`relay:${e.serverId}@${e.relayUrl.trim()}`,je=e=>`relay://${e.serverId}`,A=e=>e.candidates.filter(e=>e.kind===`direct`),j=e=>{let t=e.candidates.find(e=>e.kind===`relay`);return t&&t.kind===`relay`?t.relay:null},M=e=>{let t=A(e)[0];if(t)return t.url;let n=j(e);return n?je(n):``},N=e=>{let t=j(e);if(t)return Ae(t);let n=A(e)[0];return n?k(n.url):``},Me=N,Ne=(e,t)=>{let n=e.find(e=>e.kind===`relay`),r=n&&n.kind===`relay`?n.relay.serverId:null,i=n&&n.kind===`relay`?n.relay.relayUrl.trim():null,a=new Set(e.filter(e=>e.kind===`direct`).map(e=>k(e.url)));return t.some(e=>e.kind===`relay`?r!==null&&e.relay.serverId===r&&e.relay.relayUrl.trim()===i:a.has(k(e.url)))},Pe=(e,t)=>t.id&&e.id===t.id?!0:Ne(e.candidates,t.candidates),Fe=e=>{let t=(()=>{try{return O(e)}catch{return``}})();return t?[{kind:`direct`,url:t}]:[]},Ie=e=>{if(e.candidates&&e.candidates.length>0)return e.candidates;let t=[];return typeof e.url==`string`&&e.url.trim()&&!/^relay:\/\//i.test(e.url.trim())&&t.push(...Fe(e.url)),e.relay&&t.push({kind:`relay`,relay:e.relay}),t},Le=e=>{if(!e||typeof e!=`object`||Array.isArray(e))return null;let t=e;if(typeof t.relayUrl!=`string`||!t.relayUrl.trim()||typeof t.serverId!=`string`||!t.serverId.trim())return null;let n=t.hostEncPubJwk;if(!n||typeof n!=`object`||Array.isArray(n))return null;let r=n;return r.kty!==`EC`||r.crv!==`P-256`||typeof r.x!=`string`||!r.x||typeof r.y!=`string`||!r.y?null:{relayUrl:t.relayUrl,serverId:t.serverId,hostEncPubJwk:{kty:`EC`,crv:`P-256`,x:r.x,y:r.y}}},Re=e=>{try{return JSON.stringify(e)}catch{return String(e)}},P=(e,t={})=>{Re(t)},F=(e,t={})=>{Re(t)},ze=e=>{if(typeof e!=`string`)return e;try{return JSON.parse(e)}catch{return e}},Be=e=>{if(typeof e!=`string`)return e??void 0;try{return JSON.parse(e)}catch{return e}},Ve=async(e,t)=>{if(!y())return null;try{let{CapacitorHttp:n}=await S(async()=>{let{CapacitorHttp:e}=await import(`./vendor-aparajita-capacitor-secure-storage-CjQdwfjS.js`).then(e=>e.i);return{CapacitorHttp:e}},__vite__mapDeps([0,1])),r=Object.fromEntries(new Headers(t?.headers).entries()),i=await n.request({url:e,method:t?.method||`GET`,headers:r,data:Be(t?.body)});return{ok:i.status>=200&&i.status<300,status:i.status,source:`native-http`,json:async()=>ze(i.data)}}catch(t){return console.warn(`[mobile-connect]`,`native-http failed`,Re({url:e,error:t instanceof Error?t.message:String(t)})),null}},He=async(e,t)=>{let n=await fetch(e,t).catch(t=>(console.warn(`[mobile-connect]`,`browser-fetch failed`,Re({url:e,error:t instanceof Error?t.message:String(t)})),null));return n?{ok:n.ok,status:n.status,source:`browser-fetch`,json:()=>n.json()}:null},I=async(e,t,n)=>{let r,i=new Promise(t=>{r=window.setTimeout(()=>{n?.(),t(null)},e)});try{return await Promise.race([t,i])}catch{return null}finally{r!==void 0&&window.clearTimeout(r)}},L=async(e,t,n)=>{let r=n?.totalTimeoutMs??we,i=Date.now(),a=await I(Math.min(Te,r),Ve(e,t));if(a)return a;let o=new AbortController;return I(Math.max(500,r-(Date.now()-i)),He(e,{...t,signal:o.signal}),()=>o.abort())},Ue=async e=>{if(!e)return null;let t=await e.json().catch(()=>null);if(!t||typeof t!=`object`)return null;let n=t;return{authenticated:typeof n.authenticated==`boolean`?n.authenticated:void 0,disabled:typeof n.disabled==`boolean`?n.disabled:void 0,scope:typeof n.scope==`string`?n.scope:void 0}},R=15e3,We=async(e,t,r,i=R,a)=>{let o=n({relayUrl:e.relayUrl,serverId:e.serverId,hostEncPubJwk:e.hostEncPubJwk,...r?{grant:r}:{}}),s=e=>e===`ok`&&a?.keepTunnel?{outcome:e,tunnel:o}:(o.close(),{outcome:e});try{let e=t?{Authorization:`Bearer ${t}`}:void 0,n=await I(i,o.fetch(`/auth/session`,{headers:e}).catch(()=>null));if(P(`relay:session`,{ok:n?.ok===!0,status:n?.status??null,hasToken:!!t}),!n)return s(`unreachable`);if(n.status===401)return s(t?`auth-failed`:`needs-login`);if(!n.ok&&n.status!==404)return s(`auth-failed`);let r=await Ue(n);return r&&r.disabled!==!0&&r.authenticated===!1?s(t?`auth-failed`:`needs-login`):s(`ok`)}catch(e){throw o.close(),e}},Ge=(e,t,n,i,a)=>{let o=typeof window<`u`?window.location.origin:``,c={relayUrl:e.relayUrl,serverId:e.serverId,hostEncPubJwk:e.hostEncPubJwk,...n?{grant:n}:{}};a&&r(c,a),s({apiBaseUrl:o,clientToken:t,runtimeKey:i??Ae(e),relay:c})},Ke=e=>{if(!e||typeof e!=`object`)return null;let t=e;if(t.kind===`direct`)return typeof t.url==`string`&&t.url.trim()?{kind:`direct`,url:t.url}:null;if(t.kind===`relay`){let e=Le(t.relay);return e?{kind:`relay`,relay:e}:null}return null},qe=e=>{if(e.mode===`relay`){let t=Le(e.relay);return t?[{kind:`relay`,relay:t}]:[]}return typeof e.url==`string`?Fe(e.url):[]},z=()=>{if(typeof window>`u`)return[];let e;try{e=JSON.parse(window.localStorage.getItem(_e)||`[]`)}catch{return[]}if(!Array.isArray(e))return[];let t=y();return e.flatMap(e=>{if(!e||typeof e!=`object`)return[];let n=e;if(typeof n.id!=`string`)return[];let r=Array.isArray(n.candidates)?n.candidates.map(Ke).filter(e=>!!e):qe(n);if(r.length===0)return[];let i=typeof n.clientToken==`string`&&n.clientToken.trim()?n.clientToken:void 0,a=typeof n.label==`string`&&n.label.trim()?n.label:Oe(M({candidates:r})),o={id:n.id,label:a,candidates:r,lastUsedAt:typeof n.lastUsedAt==`number`?n.lastUsedAt:0};return t?[{...o,hasToken:!!n.hasToken||!!i}]:[{...o,clientToken:i,hasToken:!!i}]}).sort((e,t)=>t.lastUsedAt-e.lastUsedAt)},Je=e=>e.kind===`relay`?{kind:`relay`,relay:{relayUrl:e.relay.relayUrl,serverId:e.relay.serverId,hostEncPubJwk:e.relay.hostEncPubJwk}}:{kind:`direct`,url:e.url},Ye=e=>{if(typeof window>`u`)return;let t=y(),n=e.slice(0,Ce).map(e=>{let n={id:e.id,label:e.label,candidates:e.candidates.map(Je),lastUsedAt:e.lastUsedAt};return t?{...n,hasToken:!!(e.hasToken||e.clientToken)}:{...n,clientToken:e.clientToken}});try{window.localStorage.setItem(_e,JSON.stringify(n))}catch(e){console.warn(`[mobile-storage] failed to persist connection metadata`,e)}},Xe=(e,t)=>{let n=e.find(e=>Pe(e,t)),r=y(),i={id:t.id||n?.id||m(),label:t.label,candidates:t.candidates,lastUsedAt:Date.now(),...r?{hasToken:t.hasToken??(!!t.clientToken||n?.hasToken||!1)}:{clientToken:t.clientToken??n?.clientToken,hasToken:!!(t.clientToken??n?.clientToken)}};return[i,...e.filter(e=>e.id!==i.id&&!Pe(e,t))].slice(0,Ce)},Ze=te,Qe=0,$e=e=>`${ve}token.${encodeURIComponent(e)}`,et=async(e,t)=>{let n,r=new Promise(e=>{n=window.setTimeout(()=>e(t),Ee)});try{return await Promise.race([e.catch(()=>t),r])}finally{n!==void 0&&window.clearTimeout(n)}},tt=async(e,t,n)=>y()?et(t().catch(t=>(console.warn(`[mobile-storage] ${e} failed`,t),n)),n):n,B=async e=>{F(`secure:read-start`,{key:e});let t=await tt(`secure:read`,async()=>(await Ze.internalGetItem({prefixedKey:$e(e),sync:!1})).data,null),n=typeof t==`string`&&t.trim()?t:void 0;return F(`secure:read`,{key:e,hasToken:!!n}),n},V=async(e,t)=>{F(`secure:write-start`,{key:e});let n=await tt(`secure:write`,async()=>(await Ze.internalSetItem({prefixedKey:$e(e),data:t,sync:!1,access:Qe}),!0),!1);return F(`secure:write`,{key:e,ok:n}),n},nt=async e=>{await tt(`secure:delete`,async()=>(await Ze.internalRemoveItem({prefixedKey:$e(e),sync:!1}),!0),!1)},rt=async()=>{if(typeof window>`u`||!y())return;let e;try{e=JSON.parse(window.localStorage.getItem(_e)||`[]`)}catch{return}if(!Array.isArray(e))return;let t=e.filter(e=>!!e&&typeof e==`object`&&typeof e.url==`string`&&typeof e.clientToken==`string`&&!!e.clientToken.trim());if(t.length!==0){F(`secure:migrate-start`,{count:t.length});for(let{url:e,clientToken:n}of t)await V(k(e),n);Ye(z()),F(`secure:migrate-done`,{count:t.length})}},it=async()=>(await rt(),z()),H=async e=>{let t=Xe(z(),e);if(Ye(t),y()&&e.clientToken){let n=t[0];n&&await V(N(n),e.clientToken)}return t},at=async e=>{let t=z(),n=t.find(t=>t.id===e)??null,r=t.filter(t=>t.id!==e);if(n){let e;if(y())try{e=await B(N(n))||void 0}catch{e=void 0}else typeof n.clientToken==`string`&&n.clientToken.trim()&&(e=n.clientToken.trim());if(e)try{let{clearAssistantAttachmentCacheForBearer:t}=await S(async()=>{let{clearAssistantAttachmentCacheForBearer:e}=await import(`./assistant-attachment-cache-C0aRnFkj.js`).then(e=>e.t);return{clearAssistantAttachmentCacheForBearer:e}},__vite__mapDeps([2,1,3,4,5,6,0,7]));await t(e,`forget-connection`)}catch{}}if(Ye(r),n&&y()&&await nt(N(n)),n){let e=N(n),{useAssistantUIStore:t}=await S(async()=>{let{useAssistantUIStore:e}=await import(`./useAssistantUIStore-CLPCNoj_.js`).then(e=>e.a);return{useAssistantUIStore:e}},__vite__mapDeps([8,1,4,3,9,10,11]));t.getState().removeCatalogPartition(e);let{publishNativeAssistantCatalog:r}=await S(async()=>{let{publishNativeAssistantCatalog:e}=await Promise.resolve().then(()=>$t);return{publishNativeAssistantCatalog:e}},void 0);await r().catch(()=>void 0)}return r},ot=1500,U=async(e,t,n)=>{let r=n?.fast?{totalTimeoutMs:De}:void 0,i=j({candidates:e})?.serverId??null,a=e.find(e=>e.kind===`relay`)??null,o=e.filter(e=>e.kind===`direct`),s=async()=>{for(let e of o){let n=O(e.url)||e.url,a=t?{Authorization:`Bearer ${t}`}:void 0,o=await L(`${n}/health`,{method:`GET`},r);if(!o?.ok)continue;if(i){let e=await o.json().catch(()=>null),t=e&&typeof e==`object`?e.serverId:null;if(typeof t==`string`&&t&&t!==i){P(`probe:server-id-mismatch`,{url:n});continue}}let s=await L(`${n}/auth/session`,{method:`GET`,credentials:`include`,headers:a},r);if(s?.status===401)return{status:`needs-login`};if(!s||!s.ok&&s.status!==404)continue;let c=await Ue(s);if(c&&c.disabled!==!0&&c.authenticated===!1)return{status:`needs-login`};let l=c?.disabled===!0;return!t&&y()&&!l&&c?.scope!==`client`?{status:`needs-login`}:{status:`ok`,transport:{kind:`direct`,url:n}}}return{status:`unreachable`}},c=async()=>{if(!a)return{status:`unreachable`};let{outcome:e,tunnel:r}=await We(a.relay,t,void 0,n?.fast?De:void 0,{keepTunnel:!0});return e===`ok`?{status:`ok`,transport:{kind:`relay`,relay:a.relay,tunnel:r}}:e===`needs-login`||e===`auth-failed`?{status:`needs-login`}:{status:`unreachable`}};return a?o.length===0?c():new Promise(e=>{let t=!1,n=!1,r,i=null,a=null,o=e=>{e?.status===`ok`&&e.transport.kind===`relay`&&e.transport.tunnel?.close()},l=n=>{t||(t=!0,e(n))},u=()=>{n||t||(r!==void 0&&(window.clearTimeout(r),r=void 0),c().then(e=>{if(a=e,t||n){o(e);return}if(e.status===`ok`||e.status===`needs-login`){l(e);return}i&&l(i)}))};s().then(e=>{if(i=e,!t){if(e.status===`ok`||e.status===`needs-login`){n=!0,r!==void 0&&window.clearTimeout(r),o(a),l(e);return}if(a){l(a);return}u()}}),r=window.setTimeout(u,ot)}):s()},W=(e,t,n)=>{e.kind===`relay`?Ge(e.relay,t,n?.grant,n?.runtimeKey,e.tunnel):s({apiBaseUrl:e.url,clientToken:t,runtimeKey:n?.runtimeKey}),xt()},st=()=>{let e=z()[0];return e?.label?.trim()?e.label:null},ct=async()=>{await rt();let e=z()[0];if(!e)return!1;let t;if(y()){if(!e.hasToken||(t=await B(N(e)),!t))return!1}else if(t=e.clientToken,!t)return!1;let n=await U(e.candidates,t);return n.status===`ok`&&(await H({id:e.id,label:e.label,candidates:e.candidates}),W(n.transport,t,{runtimeKey:N(e)}),!0)},lt=async(e,t)=>{let n=(await it()).find(t=>N(t)===e);if(!n)return`missing`;let r=y()?n.hasToken?await B(e):void 0:n.clientToken;if(!r)return`auth-required`;let i=t?.transportPreference===`relay`?n.candidates.filter(e=>e.kind===`relay`):n.candidates;if(i.length===0)return`offline`;let a=await U(i,r,{fast:!0});return a.status===`needs-login`?`auth-required`:a.status===`ok`?(W(a.transport,r,{runtimeKey:e}),`connected`):`offline`},ut=async(e,t)=>{let n=``;try{n=O(e.url)}catch{return!1}if(!n)return!1;let r=e.clientToken?.trim()||void 0,i=r?{Authorization:`Bearer ${r}`}:void 0,a=t?.fast?{totalTimeoutMs:De}:void 0;if(!(await L(`${n}/health`,{method:`GET`,headers:i},a))?.ok)return!1;let o=await L(`${n}/auth/session`,{method:`GET`,credentials:`include`,headers:i},a);if(!o||!o.ok&&o.status!==404)return!1;let s=await Ue(o);return!(s&&s.disabled!==!0&&s.authenticated===!1)},dt=e=>[...e].sort((e,t)=>{let n=(e.priority??100)-(t.priority??100);if(n!==0)return n;let r=e=>e.type===`relay`?2:+!e.url.startsWith(`https://`);return r(e)-r(t)}).flatMap(e=>{if(e.type===`relay`){let t=Le({relayUrl:e.relayUrl,serverId:e.serverId,hostEncPubJwk:e.hostEncPubJwk});return t?[{kind:`relay`,relay:t}]:[]}return Fe(e.url)}),ft=async e=>{let t=j({candidates:e})?.serverId??null;for(let r of e){if(r.kind===`relay`){let e=n(r.relay),t=await I(R,e.fetch(`/health`).catch(()=>null));if(P(`establish:relay:health`,{ok:t?.ok===!0,status:t?.status??null}),t?.ok)return{kind:`relay`,relay:r.relay,tunnel:e};e.close();continue}let e=O(r.url)||r.url,i=await L(`${e}/health`,{method:`GET`});if(P(`establish:direct:health`,{ok:i?.ok===!0,status:i?.status??null}),i?.ok){if(t){let n=await i.json().catch(()=>null),r=n&&typeof n==`object`?n.serverId:null;if(typeof r==`string`&&r&&r!==t){P(`establish:server-id-mismatch`,{url:e});continue}}return{kind:`direct`,url:e}}}return null},pt=async(e,t)=>{if(!i())return ut(e,t);let n=await I(t?.fast?De:R,d(`/auth/session`).then(e=>e).catch(()=>null));if(!n)return!0;if(n.status===401)return!1;if(!n.ok&&n.status!==404)return!0;let r=await Ue(n);return!(r&&r.disabled!==!0&&r.authenticated===!1)},mt=e=>e.kind===`relay`?i():!i()&&ke(e.url,u()),ht=()=>{let e=l();return e?z().find(t=>N(t)===e)??null:null},gt=e=>{let t=l();return!!t&&N(e)===t},_t=async()=>{let e=ht();if(!e)return`no-connection`;let t;if(t=y()?e.hasToken?await B(N(e)):void 0:e.clientToken,!t)return`unreachable`;let n=e.candidates.findIndex(e=>mt(e.kind===`relay`?{kind:`relay`,relay:e.relay}:{kind:`direct`,url:e.url})),r=await U(n>=0?e.candidates.slice(0,n):e.candidates,t,{fast:!0});if(r.status===`ok`)return await H({id:e.id,label:e.label,candidates:e.candidates}),W(r.transport,t,{runtimeKey:N(e)}),`switched`;if(r.status===`needs-login`)return`unreachable`;if(n>=0&&await pt({url:u(),clientToken:t},{fast:!0}))return xt(),`unchanged`;let i=await U(n>=0?e.candidates.slice(n+1):[],t,{fast:!0});return i.status===`ok`?(await H({id:e.id,label:e.label,candidates:e.candidates}),W(i.transport,t,{runtimeKey:N(e)}),`switched`):`unreachable`},vt=5e3,yt=!1,bt=async()=>{if(yt)return`skipped`;let e=ht();if(!e)return P(`candidates:refresh-skip`,{reason:`no-active-connection`}),`skipped`;let t=j(e);if(!t)return P(`candidates:refresh-skip`,{reason:`no-relay-candidate`}),`skipped`;yt=!0;try{let n=await I(R,d(`/api/client-auth/connection/candidates`).then(e=>e).catch(()=>null));if(!n?.ok)return P(`candidates:refresh-skip`,{reason:`fetch-failed`,status:n?.status??null}),`skipped`;let r=await n.json().catch(()=>null);if(!r||r.serverId!==t.serverId)return P(`candidates:refresh-skip`,{reason:`server-id-mismatch`}),`skipped`;let i=Array.isArray(r.candidates)?r.candidates:[],a=[];for(let e of i){if(!e||typeof e!=`object`)continue;let t=e;if(t.type===`lan`&&typeof t.url==`string`)try{let e=O(t.url);e&&!a.includes(e)&&a.push(e)}catch{}}if(a.length===0)return P(`candidates:refresh-skip`,{reason:`no-lan-reported`}),`skipped`;let o=A(e).filter(e=>e.url.startsWith(`https://`)),s=[...a.map(e=>({kind:`direct`,url:e})),...o,{kind:`relay`,relay:t}];return JSON.stringify(e.candidates.map(Je))===JSON.stringify(s.map(Je))?`unchanged`:(P(`candidates:refreshed`,{lanCount:a.length}),await H({id:e.id,label:e.label,candidates:s}),`updated`)}finally{yt=!1}},xt=()=>{typeof window>`u`||window.setTimeout(()=>{(async()=>{let e=await bt().catch(()=>`skipped`);P(`candidates:refresh-result`,{result:e}),e===`updated`&&i()&&await _t().catch(()=>null)})()},vt)},St=e=>{let{t}=re(),[n,r]=D.useState(()=>z()),[i,a]=D.useState(null),[o,s]=D.useState(null),[c,l]=D.useState(null),u=D.useRef(n),d=D.useRef(null),f=D.useRef(new Set),p=C(()=>{e(),f.current.forEach(e=>e())}),h=C(e=>(f.current.add(e),()=>f.current.delete(e))),g=C(e=>{u.current=e,r(e)}),_=C(e=>{d.current=e,a(e)}),v=C(e=>{d.current===e&&(d.current=null,a(null))});D.useEffect(()=>{let e=!1;return it().then(t=>{e||g(t)}),()=>{e=!0}},[g]);let b=C(e=>{let t=Xe(u.current,e);return g(t),Ye(t),t}),ee=C(async e=>{s(null),_(`connect`);try{let n=Ie(e);if(n.length===0){s(t(`mobile.connect.error.urlRequired`));return}let r=e.id?u.current.find(t=>t.id===e.id):u.current.find(e=>Ne(e.candidates,n)),i=e.label?.trim()||r?.label||Oe(M({candidates:n})),a=e.relayGrant,o=e.clientToken?.trim()||void 0,c=!!o;o||(y()?r?.hasToken&&(o=await B(N(r))):o=r?.clientToken),P(`connect:start`,{candidates:n.map(e=>e.kind),hasToken:!!o});let d=await U(n,o);if(P(`connect:probe`,{status:d.status}),d.status===`unreachable`){s(t(`mobile.connect.error.unreachable`));return}if(d.status===`needs-login`){b({id:r?.id,label:i,candidates:n}),l({id:r?.id??m(),label:i,candidates:n,relay:j({candidates:n})??void 0,relayGrant:a});return}let f=N({candidates:n});o&&c&&y()&&await V(f,o),b({id:r?.id,label:i,candidates:n,clientToken:o}),W(d.transport,o??null,{runtimeKey:f,grant:a}),p()}catch(e){console.warn(`[mobile-connect] connect threw`,e),s(t(`mobile.connect.error.invalidUrl`))}finally{v(`connect`)}}),x=C(async e=>{if(d.current===`pairing`)return;s(null),_(`pairing`);let n=dt(e.candidates),r=null,i=!1;try{if(r=await ft(n),!r){s(t(`mobile.connect.error.unreachable`));return}let a={method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({pairingId:e.pairingId,secret:e.secret,clientLabel:`OpenChamber Mobile`,clientKind:`mobile`,deviceName:`OpenChamber Mobile`,devicePlatform:Se(),dedupeKey:xe()})},o=r.kind===`relay`?await I(R,r.tunnel.fetch(`/api/client-auth/pairing/redeem`,a).catch(()=>null)):await L(`${r.url}/api/client-auth/pairing/redeem`,a);if(!o?.ok){s(t(`mobile.connect.error.authRequired`));return}let c=await o.json().catch(()=>null),l=typeof c?.clientToken==`string`?c.clientToken.trim():``;if(!l){s(t(`mobile.connect.error.authRequired`));return}let u=typeof c?.server?.label==`string`?c.server.label:``,d=e.label||u||Oe(M({candidates:n})),f=N({candidates:n});if(y()&&!await V(f,l)){s(t(`mobile.connect.error.authRequired`));return}b({label:d,candidates:n,clientToken:l}),W(r.kind===`relay`?{kind:`relay`,relay:r.relay,tunnel:r.tunnel}:{kind:`direct`,url:r.url},l,{runtimeKey:f}),i=r.kind===`relay`,p()}catch(e){console.warn(`[mobile-connect] pairing threw`,e),s(t(`mobile.connect.error.authRequired`))}finally{!i&&r?.kind===`relay`&&r.tunnel.close(),v(`pairing`)}}),S=C(async e=>{if(!c||!e.trim()||d.current===`password`)return;s(null),_(`password`);let{id:n,label:r,candidates:i}=c,a=null,o=!1;try{if(a=await ft(i),!a){s(t(`mobile.connect.error.unreachable`));return}let c={method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({password:e,trustDevice:!0,issueClientToken:!0,clientLabel:`OpenChamber Mobile`,clientKind:`mobile`,devicePlatform:Se(),dedupeKey:xe()})};P(`password:start`,{transport:a.kind});let u=a.kind===`relay`?await I(R,a.tunnel.fetch(`/auth/session`,c).catch(()=>null)):await L(`${a.url}/auth/session`,c);if(P(`password:done`,{ok:u?.ok===!0,status:u?.status??null}),!u?.ok){s(t(`mobile.connect.error.passwordFailed`));return}let d=await u.json().catch(()=>null),f=typeof d?.clientToken==`string`?d.clientToken.trim():``;if(P(`password:token`,{issued:!!f}),!f){if(a.kind===`direct`&&!y()){b({id:n,label:r,candidates:i}),l(null),W({kind:`direct`,url:a.url},null,{runtimeKey:N({candidates:i})}),p();return}s(t(`mobile.connect.error.authRequired`));return}y()&&await V(N({candidates:i}),f),b({id:n,label:r,candidates:i,clientToken:f}),l(null),W(a.kind===`relay`?{kind:`relay`,relay:a.relay,tunnel:a.tunnel}:{kind:`direct`,url:a.url},f,{runtimeKey:N({candidates:i})}),o=a.kind===`relay`,p()}catch(e){console.warn(`[mobile-connect] password threw`,e),s(t(`mobile.connect.error.passwordFailed`))}finally{!o&&a?.kind===`relay`&&a.tunnel.close(),v(`password`)}}),te=C(()=>{l(null),s(null)}),ne=C(async e=>{s(null);let n=Ie(e),r=e.id?u.current.find(t=>t.id===e.id)??null:null;if(r){let e=n.filter(e=>e.kind===`direct`),t=A(r).filter(t=>t.url.startsWith(`https://`)&&!e.some(e=>ke(e.url,t.url))),i=j(r);n=[...e,...t,...i?[{kind:`relay`,relay:i}]:[]]}if(n.length===0)return s(t(`mobile.connect.error.urlRequired`)),null;let i=e.clientToken?.trim()||void 0,a=e.label?.trim()||Oe(M({candidates:n}));if(y()){let e=N({candidates:n});if(i)await V(e,i);else if(r?.hasToken){let t=N(r);if(t&&e&&t!==e){let n=await B(t);n&&await V(e,n)}}}return b({id:e.id,label:a,candidates:n,clientToken:i}).find(e=>Ne(e.candidates,n))??null}),ie=C(async e=>{let t=u.current.find(t=>t.id===e)??null,n=await at(e);return g(n),t});return{connections:n,isBusy:i!==null,isPasswordBusy:i===`password`,error:o,pendingConnection:c,connect:ee,redeemPairingConnection:x,submitPassword:S,cancelPassword:te,saveConnection:ne,removeConnection:ie,subscribeConnected:h,setError:s}},Ct=async(e,t=3)=>{let n;for(let r=0;r<t;r+=1)try{await e();return}catch(e){n=e}throw n},wt=async(e,t,n=2)=>{let r=[...new Map(e.map(e=>[e.operationID,e])).values()],i=0;await Promise.all(Array.from({length:Math.min(Math.max(1,n),r.length)},async()=>{for(;i<r.length;){let e=r[i++];try{e.cleanupPhase&&e.cleanupPhase!==`files-released`?await t.cleanup(e.operationID):await t.deliver(e.operationID)}catch{}}}))},Tt=e=>!!(e.serverInstanceID&&e.assistantID&&e.name&&e.avatarSeed&&e.serverLabel&&e.connectionKey),Et=`openchamber.mobile-share.draft-handoff.v1`,Dt=`mobile-share-handoff:`,Ot=20971520,kt=20971520,At=e=>`${Dt}${e}`,jt=e=>e??(typeof window>`u`?null:window.localStorage),G=e=>{if(!e)return{};try{let t=JSON.parse(e.getItem(`openchamber.mobile-share.draft-handoff.v1`)||`{}`);return Object.fromEntries(Object.entries(t).flatMap(([e,t])=>{let n=typeof t.assistantID==`string`?t.assistantID:Rt(t),r=typeof t.transportIdentity==`string`?t.transportIdentity:t.targetDraftKey?.transportIdentity;if(!n||typeof t.serverInstanceID!=`string`||typeof t.connectionKey!=`string`||!r)return[];let i=t.phase===`cancelled`?`cancelled`:t.phase===`materialized`?`materialized`:`materializing`;return[[e,{...t,draftID:e,assistantID:n,transportIdentity:r,phase:i}]]}))}catch{return{}}},Mt=(e,t)=>{if(!e)return!1;try{return e.setItem(Et,JSON.stringify(t)),!0}catch{return!1}},Nt=(e,t)=>{let n=G(e);if(delete n[t],e)try{e.setItem(Et,JSON.stringify(n))}catch{return}},K=(e,t)=>Mt(e,{...G(e),[t.draftID]:t}),Pt=(e,t)=>`native-share:${e}:${t}`,Ft=(e,t)=>t?e?`${e}\n\n${t}`:t:e,It=e=>e.mime.startsWith(`image/`)&&e.byteSize>0&&e.byteSize<=Ot,Lt=(e,t)=>!!t?.syntheticParts.some(t=>t.partID===At(e.draftID)&&t.text===``&&t.attachments.length===0&&t.synthetic===!0),Rt=e=>{let t=e.targetDraftKey?.owner;return t?.kind!==`surface`||typeof t.ownerID!=`string`||!t.ownerID.startsWith(`assistant:`)?null:t.ownerID.slice(10)||null},zt=e=>({draftID:e.draftID,serverInstanceID:e.serverInstanceID,connectionKey:e.connectionKey,assistantID:e.assistantID,transportIdentity:e.transportIdentity}),Bt=async(e,t)=>{let n=jt(t),r=[];for(let t of Object.values(G(n))){if(t.phase===`cancelled`){r.push(zt(t));continue}if(t.phase===`materialized`)try{await e(t.draftID);let i={...t,phase:`cancelled`};if(!K(n,i))continue;r.push(zt(i))}catch{continue}}return r},Vt=(e,t)=>{let n=jt(t),r=G(n)[e.draftID];return!r||r.phase!==`cancelled`||r.serverInstanceID!==e.serverInstanceID||r.connectionKey!==e.connectionKey||r.assistantID!==e.assistantID||r.transportIdentity!==e.transportIdentity?!1:(Nt(n,e.draftID),!G(n)[e.draftID])},Ht=async(e,t)=>{let n=f({transportIdentity:e.transportIdentity},`assistant:${e.assistantID}`),r=t.captureDraftRuntime();if(r.transportIdentity!==e.transportIdentity)return!1;let i=t.getDraft(n),a=At(e.draftID);try{if(!i||!i.syntheticParts.some(e=>e.partID===a)){await t.flushDraftPersistence();let n=t.captureDraftRuntime();return n.transportIdentity===e.transportIdentity&&n.generation===r.generation}let o=await t.commitDraftSnapshot({key:n,expectedRevision:i.revision,runtime:r,values:new Map,snapshot:{text:i.text,attachments:i.attachments,syntheticParts:i.syntheticParts.filter(e=>e.partID!==a),mentions:i.mentions,...i.composerReferences===void 0?{}:{composerReferences:i.composerReferences}}});if(!o.current||!o.durable)return!1;await t.flushDraftPersistence();let s=t.captureDraftRuntime();return s.transportIdentity===e.transportIdentity&&s.generation===r.generation}catch{return!1}},Ut=async(e,t)=>{if(e.attachments.length>10||!e.attachments.every(It)||e.attachments.reduce((e,t)=>e+t.byteSize,0)>kt)throw Error(`invalid_share_attachment`);let n=jt(t.storage),r=f({transportIdentity:t.transportIdentity},`assistant:${e.assistantID}`),i=G(n)[e.draftID],a=!1;if(!i||g(i.targetDraftKey)!==g(r)){let a=t.input.getDraft(r);if(i={draftID:e.draftID,serverInstanceID:e.serverInstanceID,connectionKey:e.connectionKey,assistantID:e.assistantID,transportIdentity:t.transportIdentity,targetDraftKey:r,baseRevision:a?.revision??`absent`,resultText:Ft(a?.text??``,e.text),attachmentIDs:e.attachments.map((t,n)=>Pt(e.draftID,n)),phase:`materializing`},!K(n,i))throw Error(`handoff_journal_unavailable`)}if(i.phase===`cancelled`)return{durable:!0,cancelled:!0};(i.phase===`materialized`||Lt(i,t.input.getDraft(r)))&&(a=!0);for(let o=0;!a&&o<3;o++){let o=t.input.getDraft(r),s={...i,baseRevision:o?.revision??`absent`,resultText:Ft(o?.text??``,e.text),phase:`materializing`};if(!K(n,s))throw Error(`handoff_journal_unavailable`);i=s;let c=new Map,l=[];for(let n=0;n<e.attachments.length;n++){let r=e.attachments[n],a=i.attachmentIDs[n],o=p(a),s=await t.readAttachment(r);if(s.size!==r.byteSize)throw Error(`staged_file_unavailable`);c.set(o,s.type===r.mime?s:new Blob([s],{type:r.mime})),l.push({attachmentID:a,attachmentRefID:o,filename:r.originalName,mimeType:r.mime,size:r.byteSize,locator:{kind:`blob`,blobID:a},source:`local`})}let u={partID:At(e.draftID),text:``,attachments:[],synthetic:!0},d=o?.syntheticParts??[],f=await t.input.commitDraftSnapshot({key:r,expectedRevision:o?.revision??`absent`,runtime:t.input.captureDraftRuntime(),snapshot:{text:i.resultText,attachments:[...o?.attachments??[],...l],syntheticParts:d.some(e=>e.partID===u.partID)?d:[...d,u],mentions:o?.mentions??[],...o?.composerReferences===void 0?{}:{composerReferences:o.composerReferences}},values:c});if(f.durable&&f.current)a=!0;else if(f.status!==`conflict`)throw Error(`draft_handoff_${f.status}`)}if(!a)throw Error(`draft_handoff_conflict`);if(i.phase!==`materialized`&&(i={...i,phase:`materialized`},!K(n,i)))throw Error(`handoff_journal_unavailable`);try{await t.cancelDraft(e.draftID)}catch{return{durable:!0,cancelled:!1}}if(i={...i,phase:`cancelled`},!K(n,i))throw Error(`handoff_journal_unavailable`);return{durable:!0,cancelled:!0}},Wt=ee(`OpenChamberShare`),Gt=null,Kt=(e,t)=>l()===e&&c()===t,qt=e=>{if(b()){de(e);return}let t=ie.getState();t.setActiveTab(`assistant`),t.openAssistant(e)},Jt=async()=>{let e=(await Wt.pendingAssistantOpen().catch(()=>null))?.request;if(!e)return!1;let t=await lt(e.connectionKey);if(t===`missing`)return await Wt.ackAssistantOpen({requestID:e.requestID}).catch(()=>void 0),!0;if(t!==`connected`)return!0;let n=c();if(!Kt(e.connectionKey,n))return!0;try{let[t,r]=await Promise.all([T(),se()]);if(!Kt(e.connectionKey,n))return!0;let i=r.assistants.some(t=>t.id===e.assistantID&&t.enabled);if(!t.supported||!t.enabled||t.serverInstanceID!==e.serverInstanceID||!i)return await Wt.ackAssistantOpen({requestID:e.requestID}),!0;qt(e.assistantID),await Wt.ackAssistantOpen({requestID:e.requestID})}catch{}return!0},q=async()=>x.getPlatform()===`android`?Gt||(Gt=Jt().finally(()=>{Gt=null}),Gt):!1,Yt=new Intl.Segmenter(void 0,{granularity:`grapheme`}),Xt=/(?:\p{Extended_Pictographic}|\p{Regional_Indicator}|\u20e3)/u,Zt=e=>{let t=Yt.segment(e)[Symbol.iterator]().next().value?.segment;return!t||!Xt.test(t)?{displayName:e}:{avatarEmoji:t,displayName:e.slice(t.length).trimStart()}},J=_();function Qt(e){let t=(0,ge.c)(30),{draft:n,entries:r,busy:i,onSelect:a,onCancel:o}=e,{t:s}=re(),c;t[0]!==i||t[1]!==n||t[2]!==o?(c=()=>{n&&!i&&o(n)},t[0]=i,t[1]=n,t[2]=o,t[3]=c):c=t[3];let l=C(c),u;t[4]===l?u=t[5]:(u=e=>{e||l()},t[4]=l,t[5]=u);let d=C(u),f;t[6]!==n||t[7]!==a?(f=e=>{n&&a(n,e)},t[6]=n,t[7]=a,t[8]=f):f=t[8];let p=C(f),m=!!n,h;t[9]===s?h=t[10]:(h=s(`assistants.shareWelcome.example.note.title`),t[9]=s,t[10]=h);let g;t[11]===s?g=t[12]:(g=s(`settings.common.actions.cancel`),t[11]=s,t[12]=g);let _;t[13]!==i||t[14]!==l||t[15]!==h||t[16]!==g?(_=(0,J.jsx)(ce,{title:h,backAriaLabel:g,onBack:l,backDisabled:i,overlay:!0}),t[13]=i,t[14]=l,t[15]=h,t[16]=g,t[17]=_):_=t[17];let v;t[18]!==i||t[19]!==r||t[20]!==p||t[21]!==s?(v=r.length?(0,J.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-3 pb-[max(0.75rem,env(safe-area-inset-bottom))] pt-[calc(max(0.25rem,var(--oc-safe-area-top,0px))+var(--oc-mobile-detail-navigation-height,3.5rem)+0.75rem)]`,role:`listbox`,"aria-label":s(`assistants.listAria`),children:r.map(e=>{let t=Zt(e.name),n=t.displayName||e.name;return(0,J.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":`false`,disabled:i,className:`flex w-full items-center gap-3 border-b border-border/60 px-3 py-4 text-left text-foreground transition-colors last:border-b-0 hover:bg-interactive-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-60`,onClick:()=>p(e),children:[(0,J.jsx)(me,{name:e.avatarSeed,emoji:t.avatarEmoji,size:36,label:n}),(0,J.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,J.jsx)(`span`,{className:`block truncate font-semibold`,children:n}),(0,J.jsx)(`span`,{className:`block truncate typography-small text-muted-foreground`,children:e.serverLabel})]}),(0,J.jsx)(he,{name:`arrow-right-s`,className:`size-4 shrink-0 text-muted-foreground`})]},`${e.connectionKey}:${e.assistantID}`)})}):(0,J.jsx)(`p`,{className:`px-5 pb-[max(1.25rem,env(safe-area-inset-bottom))] pt-[calc(max(0.25rem,var(--oc-safe-area-top,0px))+var(--oc-mobile-detail-navigation-height,3.5rem)+0.75rem)] typography-ui text-muted-foreground`,children:s(`assistants.state.unavailable`)}),t[18]=i,t[19]=r,t[20]=p,t[21]=s,t[22]=v):v=t[22];let y;t[23]!==_||t[24]!==v?(y=(0,J.jsxs)(fe,{className:`h-[100dvh] max-h-none w-screen max-w-none gap-0 overflow-hidden rounded-none border-0 bg-background p-0`,containerClassName:`items-stretch p-0`,overlayClassName:`bg-background`,showCloseButton:!1,children:[_,v]}),t[23]=_,t[24]=v,t[25]=y):y=t[25];let b;return t[26]!==d||t[27]!==m||t[28]!==y?(b=(0,J.jsx)(pe,{open:m,onOpenChange:d,children:y}),t[26]=d,t[27]=m,t[28]=y,t[29]=b):b=t[29],b}var $t=t({MobileShareBridge:()=>Nn,donateNativeAssistantInteraction:()=>Sn,publishNativeAssistantCatalog:()=>xn,refreshNativeAssistantCatalog:()=>Q}),Y=ee(`OpenChamberShare`),en=`openchamber.mobile-share.outbox.v1`,tn=()=>x.isNativePlatform(),nn=()=>{try{return JSON.parse(window.localStorage.getItem(en)||`{}`)}catch{return{}}},rn=e=>{try{window.localStorage.setItem(en,JSON.stringify(e))}catch{}},X=e=>{let t=nn(),n=t[e.envelope.operationID];n&&n.updatedAt>e.updatedAt||(t[e.envelope.operationID]=e,rn(t))},Z=(e,t)=>l()===e&&c()===t,an=new Map,on=null,sn=null,cn=!1,ln=[],un=0,dn=new Set,fn=new Map,pn=1,mn=e=>{e.map(e=>e.draftID).join(`
3
- `)!==ln.map(e=>e.draftID).join(`
4
- `)&&(ln=e,un+=1,dn.forEach(e=>e()))},hn=e=>mn(ln.filter(t=>t.draftID!==e)),gn=e=>(dn.add(e),()=>dn.delete(e)),_n=()=>un,vn=async e=>{if(!e.mime.startsWith(`image/`))throw Error(`unsupported_share_attachment`);let t=e.stagedPath.trim();if(!t)throw Error(`staged_file_unavailable`);let n=/^(?:data:|https?:|content:|file:)/i.test(t)?t:`file://${t}`,r=/^(?:data:|https?:)/i.test(n)?n:x.convertFileSrc(n);return await fetch(r).then(e=>{if(!e.ok)throw Error(`staged_file_unavailable`);return e.blob()})},yn=async e=>{let t=await vn(e);return await new Promise((e,n)=>{let r=new FileReader;r.onerror=()=>n(Error(`staged_file_unavailable`)),r.onload=()=>typeof r.result==`string`?e(r.result):n(Error(`staged_file_unavailable`)),r.readAsDataURL(t)})},bn=async e=>{let t=[];if(e.text?.trim()&&t.push({type:`text`,text:e.text}),e.attachments.length>10)throw Error(`too_many_share_attachments`);for(let n of e.attachments){if(n.byteSize<=0||n.byteSize>20971520)throw Error(`invalid_share_attachment`);t.push({type:`file`,mime:n.mime,url:await yn(n)})}if(t.length===0)throw Error(`empty_share`);return t},Q=async()=>{if(!tn())return;let e=l(),t=(await it()).find(t=>Me(t)===e);if(!t)return;let n=c();try{let[r,i]=await Promise.all([T(),ae()]);if(!Z(e,n)||!r.supported||!r.serverInstanceID)return;let a=r.serverInstanceID,o=i.assistants.map(n=>({serverInstanceID:a,assistantID:n.id,name:n.name,avatarSeed:n.id,serverLabel:t.label,connectionKey:e,enabled:r.enabled&&n.enabled,isDefaultShareTarget:!1}));E.getState().replaceCatalogPartition({serverInstanceID:a,connectionKey:e,revision:i.revision,lastLoadedAt:Date.now(),entries:o}),await xn()}catch{}},xn=async()=>{if(!tn())return;let e=Object.values(E.getState().assistantCatalogByConnection).flatMap(e=>e.entries).map(e=>{let t=Zt(e.name);return{...e,name:t.displayName||e.name,...t.avatarEmoji?{avatarEmoji:t.avatarEmoji}:{}}});await Y.updateCatalog({entries:e})},Sn=async e=>{x.getPlatform()===`ios`&&await Y.donateAssistantInteraction(e)},Cn=e=>{let t=an.get(e.operationID);if(t)return t;let n=Tn(e);return an.set(e.operationID,n),n.finally(()=>{an.get(e.operationID)===n&&an.delete(e.operationID)}).catch(()=>void 0),n},wn=async e=>{e.cleanupPhase!==`files-released`&&(e.cleanupPhase===`server-completed`&&(await Ct(()=>Y.ack({operationID:e.envelope.operationID})),e={...e,state:`delivered`,cleanupPhase:`native-acked`,updatedAt:Date.now()},X(e)),e.cleanupPhase===`native-acked`&&(await Ct(()=>Y.releaseFiles({operationID:e.envelope.operationID})),X({...e,state:`delivered`,cleanupPhase:`files-released`,updatedAt:Date.now()})))},Tn=async e=>{let t=nn()[e.operationID];if(t?.cleanupPhase){await wn(t);return}let n=t?.messageID?t:{envelope:e,messageID:h(`msg`),state:t?.state??`pending`,cleanupPhase:t?.cleanupPhase,updatedAt:Date.now(),error:t?.error};X(n),n={...n,state:`resolving-instance`,updatedAt:Date.now()},X(n);let r=Object.values(E.getState().assistantCatalogByConnection).find(t=>t.serverInstanceID===e.serverInstanceID&&t.entries.some(t=>t.assistantID===e.assistantID));if(!r){X({...n,state:`target-stale`,updatedAt:Date.now()});return}n={...n,state:`connecting`,updatedAt:Date.now()},X(n);let i=await lt(r.connectionKey);if(i===`auth-required`){X({...n,state:`auth-required`,updatedAt:Date.now()});return}if(i!==`connected`){X({...n,state:`offline`,updatedAt:Date.now()});return}let a=c(),s=null;if(Z(r.connectionKey,a)){try{if(await d(`/api/config/settings`).catch(()=>void 0),!Z(r.connectionKey,a))return;let[t,i]=await Promise.all([T(),ae()]);if(!Z(r.connectionKey,a)||!t.supported||t.serverInstanceID!==e.serverInstanceID){X({...n,state:`target-stale`,updatedAt:Date.now()});return}let c=i.assistants.find(t=>t.id===e.assistantID&&t.enabled);if(!t.enabled||!c){X({...n,state:`target-stale`,updatedAt:Date.now()});return}n={...n,state:`dispatching`,updatedAt:Date.now()},X(n);let l=await bn(e);if(!Z(r.connectionKey,a))return;n={...n,state:`reconciling`,updatedAt:Date.now()},X(n);let u=await le(c.id,e.operationID,n.messageID,l,e.source),f=await ue(u,o(),a),p=await se().catch(e=>(X({...n,state:`reconciling`,updatedAt:Date.now(),error:e instanceof Error?e.message:`snapshot_refresh_failed`}),null));if(!p)return;if(!Z(r.connectionKey,a)){X({...n,state:`reconciling`,updatedAt:Date.now(),error:`runtime_stale`});return}let m=p.assistants.find(e=>e.id===c.id);if(!m||m.sessionID!==f.sessionID){X({...n,state:`reconciling`,updatedAt:Date.now(),error:`assistant_binding_mismatch`});return}s=m.id}catch(e){if(e instanceof oe&&e.code===`share_unresolved`||e instanceof Error&&e.message===`runtime_stale`){X({...n,state:`reconciling`,updatedAt:Date.now(),error:e instanceof Error?e.message:`share_unresolved`});return}X({...n,state:`failed`,updatedAt:Date.now(),error:e instanceof Error?e.message:`dispatch_failed`});return}n={...n,state:`delivered`,cleanupPhase:`server-completed`,updatedAt:Date.now()},X(n),qt(s),await wn(n)}},En=async()=>on||(on=Dn().finally(()=>{on=null}),on),Dn=async()=>{if(!tn())return;let e=await Y.listPending().catch(()=>null),t=new Map((e?.envelopes??[]).map(e=>[e.operationID,e])),n=nn();await wt([...[...t.values()].map(e=>({operationID:e.operationID,cleanupPhase:n[e.operationID]?.cleanupPhase})),...Object.values(n).filter(e=>!t.has(e.envelope.operationID)&&(!!(e.cleanupPhase&&e.cleanupPhase!==`files-released`)||e.state!==`delivered`&&e.state!==`auth-required`&&e.state!==`target-stale`)).map(e=>({operationID:e.envelope.operationID,cleanupPhase:e.cleanupPhase}))],{deliver:async e=>{let r=t.get(e)??n[e]?.envelope;r&&await Cn(r)},cleanup:async e=>{let t=nn()[e];t&&await wn(t)}},pn)},$=async()=>(cn=!0,sn||(sn=(async()=>{do cn=!1,await Mn();while(cn)})().finally(()=>{sn=null,cn&&$()}),sn)),On=async e=>{if(l()!==e.connectionKey&&await lt(e.connectionKey)!==`connected`)return!1;let t=c();if(!Z(e.connectionKey,t)||o()!==e.transportIdentity||(await d(`/api/config/settings`).catch(()=>void 0),!Z(e.connectionKey,t)||o()!==e.transportIdentity)||!await w.getState().hydrateDraftMetadata(e.transportIdentity)||!Z(e.connectionKey,t)||o()!==e.transportIdentity)return!1;let[n,r]=await Promise.all([T(),se()]);return!Z(e.connectionKey,t)||o()!==e.transportIdentity||!n.supported||!n.enabled||n.serverInstanceID!==e.serverInstanceID||!r.assistants.some(t=>t.id===e.assistantID&&t.enabled)?!1:(qt(e.assistantID),!0)},kn=async e=>{let t=l(),n=c();if(await d(`/api/config/settings`).catch(()=>void 0),!Z(t,n))return null;try{let[r,i]=await Promise.all([T(),se()]);return!Z(t,n)||!r.supported||!r.enabled||r.serverInstanceID!==e.serverInstanceID||!i.assistants.some(t=>t.id===e.assistantID&&t.enabled)?null:{runtimeKey:t,generation:n,transportIdentity:o()}}catch{return null}},An=async e=>{let t=Object.values(E.getState().assistantCatalogByConnection).find(t=>t.serverInstanceID===e.serverInstanceID&&t.connectionKey===e.connectionKey&&t.entries.some(t=>t.assistantID===e.assistantID));if(!t)return!1;let n=await kn(e);if(!n&&(await lt(t.connectionKey,{transportPreference:`relay`})!==`connected`||(n=await kn(e),!n)))return!1;let{runtimeKey:r,generation:i,transportIdentity:a}=n;if(!await w.getState().hydrateDraftMetadata(a)||!Z(r,i)||o()!==a)return!1;let s=await Ut(e,{input:w.getState(),transportIdentity:a,cancelDraft:e=>Y.cancelDraft({draftID:e}),readAttachment:vn});if(!s.durable||!s.cancelled||!Z(r,i)||o()!==a)return!1;let c={draftID:e.draftID,serverInstanceID:e.serverInstanceID,connectionKey:e.connectionKey,assistantID:e.assistantID,transportIdentity:a};return qt(e.assistantID),await Ht(c,w.getState())&&Vt(c),!0},jn=e=>{let t=fn.get(e.draftID);if(t)return t;let n=An(e).catch(()=>!1).finally(()=>{fn.get(e.draftID)===n&&fn.delete(e.draftID)});return fn.set(e.draftID,n),n},Mn=async()=>{if(x.getPlatform()!==`android`)return;let e=await Bt(e=>Y.cancelDraft({draftID:e}));for(let t of e)try{await On(t)&&await Ht(t,w.getState())&&Vt(t)}catch{}let t=await Y.listDrafts().catch(()=>null);if(!t)return;let n=[...t?.drafts??[]].sort((e,t)=>e.createdAt-t.createdAt);mn(n.filter(e=>!Tt(e)));for(let e of n)Tt(e)&&await jn(e)},Nn=()=>{let e=(0,ge.c)(11);D.useSyncExternalStore(gn,_n,_n);let t=E(Pn),[n,r]=D.useState(null),i=D.useRef(null),a;e[0]===t?a=e[1]:(a=Object.values(t).flatMap(Fn).filter(In).sort(Ln),e[0]=t,e[1]=a);let o=a,s=ln[0]??null,c;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(e,t)=>{i.current||(i.current=e.draftID,r(e.draftID),jn({...e,serverInstanceID:t.serverInstanceID,assistantID:t.assistantID,name:t.name,avatarSeed:t.avatarSeed,serverLabel:t.serverLabel,connectionKey:t.connectionKey}).then(t=>{t&&hn(e.draftID)}).finally(()=>{i.current===e.draftID&&(i.current=null),r(t=>t===e.draftID?null:t)}))},e[2]=c):c=e[2];let l=C(c),u;e[3]===n?u=e[4]:(u=e=>{n!==e.draftID&&(hn(e.draftID),Y.cancelDraft({draftID:e.draftID}).catch(Rn))},e[3]=n,e[4]=u);let d=C(u),f;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(f=[],e[5]=f):f=e[5],D.useEffect(qn,f);let p=n===s?.draftID,m;return e[6]!==d||e[7]!==o||e[8]!==l||e[9]!==p?(m=(0,J.jsx)(Qt,{draft:s,entries:o,busy:p,onSelect:l,onCancel:d}),e[6]=d,e[7]=o,e[8]=l,e[9]=p,e[10]=m):m=e[10],m};function Pn(e){return e.assistantCatalogByConnection}function Fn(e){return e.entries}function In(e){return e.enabled}function Ln(e,t){return Number(t.isDefaultShareTarget)-Number(e.isDefaultShareTarget)||e.serverLabel.localeCompare(t.serverLabel)||e.name.localeCompare(t.name)}function Rn(){$()}function zn(){Q(),$(),q()}function Bn(){Q(),En(),$(),q()}function Vn(){En()}function Hn(){}function Un(){$()}function Wn(){}function Gn(){q()}function Kn(){}function qn(){if(!tn())return;Q(),En(),$(),q();let e=a(zn),t=Bn;window.addEventListener(`openchamber:system-resume`,t);let n=!1,r=null,i=null,o=null;return Y.addListener(`shareReceived`,Vn).then(e=>{n?e.remove():r=e}).catch(Hn),Y.addListener(`shareDraftReceived`,Un).then(e=>{n?e.remove():i=e}).catch(Wn),Y.addListener(`assistantOpenRequested`,Gn).then(e=>{n?e.remove():o=e}).catch(Kn),()=>{n=!0,e(),window.removeEventListener(`openchamber:system-resume`,t),r&&r.remove(),i&&i.remove(),o&&o.remove()}}export{Zt as a,M as c,_t as d,St as f,Q as i,st as l,Sn as n,q as o,xn as r,ct as s,Nn as t,gt as u};