@iaforged/context-code 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/dist/src/bridge/bridgeMain.js +1 -1
  2. package/dist/src/bridge/types.js +1 -1
  3. package/dist/src/cli/handlers/auth.js +1 -1
  4. package/dist/src/cli/handlers/mcp.js +1 -1
  5. package/dist/src/cli/print.js +1 -1
  6. package/dist/src/commands/copy/copy.js +1 -1
  7. package/dist/src/commands/heartbeat/heartbeat.js +1 -0
  8. package/dist/src/commands/heartbeat/index.js +1 -0
  9. package/dist/src/commands/insights.js +1 -1
  10. package/dist/src/commands/install-github-app/ExistingWorkflowStep.js +1 -1
  11. package/dist/src/commands/install-github-app/InstallAppStep.js +1 -1
  12. package/dist/src/commands/install-github-app/OAuthFlowStep.js +1 -1
  13. package/dist/src/commands/install-github-app/SuccessStep.js +1 -1
  14. package/dist/src/commands/install-github-app/setupGitHubActions.js +1 -1
  15. package/dist/src/commands/login-openai/index.js +1 -1
  16. package/dist/src/commands/mobile/mobile.js +1 -1
  17. package/dist/src/commands/remote-setup/remote-setup.js +1 -1
  18. package/dist/src/commands/swarm-auto/swarmAuto.js +1 -1
  19. package/dist/src/commands/timeline/timeline.js +1 -1
  20. package/dist/src/commands/webapp/webapp.js +1 -1
  21. package/dist/src/commands.js +1 -1
  22. package/dist/src/components/ApproveApiKey.js +1 -1
  23. package/dist/src/components/ChannelDowngradeDialog.js +1 -1
  24. package/dist/src/components/ClaudeCodeHint/PluginHintMenu.js +1 -1
  25. package/dist/src/components/ConsoleOAuthFlow.js +1 -1
  26. package/dist/src/components/CostThresholdDialog.js +1 -1
  27. package/dist/src/components/CtrlOToExpand.js +1 -1
  28. package/dist/src/components/CustomSelect/select.js +1 -1
  29. package/dist/src/components/DesktopHandoff.js +1 -1
  30. package/dist/src/components/DesktopUpsell/DesktopUpsellStartup.js +1 -1
  31. package/dist/src/components/ExportDialog.js +1 -1
  32. package/dist/src/components/Feedback.js +1 -1
  33. package/dist/src/components/FeedbackSurvey/FeedbackSurvey.js +1 -1
  34. package/dist/src/components/FeedbackSurvey/FeedbackSurveyView.js +1 -1
  35. package/dist/src/components/IdeAutoConnectDialog.js +1 -1
  36. package/dist/src/components/IdeOnboardingDialog.js +1 -1
  37. package/dist/src/components/IdleReturnDialog.js +1 -1
  38. package/dist/src/components/InterruptedByUser.js +1 -1
  39. package/dist/src/components/InvalidConfigDialog.js +1 -1
  40. package/dist/src/components/InvalidSettingsDialog.js +1 -1
  41. package/dist/src/components/LanguagePicker.js +1 -1
  42. package/dist/src/components/LogSelector.js +1 -1
  43. package/dist/src/components/LogoV2/ChannelsNotice.js +1 -1
  44. package/dist/src/components/LogoV2/LogoV2.js +1 -1
  45. package/dist/src/components/LogoV2/feedConfigs.js +1 -1
  46. package/dist/src/components/LspRecommendation/LspRecommendationMenu.js +1 -1
  47. package/dist/src/components/MCPServerApprovalDialog.js +1 -1
  48. package/dist/src/components/MCPServerDesktopImportDialog.js +1 -1
  49. package/dist/src/components/ManagedSettingsSecurityDialog/ManagedSettingsSecurityDialog.js +1 -1
  50. package/dist/src/components/MessageSelector.js +1 -1
  51. package/dist/src/components/OutputStylePicker.js +1 -1
  52. package/dist/src/components/PromptInput/PromptInput.js +1 -1
  53. package/dist/src/components/RemoteCallout.js +1 -1
  54. package/dist/src/components/ResumeTask.js +1 -1
  55. package/dist/src/components/Settings/Config.js +1 -1
  56. package/dist/src/components/ShowInIDEPrompt.js +1 -1
  57. package/dist/src/components/Stats.js +1 -1
  58. package/dist/src/components/TagTabs.js +1 -1
  59. package/dist/src/components/TeleportError.js +1 -1
  60. package/dist/src/components/TeleportResumeWrapper.js +1 -1
  61. package/dist/src/components/TextInput.js +1 -1
  62. package/dist/src/components/agents/new-agent-creation/wizard-steps/MethodStep.js +1 -1
  63. package/dist/src/components/design-system/KeyboardShortcutHint.js +1 -1
  64. package/dist/src/components/diff/DiffDetailView.js +1 -1
  65. package/dist/src/components/grove/Grove.js +1 -1
  66. package/dist/src/components/hooks/SelectEventMode.js +1 -1
  67. package/dist/src/components/hooks/SelectHookMode.js +1 -1
  68. package/dist/src/components/hooks/SelectMatcherMode.js +1 -1
  69. package/dist/src/components/hooks/ViewHookMode.js +1 -1
  70. package/dist/src/components/mcp/MCPAgentServerMenu.js +1 -1
  71. package/dist/src/components/mcp/utils/reconnectHelpers.js +1 -1
  72. package/dist/src/components/memory/MemoryFileSelector.js +1 -1
  73. package/dist/src/components/messages/AssistantTextMessage.js +1 -1
  74. package/dist/src/components/messages/PlanApprovalMessage.js +1 -1
  75. package/dist/src/components/messages/ShutdownMessage.js +1 -1
  76. package/dist/src/components/messages/SystemAPIErrorMessage.js +1 -1
  77. package/dist/src/components/messages/UserPlanMessage.js +1 -1
  78. package/dist/src/components/permissions/AskUserQuestionPermissionRequest/PreviewQuestionView.js +1 -1
  79. package/dist/src/components/permissions/ComputerUseApproval/ComputerUseApproval.js +1 -1
  80. package/dist/src/components/permissions/FileEditPermissionRequest/FileEditPermissionRequest.js +1 -1
  81. package/dist/src/components/permissions/FilePermissionDialog/FilePermissionDialog.js +1 -1
  82. package/dist/src/components/permissions/FilePermissionDialog/permissionOptions.js +1 -1
  83. package/dist/src/components/permissions/FileWritePermissionRequest/FileWritePermissionRequest.js +1 -1
  84. package/dist/src/components/permissions/FilesystemPermissionRequest/FilesystemPermissionRequest.js +1 -1
  85. package/dist/src/components/permissions/PermissionRequest.js +1 -1
  86. package/dist/src/components/permissions/SedEditPermissionRequest/SedEditPermissionRequest.js +1 -1
  87. package/dist/src/components/permissions/SkillPermissionRequest/SkillPermissionRequest.js +1 -1
  88. package/dist/src/components/permissions/WebFetchPermissionRequest/WebFetchPermissionRequest.js +1 -1
  89. package/dist/src/components/permissions/rules/AddPermissionRules.js +1 -1
  90. package/dist/src/components/permissions/rules/AddWorkspaceDirectory.js +1 -1
  91. package/dist/src/components/permissions/rules/PermissionRuleList.js +1 -1
  92. package/dist/src/components/permissions/rules/RemoveWorkspaceDirectory.js +1 -1
  93. package/dist/src/components/sandbox/SandboxConfigTab.js +1 -1
  94. package/dist/src/components/sandbox/SandboxOverridesTab.js +1 -1
  95. package/dist/src/components/tasks/RemoteSessionDetailDialog.js +1 -1
  96. package/dist/src/constants/outputStyles.js +1 -1
  97. package/dist/src/entrypoints/cli.js +1 -1
  98. package/dist/src/hooks/notifs/useCanSwitchToExistingSubscription.js +1 -1
  99. package/dist/src/main.js +1 -1
  100. package/dist/src/projectOnboardingState.js +1 -1
  101. package/dist/src/screens/REPL.js +1 -1
  102. package/dist/src/services/api/errors.js +1 -1
  103. package/dist/src/services/api/filesApi.js +1 -1
  104. package/dist/src/services/tips/tipRegistry.js +1 -1
  105. package/dist/src/tasks/RemoteAgentTask/RemoteAgentTask.js +1 -1
  106. package/dist/src/tools/AgentTool/AgentTool.js +1 -1
  107. package/dist/src/tools/ConfigTool/supportedSettings.js +1 -1
  108. package/dist/src/tools/EnterWorktreeTool/EnterWorktreeTool.js +1 -1
  109. package/dist/src/tools/ExitWorktreeTool/ExitWorktreeTool.js +1 -1
  110. package/dist/src/tools/WebFetchTool/WebFetchTool.js +1 -1
  111. package/dist/src/utils/computerUse/cleanup.js +1 -1
  112. package/dist/src/utils/computerUse/wrapper.js +1 -1
  113. package/dist/src/utils/fileHistory.js +1 -1
  114. package/dist/src/utils/heartbeat.js +1 -0
  115. package/dist/src/utils/model/providers.js +1 -1
  116. package/dist/src/utils/permissions/filesystem.js +1 -1
  117. package/dist/src/utils/permissions/permissions.js +1 -1
  118. package/dist/src/utils/processUserInput/processSlashCommand.js +1 -1
  119. package/dist/src/utils/releaseNoteTranslations.js +1 -1
  120. package/dist/src/utils/shell/shellToolUtils.js +1 -1
  121. package/dist/src/utils/sshMcp/common.js +1 -0
  122. package/dist/src/utils/sshMcp/setup.js +1 -0
  123. package/dist/src/utils/sshMcp/sshMcpServer.js +1 -0
  124. package/dist/src/utils/sshMcp/sshMcpServer.test.js +1 -0
  125. package/dist/src/utils/teleport.js +1 -1
  126. package/dist/src/webapp/server.js +1 -1
  127. package/dist/sshMcpServer.js +1 -0
  128. package/dist/sshMcpServer.test.js +1 -0
  129. package/dist/webapp/chunk-AMCDNAIG.js +1 -0
  130. package/dist/webapp/{chunk-YUEYJPXQ.js → chunk-NFYBHCXF.js} +1 -1
  131. package/dist/webapp/{chunk-DFKSSBHI.js → chunk-OJZNEHPP.js} +1 -1
  132. package/dist/webapp/chunk-VAB2VXFI.js +1 -0
  133. package/dist/webapp/index.html +2 -2
  134. package/dist/webapp/main-MTQLKGXD.js +1 -0
  135. package/dist/webapp/ngsw.json +14 -14
  136. package/dist/webapp/styles-DIKEDJBH.css +1 -0
  137. package/package.json +2 -1
  138. package/dist/webapp/chunk-4SRNXNLW.js +0 -1
  139. package/dist/webapp/chunk-SIHYW6PA.js +0 -1
  140. package/dist/webapp/main-LBNRQBXX.js +0 -1
  141. package/dist/webapp/styles-FUPULZDX.css +0 -1
@@ -0,0 +1 @@
1
+ import{a as e,b as t,c as o,d as n}from"./chunk-OJZNEHPP.js";import{$ as r,Aa as s,Da as l,E as a,Ea as d,F as c,G as u,J as p,N as h,R as m,S as f,T as x,U as b,V as g,W as v,X as w,Y as k,Z as y,_ as C,a as M,aa as S,b as I,ba as j,ca as T,da as P,ea as $,fa as L,ga as E,ha as z,ia as A,ja as W,ka as B,la as V,ma as D,na as F,s as _,ta as H,ua as q,v as O,w as G,x as N,y as Q}from"./chunk-VAB2VXFI.js";var U=["scroller"],K=["inputRef"],J=["mobileThinkingScroller"],R=(e,t)=>t.id,me=(e,t)=>t.valueToInsert,pe=(e,t)=>t.previewUrl,ue=(e,t)=>t.filename,xe=(e,t)=>t.path,_e=(e,t)=>t.value;function he(e,t){1&e&&(C(0,"div",88),A(1," Cargando conversaciones desde la CLI… "),r())}function fe(e,t){if(1&e){let e=j();C(0,"button",91),T("click",function(){let t=O(e).$implicit,o=P(2);return G(o.selectSession(t.id))}),C(1,"div",92),A(2),r(),C(3,"div",93)(4,"span",94),A(5),r(),C(6,"span"),A(7),r()()()}if(2&e){let e=t.$implicit,o=P(2);b("bg-chrome-border",o.activeSessionId()===e.id)("border-l-2",o.activeSessionId()===e.id)("border-l-purple-500",o.activeSessionId()===e.id),u(2),W(e.title),u(3),B("",e.messageCount," msgs"),u(2),W(o.sessionTime(e.modified))}}function Ce(e,t){if(1&e){let e=j();C(0,"aside",7)(1,"div",78)(2,"span",79),A(3,"Sesiones"),r(),C(4,"button",80),T("click",function(){O(e);let t=P();return G(t.toggleSidebar())}),N(),C(5,"svg",81),S(6,"path",82),r()()(),Q(),C(7,"button",83),T("click",function(){O(e);let t=P();return G(t.newSession())}),N(),C(8,"svg",84),S(9,"path",85),r(),A(10," Nueva conversación "),r(),Q(),C(11,"div",86)(12,"div",87),A(13),r(),h(14,he,2,0,"div",88),k(15,fe,8,9,"button",89,R),r(),C(17,"div",90),A(18," Conversaciones sincronizadas con la CLI "),r()()}if(2&e){let e=P();u(13),B(" Historial CLI (",e.cliSessions().length,") "),u(),v(0===e.cliSessions().length?14:-1),u(),y(e.cliSessions())}}function be(e,t){if(1&e&&A(0),2&e){let e=P();B(" · ",e.shortCwd()," ")}}function ve(e,t){1&e&&(C(0,"span",20),S(1,"span",95),A(2," trabajando "),r())}function ge(e,t){if(1&e){let e=j();C(0,"button",96),T("click",function(){O(e);let t=P();return G(t.showMobileThinking.set(!0))}),N(),C(1,"svg",12),S(2,"path",65)(3,"path",66),r()()}if(2&e){let e=P();u(),b("animate-pulse",e.isThinking())}}function we(e,t){1&e&&S(0,"span",97)(1,"span",98)}function ke(e,t){1&e&&S(0,"span",24)}function Se(e,t){if(1&e){let e=j();C(0,"div",105),T("click",function(){let t=O(e).$implicit,o=P(4);return G(o.openImageModal(t))}),S(1,"img",106),r()}if(2&e){let e=t.$implicit;u(),f("src",e,c)}}function ye(e,t){if(1&e&&(C(0,"div",101),k(1,Se,2,1,"div",104,w),r()),2&e){let e=P(2).$implicit;u(),y(e.images)}}function Ee(e,t){if(1&e&&(C(0,"div",99)(1,"div",100),h(2,ye,3,0,"div",101),C(3,"div",102),A(4),r(),C(5,"div",103),A(6),r()()()),2&e){let e=P().$implicit,t=P();u(),g(t.bubbleClass(e)),u(),v(e.images&&e.images.length>0?2:-1),u(2),W(e.text),u(2),W(t.timeLabel(e.ts))}}function Te(e,t){if(1&e&&(C(0,"div",108),A(1),r()),2&e){let e,t=P(2).$implicit;u(),B(" 🔧 ",null!==(e=t.toolName)&&void 0!==e?e:"herramienta"," ")}}function Ie(e,t){if(1&e&&(C(0,"div",37)(1,"div",107),h(2,Te,2,1,"div",108),C(3,"div",102),A(4),r(),C(5,"div",103),A(6),r()()()),2&e){let e=P().$implicit,t=P();u(),g(t.bubbleClass(e)),u(),v("tool"===e.role?2:-1),u(2),W(e.text),u(2),W(t.timeLabel(e.ts))}}function Ve(e,t){if(1&e&&h(0,Ee,7,5,"div",99)(1,Ie,7,5,"div",37),2&e){let e=t.$implicit;v("user"===e.role?0:1)}}function Me(e,t){1&e&&(C(0,"div",36)(1,"div",109),A(2,"👋"),r(),C(3,"div",110),A(4,"Conectado al CLI"),r(),C(5,"div",18),A(6," Empezá una conversación o tipeá "),C(7,"code",111),A(8,"/"),r(),A(9," para ver los comandos disponibles. "),r()())}function Fe(e,t){if(1&e){let e=j();C(0,"div",37)(1,"div",112)(2,"div",113)(3,"span",114),A(4,"⚠️"),r(),C(5,"span",115),A(6,"Permiso requerido"),r(),C(7,"span",116),A(8),r()(),C(9,"div",117),A(10),r(),C(11,"div",118),A(12),r(),C(13,"div",119)(14,"button",120),T("click",function(){let t=O(e).$implicit,o=P();return G(o.approve(t.id,!1))}),A(15," ✓ Aprobar "),r(),C(16,"button",121),T("click",function(){let t=O(e).$implicit,o=P();return G(o.approve(t.id,!0))}),A(17," ✓ Aprobar siempre "),r(),C(18,"button",122),T("click",function(){let t=O(e).$implicit,o=P();return G(o.reject(t.id))}),A(19," ✗ Denegar "),r()()()()}if(2&e){let e=t.$implicit;u(8),W(e.id),u(2),B("Herramienta: ",e.toolName,""),u(2),W(e.description)}}function je(e,t){1&e&&(C(0,"div",124),A(1," Ninguna opción coincide. "),r())}function Le(e,t){if(1&e&&(C(0,"span",130),A(1),r()),2&e){let e=P().$implicit;u(),W(e.argumentHint)}}function Pe(e,t){if(1&e&&(C(0,"div",131),A(1),r()),2&e){let e=P().$implicit;u(),W(e.description)}}function $e(e,t){1&e&&A(0," , ")}function De(e,t){if(1&e&&(C(0,"code",133),A(1),r(),h(2,$e,1,0)),2&e){let e=t.$implicit,o=t.$index,n=t.$count;u(),B("/",e,""),u(),v(o!==n-1?2:-1)}}function Ae(e,t){if(1&e&&(C(0,"div",132),A(1," Alias: "),k(2,De,3,2,null,null,w),r()),2&e){let e=P().$implicit;u(2),y(e.aliases)}}function He(e,t){if(1&e){let e=j();C(0,"button",126),T("click",function(){let t=O(e).$implicit,o=P(2);return G(o.pickSuggestion(t))})("mouseenter",function(){let t=O(e).$index,o=P(2);return G(o.selectedCommandIndex.set(t))}),C(1,"div",127)(2,"div",128)(3,"span",129),A(4),r(),h(5,Le,2,1,"span",130),r(),h(6,Pe,2,1,"div",131)(7,Ae,4,0,"div",132),r()()}if(2&e){let e=t.$implicit,o=t.$index,n=P(2);b("bg-chrome-border",n.selectedCommandIndex()===o),u(4),B(" ","command"===e.type?"/"+e.name:e.name," "),u(),v(e.argumentHint?5:-1),u(),v(e.description?6:-1),u(),v(e.aliases&&e.aliases.length>0?7:-1)}}function ze(e,t){if(1&e&&(C(0,"div",40)(1,"div",123),A(2),r(),h(3,je,2,0,"div",124),k(4,He,8,6,"button",125,me),r()),2&e){let e=P();u(2),B(" ",e.suggestions().length," opciones · ↑↓ navegá · Enter para insertar · Esc para cerrar "),u(),v(0===e.suggestions().length?3:-1),u(),y(e.suggestions())}}function Ge(e,t){if(1&e){let e=j();C(0,"div",134),S(1,"img",106),C(2,"button",135),T("click",function(){let t=O(e).$index,o=P(2);return G(o.removeSelectedImage(t))}),A(3," ✕ "),r()()}if(2&e){let e=t.$implicit;u(),f("src",e.previewUrl,c)}}function Be(e,t){if(1&e&&(C(0,"div",42),k(1,Ge,4,1,"div",134,pe),r()),2&e){let e=P();u(),y(e.selectedImages())}}function Re(e,t){if(1&e){let e=j();C(0,"div",137),N(),C(1,"svg",138),S(2,"path",139),r(),Q(),C(3,"span",140),A(4),r(),C(5,"button",141),T("click",function(){let t=O(e).$index,o=P(2);return G(o.removeAttachedFile(t))}),A(6," ✕ "),r()()}if(2&e){let e=t.$implicit;b("opacity-60",null===e.content),f("title",null===e.content?"Tipo no soportado o demasiado grande — se omite":e.filename),u(4),W(e.filename)}}function We(e,t){if(1&e&&(C(0,"div",43),k(1,Re,7,4,"div",136,ue),r()),2&e){let e=P();u(),y(e.attachedFiles())}}function qe(e,t){if(1&e){let e=j();C(0,"button",142),T("click",function(){O(e);let t=P();return G(t.toggleVoiceInput())}),N(),C(1,"svg",46),S(2,"path",143),r()()}if(2&e){let e=P();b("bg-red-500",e.isListening())("text-white",e.isListening())("animate-pulse",e.isListening()),f("disabled",!e.isConnected())("title",e.isListening()?"Detener dictado":"Dictar por voz")}}function Oe(e,t){if(1&e){let e=j();C(0,"button",144),T("click",function(){O(e);let t=P();return G(t.stop())}),C(1,"span",72),S(2,"span",145),A(3," Detener "),r()()}}function Ne(e,t){if(1&e){let e=j();C(0,"button",146),T("click",function(){O(e);let t=P();return G(t.send())}),C(1,"span",72),A(2," Enviar "),C(3,"span",147),A(4,"↵"),r()()()}if(2&e){let e=P();f("disabled",!e.input.trim()&&0===e.selectedImages().length||!e.isConnected())}}function Ue(e,t){if(1&e&&(C(0,"span",60),A(1),r()),2&e){let e=P();u(),W(e.lastError())}}function Qe(e,t){if(1&e){let e=j();C(0,"span",153),T("click",function(t){O(e);let o=P(2);return t.stopPropagation(),G(o.openWebModal("providers"))}),A(1),r()}if(2&e){let e=P(2);u(),W(e.currentProvider())}}function Ke(e,t){1&e&&(C(0,"span",151),A(1,"·"),r())}function Xe(e,t){if(1&e&&(C(0,"span",152),A(1),r()),2&e){let e=P(2);u(),W(e.currentModel())}}function Je(e,t){if(1&e){let e=j();C(0,"span",148),T("click",function(){O(e);let t=P();return G(t.openWebModal("models"))}),S(1,"span",149),h(2,Qe,2,1,"span",150)(3,Ke,2,0,"span",151)(4,Xe,2,1,"span",152),r()}if(2&e){let e=P();u(2),v(e.currentProvider()?2:-1),u(),v(e.currentProvider()&&e.currentModel()?3:-1),u(),v(e.currentModel()?4:-1)}}function Ze(e,t){1&e&&(C(0,"span",154),S(1,"span",155)(2,"span",156)(3,"span",157),r())}function Ye(e,t){if(1&e&&(C(0,"div",69),A(1),h(2,Ze,4,0,"span",154),r()),2&e){let e=P();u(),B(" ",e.thinkingText()," "),u(),v(e.isThinking()?2:-1)}}function et(e,t){1&e&&(C(0,"div",70)(1,"div",158),N(),C(2,"svg",159),S(3,"path",65)(4,"path",160),r()(),Q(),C(5,"div",161),A(6," El razonamiento aparecerá aquí cuando el modelo piense "),r()())}function tt(e,t){if(1&e){let e=j();C(0,"div",162),T("click",function(){O(e);let t=P();return G(t.closeImageModal())}),C(1,"div",163),T("click",function(t){return O(e),G(t.stopPropagation())}),S(2,"img",164),C(3,"button",165),T("click",function(){O(e);let t=P();return G(t.closeImageModal())}),A(4," ✕\n"),r()()()}2&e&&(u(2),f("src",t,c))}function it(e,t){1&e&&(N(),C(0,"svg",177),S(1,"path",31),r(),Q(),C(2,"h3",178),A(3,"Historial de Conversaciones CLI"),r())}function nt(e,t){1&e&&(N(),C(0,"svg",179),S(1,"path",180),r(),Q(),C(2,"h3",178),A(3,"Proveedores de Inteligencia Artificial"),r())}function ot(e,t){1&e&&(N(),C(0,"svg",181),S(1,"path",182),r(),Q(),C(2,"h3",178),A(3,"Modelos de IA Disponibles"),r())}function rt(e,t){1&e&&(N(),C(0,"svg",183),S(1,"path",28),r(),Q(),C(2,"h3",178),A(3,"Entorno / Espacios de Trabajo"),r())}function at(e,t){1&e&&(N(),C(0,"svg",184),S(1,"path",185),r(),Q(),C(2,"h3",178),A(3,"Bridge Global (WhatsApp / Telegram)"),r())}function lt(e,t){1&e&&(C(0,"div",192),A(1," No se encontraron conversaciones. "),r())}function st(e,t){if(1&e&&(C(0,"p",200),A(1),r()),2&e){let e=P().$implicit;u(),B(" ",e.firstPrompt," ")}}function dt(e,t){if(1&e){let e=j();C(0,"div",196),T("click",function(){let t=O(e).$implicit,o=P(4);return G(o.selectModalSession(t))}),C(1,"div",197)(2,"span",198),A(3),r(),C(4,"span",199),A(5),r()(),h(6,st,2,1,"p",200),C(7,"div",201)(8,"span"),A(9),r(),C(10,"span"),A(11),r()()()}if(2&e){let e=t.$implicit,o=P(4);g(o.selectedModalSessionId()===e.id?"border-purple-500 bg-purple-500/10":"border-white/5 bg-white/5 hover:bg-white/10 hover:border-purple-500/30"),u(3),B(" ",e.title," "),u(2),B(" ",e.messageCount," msgs "),u(),v(e.firstPrompt?6:-1),u(3),B("ID: ",e.id.substring(0,8),"…"),u(2),W(o.sessionTime(e.modified))}}function ct(e,t){if(1&e&&(C(0,"div",206)(1,"span",218),A(2,"Resumen del chat (Primer Mensaje)"),r(),C(3,"p",219),A(4),r()()),2&e){let e=P();u(4),B(' "',e.firstPrompt,'" ')}}function mt(e,t){1&e&&(C(0,"div",207),A(1," Esta conversación no tiene mensajes registrados. "),r())}function pt(e,t){if(1&e){let e=j();C(0,"div",202)(1,"div",203)(2,"span",204),A(3,"Detalles del Chat"),r(),C(4,"h4",205),A(5),r()(),h(6,ct,5,1,"div",206)(7,mt,2,0,"div",207),C(8,"div",208)(9,"div",209)(10,"span",210),A(11,"Mensajes:"),r(),C(12,"span",211),A(13),r()(),C(14,"div",209)(15,"span",210),A(16,"Último cambio:"),r(),C(17,"span",211),A(18),r()()(),C(19,"div",212)(20,"span",210),A(21,"ID Completo de la Sesión:"),r(),C(22,"span",213),A(23),r()()(),C(24,"div",214)(25,"button",215),T("click",function(){let t=O(e),o=P(4);return G(o.loadModalSession(t.id))}),N(),C(26,"svg",216),S(27,"path",217),r(),A(28," Reanudar Conversación "),r()()}if(2&e){let e=t,o=P(4);u(5),W(e.title),u(),v(e.firstPrompt?6:7),u(7),W(e.messageCount),u(5),W(o.sessionTime(e.modified)),u(5),W(e.id)}}function ut(e,t){1&e&&(C(0,"div",195),N(),C(1,"svg",220),S(2,"path",139),r(),Q(),C(3,"span",221),A(4,"Seleccioná un chat del historial"),r(),C(5,"p",222),A(6,"Hacé click en cualquiera de las opciones para ver su resumen y estadísticas."),r()())}function xt(e,t){if(1&e){let e=j();C(0,"div",173)(1,"div",186)(2,"div",187)(3,"input",188),T("ngModelChange",function(t){O(e);let o=P(3);return G(o.sessionSearchQuery.set(t))}),r(),N(),C(4,"svg",189),S(5,"path",190),r()(),Q(),C(6,"div",191),h(7,lt,2,0,"div",192),k(8,dt,12,7,"div",193,R),r()(),C(10,"div",194),h(11,pt,29,5)(12,ut,7,0,"div",195),r()()}if(2&e){let e,t=P(3);u(3),f("ngModel",t.sessionSearchQuery()),u(4),v(0===t.filteredCliSessions().length?7:-1),u(),y(t.filteredCliSessions()),u(3),v((e=t.selectedModalSession())?11:12,e)}}function _t(e,t){1&e&&S(0,"span",227)}function ht(e,t){1&e&&S(0,"span",228)}function ft(e,t){if(1&e){let e=j();C(0,"div",225),T("click",function(){let t=O(e).$implicit,o=P(4);return G(o.selectProvider(t))}),C(1,"span",226),h(2,_t,1,0,"span",227)(3,ht,1,0,"span",228),r(),C(4,"div",229)(5,"span",230),A(6),r(),C(7,"span",231),A(8,"Motor de IA"),r()()()}if(2&e){let e=t.$implicit,o=P(4);g(o.currentProvider()===e?"border-chrome-accent bg-chrome-accent/5":"border-white/5 bg-white/5 hover:bg-white/10 hover:border-chrome-accent/30"),u(2),v(o.currentProvider()===e?2:3),u(4),W(e)}}function Ct(e,t){if(1&e&&(C(0,"div",174)(1,"p",18),A(2,"Seleccioná un proveedor de IA. Se cambiará en caliente en tu motor CLI local:"),r(),C(3,"div",223),k(4,ft,9,4,"div",224,w),r()()),2&e){let e=P(3);u(4),y(e.cliProviders())}}function bt(e,t){1&e&&(C(0,"div",192),A(1," No hay modelos disponibles para este proveedor o cargando... "),r())}function vt(e,t){1&e&&S(0,"span",239)}function gt(e,t){1&e&&S(0,"span",228)}function wt(e,t){if(1&e){let e=j();C(0,"div",237),T("click",function(){let t=O(e).$implicit,o=P(4);return G(o.selectModel(t))}),C(1,"div",238)(2,"span",226),h(3,vt,1,0,"span",239)(4,gt,1,0,"span",228),r(),C(5,"span",240),A(6),r()(),C(7,"span",241),A(8,"Activo"),r()()}if(2&e){let e=t.$implicit,o=P(4);g(o.currentModel()===e?"border-pink-500 bg-pink-500/5":"border-white/5 bg-white/5 hover:bg-white/10 hover:border-pink-500/30"),u(3),v(o.currentModel()===e?3:4),u(3),W(e)}}function kt(e,t){if(1&e){let e=j();C(0,"div",174)(1,"div",232)(2,"span",18),A(3,"Proveedor actual: "),C(4,"strong",233),A(5),r()(),C(6,"button",234),T("click",function(){O(e);let t=P(3);return G(t.openWebModal("providers"))}),A(7," Cambiar Proveedor "),r()(),C(8,"div",235),h(9,bt,2,0,"div",192),k(10,wt,9,4,"div",236,w),r()()}if(2&e){let e=P(3);u(5),W(e.currentProvider()),u(4),v(0===e.cliModels().length?9:-1),u(),y(e.cliModels())}}function St(e,t){1&e&&(C(0,"div",192),A(1," No hay repositorios locales registrados. "),r())}function yt(e,t){1&e&&(C(0,"span",246),A(1,"Activo"),r())}function Et(e,t){if(1&e){let e=j();C(0,"div",243),T("click",function(){let t=O(e).$implicit,o=P(4);return G(o.selectWorkspace(t.alias))}),C(1,"div",244)(2,"span",245),A(3),r(),h(4,yt,2,0,"span",246),r(),C(5,"span",247),A(6),r()()}if(2&e){let e,o,n=t.$implicit,r=P(4);g(null!=(e=r.shortCwd())&&e.includes(n.alias)||r.cwd()===n.path?"border-sky-400 bg-sky-400/5":"border-white/5 bg-white/5 hover:bg-white/10 hover:border-sky-400/30"),u(3),B(" 📂 ",n.alias," "),u(),v(null!=(o=r.shortCwd())&&o.includes(n.alias)||r.cwd()===n.path?4:-1),u(2),W(n.path)}}function Tt(e,t){if(1&e&&(C(0,"div",174)(1,"p",18),A(2,"Cambiá tu directorio o repositorio de trabajo en el motor de ejecución:"),r(),C(3,"div",235),h(4,St,2,0,"div",192),k(5,Et,7,5,"div",242,xe),r()()),2&e){let e=P(3);u(4),v(0===e.cliWorkspaces().length?4:-1),u(),y(e.cliWorkspaces())}}function It(e,t){if(1&e){let e=j();C(0,"button",258),T("click",function(){O(e);let t=P(4);return G(t.controlGlobalCanal("stop"))}),A(1," Apagar Bridge "),r()}}function Vt(e,t){if(1&e){let e=j();C(0,"button",259),T("click",function(){O(e);let t=P(4);return G(t.controlGlobalCanal("start"))}),A(1," Encender Bridge "),r()}}function Mt(e,t){if(1&e&&S(0,"img",263),2&e){let e=P();f("src",e,c)}}function Ft(e,t){if(1&e&&(C(0,"pre",264),A(1),r()),2&e){let e=P();u(),W(e)}}function jt(e,t){1&e&&(C(0,"div",257)(1,"span",260),A(2,"Escaneá para Vincular WhatsApp"),r(),C(3,"p",261),A(4,"Abrí WhatsApp en tu teléfono → Dispositivos vinculados → Vincular un dispositivo."),r(),C(5,"div",262),h(6,Mt,1,1,"img",263)(7,Ft,2,1,"pre",264),r()()),2&e&&(u(6),v(t.startsWith("data:image")?6:7))}function Lt(e,t){if(1&e&&(C(0,"li"),A(1),r()),2&e){let e=t.$implicit;u(),W(e)}}function Pt(e,t){if(1&e&&(C(0,"div",265)(1,"span",266),A(2,"Errores del Daemon:"),r(),C(3,"ul",267),k(4,Lt,2,1,"li",null,w),r()()),2&e){let e=P();u(4),y(e)}}function $t(e,t){1&e&&h(0,Pt,6,0,"div",265),2&e&&v(t.length>0?0:-1)}function Dt(e,t){if(1&e&&(C(0,"div",175)(1,"div",248)(2,"div",203)(3,"span",249),A(4,"Estado del Daemon del Bridge"),r(),C(5,"p",250),A(6,"El daemon conecta el bot del CLI a WhatsApp y Telegram."),r()(),h(7,It,2,0,"button",251)(8,Vt,2,0,"button",252),r(),C(9,"div",174)(10,"div",253)(11,"div",254)(12,"span",151),A(13,"WhatsApp:"),r(),C(14,"span",255),S(15,"span",256),A(16),r()(),C(17,"div",254)(18,"span",151),A(19,"Telegram:"),r(),C(20,"span",255),S(21,"span",256),A(22),r()()(),h(23,jt,8,1,"div",257)(24,$t,1,1),r()()),2&e){let e,t,o,n,r,s,l,a,d,c=P(3);u(7),v(null!=(e=c.globalCanalStatus())&&e.running?7:8),u(7),b("text-green-400",null==(t=c.globalCanalStatus())?null:t.whatsappOk)("text-red-400",!(null!=(o=c.globalCanalStatus())&&o.whatsappOk)),u(2),B(" ",null!=(n=c.globalCanalStatus())&&n.whatsappOk?"Vinculado":"Sin conexión"," "),u(4),b("text-green-400",null==(r=c.globalCanalStatus())?null:r.telegramOk)("text-red-400",!(null!=(s=c.globalCanalStatus())&&s.telegramOk)),u(2),B(" ",null!=(l=c.globalCanalStatus())&&l.telegramOk?"Activo":"Inactivo"," "),u(),v((a=null==(a=c.globalCanalStatus())?null:a.qrCode)?23:-1,a),u(),v((d=null==(d=c.globalCanalStatus())?null:d.errors)?24:-1,d)}}function At(e,t){if(1&e){let e=j();C(0,"div",167),T("click",function(){O(e);let t=P(2);return G(t.closeWebModal())}),C(1,"div",168),T("click",function(t){return O(e),G(t.stopPropagation())}),S(2,"div",169),C(3,"div",170)(4,"div",19),h(5,it,4,0)(6,nt,4,0)(7,ot,4,0)(8,rt,4,0)(9,at,4,0),r(),C(10,"button",171),T("click",function(){O(e);let t=P(2);return G(t.closeWebModal())}),A(11," ✕ "),r()(),C(12,"div",172),h(13,xt,13,3,"div",173)(14,Ct,6,0,"div",174)(15,kt,12,2,"div",174)(16,Tt,7,1,"div",174)(17,Dt,25,13,"div",175),r(),C(18,"div",176)(19,"span"),A(20,"Sincronización Bidireccional Activa"),r(),C(21,"span"),A(22),r()()()()}if(2&e){let e,t=P(),o=P();u(5),v("sessions"===(e=t)?5:"providers"===e?6:"models"===e?7:"workspaces"===e?8:"canalGlobal"===e?9:-1),u(8),v("sessions"===t?13:-1),u(),v("providers"===t?14:-1),u(),v("models"===t?15:-1),u(),v("workspaces"===t?16:-1),u(),v("canalGlobal"===t?17:-1),u(5),B("Motor CLI: puerto ",o.socketServicePort(),"")}}function Ht(e,t){1&e&&h(0,At,23,7,"div",166),2&e&&v("none"!==t?0:-1)}function zt(e,t){1&e&&(C(0,"span",275),S(1,"span",155)(2,"span",156)(3,"span",157),r())}function Gt(e,t){if(1&e){let e=j();C(0,"div",76)(1,"div",268)(2,"div",269),N(),C(3,"svg",270),S(4,"path",65)(5,"path",66),r(),Q(),C(6,"span",271),A(7,"Razonamiento del modelo"),r()(),C(8,"button",272),T("click",function(){O(e);let t=P();return G(t.showMobileThinking.set(!1))}),A(9," Cerrar "),r()(),C(10,"div",273,4)(12,"div",274),A(13),h(14,zt,4,0,"span",275),r()(),C(15,"div",276)(16,"div",72),S(17,"span",73),C(18,"span"),A(19,"Modelos de razonamiento"),r()(),C(20,"div",72),S(21,"span",74),C(22,"span"),A(23,"Modelos Pro"),r()()()()}if(2&e){let e=P();u(3),b("animate-pulse",e.isThinking()),u(10),B(" ",e.thinkingText()," "),u(),v(e.isThinking()?14:-1)}}function Bt(e,t){if(1&e&&(C(0,"p",287),A(1),r()),2&e){let e=P();u(),B(" ",e.description," ")}}function Rt(e,t){1&e&&S(0,"span",293)}function Wt(e,t){1&e&&S(0,"span",294)}function qt(e,t){1&e&&(C(0,"span",296),A(1,"Predeterminado"),r())}function Ot(e,t){if(1&e){let e=j();C(0,"button",291),T("click",function(){let t=O(e).$implicit,o=P(),n=P();return G(n.submitInteractiveSelect(o.id,t.value))}),C(1,"div",238)(2,"span",292),h(3,Rt,1,0,"span",293)(4,Wt,1,0,"span",294),r(),C(5,"span",295),A(6),r()(),h(7,qt,2,0,"span",296),r()}if(2&e){let e=t.$implicit,o=P();u(3),v(o.defaultValue===e.value?3:4),u(3),W(e.label),u(),v(o.defaultValue===e.value?7:-1)}}function Nt(e,t){if(1&e){let e=j();C(0,"div",77)(1,"div",277),S(2,"div",278),C(3,"div",279)(4,"div",280)(5,"span",281),S(6,"span",282)(7,"span",283),r(),C(8,"h3",284),A(9),r()(),C(10,"button",285),T("click",function(){let t=O(e),o=P();return G(o.submitInteractiveSelect(t.id,""))}),A(11," ✕ "),r()(),C(12,"div",286),h(13,Bt,2,1,"p",287),C(14,"div",288),k(15,Ot,8,3,"button",289,_e),r()(),C(17,"div",290)(18,"span"),A(19,"Control transferido desde el motor CLI"),r(),C(20,"span"),A(21,"Español"),r()()()()}if(2&e){let e=t;u(9),W(e.title||"Selección Interactiva"),u(4),v(e.description?13:-1),u(2),y(e.options)}}function Ut(e,t){if(1&e&&(C(0,"p",301),A(1),r()),2&e){let e=P();u(),B(" ",e.description," ")}}function Qt(e,t){1&e&&(N(),C(0,"svg",310),S(1,"path",317)(2,"path",318),r())}function Kt(e,t){1&e&&(N(),C(0,"svg",310),S(1,"path",319),r())}function Xt(e,t){if(1&e){let e=j();C(0,"button",316),T("click",function(){O(e);let t=P(2);return G(t.showPassword.set(!t.showPassword()))}),h(1,Qt,3,0,":svg:svg",310)(2,Kt,2,0,":svg:svg",310),r()}if(2&e){let e=P(2);f("title",e.showPassword()?"Ocultar valor":"Mostrar valor"),u(),v(e.showPassword()?1:2)}}function Jt(e,t){1&e&&(N(),C(0,"svg",309),S(1,"path",320),r())}function Zt(e,t){1&e&&(N(),C(0,"svg",310),S(1,"path",321),r())}function Yt(e,t){if(1&e){let e=j();C(0,"div",77)(1,"div",277),S(2,"div",297),C(3,"div",279)(4,"div",280)(5,"span",281),S(6,"span",298)(7,"span",299),r(),C(8,"h3",284),A(9),r()(),C(10,"button",300),T("click",function(){let t=O(e),o=P();return G(o.submitInteractiveInput(t.id,""))}),A(11," ✕ "),r()(),C(12,"div",286),h(13,Ut,2,1,"p",301),C(14,"div",302)(15,"label",303),A(16,"Introduce el valor solicitado"),r(),C(17,"div",304)(18,"input",305,5),T("ngModelChange",function(t){O(e);let o=P();return G(o.interactiveInputValue.set(t))})("keydown.enter",function(){let t=O(e),o=P();return G(o.submitInteractiveInput(t.id,o.interactiveInputValue()))}),r(),C(20,"div",306),h(21,Xt,3,2,"button",307),C(22,"button",308),T("click",function(){O(e);let t=P();return G(t.copyToClipboard(t.interactiveInputValue()))}),h(23,Jt,2,0,":svg:svg",309)(24,Zt,2,0,":svg:svg",310),r()()()()(),C(25,"div",311)(26,"span",312),A(27,"Presiona Enter para confirmar"),r(),C(28,"div",313)(29,"button",314),T("click",function(){let t=O(e),o=P();return G(o.submitInteractiveInput(t.id,""))}),A(30," Cancelar "),r(),C(31,"button",315),T("click",function(){let t=O(e),o=P();return G(o.submitInteractiveInput(t.id,o.interactiveInputValue()))}),A(32," Confirmar "),r()()()()()}if(2&e){let e=t,o=P();u(9),W(e.title||"Entrada Requerida"),u(4),v(e.description?13:-1),u(5),f("type",e.mask&&!o.showPassword()?"password":"text")("placeholder",e.placeholder||"Escribe aquí...")("ngModel",o.interactiveInputValue()),u(3),v(e.mask?21:-1),u(),f("disabled",!o.interactiveInputValue())("title",o.copied()?"¡Copiado!":"Copiar al portapapeles"),u(),v(o.copied()?23:24)}}var Z={provider:["list","current","claude","openai","openrouter","ollama","ollama-cloud","gemini-api","gemini-google","zai","minimax","nvidia"],"canal-global":["status","start","stop","help"],webapp:["start","stop","status","open","token","token reset","port","autostart","tunnel start","tunnel stop","tunnel status","tunnel url","tunnel clear","help"],modelo:["claude-3-5-sonnet","claude-3-opus","gpt-4o","gemini-1.5-pro","gemini-1.5-flash","llama-3"],profile:["list","default","creative","coding"],workspace:["list","status"],ayuda:["canal-global","provider","webapp","modelo","workspace"]},X="cx-webapp-sessions-v1",Y=new Set(["txt","md","markdown","json","jsonl","csv","tsv","yaml","yml","toml","xml","html","htm","css","scss","sass","less","js","mjs","cjs","ts","tsx","jsx","vue","svelte","py","rb","go","rs","java","kt","kts","c","cpp","h","hpp","cs","swift","sh","bash","zsh","ps1","bat","cmd","sql","graphql","gql","proto","dockerfile","env","gitignore","log","ini","conf","cfg","lock"]),ee=class i{constructor(){this.socket=_(d),this.auth=_(l),this.router=_(s),this.subs=[],this.messages=a([]),this.pendingPermissions=a([]),this.input="",this.isConnected=H(()=>this.socket.isConnected()),this.isLoading=this.socket.isLoading,this.cwd=this.socket.cwd,this.lastError=this.socket.lastError,this.availableCommands=this.socket.availableCommands,this.suggestions=a([]),this.showCommandPalette=a(!1),this.selectedCommandIndex=a(0),this.selectedImages=a([]),this.activeModalImage=a(null),this.showMobileThinking=a(!1),this.thinkingText=this.socket.thinkingText,this.isThinking=this.socket.isThinking,this.tempImagesForNextMessage=[],this.currentModel=this.socket.model,this.currentProvider=this.socket.provider,this.activeWebModal=a("none"),this.sessionSearchQuery=a(""),this.selectedModalSessionId=a(null),this.selectedModalSession=a(null),this.activeInteractiveSelect=a(null),this.activeInteractiveInput=a(null),this.interactiveInputValue=a(""),this.showPassword=a(!1),this.copied=a(!1),this.cliSessions=this.socket.sessions,this.cliProviders=this.socket.providers,this.cliModels=this.socket.models,this.cliWorkspaces=this.socket.workspaces,this.globalCanalStatus=this.socket.globalCanalStatus,this.socketServicePort=H(()=>"4200"===location.port?"9876":location.port||"80"),this.filteredCliSessions=H(()=>{let e=this.sessionSearchQuery().toLowerCase().trim(),t=this.cliSessions();return e?t.filter(t=>t.title.toLowerCase().includes(e)||t.firstPrompt&&t.firstPrompt.toLowerCase().includes(e)||t.id.toLowerCase().includes(e)):t}),this.attachedFiles=a([]),this.isListening=a(!1),this.voiceSupported=a(typeof window<"u"&&(!!window.SpeechRecognition||!!window.webkitSpeechRecognition)),this.recognition=null,this.showSidebar=a(typeof window<"u"&&window.innerWidth>=1024),this.savedSessions=a([]),this.activeSessionId=a(null),this.stateLabel=H(()=>{let e=this.socket.state();return"open"===e?"Conectado":"connecting"===e?"Conectando…":"auth_error"===e?"Token inválido":"Desconectado"}),this.shortCwd=H(()=>{let e=this.cwd();return e?e.replace(/\\/g,"/").split("/").slice(-2).join("/"):null}),q(()=>{this.messages(),this.pendingPermissions(),queueMicrotask(()=>this.scrollToBottom())}),q(()=>{this.showMobileThinking()&&(this.thinkingText(),this.isThinking(),queueMicrotask(()=>{let e=this.mobileThinkingScrollerRef?.nativeElement;e&&(e.scrollTop=e.scrollHeight)}))}),q(()=>{let e=this.socket.sessionId();e&&this.activeSessionId.set(e)}),q(()=>{this.isConnected()&&this.socket.requestSessions()},{allowSignalWrites:!0})}ngOnInit(){this.auth.hasToken()?(this.socket.connect(),setTimeout(()=>{this.isConnected()&&this.socket.requestGlobalCanal()},1500),this.messages.set(this.socket.chatMessages().map(e=>I(M({},e),{align:"user"===e.role?"me":"them",images:[]}))),this.subs.push(this.socket.messages$.subscribe(e=>{if("clear"===e.type)return void this.messages.set([]);let t=[];"user"===e.role&&this.tempImagesForNextMessage.length>0&&(t=[...this.tempImagesForNextMessage],this.tempImagesForNextMessage=[]),this.messages.update(o=>[...o,I(M({},e),{align:"user"===e.role?"me":"them",images:t})])})),this.subs.push(this.socket.permissions$.subscribe(e=>{this.pendingPermissions.update(t=>[...t,e])})),this.subs.push(this.socket.permissionResolved$.subscribe(e=>{this.pendingPermissions.update(t=>t.filter(t=>t.id!==e.id))})),this.subs.push(this.socket.interactiveSelect$.subscribe(e=>{this.activeInteractiveSelect.set(e)})),this.subs.push(this.socket.interactiveInput$.subscribe(e=>{this.activeInteractiveInput.set(e),this.interactiveInputValue.set(e.defaultValue||""),this.showPassword.set(!1)}))):this.router.navigate(["/login"])}ngOnDestroy(){for(let e of this.subs)e.unsubscribe()}onInputChange(e){if(!e.startsWith("/"))return this.showCommandPalette.set(!1),void this.suggestions.set([]);let t=e.indexOf(" ");if(-1===t){let t=e.slice(1).toLowerCase(),o=this.availableCommands(),n=[],r=[];for(let e of o){let o=[e.name,...e.aliases??[]].map(e=>e.toLowerCase());t?o.some(e=>e.startsWith(t))?n.push(e):o.some(e=>e.includes(t))&&r.push(e):n.push(e)}let s=[...n,...r].slice(0,100).map(e=>({type:"command",name:e.name,description:e.description,argumentHint:e.argumentHint,aliases:e.aliases,valueToInsert:`/${e.name} `}));this.suggestions.set(s),this.showCommandPalette.set(s.length>0),this.selectedCommandIndex.set(0)}else{let o=e.slice(1,t).toLowerCase(),n=e.slice(t+1),r=Z[o];if(r&&!n.includes("\n")){let e=n.toLowerCase(),t=r.filter(t=>t.toLowerCase().includes(e)).map(e=>({type:"arg",name:e,description:`Opción para /${o}`,valueToInsert:`/${o} ${e}`}));this.suggestions.set(t),this.showCommandPalette.set(t.length>0),this.selectedCommandIndex.set(0)}else this.showCommandPalette.set(!1),this.suggestions.set([])}}onKeydown(e){let t=e;if(this.showCommandPalette()){let e=this.suggestions();if("ArrowDown"===t.key){t.preventDefault();let o=(this.selectedCommandIndex()+1)%Math.max(e.length,1);return void this.selectedCommandIndex.set(o)}if("ArrowUp"===t.key){t.preventDefault();let o=Math.max(e.length,1),n=(this.selectedCommandIndex()-1+o)%o;return void this.selectedCommandIndex.set(n)}if("Escape"===t.key)return t.preventDefault(),void this.showCommandPalette.set(!1);if("Tab"===t.key||"Enter"===t.key&&e.length>0&&!t.shiftKey){let o=e[this.selectedCommandIndex()];if(o)return t.preventDefault(),void this.pickSuggestion(o)}}"Enter"===t.key&&!t.shiftKey&&(t.preventDefault(),this.send())}pickSuggestion(e){this.input=e.valueToInsert;let t=this.input.indexOf(" "),o=-1===t?this.input.slice(1).toLowerCase():this.input.slice(1,t).toLowerCase();"command"===e.type&&Z[o]?this.onInputChange(this.input):this.showCommandPalette.set(!1),queueMicrotask(()=>{let e=this.inputRef?.nativeElement;e&&(e.focus(),e.setSelectionRange(this.input.length,this.input.length),this.autoGrowEl(e))})}autoGrow(e){let t=e.target;this.autoGrowEl(t)}autoGrowEl(e){e.style.height="auto",e.style.height=Math.min(e.scrollHeight,180)+"px"}onFileSelected(e){let t=e.target;if(!t.files||0===t.files.length)return;let o=Array.from(t.files);for(let e of o){if(!e.type.startsWith("image/"))continue;let t=new FileReader;t.onload=t=>{let o=t.target?.result;if(!o)return;let n=o.indexOf(","),r=-1!==n?o.substring(n+1):o;this.selectedImages.update(t=>[...t,{content:r,mediaType:e.type,filename:e.name,previewUrl:o}])},t.readAsDataURL(e)}t.value=""}removeSelectedImage(e){this.selectedImages.update(t=>t.filter((t,o)=>o!==e))}openImageModal(e){this.activeModalImage.set(e)}closeImageModal(){this.activeModalImage.set(null)}send(){let e=this.input.trim(),t=this.selectedImages(),o=this.attachedFiles().filter(e=>null!==e.content);if(!e&&0===t.length&&0===o.length)return;this.socket.thinkingText.set(""),this.socket.isThinking.set(!1);let n=o.map(e=>`--- ${e.filename} ---\n${e.content}\n--- end ${e.filename} ---`).join("\n\n"),r=n?e?`${n}\n\n${e}`:n:e;t.length>0&&(this.tempImagesForNextMessage=t.map(e=>e.previewUrl)),this.socket.sendPrompt(r,"prompt",t.map(e=>({content:e.content,mediaType:e.mediaType,filename:e.filename}))),this.input="",this.selectedImages.set([]),this.attachedFiles.set([]),this.showCommandPalette.set(!1),queueMicrotask(()=>{this.inputRef?.nativeElement&&(this.inputRef.nativeElement.style.height="auto")})}stop(){this.socket.abort()}approve(e,t){this.socket.approve(e,t),this.pendingPermissions.update(t=>t.filter(t=>t.id!==e))}reject(e){this.socket.reject(e),this.pendingPermissions.update(t=>t.filter(t=>t.id!==e))}logout(){this.socket.disconnect(),this.auth.clearToken(),this.router.navigate(["/login"])}clearChat(){this.messages.set([]),this.socket.thinkingText.set(""),this.socket.isThinking.set(!1),this.isConnected()&&this.socket.sendPrompt("/clear")}onTextFileSelected(e){let t=e.target;if(t.files&&0!==t.files.length){for(let e of Array.from(t.files))this.ingestFile(e);t.value=""}}ingestFile(e){let t=e.name.split(".").pop()?.toLowerCase()??"";if(!Y.has(t)&&!e.type.startsWith("text/"))return void this.attachedFiles.update(t=>[...t,{filename:e.name,mediaType:e.type||"application/octet-stream",size:e.size,content:null}]);if(e.size>262144)return void this.attachedFiles.update(t=>[...t,{filename:`${e.name} (demasiado grande, máx 256KB)`,mediaType:e.type,size:e.size,content:null}]);let o=new FileReader;o.onload=o=>{let n=o.target?.result??"";this.attachedFiles.update(o=>[...o,{filename:e.name,mediaType:e.type||`text/${t}`,size:e.size,content:n}])},o.readAsText(e)}removeAttachedFile(e){this.attachedFiles.update(t=>t.filter((t,o)=>o!==e))}toggleVoiceInput(){if(this.isListening())return this.recognition?.stop(),void this.isListening.set(!1);if(!this.voiceSupported())return void this.socket.lastError.set("Tu navegador no soporta reconocimiento de voz.");let e=window.SpeechRecognition||window.webkitSpeechRecognition;if(!e)return;let t=new e;t.lang="es-ES",t.continuous=!0,t.interimResults=!0;let o=this.input;t.onresult=e=>{let t="",n="";for(let o=0;o<e.results.length;o++){let r=e.results[o];r.isFinal?n+=r[0].transcript:t+=r[0].transcript}let r=o&&!o.endsWith(" ")?" ":"";this.input=`${o}${r}${n}${t}`.trimStart(),n&&(o=this.input)},t.onerror=e=>{this.socket.lastError.set(`Reconocimiento de voz: ${e.error??"error"}`),this.isListening.set(!1)},t.onend=()=>{this.isListening.set(!1)},this.recognition=t;try{t.start(),this.isListening.set(!0)}catch(e){this.socket.lastError.set(`No pude iniciar el micrófono: ${e?.message??e}`)}}newSession(){this.activeSessionId.set(null),this.clearChat()}loadSavedSession(e){this.selectSession(e)}deleteSavedSession(e,t){t?.stopPropagation();let o=this.savedSessions().filter(t=>t.id!==e);this.savedSessions.set(o),this.persistSessions(o),this.activeSessionId()===e&&this.activeSessionId.set(null)}snapshotCurrentSession(){let e=this.messages();if(0===e.length)return;let t=this.activeSessionId()??crypto.randomUUID(),o=e.find(e=>"user"===e.role)?.text?.slice(0,60)||"Conversación sin título",n=[{id:t,title:o,createdAt:e[0].ts,updatedAt:Date.now(),messages:e.map(e=>({id:e.id,role:e.role,text:e.text,ts:e.ts,toolName:e.toolName}))},...this.savedSessions().filter(e=>e.id!==t)].slice(0,25);this.savedSessions.set(n),this.persistSessions(n)}loadSessionsFromStorage(){try{let e=localStorage.getItem(X);if(!e)return;let t=JSON.parse(e);Array.isArray(t)&&this.savedSessions.set(t)}catch{}}persistSessions(e){try{localStorage.setItem(X,JSON.stringify(e))}catch{}}toggleSidebar(){this.showSidebar.update(e=>!e)}showSessionsInSidebar(){this.showSidebar.set(!0),this.isConnected()&&this.socket.requestSessions()}loadCliHistoryOrToggle(){this.showSessionsInSidebar()}openWebModal(e){this.activeWebModal.set(e),this.sessionSearchQuery.set(""),"sessions"===e?(this.selectedModalSessionId.set(null),this.selectedModalSession.set(null),this.isConnected()&&this.socket.requestSessions()):"providers"===e?this.socket.requestProviders():"models"===e?this.socket.requestModels():"workspaces"===e?this.socket.requestWorkspaces():"canalGlobal"===e&&this.socket.requestGlobalCanal()}closeWebModal(){this.activeWebModal.set("none"),this.sessionSearchQuery.set("")}selectModalSession(e){this.selectedModalSessionId.set(e.id),this.selectedModalSession.set(e)}loadModalSession(e){this.selectSession(e)}selectSession(e){this.activeSessionId.set(e),this.socket.selectSession(e),this.closeWebModal()}selectProvider(e){this.socket.selectProvider(e),setTimeout(()=>{this.socket.requestModels()},400)}selectModel(e){this.socket.selectModel(e),this.closeWebModal()}selectWorkspace(e){this.socket.selectWorkspace(e),this.closeWebModal()}controlGlobalCanal(e){this.socket.controlGlobalCanal(e)}submitInteractiveSelect(e,t){this.socket.submitInteractiveSelect(e,t),this.activeInteractiveSelect.set(null)}submitInteractiveInput(e,t){this.socket.submitInteractiveInput(e,t),this.activeInteractiveInput.set(null)}copyToClipboard(e){e&&navigator.clipboard.writeText(e).then(()=>{this.copied.set(!0),setTimeout(()=>this.copied.set(!1),2e3)})}bubbleClass(e){return"me"===e.align?"bg-bubble-me text-chrome-text":"tool"===e.role?"bg-bubble-tool text-chrome-text border border-chrome-border":"bg-bubble-ai text-chrome-text"}timeLabel(e){return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}sessionTime(e){let t=Date.now()-e,o=Math.floor(t/6e4);if(o<1)return"ahora";if(o<60)return`${o}m`;let n=Math.floor(o/60);if(n<24)return`${n}h`;let r=Math.floor(n/24);return r<7?`${r}d`:new Date(e).toLocaleDateString([],{day:"2-digit",month:"2-digit"})}scrollToBottom(){let e=this.scrollerRef?.nativeElement;e&&(e.scrollTop=e.scrollHeight)}static{this.ɵfac=function(e){return new(e||i)}}static{this.ɵcmp=p({type:i,selectors:[["cx-chat"]],viewQuery:function(e,t){if(1&e&&($(U,5),$(K,5),$(J,5)),2&e){let e;L(e=E())&&(t.scrollerRef=e.first),L(e=E())&&(t.inputRef=e.first),L(e=E())&&(t.mobileThinkingScrollerRef=e.first)}},decls:104,vars:30,consts:[["scroller",""],["fileInput",""],["textFileInput",""],["inputRef",""],["mobileThinkingScroller",""],["interactiveInputField",""],[1,"flex","h-full","w-full","overflow-hidden","bg-chrome-bg"],[1,"flex","w-64","flex-col","border-r","border-chrome-border","bg-[#0a1418]","text-chrome-text","overflow-hidden","flex-shrink-0"],[1,"flex","flex-1","flex-col","overflow-hidden","min-w-0"],[1,"flex","items-center","justify-between","border-b","border-chrome-border","bg-chrome-panel","px-3","py-3","sm:px-4"],[1,"flex","items-center","gap-2","sm:gap-3","min-w-0"],["title","Sesiones",1,"rounded-md","p-1.5","text-chrome-muted","hover:bg-chrome-border","hover:text-chrome-text","transition","flex-shrink-0",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2",1,"h-5","w-5"],["stroke-linecap","round","stroke-linejoin","round","d","M4 6h16M4 12h16M4 18h16"],[1,"flex","h-10","w-10","items-center","justify-center","rounded-full","overflow-hidden","border","border-chrome-border/60","bg-chrome-panel/60","shadow-md","flex-shrink-0"],["src","logo.png","alt","Context Code Logo",1,"h-full","w-full","object-cover"],[1,"leading-tight"],[1,"text-sm","font-semibold"],[1,"text-xs","text-chrome-muted"],[1,"flex","items-center","gap-2"],[1,"inline-flex","items-center","gap-1.5","rounded-full","bg-chrome-accent/15","px-2.5","py-1","text-xs","text-chrome-accent"],["title","Ver razonamiento",1,"lg:hidden","flex","items-center","justify-center","rounded-full","bg-purple-500/10","p-1.5","text-purple-400","hover:bg-purple-500/20","active:scale-95","transition"],["title","Configurar Bridge Global (WhatsApp/Telegram)",1,"flex","items-center","gap-1.5","rounded-md","border","border-chrome-border/80","bg-chrome-bg/50","px-2.5","py-1","text-[11px]","text-chrome-muted","hover:bg-chrome-border","hover:text-chrome-text","active:scale-95","transition",3,"click"],[1,"relative","flex","h-1.5","w-1.5"],[1,"relative","inline-flex","rounded-full","h-1.5","w-1.5","bg-red-500"],[1,"hidden","sm:inline"],["title","Cambiar Workspace de Git / CLI",1,"flex","items-center","gap-1.5","rounded-md","border","border-chrome-border/80","bg-chrome-bg/50","px-2.5","py-1","text-[11px]","text-chrome-muted","hover:bg-chrome-border","hover:text-chrome-text","active:scale-95","transition",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2",1,"h-3.5","w-3.5","text-[#00d2ff]"],["stroke-linecap","round","stroke-linejoin","round","d","M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"],["title","Ver conversaciones guardadas en la CLI",1,"flex","items-center","gap-1.5","rounded-md","border","border-chrome-border/80","bg-chrome-bg/50","px-2.5","py-1","text-[11px]","text-chrome-muted","hover:bg-chrome-border","hover:text-chrome-text","active:scale-95","transition","duration-200",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2",1,"h-3.5","w-3.5","text-[#a855f7]"],["stroke-linecap","round","stroke-linejoin","round","d","M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"],["title","Limpiar pantalla e historial de chat",1,"rounded-md","px-2.5","py-1","text-xs","text-chrome-muted","transition","hover:bg-chrome-border","hover:text-chrome-text",3,"click"],["title","Cerrar sesión y olvidar token",1,"rounded-md","px-2.5","py-1","text-xs","text-chrome-muted","transition","hover:bg-chrome-border","hover:text-chrome-text",3,"click"],[1,"flex-1","overflow-y-auto","bg-[radial-gradient(circle_at_top,#0c1419_0%,#0b141a_100%)]","px-3","py-4","sm:px-6"],[1,"mx-auto","flex","max-w-3xl","flex-col","gap-3"],[1,"mx-auto","mt-12","max-w-md","rounded-2xl","border","border-chrome-border","bg-chrome-panel/50","px-5","py-6","text-center"],[1,"flex","justify-start"],[1,"border-t","border-chrome-border","bg-chrome-panel","px-3","py-3","sm:px-6"],[1,"relative","mx-auto","max-w-3xl"],[1,"absolute","bottom-full","left-0","right-0","mb-2","max-h-72","overflow-y-auto","rounded-xl","border","border-chrome-border","bg-chrome-panel","shadow-2xl","z-10"],[1,"flex","flex-col","rounded-2xl","border","border-chrome-border","bg-chrome-bg","overflow-hidden","transition","focus-within:border-chrome-accent","focus-within:ring-2","focus-within:ring-chrome-accent/20"],[1,"flex","flex-wrap","gap-2","border-b","border-chrome-border/50","bg-[#162026]/40","p-2.5"],[1,"flex","flex-wrap","gap-1.5","border-b","border-chrome-border/50","bg-[#162026]/40","p-2"],[1,"flex","items-end","gap-1","p-1.5"],["type","button","title","Adjuntar imágenes",1,"shrink-0","flex","h-9","w-9","items-center","justify-center","rounded-full","text-chrome-muted","hover:bg-chrome-border","hover:text-chrome-text","transition","disabled:opacity-40","disabled:cursor-not-allowed",3,"click","disabled"],["fill","none","viewBox","0 0 24 24","stroke","currentColor","stroke-width","2",1,"h-5","w-5"],["stroke-linecap","round","stroke-linejoin","round","d","M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"],["type","file","accept","image/*","multiple","",1,"hidden",3,"change"],["type","button","title","Adjuntar archivo de texto/código",1,"shrink-0","flex","h-9","w-9","items-center","justify-center","rounded-full","text-chrome-muted","hover:bg-chrome-border","hover:text-chrome-text","transition","disabled:opacity-40","disabled:cursor-not-allowed",3,"click","disabled"],["stroke-linecap","round","stroke-linejoin","round","d","M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13"],["type","file","accept",".txt,.md,.markdown,.json,.jsonl,.csv,.tsv,.yaml,.yml,.toml,.xml,.html,.htm,.css,.scss,.sass,.less,.js,.mjs,.cjs,.ts,.tsx,.jsx,.vue,.svelte,.py,.rb,.go,.rs,.java,.kt,.kts,.c,.cpp,.h,.hpp,.cs,.swift,.sh,.bash,.zsh,.ps1,.bat,.cmd,.sql,.graphql,.gql,.proto,.dockerfile,.env,.gitignore,.log,.ini,.conf,.cfg,.lock,text/*","multiple","",1,"hidden",3,"change"],["type","button",1,"shrink-0","flex","h-9","w-9","items-center","justify-center","rounded-full","text-chrome-muted","hover:bg-chrome-border","hover:text-chrome-text","transition","disabled:opacity-40","disabled:cursor-not-allowed",3,"disabled","title","bg-red-500","text-white","animate-pulse"],["rows","1","placeholder","Escribí un mensaje o / para ver comandos…","autocomplete","off","spellcheck","false",1,"flex-1","resize-none","bg-transparent","px-2","py-1.5","text-sm","leading-relaxed","text-chrome-text","placeholder:text-chrome-muted","focus:outline-none",3,"ngModelChange","keydown","input","ngModel","disabled"],["type","button","title","Detener el turno en curso",1,"shrink-0","rounded-full","bg-red-500/15","px-3","py-2","text-sm","font-semibold","text-red-400","transition","hover:bg-red-500/25","hover:text-red-300"],["type","button","title","Enviar (Enter)",1,"shrink-0","rounded-full","bg-chrome-accent","px-4","py-2","text-sm","font-semibold","text-chrome-bg","transition","hover:brightness-110","disabled:cursor-not-allowed","disabled:opacity-40",3,"disabled"],[1,"mt-1.5","flex","items-center","justify-between","gap-3","px-2","text-[11px]","text-chrome-muted"],[1,"hidden","sm:block"],[1,"rounded","bg-chrome-border","px-1.5","py-0.5","font-mono"],[1,"flex","items-center","gap-2","ml-auto"],[1,"text-red-400","truncate","max-w-[200px]"],["title","Hacé click para configurar modelo o proveedor de IA",1,"inline-flex","items-center","gap-1.5","rounded-full","bg-chrome-bg/60","border","border-chrome-border/60","px-2.5","py-1","text-xs","text-chrome-text/80","hover:bg-chrome-border","hover:border-chrome-accent/30","cursor-pointer","transition","active:scale-95"],[1,"hidden","lg:flex","w-[320px]","xl:w-[380px]","flex-col","border-l","border-chrome-border/70","bg-[#07070a]","text-chrome-text","relative","overflow-hidden","transition-all","duration-300"],[1,"flex","items-center","gap-2","border-b","border-chrome-border/80","bg-[#0b0b0f]","px-4","py-3.5","select-none"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2",1,"h-5","w-5","text-purple-400"],["stroke-linecap","round","stroke-linejoin","round","d","M12 18.25c-1.8 0-3.5-.7-4.8-2a7.5 7.5 0 0 1-2.2-5.3c0-1.8.7-3.5 2-4.8a7.5 7.5 0 0 1 10.6 0c1.3 1.3 2 3 2 4.8 0 2-1 3.8-2.2 5.3a6.8 6.8 0 0 1-5.4 2Z"],["stroke-linecap","round","stroke-linejoin","round","d","M12 8.25v3.5m-3-1.75h6"],[1,"text-sm","font-semibold","tracking-wide","text-purple-300","uppercase"],[1,"flex-1","overflow-y-auto","px-4","py-6","scrollbar-thin","scrollbar-thumb-purple-950"],[1,"prose","prose-invert","max-w-none","text-xs","font-mono","text-purple-200/90","leading-relaxed","whitespace-pre-wrap","select-text","selection:bg-purple-500/30"],[1,"flex","h-full","flex-col","items-center","justify-center","text-center","opacity-40","px-6","select-none"],[1,"border-t","border-chrome-border/40","bg-[#070709]","px-4","py-3","flex","items-center","justify-between","text-[10px]","text-purple-400/60","font-sans","select-none"],[1,"flex","items-center","gap-1.5"],[1,"h-1.5","w-1.5","rounded-full","bg-pink-500","shadow-[0_0_6px_#ec4899]"],[1,"h-1.5","w-1.5","rounded-full","bg-purple-500","shadow-[0_0_6px_#a855f7]"],[1,"fixed","inset-0","z-50","flex","items-center","justify-center","bg-black/90","p-4","backdrop-blur-sm","transition-all","duration-300","animate-fadeIn","cursor-pointer"],[1,"thinking-modal","fixed","inset-0","z-40","lg:hidden","flex","flex-col","bg-[#07070a]","animate-fadeIn","text-chrome-text"],[1,"fixed","inset-0","z-50","flex","items-center","justify-center","bg-black/80","p-4","backdrop-blur-lg","transition-all","duration-300","animate-fadeIn"],[1,"flex","items-center","justify-between","px-3","py-3","border-b","border-chrome-border"],[1,"text-xs","font-semibold","uppercase","tracking-wide","text-chrome-muted"],["title","Cerrar",1,"lg:hidden","rounded-md","p-1","text-chrome-muted","hover:bg-chrome-border","hover:text-chrome-text","transition",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2",1,"h-4","w-4"],["stroke-linecap","round","stroke-linejoin","round","d","M6 18L18 6M6 6l12 12"],[1,"mx-3","mt-3","flex","items-center","gap-2","rounded-lg","border","border-chrome-border","bg-chrome-panel","px-3","py-2","text-sm","font-medium","text-chrome-text","transition","hover:bg-chrome-border","active:scale-[0.98]",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2",1,"h-4","w-4","text-chrome-accent"],["stroke-linecap","round","stroke-linejoin","round","d","M12 4v16m8-8H4"],[1,"flex-1","overflow-y-auto","px-2","py-3","space-y-1"],[1,"px-2","py-1","text-[10px]","font-semibold","uppercase","tracking-wide","text-chrome-muted"],[1,"px-2","py-3","text-xs","text-chrome-muted","italic"],[1,"group","relative","w-full","text-left","rounded-md","px-2.5","py-2","text-xs","text-chrome-text/90","hover:bg-chrome-border","transition","duration-200","active:scale-[0.98]",3,"bg-chrome-border","border-l-2","border-l-purple-500"],[1,"border-t","border-chrome-border","px-3","py-2","text-[10px]","text-chrome-muted"],[1,"group","relative","w-full","text-left","rounded-md","px-2.5","py-2","text-xs","text-chrome-text/90","hover:bg-chrome-border","transition","duration-200","active:scale-[0.98]",3,"click"],[1,"truncate","font-semibold","text-white/90","group-hover:text-chrome-accent","transition"],[1,"mt-0.5","flex","items-center","justify-between","gap-2","text-[10px]","text-chrome-muted"],[1,"bg-purple-500/10","text-purple-300","px-1","rounded"],[1,"h-2","w-2","animate-pulse","rounded-full","bg-chrome-accent"],["title","Ver razonamiento",1,"lg:hidden","flex","items-center","justify-center","rounded-full","bg-purple-500/10","p-1.5","text-purple-400","hover:bg-purple-500/20","active:scale-95","transition",3,"click"],[1,"animate-ping","absolute","inline-flex","h-full","w-full","rounded-full","bg-green-400","opacity-75"],[1,"relative","inline-flex","rounded-full","h-1.5","w-1.5","bg-green-500"],[1,"flex","justify-end"],[1,"max-w-[78%]","rounded-2xl","px-3.5","py-2","text-sm","leading-relaxed","shadow-sm","flex","flex-col","gap-2"],[1,"flex","flex-wrap","gap-1.5","mb-1","max-w-full"],[1,"whitespace-pre-wrap","break-words","font-sans"],[1,"mt-1","text-right","text-[10px]","text-chrome-muted"],[1,"relative","h-28","max-w-[160px]","rounded-lg","overflow-hidden","border","border-white/10","shadow-sm","cursor-pointer","hover:brightness-110","transition","duration-200"],[1,"relative","h-28","max-w-[160px]","rounded-lg","overflow-hidden","border","border-white/10","shadow-sm","cursor-pointer","hover:brightness-110","transition","duration-200",3,"click"],[1,"h-full","w-full","object-cover",3,"src"],[1,"max-w-[78%]","rounded-2xl","px-3.5","py-2","text-sm","leading-relaxed","shadow-sm"],[1,"mb-1","text-[10px]","uppercase","tracking-wide","text-chrome-muted"],[1,"mb-2","text-2xl"],[1,"mb-1","text-sm","font-semibold"],[1,"rounded","bg-chrome-bg","px-1","py-0.5"],[1,"w-full","max-w-[78%]","rounded-2xl","border","border-yellow-500/40","bg-yellow-500/10","px-3.5","py-3","text-sm","shadow-sm"],[1,"mb-2","flex","items-center","gap-2"],[1,"text-yellow-400"],[1,"font-semibold"],[1,"ml-auto","rounded-full","bg-yellow-500/20","px-2","py-0.5","text-[10px]","font-mono"],[1,"mb-1","text-xs","text-chrome-muted"],[1,"mb-3","whitespace-pre-wrap","break-words","text-chrome-text"],[1,"flex","flex-wrap","gap-2"],[1,"rounded-lg","bg-chrome-accent","px-3","py-1.5","text-xs","font-semibold","text-chrome-bg","transition","hover:brightness-110",3,"click"],[1,"rounded-lg","border","border-chrome-accent/50","px-3","py-1.5","text-xs","font-semibold","text-chrome-accent","transition","hover:bg-chrome-accent/10",3,"click"],[1,"rounded-lg","border","border-red-500/40","px-3","py-1.5","text-xs","font-semibold","text-red-400","transition","hover:bg-red-500/10",3,"click"],[1,"border-b","border-chrome-border","px-3","py-2","text-[11px]","uppercase","tracking-wide","text-chrome-muted"],[1,"px-3","py-3","text-sm","text-chrome-muted"],["type","button",1,"flex","w-full","items-start","gap-2","border-b","border-chrome-border/40","px-3","py-2","text-left","transition","hover:bg-chrome-border","last:border-b-0",3,"bg-chrome-border"],["type","button",1,"flex","w-full","items-start","gap-2","border-b","border-chrome-border/40","px-3","py-2","text-left","transition","hover:bg-chrome-border","last:border-b-0",3,"click","mouseenter"],[1,"flex-1","min-w-0"],[1,"flex","items-baseline","gap-2"],[1,"font-mono","text-sm","font-semibold","text-chrome-accent"],[1,"font-mono","text-[11px]","text-chrome-muted"],[1,"mt-0.5","text-xs","text-chrome-muted","line-clamp-2"],[1,"mt-0.5","text-[10px]","text-chrome-muted"],[1,"font-mono"],[1,"relative","group","h-14","w-14","rounded-lg","overflow-hidden","border","border-chrome-border","bg-chrome-bg","shadow-sm"],["type","button","title","Eliminar",1,"absolute","-top-0.5","-right-0.5","flex","h-4.5","w-4.5","items-center","justify-center","rounded-full","bg-black/60","text-[9px]","text-white","opacity-80","hover:opacity-100","hover:bg-red-500","transition","shadow",3,"click"],[1,"group","flex","items-center","gap-1.5","rounded-md","border","border-chrome-border","bg-chrome-panel","px-2","py-1","text-xs",3,"opacity-60","title"],[1,"group","flex","items-center","gap-1.5","rounded-md","border","border-chrome-border","bg-chrome-panel","px-2","py-1","text-xs",3,"title"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2",1,"h-3.5","w-3.5","text-chrome-muted","flex-shrink-0"],["stroke-linecap","round","stroke-linejoin","round","d","M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"],[1,"max-w-[140px]","truncate"],["type","button","title","Quitar",1,"ml-0.5","text-chrome-muted","hover:text-red-400","transition",3,"click"],["type","button",1,"shrink-0","flex","h-9","w-9","items-center","justify-center","rounded-full","text-chrome-muted","hover:bg-chrome-border","hover:text-chrome-text","transition","disabled:opacity-40","disabled:cursor-not-allowed",3,"click","disabled","title"],["stroke-linecap","round","stroke-linejoin","round","d","M19 11a7 7 0 01-14 0m7 7v3m-4 0h8m-4-6a3 3 0 01-3-3V6a3 3 0 116 0v6a3 3 0 01-3 3z"],["type","button","title","Detener el turno en curso",1,"shrink-0","rounded-full","bg-red-500/15","px-3","py-2","text-sm","font-semibold","text-red-400","transition","hover:bg-red-500/25","hover:text-red-300",3,"click"],[1,"h-2.5","w-2.5","rounded-sm","bg-red-400"],["type","button","title","Enviar (Enter)",1,"shrink-0","rounded-full","bg-chrome-accent","px-4","py-2","text-sm","font-semibold","text-chrome-bg","transition","hover:brightness-110","disabled:cursor-not-allowed","disabled:opacity-40",3,"click","disabled"],[1,"text-base","leading-none"],["title","Hacé click para configurar modelo o proveedor de IA",1,"inline-flex","items-center","gap-1.5","rounded-full","bg-chrome-bg/60","border","border-chrome-border/60","px-2.5","py-1","text-xs","text-chrome-text/80","hover:bg-chrome-border","hover:border-chrome-accent/30","cursor-pointer","transition","active:scale-95",3,"click"],[1,"h-1.5","w-1.5","rounded-full","bg-chrome-accent"],[1,"font-semibold","text-chrome-accent","hover:underline"],[1,"text-chrome-muted"],[1,"text-chrome-text/90","font-medium"],[1,"font-semibold","text-chrome-accent","hover:underline",3,"click"],[1,"inline-flex","gap-1","items-center","ml-1","text-purple-400"],[1,"h-1.5","w-1.5","rounded-full","bg-purple-400","animate-bounce",2,"animation-delay","0ms"],[1,"h-1.5","w-1.5","rounded-full","bg-purple-400","animate-bounce",2,"animation-delay","150ms"],[1,"h-1.5","w-1.5","rounded-full","bg-purple-400","animate-bounce",2,"animation-delay","300ms"],[1,"mb-4","text-purple-400"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","1.5",1,"h-16","w-16"],["stroke-linecap","round","stroke-linejoin","round","d","M9.75 9.75h4.5m-4.5 2.5h4.5"],[1,"text-xs","text-purple-100/70","font-sans","tracking-wide"],[1,"fixed","inset-0","z-50","flex","items-center","justify-center","bg-black/90","p-4","backdrop-blur-sm","transition-all","duration-300","animate-fadeIn","cursor-pointer",3,"click"],[1,"relative","max-h-[90vh]","max-w-[90vw]","overflow-hidden","rounded-xl","border","border-white/10","shadow-2xl",3,"click"],[1,"max-h-[85vh]","max-w-[85vw]","object-contain","rounded-lg",3,"src"],[1,"absolute","top-3","right-3","flex","h-9","w-9","items-center","justify-center","rounded-full","bg-black/60","text-white","hover:bg-black/80","transition",3,"click"],[1,"fixed","inset-0","z-50","flex","items-center","justify-center","bg-black/70","p-4","backdrop-blur-md","transition-all","duration-300","animate-fadeIn"],[1,"fixed","inset-0","z-50","flex","items-center","justify-center","bg-black/70","p-4","backdrop-blur-md","transition-all","duration-300","animate-fadeIn",3,"click"],[1,"relative","w-full","max-w-xl","max-h-[85vh]","overflow-hidden","rounded-2xl","border","border-white/10","bg-chrome-panel/75","backdrop-blur-xl","shadow-2xl","flex","flex-col","transition-all","duration-300","scale-100","opacity-100",3,"click"],[1,"h-1","w-full","bg-gradient-to-r","from-chrome-accent","via-[#a855f7]","to-[#00d2ff]"],[1,"flex","items-center","justify-between","border-b","border-white/5","px-5","py-4","bg-black/20"],[1,"flex","h-8","w-8","items-center","justify-center","rounded-full","bg-white/5","text-chrome-muted","hover:bg-white/10","hover:text-white","transition","active:scale-95",3,"click"],[1,"flex-1","overflow-y-auto","p-5","text-sm","leading-relaxed"],[1,"flex","flex-col","md:flex-row","gap-5","h-[60vh]","min-h-[400px]"],[1,"space-y-4"],[1,"space-y-5"],[1,"border-t","border-white/5","px-5","py-3.5","bg-black/25","flex","items-center","justify-between","text-[10px]","text-chrome-muted","select-none"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2",1,"h-5","w-5","text-[#a855f7]"],[1,"text-base","font-semibold","text-white"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2",1,"h-5","w-5","text-chrome-accent"],["stroke-linecap","round","stroke-linejoin","round","d","M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2",1,"h-5","w-5","text-[#ff00a0]"],["stroke-linecap","round","stroke-linejoin","round","d","M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2",1,"h-5","w-5","text-[#00d2ff]"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2",1,"h-5","w-5","text-green-400"],["stroke-linecap","round","stroke-linejoin","round","d","M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"],[1,"w-full","md:w-1/2","flex","flex-col","border-r","border-white/5","pr-4","h-full","overflow-hidden"],[1,"mb-3","relative"],["type","text","placeholder","Buscar conversación...",1,"w-full","rounded-xl","border","border-white/10","bg-black/35","px-3","py-2","pl-9","text-xs","text-chrome-text","placeholder:text-chrome-muted","focus:border-chrome-accent","focus:outline-none","focus:ring-1","focus:ring-chrome-accent/30",3,"ngModelChange","ngModel"],["fill","none","viewBox","0 0 24 24","stroke","currentColor","stroke-width","2",1,"absolute","left-3","top-2.5","h-3.5","w-3.5","text-chrome-muted"],["stroke-linecap","round","stroke-linejoin","round","d","M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"],[1,"flex-1","overflow-y-auto","space-y-1.5","pr-1"],[1,"py-12","text-center","text-xs","text-chrome-muted","italic"],[1,"group","flex","flex-col","gap-1","rounded-xl","border","px-3","py-2.5","cursor-pointer","transition","duration-200","active:scale-[0.98]","select-none",3,"class"],[1,"w-full","md:w-1/2","flex","flex-col","pl-2","h-full","overflow-hidden","justify-between"],[1,"flex-1","flex","flex-col","items-center","justify-center","text-center","opacity-40","px-4","select-none"],[1,"group","flex","flex-col","gap-1","rounded-xl","border","px-3","py-2.5","cursor-pointer","transition","duration-200","active:scale-[0.98]","select-none",3,"click"],[1,"flex","items-start","justify-between","gap-2"],[1,"font-semibold","text-xs","text-white","truncate","max-w-[80%]","group-hover:text-purple-300","transition"],[1,"rounded","bg-purple-500/10","text-purple-300","px-1","py-0.5","text-[9px]","shrink-0","font-mono"],[1,"text-[10px]","text-chrome-muted","line-clamp-1","italic"],[1,"flex","items-center","justify-between","text-[9px]","text-chrome-muted","mt-1","font-mono"],[1,"flex-1","overflow-y-auto","space-y-4","pr-1"],[1,"space-y-1"],[1,"text-[10px]","font-bold","uppercase","tracking-wider","text-purple-400"],[1,"text-sm","font-bold","text-white","leading-snug"],[1,"rounded-xl","border","border-white/5","bg-black/25","p-3","space-y-1.5"],[1,"rounded-xl","border","border-white/5","bg-black/25","p-3","text-center","text-xs","text-chrome-muted","italic"],[1,"grid","grid-cols-2","gap-2","text-[10px]"],[1,"rounded-lg","bg-white/5","border","border-white/5","p-2","space-y-0.5"],[1,"text-chrome-muted","block"],[1,"font-bold","text-white","font-mono"],[1,"rounded-lg","bg-white/5","border","border-white/5","p-2","space-y-0.5","font-mono","text-[9px]"],[1,"font-medium","text-purple-300","block","truncate","select-all"],[1,"mt-4","pt-3","border-t","border-white/5","flex","gap-2","shrink-0"],[1,"flex-1","rounded-xl","bg-purple-600","hover:bg-purple-500","active:scale-95","transition","text-white","py-2","text-xs","font-semibold","shadow-lg","shadow-purple-500/20","flex","items-center","justify-center","gap-1.5",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2.5",1,"h-3.5","w-3.5"],["stroke-linecap","round","stroke-linejoin","round","d","M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"],[1,"text-[9px]","font-semibold","uppercase","tracking-wider","text-chrome-muted","block"],[1,"text-xs","text-chrome-text","leading-relaxed","whitespace-pre-wrap","max-h-[18vh]","overflow-y-auto","italic","font-sans","selection:bg-purple-500/20"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","1.5",1,"h-12","w-12","text-purple-400","mb-2.5","animate-pulse"],[1,"text-xs","text-purple-100/80","font-medium"],[1,"text-[10px]","text-chrome-muted","max-w-[200px]","mt-1"],[1,"grid","grid-cols-2","gap-3","max-h-[50vh]","overflow-y-auto","pr-1"],[1,"flex","items-center","gap-3","rounded-xl","border","px-4","py-3","cursor-pointer","transition","active:scale-95","select-none",3,"class"],[1,"flex","items-center","gap-3","rounded-xl","border","px-4","py-3","cursor-pointer","transition","active:scale-95","select-none",3,"click"],[1,"relative","flex","h-2","w-2","shrink-0"],[1,"relative","inline-flex","rounded-full","h-2","w-2","bg-chrome-accent","shadow-[0_0_6px_#00ffc2]"],[1,"relative","inline-flex","rounded-full","h-2","w-2","bg-white/20"],[1,"min-w-0"],[1,"font-medium","text-xs","sm:text-sm","text-white","capitalize","block","truncate"],[1,"text-[10px]","text-chrome-muted"],[1,"flex","items-center","justify-between","gap-3","border-b","border-white/5","pb-2"],[1,"text-chrome-accent","capitalize"],[1,"text-xs","text-[#00d2ff]","hover:underline",3,"click"],[1,"space-y-2","max-h-[50vh]","overflow-y-auto","pr-1"],[1,"flex","items-center","justify-between","rounded-xl","border","px-4","py-3","cursor-pointer","transition","active:scale-95","select-none",3,"class"],[1,"flex","items-center","justify-between","rounded-xl","border","px-4","py-3","cursor-pointer","transition","active:scale-95","select-none",3,"click"],[1,"flex","items-center","gap-3","min-w-0"],[1,"relative","inline-flex","rounded-full","h-2","w-2","bg-[#ff00a0]","shadow-[0_0_6px_#ff00a0]"],[1,"font-medium","text-xs","sm:text-sm","text-white","truncate"],[1,"text-[10px]","text-chrome-muted","uppercase","font-mono","tracking-wider","shrink-0","bg-white/5","px-2","py-0.5","rounded"],[1,"flex","flex-col","gap-1","rounded-xl","border","px-4","py-3","cursor-pointer","transition","active:scale-95",3,"class"],[1,"flex","flex-col","gap-1","rounded-xl","border","px-4","py-3","cursor-pointer","transition","active:scale-95",3,"click"],[1,"flex","items-center","justify-between","gap-3"],[1,"font-semibold","text-xs","sm:text-sm","text-white","truncate"],[1,"rounded-full","bg-[#00d2ff]/15","px-2","py-0.5","text-[9px]","font-bold","text-[#62e5ff]","uppercase"],[1,"text-[10px]","text-chrome-muted","font-mono","truncate"],[1,"flex","items-center","justify-between","rounded-2xl","border","border-white/5","bg-black/20","p-4"],[1,"text-xs","font-semibold","text-white","block"],[1,"text-[11px]","text-chrome-muted"],[1,"rounded-xl","bg-red-500/15","hover:bg-red-500/25","border","border-red-500/30","px-4","py-2","text-xs","font-semibold","text-red-400","transition","active:scale-95","shadow-lg"],[1,"rounded-xl","bg-green-500/15","hover:bg-green-500/25","border","border-green-500/30","px-4","py-2","text-xs","font-semibold","text-green-400","transition","active:scale-95","shadow-lg"],[1,"grid","grid-cols-2","gap-3"],[1,"flex","items-center","justify-between","rounded-xl","bg-white/5","border","border-white/5","p-3","text-xs"],[1,"flex","items-center","gap-1.5","font-medium"],[1,"h-2","w-2","rounded-full","bg-current"],[1,"flex","flex-col","items-center","justify-center","p-6","border","border-white/5","rounded-2xl","bg-black/45","space-y-3"],[1,"rounded-xl","bg-red-500/15","hover:bg-red-500/25","border","border-red-500/30","px-4","py-2","text-xs","font-semibold","text-red-400","transition","active:scale-95","shadow-lg",3,"click"],[1,"rounded-xl","bg-green-500/15","hover:bg-green-500/25","border","border-green-500/30","px-4","py-2","text-xs","font-semibold","text-green-400","transition","active:scale-95","shadow-lg",3,"click"],[1,"text-xs","font-semibold","text-white"],[1,"text-[10px]","text-chrome-muted","text-center","max-w-xs"],[1,"relative","p-3","bg-white","rounded-xl","shadow-lg"],["alt","WhatsApp Link QR",1,"h-44","w-44","object-contain",3,"src"],[1,"text-[6px]","font-mono","leading-none","bg-black","text-white","p-2","select-all","overflow-auto","rounded","border","border-white/10"],[1,"rounded-xl","border","border-red-500/20","bg-red-500/10","p-3","text-xs","text-red-400"],[1,"font-semibold","block","mb-1"],[1,"list-disc","pl-4","space-y-1"],[1,"flex","items-center","justify-between","gap-2","border-b","border-chrome-border","bg-[#0b0b0f]","px-3","select-none","thinking-modal-header"],[1,"flex","items-center","gap-2","min-w-0"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2",1,"h-5","w-5","flex-shrink-0","text-purple-400"],[1,"truncate","text-[13px]","font-semibold","text-purple-300"],["aria-label","Cerrar razonamiento",1,"flex-shrink-0","rounded-md","border","border-chrome-border/60","px-3","py-1.5","text-xs","text-chrome-muted","hover:bg-chrome-border","hover:text-chrome-text","active:scale-95","transition",3,"click"],[1,"flex-1","overflow-y-auto","px-4","py-4"],[1,"text-[13px]","font-mono","leading-[1.55]","text-purple-200/90","whitespace-pre-wrap","break-words","select-text","selection:bg-purple-500/30",2,"overflow-wrap","anywhere","word-break","break-word"],[1,"inline-flex","gap-1","items-center","ml-1","text-purple-400","align-middle"],[1,"border-t","border-chrome-border/40","bg-[#070709]","px-4","flex","items-center","justify-between","text-[10px]","text-purple-400/60","select-none","thinking-modal-footer"],[1,"relative","w-full","max-w-md","overflow-hidden","rounded-2xl","border","border-white/10","bg-[#0d151c]/90","backdrop-blur-2xl","shadow-2xl","flex","flex-col","transition-all","duration-300","scale-100","opacity-100"],[1,"h-1.5","w-full","bg-gradient-to-r","from-cyan-400","via-purple-500","to-pink-500"],[1,"flex","items-center","justify-between","border-b","border-white/5","px-5","py-4","bg-black/35"],[1,"flex","items-center","gap-2.5"],[1,"flex","h-2","w-2","relative","shrink-0"],[1,"animate-ping","absolute","inline-flex","h-full","w-full","rounded-full","bg-cyan-400","opacity-75"],[1,"relative","inline-flex","rounded-full","h-2","w-2","bg-cyan-400"],[1,"text-base","font-bold","text-white","tracking-wide"],["title","Cancelar selección",1,"flex","h-8","w-8","items-center","justify-center","rounded-full","bg-white/5","text-chrome-muted","hover:bg-white/10","hover:text-white","transition","active:scale-95",3,"click"],[1,"p-5","flex-1","overflow-y-auto","space-y-4","max-h-[60vh]"],[1,"text-xs","text-chrome-muted","leading-relaxed","font-medium","bg-[#16222f]/30","p-3","rounded-xl","border","border-white/5"],[1,"space-y-2"],[1,"w-full","flex","items-center","justify-between","rounded-xl","border","border-white/5","bg-white/5","px-4","py-3","text-left","transition","hover:bg-white/10","hover:border-cyan-400/50","active:scale-[0.98]","select-none","group"],[1,"border-t","border-white/5","px-5","py-3.5","bg-black/40","flex","items-center","justify-between","text-[10px]","text-chrome-muted","select-none"],[1,"w-full","flex","items-center","justify-between","rounded-xl","border","border-white/5","bg-white/5","px-4","py-3","text-left","transition","hover:bg-white/10","hover:border-cyan-400/50","active:scale-[0.98]","select-none","group",3,"click"],[1,"relative","flex","h-2.5","w-2.5","shrink-0"],[1,"relative","inline-flex","rounded-full","h-2.5","w-2.5","bg-cyan-400","shadow-[0_0_6px_#22d3ee]"],[1,"relative","inline-flex","rounded-full","h-2.5","w-2.5","bg-white/20","group-hover:bg-white/40","transition"],[1,"font-semibold","text-xs","sm:text-sm","text-white","group-hover:text-cyan-300","transition","truncate"],[1,"text-[9px]","text-cyan-400","font-bold","uppercase","tracking-wider","bg-cyan-400/10","px-2","py-0.5","rounded"],[1,"h-1.5","w-full","bg-gradient-to-r","from-purple-500","via-pink-500","to-rose-500"],[1,"animate-ping","absolute","inline-flex","h-full","w-full","rounded-full","bg-purple-400","opacity-75"],[1,"relative","inline-flex","rounded-full","h-2","w-2","bg-purple-400"],["title","Cancelar entrada",1,"flex","h-8","w-8","items-center","justify-center","rounded-full","bg-white/5","text-chrome-muted","hover:bg-white/10","hover:text-white","transition","active:scale-95",3,"click"],[1,"text-xs","text-chrome-muted","leading-relaxed","font-medium","bg-[#1c162f]/30","p-3","rounded-xl","border","border-white/5"],[1,"space-y-3"],[1,"text-[11px]","font-bold","text-purple-300","uppercase","tracking-wider"],[1,"relative","flex","items-center","rounded-xl","border","border-white/10","bg-black/40","overflow-hidden","focus-within:border-purple-500","focus-within:ring-2","focus-within:ring-purple-500/20","transition-all","duration-200"],["autofocus","","autocomplete","off","spellcheck","false",1,"w-full","bg-transparent","px-4","py-3","text-sm","text-white","placeholder:text-chrome-muted","focus:outline-none",3,"ngModelChange","keydown.enter","type","placeholder","ngModel"],[1,"flex","items-center","gap-1.5","pr-3","shrink-0"],["type","button",1,"text-chrome-muted","hover:text-white","transition","p-1","rounded-lg","hover:bg-white/5","active:scale-95",3,"title"],["type","button",1,"text-chrome-muted","hover:text-white","disabled:opacity-30","disabled:cursor-not-allowed","transition","p-1","rounded-lg","hover:bg-white/5","active:scale-95",3,"click","disabled","title"],["fill","none","viewBox","0 0 24 24","stroke","currentColor","stroke-width","2.5",1,"h-4.5","w-4.5","text-green-400"],["fill","none","viewBox","0 0 24 24","stroke","currentColor","stroke-width","2",1,"h-4.5","w-4.5"],[1,"border-t","border-white/5","px-5","py-4","bg-black/40","flex","items-center","justify-between"],[1,"text-[10px]","text-chrome-muted","select-none"],[1,"flex","gap-2"],[1,"rounded-xl","border","border-white/10","hover:bg-white/5","active:scale-95","transition","text-chrome-text","px-4","py-2","text-xs","font-semibold",3,"click"],[1,"rounded-xl","bg-purple-600","hover:bg-purple-500","active:scale-95","transition","text-white","px-5","py-2","text-xs","font-semibold","shadow-lg","shadow-purple-500/20",3,"click"],["type","button",1,"text-chrome-muted","hover:text-white","transition","p-1","rounded-lg","hover:bg-white/5","active:scale-95",3,"click","title"],["stroke-linecap","round","stroke-linejoin","round","d","M15 12a3 3 0 11-6 0 3 3 0 016 0z"],["stroke-linecap","round","stroke-linejoin","round","d","M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"],["stroke-linecap","round","stroke-linejoin","round","d","M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.542-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.542 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"],["stroke-linecap","round","stroke-linejoin","round","d","M5 13l4 4L19 7"],["stroke-linecap","round","stroke-linejoin","round","d","M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"]],template:function(e,t){if(1&e){let e=j();C(0,"div",6),h(1,Ce,19,2,"aside",7),C(2,"div",8)(3,"header",9)(4,"div",10)(5,"button",11),T("click",function(){return O(e),G(t.toggleSidebar())}),N(),C(6,"svg",12),S(7,"path",13),r()(),Q(),C(8,"div",14),S(9,"img",15),r(),C(10,"div",16)(11,"div",17),A(12,"Context Code"),r(),C(13,"div",18),A(14),h(15,be,1,1),r()()(),C(16,"div",19),h(17,ve,3,0,"span",20)(18,ge,4,2,"button",21),C(19,"button",22),T("click",function(){return O(e),G(t.openWebModal("canalGlobal"))}),C(20,"span",23),h(21,we,2,0)(22,ke,1,0,"span",24),r(),C(23,"span",25),A(24,"Canal Global"),r()(),C(25,"button",26),T("click",function(){return O(e),G(t.openWebModal("workspaces"))}),N(),C(26,"svg",27),S(27,"path",28),r(),Q(),C(28,"span",25),A(29,"Workspace"),r()(),C(30,"button",29),T("click",function(){return O(e),G(t.openWebModal("sessions"))}),N(),C(31,"svg",30),S(32,"path",31),r(),Q(),C(33,"span"),A(34),r()(),C(35,"button",32),T("click",function(){return O(e),G(t.clearChat())}),A(36," Limpiar "),r(),C(37,"button",33),T("click",function(){return O(e),G(t.logout())}),A(38," Salir "),r()()(),C(39,"main",34,0)(41,"div",35),k(42,Ve,2,1,null,null,R),h(44,Me,10,0,"div",36),k(45,Fe,20,3,"div",37,R),r()(),C(47,"footer",38)(48,"div",39),h(49,ze,6,2,"div",40),C(50,"div",41),h(51,Be,3,0,"div",42)(52,We,3,0,"div",43),C(53,"div",44)(54,"button",45),T("click",function(){O(e);let t=z(58);return G(t.click())}),N(),C(55,"svg",46),S(56,"path",47),r()(),Q(),C(57,"input",48,1),T("change",function(o){return O(e),G(t.onFileSelected(o))}),r(),C(59,"button",49),T("click",function(){O(e);let t=z(63);return G(t.click())}),N(),C(60,"svg",46),S(61,"path",50),r()(),Q(),C(62,"input",51,2),T("change",function(o){return O(e),G(t.onTextFileSelected(o))}),r(),h(64,qe,3,8,"button",52),C(65,"textarea",53,3),F("ngModelChange",function(o){return O(e),D(t.input,o)||(t.input=o),G(o)}),T("ngModelChange",function(o){return O(e),G(t.onInputChange(o))})("keydown",function(o){return O(e),G(t.onKeydown(o))})("input",function(o){return O(e),G(t.autoGrow(o))}),r(),h(67,Oe,4,0,"button",54)(68,Ne,5,1,"button",55),r()(),C(69,"div",56)(70,"div",57)(71,"kbd",58),A(72,"Enter"),r(),A(73," envía · "),C(74,"kbd",58),A(75,"Shift+Enter"),r(),A(76," nueva línea "),r(),C(77,"div",59),h(78,Ue,2,1,"span",60)(79,Je,5,3,"span",61),r()()()()(),C(80,"aside",62)(81,"div",63),N(),C(82,"svg",64),S(83,"path",65)(84,"path",66),r(),Q(),C(85,"span",67),A(86,"Razonamiento del Modelo"),r()(),C(87,"div",68),h(88,Ye,3,2,"div",69)(89,et,7,0,"div",70),r(),C(90,"div",71)(91,"div",72),S(92,"span",73),C(93,"span"),A(94,"Modelos de razonamiento"),r()(),C(95,"div",72),S(96,"span",74),C(97,"span"),A(98,"Modelos Pro"),r()()()()(),h(99,tt,5,1,"div",75)(100,Ht,1,1)(101,Gt,24,4,"div",76)(102,Nt,22,2,"div",77)(103,Yt,33,9,"div",77)}if(2&e){let e,o,n,r,s;u(),v(t.showSidebar()?1:-1),u(4),m("aria-label",t.showSidebar()?"Cerrar sesiones":"Abrir sesiones"),u(9),B(" ",t.stateLabel()," "),u(),v(t.cwd()?15:-1),u(2),v(t.isLoading()?17:-1),u(),v(t.isThinking()||t.thinkingText()?18:-1),u(3),v(null!=(e=t.globalCanalStatus())&&e.running?21:22),u(13),B("Historial (",t.cliSessions().length,")"),u(8),y(t.messages()),u(2),v(0===t.messages().length?44:-1),u(),y(t.pendingPermissions()),u(4),v(t.showCommandPalette()?49:-1),u(2),v(t.selectedImages().length>0?51:-1),u(),v(t.attachedFiles().length>0?52:-1),u(2),f("disabled",!t.isConnected()),u(5),f("disabled",!t.isConnected()),u(5),v(t.voiceSupported()?64:-1),u(),x("max-height","180px"),V("ngModel",t.input),f("disabled",!t.isConnected()),u(2),v(t.isLoading()?67:68),u(11),v(t.lastError()&&!t.isConnected()?78:-1),u(),v(t.currentModel()||t.currentProvider()?79:-1),u(3),b("animate-pulse",t.isThinking()),u(6),v(t.isThinking()||t.thinkingText()?88:89),u(11),v((o=t.activeModalImage())?99:-1,o),u(),v((n=t.activeWebModal())?100:-1,n),u(),v(t.showMobileThinking()?101:-1),u(),v((r=t.activeInteractiveSelect())?102:-1,r),u(),v((s=t.activeInteractiveInput())?103:-1,s)}},dependencies:[n,e,t,o],styles:["@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.animate-fadeIn[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_fadeIn .2s cubic-bezier(.16,1,.3,1) forwards}.thinking-modal[_ngcontent-%COMP%]{padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px);padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px)}.thinking-modal-header[_ngcontent-%COMP%]{padding-top:12px;padding-bottom:12px;min-height:52px}.thinking-modal-footer[_ngcontent-%COMP%]{padding-top:10px;padding-bottom:10px}"],changeDetection:0})}};export{ee as ChatComponent};
@@ -1 +1 @@
1
- import{a as e,b as t,c as o,d as r}from"./chunk-DFKSSBHI.js";import{$ as n,Aa as s,Da as a,E as c,Ea as i,G as d,J as u,N as h,S as p,W as m,_ as b,aa as g,ca as x,da as f,ia as k,ka as y,la as v,ma as w,na as I,s as C}from"./chunk-4SRNXNLW.js";function T(e,t){if(1&e&&(b(0,"p",11),k(1),n()),2&e){let e=f();d(),y(" ",e.error()," ")}}var L=class l{constructor(){this.auth=C(a),this.socket=C(i),this.router=C(s),this.tokenInput="",this.error=c(null),this.busy=c(!1)}connect(){let e=this.tokenInput.trim();if(!e)return void this.error.set("Pegá un token primero.");this.busy.set(!0),this.error.set(null),this.auth.setToken(e),this.socket.connect();let t=Date.now(),o=setInterval(()=>{let e=this.socket.state();return"open"===e?(clearInterval(o),this.busy.set(!1),void this.router.navigate(["/chat"])):"auth_error"===e?(clearInterval(o),this.busy.set(!1),this.error.set(this.socket.lastError()??"Token inválido."),void(this.tokenInput="")):void(Date.now()-t>5e3&&(clearInterval(o),this.busy.set(!1),this.error.set("Timeout esperando respuesta del servidor. ¿Está corriendo /webapp start?")))},150)}static{this.ɵfac=function(e){return new(e||l)}}static{this.ɵcmp=u({type:l,selectors:[["cx-login"]],decls:24,vars:4,consts:[[1,"flex","min-h-full","items-center","justify-center","px-6","py-12"],[1,"w-full","max-w-md","space-y-6","rounded-2xl","border","border-chrome-border","bg-chrome-panel","p-8","shadow-xl"],[1,"space-y-2","text-center","flex","flex-col","items-center"],[1,"mb-3","flex","h-16","w-16","items-center","justify-center","rounded-2xl","overflow-hidden","border","border-chrome-border/60","bg-chrome-panel/60","shadow-md"],["src","logo.png","alt","Context Code Logo",1,"h-full","w-full","object-cover"],[1,"text-2xl","font-bold","tracking-tight"],[1,"text-sm","text-chrome-muted"],[1,"rounded","bg-chrome-bg","px-1.5","py-0.5"],[1,"block","space-y-2"],[1,"text-sm","font-medium","text-chrome-muted"],["type","password","placeholder","ej: a1B2c3D4...","autocomplete","off","spellcheck","false",1,"w-full","rounded-lg","border","border-chrome-border","bg-chrome-bg","px-4","py-2.5","font-mono","text-sm","text-chrome-text","placeholder:text-chrome-muted","focus:border-chrome-accent","focus:outline-none","focus:ring-2","focus:ring-chrome-accent/30",3,"ngModelChange","keydown.enter","ngModel"],[1,"rounded-lg","border","border-red-500/40","bg-red-500/10","px-3","py-2","text-sm","text-red-300"],["type","button",1,"w-full","rounded-lg","bg-chrome-accent","px-4","py-2.5","text-sm","font-semibold","text-chrome-bg","transition","hover:brightness-110","disabled:cursor-not-allowed","disabled:opacity-40",3,"click","disabled"],[1,"text-xs","text-chrome-muted"],[1,"rounded","bg-chrome-bg","px-1","py-0.5"]],template:function(e,t){1&e&&(b(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),g(4,"img",4),n(),b(5,"h1",5),k(6,"Context Code"),n(),b(7,"p",6),k(8," Pegá el token que generaste en el CLI con "),b(9,"code",7),k(10,"/webapp token"),n(),k(11," para autorizar este dispositivo. "),n()(),b(12,"label",8)(13,"span",9),k(14,"Token"),n(),b(15,"input",10),I("ngModelChange",function(e){return w(t.tokenInput,e)||(t.tokenInput=e),e}),x("keydown.enter",function(){return t.connect()}),n()(),h(16,T,2,1,"p",11),b(17,"button",12),x("click",function(){return t.connect()}),k(18),n(),b(19,"p",13),k(20," La PWA se conecta a "),b(21,"code",14),k(22,"ws://localhost:9876/ws"),n(),k(23,". Si tu CLI corre en otra máquina de la LAN, cambialo desde el archivo de configuración (próximamente desde la UI). "),n()()()),2&e&&(d(15),v("ngModel",t.tokenInput),d(),m(t.error()?16:-1),d(),p("disabled",!t.tokenInput||t.busy()),d(),y(" ",t.busy()?"Conectando...":"Conectar"," "))},dependencies:[r,e,t,o],encapsulation:2,changeDetection:0})}};export{L as LoginComponent};
1
+ import{a as e,b as t,c as o,d as r}from"./chunk-OJZNEHPP.js";import{$ as n,Aa as s,Da as a,E as c,Ea as i,G as d,J as u,N as h,S as p,W as m,_ as b,aa as g,ca as x,da as f,ia as k,ka as y,la as v,ma as w,na as I,s as C}from"./chunk-VAB2VXFI.js";function T(e,t){if(1&e&&(b(0,"p",11),k(1),n()),2&e){let e=f();d(),y(" ",e.error()," ")}}var j=class l{constructor(){this.auth=C(a),this.socket=C(i),this.router=C(s),this.tokenInput="",this.error=c(null),this.busy=c(!1)}connect(){let e=this.tokenInput.trim();if(!e)return void this.error.set("Pegá un token primero.");this.busy.set(!0),this.error.set(null),this.auth.setToken(e),this.socket.connect();let t=Date.now(),o=setInterval(()=>{let e=this.socket.state();return"open"===e?(clearInterval(o),this.busy.set(!1),void this.router.navigate(["/chat"])):"auth_error"===e?(clearInterval(o),this.busy.set(!1),this.error.set(this.socket.lastError()??"Token inválido."),void(this.tokenInput="")):void(Date.now()-t>5e3&&(clearInterval(o),this.busy.set(!1),this.error.set("Timeout esperando respuesta del servidor. ¿Está corriendo /webapp start?")))},150)}static{this.ɵfac=function(e){return new(e||l)}}static{this.ɵcmp=u({type:l,selectors:[["cx-login"]],decls:24,vars:4,consts:[[1,"flex","min-h-full","items-center","justify-center","px-6","py-12"],[1,"w-full","max-w-md","space-y-6","rounded-2xl","border","border-chrome-border","bg-chrome-panel","p-8","shadow-xl"],[1,"space-y-2","text-center","flex","flex-col","items-center"],[1,"mb-3","flex","h-16","w-16","items-center","justify-center","rounded-2xl","overflow-hidden","border","border-chrome-border/60","bg-chrome-panel/60","shadow-md"],["src","logo.png","alt","Context Code Logo",1,"h-full","w-full","object-cover"],[1,"text-2xl","font-bold","tracking-tight"],[1,"text-sm","text-chrome-muted"],[1,"rounded","bg-chrome-bg","px-1.5","py-0.5"],[1,"block","space-y-2"],[1,"text-sm","font-medium","text-chrome-muted"],["type","password","placeholder","ej: a1B2c3D4...","autocomplete","off","spellcheck","false",1,"w-full","rounded-lg","border","border-chrome-border","bg-chrome-bg","px-4","py-2.5","font-mono","text-sm","text-chrome-text","placeholder:text-chrome-muted","focus:border-chrome-accent","focus:outline-none","focus:ring-2","focus:ring-chrome-accent/30",3,"ngModelChange","keydown.enter","ngModel"],[1,"rounded-lg","border","border-red-500/40","bg-red-500/10","px-3","py-2","text-sm","text-red-300"],["type","button",1,"w-full","rounded-lg","bg-chrome-accent","px-4","py-2.5","text-sm","font-semibold","text-chrome-bg","transition","hover:brightness-110","disabled:cursor-not-allowed","disabled:opacity-40",3,"click","disabled"],[1,"text-xs","text-chrome-muted"],[1,"rounded","bg-chrome-bg","px-1","py-0.5"]],template:function(e,t){1&e&&(b(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),g(4,"img",4),n(),b(5,"h1",5),k(6,"Context Code"),n(),b(7,"p",6),k(8," Pegá el token que generaste en el CLI con "),b(9,"code",7),k(10,"/webapp token"),n(),k(11," para autorizar este dispositivo. "),n()(),b(12,"label",8)(13,"span",9),k(14,"Token"),n(),b(15,"input",10),I("ngModelChange",function(e){return w(t.tokenInput,e)||(t.tokenInput=e),e}),x("keydown.enter",function(){return t.connect()}),n()(),h(16,T,2,1,"p",11),b(17,"button",12),x("click",function(){return t.connect()}),k(18),n(),b(19,"p",13),k(20," La PWA se conecta a "),b(21,"code",14),k(22,"ws://localhost:9876/ws"),n(),k(23,". Si tu CLI corre en otra máquina de la LAN, cambialo desde el archivo de configuración (próximamente desde la UI). "),n()()()),2&e&&(d(15),v("ngModel",t.tokenInput),d(),m(t.error()?16:-1),d(),p("disabled",!t.tokenInput||t.busy()),d(),y(" ",t.busy()?"Conectando...":"Conectar"," "))},dependencies:[r,e,t,o],encapsulation:2,changeDetection:0})}};export{j as LoginComponent};
@@ -1 +1 @@
1
- import{B as e,D as s,E as i,H as a,I as o,K as l,L as h,M as u,O as d,U as c,a as _,b as p,ca as g,d as y,e as m,f as v,g as f,n as V,oa as C,p as A,q as b,qa as w,ra as D,sa as S,ta as O,u as k,va as P,z as x}from"./chunk-4SRNXNLW.js";var T=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,s){this._renderer=e,this._elementRef=s}setProperty(e,s){this._renderer.setProperty(this._elementRef.nativeElement,e,s)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static ɵfac=function(e){return new(e||n)(o(a),o(s))};static ɵdir=h({type:n})}return n})(),M=(()=>{class n extends T{static ɵfac=(()=>{let e;return function(s){return(e||(e=x(n)))(s||n)}})();static ɵdir=h({type:n,features:[u]})}return n})(),R=new b(""),F={provide:R,useExisting:V(()=>N),multi:!0};var U=new b(""),N=(()=>{class n extends T{_compositionMode;_composing=!1;constructor(e,s,i){super(e,s),this._compositionMode=i,null==this._compositionMode&&(this._compositionMode=!function(){let e=P()?P().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}())}writeValue(e){let s=e??"";this.setProperty("value",s)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static ɵfac=function(e){return new(e||n)(o(a),o(s),o(U,8))};static ɵdir=h({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,s){1&e&&g("input",function(e){return s._handleInput(e.target.value)})("blur",function(){return s.onTouched()})("compositionstart",function(){return s._compositionStart()})("compositionend",function(e){return s._compositionEnd(e.target.value)})},standalone:!1,features:[C([F]),u]})}return n})(),j=new b(""),H=new b("");function ue(e){return null!=e}function de(e){return d(e)?m(e):e}function ce(e){let s={};return e.forEach(e=>{s=null!=e?_(_({},s),e):s}),0===Object.keys(s).length?null:s}function he(e,s){return s.map(s=>s(e))}function fe(e){return e.map(e=>function(e){return!e.validate}(e)?e:s=>e.validate(s))}function ge(e){return null!=e?function(e){if(!e)return null;let s=e.filter(ue);return 0==s.length?null:function(e){return ce(he(e,s))}}(fe(e)):null}function pe(e){return null!=e?function(e){if(!e)return null;let s=e.filter(ue);return 0==s.length?null:function(e){let i=he(e,s).map(de);return f(i).pipe(v(ce))}}(fe(e)):null}function Q(e,s){return null===e?[s]:Array.isArray(e)?[...e,s]:[e,s]}function G(e){return e?Array.isArray(e)?e:[e]:[]}function E(e,s){return Array.isArray(e)?e.includes(s):e===s}function ee(e,s){let i=G(s);return G(e).forEach(e=>{E(i,e)||i.push(e)}),i}function te(e,s){return G(s).filter(s=>!E(e,s))}var L=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=ge(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=pe(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control&&this.control.reset(e)}hasError(e,s){return!!this.control&&this.control.hasError(e,s)}getError(e,s){return this.control?this.control.getError(e,s):null}},B=class extends L{name;get formDirective(){return null}get path(){return null}},q=class extends L{_parent=null;name=null;valueAccessor=null},$=class{_cd;constructor(e){this._cd=e}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},K=(p(_({},{"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"}),{"[class.ng-submitted]":"isSubmitted"}),(()=>{class n extends ${constructor(e){super(e)}static ɵfac=function(e){return new(e||n)(o(q,2))};static ɵdir=h({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,s){2&e&&c("ng-untouched",s.isUntouched)("ng-touched",s.isTouched)("ng-pristine",s.isPristine)("ng-dirty",s.isDirty)("ng-valid",s.isValid)("ng-invalid",s.isInvalid)("ng-pending",s.isPending)},standalone:!1,features:[u]})}return n})()),W="VALID",X="INVALID",z="PENDING",J="DISABLED",Y=class{},Z=class extends Y{value;source;constructor(e,s){super(),this.value=e,this.source=s}},tt=class extends Y{pristine;source;constructor(e,s){super(),this.pristine=e,this.source=s}},et=class extends Y{touched;source;constructor(e,s){super(),this.touched=e,this.source=s}},st=class extends Y{status;source;constructor(e,s){super(),this.status=e,this.source=s}};function I(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}var nt=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,s){this._assignValidators(e),this._assignAsyncValidators(s)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return S(this.statusReactive)}set status(e){S(()=>this.statusReactive.set(e))}_status=O(()=>this.statusReactive());statusReactive=i(void 0);get valid(){return this.status===W}get invalid(){return this.status===X}get pending(){return this.status==z}get disabled(){return this.status===J}get enabled(){return this.status!==J}errors;get pristine(){return S(this.pristineReactive)}set pristine(e){S(()=>this.pristineReactive.set(e))}_pristine=O(()=>this.pristineReactive());pristineReactive=i(!0);get dirty(){return!this.pristine}get touched(){return S(this.touchedReactive)}set touched(e){S(()=>this.touchedReactive.set(e))}_touched=O(()=>this.touchedReactive());touchedReactive=i(!1);get untouched(){return!this.touched}_events=new y;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(ee(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(ee(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(te(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(te(e,this._rawAsyncValidators))}hasValidator(e){return E(this._rawValidators,e)}hasAsyncValidator(e){return E(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let s=!1===this.touched;this.touched=!0;let i=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsTouched(p(_({},e),{sourceControl:i})),s&&!1!==e.emitEvent&&this._events.next(new et(!0,i))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(s=>s.markAllAsTouched(e))}markAsUntouched(e={}){let s=!0===this.touched;this.touched=!1,this._pendingTouched=!1;let i=e.sourceControl??this;this._forEachChild(s=>{s.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:i})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,i),s&&!1!==e.emitEvent&&this._events.next(new et(!1,i))}markAsDirty(e={}){let s=!0===this.pristine;this.pristine=!1;let i=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsDirty(p(_({},e),{sourceControl:i})),s&&!1!==e.emitEvent&&this._events.next(new tt(!1,i))}markAsPristine(e={}){let s=!1===this.pristine;this.pristine=!0,this._pendingDirty=!1;let i=e.sourceControl??this;this._forEachChild(s=>{s.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e,i),s&&!1!==e.emitEvent&&this._events.next(new tt(!0,i))}markAsPending(e={}){this.status=z;let s=e.sourceControl??this;!1!==e.emitEvent&&(this._events.next(new st(this.status,s)),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.markAsPending(p(_({},e),{sourceControl:s}))}disable(e={}){let s=this._parentMarkedDirty(e.onlySelf);this.status=J,this.errors=null,this._forEachChild(s=>{s.disable(p(_({},e),{onlySelf:!0}))}),this._updateValue();let i=e.sourceControl??this;!1!==e.emitEvent&&(this._events.next(new Z(this.value,i)),this._events.next(new st(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(p(_({},e),{skipPristineCheck:s}),this),this._onDisabledChange.forEach(e=>e(!0))}enable(e={}){let s=this._parentMarkedDirty(e.onlySelf);this.status=W,this._forEachChild(s=>{s.enable(p(_({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(p(_({},e),{skipPristineCheck:s}),this),this._onDisabledChange.forEach(e=>e(!1))}_updateAncestors(e,s){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine({},s),this._parent._updateTouched({},s))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let s=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===W||this.status===z)&&this._runAsyncValidator(s,e.emitEvent)}let s=e.sourceControl??this;!1!==e.emitEvent&&(this._events.next(new Z(this.value,s)),this._events.next(new st(this.status,s)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(p(_({},e),{sourceControl:s}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(s=>s._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?J:W}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,s){if(this.asyncValidator){this.status=z,this._hasOwnPendingAsyncValidator={emitEvent:!1!==s};let i=de(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(i=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(i,{emitEvent:s,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,s={}){this.errors=e,this._updateControlsErrors(!1!==s.emitEvent,this,s.shouldHaveEmitted)}get(e){let s=e;return null==s||(Array.isArray(s)||(s=s.split(".")),0===s.length)?null:s.reduce((e,s)=>e&&e._find(s),this)}getError(e,s){let i=s?this.get(s):this;return i&&i.errors?i.errors[e]:null}hasError(e,s){return!!this.getError(e,s)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,s,i){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||i)&&this._events.next(new st(this.status,s)),this._parent&&this._parent._updateControlsErrors(e,s,i)}_initObservables(){this.valueChanges=new e,this.statusChanges=new e}_calculateStatus(){return this._allControlsDisabled()?J:this.errors?X:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(z)?z:this._anyControlsHaveStatus(X)?X:W}_anyControlsHaveStatus(e){return this._anyControls(s=>s.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,s){let i=!this._anyControlsDirty(),a=this.pristine!==i;this.pristine=i,this._parent&&!e.onlySelf&&this._parent._updatePristine(e,s),a&&this._events.next(new tt(this.pristine,s))}_updateTouched(e={},s){this.touched=this._anyControlsTouched(),this._events.next(new et(this.touched,s)),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,s)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){I(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){let s=this._parent&&this._parent.dirty;return!e&&!!s&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){var s;this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=(s=this._rawValidators,Array.isArray(s)?ge(s):s||null)}_assignAsyncValidators(e){var s;this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=(s=this._rawAsyncValidators,Array.isArray(s)?pe(s):s||null)}},it=new b("",{providedIn:"root",factory:()=>rt}),rt="always";function Re(e,s,i=rt){(function(e,s){let i=function(e){return e._rawValidators}(e);null!==s.validator?e.setValidators(Q(i,s.validator)):"function"==typeof i&&e.setValidators([i]);let a=function(e){return e._rawAsyncValidators}(e);null!==s.asyncValidator?e.setAsyncValidators(Q(a,s.asyncValidator)):"function"==typeof a&&e.setAsyncValidators([a]);let r=()=>e.updateValueAndValidity();ne(s._rawValidators,r),ne(s._rawAsyncValidators,r)})(e,s),s.valueAccessor.writeValue(e.value),(e.disabled||"always"===i)&&s.valueAccessor.setDisabledState?.(e.disabled),function(e,s){s.valueAccessor.registerOnChange(i=>{e._pendingValue=i,e._pendingChange=!0,e._pendingDirty=!0,"change"===e.updateOn&&_e(e,s)})}(e,s),function(e,s){let t=(e,i)=>{s.valueAccessor.writeValue(e),i&&s.viewToModelUpdate(e)};e.registerOnChange(t),s._registerOnDestroy(()=>{e._unregisterOnChange(t)})}(e,s),function(e,s){s.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,"blur"===e.updateOn&&e._pendingChange&&_e(e,s),"submit"!==e.updateOn&&e.markAsTouched()})}(e,s),function(e,s){if(s.valueAccessor.setDisabledState){let t=e=>{s.valueAccessor.setDisabledState(e)};e.registerOnDisabledChange(t),s._registerOnDestroy(()=>{e._unregisterOnDisabledChange(t)})}}(e,s)}function ne(e,s){e.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(s)})}function _e(e,s){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),s.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function $e(e,s){if(!s)return null;let i,a,o;return Array.isArray(s),s.forEach(e=>{e.constructor===N?i=e:function(e){return Object.getPrototypeOf(e.constructor)===M}(e)?a=e:o=e}),o||a||i||null}function ie(e,s){let i=e.indexOf(s);i>-1&&e.splice(i,1)}function re(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}var at=class extends nt{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,s,i){var a;super((I(a=s)?a.validators:a)||null,function(e,s){return(I(s)?s.asyncValidators:e)||null}(i,s)),this._applyFormState(e),this._setUpdateStrategy(s),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),I(s)&&(s.nonNullable||s.initialValueIsDefault)&&(re(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,s={}){this.value=this._pendingValue=e,this._onChange.length&&!1!==s.emitModelToViewChange&&this._onChange.forEach(e=>e(this.value,!1!==s.emitViewToModelChange)),this.updateValueAndValidity(s)}patchValue(e,s={}){this.setValue(e,s)}reset(e=this.defaultValue,s={}){this._applyFormState(e),this.markAsPristine(s),this.markAsUntouched(s),this.setValue(this.value,s),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){ie(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){ie(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange))&&(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0)}_applyFormState(e){re(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}},ot={provide:q,useExisting:V(()=>ht)},lt=Promise.resolve(),ht=(()=>{class n extends q{_changeDetectorRef;callSetDisabledState;control=new at;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new e;constructor(e,s,i,a,o,l){super(),this._changeDetectorRef=o,this.callSetDisabledState=l,this._parent=e,this._setValidators(s),this._setAsyncValidators(i),this.valueAccessor=$e(0,a)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let s=e.name.previousValue;this.formDirective.removeControl({name:s,path:this._getPath(s)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),function(e,s){if(!e.hasOwnProperty("model"))return!1;let i=e.model;return!!i.isFirstChange()||!Object.is(s,i.currentValue)}(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){Re(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){lt.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let s=e.isDisabled.currentValue,i=0!==s&&D(s);lt.then(()=>{i&&!this.control.disabled?this.control.disable():!i&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?function(e,s){return[...s.path,e]}(e,this._parent):[e]}static ɵfac=function(e){return new(e||n)(o(B,9),o(j,10),o(H,10),o(R,10),o(w,8),o(it,8))};static ɵdir=h({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[C([ot]),u,k]})}return n})(),ut=(()=>{class n{static ɵfac=function(e){return new(e||n)};static ɵmod=l({type:n});static ɵinj=A({})}return n})(),dt=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:it,useValue:e.callSetDisabledState??rt}]}}static ɵfac=function(e){return new(e||n)};static ɵmod=l({type:n});static ɵinj=A({imports:[ut]})}return n})();export{N as a,K as b,ht as c,dt as d};
1
+ import{B as e,D as s,E as i,H as a,I as o,K as l,L as h,M as u,O as d,U as c,a as _,b as p,ca as g,d as y,e as m,f as v,g as V,n as f,oa as C,p as A,q as b,qa as w,ra as D,sa as S,ta as O,u as k,va as P,z as x}from"./chunk-VAB2VXFI.js";var T=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,s){this._renderer=e,this._elementRef=s}setProperty(e,s){this._renderer.setProperty(this._elementRef.nativeElement,e,s)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static ɵfac=function(e){return new(e||n)(o(a),o(s))};static ɵdir=h({type:n})}return n})(),M=(()=>{class n extends T{static ɵfac=(()=>{let e;return function(s){return(e||(e=x(n)))(s||n)}})();static ɵdir=h({type:n,features:[u]})}return n})(),F=new b(""),R={provide:F,useExisting:f(()=>N),multi:!0};var U=new b(""),N=(()=>{class n extends T{_compositionMode;_composing=!1;constructor(e,s,i){super(e,s),this._compositionMode=i,null==this._compositionMode&&(this._compositionMode=!function(){let e=P()?P().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}())}writeValue(e){let s=e??"";this.setProperty("value",s)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static ɵfac=function(e){return new(e||n)(o(a),o(s),o(U,8))};static ɵdir=h({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,s){1&e&&g("input",function(e){return s._handleInput(e.target.value)})("blur",function(){return s.onTouched()})("compositionstart",function(){return s._compositionStart()})("compositionend",function(e){return s._compositionEnd(e.target.value)})},standalone:!1,features:[C([R]),u]})}return n})(),j=new b(""),H=new b("");function ue(e){return null!=e}function de(e){return d(e)?m(e):e}function ce(e){let s={};return e.forEach(e=>{s=null!=e?_(_({},s),e):s}),0===Object.keys(s).length?null:s}function he(e,s){return s.map(s=>s(e))}function fe(e){return e.map(e=>function(e){return!e.validate}(e)?e:s=>e.validate(s))}function ge(e){return null!=e?function(e){if(!e)return null;let s=e.filter(ue);return 0==s.length?null:function(e){return ce(he(e,s))}}(fe(e)):null}function pe(e){return null!=e?function(e){if(!e)return null;let s=e.filter(ue);return 0==s.length?null:function(e){let i=he(e,s).map(de);return V(i).pipe(v(ce))}}(fe(e)):null}function Q(e,s){return null===e?[s]:Array.isArray(e)?[...e,s]:[e,s]}function G(e){return e?Array.isArray(e)?e:[e]:[]}function E(e,s){return Array.isArray(e)?e.includes(s):e===s}function ee(e,s){let i=G(s);return G(e).forEach(e=>{E(i,e)||i.push(e)}),i}function te(e,s){return G(s).filter(s=>!E(e,s))}var B=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=ge(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=pe(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control&&this.control.reset(e)}hasError(e,s){return!!this.control&&this.control.hasError(e,s)}getError(e,s){return this.control?this.control.getError(e,s):null}},L=class extends B{name;get formDirective(){return null}get path(){return null}},q=class extends B{_parent=null;name=null;valueAccessor=null},$=class{_cd;constructor(e){this._cd=e}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},K=(p(_({},{"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"}),{"[class.ng-submitted]":"isSubmitted"}),(()=>{class n extends ${constructor(e){super(e)}static ɵfac=function(e){return new(e||n)(o(q,2))};static ɵdir=h({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,s){2&e&&c("ng-untouched",s.isUntouched)("ng-touched",s.isTouched)("ng-pristine",s.isPristine)("ng-dirty",s.isDirty)("ng-valid",s.isValid)("ng-invalid",s.isInvalid)("ng-pending",s.isPending)},standalone:!1,features:[u]})}return n})()),X="VALID",z="INVALID",J="PENDING",W="DISABLED",Y=class{},Z=class extends Y{value;source;constructor(e,s){super(),this.value=e,this.source=s}},tt=class extends Y{pristine;source;constructor(e,s){super(),this.pristine=e,this.source=s}},et=class extends Y{touched;source;constructor(e,s){super(),this.touched=e,this.source=s}},st=class extends Y{status;source;constructor(e,s){super(),this.status=e,this.source=s}};function I(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}var nt=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,s){this._assignValidators(e),this._assignAsyncValidators(s)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return S(this.statusReactive)}set status(e){S(()=>this.statusReactive.set(e))}_status=O(()=>this.statusReactive());statusReactive=i(void 0);get valid(){return this.status===X}get invalid(){return this.status===z}get pending(){return this.status==J}get disabled(){return this.status===W}get enabled(){return this.status!==W}errors;get pristine(){return S(this.pristineReactive)}set pristine(e){S(()=>this.pristineReactive.set(e))}_pristine=O(()=>this.pristineReactive());pristineReactive=i(!0);get dirty(){return!this.pristine}get touched(){return S(this.touchedReactive)}set touched(e){S(()=>this.touchedReactive.set(e))}_touched=O(()=>this.touchedReactive());touchedReactive=i(!1);get untouched(){return!this.touched}_events=new y;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(ee(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(ee(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(te(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(te(e,this._rawAsyncValidators))}hasValidator(e){return E(this._rawValidators,e)}hasAsyncValidator(e){return E(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let s=!1===this.touched;this.touched=!0;let i=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsTouched(p(_({},e),{sourceControl:i})),s&&!1!==e.emitEvent&&this._events.next(new et(!0,i))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(s=>s.markAllAsTouched(e))}markAsUntouched(e={}){let s=!0===this.touched;this.touched=!1,this._pendingTouched=!1;let i=e.sourceControl??this;this._forEachChild(s=>{s.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:i})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,i),s&&!1!==e.emitEvent&&this._events.next(new et(!1,i))}markAsDirty(e={}){let s=!0===this.pristine;this.pristine=!1;let i=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsDirty(p(_({},e),{sourceControl:i})),s&&!1!==e.emitEvent&&this._events.next(new tt(!1,i))}markAsPristine(e={}){let s=!1===this.pristine;this.pristine=!0,this._pendingDirty=!1;let i=e.sourceControl??this;this._forEachChild(s=>{s.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e,i),s&&!1!==e.emitEvent&&this._events.next(new tt(!0,i))}markAsPending(e={}){this.status=J;let s=e.sourceControl??this;!1!==e.emitEvent&&(this._events.next(new st(this.status,s)),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.markAsPending(p(_({},e),{sourceControl:s}))}disable(e={}){let s=this._parentMarkedDirty(e.onlySelf);this.status=W,this.errors=null,this._forEachChild(s=>{s.disable(p(_({},e),{onlySelf:!0}))}),this._updateValue();let i=e.sourceControl??this;!1!==e.emitEvent&&(this._events.next(new Z(this.value,i)),this._events.next(new st(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(p(_({},e),{skipPristineCheck:s}),this),this._onDisabledChange.forEach(e=>e(!0))}enable(e={}){let s=this._parentMarkedDirty(e.onlySelf);this.status=X,this._forEachChild(s=>{s.enable(p(_({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(p(_({},e),{skipPristineCheck:s}),this),this._onDisabledChange.forEach(e=>e(!1))}_updateAncestors(e,s){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine({},s),this._parent._updateTouched({},s))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let s=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===X||this.status===J)&&this._runAsyncValidator(s,e.emitEvent)}let s=e.sourceControl??this;!1!==e.emitEvent&&(this._events.next(new Z(this.value,s)),this._events.next(new st(this.status,s)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(p(_({},e),{sourceControl:s}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(s=>s._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?W:X}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,s){if(this.asyncValidator){this.status=J,this._hasOwnPendingAsyncValidator={emitEvent:!1!==s};let i=de(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(i=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(i,{emitEvent:s,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,s={}){this.errors=e,this._updateControlsErrors(!1!==s.emitEvent,this,s.shouldHaveEmitted)}get(e){let s=e;return null==s||(Array.isArray(s)||(s=s.split(".")),0===s.length)?null:s.reduce((e,s)=>e&&e._find(s),this)}getError(e,s){let i=s?this.get(s):this;return i&&i.errors?i.errors[e]:null}hasError(e,s){return!!this.getError(e,s)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,s,i){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||i)&&this._events.next(new st(this.status,s)),this._parent&&this._parent._updateControlsErrors(e,s,i)}_initObservables(){this.valueChanges=new e,this.statusChanges=new e}_calculateStatus(){return this._allControlsDisabled()?W:this.errors?z:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(J)?J:this._anyControlsHaveStatus(z)?z:X}_anyControlsHaveStatus(e){return this._anyControls(s=>s.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,s){let i=!this._anyControlsDirty(),a=this.pristine!==i;this.pristine=i,this._parent&&!e.onlySelf&&this._parent._updatePristine(e,s),a&&this._events.next(new tt(this.pristine,s))}_updateTouched(e={},s){this.touched=this._anyControlsTouched(),this._events.next(new et(this.touched,s)),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,s)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){I(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){let s=this._parent&&this._parent.dirty;return!e&&!!s&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){var s;this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=(s=this._rawValidators,Array.isArray(s)?ge(s):s||null)}_assignAsyncValidators(e){var s;this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=(s=this._rawAsyncValidators,Array.isArray(s)?pe(s):s||null)}},it=new b("",{providedIn:"root",factory:()=>rt}),rt="always";function Re(e,s,i=rt){(function(e,s){let i=function(e){return e._rawValidators}(e);null!==s.validator?e.setValidators(Q(i,s.validator)):"function"==typeof i&&e.setValidators([i]);let a=function(e){return e._rawAsyncValidators}(e);null!==s.asyncValidator?e.setAsyncValidators(Q(a,s.asyncValidator)):"function"==typeof a&&e.setAsyncValidators([a]);let r=()=>e.updateValueAndValidity();ne(s._rawValidators,r),ne(s._rawAsyncValidators,r)})(e,s),s.valueAccessor.writeValue(e.value),(e.disabled||"always"===i)&&s.valueAccessor.setDisabledState?.(e.disabled),function(e,s){s.valueAccessor.registerOnChange(i=>{e._pendingValue=i,e._pendingChange=!0,e._pendingDirty=!0,"change"===e.updateOn&&_e(e,s)})}(e,s),function(e,s){let t=(e,i)=>{s.valueAccessor.writeValue(e),i&&s.viewToModelUpdate(e)};e.registerOnChange(t),s._registerOnDestroy(()=>{e._unregisterOnChange(t)})}(e,s),function(e,s){s.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,"blur"===e.updateOn&&e._pendingChange&&_e(e,s),"submit"!==e.updateOn&&e.markAsTouched()})}(e,s),function(e,s){if(s.valueAccessor.setDisabledState){let t=e=>{s.valueAccessor.setDisabledState(e)};e.registerOnDisabledChange(t),s._registerOnDestroy(()=>{e._unregisterOnDisabledChange(t)})}}(e,s)}function ne(e,s){e.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(s)})}function _e(e,s){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),s.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function $e(e,s){if(!s)return null;let i,a,o;return Array.isArray(s),s.forEach(e=>{e.constructor===N?i=e:function(e){return Object.getPrototypeOf(e.constructor)===M}(e)?a=e:o=e}),o||a||i||null}function ie(e,s){let i=e.indexOf(s);i>-1&&e.splice(i,1)}function re(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}var at=class extends nt{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,s,i){var a;super((I(a=s)?a.validators:a)||null,function(e,s){return(I(s)?s.asyncValidators:e)||null}(i,s)),this._applyFormState(e),this._setUpdateStrategy(s),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),I(s)&&(s.nonNullable||s.initialValueIsDefault)&&(re(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,s={}){this.value=this._pendingValue=e,this._onChange.length&&!1!==s.emitModelToViewChange&&this._onChange.forEach(e=>e(this.value,!1!==s.emitViewToModelChange)),this.updateValueAndValidity(s)}patchValue(e,s={}){this.setValue(e,s)}reset(e=this.defaultValue,s={}){this._applyFormState(e),this.markAsPristine(s),this.markAsUntouched(s),this.setValue(this.value,s),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){ie(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){ie(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange))&&(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0)}_applyFormState(e){re(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}},ot={provide:q,useExisting:f(()=>ht)},lt=Promise.resolve(),ht=(()=>{class n extends q{_changeDetectorRef;callSetDisabledState;control=new at;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new e;constructor(e,s,i,a,o,l){super(),this._changeDetectorRef=o,this.callSetDisabledState=l,this._parent=e,this._setValidators(s),this._setAsyncValidators(i),this.valueAccessor=$e(0,a)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let s=e.name.previousValue;this.formDirective.removeControl({name:s,path:this._getPath(s)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),function(e,s){if(!e.hasOwnProperty("model"))return!1;let i=e.model;return!!i.isFirstChange()||!Object.is(s,i.currentValue)}(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){Re(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){lt.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let s=e.isDisabled.currentValue,i=0!==s&&D(s);lt.then(()=>{i&&!this.control.disabled?this.control.disable():!i&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?function(e,s){return[...s.path,e]}(e,this._parent):[e]}static ɵfac=function(e){return new(e||n)(o(L,9),o(j,10),o(H,10),o(F,10),o(w,8),o(it,8))};static ɵdir=h({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[C([ot]),u,k]})}return n})(),ut=(()=>{class n{static ɵfac=function(e){return new(e||n)};static ɵmod=l({type:n});static ɵinj=A({})}return n})(),dt=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:it,useValue:e.callSetDisabledState??rt}]}}static ɵfac=function(e){return new(e||n)};static ɵmod=l({type:n});static ɵinj=A({imports:[ut]})}return n})();export{N as a,K as b,ht as c,dt as d};