@johpaz/hive-agents 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/README.md +25 -11
  2. package/dist/hive.js +22245 -6788
  3. package/dist/tool-worker.js +6 -2
  4. package/dist/ui/assets/{A2UIPage-D4nUFe5q.js → A2UIPage-D4nzp5NV.js} +1 -1
  5. package/dist/ui/assets/{AgentCreateForm-g1mQnIoJ.js → AgentCreateForm-M2RhjeA1.js} +1 -1
  6. package/dist/ui/assets/{AgentDetailPage-C3XkU4Ll.js → AgentDetailPage-DkFRtj8g.js} +1 -1
  7. package/dist/ui/assets/AgentNewPage-CfBU7puz.js +1 -0
  8. package/dist/ui/assets/{AgentsPage-CNA778Eo.js → AgentsPage-Ctzq2LWx.js} +1 -1
  9. package/dist/ui/assets/{ApiClientPage-t5DpKhmA.js → ApiClientPage-DKbGO1QW.js} +1 -1
  10. package/dist/ui/assets/{ChannelsPage-yY6t0YTU.js → ChannelsPage-H6rgr8DQ.js} +2 -2
  11. package/dist/ui/assets/{DashboardPage-BSeNSYg5.js → DashboardPage-BIjYGf4m.js} +2 -2
  12. package/dist/ui/assets/{LoginPage-eT5zDRDa.js → LoginPage-DazoxtBJ.js} +1 -1
  13. package/dist/ui/assets/{LogsPage-Gczzzsdh.js → LogsPage-DMZ6KtQ3.js} +1 -1
  14. package/dist/ui/assets/{MeetingPage-Bu4aMMNR.js → MeetingPage-CSLFvHL7.js} +1 -1
  15. package/dist/ui/assets/{ModelSelector-nNOrW3te.js → ModelSelector-BCfvugHB.js} +1 -1
  16. package/dist/ui/assets/{Office3DPage-B_iXEbyv.js → Office3DPage-BE6Epe0d.js} +2 -2
  17. package/dist/ui/assets/ProvidersPage-D0cApfM1.js +1 -0
  18. package/dist/ui/assets/{RecoverPage-DMqSasKk.js → RecoverPage-BVUPHG9z.js} +1 -1
  19. package/dist/ui/assets/{SettingsPage-B6FTSkOn.js → SettingsPage-DCZ4nql4.js} +1 -1
  20. package/dist/ui/assets/{SetupPage-DhcRbGgg.js → SetupPage-In19p30M.js} +1 -1
  21. package/dist/ui/assets/{WebChatPage-CWXjW4Hn.js → WebChatPage-ByVBSzxL.js} +1 -1
  22. package/dist/ui/assets/{activity-CQuPevhB.js → activity-BIIli7ET.js} +1 -1
  23. package/dist/ui/assets/{agentCapabilities-CDC6y91E.js → agentCapabilities-D1PD9yFH.js} +1 -1
  24. package/dist/ui/assets/arrow-left-BfcnX8Er.js +1 -0
  25. package/dist/ui/assets/arrow-right-Q-dzAn8k.js +1 -0
  26. package/dist/ui/assets/arrow-up-right-Bf-8wrUQ.js +1 -0
  27. package/dist/ui/assets/{calendar-Be23hQGc.js → calendar-S9-_Q6QR.js} +1 -1
  28. package/dist/ui/assets/check-CryV78SQ.js +1 -0
  29. package/dist/ui/assets/chevron-down-QCtMs-Af.js +1 -0
  30. package/dist/ui/assets/chevron-left-dTGbyl5G.js +1 -0
  31. package/dist/ui/assets/chevron-right-D0GjXbnO.js +1 -0
  32. package/dist/ui/assets/chevron-up-Cg0jO8uT.js +1 -0
  33. package/dist/ui/assets/{circle-alert-BDVHxmAz.js → circle-alert-DTVW4R94.js} +1 -1
  34. package/dist/ui/assets/circle-check-BAolxswA.js +1 -0
  35. package/dist/ui/assets/{circle-x-Cb2Yer4s.js → circle-x-CJXbXzRh.js} +1 -1
  36. package/dist/ui/assets/{copy-33tZrzc9.js → copy-X_TPpA-A.js} +1 -1
  37. package/dist/ui/assets/{dialog-KOZKWbib.js → dialog-uUBz_NIB.js} +1 -1
  38. package/dist/ui/assets/{download-CiQqqXyz.js → download-C-fXu08w.js} +1 -1
  39. package/dist/ui/assets/{earth-DCvN7ynm.js → earth-CTsVjCmp.js} +1 -1
  40. package/dist/ui/assets/{ellipsis-vertical-BybFZDk2.js → ellipsis-vertical-5zBh5yzc.js} +1 -1
  41. package/dist/ui/assets/{external-link-0iNNBvZm.js → external-link-CvpRhwC_.js} +1 -1
  42. package/dist/ui/assets/{eye-C8sKSSkg.js → eye-CM-HQEWU.js} +1 -1
  43. package/dist/ui/assets/{file-text-DO8jqiJK.js → file-text-lwkvYGtA.js} +1 -1
  44. package/dist/ui/assets/gauge-CB-cas-h.js +1 -0
  45. package/dist/ui/assets/{history-BtTD1kDo.js → history-eSHspWRr.js} +1 -1
  46. package/dist/ui/assets/index-D489S18g.css +2 -0
  47. package/dist/ui/assets/{index-Bejlp-R1.js → index-ZjAc-KQS.js} +4 -4
  48. package/dist/ui/assets/{info-mpk1tsNC.js → info-DTgFQ_jA.js} +1 -1
  49. package/dist/ui/assets/{key-CoQ0qtXt.js → key-CeM9JJkq.js} +1 -1
  50. package/dist/ui/assets/loader-circle-Dtfz4FWw.js +1 -0
  51. package/dist/ui/assets/{lock-open-Cd2aqwOd.js → lock-open-B089GUAJ.js} +1 -1
  52. package/dist/ui/assets/{mail-BG0RYSkL.js → mail--gNFIe4M.js} +1 -1
  53. package/dist/ui/assets/{pause-Cme88_9s.js → pause-DjT1nwQM.js} +1 -1
  54. package/dist/ui/assets/{pencil-f1nJ1xhs.js → pencil-6PRgdjiU.js} +1 -1
  55. package/dist/ui/assets/play-tOrP0xUJ.js +1 -0
  56. package/dist/ui/assets/plus-Cnom3j47.js +1 -0
  57. package/dist/ui/assets/{radio-B5SpKJ-J.js → radio-D-joO9J0.js} +1 -1
  58. package/dist/ui/assets/{refresh-cw-CroGQY62.js → refresh-cw-BRrzoHQW.js} +1 -1
  59. package/dist/ui/assets/search-D277MUP0.js +1 -0
  60. package/dist/ui/assets/{select-BhbW0stK.js → select-BOR8MsSL.js} +1 -1
  61. package/dist/ui/assets/{send-D6whYpw-.js → send-DIlj81PT.js} +1 -1
  62. package/dist/ui/assets/{settings-BX6q3MGB.js → settings-CkBjgAEm.js} +1 -1
  63. package/dist/ui/assets/{shield-BnGyu1xf.js → shield-U0hIjGzm.js} +1 -1
  64. package/dist/ui/assets/{sparkles-BcaOs_Jk.js → sparkles-VXHGDbNh.js} +1 -1
  65. package/dist/ui/assets/{square-ju5H8nrT.js → square-OHeetvN3.js} +1 -1
  66. package/dist/ui/assets/terminal-C6YPcJl_.js +1 -0
  67. package/dist/ui/assets/{trash-2-DjQXac_0.js → trash-2-DQxm7DUM.js} +1 -1
  68. package/dist/ui/assets/{triangle-alert-B04mgMcg.js → triangle-alert-Dj8ZhmWj.js} +1 -1
  69. package/dist/ui/assets/{useHiveAgentsModelLoad-DT5-4CCj.js → useHiveAgentsModelLoad-COLvs-Ho.js} +1 -1
  70. package/dist/ui/assets/{useProviders-DSX7eVsz.js → useProviders-q6iROeWE.js} +1 -1
  71. package/dist/ui/assets/{volume-x-qnVxkRSM.js → volume-x-Bm735CXN.js} +1 -1
  72. package/dist/ui/assets/{wifi-BA1m2dGO.js → wifi-DklBfOZ6.js} +1 -1
  73. package/dist/ui/assets/{zap-DT7cM7YS.js → zap-BEZNJ0i0.js} +1 -1
  74. package/dist/ui/index.html +8 -6
  75. package/dist/ui/logoblack.png +0 -0
  76. package/dist/ui/logocolor-dark.png +0 -0
  77. package/dist/ui/logocolorbg.png +0 -0
  78. package/dist/ui/logodoradobg.png +0 -0
  79. package/package.json +12 -8
  80. package/packages/cli/src/commands/doctor.ts +111 -0
  81. package/packages/cli/src/commands/onboard.ts +126 -59
  82. package/packages/cli/src/ui-bundle.generated.ts +9 -92
  83. package/packages/core/src/agent/acceptance-checks.ts +172 -0
  84. package/packages/core/src/agent/agent-catalog.ts +1 -37
  85. package/packages/core/src/agent/agent-loop.ts +21 -2
  86. package/packages/core/src/agent/catalog-selector.ts +0 -1
  87. package/packages/core/src/agent/compaction.ts +16 -1
  88. package/packages/core/src/agent/context-compiler.ts +3 -1
  89. package/packages/core/src/agent/conversation-store.ts +1 -1
  90. package/packages/core/src/agent/delegation-runtime.ts +1 -8
  91. package/packages/core/src/agent/goal-runner.ts +111 -32
  92. package/packages/core/src/agent/index.ts +1 -1
  93. package/packages/core/src/agent/llm-client.ts +34 -2
  94. package/packages/core/src/agent/llm-providers/anthropic.ts +10 -7
  95. package/packages/core/src/agent/llm-providers/interface.ts +13 -2
  96. package/packages/core/src/agent/llm-providers/modelscope.ts +5 -0
  97. package/packages/core/src/agent/llm-providers/z-ai.ts +5 -0
  98. package/packages/core/src/agent/minimal-loadout.ts +1 -0
  99. package/packages/core/src/agent/proof-packet.ts +2 -11
  100. package/packages/core/src/agent/providers/index.ts +1 -1
  101. package/packages/core/src/agent/tool-selector.ts +25 -1
  102. package/packages/core/src/canvas/emitter.ts +0 -44
  103. package/packages/core/src/channels/manager.ts +117 -25
  104. package/packages/core/src/channels/whatsapp.ts +6 -1
  105. package/packages/core/src/config/loader.ts +13 -1
  106. package/packages/core/src/events/channel-narration.ts +150 -0
  107. package/packages/core/src/events/tool-narration.ts +62 -0
  108. package/packages/core/src/gateway/channel-notify.ts +11 -7
  109. package/packages/core/src/gateway/delegation-groups.ts +24 -11
  110. package/packages/core/src/gateway/helpers/narration.ts +4 -62
  111. package/packages/core/src/gateway/helpers/ui-source.ts +67 -0
  112. package/packages/core/src/gateway/job-executors.ts +29 -67
  113. package/packages/core/src/gateway/resolver.ts +10 -2
  114. package/packages/core/src/gateway/routes/agents.ts +6 -6
  115. package/packages/core/src/gateway/routes/channels.ts +15 -1
  116. package/packages/core/src/gateway/routes/models.ts +69 -12
  117. package/packages/core/src/gateway/routes/providers.ts +110 -28
  118. package/packages/core/src/gateway/routes/setup.ts +63 -11
  119. package/packages/core/src/gateway/routes/system.ts +8 -5
  120. package/packages/core/src/gateway/routes/voice.ts +3 -0
  121. package/packages/core/src/gateway/server.ts +58 -28
  122. package/packages/core/src/gateway/webchat-turn.ts +29 -5
  123. package/packages/core/src/index.ts +1 -1
  124. package/packages/core/src/storage/bootstrap.ts +13 -9
  125. package/packages/core/src/storage/collections.ts +12 -46
  126. package/packages/core/src/storage/crypto.ts +147 -58
  127. package/packages/core/src/storage/hivedb.ts +9 -0
  128. package/packages/core/src/storage/model-id.ts +53 -0
  129. package/packages/core/src/storage/onboarding.ts +15 -4
  130. package/packages/core/src/storage/seed.ts +254 -138
  131. package/packages/core/src/storage/usage.ts +61 -123
  132. package/packages/core/src/tools/agents/index.ts +199 -27
  133. package/packages/core/src/tools/index.ts +2 -1
  134. package/packages/core/src/tools/web/browser-backend.ts +129 -0
  135. package/packages/core/src/tools/web/browser-service.ts +75 -35
  136. package/packages/core/src/tools/web/webview-backend.ts +412 -0
  137. package/packages/core/src/voice/index.ts +108 -17
  138. package/packages/skills/src/bundled/agents/task_orchestrator/SKILL.md +2 -1
  139. package/packages/skills/src/bundled-data.generated.ts +2 -23
  140. package/dist/ui/assets/AgentNewPage-CEkLeA79.js +0 -1
  141. package/dist/ui/assets/ProvidersPage-BupHs5yO.js +0 -1
  142. package/dist/ui/assets/arrow-left-0EBE7nsF.js +0 -1
  143. package/dist/ui/assets/arrow-right-5QIaph-z.js +0 -1
  144. package/dist/ui/assets/arrow-up-right-DQQCY007.js +0 -1
  145. package/dist/ui/assets/check-Dp6tzwax.js +0 -1
  146. package/dist/ui/assets/chevron-down-33N886NY.js +0 -1
  147. package/dist/ui/assets/chevron-left-C6itJXh3.js +0 -1
  148. package/dist/ui/assets/chevron-right-CFodBS-b.js +0 -1
  149. package/dist/ui/assets/chevron-up-BvSmyBEs.js +0 -1
  150. package/dist/ui/assets/circle-check-BJWNbLuF.js +0 -1
  151. package/dist/ui/assets/gauge-BRGwuN8G.js +0 -1
  152. package/dist/ui/assets/index-XoTT41Hr.css +0 -2
  153. package/dist/ui/assets/loader-circle-BhqRN2nO.js +0 -1
  154. package/dist/ui/assets/play-CfYDHD6h.js +0 -1
  155. package/dist/ui/assets/plus-C5BxJeOX.js +0 -1
  156. package/dist/ui/assets/search-rfBcmohK.js +0 -1
  157. package/dist/ui/assets/terminal-Bjfu-TkS.js +0 -1
  158. package/packages/core/src/agent/acceptance-verifier.ts +0 -300
  159. package/packages/skills/src/bundled/agents/acceptance_verification/SKILL.md +0 -26
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-S-ySWqyJ.js";import{f as t}from"./vendor-charts-K3xcRl0X.js";import{a as n,i as r,n as i,o as a,r as o,s,t as c}from"./vendor-radix-D0s_k6Gp.js";import{o as l}from"./vendor-query-Dj8xYhQD.js";import{t as u}from"./check-Dp6tzwax.js";import{t as d}from"./chevron-down-33N886NY.js";import{t as f}from"./circle-check-BJWNbLuF.js";import{t as p}from"./circle-x-Cb2Yer4s.js";import{t as m}from"./loader-circle-BhqRN2nO.js";import{t as h}from"./sparkles-BcaOs_Jk.js";import{t as g}from"./utils-Dyb7SC2_.js";import{c as ee}from"./vendor-router-zpB-76nT.js";import{t as _}from"./gateway-url-BlnabM5e.js";import{O as v,V as y,f as te,g as ne,k as b}from"./index-Bejlp-R1.js";import{t as x}from"./badge-DKGZbVZJ.js";import{t as S}from"./label-k0jYxoWW.js";import{i as C,n as w,o as T,s as E,t as D}from"./select-BhbW0stK.js";import{t as re}from"./switch-DXcELPsM.js";import{a as O,i as k,n as A,r as j,t as M}from"./card-D3Nw3kh3.js";import{t as ie}from"./useHiveAgentsModelLoad-DT5-4CCj.js";import{n as N,t as ae}from"./alert-CQlRq6sv.js";import{t as oe}from"./progress-DrI2UDu-.js";var P=e(t(),1),F=l(),se=a,I=P.forwardRef(({className:e,...t},r)=>(0,F.jsx)(n,{ref:r,className:g(`border-b`,e),...t}));I.displayName=`AccordionItem`;var ce=P.forwardRef(({className:e,children:t,...n},i)=>(0,F.jsx)(r,{className:`flex`,children:(0,F.jsxs)(s,{ref:i,className:g(`flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180`,e),...n,children:[t,(0,F.jsx)(d,{className:`h-4 w-4 shrink-0 transition-transform duration-200`})]})}));ce.displayName=s.displayName;var le=P.forwardRef(({className:e,children:t,...n},r)=>(0,F.jsx)(o,{ref:r,className:`overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down`,...n,children:(0,F.jsx)(`div`,{className:g(`pb-4 pt-0`,e),children:t})}));le.displayName=o.displayName;var L=P.forwardRef(({className:e,...t},n)=>(0,F.jsx)(c,{ref:n,className:g(`peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:(0,F.jsx)(i,{className:g(`flex items-center justify-center text-current`),children:(0,F.jsx)(u,{className:`h-4 w-4`})})}));L.displayName=c.displayName;var ue={gemini:`🔵`,anthropic:`🟠`,openai:`🟢`,groq:`🔴`,ollama:`🟣`,openrouter:`🟡`,deepseek:`🔷`,mistral:`🔸`,kimi:`🌙`},R={gemini:`https://aistudio.google.com/app/apikey`,anthropic:`https://console.anthropic.com/keys`,openai:`https://platform.openai.com/api-keys`,groq:`https://console.groq.com/keys`,openrouter:`https://openrouter.ai/keys`,deepseek:`https://platform.deepseek.com/api_keys`,mistral:`https://console.mistral.ai/api-keys`,kimi:`https://platform.moonshot.cn/console/api-keys`},z=[{id:`webchat`,name:`WebChat`,description:`Chat web integrado`,icon:`💬`,required:!0},{id:`telegram`,name:`Telegram`,description:`Bot de Telegram`,icon:`✈️`,required:!1},{id:`discord`,name:`Discord`,description:`Bot de Discord`,icon:`🎮`,required:!1},{id:`whatsapp`,name:`WhatsApp`,description:`Bot de WhatsApp`,icon:`📱`,required:!1},{id:`slack`,name:`Slack`,description:`Bot de Slack`,icon:`💼`,required:!1}],B=`hive_setup_wizard_data`,V=6;function de(){try{let e=sessionStorage.getItem(B);if(e){let t=JSON.parse(e);return{...U(),...t}}}catch(e){console.error(`Failed to load wizard data:`,e)}return null}function fe(e){try{sessionStorage.setItem(B,JSON.stringify(e))}catch(e){console.error(`Failed to save wizard data:`,e)}}function H(){try{sessionStorage.removeItem(B)}catch(e){console.error(`Failed to clear wizard data:`,e)}}function U(){return{userName:``,userEmail:``,userLanguage:`es`,userTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone||`UTC`,userOccupation:``,userNotes:``,agentName:`Bee`,agentDescription:``,agentTone:`friendly`,provider:``,apiKey:``,model:``,apiKeyVerified:!1,channels:{webchat:{enabled:!0},telegram:{enabled:!1},discord:{enabled:!1},whatsapp:{enabled:!1},slack:{enabled:!1}},ethicsRules:{},customRules:[]}}function W(){let e=ee(),[t,n]=(0,P.useState)(1),[r,i]=(0,P.useState)(()=>de()||U()),[a,o]=(0,P.useState)(!1),[s,c]=(0,P.useState)(!1),{showLoader:l,hideLoader:u}=ne(),[d,B]=(0,P.useState)(`idle`),[W,G]=(0,P.useState)(null),[K,pe]=(0,P.useState)([]),[q,J]=(0,P.useState)(null),[Y,X]=(0,P.useState)(!1),[me,he]=(0,P.useState)(!1),[ge,Z]=(0,P.useState)(null),{load:_e}=ie(),[Q,ve]=(0,P.useState)([]);(0,P.useEffect)(()=>{fetch(`${_()}/api/setup/providers`).then(e=>e.json()).then(e=>{Array.isArray(e)&&pe(e)}).catch(()=>{}),fetch(`${_()}/api/setup/ethics`).then(e=>e.json()).then(e=>{Array.isArray(e)&&(ve(e),i(t=>Object.keys(t.ethicsRules).length===0?{...t,ethicsRules:Object.fromEntries(e.map(e=>[e.id,!0]))}:t))}).catch(()=>{})},[]),(0,P.useEffect)(()=>{fe(r)},[r]),(0,P.useEffect)(()=>{fetch(`${_()}/api/setup/status`).then(e=>e.json()).then(t=>{t.configured&&e(`/ui`)}).catch(()=>{})},[e]);let $=e=>{G(null),i(t=>({...t,...e}))},ye=()=>{switch(t){case 1:return r.userName.trim()?r.userName.trim().length<2?`El nombre debe tener al menos 2 caracteres.`:r.userEmail.trim()?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r.userEmail.trim())?null:`Ingresa un correo válido.`:`El correo es obligatorio.`:`El nombre es obligatorio.`;case 2:return r.agentName.trim()?r.agentName.trim().length<2?`El nombre debe tener al menos 2 caracteres.`:null:`El nombre del agente es obligatorio.`;case 3:return r.provider?r.provider!==`ollama`&&!r.apiKey?`Ingresa tu API key.`:r.provider!==`ollama`&&!r.apiKeyVerified?`Verifica tu API key antes de continuar.`:r.model?null:`Selecciona un modelo.`:`Selecciona un proveedor LLM.`;default:return null}},be=()=>{let e=ye();if(e){G(e);return}G(null),t<V&&n(e=>e+1)},xe=()=>{t>1&&n(e=>e-1)},Se=()=>{confirm(`¿Estás seguro de que quieres reiniciar la configuración? Se perderá todo el progreso.`)&&(H(),i(U()),n(1))},Ce=async()=>{if(!(!r.apiKey||!r.provider)){B(`verifying`);try{(await te(`/api/setup/verify-provider`,{method:`POST`,body:{provider:r.provider,apiKey:r.apiKey},showLoader:`Verificando conexión...`,showError:!1})).success?(B(`success`),$({apiKeyVerified:!0})):(B(`error`),$({apiKeyVerified:!1}))}catch{B(`error`),$({apiKeyVerified:!1})}}},we=async()=>{o(!0);try{let t=await te(`/api/setup/complete`,{method:`POST`,body:r,showLoader:`Finalizando configuración...`,showError:!0});if(t.success){let n=t.authToken;n&&localStorage.setItem(`hive-auth-token`,n),c(!0),H(),(async()=>{await new Promise(e=>setTimeout(e,1500)),l(`Iniciando a ${r.agentName}... esto toma unos segundos`);for(let t=0;t<40;t++){try{let t=await fetch(`${_()}/api/setup/status`);if(t.ok){let{configured:r}=await t.json();if(r){u(),e(n?`/?token=${n}`:`/`);return}}}catch{}await new Promise(e=>setTimeout(e,1e3))}u(),e(n?`/?token=${n}`:`/`)})()}}catch{}finally{o(!1)}},Te=()=>{switch(t){case 1:return Ee();case 2:return De();case 3:return Oe();case 4:return ke();case 5:return Ae();case 6:return je();default:return null}},Ee=()=>(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsxs)(`div`,{className:`text-center space-y-4`,children:[(0,F.jsx)(`div`,{className:`flex justify-center`,children:(0,F.jsxs)(`div`,{className:`relative`,children:[(0,F.jsx)(y,{className:`w-24 h-24 text-amber-500`,fill:`currentColor`}),(0,F.jsx)(h,{className:`w-8 h-8 text-amber-300 absolute -top-2 -right-2`})]})}),(0,F.jsx)(`h1`,{className:`text-3xl font-bold`,children:`Bienvenido a Hive`}),(0,F.jsx)(`p`,{className:`text-muted-foreground max-w-md mx-auto`,children:`Hive es tu colmena de agentes IA. Local-first. Multi-canal. Open source. En los próximos minutos configurarás tu agente personal Bee.`})]}),(0,F.jsxs)(M,{children:[(0,F.jsxs)(k,{children:[(0,F.jsx)(O,{children:`Tu información`}),(0,F.jsx)(j,{children:`Comencemos con tus datos básicos`})]}),(0,F.jsxs)(A,{className:`space-y-4`,children:[(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`userName`,children:`Tu nombre`}),(0,F.jsx)(v,{id:`userName`,placeholder:`¿Cómo te llamas?`,value:r.userName,onChange:e=>$({userName:e.target.value})})]}),(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`userEmail`,children:`Tu correo`}),(0,F.jsx)(v,{id:`userEmail`,type:`email`,autoComplete:`email`,placeholder:`tu@correo.com`,maxLength:254,required:!0,value:r.userEmail,onChange:e=>$({userEmail:e.target.value})}),(0,F.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Hive lo usará cuando digas «envíame». También será tu usuario de acceso si después activas una contraseña.`})]}),(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`userLanguage`,children:`Idioma preferido`}),(0,F.jsxs)(D,{value:r.userLanguage,onValueChange:e=>$({userLanguage:e}),children:[(0,F.jsx)(T,{children:(0,F.jsx)(E,{})}),(0,F.jsxs)(w,{children:[(0,F.jsx)(C,{value:`es`,children:`Español`}),(0,F.jsx)(C,{value:`en`,children:`English`}),(0,F.jsx)(C,{value:`pt`,children:`Português`}),(0,F.jsx)(C,{value:`fr`,children:`Français`})]})]})]}),(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`userTimezone`,children:`Zona horaria`}),(0,F.jsx)(v,{id:`userTimezone`,value:r.userTimezone,onChange:e=>$({userTimezone:e.target.value}),placeholder:`America/Bogota`}),(0,F.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Detectada automáticamente: `,Intl.DateTimeFormat().resolvedOptions().timeZone]})]}),(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsxs)(S,{htmlFor:`userOccupation`,children:[`Ocupación `,(0,F.jsx)(`span`,{className:`text-muted-foreground font-normal`,children:`(opcional)`})]}),(0,F.jsx)(v,{id:`userOccupation`,value:r.userOccupation,onChange:e=>$({userOccupation:e.target.value}),placeholder:`Ej: Desarrollador de software, diseñador, estudiante...`})]}),(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsxs)(S,{htmlFor:`userNotes`,children:[`Preferencias de comunicación `,(0,F.jsx)(`span`,{className:`text-muted-foreground font-normal`,children:`(opcional)`})]}),(0,F.jsx)(`textarea`,{id:`userNotes`,className:`w-full min-h-[80px] p-3 border rounded-md bg-background resize-none text-sm`,value:r.userNotes,onChange:e=>$({userNotes:e.target.value}),placeholder:`Ej: Prefiero respuestas cortas y directas. Usa ejemplos de código cuando expliques conceptos técnicos...`})]})]})]})]}),De=()=>(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,F.jsx)(`h2`,{className:`text-2xl font-bold`,children:`Tu agente`}),(0,F.jsx)(`p`,{className:`text-muted-foreground`,children:`Personaliza a Bee, tu agente personal`})]}),(0,F.jsxs)(M,{children:[(0,F.jsx)(k,{children:(0,F.jsx)(O,{children:`Identidad del agente`})}),(0,F.jsxs)(A,{className:`space-y-4`,children:[(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`agentName`,children:`Nombre del agente`}),(0,F.jsx)(v,{id:`agentName`,value:r.agentName,onChange:e=>$({agentName:e.target.value}),placeholder:`Bee`})]}),(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`agentDescription`,children:`Descripción / Personalidad`}),(0,F.jsx)(`textarea`,{id:`agentDescription`,className:`w-full min-h-[100px] p-3 border rounded-md bg-background resize-none`,value:r.agentDescription,onChange:e=>$({agentDescription:e.target.value}),placeholder:`Ej: Eres un asistente útil y amable. Respondes de forma concisa pero completa. Te especializas en ayudar con tareas de programación y productividad...`})]}),(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`agentTone`,children:`Tono de comunicación`}),(0,F.jsxs)(D,{value:r.agentTone,onValueChange:e=>$({agentTone:e}),children:[(0,F.jsx)(T,{children:(0,F.jsx)(E,{placeholder:`Selecciona un tono`})}),(0,F.jsxs)(w,{children:[(0,F.jsx)(C,{value:`friendly`,children:`Amigable y cercano`}),(0,F.jsx)(C,{value:`professional`,children:`Profesional y formal`}),(0,F.jsx)(C,{value:`direct`,children:`Directo y conciso`}),(0,F.jsx)(C,{value:`casual`,children:`Casual y relajado`})]})]}),(0,F.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Define cómo se comunicará tu agente contigo`})]})]})]})]}),Oe=()=>(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,F.jsx)(`h2`,{className:`text-2xl font-bold`,children:`Proveedor LLM`}),(0,F.jsx)(`p`,{className:`text-muted-foreground`,children:`Selecciona el cerebro de tu agente`})]}),(0,F.jsx)(`div`,{className:`grid gap-3`,children:K.map(e=>(0,F.jsx)(M,{className:g(`cursor-pointer transition-all hover:shadow-md`,r.provider===e.id&&`border-amber-500 ring-2 ring-amber-500`),onClick:()=>{$({provider:e.id,model:``,apiKeyVerified:!1}),e.id===`ollama`&&J(null)},children:(0,F.jsxs)(A,{className:`flex items-center gap-4 p-4`,children:[(0,F.jsx)(`span`,{className:`text-3xl`,children:ue[e.id]??`🤖`}),(0,F.jsxs)(`div`,{className:`flex-1`,children:[(0,F.jsx)(`h3`,{className:`font-semibold`,children:e.name}),(0,F.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[e.models.length,` modelo`,e.models.length===1?``:`s`,` disponible`,e.models.length===1?``:`s`]})]}),r.provider===e.id&&(0,F.jsx)(f,{className:`w-5 h-5 text-amber-500`})]})},e.id))}),r.provider&&(()=>{let e=K.find(e=>e.id===r.provider);return(0,F.jsxs)(M,{className:`mt-4`,children:[(0,F.jsx)(k,{children:(0,F.jsxs)(O,{children:[`Configuración de `,e?.name]})}),(0,F.jsxs)(A,{className:`space-y-4`,children:[r.provider!==`ollama`&&(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`apiKey`,children:`API Key`}),(0,F.jsxs)(`div`,{className:`flex gap-2`,children:[(0,F.jsx)(v,{id:`apiKey`,type:`password`,value:r.apiKey,onChange:e=>$({apiKey:e.target.value,apiKeyVerified:!1}),placeholder:`sk-...`,className:g(W?.includes(`API key`)&&!r.apiKey&&`border-red-500`)}),(0,F.jsx)(b,{variant:`outline`,onClick:Ce,disabled:!r.apiKey||d===`verifying`,children:d===`verifying`?(0,F.jsx)(m,{className:`w-4 h-4 animate-spin`}):d===`success`?(0,F.jsx)(f,{className:`w-4 h-4 text-green-500`}):d===`error`?(0,F.jsx)(p,{className:`w-4 h-4 text-red-500`}):`Verificar`})]}),d===`success`&&(0,F.jsxs)(`p`,{className:`text-sm text-green-600 flex items-center gap-1`,children:[(0,F.jsx)(f,{className:`w-4 h-4`}),` API key verificada correctamente`]}),d===`error`&&(0,F.jsxs)(`p`,{className:`text-sm text-red-600 flex items-center gap-1`,children:[(0,F.jsx)(p,{className:`w-4 h-4`}),` API key inválida o error de conexión`]}),R[r.provider]&&(0,F.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`¿No tienes tu API key?`,` `,(0,F.jsx)(`a`,{href:R[r.provider],target:`_blank`,rel:`noopener noreferrer`,className:`text-amber-500 hover:underline`,children:`Obtener aquí`})]})]}),r.provider===`ollama`&&(0,F.jsxs)(`div`,{className:`space-y-3`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(b,{type:`button`,variant:`outline`,size:`sm`,disabled:Y,onClick:()=>{J(null),X(!0),$({model:``}),fetch(`${_()}/api/setup/ollama-models`).then(e=>e.json()).then(e=>{J(e.models??[]),X(!1)}).catch(()=>{J([]),X(!1)})},children:Y?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(m,{className:`w-3 h-3 animate-spin mr-1`}),`Detectando...`]}):`🔍 Detectar modelos`}),!Y&&q!==null&&(0,F.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:q.length>0?`${q.length} modelo${q.length===1?``:`s`} encontrado${q.length===1?``:`s`}`:`Sin modelos — instala uno con ollama pull`})]}),q&&q.length>0&&(0,F.jsxs)(`div`,{className:`space-y-1`,children:[(0,F.jsx)(S,{htmlFor:`model`,children:`Modelo`}),(0,F.jsxs)(D,{value:r.model,onValueChange:e=>$({model:e}),children:[(0,F.jsx)(T,{className:g(!r.model&&W?.includes(`modelo`)&&`border-red-500`),children:(0,F.jsx)(E,{placeholder:`Selecciona un modelo`})}),(0,F.jsx)(w,{children:q.map((e,t)=>(0,F.jsxs)(C,{value:e.id,children:[e.name,t===0?` (Recomendado)`:``]},e.id))})]})]}),!Y&&q!==null&&q.length===0&&(0,F.jsxs)(`p`,{className:`text-xs text-amber-600`,children:[`Asegúrate que Ollama esté corriendo (`,(0,F.jsx)(`code`,{children:`ollama serve`}),`) y tengas modelos (`,(0,F.jsx)(`code`,{children:`ollama pull llama3.2`}),`).`]})]}),r.provider!==`ollama`&&r.apiKeyVerified&&(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`model`,children:`Modelo`}),(0,F.jsxs)(D,{value:r.model,disabled:me,onValueChange:async t=>{if(Z(null),r.provider===`hiveagents`){let n=e?.models.find(e=>e.id===t)?.context_window;if(!n){Z(`No se pudo determinar el context_window del modelo.`);return}he(!0);let r=await _e(t,n);if(he(!1),!r){Z(`No se pudo confirmar la carga del modelo. Intentá de nuevo.`);return}}$({model:t})},children:[(0,F.jsx)(T,{className:g(!r.model&&W?.includes(`modelo`)&&`border-red-500`),children:(0,F.jsx)(E,{placeholder:`Selecciona un modelo`})}),(0,F.jsx)(w,{children:(e?.models??[]).map((e,t)=>(0,F.jsxs)(C,{value:e.id,children:[e.name||e.id,t===0?` (Recomendado)`:``]},e.id))})]}),me&&(0,F.jsxs)(`p`,{className:`text-xs text-muted-foreground flex items-center gap-1`,children:[(0,F.jsx)(m,{className:`w-3 h-3 animate-spin`}),` Cargando modelo en HiveAgents…`]}),ge&&(0,F.jsx)(`p`,{className:`text-xs text-red-600`,children:ge})]})]})]})})()]}),ke=()=>(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,F.jsx)(`h2`,{className:`text-2xl font-bold`,children:`Canales`}),(0,F.jsx)(`p`,{className:`text-muted-foreground`,children:`¿Dónde quieres que Bee esté disponible?`})]}),(0,F.jsx)(`div`,{className:`grid gap-3`,children:z.map(e=>(0,F.jsx)(M,{className:g(`transition-all`,r.channels[e.id]?.enabled&&`border-amber-500`),children:(0,F.jsxs)(A,{className:`p-4`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,F.jsx)(`span`,{className:`text-2xl`,children:e.icon}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`h3`,{className:`font-semibold flex items-center gap-2`,children:[e.name,e.required&&(0,F.jsx)(x,{variant:`secondary`,className:`text-xs`,children:`Requerido`})]}),(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.description})]})]}),(0,F.jsx)(re,{checked:r.channels[e.id]?.enabled,onCheckedChange:t=>{e.required&&!t||$({channels:{...r.channels,[e.id]:{enabled:t}}})},disabled:e.required})]}),!e.required&&r.channels[e.id]?.enabled&&(0,F.jsx)(se,{type:`single`,collapsible:!0,className:`mt-4`,children:(0,F.jsxs)(I,{value:`config`,children:[(0,F.jsx)(ce,{children:`Configuración`}),(0,F.jsx)(le,{children:(0,F.jsxs)(`div`,{className:`space-y-3 pt-2`,children:[e.id===`telegram`&&(0,F.jsx)(F.Fragment,{children:(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`telegramToken`,children:`Token del Bot`}),(0,F.jsx)(v,{id:`telegramToken`,placeholder:`123456789:ABCdefGHIjklMNOpqrsTUVwxyz`,value:r.channels.telegram.config?.botToken||``,onChange:e=>$({channels:{...r.channels,telegram:{enabled:!0,config:{botToken:e.target.value}}}})}),(0,F.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,F.jsx)(`a`,{href:`https://t.me/BotFather`,target:`_blank`,rel:`noopener noreferrer`,className:`text-amber-500 hover:underline`,children:`Obtén tu token en BotFather`})})]})}),e.id===`discord`&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`discordToken`,children:`Token del Bot`}),(0,F.jsx)(v,{id:`discordToken`,placeholder:`MTIzNDU2Nzg5MDEyMzQ1Njc4OQ.GJKlMn.OpQrStUvWxYz`,value:r.channels.discord.config?.botToken||``,onChange:e=>$({channels:{...r.channels,discord:{enabled:!0,config:{botToken:e.target.value}}}})})]}),(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`discordClientId`,children:`Client ID`}),(0,F.jsx)(v,{id:`discordClientId`,placeholder:`1234567890123456789`,value:r.channels.discord.config?.clientId||``,onChange:e=>$({channels:{...r.channels,discord:{enabled:!0,config:{clientId:e.target.value}}}})})]})]}),e.id===`whatsapp`&&(0,F.jsx)(F.Fragment,{children:(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`whatsappToken`,children:`Token de la API`}),(0,F.jsx)(v,{id:`whatsappToken`,placeholder:`...`,value:r.channels.whatsapp.config?.apiToken||``,onChange:e=>$({channels:{...r.channels,whatsapp:{enabled:!0,config:{apiToken:e.target.value}}}})})]})}),e.id===`slack`&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`slackToken`,children:`Bot Token`}),(0,F.jsx)(v,{id:`slackToken`,placeholder:`xoxb-...`,value:r.channels.slack.config?.botToken||``,onChange:e=>$({channels:{...r.channels,slack:{enabled:!0,config:{botToken:e.target.value}}}})})]}),(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`slackSigningSecret`,children:`Signing Secret`}),(0,F.jsx)(v,{id:`slackSigningSecret`,placeholder:`...`,value:r.channels.slack.config?.signingSecret||``,onChange:e=>$({channels:{...r.channels,slack:{enabled:!0,config:{signingSecret:e.target.value}}}})})]})]})]})})]})})]})},e.id))})]}),Ae=()=>(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,F.jsx)(`h2`,{className:`text-2xl font-bold`,children:`Reglas éticas`}),(0,F.jsx)(`p`,{className:`text-muted-foreground`,children:`Define los límites de tu agente`})]}),(0,F.jsx)(ae,{children:(0,F.jsxs)(N,{className:`text-sm`,children:[`Las reglas de categoría `,(0,F.jsx)(`strong`,{className:`text-red-500`,children:`NUNCA`}),` son las protecciones más importantes. Desactivarlas puede comprometer la seguridad.`]})}),(0,F.jsxs)(`div`,{className:`space-y-3`,children:[Q.map(e=>{let t=r.ethicsRules[e.id]!==!1;return(0,F.jsx)(M,{className:g(!t&&`opacity-60`),children:(0,F.jsx)(A,{className:`p-4`,children:(0,F.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,F.jsx)(L,{checked:t,onCheckedChange:t=>{e.isDefault&&!t&&!confirm(`¿Estás seguro de desactivar los lineamientos éticos por defecto?`)||$({ethicsRules:{...r.ethicsRules,[e.id]:t}})}}),(0,F.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`h3`,{className:`font-medium`,children:e.name}),e.isDefault&&(0,F.jsx)(x,{className:`text-xs bg-blue-500/10 text-blue-500`,children:`Por defecto`})]}),e.description&&(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:e.description}),(0,F.jsxs)(`details`,{className:`mt-2`,children:[(0,F.jsx)(`summary`,{className:`text-xs text-muted-foreground cursor-pointer hover:text-foreground`,children:`Ver contenido`}),(0,F.jsx)(`pre`,{className:`text-xs mt-2 p-2 bg-muted rounded whitespace-pre-wrap font-mono`,children:e.content})]})]})]})})},e.id)}),Q.length===0&&(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground text-center py-4`,children:`Cargando lineamientos éticos...`})]}),(0,F.jsx)(b,{variant:`outline`,className:`w-full`,onClick:()=>{let e=prompt(`Ingresa tu regla personalizada:`);if(e){let t=prompt(`Categoría (SIEMPRE/NUNCA/CONFIRMAR):`,`CONFIRMAR`);t&&[`SIEMPRE`,`NUNCA`,`CONFIRMAR`].includes(t.toUpperCase())&&$({customRules:[...r.customRules,{text:e,category:t.toUpperCase()}]})}},children:`+ Añadir regla personalizada`}),r.customRules.length>0&&(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{children:`Reglas personalizadas`}),r.customRules.map((e,t)=>(0,F.jsx)(M,{children:(0,F.jsxs)(A,{className:`p-4 flex items-center justify-between`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`p`,{className:`font-medium`,children:e.text}),(0,F.jsx)(x,{className:g(`text-xs mt-1`,e.category===`NUNCA`&&`text-red-500 bg-red-500/10`,e.category===`SIEMPRE`&&`text-green-500 bg-green-500/10`,e.category===`CONFIRMAR`&&`text-amber-500 bg-amber-500/10`),children:e.category})]}),(0,F.jsx)(b,{variant:`ghost`,size:`sm`,onClick:()=>{$({customRules:r.customRules.filter((e,n)=>n!==t)})},children:`Eliminar`})]})},t))]})]}),je=()=>(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,F.jsx)(`h2`,{className:`text-2xl font-bold`,children:`¡Todo listo!`}),(0,F.jsx)(`p`,{className:`text-muted-foreground`,children:`Revisa tu configuración antes de continuar`})]}),s?(0,F.jsx)(M,{className:`border-green-500 bg-green-500/10`,children:(0,F.jsxs)(A,{className:`p-8 text-center space-y-4`,children:[(0,F.jsx)(`div`,{className:`flex justify-center`,children:(0,F.jsxs)(`div`,{className:`relative`,children:[(0,F.jsx)(y,{className:`w-24 h-24 text-amber-500 animate-pulse`,fill:`currentColor`}),(0,F.jsx)(h,{className:`w-8 h-8 text-amber-300 absolute -top-2 -right-2 animate-bounce`})]})}),(0,F.jsx)(`h3`,{className:`text-xl font-bold`,children:`¡Bienvenido a Hive!`}),(0,F.jsxs)(`p`,{className:`text-muted-foreground`,children:[r.agentName,` está listo para ayudarte.`]})]})}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(M,{children:[(0,F.jsxs)(k,{children:[(0,F.jsxs)(O,{className:`flex items-center gap-3`,children:[(0,F.jsx)(`div`,{className:`w-10 h-10 rounded-lg flex items-center justify-center bg-amber-500`,children:(0,F.jsx)(y,{className:`w-6 h-6 text-white`,fill:`currentColor`})}),r.agentName]}),(0,F.jsx)(j,{children:r.agentDescription||`Sin descripción`})]}),(0,F.jsxs)(A,{className:`space-y-4`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(S,{className:`text-sm text-muted-foreground`,children:`Tu correo`}),(0,F.jsx)(`p`,{className:`font-medium`,children:r.userEmail.trim().toLowerCase()})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(S,{className:`text-sm text-muted-foreground`,children:`Proveedor`}),(0,F.jsxs)(`p`,{className:`font-medium`,children:[K.find(e=>e.id===r.provider)?.name||r.provider,` — `,r.model]})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(S,{className:`text-sm text-muted-foreground`,children:`Canales activos`}),(0,F.jsx)(`div`,{className:`flex gap-2 flex-wrap mt-1`,children:Object.entries(r.channels).filter(([e,t])=>t.enabled).map(([e])=>{let t=z.find(t=>t.id===e);return(0,F.jsxs)(x,{variant:`secondary`,children:[t?.icon,` `,t?.name]},e)})})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(S,{className:`text-sm text-muted-foreground`,children:`Reglas éticas activas`}),(0,F.jsx)(`div`,{className:`flex gap-2 flex-wrap mt-1`,children:Object.entries(r.ethicsRules).filter(([e,t])=>t).map(([e])=>(0,F.jsx)(x,{variant:`outline`,children:Q.find(t=>t.id===e)?.name??e},e))})]})]})]}),(0,F.jsx)(b,{className:`w-full h-14 text-lg bg-amber-500 hover:bg-amber-600`,onClick:we,disabled:a,children:a?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(m,{className:`w-5 h-5 mr-2 animate-spin`}),`Configurando...`]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(h,{className:`w-5 h-5 mr-2`}),`Iniciar a `,r.agentName]})})]})]});return(0,F.jsx)(`div`,{className:`min-h-screen bg-gradient-to-b from-background to-muted/20`,children:(0,F.jsxs)(`div`,{className:`container max-w-2xl mx-auto py-8 px-4`,children:[(0,F.jsxs)(`div`,{className:`mb-8 space-y-2`,children:[(0,F.jsxs)(`div`,{className:`flex justify-between text-sm text-muted-foreground`,children:[(0,F.jsxs)(`span`,{children:[`Paso `,t,` de `,V]}),(0,F.jsx)(`button`,{onClick:Se,className:`text-xs text-muted-foreground hover:text-foreground`,children:`Reiniciar configuración`})]}),(0,F.jsx)(oe,{value:t/V*100,className:`h-2`})]}),Te(),W&&(0,F.jsx)(ae,{variant:`destructive`,className:`mt-6`,children:(0,F.jsx)(N,{children:W})}),!s&&(0,F.jsxs)(`div`,{className:`flex justify-between mt-6 pt-6 border-t`,children:[(0,F.jsx)(b,{variant:`outline`,onClick:xe,disabled:t===1,children:`← Anterior`}),t<V?(0,F.jsx)(b,{onClick:be,className:`bg-amber-500 hover:bg-amber-600`,children:`Siguiente →`}):(0,F.jsx)(`div`,{})]})]})})}export{W as default};
1
+ import{r as e}from"./rolldown-runtime-S-ySWqyJ.js";import{f as t}from"./vendor-charts-K3xcRl0X.js";import{a as n,i as r,n as i,o as a,r as o,s,t as c}from"./vendor-radix-D0s_k6Gp.js";import{o as l}from"./vendor-query-Dj8xYhQD.js";import{t as u}from"./check-CryV78SQ.js";import{t as d}from"./chevron-down-QCtMs-Af.js";import{t as f}from"./circle-check-BAolxswA.js";import{t as p}from"./circle-x-CJXbXzRh.js";import{t as m}from"./loader-circle-Dtfz4FWw.js";import{t as h}from"./sparkles-VXHGDbNh.js";import{t as g}from"./utils-Dyb7SC2_.js";import{c as ee}from"./vendor-router-zpB-76nT.js";import{t as _}from"./gateway-url-BlnabM5e.js";import{O as v,V as y,f as te,g as ne,k as b}from"./index-ZjAc-KQS.js";import{t as x}from"./badge-DKGZbVZJ.js";import{t as S}from"./label-k0jYxoWW.js";import{i as C,n as w,o as T,s as E,t as D}from"./select-BOR8MsSL.js";import{t as re}from"./switch-DXcELPsM.js";import{a as O,i as k,n as A,r as j,t as M}from"./card-D3Nw3kh3.js";import{t as ie}from"./useHiveAgentsModelLoad-COLvs-Ho.js";import{n as N,t as ae}from"./alert-CQlRq6sv.js";import{t as oe}from"./progress-DrI2UDu-.js";var P=e(t(),1),F=l(),se=a,I=P.forwardRef(({className:e,...t},r)=>(0,F.jsx)(n,{ref:r,className:g(`border-b`,e),...t}));I.displayName=`AccordionItem`;var ce=P.forwardRef(({className:e,children:t,...n},i)=>(0,F.jsx)(r,{className:`flex`,children:(0,F.jsxs)(s,{ref:i,className:g(`flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180`,e),...n,children:[t,(0,F.jsx)(d,{className:`h-4 w-4 shrink-0 transition-transform duration-200`})]})}));ce.displayName=s.displayName;var le=P.forwardRef(({className:e,children:t,...n},r)=>(0,F.jsx)(o,{ref:r,className:`overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down`,...n,children:(0,F.jsx)(`div`,{className:g(`pb-4 pt-0`,e),children:t})}));le.displayName=o.displayName;var L=P.forwardRef(({className:e,...t},n)=>(0,F.jsx)(c,{ref:n,className:g(`peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:(0,F.jsx)(i,{className:g(`flex items-center justify-center text-current`),children:(0,F.jsx)(u,{className:`h-4 w-4`})})}));L.displayName=c.displayName;var ue={gemini:`🔵`,anthropic:`🟠`,openai:`🟢`,groq:`🔴`,ollama:`🟣`,openrouter:`🟡`,deepseek:`🔷`,mistral:`🔸`,kimi:`🌙`},R={gemini:`https://aistudio.google.com/app/apikey`,anthropic:`https://console.anthropic.com/keys`,openai:`https://platform.openai.com/api-keys`,groq:`https://console.groq.com/keys`,openrouter:`https://openrouter.ai/keys`,deepseek:`https://platform.deepseek.com/api_keys`,mistral:`https://console.mistral.ai/api-keys`,kimi:`https://platform.moonshot.cn/console/api-keys`},z=[{id:`webchat`,name:`WebChat`,description:`Chat web integrado`,icon:`💬`,required:!0},{id:`telegram`,name:`Telegram`,description:`Bot de Telegram`,icon:`✈️`,required:!1},{id:`discord`,name:`Discord`,description:`Bot de Discord`,icon:`🎮`,required:!1},{id:`whatsapp`,name:`WhatsApp`,description:`Bot de WhatsApp`,icon:`📱`,required:!1},{id:`slack`,name:`Slack`,description:`Bot de Slack`,icon:`💼`,required:!1}],B=`hive_setup_wizard_data`,V=6;function de(){try{let e=sessionStorage.getItem(B);if(e){let t=JSON.parse(e);return{...U(),...t}}}catch(e){console.error(`Failed to load wizard data:`,e)}return null}function fe(e){try{sessionStorage.setItem(B,JSON.stringify(e))}catch(e){console.error(`Failed to save wizard data:`,e)}}function H(){try{sessionStorage.removeItem(B)}catch(e){console.error(`Failed to clear wizard data:`,e)}}function U(){return{userName:``,userEmail:``,userLanguage:`es`,userTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone||`UTC`,userOccupation:``,userNotes:``,agentName:`Bee`,agentDescription:``,agentTone:`friendly`,provider:``,apiKey:``,model:``,apiKeyVerified:!1,channels:{webchat:{enabled:!0},telegram:{enabled:!1},discord:{enabled:!1},whatsapp:{enabled:!1},slack:{enabled:!1}},ethicsRules:{},customRules:[]}}function W(){let e=ee(),[t,n]=(0,P.useState)(1),[r,i]=(0,P.useState)(()=>de()||U()),[a,o]=(0,P.useState)(!1),[s,c]=(0,P.useState)(!1),{showLoader:l,hideLoader:u}=ne(),[d,B]=(0,P.useState)(`idle`),[W,G]=(0,P.useState)(null),[K,pe]=(0,P.useState)([]),[q,J]=(0,P.useState)(null),[Y,X]=(0,P.useState)(!1),[me,he]=(0,P.useState)(!1),[ge,Z]=(0,P.useState)(null),{load:_e}=ie(),[Q,ve]=(0,P.useState)([]);(0,P.useEffect)(()=>{fetch(`${_()}/api/setup/providers`).then(e=>e.json()).then(e=>{Array.isArray(e)&&pe(e)}).catch(()=>{}),fetch(`${_()}/api/setup/ethics`).then(e=>e.json()).then(e=>{Array.isArray(e)&&(ve(e),i(t=>Object.keys(t.ethicsRules).length===0?{...t,ethicsRules:Object.fromEntries(e.map(e=>[e.id,!0]))}:t))}).catch(()=>{})},[]),(0,P.useEffect)(()=>{fe(r)},[r]),(0,P.useEffect)(()=>{fetch(`${_()}/api/setup/status`).then(e=>e.json()).then(t=>{t.configured&&e(`/ui`)}).catch(()=>{})},[e]);let $=e=>{G(null),i(t=>({...t,...e}))},ye=()=>{switch(t){case 1:return r.userName.trim()?r.userName.trim().length<2?`El nombre debe tener al menos 2 caracteres.`:r.userEmail.trim()?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r.userEmail.trim())?null:`Ingresa un correo válido.`:`El correo es obligatorio.`:`El nombre es obligatorio.`;case 2:return r.agentName.trim()?r.agentName.trim().length<2?`El nombre debe tener al menos 2 caracteres.`:null:`El nombre del agente es obligatorio.`;case 3:return r.provider?r.provider!==`ollama`&&!r.apiKey?`Ingresa tu API key.`:r.provider!==`ollama`&&!r.apiKeyVerified?`Verifica tu API key antes de continuar.`:r.model?null:`Selecciona un modelo.`:`Selecciona un proveedor LLM.`;default:return null}},be=()=>{let e=ye();if(e){G(e);return}G(null),t<V&&n(e=>e+1)},xe=()=>{t>1&&n(e=>e-1)},Se=()=>{confirm(`¿Estás seguro de que quieres reiniciar la configuración? Se perderá todo el progreso.`)&&(H(),i(U()),n(1))},Ce=async()=>{if(!(!r.apiKey||!r.provider)){B(`verifying`);try{(await te(`/api/setup/verify-provider`,{method:`POST`,body:{provider:r.provider,apiKey:r.apiKey},showLoader:`Verificando conexión...`,showError:!1})).success?(B(`success`),$({apiKeyVerified:!0})):(B(`error`),$({apiKeyVerified:!1}))}catch{B(`error`),$({apiKeyVerified:!1})}}},we=async()=>{o(!0);try{let t=await te(`/api/setup/complete`,{method:`POST`,body:r,showLoader:`Finalizando configuración...`,showError:!0});if(t.success){let n=t.authToken;n&&localStorage.setItem(`hive-auth-token`,n),c(!0),H(),(async()=>{await new Promise(e=>setTimeout(e,1500)),l(`Iniciando a ${r.agentName}... esto toma unos segundos`);for(let t=0;t<40;t++){try{let t=await fetch(`${_()}/api/setup/status`);if(t.ok){let{configured:r}=await t.json();if(r){u(),e(n?`/?token=${n}`:`/`);return}}}catch{}await new Promise(e=>setTimeout(e,1e3))}u(),e(n?`/?token=${n}`:`/`)})()}}catch{}finally{o(!1)}},Te=()=>{switch(t){case 1:return Ee();case 2:return De();case 3:return Oe();case 4:return ke();case 5:return Ae();case 6:return je();default:return null}},Ee=()=>(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsxs)(`div`,{className:`text-center space-y-4`,children:[(0,F.jsx)(`div`,{className:`flex justify-center`,children:(0,F.jsxs)(`div`,{className:`relative`,children:[(0,F.jsx)(y,{className:`w-24 h-24 text-amber-500`,fill:`currentColor`}),(0,F.jsx)(h,{className:`w-8 h-8 text-amber-300 absolute -top-2 -right-2`})]})}),(0,F.jsx)(`h1`,{className:`text-3xl font-bold`,children:`Bienvenido a Hive`}),(0,F.jsx)(`p`,{className:`text-muted-foreground max-w-md mx-auto`,children:`Hive es tu colmena de agentes IA. Local-first. Multi-canal. Open source. En los próximos minutos configurarás tu agente personal Bee.`})]}),(0,F.jsxs)(M,{children:[(0,F.jsxs)(k,{children:[(0,F.jsx)(O,{children:`Tu información`}),(0,F.jsx)(j,{children:`Comencemos con tus datos básicos`})]}),(0,F.jsxs)(A,{className:`space-y-4`,children:[(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`userName`,children:`Tu nombre`}),(0,F.jsx)(v,{id:`userName`,placeholder:`¿Cómo te llamas?`,value:r.userName,onChange:e=>$({userName:e.target.value})})]}),(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`userEmail`,children:`Tu correo`}),(0,F.jsx)(v,{id:`userEmail`,type:`email`,autoComplete:`email`,placeholder:`tu@correo.com`,maxLength:254,required:!0,value:r.userEmail,onChange:e=>$({userEmail:e.target.value})}),(0,F.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Hive lo usará cuando digas «envíame». También será tu usuario de acceso si después activas una contraseña.`})]}),(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`userLanguage`,children:`Idioma preferido`}),(0,F.jsxs)(D,{value:r.userLanguage,onValueChange:e=>$({userLanguage:e}),children:[(0,F.jsx)(T,{children:(0,F.jsx)(E,{})}),(0,F.jsxs)(w,{children:[(0,F.jsx)(C,{value:`es`,children:`Español`}),(0,F.jsx)(C,{value:`en`,children:`English`}),(0,F.jsx)(C,{value:`pt`,children:`Português`}),(0,F.jsx)(C,{value:`fr`,children:`Français`})]})]})]}),(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`userTimezone`,children:`Zona horaria`}),(0,F.jsx)(v,{id:`userTimezone`,value:r.userTimezone,onChange:e=>$({userTimezone:e.target.value}),placeholder:`America/Bogota`}),(0,F.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Detectada automáticamente: `,Intl.DateTimeFormat().resolvedOptions().timeZone]})]}),(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsxs)(S,{htmlFor:`userOccupation`,children:[`Ocupación `,(0,F.jsx)(`span`,{className:`text-muted-foreground font-normal`,children:`(opcional)`})]}),(0,F.jsx)(v,{id:`userOccupation`,value:r.userOccupation,onChange:e=>$({userOccupation:e.target.value}),placeholder:`Ej: Desarrollador de software, diseñador, estudiante...`})]}),(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsxs)(S,{htmlFor:`userNotes`,children:[`Preferencias de comunicación `,(0,F.jsx)(`span`,{className:`text-muted-foreground font-normal`,children:`(opcional)`})]}),(0,F.jsx)(`textarea`,{id:`userNotes`,className:`w-full min-h-[80px] p-3 border rounded-md bg-background resize-none text-sm`,value:r.userNotes,onChange:e=>$({userNotes:e.target.value}),placeholder:`Ej: Prefiero respuestas cortas y directas. Usa ejemplos de código cuando expliques conceptos técnicos...`})]})]})]})]}),De=()=>(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,F.jsx)(`h2`,{className:`text-2xl font-bold`,children:`Tu agente`}),(0,F.jsx)(`p`,{className:`text-muted-foreground`,children:`Personaliza a Bee, tu agente personal`})]}),(0,F.jsxs)(M,{children:[(0,F.jsx)(k,{children:(0,F.jsx)(O,{children:`Identidad del agente`})}),(0,F.jsxs)(A,{className:`space-y-4`,children:[(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`agentName`,children:`Nombre del agente`}),(0,F.jsx)(v,{id:`agentName`,value:r.agentName,onChange:e=>$({agentName:e.target.value}),placeholder:`Bee`})]}),(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`agentDescription`,children:`Descripción / Personalidad`}),(0,F.jsx)(`textarea`,{id:`agentDescription`,className:`w-full min-h-[100px] p-3 border rounded-md bg-background resize-none`,value:r.agentDescription,onChange:e=>$({agentDescription:e.target.value}),placeholder:`Ej: Eres un asistente útil y amable. Respondes de forma concisa pero completa. Te especializas en ayudar con tareas de programación y productividad...`})]}),(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`agentTone`,children:`Tono de comunicación`}),(0,F.jsxs)(D,{value:r.agentTone,onValueChange:e=>$({agentTone:e}),children:[(0,F.jsx)(T,{children:(0,F.jsx)(E,{placeholder:`Selecciona un tono`})}),(0,F.jsxs)(w,{children:[(0,F.jsx)(C,{value:`friendly`,children:`Amigable y cercano`}),(0,F.jsx)(C,{value:`professional`,children:`Profesional y formal`}),(0,F.jsx)(C,{value:`direct`,children:`Directo y conciso`}),(0,F.jsx)(C,{value:`casual`,children:`Casual y relajado`})]})]}),(0,F.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Define cómo se comunicará tu agente contigo`})]})]})]})]}),Oe=()=>(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,F.jsx)(`h2`,{className:`text-2xl font-bold`,children:`Proveedor LLM`}),(0,F.jsx)(`p`,{className:`text-muted-foreground`,children:`Selecciona el cerebro de tu agente`})]}),(0,F.jsx)(`div`,{className:`grid gap-3`,children:K.map(e=>(0,F.jsx)(M,{className:g(`cursor-pointer transition-all hover:shadow-md`,r.provider===e.id&&`border-amber-500 ring-2 ring-amber-500`),onClick:()=>{$({provider:e.id,model:``,apiKeyVerified:!1}),e.id===`ollama`&&J(null)},children:(0,F.jsxs)(A,{className:`flex items-center gap-4 p-4`,children:[(0,F.jsx)(`span`,{className:`text-3xl`,children:ue[e.id]??`🤖`}),(0,F.jsxs)(`div`,{className:`flex-1`,children:[(0,F.jsx)(`h3`,{className:`font-semibold`,children:e.name}),(0,F.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[e.models.length,` modelo`,e.models.length===1?``:`s`,` disponible`,e.models.length===1?``:`s`]})]}),r.provider===e.id&&(0,F.jsx)(f,{className:`w-5 h-5 text-amber-500`})]})},e.id))}),r.provider&&(()=>{let e=K.find(e=>e.id===r.provider);return(0,F.jsxs)(M,{className:`mt-4`,children:[(0,F.jsx)(k,{children:(0,F.jsxs)(O,{children:[`Configuración de `,e?.name]})}),(0,F.jsxs)(A,{className:`space-y-4`,children:[r.provider!==`ollama`&&(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`apiKey`,children:`API Key`}),(0,F.jsxs)(`div`,{className:`flex gap-2`,children:[(0,F.jsx)(v,{id:`apiKey`,type:`password`,value:r.apiKey,onChange:e=>$({apiKey:e.target.value,apiKeyVerified:!1}),placeholder:`sk-...`,className:g(W?.includes(`API key`)&&!r.apiKey&&`border-red-500`)}),(0,F.jsx)(b,{variant:`outline`,onClick:Ce,disabled:!r.apiKey||d===`verifying`,children:d===`verifying`?(0,F.jsx)(m,{className:`w-4 h-4 animate-spin`}):d===`success`?(0,F.jsx)(f,{className:`w-4 h-4 text-green-500`}):d===`error`?(0,F.jsx)(p,{className:`w-4 h-4 text-red-500`}):`Verificar`})]}),d===`success`&&(0,F.jsxs)(`p`,{className:`text-sm text-green-600 flex items-center gap-1`,children:[(0,F.jsx)(f,{className:`w-4 h-4`}),` API key verificada correctamente`]}),d===`error`&&(0,F.jsxs)(`p`,{className:`text-sm text-red-600 flex items-center gap-1`,children:[(0,F.jsx)(p,{className:`w-4 h-4`}),` API key inválida o error de conexión`]}),R[r.provider]&&(0,F.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`¿No tienes tu API key?`,` `,(0,F.jsx)(`a`,{href:R[r.provider],target:`_blank`,rel:`noopener noreferrer`,className:`text-amber-500 hover:underline`,children:`Obtener aquí`})]})]}),r.provider===`ollama`&&(0,F.jsxs)(`div`,{className:`space-y-3`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(b,{type:`button`,variant:`outline`,size:`sm`,disabled:Y,onClick:()=>{J(null),X(!0),$({model:``}),fetch(`${_()}/api/setup/ollama-models`).then(e=>e.json()).then(e=>{J(e.models??[]),X(!1)}).catch(()=>{J([]),X(!1)})},children:Y?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(m,{className:`w-3 h-3 animate-spin mr-1`}),`Detectando...`]}):`🔍 Detectar modelos`}),!Y&&q!==null&&(0,F.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:q.length>0?`${q.length} modelo${q.length===1?``:`s`} encontrado${q.length===1?``:`s`}`:`Sin modelos — instala uno con ollama pull`})]}),q&&q.length>0&&(0,F.jsxs)(`div`,{className:`space-y-1`,children:[(0,F.jsx)(S,{htmlFor:`model`,children:`Modelo`}),(0,F.jsxs)(D,{value:r.model,onValueChange:e=>$({model:e}),children:[(0,F.jsx)(T,{className:g(!r.model&&W?.includes(`modelo`)&&`border-red-500`),children:(0,F.jsx)(E,{placeholder:`Selecciona un modelo`})}),(0,F.jsx)(w,{children:q.map((e,t)=>(0,F.jsxs)(C,{value:e.id,children:[e.name,t===0?` (Recomendado)`:``]},e.id))})]})]}),!Y&&q!==null&&q.length===0&&(0,F.jsxs)(`p`,{className:`text-xs text-amber-600`,children:[`Asegúrate que Ollama esté corriendo (`,(0,F.jsx)(`code`,{children:`ollama serve`}),`) y tengas modelos (`,(0,F.jsx)(`code`,{children:`ollama pull llama3.2`}),`).`]})]}),r.provider!==`ollama`&&r.apiKeyVerified&&(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`model`,children:`Modelo`}),(0,F.jsxs)(D,{value:r.model,disabled:me,onValueChange:async t=>{if(Z(null),r.provider===`hiveagents`){let n=e?.models.find(e=>e.id===t)?.context_window;if(!n){Z(`No se pudo determinar el context_window del modelo.`);return}he(!0);let r=await _e(t,n);if(he(!1),!r){Z(`No se pudo confirmar la carga del modelo. Intentá de nuevo.`);return}}$({model:t})},children:[(0,F.jsx)(T,{className:g(!r.model&&W?.includes(`modelo`)&&`border-red-500`),children:(0,F.jsx)(E,{placeholder:`Selecciona un modelo`})}),(0,F.jsx)(w,{children:(e?.models??[]).map((e,t)=>(0,F.jsxs)(C,{value:e.id,children:[e.name||e.id,t===0?` (Recomendado)`:``]},e.id))})]}),me&&(0,F.jsxs)(`p`,{className:`text-xs text-muted-foreground flex items-center gap-1`,children:[(0,F.jsx)(m,{className:`w-3 h-3 animate-spin`}),` Cargando modelo en HiveAgents…`]}),ge&&(0,F.jsx)(`p`,{className:`text-xs text-red-600`,children:ge})]})]})]})})()]}),ke=()=>(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,F.jsx)(`h2`,{className:`text-2xl font-bold`,children:`Canales`}),(0,F.jsx)(`p`,{className:`text-muted-foreground`,children:`¿Dónde quieres que Bee esté disponible?`})]}),(0,F.jsx)(`div`,{className:`grid gap-3`,children:z.map(e=>(0,F.jsx)(M,{className:g(`transition-all`,r.channels[e.id]?.enabled&&`border-amber-500`),children:(0,F.jsxs)(A,{className:`p-4`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,F.jsx)(`span`,{className:`text-2xl`,children:e.icon}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`h3`,{className:`font-semibold flex items-center gap-2`,children:[e.name,e.required&&(0,F.jsx)(x,{variant:`secondary`,className:`text-xs`,children:`Requerido`})]}),(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.description})]})]}),(0,F.jsx)(re,{checked:r.channels[e.id]?.enabled,onCheckedChange:t=>{e.required&&!t||$({channels:{...r.channels,[e.id]:{enabled:t}}})},disabled:e.required})]}),!e.required&&r.channels[e.id]?.enabled&&(0,F.jsx)(se,{type:`single`,collapsible:!0,className:`mt-4`,children:(0,F.jsxs)(I,{value:`config`,children:[(0,F.jsx)(ce,{children:`Configuración`}),(0,F.jsx)(le,{children:(0,F.jsxs)(`div`,{className:`space-y-3 pt-2`,children:[e.id===`telegram`&&(0,F.jsx)(F.Fragment,{children:(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`telegramToken`,children:`Token del Bot`}),(0,F.jsx)(v,{id:`telegramToken`,placeholder:`123456789:ABCdefGHIjklMNOpqrsTUVwxyz`,value:r.channels.telegram.config?.botToken||``,onChange:e=>$({channels:{...r.channels,telegram:{enabled:!0,config:{botToken:e.target.value}}}})}),(0,F.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,F.jsx)(`a`,{href:`https://t.me/BotFather`,target:`_blank`,rel:`noopener noreferrer`,className:`text-amber-500 hover:underline`,children:`Obtén tu token en BotFather`})})]})}),e.id===`discord`&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`discordToken`,children:`Token del Bot`}),(0,F.jsx)(v,{id:`discordToken`,placeholder:`MTIzNDU2Nzg5MDEyMzQ1Njc4OQ.GJKlMn.OpQrStUvWxYz`,value:r.channels.discord.config?.botToken||``,onChange:e=>$({channels:{...r.channels,discord:{enabled:!0,config:{botToken:e.target.value}}}})})]}),(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`discordClientId`,children:`Client ID`}),(0,F.jsx)(v,{id:`discordClientId`,placeholder:`1234567890123456789`,value:r.channels.discord.config?.clientId||``,onChange:e=>$({channels:{...r.channels,discord:{enabled:!0,config:{clientId:e.target.value}}}})})]})]}),e.id===`whatsapp`&&(0,F.jsx)(F.Fragment,{children:(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`whatsappToken`,children:`Token de la API`}),(0,F.jsx)(v,{id:`whatsappToken`,placeholder:`...`,value:r.channels.whatsapp.config?.apiToken||``,onChange:e=>$({channels:{...r.channels,whatsapp:{enabled:!0,config:{apiToken:e.target.value}}}})})]})}),e.id===`slack`&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`slackToken`,children:`Bot Token`}),(0,F.jsx)(v,{id:`slackToken`,placeholder:`xoxb-...`,value:r.channels.slack.config?.botToken||``,onChange:e=>$({channels:{...r.channels,slack:{enabled:!0,config:{botToken:e.target.value}}}})})]}),(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{htmlFor:`slackSigningSecret`,children:`Signing Secret`}),(0,F.jsx)(v,{id:`slackSigningSecret`,placeholder:`...`,value:r.channels.slack.config?.signingSecret||``,onChange:e=>$({channels:{...r.channels,slack:{enabled:!0,config:{signingSecret:e.target.value}}}})})]})]})]})})]})})]})},e.id))})]}),Ae=()=>(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,F.jsx)(`h2`,{className:`text-2xl font-bold`,children:`Reglas éticas`}),(0,F.jsx)(`p`,{className:`text-muted-foreground`,children:`Define los límites de tu agente`})]}),(0,F.jsx)(ae,{children:(0,F.jsxs)(N,{className:`text-sm`,children:[`Las reglas de categoría `,(0,F.jsx)(`strong`,{className:`text-red-500`,children:`NUNCA`}),` son las protecciones más importantes. Desactivarlas puede comprometer la seguridad.`]})}),(0,F.jsxs)(`div`,{className:`space-y-3`,children:[Q.map(e=>{let t=r.ethicsRules[e.id]!==!1;return(0,F.jsx)(M,{className:g(!t&&`opacity-60`),children:(0,F.jsx)(A,{className:`p-4`,children:(0,F.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,F.jsx)(L,{checked:t,onCheckedChange:t=>{e.isDefault&&!t&&!confirm(`¿Estás seguro de desactivar los lineamientos éticos por defecto?`)||$({ethicsRules:{...r.ethicsRules,[e.id]:t}})}}),(0,F.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`h3`,{className:`font-medium`,children:e.name}),e.isDefault&&(0,F.jsx)(x,{className:`text-xs bg-blue-500/10 text-blue-500`,children:`Por defecto`})]}),e.description&&(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:e.description}),(0,F.jsxs)(`details`,{className:`mt-2`,children:[(0,F.jsx)(`summary`,{className:`text-xs text-muted-foreground cursor-pointer hover:text-foreground`,children:`Ver contenido`}),(0,F.jsx)(`pre`,{className:`text-xs mt-2 p-2 bg-muted rounded whitespace-pre-wrap font-mono`,children:e.content})]})]})]})})},e.id)}),Q.length===0&&(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground text-center py-4`,children:`Cargando lineamientos éticos...`})]}),(0,F.jsx)(b,{variant:`outline`,className:`w-full`,onClick:()=>{let e=prompt(`Ingresa tu regla personalizada:`);if(e){let t=prompt(`Categoría (SIEMPRE/NUNCA/CONFIRMAR):`,`CONFIRMAR`);t&&[`SIEMPRE`,`NUNCA`,`CONFIRMAR`].includes(t.toUpperCase())&&$({customRules:[...r.customRules,{text:e,category:t.toUpperCase()}]})}},children:`+ Añadir regla personalizada`}),r.customRules.length>0&&(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(S,{children:`Reglas personalizadas`}),r.customRules.map((e,t)=>(0,F.jsx)(M,{children:(0,F.jsxs)(A,{className:`p-4 flex items-center justify-between`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`p`,{className:`font-medium`,children:e.text}),(0,F.jsx)(x,{className:g(`text-xs mt-1`,e.category===`NUNCA`&&`text-red-500 bg-red-500/10`,e.category===`SIEMPRE`&&`text-green-500 bg-green-500/10`,e.category===`CONFIRMAR`&&`text-amber-500 bg-amber-500/10`),children:e.category})]}),(0,F.jsx)(b,{variant:`ghost`,size:`sm`,onClick:()=>{$({customRules:r.customRules.filter((e,n)=>n!==t)})},children:`Eliminar`})]})},t))]})]}),je=()=>(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,F.jsx)(`h2`,{className:`text-2xl font-bold`,children:`¡Todo listo!`}),(0,F.jsx)(`p`,{className:`text-muted-foreground`,children:`Revisa tu configuración antes de continuar`})]}),s?(0,F.jsx)(M,{className:`border-green-500 bg-green-500/10`,children:(0,F.jsxs)(A,{className:`p-8 text-center space-y-4`,children:[(0,F.jsx)(`div`,{className:`flex justify-center`,children:(0,F.jsxs)(`div`,{className:`relative`,children:[(0,F.jsx)(y,{className:`w-24 h-24 text-amber-500 animate-pulse`,fill:`currentColor`}),(0,F.jsx)(h,{className:`w-8 h-8 text-amber-300 absolute -top-2 -right-2 animate-bounce`})]})}),(0,F.jsx)(`h3`,{className:`text-xl font-bold`,children:`¡Bienvenido a Hive!`}),(0,F.jsxs)(`p`,{className:`text-muted-foreground`,children:[r.agentName,` está listo para ayudarte.`]})]})}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(M,{children:[(0,F.jsxs)(k,{children:[(0,F.jsxs)(O,{className:`flex items-center gap-3`,children:[(0,F.jsx)(`div`,{className:`w-10 h-10 rounded-lg flex items-center justify-center bg-amber-500`,children:(0,F.jsx)(y,{className:`w-6 h-6 text-white`,fill:`currentColor`})}),r.agentName]}),(0,F.jsx)(j,{children:r.agentDescription||`Sin descripción`})]}),(0,F.jsxs)(A,{className:`space-y-4`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(S,{className:`text-sm text-muted-foreground`,children:`Tu correo`}),(0,F.jsx)(`p`,{className:`font-medium`,children:r.userEmail.trim().toLowerCase()})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(S,{className:`text-sm text-muted-foreground`,children:`Proveedor`}),(0,F.jsxs)(`p`,{className:`font-medium`,children:[K.find(e=>e.id===r.provider)?.name||r.provider,` — `,r.model]})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(S,{className:`text-sm text-muted-foreground`,children:`Canales activos`}),(0,F.jsx)(`div`,{className:`flex gap-2 flex-wrap mt-1`,children:Object.entries(r.channels).filter(([e,t])=>t.enabled).map(([e])=>{let t=z.find(t=>t.id===e);return(0,F.jsxs)(x,{variant:`secondary`,children:[t?.icon,` `,t?.name]},e)})})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(S,{className:`text-sm text-muted-foreground`,children:`Reglas éticas activas`}),(0,F.jsx)(`div`,{className:`flex gap-2 flex-wrap mt-1`,children:Object.entries(r.ethicsRules).filter(([e,t])=>t).map(([e])=>(0,F.jsx)(x,{variant:`outline`,children:Q.find(t=>t.id===e)?.name??e},e))})]})]})]}),(0,F.jsx)(b,{className:`w-full h-14 text-lg bg-amber-500 hover:bg-amber-600`,onClick:we,disabled:a,children:a?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(m,{className:`w-5 h-5 mr-2 animate-spin`}),`Configurando...`]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(h,{className:`w-5 h-5 mr-2`}),`Iniciar a `,r.agentName]})})]})]});return(0,F.jsx)(`div`,{className:`min-h-screen bg-gradient-to-b from-background to-muted/20`,children:(0,F.jsxs)(`div`,{className:`container max-w-2xl mx-auto py-8 px-4`,children:[(0,F.jsxs)(`div`,{className:`mb-8 space-y-2`,children:[(0,F.jsxs)(`div`,{className:`flex justify-between text-sm text-muted-foreground`,children:[(0,F.jsxs)(`span`,{children:[`Paso `,t,` de `,V]}),(0,F.jsx)(`button`,{onClick:Se,className:`text-xs text-muted-foreground hover:text-foreground`,children:`Reiniciar configuración`})]}),(0,F.jsx)(oe,{value:t/V*100,className:`h-2`})]}),Te(),W&&(0,F.jsx)(ae,{variant:`destructive`,className:`mt-6`,children:(0,F.jsx)(N,{children:W})}),!s&&(0,F.jsxs)(`div`,{className:`flex justify-between mt-6 pt-6 border-t`,children:[(0,F.jsx)(b,{variant:`outline`,onClick:xe,disabled:t===1,children:`← Anterior`}),t<V?(0,F.jsx)(b,{onClick:be,className:`bg-amber-500 hover:bg-amber-600`,children:`Siguiente →`}):(0,F.jsx)(`div`,{})]})]})})}export{W as default};
@@ -1,4 +1,4 @@
1
- import{n as e,r as t,t as n}from"./rolldown-runtime-S-ySWqyJ.js";import{f as r}from"./vendor-charts-K3xcRl0X.js";import{o as i}from"./vendor-query-Dj8xYhQD.js";import{t as a}from"./chevron-down-33N886NY.js";import{t as o}from"./chevron-right-CFodBS-b.js";import{t as s}from"./circle-alert-BDVHxmAz.js";import{t as c}from"./circle-check-BJWNbLuF.js";import{t as l}from"./file-text-DO8jqiJK.js";import{t as u}from"./gauge-BRGwuN8G.js";import{t as d}from"./loader-circle-BhqRN2nO.js";import{n as f,t as p}from"./square-ju5H8nrT.js";import{t as m}from"./pause-Cme88_9s.js";import{t as h}from"./play-CfYDHD6h.js";import{t as g}from"./refresh-cw-CroGQY62.js";import{t as _}from"./sparkles-BcaOs_Jk.js";import{t as v}from"./triangle-alert-B04mgMcg.js";import{n as y,t as b}from"./volume-x-qnVxkRSM.js";import{t as x}from"./zap-DT7cM7YS.js";import{n as S}from"./utils-Dyb7SC2_.js";import{r as C}from"./gateway-url-BlnabM5e.js";import{D as w,E as T,K as E,M as ee,W as D,d as te,f as ne,r as re}from"./index-Bejlp-R1.js";import{t as O}from"./slider-CmE_z1Ii.js";var k=E(`Paperclip`,[[`path`,{d:`m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48`,key:`1u3ebp`}]]),A=E(`RotateCcw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),j=E(`SendHorizontal`,[[`path`,{d:`M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z`,key:`117uat`}],[`path`,{d:`M6 12h16`,key:`s4cdu5`}]]),M=E(`Volume1`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}]]),N=t(r(),1);function ie(e,t){let n;try{n=e()}catch{return}return{getItem:e=>{let r=e=>e===null?null:JSON.parse(e,t?.reviver),i=n.getItem(e)??null;return i instanceof Promise?i.then(r):r(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,t?.replacer)),removeItem:e=>n.removeItem(e)}}var ae=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(e){return ae(e)(n)},catch(e){return this}}}catch(e){return{then(e){return this},catch(t){return ae(t)(e)}}}},oe=(e,t)=>(n,r,i)=>{let a={storage:ie(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,s=0,c=new Set,l=new Set,u=a.storage;if(!u)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,i);let d=()=>{let e=a.partialize({...r()});return u.setItem(a.name,{state:e,version:a.version})},f=i.setState;i.setState=(e,t)=>(f(e,t),d());let p=e((...e)=>(n(...e),d()),r,i);i.getInitialState=()=>p;let m,h=()=>{if(!u)return;let e=++s;o=!1,c.forEach(e=>e(r()??p));let t=a.onRehydrateStorage?.call(a,r()??p)||void 0;return ae(u.getItem.bind(u))(a.name).then(e=>{if(e)if(typeof e.version==`number`&&e.version!==a.version){if(a.migrate){let t=a.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error(`State loaded from storage couldn't be migrated since no migrate function was provided`)}else return[!1,e.state];return[!1,void 0]}).then(t=>{if(e!==s)return;let[i,o]=t;if(m=a.merge(o,r()??p),n(m,!0),i)return d()}).then(()=>{e===s&&(t?.(r(),void 0),m=r(),o=!0,l.forEach(e=>e(m)))}).catch(n=>{e===s&&t?.(void 0,n)})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{u?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},a.skipHydration||h(),m||p},se=40,P=C()(oe(e=>({messages:[],isLoading:!1,currentSteps:[],streamingMessageId:null,connectionWarning:null,addMessage:t=>e(e=>({messages:[...e.messages,t]})),addMessages:t=>e(e=>({messages:[...e.messages,...t]})),updateMessage:(t,n)=>e(e=>({messages:e.messages.map(e=>e.id===t?{...e,...n}:e)})),setMessages:t=>e({messages:t}),clearMessages:()=>e({messages:[],currentSteps:[],streamingMessageId:null}),setLoading:t=>e({isLoading:t}),addStep:t=>e(e=>({currentSteps:[...e.currentSteps.slice(-4),t]})),clearSteps:()=>e({currentSteps:[]}),setStreamingMessageId:t=>e({streamingMessageId:t}),setConnectionWarning:t=>e({connectionWarning:t})}),{name:`hive-chat-storage`,partialize:e=>({messages:e.messages.slice(-se)})}));function ce(e,t){let n=P(e=>e.addMessage),r=P(e=>e.updateMessage),i=P(e=>e.setLoading);P(e=>e.addStep);let a=P(e=>e.clearSteps),o=P(e=>e.setStreamingMessageId),s=(0,N.useRef)(null),c=(0,N.useCallback)((n,r)=>{let i=P.getState(),a=i.messages.find(e=>e.id===n);if(a)return a;let o={id:n,conversationId:t,type:`agent`,content:``,agentId:e,timestamp:r||new Date().toISOString()};return i.addMessage(o),o},[e,t]),l=(0,N.useCallback)((e,t,n=`thinking`,r,i)=>{let a=P.getState(),o=a.messages.find(t=>t.id===e)||c(e,i),s=o.process||{status:`thinking`,items:[]},l=t?(()=>{let e=s.items[s.items.length-1];return e?.kind===t.kind&&e.label===t.label&&e.detail===t.detail?s.items:[...s.items,t].slice(-12)})():s.items;a.updateMessage(e,{process:{...s,status:n,items:l,summary:r??s.summary},timestamp:i||o.timestamp})},[c]);return{handleStreamingChunk:(0,N.useCallback)(c=>{c.content?.startsWith(`🎙️ Transcripción:`)&&i(!0);let l=s.current||c.id||S(),{messages:u}=P.getState(),d=u.find(e=>e.id===l);c.isChunk&&d?(s.current=l,o(l),r(l,{content:(d.content||``)+c.content,timestamp:c.timestamp||d.timestamp})):c.isChunk&&!d?(s.current=l,o(l),n({id:l,conversationId:t,type:`agent`,content:c.content||``,agentId:e,timestamp:c.timestamp||new Date().toISOString()})):d?r(l,{content:c.content||d.content,timestamp:c.timestamp||d.timestamp,...c.audio&&{audio:{base64:c.audio,mimeType:c.mimeType}}}):n({id:l,conversationId:t,type:`agent`,content:c.content||c.message||``,agentId:e,timestamp:c.timestamp||new Date().toISOString(),...c.audio&&{audio:{base64:c.audio,mimeType:c.mimeType}}}),c.isChunk||(s.current=null,o(null),a(),i(!1))},[e,t,n,r,i,a,o]),handleReasoningChunk:(0,N.useCallback)(e=>{if(!e.content)return;let t=s.current||e.id||S(),n=c(t,e.timestamp);s.current=t,o(t),r(t,{reasoning:(n.reasoning||``)+e.content})},[c,r,o]),handleAudioMessage:(0,N.useCallback)(r=>{n({id:r.id||S(),conversationId:t,type:`agent`,content:r.content||``,agentId:e,timestamp:r.timestamp||new Date().toISOString(),audio:r.audio?{base64:r.audio,mimeType:r.mimeType||`audio/wav`}:void 0}),a(),i(!1)},[e,t,n,a,i]),handleProgress:(0,N.useCallback)(n=>{if(n.content){let r=s.current,i=P.getState();r||(r=S(),s.current=r,i.setStreamingMessageId(r),i.addMessage({id:r,conversationId:t,type:`agent`,content:``,agentId:e,timestamp:n.timestamp||new Date().toISOString()})),l(r,{id:n.id||S(),kind:`observation`,label:n.content,timestamp:n.timestamp||new Date().toISOString()}),i.addStep(n.content),i.setLoading(!0)}},[e,t,l]),handleProcess:(0,N.useCallback)(e=>{let t=e.messageId||e.id||s.current||S(),n=e.processStatus||e.status||`thinking`,r=e.processKind||e.kind||`analysis`,c=e.timestamp||new Date().toISOString();n===`thinking`&&(s.current=t,o(t),i(!0));let u=e.label||e.content;l(t,u?{id:e.itemId||S(),kind:r,label:u,detail:e.detail,timestamp:c}:null,n,e.summary,c),(n===`done`||n===`error`)&&(s.current=null,o(null),a(),i(!1))},[a,i,o,l]),handleTyping:(0,N.useCallback)(e=>{e.isTyping===!0?P.getState().setLoading(!0):e.isTyping===!1&&(s.current=null,P.getState().setStreamingMessageId(null),P.getState().clearSteps(),P.getState().setLoading(!1))},[]),resetStreamingRef:(0,N.useCallback)(()=>{s.current=null,o(null)},[o])}}var le=`hive-narration-prefs`;function ue(){try{let e=localStorage.getItem(le);if(e)return JSON.parse(e)}catch{}return{enabled:!1,rate:1,pitch:1,voiceName:null}}function de(e){try{localStorage.setItem(le,JSON.stringify(e))}catch{}}function fe(){let[e,t]=(0,N.useState)(ue),[n,r]=(0,N.useState)(!1),[i,a]=(0,N.useState)(null),o=(0,N.useRef)(null),s=(0,N.useCallback)(e=>e&&window.speechSynthesis.getVoices().find(t=>t.name===e)||null,[]),c=(0,N.useCallback)(t=>{if(!e.enabled||!window.speechSynthesis)return;window.speechSynthesis.cancel();let n=t.replace(/```[\s\S]*?```/g,``).replace(/`[^`]+`/g,``).replace(/[#*_~\[\]()]/g,``).replace(/\n{2,}/g,`. `).replace(/\n/g,` `).trim();if(!n)return;let i=new SpeechSynthesisUtterance(n);i.rate=e.rate,i.pitch=e.pitch;let c=s(e.voiceName);c&&(i.voice=c),i.onstart=()=>{r(!0),a(n.slice(0,50))},i.onend=()=>{r(!1),a(null),o.current=null},i.onerror=()=>{r(!1),a(null),o.current=null},o.current=i,window.speechSynthesis.speak(i)},[e,s]),l=(0,N.useCallback)(()=>{window.speechSynthesis.cancel(),r(!1),a(null),o.current=null},[]),u=(0,N.useCallback)(()=>{t(e=>{let t={...e,enabled:!e.enabled};return de(t),t.enabled||(window.speechSynthesis.cancel(),r(!1),a(null)),t})},[]),d=(0,N.useCallback)(e=>{t(t=>{let n={...t,...e};return de(n),n})},[]);return(0,N.useEffect)(()=>{typeof window<`u`&&window.speechSynthesis&&window.speechSynthesis.getVoices()},[]),(0,N.useEffect)(()=>()=>{window.speechSynthesis?.cancel()},[]),{isEnabled:e.enabled,isSpeaking:n,currentText:i,rate:e.rate,pitch:e.pitch,narrate:c,stop:l,toggle:u,updatePrefs:d}}function pe(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var me=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,he=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ge={};function _e(e,t){return((t||ge).jsx?he:me).test(e)}var ve=/[ \t\n\f\r]/g;function ye(e){return typeof e==`object`?e.type===`text`?be(e.value):!1:be(e)}function be(e){return e.replace(ve,``)===``}var xe=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};xe.prototype.normal={},xe.prototype.property={},xe.prototype.space=void 0;function Se(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new xe(n,r,t)}function Ce(e){return e.toLowerCase()}var F=class{constructor(e,t){this.attribute=t,this.property=e}};F.prototype.attribute=``,F.prototype.booleanish=!1,F.prototype.boolean=!1,F.prototype.commaOrSpaceSeparated=!1,F.prototype.commaSeparated=!1,F.prototype.defined=!1,F.prototype.mustUseProperty=!1,F.prototype.number=!1,F.prototype.overloadedBoolean=!1,F.prototype.property=``,F.prototype.spaceSeparated=!1,F.prototype.space=void 0;var we=e({boolean:()=>I,booleanish:()=>L,commaOrSpaceSeparated:()=>B,commaSeparated:()=>De,number:()=>R,overloadedBoolean:()=>Ee,spaceSeparated:()=>z}),Te=0,I=Oe(),L=Oe(),Ee=Oe(),R=Oe(),z=Oe(),De=Oe(),B=Oe();function Oe(){return 2**++Te}var ke=Object.keys(we),Ae=class extends F{constructor(e,t,n,r){let i=-1;if(super(e,t),je(this,`space`,r),typeof n==`number`)for(;++i<ke.length;){let e=ke[i];je(this,ke[i],(n&we[e])===we[e])}}};Ae.prototype.defined=!0;function je(e,t,n){n&&(e[t]=n)}function Me(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Ae(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Ce(r)]=r,n[Ce(a.attribute)]=r}return new xe(t,n,e.space)}var Ne=Me({properties:{ariaActiveDescendant:null,ariaAtomic:L,ariaAutoComplete:null,ariaBusy:L,ariaChecked:L,ariaColCount:R,ariaColIndex:R,ariaColSpan:R,ariaControls:z,ariaCurrent:null,ariaDescribedBy:z,ariaDetails:null,ariaDisabled:L,ariaDropEffect:z,ariaErrorMessage:null,ariaExpanded:L,ariaFlowTo:z,ariaGrabbed:L,ariaHasPopup:null,ariaHidden:L,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:z,ariaLevel:R,ariaLive:null,ariaModal:L,ariaMultiLine:L,ariaMultiSelectable:L,ariaOrientation:null,ariaOwns:z,ariaPlaceholder:null,ariaPosInSet:R,ariaPressed:L,ariaReadOnly:L,ariaRelevant:null,ariaRequired:L,ariaRoleDescription:z,ariaRowCount:R,ariaRowIndex:R,ariaRowSpan:R,ariaSelected:L,ariaSetSize:R,ariaSort:null,ariaValueMax:R,ariaValueMin:R,ariaValueNow:R,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Pe(e,t){return t in e?e[t]:t}function Fe(e,t){return Pe(e,t.toLowerCase())}var Ie=Me({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:De,acceptCharset:z,accessKey:z,action:null,allow:null,allowFullScreen:I,allowPaymentRequest:I,allowUserMedia:I,alt:null,as:null,async:I,autoCapitalize:null,autoComplete:z,autoFocus:I,autoPlay:I,blocking:z,capture:null,charSet:null,checked:I,cite:null,className:z,cols:R,colSpan:null,content:null,contentEditable:L,controls:I,controlsList:z,coords:R|De,crossOrigin:null,data:null,dateTime:null,decoding:null,default:I,defer:I,dir:null,dirName:null,disabled:I,download:Ee,draggable:L,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:I,formTarget:null,headers:z,height:R,hidden:Ee,high:R,href:null,hrefLang:null,htmlFor:z,httpEquiv:z,id:null,imageSizes:null,imageSrcSet:null,inert:I,inputMode:null,integrity:null,is:null,isMap:I,itemId:null,itemProp:z,itemRef:z,itemScope:I,itemType:z,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:I,low:R,manifest:null,max:null,maxLength:R,media:null,method:null,min:null,minLength:R,multiple:I,muted:I,name:null,nonce:null,noModule:I,noValidate:I,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:I,optimum:R,pattern:null,ping:z,placeholder:null,playsInline:I,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:I,referrerPolicy:null,rel:z,required:I,reversed:I,rows:R,rowSpan:R,sandbox:z,scope:null,scoped:I,seamless:I,selected:I,shadowRootClonable:I,shadowRootDelegatesFocus:I,shadowRootMode:null,shape:null,size:R,sizes:null,slot:null,span:R,spellCheck:L,src:null,srcDoc:null,srcLang:null,srcSet:null,start:R,step:null,style:null,tabIndex:R,target:null,title:null,translate:null,type:null,typeMustMatch:I,useMap:null,value:L,width:R,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:z,axis:null,background:null,bgColor:null,border:R,borderColor:null,bottomMargin:R,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:I,declare:I,event:null,face:null,frame:null,frameBorder:null,hSpace:R,leftMargin:R,link:null,longDesc:null,lowSrc:null,marginHeight:R,marginWidth:R,noResize:I,noHref:I,noShade:I,noWrap:I,object:null,profile:null,prompt:null,rev:null,rightMargin:R,rules:null,scheme:null,scrolling:L,standby:null,summary:null,text:null,topMargin:R,valueType:null,version:null,vAlign:null,vLink:null,vSpace:R,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:I,disableRemotePlayback:I,prefix:null,property:null,results:R,security:null,unselectable:null},space:`html`,transform:Fe}),Le=Me({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:B,accentHeight:R,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:R,amplitude:R,arabicForm:null,ascent:R,attributeName:null,attributeType:null,azimuth:R,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:R,by:null,calcMode:null,capHeight:R,className:z,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:R,diffuseConstant:R,direction:null,display:null,dur:null,divisor:R,dominantBaseline:null,download:I,dx:null,dy:null,edgeMode:null,editable:null,elevation:R,enableBackground:null,end:null,event:null,exponent:R,externalResourcesRequired:null,fill:null,fillOpacity:R,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:De,g2:De,glyphName:De,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:R,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:R,horizOriginX:R,horizOriginY:R,id:null,ideographic:R,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:R,k:R,k1:R,k2:R,k3:R,k4:R,kernelMatrix:B,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:R,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:R,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:R,overlineThickness:R,paintOrder:null,panose1:null,path:null,pathLength:R,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:z,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:R,pointsAtY:R,pointsAtZ:R,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:B,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:B,rev:B,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:B,requiredFeatures:B,requiredFonts:B,requiredFormats:B,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:R,specularExponent:R,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:R,strikethroughThickness:R,string:null,stroke:null,strokeDashArray:B,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:R,strokeOpacity:R,strokeWidth:null,style:null,surfaceScale:R,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:B,tabIndex:R,tableValues:null,target:null,targetX:R,targetY:R,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:B,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:R,underlineThickness:R,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:R,values:null,vAlphabetic:R,vMathematical:R,vectorEffect:null,vHanging:R,vIdeographic:R,version:null,vertAdvY:R,vertOriginX:R,vertOriginY:R,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:R,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Pe}),Re=Me({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),ze=Me({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Fe}),Be=Me({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Ve={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},He=/[A-Z]/g,Ue=/-[a-z]/g,We=/^data[-\w.:]+$/i;function Ge(e,t){let n=Ce(t),r=t,i=F;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&We.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Ue,qe);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Ue.test(e)){let n=e.replace(He,Ke);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Ae}return new i(r,t)}function Ke(e){return`-`+e.toLowerCase()}function qe(e){return e.charAt(1).toUpperCase()}var Je=Se([Ne,Ie,Re,ze,Be],`html`),Ye=Se([Ne,Le,Re,ze,Be],`svg`);function Xe(e){return e.join(` `).trim()}var Ze=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
1
+ import{n as e,r as t,t as n}from"./rolldown-runtime-S-ySWqyJ.js";import{f as r}from"./vendor-charts-K3xcRl0X.js";import{o as i}from"./vendor-query-Dj8xYhQD.js";import{t as a}from"./chevron-down-QCtMs-Af.js";import{t as o}from"./chevron-right-D0GjXbnO.js";import{t as s}from"./circle-alert-DTVW4R94.js";import{t as c}from"./circle-check-BAolxswA.js";import{t as l}from"./file-text-lwkvYGtA.js";import{t as u}from"./gauge-CB-cas-h.js";import{t as d}from"./loader-circle-Dtfz4FWw.js";import{n as f,t as p}from"./square-OHeetvN3.js";import{t as m}from"./pause-DjT1nwQM.js";import{t as h}from"./play-tOrP0xUJ.js";import{t as g}from"./refresh-cw-BRrzoHQW.js";import{t as _}from"./sparkles-VXHGDbNh.js";import{t as v}from"./triangle-alert-Dj8ZhmWj.js";import{n as y,t as b}from"./volume-x-Bm735CXN.js";import{t as x}from"./zap-BEZNJ0i0.js";import{n as S}from"./utils-Dyb7SC2_.js";import{r as C}from"./gateway-url-BlnabM5e.js";import{D as w,E as T,K as E,M as ee,W as D,d as te,f as ne,r as re}from"./index-ZjAc-KQS.js";import{t as O}from"./slider-CmE_z1Ii.js";var k=E(`Paperclip`,[[`path`,{d:`m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48`,key:`1u3ebp`}]]),A=E(`RotateCcw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),j=E(`SendHorizontal`,[[`path`,{d:`M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z`,key:`117uat`}],[`path`,{d:`M6 12h16`,key:`s4cdu5`}]]),M=E(`Volume1`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}]]),N=t(r(),1);function ie(e,t){let n;try{n=e()}catch{return}return{getItem:e=>{let r=e=>e===null?null:JSON.parse(e,t?.reviver),i=n.getItem(e)??null;return i instanceof Promise?i.then(r):r(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,t?.replacer)),removeItem:e=>n.removeItem(e)}}var ae=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(e){return ae(e)(n)},catch(e){return this}}}catch(e){return{then(e){return this},catch(t){return ae(t)(e)}}}},oe=(e,t)=>(n,r,i)=>{let a={storage:ie(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,s=0,c=new Set,l=new Set,u=a.storage;if(!u)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,i);let d=()=>{let e=a.partialize({...r()});return u.setItem(a.name,{state:e,version:a.version})},f=i.setState;i.setState=(e,t)=>(f(e,t),d());let p=e((...e)=>(n(...e),d()),r,i);i.getInitialState=()=>p;let m,h=()=>{if(!u)return;let e=++s;o=!1,c.forEach(e=>e(r()??p));let t=a.onRehydrateStorage?.call(a,r()??p)||void 0;return ae(u.getItem.bind(u))(a.name).then(e=>{if(e)if(typeof e.version==`number`&&e.version!==a.version){if(a.migrate){let t=a.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error(`State loaded from storage couldn't be migrated since no migrate function was provided`)}else return[!1,e.state];return[!1,void 0]}).then(t=>{if(e!==s)return;let[i,o]=t;if(m=a.merge(o,r()??p),n(m,!0),i)return d()}).then(()=>{e===s&&(t?.(r(),void 0),m=r(),o=!0,l.forEach(e=>e(m)))}).catch(n=>{e===s&&t?.(void 0,n)})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{u?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},a.skipHydration||h(),m||p},se=40,P=C()(oe(e=>({messages:[],isLoading:!1,currentSteps:[],streamingMessageId:null,connectionWarning:null,addMessage:t=>e(e=>({messages:[...e.messages,t]})),addMessages:t=>e(e=>({messages:[...e.messages,...t]})),updateMessage:(t,n)=>e(e=>({messages:e.messages.map(e=>e.id===t?{...e,...n}:e)})),setMessages:t=>e({messages:t}),clearMessages:()=>e({messages:[],currentSteps:[],streamingMessageId:null}),setLoading:t=>e({isLoading:t}),addStep:t=>e(e=>({currentSteps:[...e.currentSteps.slice(-4),t]})),clearSteps:()=>e({currentSteps:[]}),setStreamingMessageId:t=>e({streamingMessageId:t}),setConnectionWarning:t=>e({connectionWarning:t})}),{name:`hive-chat-storage`,partialize:e=>({messages:e.messages.slice(-se)})}));function ce(e,t){let n=P(e=>e.addMessage),r=P(e=>e.updateMessage),i=P(e=>e.setLoading);P(e=>e.addStep);let a=P(e=>e.clearSteps),o=P(e=>e.setStreamingMessageId),s=(0,N.useRef)(null),c=(0,N.useCallback)((n,r)=>{let i=P.getState(),a=i.messages.find(e=>e.id===n);if(a)return a;let o={id:n,conversationId:t,type:`agent`,content:``,agentId:e,timestamp:r||new Date().toISOString()};return i.addMessage(o),o},[e,t]),l=(0,N.useCallback)((e,t,n=`thinking`,r,i)=>{let a=P.getState(),o=a.messages.find(t=>t.id===e)||c(e,i),s=o.process||{status:`thinking`,items:[]},l=t?(()=>{let e=s.items[s.items.length-1];return e?.kind===t.kind&&e.label===t.label&&e.detail===t.detail?s.items:[...s.items,t].slice(-12)})():s.items;a.updateMessage(e,{process:{...s,status:n,items:l,summary:r??s.summary},timestamp:i||o.timestamp})},[c]);return{handleStreamingChunk:(0,N.useCallback)(c=>{c.content?.startsWith(`🎙️ Transcripción:`)&&i(!0);let l=s.current||c.id||S(),{messages:u}=P.getState(),d=u.find(e=>e.id===l);c.isChunk&&d?(s.current=l,o(l),r(l,{content:(d.content||``)+c.content,timestamp:c.timestamp||d.timestamp})):c.isChunk&&!d?(s.current=l,o(l),n({id:l,conversationId:t,type:`agent`,content:c.content||``,agentId:e,timestamp:c.timestamp||new Date().toISOString()})):d?r(l,{content:c.content||d.content,timestamp:c.timestamp||d.timestamp,...c.audio&&{audio:{base64:c.audio,mimeType:c.mimeType}}}):n({id:l,conversationId:t,type:`agent`,content:c.content||c.message||``,agentId:e,timestamp:c.timestamp||new Date().toISOString(),...c.audio&&{audio:{base64:c.audio,mimeType:c.mimeType}}}),c.isChunk||(s.current=null,o(null),a(),i(!1))},[e,t,n,r,i,a,o]),handleReasoningChunk:(0,N.useCallback)(e=>{if(!e.content)return;let t=s.current||e.id||S(),n=c(t,e.timestamp);s.current=t,o(t),r(t,{reasoning:(n.reasoning||``)+e.content})},[c,r,o]),handleAudioMessage:(0,N.useCallback)(r=>{n({id:r.id||S(),conversationId:t,type:`agent`,content:r.content||``,agentId:e,timestamp:r.timestamp||new Date().toISOString(),audio:r.audio?{base64:r.audio,mimeType:r.mimeType||`audio/wav`}:void 0}),a(),i(!1)},[e,t,n,a,i]),handleProgress:(0,N.useCallback)(n=>{if(n.content){let r=s.current,i=P.getState();r||(r=S(),s.current=r,i.setStreamingMessageId(r),i.addMessage({id:r,conversationId:t,type:`agent`,content:``,agentId:e,timestamp:n.timestamp||new Date().toISOString()})),l(r,{id:n.id||S(),kind:`observation`,label:n.content,timestamp:n.timestamp||new Date().toISOString()}),i.addStep(n.content),i.setLoading(!0)}},[e,t,l]),handleProcess:(0,N.useCallback)(e=>{let t=e.messageId||e.id||s.current||S(),n=e.processStatus||e.status||`thinking`,r=e.processKind||e.kind||`analysis`,c=e.timestamp||new Date().toISOString();n===`thinking`&&(s.current=t,o(t),i(!0));let u=e.label||e.content;l(t,u?{id:e.itemId||S(),kind:r,label:u,detail:e.detail,timestamp:c}:null,n,e.summary,c),(n===`done`||n===`error`)&&(s.current=null,o(null),a(),i(!1))},[a,i,o,l]),handleTyping:(0,N.useCallback)(e=>{e.isTyping===!0?P.getState().setLoading(!0):e.isTyping===!1&&(s.current=null,P.getState().setStreamingMessageId(null),P.getState().clearSteps(),P.getState().setLoading(!1))},[]),resetStreamingRef:(0,N.useCallback)(()=>{s.current=null,o(null)},[o])}}var le=`hive-narration-prefs`;function ue(){try{let e=localStorage.getItem(le);if(e)return JSON.parse(e)}catch{}return{enabled:!1,rate:1,pitch:1,voiceName:null}}function de(e){try{localStorage.setItem(le,JSON.stringify(e))}catch{}}function fe(){let[e,t]=(0,N.useState)(ue),[n,r]=(0,N.useState)(!1),[i,a]=(0,N.useState)(null),o=(0,N.useRef)(null),s=(0,N.useCallback)(e=>e&&window.speechSynthesis.getVoices().find(t=>t.name===e)||null,[]),c=(0,N.useCallback)(t=>{if(!e.enabled||!window.speechSynthesis)return;window.speechSynthesis.cancel();let n=t.replace(/```[\s\S]*?```/g,``).replace(/`[^`]+`/g,``).replace(/[#*_~\[\]()]/g,``).replace(/\n{2,}/g,`. `).replace(/\n/g,` `).trim();if(!n)return;let i=new SpeechSynthesisUtterance(n);i.rate=e.rate,i.pitch=e.pitch;let c=s(e.voiceName);c&&(i.voice=c),i.onstart=()=>{r(!0),a(n.slice(0,50))},i.onend=()=>{r(!1),a(null),o.current=null},i.onerror=()=>{r(!1),a(null),o.current=null},o.current=i,window.speechSynthesis.speak(i)},[e,s]),l=(0,N.useCallback)(()=>{window.speechSynthesis.cancel(),r(!1),a(null),o.current=null},[]),u=(0,N.useCallback)(()=>{t(e=>{let t={...e,enabled:!e.enabled};return de(t),t.enabled||(window.speechSynthesis.cancel(),r(!1),a(null)),t})},[]),d=(0,N.useCallback)(e=>{t(t=>{let n={...t,...e};return de(n),n})},[]);return(0,N.useEffect)(()=>{typeof window<`u`&&window.speechSynthesis&&window.speechSynthesis.getVoices()},[]),(0,N.useEffect)(()=>()=>{window.speechSynthesis?.cancel()},[]),{isEnabled:e.enabled,isSpeaking:n,currentText:i,rate:e.rate,pitch:e.pitch,narrate:c,stop:l,toggle:u,updatePrefs:d}}function pe(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var me=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,he=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ge={};function _e(e,t){return((t||ge).jsx?he:me).test(e)}var ve=/[ \t\n\f\r]/g;function ye(e){return typeof e==`object`?e.type===`text`?be(e.value):!1:be(e)}function be(e){return e.replace(ve,``)===``}var xe=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};xe.prototype.normal={},xe.prototype.property={},xe.prototype.space=void 0;function Se(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new xe(n,r,t)}function Ce(e){return e.toLowerCase()}var F=class{constructor(e,t){this.attribute=t,this.property=e}};F.prototype.attribute=``,F.prototype.booleanish=!1,F.prototype.boolean=!1,F.prototype.commaOrSpaceSeparated=!1,F.prototype.commaSeparated=!1,F.prototype.defined=!1,F.prototype.mustUseProperty=!1,F.prototype.number=!1,F.prototype.overloadedBoolean=!1,F.prototype.property=``,F.prototype.spaceSeparated=!1,F.prototype.space=void 0;var we=e({boolean:()=>I,booleanish:()=>L,commaOrSpaceSeparated:()=>B,commaSeparated:()=>De,number:()=>R,overloadedBoolean:()=>Ee,spaceSeparated:()=>z}),Te=0,I=Oe(),L=Oe(),Ee=Oe(),R=Oe(),z=Oe(),De=Oe(),B=Oe();function Oe(){return 2**++Te}var ke=Object.keys(we),Ae=class extends F{constructor(e,t,n,r){let i=-1;if(super(e,t),je(this,`space`,r),typeof n==`number`)for(;++i<ke.length;){let e=ke[i];je(this,ke[i],(n&we[e])===we[e])}}};Ae.prototype.defined=!0;function je(e,t,n){n&&(e[t]=n)}function Me(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Ae(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Ce(r)]=r,n[Ce(a.attribute)]=r}return new xe(t,n,e.space)}var Ne=Me({properties:{ariaActiveDescendant:null,ariaAtomic:L,ariaAutoComplete:null,ariaBusy:L,ariaChecked:L,ariaColCount:R,ariaColIndex:R,ariaColSpan:R,ariaControls:z,ariaCurrent:null,ariaDescribedBy:z,ariaDetails:null,ariaDisabled:L,ariaDropEffect:z,ariaErrorMessage:null,ariaExpanded:L,ariaFlowTo:z,ariaGrabbed:L,ariaHasPopup:null,ariaHidden:L,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:z,ariaLevel:R,ariaLive:null,ariaModal:L,ariaMultiLine:L,ariaMultiSelectable:L,ariaOrientation:null,ariaOwns:z,ariaPlaceholder:null,ariaPosInSet:R,ariaPressed:L,ariaReadOnly:L,ariaRelevant:null,ariaRequired:L,ariaRoleDescription:z,ariaRowCount:R,ariaRowIndex:R,ariaRowSpan:R,ariaSelected:L,ariaSetSize:R,ariaSort:null,ariaValueMax:R,ariaValueMin:R,ariaValueNow:R,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Pe(e,t){return t in e?e[t]:t}function Fe(e,t){return Pe(e,t.toLowerCase())}var Ie=Me({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:De,acceptCharset:z,accessKey:z,action:null,allow:null,allowFullScreen:I,allowPaymentRequest:I,allowUserMedia:I,alt:null,as:null,async:I,autoCapitalize:null,autoComplete:z,autoFocus:I,autoPlay:I,blocking:z,capture:null,charSet:null,checked:I,cite:null,className:z,cols:R,colSpan:null,content:null,contentEditable:L,controls:I,controlsList:z,coords:R|De,crossOrigin:null,data:null,dateTime:null,decoding:null,default:I,defer:I,dir:null,dirName:null,disabled:I,download:Ee,draggable:L,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:I,formTarget:null,headers:z,height:R,hidden:Ee,high:R,href:null,hrefLang:null,htmlFor:z,httpEquiv:z,id:null,imageSizes:null,imageSrcSet:null,inert:I,inputMode:null,integrity:null,is:null,isMap:I,itemId:null,itemProp:z,itemRef:z,itemScope:I,itemType:z,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:I,low:R,manifest:null,max:null,maxLength:R,media:null,method:null,min:null,minLength:R,multiple:I,muted:I,name:null,nonce:null,noModule:I,noValidate:I,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:I,optimum:R,pattern:null,ping:z,placeholder:null,playsInline:I,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:I,referrerPolicy:null,rel:z,required:I,reversed:I,rows:R,rowSpan:R,sandbox:z,scope:null,scoped:I,seamless:I,selected:I,shadowRootClonable:I,shadowRootDelegatesFocus:I,shadowRootMode:null,shape:null,size:R,sizes:null,slot:null,span:R,spellCheck:L,src:null,srcDoc:null,srcLang:null,srcSet:null,start:R,step:null,style:null,tabIndex:R,target:null,title:null,translate:null,type:null,typeMustMatch:I,useMap:null,value:L,width:R,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:z,axis:null,background:null,bgColor:null,border:R,borderColor:null,bottomMargin:R,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:I,declare:I,event:null,face:null,frame:null,frameBorder:null,hSpace:R,leftMargin:R,link:null,longDesc:null,lowSrc:null,marginHeight:R,marginWidth:R,noResize:I,noHref:I,noShade:I,noWrap:I,object:null,profile:null,prompt:null,rev:null,rightMargin:R,rules:null,scheme:null,scrolling:L,standby:null,summary:null,text:null,topMargin:R,valueType:null,version:null,vAlign:null,vLink:null,vSpace:R,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:I,disableRemotePlayback:I,prefix:null,property:null,results:R,security:null,unselectable:null},space:`html`,transform:Fe}),Le=Me({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:B,accentHeight:R,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:R,amplitude:R,arabicForm:null,ascent:R,attributeName:null,attributeType:null,azimuth:R,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:R,by:null,calcMode:null,capHeight:R,className:z,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:R,diffuseConstant:R,direction:null,display:null,dur:null,divisor:R,dominantBaseline:null,download:I,dx:null,dy:null,edgeMode:null,editable:null,elevation:R,enableBackground:null,end:null,event:null,exponent:R,externalResourcesRequired:null,fill:null,fillOpacity:R,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:De,g2:De,glyphName:De,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:R,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:R,horizOriginX:R,horizOriginY:R,id:null,ideographic:R,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:R,k:R,k1:R,k2:R,k3:R,k4:R,kernelMatrix:B,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:R,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:R,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:R,overlineThickness:R,paintOrder:null,panose1:null,path:null,pathLength:R,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:z,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:R,pointsAtY:R,pointsAtZ:R,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:B,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:B,rev:B,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:B,requiredFeatures:B,requiredFonts:B,requiredFormats:B,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:R,specularExponent:R,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:R,strikethroughThickness:R,string:null,stroke:null,strokeDashArray:B,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:R,strokeOpacity:R,strokeWidth:null,style:null,surfaceScale:R,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:B,tabIndex:R,tableValues:null,target:null,targetX:R,targetY:R,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:B,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:R,underlineThickness:R,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:R,values:null,vAlphabetic:R,vMathematical:R,vectorEffect:null,vHanging:R,vIdeographic:R,version:null,vertAdvY:R,vertOriginX:R,vertOriginY:R,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:R,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Pe}),Re=Me({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),ze=Me({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Fe}),Be=Me({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Ve={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},He=/[A-Z]/g,Ue=/-[a-z]/g,We=/^data[-\w.:]+$/i;function Ge(e,t){let n=Ce(t),r=t,i=F;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&We.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Ue,qe);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Ue.test(e)){let n=e.replace(He,Ke);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Ae}return new i(r,t)}function Ke(e){return`-`+e.toLowerCase()}function qe(e){return e.charAt(1).toUpperCase()}var Je=Se([Ne,Ie,Re,ze,Be],`html`),Ye=Se([Ne,Le,Re,ze,Be],`svg`);function Xe(e){return e.join(` `).trim()}var Ze=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
2
2
  `,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function ee(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),ee()}function _(e){return e?e.replace(l,p):p}t.exports=g})),Qe=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(Ze());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),$e=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),et=n(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Qe()),r=$e();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),tt=rt(`end`),nt=rt(`start`);function rt(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function it(e){let t=nt(e),n=tt(e);if(t&&n)return{start:t,end:n}}function at(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?st(e.position):`start`in e||`end`in e?st(e):`line`in e||`column`in e?ot(e):``}function ot(e){return ct(e&&e.line)+`:`+ct(e&&e.column)}function st(e){return ot(e&&e.start)+`-`+ot(e&&e.end)}function ct(e){return e&&typeof e==`number`?e:1}var V=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=at(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};V.prototype.file=``,V.prototype.name=``,V.prototype.reason=``,V.prototype.message=``,V.prototype.stack=``,V.prototype.column=void 0,V.prototype.line=void 0,V.prototype.ancestors=void 0,V.prototype.cause=void 0,V.prototype.fatal=void 0,V.prototype.place=void 0,V.prototype.ruleId=void 0,V.prototype.source=void 0;var lt=t(et(),1),ut={}.hasOwnProperty,dt=new Map,ft=/[A-Z]/g,pt=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),mt=new Set([`td`,`th`]),ht=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function gt(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Dt(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Et(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Ye:Je,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=_t(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function _t(e,t,n){if(t.type===`element`)return vt(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return yt(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return xt(e,t,n);if(t.type===`mdxjsEsm`)return bt(e,t);if(t.type===`root`)return St(e,t,n);if(t.type===`text`)return Ct(e,t)}function vt(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Ye,e.schema=i),e.ancestors.push(t);let a=Nt(e,t.tagName,!1),o=Ot(e,t),s=At(e,t);return pt.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!ye(e):!0})),wt(e,o,a,t),Tt(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function yt(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Pt(e,t.position)}function bt(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Pt(e,t.position)}function xt(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Ye,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Nt(e,t.name,!0),o=kt(e,t),s=At(e,t);return wt(e,o,a,t),Tt(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function St(e,t,n){let r={};return Tt(r,At(e,t)),e.create(t,e.Fragment,r,n)}function Ct(e,t){return t.value}function wt(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Tt(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Et(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Dt(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=nt(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Ot(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&ut.call(t.properties,i)){let a=jt(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&mt.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function kt(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Pt(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Pt(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function At(e,t){let n=[],r=-1,i=e.passKeys?new Map:dt;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=_t(e,a,o);s!==void 0&&n.push(s)}return n}function jt(e,t,n){let r=Ge(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?pe(n):Xe(n)),r.property===`style`){let t=typeof n==`object`?n:Mt(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Ft(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Ve[r.property]||r.property:r.attribute,n]}}function Mt(e,t){try{return(0,lt.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new V("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=ht+`#cannot-parse-style-attribute`,r}}function Nt(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=_e(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=_e(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return ut.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Pt(e)}function Pt(e,t){let n=new V("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=ht+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Ft(e){let t={},n;for(n in e)ut.call(e,n)&&(t[It(n)]=e[n]);return t}function It(e){let t=e.replace(ft,Lt);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Lt(e){return`-`+e.toLowerCase()}var Rt={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},zt={};function Bt(e,t){let n=t||zt;return Vt(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function Vt(e,t,n){if(Ut(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return Ht(e.children,t,n)}return Array.isArray(e)?Ht(e,t,n):``}function Ht(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Vt(e[i],t,n);return r.join(``)}function Ut(e){return!!(e&&typeof e==`object`)}var Wt=document.createElement(`i`);function Gt(e){let t=`&`+e+`;`;Wt.innerHTML=t;let n=Wt.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function H(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function U(e,t){return e.length>0?(H(e,e.length,0,t),e):t}var Kt={}.hasOwnProperty;function qt(e){let t={},n=-1;for(;++n<e.length;)Jt(t,e[n]);return t}function Jt(e,t){let n;for(n in t){let r=(Kt.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Kt.call(r,a)||(r[a]=[]);let e=i[a];Yt(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Yt(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);H(e,0,0,r)}function Xt(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function W(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var G=an(/[A-Za-z]/),K=an(/[\dA-Za-z]/),Zt=an(/[#-'*+\--9=?A-Z^-~]/);function Qt(e){return e!==null&&(e<32||e===127)}var $t=an(/\d/),en=an(/[\dA-Fa-f]/),tn=an(/[!-/:-@[-`{-~]/);function q(e){return e!==null&&e<-2}function J(e){return e!==null&&(e<0||e===32)}function Y(e){return e===-2||e===-1||e===32}var nn=an(/\p{P}|\p{S}/u),rn=an(/\s/);function an(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function on(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&K(e.charCodeAt(n+1))&&K(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function X(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Y(r)?(e.enter(n),s(r)):t(r)}function s(r){return Y(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var sn={tokenize:cn};function cn(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),X(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return q(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var ln={tokenize:dn},un={tokenize:fn};function dn(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return H(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(un,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(un,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return q(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;H(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function fn(e,t,n){return X(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function pn(e){if(e===null||J(e)||rn(e))return 1;if(nn(e))return 2}function mn(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var hn={name:`attention`,resolveAll:gn,tokenize:_n};function gn(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};vn(d,-c),vn(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=U(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=U(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=U(l,mn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=U(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=U(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,H(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function _n(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=pn(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=pn(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function vn(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var yn={name:`autolink`,tokenize:bn};function bn(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return G(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||K(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||K(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Qt(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Zt(t)?(e.consume(t),l):n(t)}function u(e){return K(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||K(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var xn={partial:!0,tokenize:Sn};function Sn(e,t,n){return r;function r(t){return Y(t)?X(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||q(e)?t(e):n(e)}}var Cn={continuation:{tokenize:Tn},exit:En,name:`blockQuote`,tokenize:wn};function wn(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Y(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Tn(e,t,n){let r=this;return i;function i(t){return Y(t)?X(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Cn,t,n)(r)}}function En(e){e.exit(`blockQuote`)}var Dn={name:`characterEscape`,tokenize:On};function On(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return tn(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var kn={name:`characterReference`,tokenize:An};function An(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=K,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=en,u):(e.enter(`characterReferenceValue`),a=7,o=$t,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===K&&!Gt(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var jn={partial:!0,tokenize:Pn},Mn={concrete:!0,name:`codeFenced`,tokenize:Nn};function Nn(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Y(t)?X(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||q(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(jn,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Y(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),X(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||q(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Y(t)?X(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||q(t)?e.check(jn,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||q(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Y(t)?X(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Y(t)?X(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||q(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Pn(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Fn={name:`codeIndented`,tokenize:Ln},In={partial:!0,tokenize:Rn};function Ln(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),X(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):q(t)?e.attempt(In,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||q(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function Rn(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):X(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):q(e)?i(e):n(e)}}var zn={name:`codeText`,previous:Vn,resolve:Bn,tokenize:Hn};function Bn(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Vn(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Hn(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||q(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var Un=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Wn(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Wn(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Wn(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);Wn(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Wn(this.left,t.reverse())}}};function Wn(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Gn(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Un(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Kn(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return H(e,0,1/0,u.slice(0)),!l}function Kn(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var qn={resolve:Yn,tokenize:Xn},Jn={partial:!0,tokenize:Zn};function Yn(e){return Gn(e),e}function Xn(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):q(t)?e.check(Jn,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Zn(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),X(e,a,`linePrefix`)}function a(i){if(i===null||q(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Qn(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Qt(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||q(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||J(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Qt(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function $n(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):q(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||q(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Y(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function er(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),X(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||q(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function tr(e,t){let n;return r;function r(i){return q(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Y(i)?X(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var nr={name:`definition`,tokenize:ir},rr={partial:!0,tokenize:ar};function ir(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return $n.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=W(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return J(t)?tr(e,l)(t):l(t)}function l(t){return Qn(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(rr,d,d)(t)}function d(t){return Y(t)?X(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||q(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function ar(e,t,n){return r;function r(t){return J(t)?tr(e,i)(t):n(t)}function i(t){return er(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Y(t)?X(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||q(e)?t(e):n(e)}}var or={name:`hardBreakEscape`,tokenize:sr};function sr(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return q(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var cr={name:`headingAtx`,resolve:lr,tokenize:ur};function lr(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},H(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function ur(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||J(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||q(n)?(e.exit(`atxHeading`),t(n)):Y(n)?X(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||J(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var dr=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),fr=[`pre`,`script`,`style`,`textarea`],pr={concrete:!0,name:`htmlFlow`,resolveTo:gr,tokenize:_r},mr={partial:!0,tokenize:yr},hr={partial:!0,tokenize:vr};function gr(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function _r(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:M):G(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):G(a)?(e.consume(a),i=4,r.interrupt?t:M):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:M):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:D:m):n(i)}function h(t){return G(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||J(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&fr.includes(l)?(i=1,r.interrupt?t(s):D(s)):dr.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):D(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||K(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:D):n(i)}function v(t){return Y(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||G(t)?(e.consume(t),b):Y(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||K(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Y(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Y(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||q(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||J(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Y(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),ee):n(t)}function ee(t){return t===null||q(t)?D(t):Y(t)?(e.consume(t),ee):n(t)}function D(t){return t===45&&i===2?(e.consume(t),O):t===60&&i===1?(e.consume(t),k):t===62&&i===4?(e.consume(t),N):t===63&&i===3?(e.consume(t),M):t===93&&i===5?(e.consume(t),j):q(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(mr,ie,te)(t)):t===null||q(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),D)}function te(t){return e.check(hr,ne,ie)(t)}function ne(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),re}function re(t){return t===null||q(t)?te(t):(e.enter(`htmlFlowData`),D(t))}function O(t){return t===45?(e.consume(t),M):D(t)}function k(t){return t===47?(e.consume(t),o=``,A):D(t)}function A(t){if(t===62){let n=o.toLowerCase();return fr.includes(n)?(e.consume(t),N):D(t)}return G(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),A):D(t)}function j(t){return t===93?(e.consume(t),M):D(t)}function M(t){return t===62?(e.consume(t),N):t===45&&i===2?(e.consume(t),M):D(t)}function N(t){return t===null||q(t)?(e.exit(`htmlFlowData`),ie(t)):(e.consume(t),N)}function ie(n){return e.exit(`htmlFlow`),t(n)}}function vr(e,t,n){let r=this;return i;function i(t){return q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function yr(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(xn,t,n)}}var br={name:`htmlText`,tokenize:xr};function xr(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):G(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):G(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):q(t)?(o=d,k(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?O(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):q(t)?(o=h,k(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?O(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?O(t):q(t)?(o=v,k(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):q(t)?(o=y,k(t)):(e.consume(t),y)}function b(e){return e===62?O(e):y(e)}function x(t){return G(t)?(e.consume(t),S):n(t)}function S(t){return t===45||K(t)?(e.consume(t),S):C(t)}function C(t){return q(t)?(o=C,k(t)):Y(t)?(e.consume(t),C):O(t)}function w(t){return t===45||K(t)?(e.consume(t),w):t===47||t===62||J(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),O):t===58||t===95||G(t)?(e.consume(t),E):q(t)?(o=T,k(t)):Y(t)?(e.consume(t),T):O(t)}function E(t){return t===45||t===46||t===58||t===95||K(t)?(e.consume(t),E):ee(t)}function ee(t){return t===61?(e.consume(t),D):q(t)?(o=ee,k(t)):Y(t)?(e.consume(t),ee):T(t)}function D(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,te):q(t)?(o=D,k(t)):Y(t)?(e.consume(t),D):(e.consume(t),ne)}function te(t){return t===i?(e.consume(t),i=void 0,re):t===null?n(t):q(t)?(o=te,k(t)):(e.consume(t),te)}function ne(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||J(t)?T(t):(e.consume(t),ne)}function re(e){return e===47||e===62||J(e)?T(e):n(e)}function O(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function k(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),A}function A(t){return Y(t)?X(e,j,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):j(t)}function j(t){return e.enter(`htmlTextData`),o(t)}}var Sr={name:`labelEnd`,resolveAll:Er,resolveTo:Dr,tokenize:Or},Cr={tokenize:kr},wr={tokenize:Ar},Tr={tokenize:jr};function Er(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&H(e,0,e.length,n),e}function Dr(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=U(s,e.slice(a+1,a+r+3)),s=U(s,[[`enter`,u,t]]),s=U(s,mn(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=U(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=U(s,e.slice(o+1)),s=U(s,[[`exit`,c,t]]),H(e,a,e.length,s),e}function Or(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(W(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Cr,u,o?u:d)(t):t===91?e.attempt(wr,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Tr,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function kr(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return J(t)?tr(e,a)(t):a(t)}function a(t){return t===41?u(t):Qn(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return J(t)?tr(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?er(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return J(t)?tr(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Ar(e,t,n){let r=this;return i;function i(t){return $n.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(W(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function jr(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Mr={name:`labelStartImage`,resolveAll:Sr.resolveAll,tokenize:Nr};function Nr(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var Pr={name:`labelStartLink`,resolveAll:Sr.resolveAll,tokenize:Fr};function Fr(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var Ir={name:`lineEnding`,tokenize:Lr};function Lr(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),X(e,t,`linePrefix`)}}var Rr={name:`thematicBreak`,tokenize:zr};function zr(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||q(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Y(t)?X(e,s,`whitespace`)(t):s(t))}}var Z={continuation:{tokenize:Ur},exit:Gr,name:`list`,tokenize:Hr},Br={partial:!0,tokenize:Kr},Vr={partial:!0,tokenize:Wr};function Hr(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:$t(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Rr,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return $t(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(xn,r.interrupt?n:u,e.attempt(Br,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Y(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Ur(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(xn,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,X(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Y(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Vr,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,X(e,e.attempt(Z,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Wr(e,t,n){let r=this;return X(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Gr(e){e.exit(this.containerState.type)}function Kr(e,t,n){let r=this;return X(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Y(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var qr={name:`setextUnderline`,resolveTo:Jr,tokenize:Yr};function Jr(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function Yr(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Y(t)?X(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||q(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Xr={tokenize:Zr};function Zr(e){let t=this,n=e.attempt(xn,r,e.attempt(this.parser.constructs.flowInitial,i,X(e,e.attempt(this.parser.constructs.flow,i,e.attempt(qn,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Qr={resolveAll:ni()},$r=ti(`string`),ei=ti(`text`);function ti(e){return{resolveAll:ni(e===`text`?ri:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function ni(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function ri(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var ii=e({attentionMarkers:()=>fi,contentInitial:()=>oi,disable:()=>pi,document:()=>ai,flow:()=>ci,flowInitial:()=>si,insideSpan:()=>di,string:()=>li,text:()=>ui}),ai={42:Z,43:Z,45:Z,48:Z,49:Z,50:Z,51:Z,52:Z,53:Z,54:Z,55:Z,56:Z,57:Z,62:Cn},oi={91:nr},si={[-2]:Fn,[-1]:Fn,32:Fn},ci={35:cr,42:Rr,45:[qr,Rr],60:pr,61:qr,95:Rr,96:Mn,126:Mn},li={38:kn,92:Dn},ui={[-5]:Ir,[-4]:Ir,[-3]:Ir,33:Mr,38:kn,42:hn,60:[yn,br],91:Pr,92:[or,Dn],93:Sr,95:hn,96:zn},di={null:[hn,Qr]},fi={null:[42,95]},pi={null:[]};function mi(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=U(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=mn(a,l.events,l),l.events):[]}function f(e,t){return gi(p(e),t)}function p(e){return hi(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){q(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&H(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function hi(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function gi(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
3
3
  `;break;case-3:o=`\r
4
4
  `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function _i(e){let t={constructs:qt([ii,...(e||{}).extensions||[]]),content:n(sn),defined:[],document:n(ln),flow:n(Xr),lazy:{},string:n($r),text:n(ei)};return t;function n(e){return n;function n(n){return mi(t,e,n)}}}function vi(e){for(;!Gn(e););return e}var yi=/[\0\t\n\r]/g;function bi(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(yi.lastIndex=u,c=yi.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var xi=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Si(e){return e.replace(xi,Ci)}function Ci(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return Xt(n.slice(t?2:1),t?16:10)}return Gt(n)||e}var wi={}.hasOwnProperty;function Ti(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Ei(n)(vi(_i(n).document().write(bi()(e,t,!0))))}function Ei(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(be),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(ge),blockQuote:a(de),characterEscape:T,characterReference:T,codeFenced:a(fe),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(fe,o),codeText:a(pe,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(me),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(he),hardBreakEscape:a(_e),hardBreakTrailing:a(_e),htmlFlow:a(ve,o),htmlFlowData:T,htmlText:a(ve,o),htmlTextData:T,image:a(ye),label:o,link:a(be),listItem:a(Se),listItemValue:f,listOrdered:a(xe,d),listUnordered:a(xe),paragraph:a(Ce),reference:ae,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(ge),strong:a(F),thematicBreak:a(Te)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:ue,autolinkProtocol:le,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:se,characterReferenceMarkerNumeric:se,characterReferenceValue:P,characterReference:ce,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(re),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(D),hardBreakTrailing:c(D),htmlFlow:c(te),htmlFlowData:E,htmlText:c(ne),htmlTextData:E,image:c(k),label:j,labelText:A,lineEnding:ee,link:c(O),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:oe,resourceDestinationString:M,resourceTitleString:N,resource:ie,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};Oi(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];wi.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||Ai).call(a,void 0,e[0])}for(r.position={start:Di(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Di(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Di(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Ai).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+at({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Di(e.end)}function u(){return Bt(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=W(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=we(),n.position={start:Di(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Di(e.end)}function ee(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Di(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function D(){this.data.atHardBreak=!0}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function O(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function k(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function A(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Si(t),n.identifier=W(t).toLowerCase()}function j(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function M(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function N(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ie(){this.data.inReference=void 0}function ae(){this.data.referenceType=`collapsed`}function oe(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=W(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function se(e){this.data.characterReferenceType=e.type}function P(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=Xt(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Gt(t);let i=this.stack[this.stack.length-1];i.value+=r}function ce(e){let t=this.stack.pop();t.position.end=Di(e.end)}function le(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ue(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function de(){return{type:`blockquote`,children:[]}}function fe(){return{type:`code`,lang:null,meta:null,value:``}}function pe(){return{type:`inlineCode`,value:``}}function me(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function he(){return{type:`emphasis`,children:[]}}function ge(){return{type:`heading`,depth:0,children:[]}}function _e(){return{type:`break`}}function ve(){return{type:`html`,value:``}}function ye(){return{type:`image`,title:null,url:``,alt:null}}function be(){return{type:`link`,title:null,url:``,children:[]}}function xe(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function Se(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Ce(){return{type:`paragraph`,children:[]}}function F(){return{type:`strong`,children:[]}}function we(){return{type:`text`,value:``}}function Te(){return{type:`thematicBreak`}}}function Di(e){return{line:e.line,column:e.column,offset:e.offset}}function Oi(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Oi(e,r):ki(e,r)}}function ki(e,t){let n;for(n in t)if(wi.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Ai(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+at({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+at({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+at({start:t.start,end:t.end})+`) is still open`)}function ji(e){let t=this;t.parser=n;function n(n){return Ti(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Mi(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Ni(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
@@ -1 +1 @@
1
- import{K as e}from"./index-Bejlp-R1.js";var t=e(`Activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]);export{t};
1
+ import{K as e}from"./index-ZjAc-KQS.js";var t=e(`Activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]);export{t};
@@ -1 +1 @@
1
- import{o as e}from"./vendor-query-Dj8xYhQD.js";import{t}from"./utils-Dyb7SC2_.js";import{K as n}from"./index-Bejlp-R1.js";import{t as r}from"./badge-DKGZbVZJ.js";var i=n(`Network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),a=e(),o={active:{label:`Activo`,className:`bg-hive-connected/15 text-hive-connected border-hive-connected/30`},idle:{label:`Activo`,className:`bg-hive-connected/10 text-hive-connected/80 border-hive-connected/20`},hibernated:{label:`Hibernado`,className:`bg-secondary text-secondary-foreground border-border`},error:{label:`Error`,className:`bg-destructive/15 text-destructive border-destructive/30`},thinking:{label:`Pensando`,className:`bg-hive-thinking/15 text-hive-thinking border-hive-thinking/30 animate-pulse-slow`},archived:{label:`Archivado`,className:`bg-amber-500/15 text-amber-400 border-amber-500/30`}};function s({status:e,className:n}){if(!e||!o[e])return(0,a.jsxs)(r,{variant:`outline`,className:n,children:[(0,a.jsx)(`span`,{className:`mr-1.5 inline-block h-1.5 w-1.5 rounded-full bg-current`}),`Desconocido`]});let i=o[e];return(0,a.jsxs)(r,{variant:`outline`,className:t(i.className,n),children:[(0,a.jsx)(`span`,{className:`mr-1.5 inline-block h-1.5 w-1.5 rounded-full bg-current`}),i.label]})}function c(e){let t=Object.prototype.toString.call(e);return e instanceof Date||typeof e==`object`&&t===`[object Date]`?new e.constructor(+e):typeof e==`number`||t===`[object Number]`||typeof e==`string`||t===`[object String]`?new Date(e):new Date(NaN)}function l(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}var u=365.2425,d=6048e5,f=864e5,p=3600*24;p*7,p*u/12*3;var m={};function h(){return m}function g(e,t){let n=h(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=c(e),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function _(e){return g(e,{weekStartsOn:1})}function v(e){let t=c(e),n=t.getFullYear(),r=l(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);let i=_(r),a=l(e,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);let o=_(a);return t.getTime()>=i.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function y(e){let t=c(e);return t.setHours(0,0,0,0),t}function b(e){let t=c(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}function ee(e,t){let n=y(e),r=y(t),i=+n-b(n),a=+r-b(r);return Math.round((i-a)/f)}function x(e){let t=v(e),n=l(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),_(n)}function S(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function C(e){if(!S(e)&&typeof e!=`number`)return!1;let t=c(e);return!isNaN(Number(t))}function w(e){let t=c(e),n=l(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}var T={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},E=(e,t,n)=>{let r,i=T[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r};function D(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var O={date:D({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:D({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:D({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},k={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},A=(e,t,n,r)=>k[e];function j(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}var te={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},era:j({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:j({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:j({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:j({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:j({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})};function M(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?N(s,e=>e.test(o)):ne(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function ne(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function N(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function P(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}var F={code:`en-US`,formatDistance:E,formatLong:O,formatRelative:A,localize:te,match:{ordinalNumber:P({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:M({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:M({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:M({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:M({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:M({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function I(e){let t=c(e);return ee(t,w(t))+1}function L(e){let t=c(e),n=_(t)-+x(t);return Math.round(n/d)+1}function R(e,t){let n=c(e),r=n.getFullYear(),i=h(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=l(e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);let s=g(o,t),u=l(e,0);u.setFullYear(r,0,a),u.setHours(0,0,0,0);let d=g(u,t);return n.getTime()>=s.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function z(e,t){let n=h(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=R(e,t),a=l(e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),g(a,t)}function B(e,t){let n=c(e),r=g(n,t)-+z(n,t);return Math.round(r/d)+1}function V(e,t){return(e<0?`-`:``)+Math.abs(e).toString().padStart(t,`0`)}var H={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return V(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):V(n+1,2)},d(e,t){return V(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];default:return n===`am`?`a.m.`:`p.m.`}},h(e,t){return V(e.getHours()%12||12,t.length)},H(e,t){return V(e.getHours(),t.length)},m(e,t){return V(e.getMinutes(),t.length)},s(e,t){return V(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds();return V(Math.trunc(r*10**(n-3)),t.length)}},U={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},W={G:function(e,t,n){let r=+(e.getFullYear()>0);switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return H.y(e,t)},Y:function(e,t,n,r){let i=R(e,r),a=i>0?i:1-i;return t===`YY`?V(a%100,2):t===`Yo`?n.ordinalNumber(a,{unit:`year`}):V(a,t.length)},R:function(e,t){return V(v(e),t.length)},u:function(e,t){return V(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return V(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return V(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return H.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return V(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let i=B(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):V(i,t.length)},I:function(e,t,n){let r=L(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):V(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):H.d(e,t)},D:function(e,t,n){let r=I(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):V(r,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(a);case`ee`:return V(a,2);case`eo`:return n.ordinalNumber(a,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(a);case`cc`:return V(a,t.length);case`co`:return n.ordinalNumber(a,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return V(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(r,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(r,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?U.noon:r===0?U.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?U.evening:r>=12?U.afternoon:r>=4?U.morning:U.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return H.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):H.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):V(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):V(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):H.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):H.s(e,t)},S:function(e,t){return H.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return K(r);case`XXXX`:case`XX`:return q(r);default:return q(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return K(r);case`xxxx`:case`xx`:return q(r);default:return q(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+G(r,`:`);default:return`GMT`+q(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+G(r,`:`);default:return`GMT`+q(r,`:`)}},t:function(e,t,n){return V(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,n){return V(e.getTime(),t.length)}};function G(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+V(a,2)}function K(e,t){return e%60==0?(e>0?`-`:`+`)+V(Math.abs(e)/60,2):q(e,t)}function q(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=V(Math.trunc(r/60),2),a=V(r%60,2);return n+i+t+a}var J=(e,t)=>{switch(e){case`P`:return t.date({width:`short`});case`PP`:return t.date({width:`medium`});case`PPP`:return t.date({width:`long`});default:return t.date({width:`full`})}},Y=(e,t)=>{switch(e){case`p`:return t.time({width:`short`});case`pp`:return t.time({width:`medium`});case`ppp`:return t.time({width:`long`});default:return t.time({width:`full`})}},X={p:Y,P:(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return J(e,t);let a;switch(r){case`P`:a=t.dateTime({width:`short`});break;case`PP`:a=t.dateTime({width:`medium`});break;case`PPP`:a=t.dateTime({width:`long`});break;default:a=t.dateTime({width:`full`});break}return a.replace(`{{date}}`,J(r,t)).replace(`{{time}}`,Y(i,t))}},Z=/^D+$/,re=/^Y+$/,ie=[`D`,`DD`,`YY`,`YYYY`];function ae(e){return Z.test(e)}function oe(e){return re.test(e)}function se(e,t,n){let r=ce(e,t,n);if(console.warn(r),ie.includes(e))throw RangeError(r)}function ce(e,t,n){let r=e[0]===`Y`?`years`:`days of the month`;return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var le=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ue=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,de=/^'([^]*?)'?$/,fe=/''/g,pe=/[a-zA-Z]/;function me(e,t,n){let r=h(),i=n?.locale??r.locale??F,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=c(e);if(!C(s))throw RangeError(`Invalid time value`);let l=t.match(ue).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=X[t];return n(e,i.formatLong)}return e}).join(``).match(le).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:Q(e)};if(W[t])return{isToken:!0,value:e};if(t.match(pe))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));let u={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return l.map(r=>{if(!r.isToken)return r.value;let a=r.value;(!n?.useAdditionalWeekYearTokens&&oe(a)||!n?.useAdditionalDayOfYearTokens&&ae(a))&&se(a,t,String(e));let o=W[a[0]];return o(s,a,i.localize,u)}).join(``)}function Q(e){let t=e.match(de);return t?t[1].replace(fe,`'`):e}var he={lessThanXSeconds:{one:`menos de un segundo`,other:`menos de {{count}} segundos`},xSeconds:{one:`1 segundo`,other:`{{count}} segundos`},halfAMinute:`medio minuto`,lessThanXMinutes:{one:`menos de un minuto`,other:`menos de {{count}} minutos`},xMinutes:{one:`1 minuto`,other:`{{count}} minutos`},aboutXHours:{one:`alrededor de 1 hora`,other:`alrededor de {{count}} horas`},xHours:{one:`1 hora`,other:`{{count}} horas`},xDays:{one:`1 día`,other:`{{count}} días`},aboutXWeeks:{one:`alrededor de 1 semana`,other:`alrededor de {{count}} semanas`},xWeeks:{one:`1 semana`,other:`{{count}} semanas`},aboutXMonths:{one:`alrededor de 1 mes`,other:`alrededor de {{count}} meses`},xMonths:{one:`1 mes`,other:`{{count}} meses`},aboutXYears:{one:`alrededor de 1 año`,other:`alrededor de {{count}} años`},xYears:{one:`1 año`,other:`{{count}} años`},overXYears:{one:`más de 1 año`,other:`más de {{count}} años`},almostXYears:{one:`casi 1 año`,other:`casi {{count}} años`}},ge=(e,t,n)=>{let r,i=he[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`en `+r:`hace `+r:r},_e={date:D({formats:{full:`EEEE, d 'de' MMMM 'de' y`,long:`d 'de' MMMM 'de' y`,medium:`d MMM y`,short:`dd/MM/y`},defaultWidth:`full`}),time:D({formats:{full:`HH:mm:ss zzzz`,long:`HH:mm:ss z`,medium:`HH:mm:ss`,short:`HH:mm`},defaultWidth:`full`}),dateTime:D({formats:{full:`{{date}} 'a las' {{time}}`,long:`{{date}} 'a las' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},ve={lastWeek:`'el' eeee 'pasado a la' p`,yesterday:`'ayer a la' p`,today:`'hoy a la' p`,tomorrow:`'mañana a la' p`,nextWeek:`eeee 'a la' p`,other:`P`},ye={lastWeek:`'el' eeee 'pasado a las' p`,yesterday:`'ayer a las' p`,today:`'hoy a las' p`,tomorrow:`'mañana a las' p`,nextWeek:`eeee 'a las' p`,other:`P`},be={code:`es`,formatDistance:ge,formatLong:_e,formatRelative:(e,t,n,r)=>t.getHours()===1?ve[e]:ye[e],localize:{ordinalNumber:(e,t)=>Number(e)+`º`,era:j({values:{narrow:[`AC`,`DC`],abbreviated:[`AC`,`DC`],wide:[`antes de cristo`,`después de cristo`]},defaultWidth:`wide`}),quarter:j({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`T1`,`T2`,`T3`,`T4`],wide:[`1º trimestre`,`2º trimestre`,`3º trimestre`,`4º trimestre`]},defaultWidth:`wide`,argumentCallback:e=>Number(e)-1}),month:j({values:{narrow:[`e`,`f`,`m`,`a`,`m`,`j`,`j`,`a`,`s`,`o`,`n`,`d`],abbreviated:[`ene`,`feb`,`mar`,`abr`,`may`,`jun`,`jul`,`ago`,`sep`,`oct`,`nov`,`dic`],wide:[`enero`,`febrero`,`marzo`,`abril`,`mayo`,`junio`,`julio`,`agosto`,`septiembre`,`octubre`,`noviembre`,`diciembre`]},defaultWidth:`wide`}),day:j({values:{narrow:[`d`,`l`,`m`,`m`,`j`,`v`,`s`],short:[`do`,`lu`,`ma`,`mi`,`ju`,`vi`,`sá`],abbreviated:[`dom`,`lun`,`mar`,`mié`,`jue`,`vie`,`sáb`],wide:[`domingo`,`lunes`,`martes`,`miércoles`,`jueves`,`viernes`,`sábado`]},defaultWidth:`wide`}),dayPeriod:j({values:{narrow:{am:`a`,pm:`p`,midnight:`mn`,noon:`md`,morning:`mañana`,afternoon:`tarde`,evening:`tarde`,night:`noche`},abbreviated:{am:`AM`,pm:`PM`,midnight:`medianoche`,noon:`mediodia`,morning:`mañana`,afternoon:`tarde`,evening:`tarde`,night:`noche`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`medianoche`,noon:`mediodia`,morning:`mañana`,afternoon:`tarde`,evening:`tarde`,night:`noche`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mn`,noon:`md`,morning:`de la mañana`,afternoon:`de la tarde`,evening:`de la tarde`,night:`de la noche`},abbreviated:{am:`AM`,pm:`PM`,midnight:`medianoche`,noon:`mediodia`,morning:`de la mañana`,afternoon:`de la tarde`,evening:`de la tarde`,night:`de la noche`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`medianoche`,noon:`mediodia`,morning:`de la mañana`,afternoon:`de la tarde`,evening:`de la tarde`,night:`de la noche`}},defaultFormattingWidth:`wide`})},match:{ordinalNumber:P({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:M({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},defaultParseWidth:`any`}),quarter:M({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:M({matchPatterns:{narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},defaultParseWidth:`any`}),day:M({matchPatterns:{narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:M({matchPatterns:{narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},defaultParseWidth:`any`})},options:{weekStartsOn:1,firstWeekContainsDate:1}};function $(e){if(!e)return[];try{let t=JSON.parse(e);if(!Array.isArray(t))return[];let n=t.flatMap(e=>{if(typeof e==`string`&&e.trim())return[{id:e.trim()}];if(typeof e==`object`&&e){let t=e,n=typeof t.id==`string`?t.id:typeof t.name==`string`?t.name:``;return n?[{id:n,suppliedName:typeof t.name==`string`?t.name:void 0}]:[]}return[]});return Array.from(new Map(n.map(e=>[e.id,e])).values())}catch{return[]}}function xe(e){return Array.from(new Set([...e.role===`coordinator`?e.minimalTools??[]:[],...$(e.toolsJson).map(e=>e.id)]))}function Se(e){return Array.from(new Set([...e.role===`coordinator`?(e.minimalSkills??[]).map(e=>e.id):[],...$(e.skillsJson).map(e=>e.id)]))}export{me as a,be as i,xe as n,s as o,$ as r,i as s,Se as t};
1
+ import{o as e}from"./vendor-query-Dj8xYhQD.js";import{t}from"./utils-Dyb7SC2_.js";import{K as n}from"./index-ZjAc-KQS.js";import{t as r}from"./badge-DKGZbVZJ.js";var i=n(`Network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),a=e(),o={active:{label:`Activo`,className:`bg-hive-connected/15 text-hive-connected border-hive-connected/30`},idle:{label:`Activo`,className:`bg-hive-connected/10 text-hive-connected/80 border-hive-connected/20`},hibernated:{label:`Hibernado`,className:`bg-secondary text-secondary-foreground border-border`},error:{label:`Error`,className:`bg-destructive/15 text-destructive border-destructive/30`},thinking:{label:`Pensando`,className:`bg-hive-thinking/15 text-hive-thinking border-hive-thinking/30 animate-pulse-slow`},archived:{label:`Archivado`,className:`bg-amber-500/15 text-amber-400 border-amber-500/30`}};function s({status:e,className:n}){if(!e||!o[e])return(0,a.jsxs)(r,{variant:`outline`,className:n,children:[(0,a.jsx)(`span`,{className:`mr-1.5 inline-block h-1.5 w-1.5 rounded-full bg-current`}),`Desconocido`]});let i=o[e];return(0,a.jsxs)(r,{variant:`outline`,className:t(i.className,n),children:[(0,a.jsx)(`span`,{className:`mr-1.5 inline-block h-1.5 w-1.5 rounded-full bg-current`}),i.label]})}function c(e){let t=Object.prototype.toString.call(e);return e instanceof Date||typeof e==`object`&&t===`[object Date]`?new e.constructor(+e):typeof e==`number`||t===`[object Number]`||typeof e==`string`||t===`[object String]`?new Date(e):new Date(NaN)}function l(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}var u=365.2425,d=6048e5,f=864e5,p=3600*24;p*7,p*u/12*3;var m={};function h(){return m}function g(e,t){let n=h(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=c(e),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function _(e){return g(e,{weekStartsOn:1})}function v(e){let t=c(e),n=t.getFullYear(),r=l(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);let i=_(r),a=l(e,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);let o=_(a);return t.getTime()>=i.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function y(e){let t=c(e);return t.setHours(0,0,0,0),t}function b(e){let t=c(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}function ee(e,t){let n=y(e),r=y(t),i=+n-b(n),a=+r-b(r);return Math.round((i-a)/f)}function x(e){let t=v(e),n=l(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),_(n)}function S(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function C(e){if(!S(e)&&typeof e!=`number`)return!1;let t=c(e);return!isNaN(Number(t))}function w(e){let t=c(e),n=l(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}var T={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},E=(e,t,n)=>{let r,i=T[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r};function D(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var O={date:D({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:D({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:D({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},k={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},A=(e,t,n,r)=>k[e];function j(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}var te={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},era:j({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:j({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:j({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:j({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:j({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})};function M(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?N(s,e=>e.test(o)):ne(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function ne(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function N(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function P(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}var F={code:`en-US`,formatDistance:E,formatLong:O,formatRelative:A,localize:te,match:{ordinalNumber:P({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:M({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:M({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:M({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:M({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:M({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function I(e){let t=c(e);return ee(t,w(t))+1}function L(e){let t=c(e),n=_(t)-+x(t);return Math.round(n/d)+1}function R(e,t){let n=c(e),r=n.getFullYear(),i=h(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=l(e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);let s=g(o,t),u=l(e,0);u.setFullYear(r,0,a),u.setHours(0,0,0,0);let d=g(u,t);return n.getTime()>=s.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function z(e,t){let n=h(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=R(e,t),a=l(e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),g(a,t)}function B(e,t){let n=c(e),r=g(n,t)-+z(n,t);return Math.round(r/d)+1}function V(e,t){return(e<0?`-`:``)+Math.abs(e).toString().padStart(t,`0`)}var H={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return V(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):V(n+1,2)},d(e,t){return V(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];default:return n===`am`?`a.m.`:`p.m.`}},h(e,t){return V(e.getHours()%12||12,t.length)},H(e,t){return V(e.getHours(),t.length)},m(e,t){return V(e.getMinutes(),t.length)},s(e,t){return V(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds();return V(Math.trunc(r*10**(n-3)),t.length)}},U={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},W={G:function(e,t,n){let r=+(e.getFullYear()>0);switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return H.y(e,t)},Y:function(e,t,n,r){let i=R(e,r),a=i>0?i:1-i;return t===`YY`?V(a%100,2):t===`Yo`?n.ordinalNumber(a,{unit:`year`}):V(a,t.length)},R:function(e,t){return V(v(e),t.length)},u:function(e,t){return V(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return V(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return V(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return H.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return V(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let i=B(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):V(i,t.length)},I:function(e,t,n){let r=L(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):V(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):H.d(e,t)},D:function(e,t,n){let r=I(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):V(r,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(a);case`ee`:return V(a,2);case`eo`:return n.ordinalNumber(a,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(a);case`cc`:return V(a,t.length);case`co`:return n.ordinalNumber(a,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return V(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(r,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(r,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?U.noon:r===0?U.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?U.evening:r>=12?U.afternoon:r>=4?U.morning:U.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return H.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):H.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):V(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):V(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):H.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):H.s(e,t)},S:function(e,t){return H.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return K(r);case`XXXX`:case`XX`:return q(r);default:return q(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return K(r);case`xxxx`:case`xx`:return q(r);default:return q(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+G(r,`:`);default:return`GMT`+q(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+G(r,`:`);default:return`GMT`+q(r,`:`)}},t:function(e,t,n){return V(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,n){return V(e.getTime(),t.length)}};function G(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+V(a,2)}function K(e,t){return e%60==0?(e>0?`-`:`+`)+V(Math.abs(e)/60,2):q(e,t)}function q(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=V(Math.trunc(r/60),2),a=V(r%60,2);return n+i+t+a}var J=(e,t)=>{switch(e){case`P`:return t.date({width:`short`});case`PP`:return t.date({width:`medium`});case`PPP`:return t.date({width:`long`});default:return t.date({width:`full`})}},Y=(e,t)=>{switch(e){case`p`:return t.time({width:`short`});case`pp`:return t.time({width:`medium`});case`ppp`:return t.time({width:`long`});default:return t.time({width:`full`})}},X={p:Y,P:(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return J(e,t);let a;switch(r){case`P`:a=t.dateTime({width:`short`});break;case`PP`:a=t.dateTime({width:`medium`});break;case`PPP`:a=t.dateTime({width:`long`});break;default:a=t.dateTime({width:`full`});break}return a.replace(`{{date}}`,J(r,t)).replace(`{{time}}`,Y(i,t))}},Z=/^D+$/,re=/^Y+$/,ie=[`D`,`DD`,`YY`,`YYYY`];function ae(e){return Z.test(e)}function oe(e){return re.test(e)}function se(e,t,n){let r=ce(e,t,n);if(console.warn(r),ie.includes(e))throw RangeError(r)}function ce(e,t,n){let r=e[0]===`Y`?`years`:`days of the month`;return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var le=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ue=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,de=/^'([^]*?)'?$/,fe=/''/g,pe=/[a-zA-Z]/;function me(e,t,n){let r=h(),i=n?.locale??r.locale??F,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=c(e);if(!C(s))throw RangeError(`Invalid time value`);let l=t.match(ue).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=X[t];return n(e,i.formatLong)}return e}).join(``).match(le).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:Q(e)};if(W[t])return{isToken:!0,value:e};if(t.match(pe))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));let u={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return l.map(r=>{if(!r.isToken)return r.value;let a=r.value;(!n?.useAdditionalWeekYearTokens&&oe(a)||!n?.useAdditionalDayOfYearTokens&&ae(a))&&se(a,t,String(e));let o=W[a[0]];return o(s,a,i.localize,u)}).join(``)}function Q(e){let t=e.match(de);return t?t[1].replace(fe,`'`):e}var he={lessThanXSeconds:{one:`menos de un segundo`,other:`menos de {{count}} segundos`},xSeconds:{one:`1 segundo`,other:`{{count}} segundos`},halfAMinute:`medio minuto`,lessThanXMinutes:{one:`menos de un minuto`,other:`menos de {{count}} minutos`},xMinutes:{one:`1 minuto`,other:`{{count}} minutos`},aboutXHours:{one:`alrededor de 1 hora`,other:`alrededor de {{count}} horas`},xHours:{one:`1 hora`,other:`{{count}} horas`},xDays:{one:`1 día`,other:`{{count}} días`},aboutXWeeks:{one:`alrededor de 1 semana`,other:`alrededor de {{count}} semanas`},xWeeks:{one:`1 semana`,other:`{{count}} semanas`},aboutXMonths:{one:`alrededor de 1 mes`,other:`alrededor de {{count}} meses`},xMonths:{one:`1 mes`,other:`{{count}} meses`},aboutXYears:{one:`alrededor de 1 año`,other:`alrededor de {{count}} años`},xYears:{one:`1 año`,other:`{{count}} años`},overXYears:{one:`más de 1 año`,other:`más de {{count}} años`},almostXYears:{one:`casi 1 año`,other:`casi {{count}} años`}},ge=(e,t,n)=>{let r,i=he[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`en `+r:`hace `+r:r},_e={date:D({formats:{full:`EEEE, d 'de' MMMM 'de' y`,long:`d 'de' MMMM 'de' y`,medium:`d MMM y`,short:`dd/MM/y`},defaultWidth:`full`}),time:D({formats:{full:`HH:mm:ss zzzz`,long:`HH:mm:ss z`,medium:`HH:mm:ss`,short:`HH:mm`},defaultWidth:`full`}),dateTime:D({formats:{full:`{{date}} 'a las' {{time}}`,long:`{{date}} 'a las' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},ve={lastWeek:`'el' eeee 'pasado a la' p`,yesterday:`'ayer a la' p`,today:`'hoy a la' p`,tomorrow:`'mañana a la' p`,nextWeek:`eeee 'a la' p`,other:`P`},ye={lastWeek:`'el' eeee 'pasado a las' p`,yesterday:`'ayer a las' p`,today:`'hoy a las' p`,tomorrow:`'mañana a las' p`,nextWeek:`eeee 'a las' p`,other:`P`},be={code:`es`,formatDistance:ge,formatLong:_e,formatRelative:(e,t,n,r)=>t.getHours()===1?ve[e]:ye[e],localize:{ordinalNumber:(e,t)=>Number(e)+`º`,era:j({values:{narrow:[`AC`,`DC`],abbreviated:[`AC`,`DC`],wide:[`antes de cristo`,`después de cristo`]},defaultWidth:`wide`}),quarter:j({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`T1`,`T2`,`T3`,`T4`],wide:[`1º trimestre`,`2º trimestre`,`3º trimestre`,`4º trimestre`]},defaultWidth:`wide`,argumentCallback:e=>Number(e)-1}),month:j({values:{narrow:[`e`,`f`,`m`,`a`,`m`,`j`,`j`,`a`,`s`,`o`,`n`,`d`],abbreviated:[`ene`,`feb`,`mar`,`abr`,`may`,`jun`,`jul`,`ago`,`sep`,`oct`,`nov`,`dic`],wide:[`enero`,`febrero`,`marzo`,`abril`,`mayo`,`junio`,`julio`,`agosto`,`septiembre`,`octubre`,`noviembre`,`diciembre`]},defaultWidth:`wide`}),day:j({values:{narrow:[`d`,`l`,`m`,`m`,`j`,`v`,`s`],short:[`do`,`lu`,`ma`,`mi`,`ju`,`vi`,`sá`],abbreviated:[`dom`,`lun`,`mar`,`mié`,`jue`,`vie`,`sáb`],wide:[`domingo`,`lunes`,`martes`,`miércoles`,`jueves`,`viernes`,`sábado`]},defaultWidth:`wide`}),dayPeriod:j({values:{narrow:{am:`a`,pm:`p`,midnight:`mn`,noon:`md`,morning:`mañana`,afternoon:`tarde`,evening:`tarde`,night:`noche`},abbreviated:{am:`AM`,pm:`PM`,midnight:`medianoche`,noon:`mediodia`,morning:`mañana`,afternoon:`tarde`,evening:`tarde`,night:`noche`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`medianoche`,noon:`mediodia`,morning:`mañana`,afternoon:`tarde`,evening:`tarde`,night:`noche`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mn`,noon:`md`,morning:`de la mañana`,afternoon:`de la tarde`,evening:`de la tarde`,night:`de la noche`},abbreviated:{am:`AM`,pm:`PM`,midnight:`medianoche`,noon:`mediodia`,morning:`de la mañana`,afternoon:`de la tarde`,evening:`de la tarde`,night:`de la noche`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`medianoche`,noon:`mediodia`,morning:`de la mañana`,afternoon:`de la tarde`,evening:`de la tarde`,night:`de la noche`}},defaultFormattingWidth:`wide`})},match:{ordinalNumber:P({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:M({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},defaultParseWidth:`any`}),quarter:M({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:M({matchPatterns:{narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},defaultParseWidth:`any`}),day:M({matchPatterns:{narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:M({matchPatterns:{narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},defaultParseWidth:`any`})},options:{weekStartsOn:1,firstWeekContainsDate:1}};function $(e){if(!e)return[];try{let t=JSON.parse(e);if(!Array.isArray(t))return[];let n=t.flatMap(e=>{if(typeof e==`string`&&e.trim())return[{id:e.trim()}];if(typeof e==`object`&&e){let t=e,n=typeof t.id==`string`?t.id:typeof t.name==`string`?t.name:``;return n?[{id:n,suppliedName:typeof t.name==`string`?t.name:void 0}]:[]}return[]});return Array.from(new Map(n.map(e=>[e.id,e])).values())}catch{return[]}}function xe(e){return Array.from(new Set([...e.role===`coordinator`?e.minimalTools??[]:[],...$(e.toolsJson).map(e=>e.id)]))}function Se(e){return Array.from(new Set([...e.role===`coordinator`?(e.minimalSkills??[]).map(e=>e.id):[],...$(e.skillsJson).map(e=>e.id)]))}export{me as a,be as i,xe as n,s as o,$ as r,i as s,Se as t};
@@ -0,0 +1 @@
1
+ import{K as e}from"./index-ZjAc-KQS.js";var t=e(`ArrowLeft`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{K as e}from"./index-ZjAc-KQS.js";var t=e(`ArrowRight`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{K as e}from"./index-ZjAc-KQS.js";var t=e(`ArrowUpRight`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]);export{t};