hyperclaw 5.3.4 → 5.4.0
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.
- package/dist/banner-3jmKGq6t.js +143 -0
- package/dist/banner-B2Qo91lq.js +143 -0
- package/dist/banner-BhOid_rp.js +7 -0
- package/dist/banner-C5D09Afq.js +7 -0
- package/dist/banner-CmNA9NKE.js +7 -0
- package/dist/banner-D3-Ik5d2.js +143 -0
- package/dist/banner-D3X8tQ-0.js +7 -0
- package/dist/banner-DG3v43xA.js +143 -0
- package/dist/chat-BGD9AWhr.js +523 -0
- package/dist/chat-D-i8bqTf.js +523 -0
- package/dist/chat-D8wFNN4z.js +523 -0
- package/dist/daemon-BXfbyPBf.js +7 -0
- package/dist/daemon-C4j0wqxz.js +421 -0
- package/dist/daemon-CUNaq2Ls.js +421 -0
- package/dist/daemon-D-klsy3i.js +7 -0
- package/dist/daemon-D_bYfHgn.js +421 -0
- package/dist/daemon-DcE6vcjH.js +421 -0
- package/dist/daemon-IU5UIMJo.js +7 -0
- package/dist/daemon-NFwpuo3L.js +7 -0
- package/dist/engine-2Tc-z0e4.js +7 -0
- package/dist/engine-B7Q4Vx-C.js +7 -0
- package/dist/engine-C-G3G-U7.js +7 -0
- package/dist/engine-DQ3hT5JD.js +327 -0
- package/dist/engine-DRpy9Y5O.js +327 -0
- package/dist/engine-DetHi9LP.js +327 -0
- package/dist/hyperclawbot-BqyZr2GM.js +516 -0
- package/dist/hyperclawbot-DTzP20Up.js +516 -0
- package/dist/hyperclawbot-DcQt62PL.js +516 -0
- package/dist/mcp-loader-BAGRKfJz.js +93 -0
- package/dist/mcp-loader-CPlsbcja.js +93 -0
- package/dist/mcp-loader-Dt64EewT.js +93 -0
- package/dist/onboard-32d2Gsuy.js +14 -0
- package/dist/onboard-BF29mNbC.js +14 -0
- package/dist/onboard-C7vJegQc.js +3812 -0
- package/dist/onboard-CJKxKPBH.js +3812 -0
- package/dist/onboard-Cgj_CIrq.js +3812 -0
- package/dist/onboard-ChnsqU5z.js +14 -0
- package/dist/onboard-CjzqTYq3.js +3812 -0
- package/dist/onboard-CytL65jh.js +14 -0
- package/dist/orchestrator-Bcj7uc1F.js +189 -0
- package/dist/orchestrator-C7oLWNFW.js +6 -0
- package/dist/orchestrator-Cuyqncql.js +189 -0
- package/dist/orchestrator-CxlEm5li.js +6 -0
- package/dist/orchestrator-DcEHTInR.js +6 -0
- package/dist/orchestrator-PQY07fH7.js +189 -0
- package/dist/osint-ADgw_Gkd.js +283 -0
- package/dist/osint-B5j3IuJK.js +283 -0
- package/dist/osint-DsUwGzgP.js +283 -0
- package/dist/osint-DtRd_A_O.js +283 -0
- package/dist/osint-chat-BbH6eW8z.js +789 -0
- package/dist/osint-chat-CfexqWop.js +789 -0
- package/dist/osint-chat-DdclrVa6.js +789 -0
- package/dist/osint-chat-xRP672b-.js +789 -0
- package/dist/run-main.js +103 -44
- package/dist/server-6TIyu0mb.js +4 -0
- package/dist/server-C9f6qtEW.js +1366 -0
- package/dist/server-CdlilrcS.js +4 -0
- package/dist/server-Da_jSrfS.js +4 -0
- package/dist/server-DfrmKeE6.js +1356 -0
- package/dist/server-gai_RW1u.js +1356 -0
- package/dist/server-rHap51o6.js +4 -0
- package/dist/server-vbYKep6r.js +1356 -0
- package/dist/skill-runtime-249xckq3.js +5 -0
- package/dist/skill-runtime-Bv59FUVu.js +104 -0
- package/dist/skill-runtime-CHQT7c1k.js +5 -0
- package/dist/skill-runtime-Cfd0OLkP.js +104 -0
- package/dist/skill-runtime-Dr0fimDf.js +5 -0
- package/dist/skill-runtime-DtO4i9vK.js +104 -0
- package/dist/src-CDLnbsLp.js +458 -0
- package/dist/src-ClYgvXAj.js +63 -0
- package/dist/src-D4VRanxB.js +458 -0
- package/dist/src-DK-ayUx7.js +63 -0
- package/dist/src-DiYkDVnn.js +458 -0
- package/dist/src-H1I7JC2E.js +63 -0
- package/dist/sub-agent-tools-8-Imp1B5.js +39 -0
- package/dist/sub-agent-tools-BoMCZ6jz.js +39 -0
- package/dist/sub-agent-tools-Dla3ZB5N.js +39 -0
- package/package.json +145 -143
- package/scripts/fix-mojibake.mjs +166 -0
- package/static/chat.html +764 -764
- package/static/web/assets/index-B5N1LHGR.css +1 -0
- package/static/web/assets/{index-BhCDgT5S.js → index-Bf8pf7Wg.js} +1 -1
- package/static/web/index.html +2 -2
- package/static/web/assets/index-D2RfO0dG.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&family=Inter:wght@300;400;500;600;700&display=swap";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.left-2\.5{left:.625rem}.top-1\/2{top:50%}.z-50{z-index:50}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.ml-1{margin-left:.25rem}.mr-2\.5{margin-right:.625rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3{height:.75rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-9{height:2.25rem}.h-full{height:100%}.h-screen{height:100vh}.min-h-0{min-height:0px}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-3{width:.75rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-96{width:24rem}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-2xl{max-width:42rem}.max-w-\[90vw\]{max-width:90vw}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-tl-sm{border-top-left-radius:.125rem}.rounded-tr-sm{border-top-right-radius:.125rem}.border{border-width:1px}.border-t-transparent{border-top-color:transparent}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.p-1\.5{padding:.375rem}.p-3{padding:.75rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pl-3{padding-left:.75rem}.pl-7{padding-left:1.75rem}.pr-3{padding-right:.75rem}.pt-1{padding-top:.25rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:JetBrains Mono,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-5xl{font-size:3rem;line-height:1}.text-\[10px\]{font-size:10px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.outline-none{outline:2px solid transparent;outline-offset:2px}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:root{--bg: #09090b;--bg2: #0f0f12;--bg3: #18181b;--bg4: #27272a;--border: #27272a;--border2: #3f3f46;--text: #fafafa;--text2: #a1a1aa;--text3: #52525b;--accent: #22d3ee;--accent2: #06b6d4;--accent3: #0e7490;--accentBg: rgba(34,211,238,.08);--accentBorder: rgba(34,211,238,.2);--userBubble: #0e7490;--asstBubble: #18181b;--sidebar: #09090b;--header: #09090b;--inputBg: #18181b;--ring: rgba(34,211,238,.3)}[data-theme=light]{--bg: #ffffff;--bg2: #f8fafc;--bg3: #f1f5f9;--bg4: #e2e8f0;--border: #e4e4e7;--border2: #d4d4d8;--text: #09090b;--text2: #52525b;--text3: #a1a1aa;--accent: #0891b2;--accent2: #0e7490;--accent3: #164e63;--accentBg: rgba(8,145,178,.06);--accentBorder: rgba(8,145,178,.2);--userBubble: #0891b2;--asstBubble: #ffffff;--sidebar: #f8fafc;--header: #ffffff;--inputBg: #ffffff;--ring: rgba(8,145,178,.25)}[data-daemon=true]{--accent: #f87171;--accent2: #ef4444;--accent3: #dc2626;--accentBg: rgba(248,113,113,.08);--accentBorder: rgba(248,113,113,.2);--userBubble: #991b1b;--ring: rgba(248,113,113,.3)}[data-theme=light][data-daemon=true]{--accent: #dc2626;--accent2: #b91c1c;--accent3: #991b1b;--accentBg: rgba(220,38,38,.06);--accentBorder: rgba(220,38,38,.18);--userBubble: #dc2626;--ring: rgba(220,38,38,.25)}*,*:before,*:after{box-sizing:border-box}body{background-color:var(--bg);color:var(--text);font-family:Inter,system-ui,sans-serif;margin:0;-webkit-font-smoothing:antialiased}::-webkit-scrollbar{width:4px;height:4px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border);border-radius:4px}::-webkit-scrollbar-thumb:hover{background:var(--border2)}.font-mono{font-family:JetBrains Mono,monospace}.msgs-bg{background:radial-gradient(ellipse 100% 60% at 50% 0%,var(--accentBg) 0%,transparent 70%),var(--bg)}.sidebar-bg{background:radial-gradient(ellipse 100% 40% at 50% 0%,var(--accentBg) 0%,transparent 60%),var(--sidebar)}.input-glow{box-shadow:0 -1px 0 var(--border),0 -8px 24px -8px var(--accentBg)}.accent-text{color:var(--accent)}.accent-bg{background-color:var(--accent2)}.accent-bg-sm{background-color:var(--accentBg)}.accent-border{border-color:var(--accentBorder)}.btn-primary{background:var(--accent2);color:#fff;border:none;transition:opacity .15s,transform .1s}.btn-primary:hover:not(:disabled){opacity:.88}.btn-primary:disabled{opacity:.3;cursor:not-allowed}.btn-ghost{background:transparent;color:var(--text3);border:1px solid var(--border);transition:background .15s,color .15s,border-color .15s}.btn-ghost:hover{background:var(--bg3);color:var(--text2);border-color:var(--border2)}.input-base{background:var(--inputBg);color:var(--text);border:1px solid var(--border);outline:none;transition:border-color .15s,box-shadow .15s}.input-base:focus{border-color:var(--accent3);box-shadow:0 0 0 3px var(--ring)}.input-base::-moz-placeholder{color:var(--text3)}.input-base::placeholder{color:var(--text3)}.bubble-user{background:var(--userBubble);color:#fff}.bubble-asst{background:var(--asstBubble);color:var(--text);border:1px solid var(--border)}.nav-active{background:var(--accentBg);color:var(--accent);border:1px solid var(--accentBorder)}.nav-item{color:var(--text3);transition:background .12s,color .12s}.nav-item:hover{background:var(--bg3);color:var(--text2)}.card{background:var(--bg2);border:1px solid var(--border);border-radius:12px;padding:16px}@keyframes fadeUp{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}.msg-in{animation:fadeUp .2s ease}@keyframes micPulse{0%,to{box-shadow:0 0 0 0 var(--ring)}50%{box-shadow:0 0 0 7px transparent}}.mic-active{animation:micPulse .9s ease-in-out infinite}@keyframes typingBounce{0%,80%,to{transform:translateY(0)}40%{transform:translateY(-5px)}}.typing-dot-1{animation:typingBounce 1.2s infinite}.typing-dot-2{animation:typingBounce 1.2s .15s infinite}.typing-dot-3{animation:typingBounce 1.2s .3s infinite}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}
|
|
@@ -70,6 +70,6 @@ Error generating stack: `+l.message+`
|
|
|
70
70
|
`))+1))}const o="#".repeat(i),s=n.enter("headingAtx"),u=n.enter("phrasing");l.move(o+" ");let a=n.containerPhrasing(e,{before:"# ",after:`
|
|
71
71
|
`,...l.current()});return/^[\t ]/.test(a)&&(a=Pl(a.charCodeAt(0))+a.slice(1)),a=a?o+" "+a:o,n.options.closeAtx&&(a+=" "+o),u(),s(),a}ux.peek=iT;function ux(e){return e.value||""}function iT(){return"<"}ax.peek=lT;function ax(e,t,n,r){const i=Nf(n),l=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let s=n.enter("label");const u=n.createTracker(r);let a=u.move("![");return a+=u.move(n.safe(e.alt,{before:a,after:"]",...u.current()})),a+=u.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),a+=u.move("<"),a+=u.move(n.safe(e.url,{before:a,after:">",...u.current()})),a+=u.move(">")):(s=n.enter("destinationRaw"),a+=u.move(n.safe(e.url,{before:a,after:e.title?" ":")",...u.current()}))),s(),e.title&&(s=n.enter(`title${l}`),a+=u.move(" "+i),a+=u.move(n.safe(e.title,{before:a,after:i,...u.current()})),a+=u.move(i),s()),a+=u.move(")"),o(),a}function lT(){return"!"}cx.peek=oT;function cx(e,t,n,r){const i=e.referenceType,l=n.enter("imageReference");let o=n.enter("label");const s=n.createTracker(r);let u=s.move("![");const a=n.safe(e.alt,{before:u,after:"]",...s.current()});u+=s.move(a+"]["),o();const f=n.stack;n.stack=[],o=n.enter("reference");const c=n.safe(n.associationId(e),{before:u,after:"]",...s.current()});return o(),n.stack=f,l(),i==="full"||!a||a!==c?u+=s.move(c+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function oT(){return"!"}fx.peek=sT;function fx(e,t,n){let r=e.value||"",i="`",l=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++l<n.unsafe.length;){const o=n.unsafe[l],s=n.compilePattern(o);let u;if(o.atBreak)for(;u=s.exec(r);){let a=u.index;r.charCodeAt(a)===10&&r.charCodeAt(a-1)===13&&a--,r=r.slice(0,a)+" "+r.slice(u.index+1)}}return i+r+i}function sT(){return"`"}function dx(e,t){const n=kf(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}hx.peek=uT;function hx(e,t,n,r){const i=Nf(n),l=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let s,u;if(dx(e,n)){const f=n.stack;n.stack=[],s=n.enter("autolink");let c=o.move("<");return c+=o.move(n.containerPhrasing(e,{before:c,after:">",...o.current()})),c+=o.move(">"),s(),n.stack=f,c}s=n.enter("link"),u=n.enter("label");let a=o.move("[");return a+=o.move(n.containerPhrasing(e,{before:a,after:"](",...o.current()})),a+=o.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),a+=o.move("<"),a+=o.move(n.safe(e.url,{before:a,after:">",...o.current()})),a+=o.move(">")):(u=n.enter("destinationRaw"),a+=o.move(n.safe(e.url,{before:a,after:e.title?" ":")",...o.current()}))),u(),e.title&&(u=n.enter(`title${l}`),a+=o.move(" "+i),a+=o.move(n.safe(e.title,{before:a,after:i,...o.current()})),a+=o.move(i),u()),a+=o.move(")"),s(),a}function uT(e,t,n){return dx(e,n)?"<":"["}px.peek=aT;function px(e,t,n,r){const i=e.referenceType,l=n.enter("linkReference");let o=n.enter("label");const s=n.createTracker(r);let u=s.move("[");const a=n.containerPhrasing(e,{before:u,after:"]",...s.current()});u+=s.move(a+"]["),o();const f=n.stack;n.stack=[],o=n.enter("reference");const c=n.safe(n.associationId(e),{before:u,after:"]",...s.current()});return o(),n.stack=f,l(),i==="full"||!a||a!==c?u+=s.move(c+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function aT(){return"["}function _f(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function cT(e){const t=_f(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function fT(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function mx(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function dT(e,t,n,r){const i=n.enter("list"),l=n.bulletCurrent;let o=e.ordered?fT(n):_f(n);const s=e.ordered?o==="."?")":".":cT(n);let u=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),mx(n)===o&&f){let c=-1;for(;++c<e.children.length;){const d=e.children[c];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(o=s),n.bulletCurrent=o;const a=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=l,i(),a}function hT(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function pT(e,t,n,r){const i=hT(n);let l=n.bulletCurrent||_f(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let o=l.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const s=n.createTracker(r);s.move(l+" ".repeat(o-l.length)),s.shift(o);const u=n.enter("listItem"),a=n.indentLines(n.containerFlow(e,s.current()),f);return u(),a;function f(c,d,h){return d?(h?"":" ".repeat(o))+c:(h?l:l+" ".repeat(o-l.length))+c}}function mT(e,t,n,r){const i=n.enter("paragraph"),l=n.enter("phrasing"),o=n.containerPhrasing(e,r);return l(),i(),o}const gT=Us(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function yT(e,t,n,r){return(e.children.some(function(o){return gT(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function xT(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}gx.peek=vT;function gx(e,t,n,r){const i=xT(n),l=n.enter("strong"),o=n.createTracker(r),s=o.move(i+i);let u=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()}));const a=u.charCodeAt(0),f=ps(r.before.charCodeAt(r.before.length-1),a,i);f.inside&&(u=Pl(a)+u.slice(1));const c=u.charCodeAt(u.length-1),d=ps(r.after.charCodeAt(0),c,i);d.inside&&(u=u.slice(0,-1)+Pl(c));const h=o.move(i+i);return l(),n.attentionEncodeSurroundingInfo={after:d.outside,before:f.outside},s+u+h}function vT(e,t,n){return n.options.strong||"*"}function wT(e,t,n,r){return n.safe(e.value,r)}function kT(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function ST(e,t,n){const r=(mx(n)+(n.options.ruleSpaces?" ":"")).repeat(kT(n));return n.options.ruleSpaces?r.slice(0,-1):r}const yx={blockquote:Q2,break:pp,code:X2,definition:Z2,emphasis:sx,hardBreak:pp,heading:rT,html:ux,image:ax,imageReference:cx,inlineCode:fx,link:hx,linkReference:px,list:dT,listItem:pT,paragraph:mT,root:yT,strong:gx,text:wT,thematicBreak:ST};function CT(){return{enter:{table:ET,tableData:mp,tableHeader:mp,tableRow:TT},exit:{codeText:PT,table:bT,tableData:Du,tableHeader:Du,tableRow:Du}}}function ET(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function bT(e){this.exit(e),this.data.inTable=void 0}function TT(e){this.enter({type:"tableRow",children:[]},e)}function Du(e){this.exit(e)}function mp(e){this.enter({type:"tableCell",children:[]},e)}function PT(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,RT));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function RT(e,t){return t==="|"?t:e}function OT(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
72
72
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:o,tableCell:u,tableRow:s}};function o(h,p,x,C){return a(f(h,x,C),h.align)}function s(h,p,x,C){const m=c(h,x,C),y=a([m]);return y.slice(0,y.indexOf(`
|
|
73
|
-
`))}function u(h,p,x,C){const m=x.enter("tableCell"),y=x.enter("phrasing"),g=x.containerPhrasing(h,{...C,before:l,after:l});return y(),m(),g}function a(h,p){return $2(h,{align:p,alignDelimiters:r,padding:n,stringLength:i})}function f(h,p,x){const C=h.children;let m=-1;const y=[],g=p.enter("table");for(;++m<C.length;)y[m]=c(C[m],p,x);return g(),y}function c(h,p,x){const C=h.children;let m=-1;const y=[],g=p.enter("tableRow");for(;++m<C.length;)y[m]=u(C[m],h,p,x);return g(),y}function d(h,p,x){let C=yx.inlineCode(h,p,x);return x.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function NT(){return{exit:{taskListCheckValueChecked:gp,taskListCheckValueUnchecked:gp,paragraph:IT}}}function _T(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:AT}}}function gp(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function IT(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let l=-1,o;for(;++l<i.length;){const s=i[l];if(s.type==="paragraph"){o=s;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function AT(e,t,n,r){const i=e.children[0],l=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);l&&s.move(o);let u=yx.listItem(e,t,n,{...r,...s.current()});return l&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,a)),u;function a(f){return f+o}}function LT(){return[d2(),A2(),F2(),CT(),NT()]}function DT(e){return{extensions:[h2(),L2(e),z2(),OT(e),_T()]}}const jT={tokenize:HT,partial:!0},xx={tokenize:$T,partial:!0},vx={tokenize:VT,partial:!0},wx={tokenize:QT,partial:!0},FT={tokenize:WT,partial:!0},kx={name:"wwwAutolink",tokenize:BT,previous:Cx},Sx={name:"protocolAutolink",tokenize:UT,previous:Ex},xn={name:"emailAutolink",tokenize:MT,previous:bx},Jt={};function zT(){return{text:Jt}}let er=48;for(;er<123;)Jt[er]=xn,er++,er===58?er=65:er===91&&(er=97);Jt[43]=xn;Jt[45]=xn;Jt[46]=xn;Jt[95]=xn;Jt[72]=[xn,Sx];Jt[104]=[xn,Sx];Jt[87]=[xn,kx];Jt[119]=[xn,kx];function MT(e,t,n){const r=this;let i,l;return o;function o(c){return!oc(c)||!bx.call(r,r.previous)||If(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(c))}function s(c){return oc(c)?(e.consume(c),s):c===64?(e.consume(c),u):n(c)}function u(c){return c===46?e.check(FT,f,a)(c):c===45||c===95||He(c)?(l=!0,e.consume(c),u):f(c)}function a(c){return e.consume(c),i=!0,u}function f(c){return l&&i&&Ke(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function BT(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!Cx.call(r,r.previous)||If(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(jT,e.attempt(xx,e.attempt(vx,l),n),n)(o))}function l(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function UT(e,t,n){const r=this;let i="",l=!1;return o;function o(c){return(c===72||c===104)&&Ex.call(r,r.previous)&&!If(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),s):n(c)}function s(c){if(Ke(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),s;if(c===58){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(c),u}return n(c)}function u(c){return c===47?(e.consume(c),l?a:(l=!0,u)):n(c)}function a(c){return c===null||fs(c)||ce(c)||Or(c)||zs(c)?n(c):e.attempt(xx,e.attempt(vx,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function HT(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),l):n(o)}function l(o){return o===null?n(o):t(o)}}function $T(e,t,n){let r,i,l;return o;function o(a){return a===46||a===95?e.check(wx,u,s)(a):a===null||ce(a)||Or(a)||a!==45&&zs(a)?u(a):(l=!0,e.consume(a),o)}function s(a){return a===95?r=!0:(i=r,r=void 0),e.consume(a),o}function u(a){return i||r||!l?n(a):t(a)}}function VT(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?l(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(wx,t,l)(o):o===null||ce(o)||Or(o)?t(o):(e.consume(o),i)}function l(o){return o===41&&r++,e.consume(o),i}}function QT(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),l):s===93?(e.consume(s),i):s===60||s===null||ce(s)||Or(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||ce(s)||Or(s)?t(s):r(s)}function l(s){return Ke(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):Ke(s)?(e.consume(s),o):n(s)}}function WT(e,t,n){return r;function r(l){return e.consume(l),i}function i(l){return He(l)?n(l):t(l)}}function Cx(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ce(e)}function Ex(e){return!Ke(e)}function bx(e){return!(e===47||oc(e))}function oc(e){return e===43||e===45||e===46||e===95||He(e)}function If(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const qT={tokenize:tP,partial:!0};function KT(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:JT,continuation:{tokenize:ZT},exit:eP}},text:{91:{name:"gfmFootnoteCall",tokenize:XT},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:GT,resolveTo:YT}}}}function GT(e,t,n){const r=this;let i=r.events.length;const l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){o=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return s;function s(u){if(!o||!o._balanced)return n(u);const a=Mt(r.sliceSerialize({start:o.end,end:r.now()}));return a.codePointAt(0)!==94||!l.includes(a.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function YT(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function XT(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l=0,o;return s;function s(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),u}function u(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",a)}function a(c){if(l>999||c===93&&!o||c===null||c===91||ce(c))return n(c);if(c===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(Mt(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return ce(c)||(o=!0),l++,e.consume(c),c===92?f:a}function f(c){return c===91||c===92||c===93?(e.consume(c),l++,a):a(c)}}function JT(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l,o=0,s;return u;function u(p){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),a}function a(p){return p===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(p)}function f(p){if(o>999||p===93&&!s||p===null||p===91||ce(p))return n(p);if(p===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return l=Mt(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return ce(p)||(s=!0),o++,e.consume(p),p===92?c:f}function c(p){return p===91||p===92||p===93?(e.consume(p),o++,f):f(p)}function d(p){return p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),i.includes(l)||i.push(l),le(e,h,"gfmFootnoteDefinitionWhitespace")):n(p)}function h(p){return t(p)}}function ZT(e,t,n){return e.check(Vl,t,e.attempt(qT,t,n))}function eP(e){e.exit("gfmFootnoteDefinition")}function tP(e,t,n){const r=this;return le(e,i,"gfmFootnoteDefinitionIndent",5);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(l):n(l)}}function nP(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:l,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,s){let u=-1;for(;++u<o.length;)if(o[u][0]==="enter"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._close){let a=u;for(;a--;)if(o[a][0]==="exit"&&o[a][1].type==="strikethroughSequenceTemporary"&&o[a][1]._open&&o[u][1].end.offset-o[u][1].start.offset===o[a][1].end.offset-o[a][1].start.offset){o[u][1].type="strikethroughSequence",o[a][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},o[a][1].start),end:Object.assign({},o[u][1].end)},c={type:"strikethroughText",start:Object.assign({},o[a][1].end),end:Object.assign({},o[u][1].start)},d=[["enter",f,s],["enter",o[a][1],s],["exit",o[a][1],s],["enter",c,s]],h=s.parser.constructs.insideSpan.null;h&>(d,d.length,0,Ms(h,o.slice(a+1,u),s)),gt(d,d.length,0,[["exit",c,s],["enter",o[u][1],s],["exit",o[u][1],s],["exit",f,s]]),gt(o,a-1,u-a+3,d),u=a+d.length-2;break}}for(u=-1;++u<o.length;)o[u][1].type==="strikethroughSequenceTemporary"&&(o[u][1].type="data");return o}function l(o,s,u){const a=this.previous,f=this.events;let c=0;return d;function d(p){return a===126&&f[f.length-1][1].type!=="characterEscape"?u(p):(o.enter("strikethroughSequenceTemporary"),h(p))}function h(p){const x=Ei(a);if(p===126)return c>1?u(p):(o.consume(p),c++,h);if(c<2&&!n)return u(p);const C=o.exit("strikethroughSequenceTemporary"),m=Ei(p);return C._open=!m||m===2&&!!x,C._close=!x||x===2&&!!m,s(p)}}}class rP{constructor(){this.map=[]}add(t,n,r){iP(this,t,n,r)}consume(t){if(this.map.sort(function(l,o){return l[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const l of i)t.push(l);i=r.pop()}this.map.length=0}}function iP(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function lP(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=r.length-1;r[l]=r[l]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function oP(){return{flow:{null:{name:"table",tokenize:sP,resolveAll:uP}}}}function sP(e,t,n){const r=this;let i=0,l=0,o;return s;function s(w){let N=r.events.length-1;for(;N>-1;){const q=r.events[N][1].type;if(q==="lineEnding"||q==="linePrefix")N--;else break}const j=N>-1?r.events[N][1].type:null,Q=j==="tableHead"||j==="tableRow"?T:u;return Q===T&&r.parser.lazy[r.now().line]?n(w):Q(w)}function u(w){return e.enter("tableHead"),e.enter("tableRow"),a(w)}function a(w){return w===124||(o=!0,l+=1),f(w)}function f(w){return w===null?n(w):V(w)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),h):n(w):Z(w)?le(e,f,"whitespace")(w):(l+=1,o&&(o=!1,i+=1),w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),o=!0,f):(e.enter("data"),c(w)))}function c(w){return w===null||w===124||ce(w)?(e.exit("data"),f(w)):(e.consume(w),w===92?d:c)}function d(w){return w===92||w===124?(e.consume(w),c):c(w)}function h(w){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(w):(e.enter("tableDelimiterRow"),o=!1,Z(w)?le(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):p(w))}function p(w){return w===45||w===58?C(w):w===124?(o=!0,e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),x):R(w)}function x(w){return Z(w)?le(e,C,"whitespace")(w):C(w)}function C(w){return w===58?(l+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),m):w===45?(l+=1,m(w)):w===null||V(w)?b(w):R(w)}function m(w){return w===45?(e.enter("tableDelimiterFiller"),y(w)):R(w)}function y(w){return w===45?(e.consume(w),y):w===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),g):(e.exit("tableDelimiterFiller"),g(w))}function g(w){return Z(w)?le(e,b,"whitespace")(w):b(w)}function b(w){return w===124?p(w):w===null||V(w)?!o||i!==l?R(w):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(w)):R(w)}function R(w){return n(w)}function T(w){return e.enter("tableRow"),O(w)}function O(w){return w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),O):w===null||V(w)?(e.exit("tableRow"),t(w)):Z(w)?le(e,O,"whitespace")(w):(e.enter("data"),I(w))}function I(w){return w===null||w===124||ce(w)?(e.exit("data"),O(w)):(e.consume(w),w===92?F:I)}function F(w){return w===92||w===124?(e.consume(w),I):I(w)}}function uP(e,t){let n=-1,r=!0,i=0,l=[0,0,0,0],o=[0,0,0,0],s=!1,u=0,a,f,c;const d=new rP;for(;++n<e.length;){const h=e[n],p=h[1];h[0]==="enter"?p.type==="tableHead"?(s=!1,u!==0&&(yp(d,t,u,a,f),f=void 0,u=0),a={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(n,0,[["enter",a,t]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(r=!0,c=void 0,l=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,f={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(n,0,[["enter",f,t]])),i=p.type==="tableDelimiterRow"?2:f?3:1):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(l[1]!==0&&(o[0]=o[1],c=xo(d,t,l,i,void 0,c),l=[0,0,0,0]),o[2]=n)):p.type==="tableCellDivider"&&(r?r=!1:(l[1]!==0&&(o[0]=o[1],c=xo(d,t,l,i,void 0,c)),l=o,o=[l[1],n,0,0])):p.type==="tableHead"?(s=!0,u=n):p.type==="tableRow"||p.type==="tableDelimiterRow"?(u=n,l[1]!==0?(o[0]=o[1],c=xo(d,t,l,i,n,c)):o[1]!==0&&(c=xo(d,t,o,i,n,c)),i=0):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(o[3]=n)}for(u!==0&&yp(d,t,u,a,f),d.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=lP(t.events,n))}return e}function xo(e,t,n,r,i,l){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(l.end=Object.assign({},zr(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const u=zr(t.events,n[1]);if(l={type:o,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const a=zr(t.events,n[2]),f=zr(t.events,n[3]),c={type:s,start:Object.assign({},a),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const d=t.events[n[2]],h=t.events[n[3]];if(d[1].end=Object.assign({},h[1].end),d[1].type="chunkText",d[1].contentType="text",n[3]>n[2]+1){const p=n[2]+1,x=n[3]-n[2]-1;e.add(p,x,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(l.end=Object.assign({},zr(t.events,i)),e.add(i,0,[["exit",l,t]]),l=void 0),l}function yp(e,t,n,r,i){const l=[],o=zr(t.events,n);i&&(i.end=Object.assign({},o),l.push(["exit",i,t])),r.end=Object.assign({},o),l.push(["exit",r,t]),e.add(n+1,0,l)}function zr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const aP={name:"tasklistCheck",tokenize:fP};function cP(){return{text:{91:aP}}}function fP(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),l)}function l(u){return ce(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),o):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),o):n(u)}function o(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(u)}function s(u){return V(u)?t(u):Z(u)?e.check({tokenize:dP},t,n)(u):n(u)}}function dP(e,t,n){return le(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function hP(e){return Dy([zT(),KT(),nP(e),oP(),cP()])}const pP={};function mP(e){const t=this,n=e||pP,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),l=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(hP(n)),l.push(LT()),o.push(DT(n))}const ju={},gP="5.3.4",Tx=U.createContext({isDark:!0,toggle:()=>{}}),yP=()=>U.useContext(Tx),Px=typeof import.meta<"u"&&(ju==null?void 0:ju.VITE_GATEWAY_URL)||"http://localhost:18789",Wl=be.create({baseURL:Px,timeout:3e4});function xP(e){Wl.defaults.baseURL=e.replace(/\/$/,"")}const vP=new Aw({defaultOptions:{queries:{staleTime:5e3,retry:1,refetchOnWindowFocus:!1}}});function $s(){return Jg({queryKey:["gateway-status"],queryFn:async()=>(await Wl.get("/api/status")).data,refetchInterval:5e3,retry:!1})}function wP(){return Jg({queryKey:["cost-summary"],queryFn:async()=>(await Wl.get("/api/costs")).data,refetchInterval:3e4,retry:!1})}function kP(){return{id:"0",role:"assistant",timestamp:new Date().toISOString(),content:`🦅 **HyperClaw**
|
|
73
|
+
`))}function u(h,p,x,C){const m=x.enter("tableCell"),y=x.enter("phrasing"),g=x.containerPhrasing(h,{...C,before:l,after:l});return y(),m(),g}function a(h,p){return $2(h,{align:p,alignDelimiters:r,padding:n,stringLength:i})}function f(h,p,x){const C=h.children;let m=-1;const y=[],g=p.enter("table");for(;++m<C.length;)y[m]=c(C[m],p,x);return g(),y}function c(h,p,x){const C=h.children;let m=-1;const y=[],g=p.enter("tableRow");for(;++m<C.length;)y[m]=u(C[m],h,p,x);return g(),y}function d(h,p,x){let C=yx.inlineCode(h,p,x);return x.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function NT(){return{exit:{taskListCheckValueChecked:gp,taskListCheckValueUnchecked:gp,paragraph:IT}}}function _T(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:AT}}}function gp(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function IT(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let l=-1,o;for(;++l<i.length;){const s=i[l];if(s.type==="paragraph"){o=s;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function AT(e,t,n,r){const i=e.children[0],l=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);l&&s.move(o);let u=yx.listItem(e,t,n,{...r,...s.current()});return l&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,a)),u;function a(f){return f+o}}function LT(){return[d2(),A2(),F2(),CT(),NT()]}function DT(e){return{extensions:[h2(),L2(e),z2(),OT(e),_T()]}}const jT={tokenize:HT,partial:!0},xx={tokenize:$T,partial:!0},vx={tokenize:VT,partial:!0},wx={tokenize:QT,partial:!0},FT={tokenize:WT,partial:!0},kx={name:"wwwAutolink",tokenize:BT,previous:Cx},Sx={name:"protocolAutolink",tokenize:UT,previous:Ex},xn={name:"emailAutolink",tokenize:MT,previous:bx},Jt={};function zT(){return{text:Jt}}let er=48;for(;er<123;)Jt[er]=xn,er++,er===58?er=65:er===91&&(er=97);Jt[43]=xn;Jt[45]=xn;Jt[46]=xn;Jt[95]=xn;Jt[72]=[xn,Sx];Jt[104]=[xn,Sx];Jt[87]=[xn,kx];Jt[119]=[xn,kx];function MT(e,t,n){const r=this;let i,l;return o;function o(c){return!oc(c)||!bx.call(r,r.previous)||If(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(c))}function s(c){return oc(c)?(e.consume(c),s):c===64?(e.consume(c),u):n(c)}function u(c){return c===46?e.check(FT,f,a)(c):c===45||c===95||He(c)?(l=!0,e.consume(c),u):f(c)}function a(c){return e.consume(c),i=!0,u}function f(c){return l&&i&&Ke(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function BT(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!Cx.call(r,r.previous)||If(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(jT,e.attempt(xx,e.attempt(vx,l),n),n)(o))}function l(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function UT(e,t,n){const r=this;let i="",l=!1;return o;function o(c){return(c===72||c===104)&&Ex.call(r,r.previous)&&!If(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),s):n(c)}function s(c){if(Ke(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),s;if(c===58){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(c),u}return n(c)}function u(c){return c===47?(e.consume(c),l?a:(l=!0,u)):n(c)}function a(c){return c===null||fs(c)||ce(c)||Or(c)||zs(c)?n(c):e.attempt(xx,e.attempt(vx,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function HT(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),l):n(o)}function l(o){return o===null?n(o):t(o)}}function $T(e,t,n){let r,i,l;return o;function o(a){return a===46||a===95?e.check(wx,u,s)(a):a===null||ce(a)||Or(a)||a!==45&&zs(a)?u(a):(l=!0,e.consume(a),o)}function s(a){return a===95?r=!0:(i=r,r=void 0),e.consume(a),o}function u(a){return i||r||!l?n(a):t(a)}}function VT(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?l(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(wx,t,l)(o):o===null||ce(o)||Or(o)?t(o):(e.consume(o),i)}function l(o){return o===41&&r++,e.consume(o),i}}function QT(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),l):s===93?(e.consume(s),i):s===60||s===null||ce(s)||Or(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||ce(s)||Or(s)?t(s):r(s)}function l(s){return Ke(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):Ke(s)?(e.consume(s),o):n(s)}}function WT(e,t,n){return r;function r(l){return e.consume(l),i}function i(l){return He(l)?n(l):t(l)}}function Cx(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ce(e)}function Ex(e){return!Ke(e)}function bx(e){return!(e===47||oc(e))}function oc(e){return e===43||e===45||e===46||e===95||He(e)}function If(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const qT={tokenize:tP,partial:!0};function KT(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:JT,continuation:{tokenize:ZT},exit:eP}},text:{91:{name:"gfmFootnoteCall",tokenize:XT},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:GT,resolveTo:YT}}}}function GT(e,t,n){const r=this;let i=r.events.length;const l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){o=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return s;function s(u){if(!o||!o._balanced)return n(u);const a=Mt(r.sliceSerialize({start:o.end,end:r.now()}));return a.codePointAt(0)!==94||!l.includes(a.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function YT(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function XT(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l=0,o;return s;function s(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),u}function u(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",a)}function a(c){if(l>999||c===93&&!o||c===null||c===91||ce(c))return n(c);if(c===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(Mt(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return ce(c)||(o=!0),l++,e.consume(c),c===92?f:a}function f(c){return c===91||c===92||c===93?(e.consume(c),l++,a):a(c)}}function JT(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l,o=0,s;return u;function u(p){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),a}function a(p){return p===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(p)}function f(p){if(o>999||p===93&&!s||p===null||p===91||ce(p))return n(p);if(p===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return l=Mt(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return ce(p)||(s=!0),o++,e.consume(p),p===92?c:f}function c(p){return p===91||p===92||p===93?(e.consume(p),o++,f):f(p)}function d(p){return p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),i.includes(l)||i.push(l),le(e,h,"gfmFootnoteDefinitionWhitespace")):n(p)}function h(p){return t(p)}}function ZT(e,t,n){return e.check(Vl,t,e.attempt(qT,t,n))}function eP(e){e.exit("gfmFootnoteDefinition")}function tP(e,t,n){const r=this;return le(e,i,"gfmFootnoteDefinitionIndent",5);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(l):n(l)}}function nP(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:l,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,s){let u=-1;for(;++u<o.length;)if(o[u][0]==="enter"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._close){let a=u;for(;a--;)if(o[a][0]==="exit"&&o[a][1].type==="strikethroughSequenceTemporary"&&o[a][1]._open&&o[u][1].end.offset-o[u][1].start.offset===o[a][1].end.offset-o[a][1].start.offset){o[u][1].type="strikethroughSequence",o[a][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},o[a][1].start),end:Object.assign({},o[u][1].end)},c={type:"strikethroughText",start:Object.assign({},o[a][1].end),end:Object.assign({},o[u][1].start)},d=[["enter",f,s],["enter",o[a][1],s],["exit",o[a][1],s],["enter",c,s]],h=s.parser.constructs.insideSpan.null;h&>(d,d.length,0,Ms(h,o.slice(a+1,u),s)),gt(d,d.length,0,[["exit",c,s],["enter",o[u][1],s],["exit",o[u][1],s],["exit",f,s]]),gt(o,a-1,u-a+3,d),u=a+d.length-2;break}}for(u=-1;++u<o.length;)o[u][1].type==="strikethroughSequenceTemporary"&&(o[u][1].type="data");return o}function l(o,s,u){const a=this.previous,f=this.events;let c=0;return d;function d(p){return a===126&&f[f.length-1][1].type!=="characterEscape"?u(p):(o.enter("strikethroughSequenceTemporary"),h(p))}function h(p){const x=Ei(a);if(p===126)return c>1?u(p):(o.consume(p),c++,h);if(c<2&&!n)return u(p);const C=o.exit("strikethroughSequenceTemporary"),m=Ei(p);return C._open=!m||m===2&&!!x,C._close=!x||x===2&&!!m,s(p)}}}class rP{constructor(){this.map=[]}add(t,n,r){iP(this,t,n,r)}consume(t){if(this.map.sort(function(l,o){return l[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const l of i)t.push(l);i=r.pop()}this.map.length=0}}function iP(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function lP(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=r.length-1;r[l]=r[l]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function oP(){return{flow:{null:{name:"table",tokenize:sP,resolveAll:uP}}}}function sP(e,t,n){const r=this;let i=0,l=0,o;return s;function s(w){let N=r.events.length-1;for(;N>-1;){const q=r.events[N][1].type;if(q==="lineEnding"||q==="linePrefix")N--;else break}const j=N>-1?r.events[N][1].type:null,Q=j==="tableHead"||j==="tableRow"?T:u;return Q===T&&r.parser.lazy[r.now().line]?n(w):Q(w)}function u(w){return e.enter("tableHead"),e.enter("tableRow"),a(w)}function a(w){return w===124||(o=!0,l+=1),f(w)}function f(w){return w===null?n(w):V(w)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),h):n(w):Z(w)?le(e,f,"whitespace")(w):(l+=1,o&&(o=!1,i+=1),w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),o=!0,f):(e.enter("data"),c(w)))}function c(w){return w===null||w===124||ce(w)?(e.exit("data"),f(w)):(e.consume(w),w===92?d:c)}function d(w){return w===92||w===124?(e.consume(w),c):c(w)}function h(w){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(w):(e.enter("tableDelimiterRow"),o=!1,Z(w)?le(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):p(w))}function p(w){return w===45||w===58?C(w):w===124?(o=!0,e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),x):R(w)}function x(w){return Z(w)?le(e,C,"whitespace")(w):C(w)}function C(w){return w===58?(l+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),m):w===45?(l+=1,m(w)):w===null||V(w)?b(w):R(w)}function m(w){return w===45?(e.enter("tableDelimiterFiller"),y(w)):R(w)}function y(w){return w===45?(e.consume(w),y):w===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),g):(e.exit("tableDelimiterFiller"),g(w))}function g(w){return Z(w)?le(e,b,"whitespace")(w):b(w)}function b(w){return w===124?p(w):w===null||V(w)?!o||i!==l?R(w):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(w)):R(w)}function R(w){return n(w)}function T(w){return e.enter("tableRow"),O(w)}function O(w){return w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),O):w===null||V(w)?(e.exit("tableRow"),t(w)):Z(w)?le(e,O,"whitespace")(w):(e.enter("data"),I(w))}function I(w){return w===null||w===124||ce(w)?(e.exit("data"),O(w)):(e.consume(w),w===92?F:I)}function F(w){return w===92||w===124?(e.consume(w),I):I(w)}}function uP(e,t){let n=-1,r=!0,i=0,l=[0,0,0,0],o=[0,0,0,0],s=!1,u=0,a,f,c;const d=new rP;for(;++n<e.length;){const h=e[n],p=h[1];h[0]==="enter"?p.type==="tableHead"?(s=!1,u!==0&&(yp(d,t,u,a,f),f=void 0,u=0),a={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(n,0,[["enter",a,t]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(r=!0,c=void 0,l=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,f={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(n,0,[["enter",f,t]])),i=p.type==="tableDelimiterRow"?2:f?3:1):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(l[1]!==0&&(o[0]=o[1],c=xo(d,t,l,i,void 0,c),l=[0,0,0,0]),o[2]=n)):p.type==="tableCellDivider"&&(r?r=!1:(l[1]!==0&&(o[0]=o[1],c=xo(d,t,l,i,void 0,c)),l=o,o=[l[1],n,0,0])):p.type==="tableHead"?(s=!0,u=n):p.type==="tableRow"||p.type==="tableDelimiterRow"?(u=n,l[1]!==0?(o[0]=o[1],c=xo(d,t,l,i,n,c)):o[1]!==0&&(c=xo(d,t,o,i,n,c)),i=0):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(o[3]=n)}for(u!==0&&yp(d,t,u,a,f),d.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=lP(t.events,n))}return e}function xo(e,t,n,r,i,l){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(l.end=Object.assign({},zr(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const u=zr(t.events,n[1]);if(l={type:o,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const a=zr(t.events,n[2]),f=zr(t.events,n[3]),c={type:s,start:Object.assign({},a),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const d=t.events[n[2]],h=t.events[n[3]];if(d[1].end=Object.assign({},h[1].end),d[1].type="chunkText",d[1].contentType="text",n[3]>n[2]+1){const p=n[2]+1,x=n[3]-n[2]-1;e.add(p,x,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(l.end=Object.assign({},zr(t.events,i)),e.add(i,0,[["exit",l,t]]),l=void 0),l}function yp(e,t,n,r,i){const l=[],o=zr(t.events,n);i&&(i.end=Object.assign({},o),l.push(["exit",i,t])),r.end=Object.assign({},o),l.push(["exit",r,t]),e.add(n+1,0,l)}function zr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const aP={name:"tasklistCheck",tokenize:fP};function cP(){return{text:{91:aP}}}function fP(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),l)}function l(u){return ce(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),o):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),o):n(u)}function o(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(u)}function s(u){return V(u)?t(u):Z(u)?e.check({tokenize:dP},t,n)(u):n(u)}}function dP(e,t,n){return le(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function hP(e){return Dy([zT(),KT(),nP(e),oP(),cP()])}const pP={};function mP(e){const t=this,n=e||pP,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),l=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(hP(n)),l.push(LT()),o.push(DT(n))}const ju={},gP="5.4.0",Tx=U.createContext({isDark:!0,toggle:()=>{}}),yP=()=>U.useContext(Tx),Px=typeof import.meta<"u"&&(ju==null?void 0:ju.VITE_GATEWAY_URL)||"http://localhost:18789",Wl=be.create({baseURL:Px,timeout:3e4});function xP(e){Wl.defaults.baseURL=e.replace(/\/$/,"")}const vP=new Aw({defaultOptions:{queries:{staleTime:5e3,retry:1,refetchOnWindowFocus:!1}}});function $s(){return Jg({queryKey:["gateway-status"],queryFn:async()=>(await Wl.get("/api/status")).data,refetchInterval:5e3,retry:!1})}function wP(){return Jg({queryKey:["cost-summary"],queryFn:async()=>(await Wl.get("/api/costs")).data,refetchInterval:3e4,retry:!1})}function kP(){return{id:"0",role:"assistant",timestamp:new Date().toISOString(),content:`🦅 **HyperClaw**
|
|
74
74
|
|
|
75
75
|
Welcome. Your gateway agent is ready — type or speak a message to begin.`}}function SP(){const e=_s(),[t,n]=U.useState([kP()]),[r,i]=U.useState(!1),l=Ww({mutationFn:async({message:o,thinking:s})=>(await Wl.post("/api/chat",{message:o,thinking:s})).data,onMutate:async({message:o})=>{n(s=>[...s,{id:Date.now().toString(),role:"user",content:o,timestamp:new Date().toISOString()}]),i(!0)},onSuccess:o=>{n(s=>[...s,{id:(Date.now()+1).toString(),role:"assistant",content:o.response||o.text||"(empty)",timestamp:new Date().toISOString(),thinking:o.thinking,toolCalls:o.toolCalls}]),i(!1),e.invalidateQueries({queryKey:["gateway-status"]})},onError:()=>{n(o=>[...o,{id:(Date.now()+1).toString(),role:"assistant",timestamp:new Date().toISOString(),content:"_⚠️ Gateway unreachable. Start with: `hyperclaw daemon start`_"}]),i(!1)}});return{messages:t,sendMutation:l,streaming:r,clearChat:()=>n([])}}function CP(e){const[t,n]=U.useState(!1),r=U.useRef(null),i=typeof window<"u"&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window),l=U.useCallback(()=>{if(!i||t)return;const s=window.SpeechRecognition||window.webkitSpeechRecognition,u=new s;u.lang="el-GR",u.continuous=!1,u.interimResults=!0,u.onstart=()=>n(!0),u.onend=()=>n(!1),u.onerror=()=>n(!1),u.onresult=a=>e(Array.from(a.results).map(f=>f[0].transcript).join("")),u.start(),r.current=u},[i,t,e]),o=U.useCallback(()=>{var s;(s=r.current)==null||s.stop(),n(!1)},[]);return{listening:t,start:l,stop:o,supported:i}}function EP(e){if(!("speechSynthesis"in window))return;window.speechSynthesis.cancel();const t=new SpeechSynthesisUtterance(e.replace(/[#*`_~[\]()>]/g,"").replace(/\n+/g," ").slice(0,500));t.lang="el-GR",t.rate=1.05,window.speechSynthesis.speak(t)}const Af=[{id:"",name:"General",prompt:"",color:"var(--text3)"},{id:"ethical-hacker",name:"Ethical Hacker",prompt:"Act as an ethical hacker / security researcher. Authorized testing only. ",color:"#ef4444"},{id:"hyperclaw",name:"HyperClaw Dev",prompt:"You are helping with HyperClaw development. Be concise and code-focused. ",color:"var(--accent2)"},{id:"osint",name:"OSINT",prompt:"Act as an OSINT analyst. Passive reconnaissance, open-source research. ",color:"#8b5cf6"}];function bP(e){var n;const t=Af.find(r=>r.id===e);if(t)return t.name;try{return((n=JSON.parse(localStorage.getItem("hc_projects")||"[]").find(r=>r.id===e))==null?void 0:n.name)||"General"}catch{return"General"}}function TP(e){var n;const t=Af.find(r=>r.id===e);if(t)return t.prompt;try{return(((n=JSON.parse(localStorage.getItem("hc_projects")||"[]").find(r=>r.id===e))==null?void 0:n.prompt)||"")+" "}catch{return""}}const ht={Plus:()=>S.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:S.jsx("path",{d:"M6 1v10M1 6h10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),Search:()=>S.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:[S.jsx("circle",{cx:"5",cy:"5",r:"3.5",stroke:"currentColor",strokeWidth:"1.2"}),S.jsx("path",{d:"M8 8l3 3",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]}),Settings:()=>S.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none",children:[S.jsx("circle",{cx:"6.5",cy:"6.5",r:"2",stroke:"currentColor",strokeWidth:"1.2"}),S.jsx("path",{d:"M6.5 1v1.2M6.5 10.8V12M1 6.5h1.2M10.8 6.5H12M2.7 2.7l.85.85M9.45 9.45l.85.85M2.7 10.3l.85-.85M9.45 3.55l.85-.85",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]}),Terminal:()=>S.jsx("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none",children:S.jsx("path",{d:"M1.5 2L5.5 6.5L1.5 11M7 11H11.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})}),Close:()=>S.jsx("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none",children:S.jsx("path",{d:"M1.5 1.5l10 10M11.5 1.5l-10 10",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})}),Sun:()=>S.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[S.jsx("circle",{cx:"7",cy:"7",r:"2.5",stroke:"currentColor",strokeWidth:"1.3"}),S.jsx("path",{d:"M7 1v1.5M7 11.5V13M1 7h1.5M11.5 7H13M2.6 2.6l1.1 1.1M10.3 10.3l1.1 1.1M2.6 11.4l1.1-1.1M10.3 3.7l1.1-1.1",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]}),Moon:()=>S.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:S.jsx("path",{d:"M11.5 8.5A5.5 5.5 0 015.5 2.5 5.5 5.5 0 1011.5 8.5z",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round"})}),Mic:({on:e})=>S.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[S.jsx("rect",{x:"4.5",y:"1",width:"5",height:"7",rx:"2.5",stroke:"currentColor",strokeWidth:"1.3",fill:e?"currentColor":"none",fillOpacity:e?".3":"0"}),S.jsx("path",{d:"M2 7c0 2.76 2.24 5 5 5s5-2.24 5-5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"}),S.jsx("line",{x1:"7",y1:"12",x2:"7",y2:"13",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]}),Speaker:({on:e})=>S.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[S.jsx("path",{d:"M2 5h2.5L8 2v10L4.5 9H2V5z",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round",fill:e?"currentColor":"none",fillOpacity:e?".25":"0"}),S.jsx("path",{d:"M10 4.5a3.5 3.5 0 010 5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]}),Chat:()=>S.jsx("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none",children:S.jsx("path",{d:"M2 2h9v8H7L4.5 12V10H2V2z",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"})}),Send:()=>S.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",children:S.jsx("path",{d:"M7.5 12V3M3.5 7l4-4 4 4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})};function PP({onSave:e,onClose:t}){const[n,r]=U.useState(""),[i,l]=U.useState(""),[o,s]=U.useState("#22d3ee");return S.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{background:"rgba(0,0,0,0.6)",backdropFilter:"blur(6px)"},onClick:t,children:S.jsxs("div",{className:"card w-96 max-w-[90vw] rounded-2xl p-6",style:{background:"var(--bg2)"},onClick:u=>u.stopPropagation(),children:[S.jsx("div",{className:"text-sm font-semibold mb-5",style:{color:"var(--text)"},children:"✦ New Project / Agent"}),S.jsx("label",{className:"text-xs mb-1 block",style:{color:"var(--text3)"},children:"Name"}),S.jsx("input",{value:n,onChange:u=>r(u.target.value),placeholder:"e.g. Bug Hunter",className:"input-base w-full rounded-lg px-3 py-2 text-sm mb-3"}),S.jsx("label",{className:"text-xs mb-1 block",style:{color:"var(--text3)"},children:"System prompt"}),S.jsx("textarea",{value:i,onChange:u=>l(u.target.value),rows:3,placeholder:"You are a security researcher…",className:"input-base w-full rounded-lg px-3 py-2 text-sm mb-3 resize-none"}),S.jsx("label",{className:"text-xs mb-1 block",style:{color:"var(--text3)"},children:"Accent color"}),S.jsx("input",{type:"color",value:o,onChange:u=>s(u.target.value),className:"w-full h-9 rounded-lg px-2 mb-4 cursor-pointer",style:{background:"var(--bg3)",border:"1px solid var(--border)"}}),S.jsxs("div",{className:"flex gap-2 justify-end",children:[S.jsx("button",{onClick:t,className:"btn-ghost text-xs px-4 py-2 rounded-lg",children:"Cancel"}),S.jsx("button",{onClick:()=>{n.trim()&&e({id:"custom-"+Date.now(),name:n.trim(),prompt:i,color:o})},className:"btn-primary text-xs px-4 py-2 rounded-lg",children:"Create"})]})]})})}const RP=[{page:"dashboard",label:"Dashboard",icon:S.jsx("span",{children:"📊"})},{page:"canvas",label:"Canvas",icon:S.jsx("span",{children:"🎨"})},{page:"hub",label:"Skills",icon:S.jsx("span",{children:"🧩"})},{page:"memory",label:"Memory",icon:S.jsx("span",{children:"🧠"})},{page:"settings",label:"Settings",icon:S.jsx(ht.Settings,{})}];function OP({page:e,setPage:t,activeProject:n,setActiveProject:r,onNewChat:i}){const{data:l,isError:o}=$s(),{isDark:s,toggle:u}=yP(),[a,f]=U.useState(""),[c,d]=U.useState(!1),[h,p]=U.useState(()=>{try{return JSON.parse(localStorage.getItem("hc_projects")||"[]")}catch{return[]}}),[x]=U.useState(()=>{try{return JSON.parse(localStorage.getItem("hc_history")||"[]")}catch{return[]}}),C=[...Af,...h],m=x.filter(g=>!a||g.title.toLowerCase().includes(a.toLowerCase())),y=g=>{const b=[...h,g];p(b),localStorage.setItem("hc_projects",JSON.stringify(b)),d(!1),r(g.id)};return S.jsxs(S.Fragment,{children:[c&&S.jsx(PP,{onSave:y,onClose:()=>d(!1)}),S.jsxs("aside",{className:"sidebar-bg w-56 flex-shrink-0 flex flex-col h-screen overflow-hidden",style:{borderRight:"1px solid var(--border)"},children:[S.jsxs("div",{className:"px-3 pt-3 pb-2 flex-shrink-0",children:[S.jsxs("div",{className:"flex items-center justify-between px-2 py-1 mb-2",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("img",{src:"/icon.png",alt:"",className:"w-6 h-6 rounded-md"}),S.jsx("span",{className:"text-sm font-semibold",style:{color:"var(--text)"},children:"HyperClaw"})]}),S.jsx("button",{onClick:u,title:"Toggle theme",className:"p-1.5 rounded-lg transition-colors nav-item",children:s?S.jsx(ht.Sun,{}):S.jsx(ht.Moon,{})})]}),S.jsxs("button",{onClick:i,className:"w-full flex items-center gap-2 px-3 py-2 rounded-lg text-xs mb-1 font-medium transition-colors",style:{background:"var(--accentBg)",color:"var(--accent)",border:"1px solid var(--accentBorder)"},onMouseEnter:g=>g.currentTarget.style.opacity=".8",onMouseLeave:g=>g.currentTarget.style.opacity="1",children:[S.jsx(ht.Plus,{})," New chat"]}),S.jsxs("div",{className:"relative mb-1",children:[S.jsx("span",{className:"absolute left-2.5 top-1/2 -translate-y-1/2 pointer-events-none",style:{color:"var(--text3)"},children:S.jsx(ht.Search,{})}),S.jsx("input",{value:a,onChange:g=>f(g.target.value),placeholder:"Search…",className:"input-base w-full rounded-lg pl-7 pr-3 py-1.5 text-xs"})]}),S.jsxs("button",{onClick:()=>d(!0),className:"nav-item w-full flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs",children:[S.jsx(ht.Settings,{})," Customize"]})]}),S.jsxs("div",{className:"px-3 pt-1 pb-1 flex-shrink-0",children:[S.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest px-2 mb-1.5",style:{color:"var(--text3)"},children:"Projects"}),C.map(g=>S.jsxs("button",{onClick:()=>{r(g.id),t("chat")},className:`w-full flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs text-left transition-colors ${n===g.id?"nav-active":"nav-item"}`,children:[S.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{background:g.color==="var(--accent2)"||g.color==="var(--text3)"?"var(--accent2)":g.color}}),S.jsx("span",{className:"truncate",children:g.name})]},g.id)),S.jsxs("button",{onClick:()=>d(!0),className:"nav-item w-full flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs mt-0.5",style:{color:"var(--text3)"},children:[S.jsx(ht.Plus,{})," New project…"]})]}),S.jsxs("div",{className:"flex-1 overflow-y-auto px-3 pt-1 min-h-0",children:[S.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest px-2 mb-1.5",style:{color:"var(--text3)"},children:"Chats"}),m.length===0?S.jsx("div",{className:"text-xs px-3 py-1",style:{color:"var(--border2)"},children:a?"No results":"No recent chats"}):m.slice(0,20).map(g=>S.jsxs("button",{onClick:()=>t("chat"),className:"nav-item w-full flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs text-left truncate",children:[S.jsx(ht.Chat,{}),S.jsx("span",{className:"truncate",style:{color:"var(--text2)"},children:g.title})]},g.id))]}),S.jsx("div",{className:"px-3 pb-2 pt-1 flex-shrink-0",style:{borderTop:"1px solid var(--border)"},children:RP.map(({page:g,label:b,icon:R})=>S.jsxs("button",{onClick:()=>t(g),className:`w-full flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs transition-colors ${e===g?"nav-active":"nav-item"}`,children:[R,S.jsx("span",{children:b})]},g))}),S.jsxs("div",{className:"px-4 py-2.5 flex-shrink-0",style:{borderTop:"1px solid var(--border)"},children:[S.jsxs("div",{className:`inline-flex items-center gap-1.5 text-xs font-medium ${l&&!o?"accent-text":"text-red-400"}`,children:[S.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${l&&!o?"animate-pulse":""}`,style:{background:l&&!o?"var(--accent)":"#ef4444"}}),l&&!o?"✓ Online":"✗ Offline"]}),(l==null?void 0:l.model)&&S.jsx("div",{className:"text-[10px] mt-0.5 truncate font-mono",style:{color:"var(--text3)"},children:l.model})]})]})]})}function NP({activeProject:e}){const{messages:t,sendMutation:n,streaming:r,clearChat:i}=SP(),[l,o]=U.useState(""),[s,u]=U.useState("none"),[a,f]=U.useState(0),[c,d]=U.useState(!1),[h,p]=U.useState(!1),[x,C]=U.useState(!1),m=U.useRef(null),y=U.useRef(null),{listening:g,start:b,stop:R,supported:T}=CP(U.useCallback(w=>o(w),[]));U.useEffect(()=>{var w;(w=m.current)==null||w.scrollIntoView({behavior:"smooth"})},[t.length,r]),U.useEffect(()=>{if(!r){f(0);return}f(0);const w=setInterval(()=>f(N=>N+1),1e3);return()=>clearInterval(w)},[r]);const O=t[t.length-1];U.useEffect(()=>{h&&!r&&(O==null?void 0:O.role)==="assistant"&&O.id!=="0"&&EP(O.content)},[O==null?void 0:O.id,r,h]);const I=U.useCallback(()=>{if(!l.trim()||n.isPending)return;const w=l.trim(),N=TP(e);if(n.mutate({message:N?N+w:w,thinking:s}),!x){C(!0);try{const j=JSON.parse(localStorage.getItem("hc_history")||"[]");j.unshift({id:Date.now().toString(),title:w.slice(0,40),ts:Date.now()}),localStorage.setItem("hc_history",JSON.stringify(j.slice(0,30)))}catch{}}o(""),y.current&&(y.current.style.height="auto")},[l,s,e,n,x]),F=({onClick:w,active:N,children:j,title:Q})=>S.jsx("button",{onClick:w,title:Q,className:"flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-lg transition-colors",style:{border:N?"1px solid var(--accentBorder)":"1px solid var(--border)",background:N?"var(--accentBg)":"transparent",color:N?"var(--accent)":"var(--text3)"},onMouseEnter:q=>{N||(q.currentTarget.style.background="var(--bg3)",q.currentTarget.style.color="var(--text2)")},onMouseLeave:q=>{N||(q.currentTarget.style.background="transparent",q.currentTarget.style.color="var(--text3)")},children:j});return S.jsxs("div",{className:"flex flex-col h-full",children:[S.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 flex-shrink-0",style:{borderBottom:"1px solid var(--border)",background:"var(--header)"},children:[S.jsx("span",{className:"text-sm font-medium",style:{color:"var(--text2)"},children:bP(e)}),S.jsxs("div",{className:"flex items-center gap-1.5",children:[S.jsx(F,{onClick:i,children:"Clear"}),T&&S.jsxs(F,{onClick:()=>p(w=>!w),active:h,title:"Toggle voice output",children:[S.jsx(ht.Speaker,{on:h})," Voice"]}),S.jsxs(F,{onClick:()=>d(w=>!w),active:c,title:"Toggle terminal",children:[S.jsx(ht.Terminal,{})," Terminal"]})]})]}),S.jsxs("div",{className:"msgs-bg flex-1 overflow-y-auto px-4 py-5 space-y-4 min-h-0",children:[S.jsxs("div",{className:"flex flex-col items-center pt-4 pb-3 flex-shrink-0 select-none pointer-events-none",style:{opacity:.45},children:[S.jsx("div",{style:{fontFamily:"'JetBrains Mono', monospace",fontWeight:700,fontSize:"2.4rem",letterSpacing:"0.3em",color:"var(--accent)",textShadow:"0 0 32px var(--accent), 0 0 64px var(--accentBg)",lineHeight:1},children:"HYPERCLAW"}),S.jsxs("div",{style:{fontFamily:"'JetBrains Mono', monospace",fontSize:"11px",color:"var(--accent)",letterSpacing:"0.25em",marginTop:"8px",opacity:.75},children:["HyperClaw Bot · AI Gateway v",gP]})]}),t.map(w=>S.jsxs("div",{className:`msg-in flex ${w.role==="user"?"justify-end":"justify-start"}`,children:[w.role==="assistant"&&S.jsx("div",{className:"w-7 h-7 rounded-full flex items-center justify-center text-sm mr-2.5 flex-shrink-0 mt-0.5 accent-bg-sm",style:{border:"1px solid var(--accentBorder)"},children:"🦅"}),S.jsxs("div",{className:`max-w-2xl rounded-2xl px-4 py-3 text-sm ${w.role==="user"?"bubble-user rounded-tr-sm":"bubble-asst rounded-tl-sm"}`,children:[w.thinking&&S.jsxs("div",{className:"text-xs mb-2 pb-2 font-mono",style:{color:"var(--text3)",borderBottom:"1px solid var(--border)"},children:["💭 ",w.thinking.slice(0,120),"…"]}),w.toolCalls&&w.toolCalls.length>0&&S.jsx("div",{className:"mb-2 space-y-1",children:w.toolCalls.map((N,j)=>{var Q;return S.jsxs("div",{className:"text-xs rounded px-2 py-1 font-mono",style:{background:"var(--bg3)",border:"1px solid var(--border)"},children:["🔧 ",S.jsx("span",{className:"accent-text",children:N.name}),S.jsxs("span",{style:{color:"var(--text3)"},children:[" → ",(Q=N.result)==null?void 0:Q.slice(0,60)]})]},j)})}),S.jsx(n2,{remarkPlugins:[mP],components:{code({className:N,children:j,...Q}){return(N==null?void 0:N.includes("language-"))?S.jsx("pre",{className:"rounded-lg p-3 overflow-x-auto my-2 text-xs font-mono",style:{background:"var(--bg)",border:"1px solid var(--border)"},children:S.jsx("code",{className:N,children:j})}):S.jsx("code",{className:"rounded px-1.5 py-0.5 text-xs font-mono accent-text",style:{background:"var(--bg3)"},...Q,children:j})},a({children:N,href:j}){return S.jsx("a",{href:j,target:"_blank",rel:"noopener noreferrer",className:"accent-text underline",children:N})},ul({children:N}){return S.jsx("ul",{className:"list-disc list-inside space-y-0.5 my-1",children:N})},ol({children:N}){return S.jsx("ol",{className:"list-decimal list-inside space-y-0.5 my-1",children:N})},strong({children:N}){return S.jsx("strong",{className:"font-bold",children:N})},h1({children:N}){return S.jsx("h1",{className:"text-base font-bold mt-2 mb-1",children:N})},h2({children:N}){return S.jsx("h2",{className:"text-sm font-bold mt-2 mb-1",children:N})},h3({children:N}){return S.jsx("h3",{className:"text-sm font-semibold mt-1 mb-0.5",children:N})},blockquote({children:N}){return S.jsx("blockquote",{className:"pl-3 my-1",style:{borderLeft:"2px solid var(--border2)",color:"var(--text2)"},children:N})}},children:w.content}),S.jsx("div",{className:"text-xs mt-1.5 text-right tabular-nums",style:{color:"var(--text3)",opacity:.5},children:new Date(w.timestamp).toLocaleTimeString()})]})]},w.id)),r&&S.jsxs("div",{className:"msg-in flex items-center gap-2.5",children:[S.jsx("div",{className:"w-7 h-7 rounded-full flex items-center justify-center text-sm accent-bg-sm",style:{border:"1px solid var(--accentBorder)"},children:"🦅"}),S.jsxs("div",{className:"bubble-asst rounded-2xl rounded-tl-sm px-4 py-3 flex items-center gap-2",children:[S.jsx("span",{className:"w-1.5 h-1.5 rounded-full accent-bg typing-dot-1",style:{background:"var(--accent)"}}),S.jsx("span",{className:"w-1.5 h-1.5 rounded-full accent-bg typing-dot-2",style:{background:"var(--accent)"}}),S.jsx("span",{className:"w-1.5 h-1.5 rounded-full accent-bg typing-dot-3",style:{background:"var(--accent)"}}),S.jsx("span",{className:"text-xs ml-1",style:{color:"var(--text3)"},children:a>0?`${a}s`:"Thinking…"})]})]}),S.jsx("div",{ref:m})]}),S.jsxs("div",{className:"input-glow px-4 pt-3 pb-4 flex-shrink-0",style:{background:"var(--header)",borderTop:"1px solid var(--border)"},children:[S.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[S.jsx("span",{className:"text-xs",style:{color:"var(--text3)"},children:"Thinking:"}),["none","low","medium","high"].map(w=>S.jsx("button",{onClick:()=>u(w),className:"text-xs px-2 py-0.5 rounded-md transition-all",style:{background:s===w?"var(--bg4)":"transparent",color:s===w?"var(--text)":"var(--text3)"},children:w},w))]}),S.jsxs("div",{className:"flex gap-2 items-end",children:[S.jsx("textarea",{ref:y,value:l,onChange:w=>o(w.target.value),onKeyDown:w=>w.key==="Enter"&&!w.shiftKey&&(w.preventDefault(),I()),rows:1,placeholder:"Ask HyperClaw anything… Enter to send · Shift+Enter new line",className:"input-base flex-1 resize-none rounded-xl px-4 py-3 text-sm",style:{minHeight:"48px",maxHeight:"140px"},onInput:w=>{const N=w.target;N.style.height="auto",N.style.height=Math.min(N.scrollHeight,140)+"px"}}),T&&S.jsx("button",{onClick:g?R:b,title:g?"Stop":"Voice input",className:`w-10 h-10 rounded-xl flex items-center justify-center flex-shrink-0 mb-0.5 transition-all ${g?"mic-active":""}`,style:{background:g?"var(--accentBg)":"var(--bg3)",border:`1px solid ${g?"var(--accentBorder)":"var(--border)"}`,color:g?"var(--accent)":"var(--text3)"},children:S.jsx(ht.Mic,{on:g})}),S.jsx("button",{onClick:I,disabled:!l.trim()||n.isPending,className:"btn-primary w-10 h-10 rounded-xl flex items-center justify-center flex-shrink-0 mb-0.5",children:S.jsx(ht.Send,{})})]}),g&&S.jsxs("div",{className:"mt-1.5 text-xs flex items-center gap-1.5 animate-pulse accent-text",children:[S.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{background:"var(--accent)"}}),"Listening… speak now"]})]}),S.jsx(_P,{open:c,onClose:()=>d(!1)})]})}function _P({open:e,onClose:t}){const[n,r]=U.useState(""),[i,l]=U.useState([]),[o,s]=U.useState(!1),[u,a]=U.useState(""),f=U.useRef(null),c=U.useRef(null);U.useEffect(()=>{var x;(x=f.current)==null||x.scrollTo({top:f.current.scrollHeight})},[i.length]),U.useEffect(()=>{e&&setTimeout(()=>{var x;return(x=c.current)==null?void 0:x.focus()},50)},[e]);const d=U.useCallback(async x=>{const C=x.trim();if(!(!C||o)){r(""),l(m=>[...m,`$ ${C}`]),s(!0);try{const{data:m}=await Wl.post("/api/terminal",{command:C});(m.user||m.cwd)&&a(`${m.user??"user"}@${m.hostname??"local"}:${m.cwd??""}`),m.stdout&&l(y=>[...y,m.stdout.trimEnd()]),m.stderr&&l(y=>[...y,`ERR:${m.stderr.trimEnd()}`]),!m.stdout&&!m.stderr&&l(y=>[...y,`(exit ${m.code??0})`])}catch(m){l(y=>{var g,b;return[...y,`Error: ${((b=(g=m==null?void 0:m.response)==null?void 0:g.data)==null?void 0:b.error)||(m==null?void 0:m.message)||String(m)}`]})}finally{s(!1),setTimeout(()=>{var m;return(m=c.current)==null?void 0:m.focus()},0)}}},[o]),h=()=>{n.trim()&&d(n)},p=[{label:"npm install",cmd:"npm install"},{label:"npm run build",cmd:"npm run build"},{label:"npm test",cmd:"npm test"},{label:"doctor --fix",cmd:"npx hyperclaw doctor --fix"},{label:"gateway status",cmd:"npx hyperclaw gateway status"}];return e?S.jsxs("div",{className:"flex flex-col flex-shrink-0",style:{height:220,borderTop:"1px solid var(--border)",background:"var(--bg2)"},children:[S.jsxs("div",{className:"flex items-center justify-between px-4 py-1.5 flex-shrink-0",style:{background:"var(--bg3)",borderBottom:"1px solid var(--border)"},children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("div",{className:"flex gap-1.5",children:["#ff5f57","#febc2e","#28c840"].map(x=>S.jsx("div",{className:"w-2.5 h-2.5 rounded-full",style:{background:x,opacity:.7}},x))}),S.jsx("span",{className:"text-xs font-mono ml-1",style:{color:"var(--text3)"},children:u||"Terminal — HyperClaw"}),o&&S.jsx("span",{className:"text-xs animate-pulse",style:{color:"#fbbf24"},children:"● running"})]}),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("button",{onClick:()=>l([]),className:"text-xs transition-colors",style:{color:"var(--text3)"},children:"clear"}),S.jsx("button",{onClick:t,className:"transition-colors",style:{color:"var(--text3)"},children:S.jsx(ht.Close,{})})]})]}),S.jsx("div",{className:"flex gap-1.5 px-3 py-1.5 flex-shrink-0 overflow-x-auto",style:{borderBottom:"1px solid var(--border)"},children:p.map(({label:x,cmd:C})=>S.jsx("button",{onClick:()=>void d(C),disabled:o,title:C,className:"btn-ghost text-xs px-2.5 py-1 rounded-md font-mono whitespace-nowrap flex-shrink-0 disabled:opacity-40 transition-colors",children:x},x))}),S.jsx("div",{ref:f,className:"flex-1 overflow-y-auto px-4 py-2 font-mono text-xs space-y-0.5 min-h-0",style:{color:"var(--text2)"},children:i.length===0?S.jsx("span",{style:{color:"var(--border2)"},children:"Use the buttons above or type a command."}):i.map((x,C)=>S.jsx("div",{style:{color:x.startsWith("$")?"var(--accent)":x.startsWith("ERR:")||x.startsWith("Error")?"#f87171":"var(--text2)"},children:x.startsWith("ERR:")?x.slice(4):x},C))}),S.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 flex-shrink-0",style:{borderTop:"1px solid var(--border)",background:"var(--bg3)"},children:[S.jsx("span",{className:"font-mono text-xs flex-shrink-0 accent-text",children:"›"}),S.jsx("input",{ref:c,value:n,onChange:x=>r(x.target.value),onKeyDown:x=>x.key==="Enter"&&h(),placeholder:"Run a command…",disabled:o,className:"flex-1 bg-transparent text-xs font-mono outline-none disabled:opacity-50",style:{color:"var(--text)",caretColor:"var(--accent)"}}),o&&S.jsx("div",{className:"w-3 h-3 rounded-full border border-t-transparent animate-spin flex-shrink-0",style:{borderColor:"#fbbf24",borderTopColor:"transparent"}})]})]}):null}function IP(){var i;const{data:e,isLoading:t,isError:n}=$s(),{data:r}=wP();return t?S.jsx("div",{className:"p-8 text-sm",style:{color:"var(--text3)"},children:"Loading…"}):S.jsxs("div",{className:"p-6 space-y-4 overflow-y-auto",children:[S.jsxs("div",{className:"rounded-2xl p-5 flex items-center justify-between",style:{background:"var(--accentBg)",border:"1px solid var(--accentBorder)"},children:[S.jsxs("div",{children:[S.jsx("div",{className:"text-xs uppercase tracking-wider flex items-center gap-1 accent-text",children:"🦅 HyperClaw Dashboard"}),S.jsx("div",{className:"mt-1 text-xl font-bold",children:(e==null?void 0:e.agentName)||"Your gateway agent"}),S.jsx("div",{className:"mt-0.5 text-xs",style:{color:"var(--text2)"},children:e?`${n?"Offline":"Online"} · ${e.model} · :${e.port}`:"Waiting…"})]}),S.jsxs("div",{className:`inline-flex items-center gap-1.5 text-xs font-medium ${e&&!n?"accent-text":"text-red-400"}`,children:[S.jsx("span",{className:"w-1.5 h-1.5 rounded-full animate-pulse",style:{background:e&&!n?"var(--accent)":"#ef4444"}}),e&&!n?"✓ Online":"✗ Offline"]})]}),S.jsx("div",{className:"grid grid-cols-3 gap-3",children:[{label:"Gateway",value:n?"Offline":"Online",accent:!0,icon:"📡"},{label:"Channels",value:String(((i=e==null?void 0:e.channels)==null?void 0:i.length)||0),accent:!0,icon:"📱"},{label:"Sessions",value:String((e==null?void 0:e.sessions)||0),accent:!1,icon:"👥"}].map(l=>S.jsxs("div",{className:"card rounded-xl",children:[S.jsxs("div",{className:"text-xs flex items-center gap-1.5 mb-2",style:{color:"var(--text3)"},children:[l.icon," ",l.label]}),S.jsx("div",{className:`text-2xl font-bold ${l.accent?"accent-text":""}`,style:l.accent?{}:{color:"var(--text)"},children:l.value})]},l.label))}),e&&S.jsxs("div",{className:"card rounded-xl",children:[S.jsx("div",{className:"text-xs uppercase tracking-wider mb-3",style:{color:"var(--text3)"},children:"Gateway Info"}),[["Port",String(e.port)],["Model",e.model],["Agent",e.agentName],["Uptime",e.uptime]].map(([l,o])=>S.jsxs("div",{className:"flex justify-between text-sm py-1.5",style:{borderBottom:"1px solid var(--border)"},children:[S.jsx("span",{style:{color:"var(--text3)"},children:l}),S.jsx("span",{className:"font-mono text-xs",style:{color:"var(--text2)"},children:o})]},l))]}),(r==null?void 0:r.summary)&&(r.summary.totalRuns??0)>0&&S.jsxs("div",{className:"card rounded-xl",children:[S.jsx("div",{className:"text-xs uppercase tracking-wider mb-3",style:{color:"var(--text3)"},children:"💰 Cost"}),S.jsx("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[["Runs",String(r.summary.totalRuns)],["Input",(r.summary.totalInput??0).toLocaleString()],["Output",(r.summary.totalOutput??0).toLocaleString()],["USD","$"+(r.summary.totalCostUsd??0).toFixed(4)]].map(([l,o])=>S.jsxs("div",{children:[S.jsx("span",{style:{color:"var(--text3)"},children:l}),S.jsx("div",{className:"font-mono accent-text",children:o})]},l))})]})]})}function Fu({title:e,icon:t,desc:n,cmd:r}){return S.jsx("div",{className:"flex-1 flex items-center justify-center p-8 text-center",children:S.jsxs("div",{children:[S.jsx("div",{className:"text-5xl mb-4",children:t}),S.jsx("h2",{className:"text-lg font-bold mb-2",style:{color:"var(--text2)"},children:e}),S.jsx("p",{className:"text-sm max-w-xs",style:{color:"var(--text3)"},children:n}),r&&S.jsxs("div",{className:"mt-4 inline-block font-mono text-xs rounded-lg px-4 py-2 accent-text",style:{background:"var(--bg3)"},children:["$ ",r]})]})})}function AP(){const{data:e}=$s(),t=_s(),[n,r]=U.useState(Px),[i,l]=U.useState(!1),o=U.useCallback(()=>{xP(n),t.invalidateQueries(),l(!0),setTimeout(()=>l(!1),1500)},[n,t]);return S.jsxs("div",{className:"p-6 space-y-4 overflow-y-auto",children:[S.jsx("h2",{className:"text-lg font-bold flex items-center gap-2",style:{color:"var(--text2)"},children:"⚙️ Settings"}),S.jsxs("div",{className:"card rounded-xl space-y-3",children:[S.jsx("div",{className:"text-xs uppercase tracking-wider",style:{color:"var(--text3)"},children:"Gateway Connection"}),S.jsxs("div",{children:[S.jsx("label",{className:"text-xs mb-1 block",style:{color:"var(--text3)"},children:"Gateway URL"}),S.jsxs("div",{className:"flex gap-2",children:[S.jsx("input",{value:n,onChange:s=>r(s.target.value),onKeyDown:s=>s.key==="Enter"&&o(),className:"input-base flex-1 rounded-lg px-3 py-2 text-sm"}),S.jsx("button",{onClick:o,className:`px-3 py-2 rounded-lg text-xs font-medium transition-all text-white ${i?"bg-green-600":"btn-primary"}`,children:i?"✓":"Apply"})]})]}),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:e?"var(--accent)":"#ef4444",animation:e?"pulse 2s infinite":"none"}}),S.jsx("span",{className:"text-xs",style:{color:"var(--text3)"},children:e?`Connected · port ${e.port}`:"Disconnected"})]})]})]})}function LP(){const[e,t]=U.useState("chat"),[n,r]=U.useState(""),[i,l]=U.useState(0),[o,s]=U.useState(()=>{try{return localStorage.getItem("hc_theme")!=="light"}catch{return!0}}),{data:u}=$s(),a=!!(u!=null&&u.daemonMode),f=U.useCallback(()=>{s(h=>{const p=!h;try{localStorage.setItem("hc_theme",p?"dark":"light")}catch{}return p})},[]);U.useEffect(()=>{document.documentElement.setAttribute("data-theme",o?"dark":"light"),document.documentElement.setAttribute("data-daemon",a?"true":"false")},[o,a]);const c=()=>{l(h=>h+1),t("chat")},d=()=>{switch(e){case"chat":return S.jsx(NP,{activeProject:n},i);case"dashboard":return S.jsx(IP,{});case"canvas":return S.jsx(Fu,{title:"Canvas",icon:"🎨",desc:"AI-generated UI components",cmd:"hyperclaw canvas show"});case"hub":return S.jsx(Fu,{title:"Skill Hub",icon:"🧩",desc:"Browse and install skills",cmd:"hyperclaw hub"});case"memory":return S.jsx(Fu,{title:"Memory",icon:"🧠",desc:"AGENTS.md and MEMORY.md",cmd:"hyperclaw memory show"});case"settings":return S.jsx(AP,{})}};return S.jsx(Tx.Provider,{value:{isDark:o,toggle:f},children:S.jsxs("div",{className:"flex h-screen overflow-hidden",style:{background:"var(--bg)",color:"var(--text)"},children:[S.jsx(OP,{page:e,setPage:t,activeProject:n,setActiveProject:r,onNewChat:c}),S.jsx("main",{className:"flex-1 flex flex-col overflow-hidden min-w-0",children:d()})]})})}function DP(){return S.jsx(Lw,{client:vP,children:S.jsx(LP,{})})}zu.createRoot(document.getElementById("root")).render(S.jsx(Jx.StrictMode,{children:S.jsx(DP,{})}));
|
package/static/web/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>HyperClaw</title>
|
|
7
7
|
<link rel="icon" href="/icon.png" />
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-Bf8pf7Wg.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-B5N1LHGR.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&family=Inter:wght@300;400;500;600;700&display=swap";@tailwind base;@tailwind components;@tailwind utilities;:root{--bg: #09090b;--bg2: #0f0f12;--bg3: #18181b;--bg4: #27272a;--border: #27272a;--border2: #3f3f46;--text: #fafafa;--text2: #a1a1aa;--text3: #52525b;--accent: #22d3ee;--accent2: #06b6d4;--accent3: #0e7490;--accentBg: rgba(34,211,238,.08);--accentBorder: rgba(34,211,238,.2);--userBubble: #0e7490;--asstBubble: #18181b;--sidebar: #09090b;--header: #09090b;--inputBg: #18181b;--ring: rgba(34,211,238,.3)}[data-theme=light]{--bg: #ffffff;--bg2: #f8fafc;--bg3: #f1f5f9;--bg4: #e2e8f0;--border: #e4e4e7;--border2: #d4d4d8;--text: #09090b;--text2: #52525b;--text3: #a1a1aa;--accent: #0891b2;--accent2: #0e7490;--accent3: #164e63;--accentBg: rgba(8,145,178,.06);--accentBorder: rgba(8,145,178,.2);--userBubble: #0891b2;--asstBubble: #ffffff;--sidebar: #f8fafc;--header: #ffffff;--inputBg: #ffffff;--ring: rgba(8,145,178,.25)}[data-daemon=true]{--accent: #f87171;--accent2: #ef4444;--accent3: #dc2626;--accentBg: rgba(248,113,113,.08);--accentBorder: rgba(248,113,113,.2);--userBubble: #991b1b;--ring: rgba(248,113,113,.3)}[data-theme=light][data-daemon=true]{--accent: #dc2626;--accent2: #b91c1c;--accent3: #991b1b;--accentBg: rgba(220,38,38,.06);--accentBorder: rgba(220,38,38,.18);--userBubble: #dc2626;--ring: rgba(220,38,38,.25)}*,*:before,*:after{box-sizing:border-box}body{background-color:var(--bg);color:var(--text);font-family:Inter,system-ui,sans-serif;margin:0;-webkit-font-smoothing:antialiased}::-webkit-scrollbar{width:4px;height:4px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border);border-radius:4px}::-webkit-scrollbar-thumb:hover{background:var(--border2)}.font-mono{font-family:JetBrains Mono,monospace}.msgs-bg{background:radial-gradient(ellipse 100% 60% at 50% 0%,var(--accentBg) 0%,transparent 70%),var(--bg)}.sidebar-bg{background:radial-gradient(ellipse 100% 40% at 50% 0%,var(--accentBg) 0%,transparent 60%),var(--sidebar)}.input-glow{box-shadow:0 -1px 0 var(--border),0 -8px 24px -8px var(--accentBg)}.accent-text{color:var(--accent)}.accent-bg{background-color:var(--accent2)}.accent-bg-sm{background-color:var(--accentBg)}.accent-border{border-color:var(--accentBorder)}.btn-primary{background:var(--accent2);color:#fff;border:none;transition:opacity .15s,transform .1s}.btn-primary:hover:not(:disabled){opacity:.88}.btn-primary:disabled{opacity:.3;cursor:not-allowed}.btn-ghost{background:transparent;color:var(--text3);border:1px solid var(--border);transition:background .15s,color .15s,border-color .15s}.btn-ghost:hover{background:var(--bg3);color:var(--text2);border-color:var(--border2)}.input-base{background:var(--inputBg);color:var(--text);border:1px solid var(--border);outline:none;transition:border-color .15s,box-shadow .15s}.input-base:focus{border-color:var(--accent3);box-shadow:0 0 0 3px var(--ring)}.input-base::placeholder{color:var(--text3)}.bubble-user{background:var(--userBubble);color:#fff}.bubble-asst{background:var(--asstBubble);color:var(--text);border:1px solid var(--border)}.nav-active{background:var(--accentBg);color:var(--accent);border:1px solid var(--accentBorder)}.nav-item{color:var(--text3);transition:background .12s,color .12s}.nav-item:hover{background:var(--bg3);color:var(--text2)}.card{background:var(--bg2);border:1px solid var(--border);border-radius:12px;padding:16px}@keyframes fadeUp{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}.msg-in{animation:fadeUp .2s ease}@keyframes micPulse{0%,to{box-shadow:0 0 0 0 var(--ring)}50%{box-shadow:0 0 0 7px transparent}}.mic-active{animation:micPulse .9s ease-in-out infinite}@keyframes typingBounce{0%,80%,to{transform:translateY(0)}40%{transform:translateY(-5px)}}.typing-dot-1{animation:typingBounce 1.2s infinite}.typing-dot-2{animation:typingBounce 1.2s .15s infinite}.typing-dot-3{animation:typingBounce 1.2s .3s infinite}
|