@aiiware/aii 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/aii +6 -6
- package/package.json +1 -1
package/bin/aii
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* @aiiware/aii v0.4.
|
|
3
|
+
* @aiiware/aii v0.4.3
|
|
4
4
|
*
|
|
5
5
|
* AI-powered CLI assistant for terminal productivity
|
|
6
6
|
*
|
|
@@ -186,7 +186,7 @@ ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.pus
|
|
|
186
186
|
`)+r,i=n+1,n=e.indexOf(`
|
|
187
187
|
`,i)}while(n!==-1);return s+=e.slice(i),s}var qT=ce(()=>{});function za(e){return xB(e)}var YT,KT,mm,Vi,Ga,VT,Wi,kB,xB,fm,MB,LB,gm,mc,PB,FB,mre,f,$e=ce(()=>{FT();zT();qT();({stdout:YT,stderr:KT}=GT),mm=Symbol("GENERATOR"),Vi=Symbol("STYLER"),Ga=Symbol("IS_EMPTY"),VT=["ansi","ansi","ansi256","ansi16m"],Wi=Object.create(null),kB=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=YT?YT.level:0;e.level=t.level===void 0?r:t.level},xB=e=>{let t=(...r)=>r.join(" ");return kB(t,e),Object.setPrototypeOf(t,za.prototype),t};Object.setPrototypeOf(za.prototype,Function.prototype);for(let[e,t]of Object.entries(gr))Wi[e]={get(){let r=mc(this,gm(t.open,t.close,this[Vi]),this[Ga]);return Object.defineProperty(this,e,{value:r}),r}};Wi.visible={get(){let e=mc(this,this[Vi],!0);return Object.defineProperty(this,"visible",{value:e}),e}};fm=(e,t,r,...n)=>e==="rgb"?t==="ansi16m"?gr[r].ansi16m(...n):t==="ansi256"?gr[r].ansi256(gr.rgbToAnsi256(...n)):gr[r].ansi(gr.rgbToAnsi(...n)):e==="hex"?fm("rgb",t,r,...gr.hexToRgb(...n)):gr[r][e](...n),MB=["rgb","hex","ansi256"];for(let e of MB){Wi[e]={get(){let{level:r}=this;return function(...n){let i=gm(fm(e,VT[r],"color",...n),gr.color.close,this[Vi]);return mc(this,i,this[Ga])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);Wi[t]={get(){let{level:r}=this;return function(...n){let i=gm(fm(e,VT[r],"bgColor",...n),gr.bgColor.close,this[Vi]);return mc(this,i,this[Ga])}}}}LB=Object.defineProperties(()=>{},{...Wi,level:{enumerable:!0,get(){return this[mm].level},set(e){this[mm].level=e}}}),gm=(e,t,r)=>{let n,i;return r===void 0?(n=e,i=t):(n=r.openAll+e,i=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:i,parent:r}},mc=(e,t,r)=>{let n=(...i)=>PB(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,LB),n[mm]=e,n[Vi]=t,n[Ga]=r,n},PB=(e,t)=>{if(e.level<=0||!t)return e[Ga]?"":t;let r=e[Vi];if(r===void 0)return t;let{openAll:n,closeAll:i}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=$T(t,r.close,r.open),r=r.parent;let s=t.indexOf(`
|
|
188
188
|
`);return s!==-1&&(t=HT(t,i,n,s)),n+t+i};Object.defineProperties(za.prototype,Wi);FB=za(),mre=za({level:KT?KT.level:0}),f=FB});function hm(e){$a={...$a,...e}}function Ha(e){return $a.emojis?e+" ":""}function ti(e,t){return $a.colors?t(e):e}function H(e,...t){$a.debug&&console.debug(ti(`[DEBUG] ${e}`,f.gray),...t)}function UB(e,...t){console.log(e,...t)}function GB(e,...t){console.warn(ti(`${Ha("\u26A0\uFE0F")}${e}`,f.yellow),...t)}function zB(e,...t){console.error(ti(`${Ha("\u274C")}${e}`,f.red),...t)}function $B(e,...t){console.log(ti(`${Ha("\u2705")}${e}`,f.green),...t)}function Em(e){let t=[];return t.push(ti(`${Ha("\u274C")}${e.message}`,f.red)),e.suggestions&&e.suggestions.length>0&&(t.push(""),t.push(ti(`${Ha("\u{1F4A1}")}Solutions:`,f.yellow)),e.suggestions.forEach((r,n)=>{t.push(ti(` ${n+1}. ${r}`,f.gray))})),t.join(`
|
|
189
|
-
`)}var BB,$a,oe,On=ce(()=>{"use strict";$e();BB={debug:!1,colors:!0,emojis:!0},$a={...BB};oe={debug:H,info:UB,warn:GB,error:zB,success:$B,formatError:Em,configure:hm}});import*as nr from"fs";import*as fc from"path";import*as Sm from"os";var Qi,dt,ji=ce(()=>{"use strict";Qi={github:{name:"GitHub",description:"GitHub API integration for repos, issues, PRs, and more",command:"npx",args:["-y","@modelcontextprotocol/server-github"],env:{GITHUB_PERSONAL_ACCESS_TOKEN:"${GITHUB_TOKEN}"},category:"development"},filesystem:{name:"Filesystem",description:"Read/write files on the local filesystem",command:"npx",args:["-y","@modelcontextprotocol/server-filesystem",Sm.homedir()],category:"system"},"brave-search":{name:"Brave Search",description:"Web search using Brave Search API",command:"npx",args:["-y","@brave/brave-search-mcp-server"],env:{BRAVE_API_KEY:"${BRAVE_API_KEY}"},category:"search"},sqlite:{name:"SQLite",description:"Query SQLite databases",command:"uvx",args:["mcp-server-sqlite","--db-path","./database.db"],category:"database"},postgres:{name:"PostgreSQL",description:"Query PostgreSQL databases",command:"npx",args:["-y","@anthropic/mcp-server-postgres"],env:{DATABASE_URL:"${DATABASE_URL}"},category:"database"},"chrome-devtools":{name:"Chrome DevTools",description:"Control Chrome browser via DevTools protocol",command:"npx",args:["chrome-devtools-mcp@latest"],category:"browser"},memory:{name:"Memory",description:"Persistent memory storage for conversation context",command:"npx",args:["-y","@modelcontextprotocol/server-memory"],category:"utility"},puppeteer:{name:"Puppeteer",description:"Browser automation with Puppeteer",command:"npx",args:["-y","@anthropic/mcp-server-puppeteer"],category:"browser"}},dt=class{configPath;constructor(t){this.configPath=t||fc.join(Sm.homedir(),".aii","mcp_servers.json"),this.ensureConfigDir()}ensureConfigDir(){let t=fc.dirname(this.configPath);nr.existsSync(t)||nr.mkdirSync(t,{recursive:!0})}loadConfig(){if(!nr.existsSync(this.configPath))return{mcpServers:{}};try{let t=nr.readFileSync(this.configPath,"utf-8"),r=JSON.parse(t);return typeof r=="object"&&r!==null?r:{mcpServers:{}}}catch{return{mcpServers:{}}}}saveConfig(t){try{return this.ensureConfigDir(),nr.writeFileSync(this.configPath,JSON.stringify(t,null,2),"utf-8"),!0}catch{return!1}}backupConfig(){if(!nr.existsSync(this.configPath))return!0;try{let t=this.configPath+".backup";return nr.copyFileSync(this.configPath,t),!0}catch{return!1}}getConfigPath(){return this.configPath}}});var gc={};Xt(gc,{ClientMCPExecutor:()=>ym});import{Client as HB}from"@modelcontextprotocol/sdk/client/index.js";import{StdioClientTransport as qB}from"@modelcontextprotocol/sdk/client/stdio.js";var ym,hc=ce(()=>{"use strict";ji();On();ym=class{connections=new Map;toolToServer=new Map;initialized=!1;configManager;constructor(){this.configManager=new dt}async initialize(){if(this.initialized)return!0;try{let r=this.configManager.loadConfig().mcpServers||{};H(`Initializing MCP executor with ${Object.keys(r).length} servers`);for(let[n,i]of Object.entries(r)){if(i.enabled===!1){H(`Skipping disabled server: ${n}`);continue}try{await this.connectToServer(n,i)}catch(s){H(`Failed to connect to ${n}: ${s}`)}}return this.initialized=!0,H(`MCP executor initialized with ${this.connections.size} connections`),!0}catch(t){return H(`Failed to initialize MCP executor: ${t}`),!1}}async connectToServer(t,r){let n=r.command,i=Array.isArray(r.args)?r.args:[r.args||""],s={...process.env};if(r.env)for(let[u,d]of Object.entries(r.env)){let _=String(d).replace(/\$\{(\w+)\}/g,(g,p)=>process.env[p]||"");s[u]=_}H(`Connecting to MCP server: ${t}`),H(` command: ${n}`),H(` args: ${JSON.stringify(i)}`);let a=new qB({command:n,args:i,env:s,stderr:"pipe"}),o=new HB({name:"aii-cli",version:"0.1.0"},{capabilities:{}});await o.connect(a);let c=(await o.listTools()).tools.map(u=>({name:u.name,description:u.description||"",inputSchema:u.inputSchema,serverName:t}));this.connections.set(t,{client:o,transport:a,tools:c});for(let u of c)this.toolToServer.set(u.name,t);H(`Connected to ${t}: discovered ${c.length} tools`)}async handleQueryTools(t){let r=t.request_id||"unknown";H(`Handling mcp_query_tools request: ${r}`),this.initialized||await this.initialize();try{let n=[];for(let s of this.connections.values())n.push(...s.tools);let i=n.map(s=>({name:s.name,description:s.description,input_schema:s.inputSchema,server_name:s.serverName}));return H(`Found ${i.length} MCP tools across all servers`),{type:"mcp_query_tools_response",request_id:r,success:!0,tools:i}}catch(n){return H(`Error querying MCP tools: ${n}`),{type:"mcp_query_tools_response",request_id:r,success:!1,error:String(n),tools:[]}}}async handleToolExecution(t){let r=t.request_id||"unknown",n=t.tool_name,i=t.arguments||{};if(H(`Handling mcp_tool_request: ${r} - Tool: ${n}`),!n)return{type:"mcp_tool_response",request_id:r,success:!1,error:"Missing tool_name in request"};this.initialized||await this.initialize();try{let s=this.toolToServer.get(n);if(!s)return{type:"mcp_tool_response",request_id:r,success:!1,error:`Tool '${n}' not found in any connected MCP server`};let a=this.connections.get(s);if(!a)return{type:"mcp_tool_response",request_id:r,success:!1,error:`Server '${s}' not connected`};let o=await Promise.race([a.client.callTool({name:n,arguments:i}),new Promise((c,u)=>setTimeout(()=>u(new Error(`Tool '${n}' timed out after 30 seconds`)),3e4))]),l=this.makeContentSerializable(o.content);return H(`Tool '${n}' executed successfully (server: ${s})`),{type:"mcp_tool_response",request_id:r,success:!o.isError,content:l,server_name:s,error:o.isError?"Tool returned error":void 0}}catch(s){return H(`Error executing MCP tool '${n}': ${s}`),{type:"mcp_tool_response",request_id:r,success:!1,error:String(s)}}}makeContentSerializable(t){if(t==null)return null;if(Array.isArray(t))return t.map(r=>this.makeContentSerializable(r));if(typeof t=="object"){let r=t;if(r.type==="text"&&typeof r.text=="string")return{type:"text",text:r.text};if(r.type==="image")return{type:"image",data:r.data,mimeType:r.mimeType};let n={};for(let[i,s]of Object.entries(r))n[i]=this.makeContentSerializable(s);return n}return t}async shutdown(){H("Shutting down MCP executor");for(let[t,r]of this.connections)try{await r.client.close(),H(`Closed connection to ${t}`)}catch(n){H(`Error closing ${t}: ${n}`)}this.connections.clear(),this.toolToServer.clear(),this.initialized=!1}isInitialized(){return this.initialized}getConnectionCount(){return this.connections.size}}});var eb=S(($re,r3)=>{r3.exports={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}}});var wm=S((Hre,rb)=>{"use strict";var Cc=Object.assign({},eb()),tb=Object.keys(Cc);Object.defineProperty(Cc,"random",{get(){let e=Math.floor(Math.random()*tb.length),t=tb[e];return Cc[t]}});rb.exports=Cc});function Ya({onlyFirst:e=!1}={}){let i="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(i,e?void 0:"g")}var vm=ce(()=>{});var lb=S((rne,ob)=>{ob.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});function p3(){return{useClassicUI:process.env.AII_CLASSIC_UI==="1",inkDebug:process.env.AII_INK_DEBUG==="1"}}function Yt(){return!p3().useClassicUI}function se(e,...t){process.env.AII_INK_DEBUG==="1"&&console.error(`[INK-DEBUG] ${e}`,...t)}var ni=ce(()=>{"use strict"});function _b(e,t,r,n=!0,i,s=console.log){let a=process.stdout.columns||80,o=a,l=o-4;process.env.AII_DEBUG&&console.error(`[DEBUG] termWidth=${a}, boxWidth=${o}, innerWidth=${l}`);let c=E=>E.replace(/\x1b\[[0-9;]*m/g,""),u=f.dim.cyan,d=E=>{let T=c(E).replace(/\t/g," "),N=T.length>l?T.slice(0,l-3)+"...":T,b=l-N.length;return u("\u2502")+" "+N+" ".repeat(b)+" "+u("\u2502")},g=` ${n?ae.success("\u2713"):ae.error("\u2717")} ${f.bold(e)} `,p=3+e.length+1,h=o-3-p;if(s(u("\u250C\u2500")+g+u("\u2500".repeat(Math.max(0,h))+"\u2510")),i){let E=`${t} - ${i}`;s(d(E))}else s(d(t));if(r&&r.length>0){s(u("\u251C"+"\u2500".repeat(o-2)+"\u2524"));let E=20,y=r.slice(0,E);for(let T of y)s(d(T));if(r.length>E){let T=`... +${r.length-E} more lines`;s(d(T))}}s(u("\u2514"+"\u2500".repeat(o-2)+"\u2518"))}function pb(e,t,r=!0,n,i=console.log){let s=r?ae.success("\u25CF"):ae.error("\u25CF"),a=60,o=t.length>a?t.slice(0,a-3)+"...":t;if(i(`${s} ${f.bold(e)}(${o})`),n){let l=r?ae.dim:ae.error;i(l(`\u2514 ${n}`))}else{let l=r?"(No content)":"(Error)",c=r?ae.dim:ae.error;i(c(`\u2514 ${l}`))}}function mb(){return process.stdout.columns||80}function Nc(e){let t=mb(),r=Math.min(t,90),n=r-5,i=Math.floor(n*.42),s=n-i,a=y=>y.replace(/\x1b\[[0-9;]*m/g,"").length,o=(y,T)=>{let N=a(y);return y+" ".repeat(Math.max(0,T-N))},l=m3.map(y=>ae.logo(y)),c=f.cyan("Tips for getting started"),u="Ask questions, edit files, or run commands.",d="Be specific for the best results.",_=ae.dim("/help")+" for more information.",g=[];g.push({left:"",right:c});for(let y=0;y<6;y++){let T=l[y]||"",N="";y===0&&(N=u),y===1&&(N=d),y===2&&(N=_),g.push({left:T,right:N})}let p=` Aii CLI v${Ac} `,h=p.length,E=r-4-h;console.log(ae.bannerBorder("\u250C\u2500")+f.bold.white(p)+ae.bannerBorder("\u2500".repeat(Math.max(0,E)))+ae.bannerBorder("\u2500\u2510"));for(let y of g){let T=o(y.left,i),N=o(y.right,s);console.log(ae.bannerBorder("\u2502")+" "+T+ae.bannerBorder("\u2502")+" "+N+ae.bannerBorder("\u2502"))}console.log(ae.bannerBorder("\u2514"+"\u2500".repeat(r-2)+"\u2518"))}function fb(e){let t=[];e.tools&&e.tools>0&&t.push(`${e.tools} tool${e.tools>1?"s":""}`);let r=e.mcpServers??0;r>0&&t.push(`${r} MCP server${r>1?"s":""}`),e.contextFiles&&e.contextFiles>0&&t.push(`${e.contextFiles} context file${e.contextFiles>1?"s":""}`),t.length>0&&console.log(ae.dim("Using: ")+ae.dim(t.join(" | ")))}function f3(e){if(e<60)return`${e}s`;let t=Math.floor(e/60),r=e%60;return r>0?`${t}m ${r}s`:`${t}m`}function db(e){return e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toString()}function gb(e){let t=mb(),r=Math.min(t-2,76),n=r-4,i=(_,g)=>{let p=_.replace(/\x1b\[[0-9;]*m/g,"").length;return _+" ".repeat(Math.max(0,g-p))},s=_=>ae.border("\u2502")+" "+i(_,n)+" "+ae.border("\u2502"),a=(_,g,p,h)=>{let E=Math.floor(n/2),y=ae.dim(_.padEnd(15))+g,T=ae.dim(p.padEnd(15))+h;return s(i(y,E)+T)},o=f3(e.durationSeconds),l=db(e.tokensIn),c=db(e.tokensOut),u=`$${e.totalCost.toFixed(4)}`,d=`${e.provider}/${e.model.replace("claude-","").replace("-latest","")}`;console.log(""),console.log(ae.border("\u250C"+"\u2500".repeat(r-2)+"\u2510")),console.log(s(f.cyan.bold("Agent powering down. Goodbye!"))),console.log(ae.border("\u251C"+"\u2500".repeat(r-2)+"\u2524")),console.log(s(f.cyan.bold("Session Summary"))),console.log(s(ae.dim("\u2500".repeat(15)))),console.log(a("Duration",o,"Tool Calls",e.toolCalls.toString())),console.log(a("Turns",e.turns.toString(),"Files Modified",e.filesModified.toString())),console.log(s("")),console.log(s(f.cyan.bold("Token Usage"))),console.log(s(ae.dim("\u2500".repeat(11)))),console.log(a("Input",l,"Output",c)),console.log(s(ae.dim("Cost".padEnd(15))+u)),console.log(s("")),console.log(s(ae.dim("Model: ")+ae.model(d))),console.log(ae.border("\u2514"+"\u2500".repeat(r-2)+"\u2518")),console.log("")}var Ac,m3,ae,ii=ce(()=>{"use strict";$e();Ac="0.4.2",m3=[" \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557","\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557 \u255A\u2550\u255D \u255A\u2550\u255D","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551 \u2588\u2588\u2557 \u2588\u2588\u2557","\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551","\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551","\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D"],ae={logo:f.cyan.bold,prompt:f.cyan.bold,model:f.cyan,success:f.green,warning:f.yellow,error:f.red,thinking:f.dim.cyan,filePath:f.blue,code:f.white,muted:f.gray,dim:f.dim,safe:f.green,risky:f.yellow,destructive:f.red,border:f.cyan,bannerBorder:f.cyan}});var yb={};Xt(yb,{getUIStore:()=>Wa,useUIStore:()=>We});import{create as g3}from"zustand";var Sb,We,Wa,$m=ce(()=>{"use strict";Sb={mode:"welcome",agentMode:"normal",status:"",isThinking:!1,isStreaming:!1,currentIteration:0,iterationStartTime:Date.now(),iterationTokens:0,contextPercent:0,contextLevel:"normal",contextTokens:0,contextLimit:2e5,sessionCost:0,provider:"",model:"",projectPath:process.cwd(),branch:void 0,toolsCount:0,mcpServersCount:0,contextFilesCount:0},We=g3(e=>({...Sb,setMode:t=>e({mode:t}),setAgentMode:t=>e({agentMode:t}),setStatus:t=>e({status:t}),setThinking:t=>e({isThinking:t}),setStreaming:t=>e({isStreaming:t}),incrementIteration:()=>e(t=>({currentIteration:t.currentIteration+1,iterationStartTime:Date.now(),iterationTokens:0})),addIterationTokens:t=>e(r=>({iterationTokens:r.iterationTokens+t})),setIterationTokens:t=>e({iterationTokens:t}),updateContext:(t,r)=>{let n=r>0?Math.round(t/r*100):0,i=n>=90?"critical":n>=70?"warning":"normal";e({contextTokens:t,contextLimit:r,contextPercent:n,contextLevel:i})},updateSession:t=>e(t),updateResources:t=>e(t),reset:()=>e(Sb)})),Wa=We.getState});function Km(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function Nb(e){ai=e}function we(e,t=""){let r=typeof e=="string"?e:e.source,n={replace:(i,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(It.caret,"$1"),r=r.replace(i,a),n},getRegex:()=>new RegExp(r,t)};return n}function vr(e,t){if(t){if(It.escapeTest.test(e))return e.replace(It.escapeReplace,bb)}else if(It.escapeTestNoEncode.test(e))return e.replace(It.escapeReplaceNoEncode,bb);return e}function Cb(e){try{e=encodeURI(e).replace(It.percentDecode,"%")}catch{return null}return e}function Db(e,t){let r=e.replace(It.findPipe,(s,a,o)=>{let l=!1,c=a;for(;--c>=0&&o[c]==="\\";)l=!l;return l?"|":" |"}),n=r.split(It.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(It.slashPipe,"|");return n}function ja(e,t,r){let n=e.length;if(n===0)return"";let i=0;for(;i<n;){let s=e.charAt(n-i-1);if(s===t&&!r)i++;else if(s!==t&&r)i++;else break}return e.slice(0,n-i)}function j3(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return r>0?-2:-1}function Ab(e,t,r,n,i){let s=t.href,a=t.title||null,o=e[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:a,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,l}function X3(e,t,r){let n=e.match(r.other.indentCodeCompensation);if(n===null)return t;let i=n[1];return t.split(`
|
|
189
|
+
`)}var BB,$a,oe,On=ce(()=>{"use strict";$e();BB={debug:!1,colors:!0,emojis:!0},$a={...BB};oe={debug:H,info:UB,warn:GB,error:zB,success:$B,formatError:Em,configure:hm}});import*as nr from"fs";import*as fc from"path";import*as Sm from"os";var Qi,dt,ji=ce(()=>{"use strict";Qi={github:{name:"GitHub",description:"GitHub API integration for repos, issues, PRs, and more",command:"npx",args:["-y","@modelcontextprotocol/server-github"],env:{GITHUB_PERSONAL_ACCESS_TOKEN:"${GITHUB_TOKEN}"},category:"development"},filesystem:{name:"Filesystem",description:"Read/write files on the local filesystem",command:"npx",args:["-y","@modelcontextprotocol/server-filesystem",Sm.homedir()],category:"system"},"brave-search":{name:"Brave Search",description:"Web search using Brave Search API",command:"npx",args:["-y","@brave/brave-search-mcp-server"],env:{BRAVE_API_KEY:"${BRAVE_API_KEY}"},category:"search"},sqlite:{name:"SQLite",description:"Query SQLite databases",command:"uvx",args:["mcp-server-sqlite","--db-path","./database.db"],category:"database"},postgres:{name:"PostgreSQL",description:"Query PostgreSQL databases",command:"npx",args:["-y","@anthropic/mcp-server-postgres"],env:{DATABASE_URL:"${DATABASE_URL}"},category:"database"},"chrome-devtools":{name:"Chrome DevTools",description:"Control Chrome browser via DevTools protocol",command:"npx",args:["chrome-devtools-mcp@latest"],category:"browser"},memory:{name:"Memory",description:"Persistent memory storage for conversation context",command:"npx",args:["-y","@modelcontextprotocol/server-memory"],category:"utility"},puppeteer:{name:"Puppeteer",description:"Browser automation with Puppeteer",command:"npx",args:["-y","@anthropic/mcp-server-puppeteer"],category:"browser"}},dt=class{configPath;constructor(t){this.configPath=t||fc.join(Sm.homedir(),".aii","mcp_servers.json"),this.ensureConfigDir()}ensureConfigDir(){let t=fc.dirname(this.configPath);nr.existsSync(t)||nr.mkdirSync(t,{recursive:!0})}loadConfig(){if(!nr.existsSync(this.configPath))return{mcpServers:{}};try{let t=nr.readFileSync(this.configPath,"utf-8"),r=JSON.parse(t);return typeof r=="object"&&r!==null?r:{mcpServers:{}}}catch{return{mcpServers:{}}}}saveConfig(t){try{return this.ensureConfigDir(),nr.writeFileSync(this.configPath,JSON.stringify(t,null,2),"utf-8"),!0}catch{return!1}}backupConfig(){if(!nr.existsSync(this.configPath))return!0;try{let t=this.configPath+".backup";return nr.copyFileSync(this.configPath,t),!0}catch{return!1}}getConfigPath(){return this.configPath}}});var gc={};Xt(gc,{ClientMCPExecutor:()=>ym});import{Client as HB}from"@modelcontextprotocol/sdk/client/index.js";import{StdioClientTransport as qB}from"@modelcontextprotocol/sdk/client/stdio.js";var ym,hc=ce(()=>{"use strict";ji();On();ym=class{connections=new Map;toolToServer=new Map;initialized=!1;configManager;constructor(){this.configManager=new dt}async initialize(){if(this.initialized)return!0;try{let r=this.configManager.loadConfig().mcpServers||{};H(`Initializing MCP executor with ${Object.keys(r).length} servers`);for(let[n,i]of Object.entries(r)){if(i.enabled===!1){H(`Skipping disabled server: ${n}`);continue}try{await this.connectToServer(n,i)}catch(s){H(`Failed to connect to ${n}: ${s}`)}}return this.initialized=!0,H(`MCP executor initialized with ${this.connections.size} connections`),!0}catch(t){return H(`Failed to initialize MCP executor: ${t}`),!1}}async connectToServer(t,r){let n=r.command,i=Array.isArray(r.args)?r.args:[r.args||""],s={...process.env};if(r.env)for(let[u,d]of Object.entries(r.env)){let _=String(d).replace(/\$\{(\w+)\}/g,(g,p)=>process.env[p]||"");s[u]=_}H(`Connecting to MCP server: ${t}`),H(` command: ${n}`),H(` args: ${JSON.stringify(i)}`);let a=new qB({command:n,args:i,env:s,stderr:"pipe"}),o=new HB({name:"aii-cli",version:"0.1.0"},{capabilities:{}});await o.connect(a);let c=(await o.listTools()).tools.map(u=>({name:u.name,description:u.description||"",inputSchema:u.inputSchema,serverName:t}));this.connections.set(t,{client:o,transport:a,tools:c});for(let u of c)this.toolToServer.set(u.name,t);H(`Connected to ${t}: discovered ${c.length} tools`)}async handleQueryTools(t){let r=t.request_id||"unknown";H(`Handling mcp_query_tools request: ${r}`),this.initialized||await this.initialize();try{let n=[];for(let s of this.connections.values())n.push(...s.tools);let i=n.map(s=>({name:s.name,description:s.description,input_schema:s.inputSchema,server_name:s.serverName}));return H(`Found ${i.length} MCP tools across all servers`),{type:"mcp_query_tools_response",request_id:r,success:!0,tools:i}}catch(n){return H(`Error querying MCP tools: ${n}`),{type:"mcp_query_tools_response",request_id:r,success:!1,error:String(n),tools:[]}}}async handleToolExecution(t){let r=t.request_id||"unknown",n=t.tool_name,i=t.arguments||{};if(H(`Handling mcp_tool_request: ${r} - Tool: ${n}`),!n)return{type:"mcp_tool_response",request_id:r,success:!1,error:"Missing tool_name in request"};this.initialized||await this.initialize();try{let s=this.toolToServer.get(n);if(!s)return{type:"mcp_tool_response",request_id:r,success:!1,error:`Tool '${n}' not found in any connected MCP server`};let a=this.connections.get(s);if(!a)return{type:"mcp_tool_response",request_id:r,success:!1,error:`Server '${s}' not connected`};let o=await Promise.race([a.client.callTool({name:n,arguments:i}),new Promise((c,u)=>setTimeout(()=>u(new Error(`Tool '${n}' timed out after 30 seconds`)),3e4))]),l=this.makeContentSerializable(o.content);return H(`Tool '${n}' executed successfully (server: ${s})`),{type:"mcp_tool_response",request_id:r,success:!o.isError,content:l,server_name:s,error:o.isError?"Tool returned error":void 0}}catch(s){return H(`Error executing MCP tool '${n}': ${s}`),{type:"mcp_tool_response",request_id:r,success:!1,error:String(s)}}}makeContentSerializable(t){if(t==null)return null;if(Array.isArray(t))return t.map(r=>this.makeContentSerializable(r));if(typeof t=="object"){let r=t;if(r.type==="text"&&typeof r.text=="string")return{type:"text",text:r.text};if(r.type==="image")return{type:"image",data:r.data,mimeType:r.mimeType};let n={};for(let[i,s]of Object.entries(r))n[i]=this.makeContentSerializable(s);return n}return t}async shutdown(){H("Shutting down MCP executor");for(let[t,r]of this.connections)try{await r.client.close(),H(`Closed connection to ${t}`)}catch(n){H(`Error closing ${t}: ${n}`)}this.connections.clear(),this.toolToServer.clear(),this.initialized=!1}isInitialized(){return this.initialized}getConnectionCount(){return this.connections.size}}});var eb=S(($re,r3)=>{r3.exports={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}}});var wm=S((Hre,rb)=>{"use strict";var Cc=Object.assign({},eb()),tb=Object.keys(Cc);Object.defineProperty(Cc,"random",{get(){let e=Math.floor(Math.random()*tb.length),t=tb[e];return Cc[t]}});rb.exports=Cc});function Ya({onlyFirst:e=!1}={}){let i="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(i,e?void 0:"g")}var vm=ce(()=>{});var lb=S((rne,ob)=>{ob.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});function p3(){return{useClassicUI:process.env.AII_CLASSIC_UI==="1",inkDebug:process.env.AII_INK_DEBUG==="1"}}function Yt(){return!p3().useClassicUI}function se(e,...t){process.env.AII_INK_DEBUG==="1"&&console.error(`[INK-DEBUG] ${e}`,...t)}var ni=ce(()=>{"use strict"});function _b(e,t,r,n=!0,i,s=console.log){let a=process.stdout.columns||80,o=a,l=o-4;process.env.AII_DEBUG&&console.error(`[DEBUG] termWidth=${a}, boxWidth=${o}, innerWidth=${l}`);let c=E=>E.replace(/\x1b\[[0-9;]*m/g,""),u=f.dim.cyan,d=E=>{let T=c(E).replace(/\t/g," "),N=T.length>l?T.slice(0,l-3)+"...":T,b=l-N.length;return u("\u2502")+" "+N+" ".repeat(b)+" "+u("\u2502")},g=` ${n?ae.success("\u2713"):ae.error("\u2717")} ${f.bold(e)} `,p=3+e.length+1,h=o-3-p;if(s(u("\u250C\u2500")+g+u("\u2500".repeat(Math.max(0,h))+"\u2510")),i){let E=`${t} - ${i}`;s(d(E))}else s(d(t));if(r&&r.length>0){s(u("\u251C"+"\u2500".repeat(o-2)+"\u2524"));let E=20,y=r.slice(0,E);for(let T of y)s(d(T));if(r.length>E){let T=`... +${r.length-E} more lines`;s(d(T))}}s(u("\u2514"+"\u2500".repeat(o-2)+"\u2518"))}function pb(e,t,r=!0,n,i=console.log){let s=r?ae.success("\u25CF"):ae.error("\u25CF"),a=60,o=t.length>a?t.slice(0,a-3)+"...":t;if(i(`${s} ${f.bold(e)}(${o})`),n){let l=r?ae.dim:ae.error;i(l(`\u2514 ${n}`))}else{let l=r?"(No content)":"(Error)",c=r?ae.dim:ae.error;i(c(`\u2514 ${l}`))}}function mb(){return process.stdout.columns||80}function Nc(e){let t=mb(),r=Math.min(t,90),n=r-5,i=Math.floor(n*.42),s=n-i,a=y=>y.replace(/\x1b\[[0-9;]*m/g,"").length,o=(y,T)=>{let N=a(y);return y+" ".repeat(Math.max(0,T-N))},l=m3.map(y=>ae.logo(y)),c=f.cyan("Tips for getting started"),u="Ask questions, edit files, or run commands.",d="Be specific for the best results.",_=ae.dim("/help")+" for more information.",g=[];g.push({left:"",right:c});for(let y=0;y<6;y++){let T=l[y]||"",N="";y===0&&(N=u),y===1&&(N=d),y===2&&(N=_),g.push({left:T,right:N})}let p=` Aii CLI v${Ac} `,h=p.length,E=r-4-h;console.log(ae.bannerBorder("\u250C\u2500")+f.bold.white(p)+ae.bannerBorder("\u2500".repeat(Math.max(0,E)))+ae.bannerBorder("\u2500\u2510"));for(let y of g){let T=o(y.left,i),N=o(y.right,s);console.log(ae.bannerBorder("\u2502")+" "+T+ae.bannerBorder("\u2502")+" "+N+ae.bannerBorder("\u2502"))}console.log(ae.bannerBorder("\u2514"+"\u2500".repeat(r-2)+"\u2518"))}function fb(e){let t=[];e.tools&&e.tools>0&&t.push(`${e.tools} tool${e.tools>1?"s":""}`);let r=e.mcpServers??0;r>0&&t.push(`${r} MCP server${r>1?"s":""}`),e.contextFiles&&e.contextFiles>0&&t.push(`${e.contextFiles} context file${e.contextFiles>1?"s":""}`),t.length>0&&console.log(ae.dim("Using: ")+ae.dim(t.join(" | ")))}function f3(e){if(e<60)return`${e}s`;let t=Math.floor(e/60),r=e%60;return r>0?`${t}m ${r}s`:`${t}m`}function db(e){return e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toString()}function gb(e){let t=mb(),r=Math.min(t-2,76),n=r-4,i=(_,g)=>{let p=_.replace(/\x1b\[[0-9;]*m/g,"").length;return _+" ".repeat(Math.max(0,g-p))},s=_=>ae.border("\u2502")+" "+i(_,n)+" "+ae.border("\u2502"),a=(_,g,p,h)=>{let E=Math.floor(n/2),y=ae.dim(_.padEnd(15))+g,T=ae.dim(p.padEnd(15))+h;return s(i(y,E)+T)},o=f3(e.durationSeconds),l=db(e.tokensIn),c=db(e.tokensOut),u=`$${e.totalCost.toFixed(4)}`,d=`${e.provider}/${e.model.replace("claude-","").replace("-latest","")}`;console.log(""),console.log(ae.border("\u250C"+"\u2500".repeat(r-2)+"\u2510")),console.log(s(f.cyan.bold("Agent powering down. Goodbye!"))),console.log(ae.border("\u251C"+"\u2500".repeat(r-2)+"\u2524")),console.log(s(f.cyan.bold("Session Summary"))),console.log(s(ae.dim("\u2500".repeat(15)))),console.log(a("Duration",o,"Tool Calls",e.toolCalls.toString())),console.log(a("Turns",e.turns.toString(),"Files Modified",e.filesModified.toString())),console.log(s("")),console.log(s(f.cyan.bold("Token Usage"))),console.log(s(ae.dim("\u2500".repeat(11)))),console.log(a("Input",l,"Output",c)),console.log(s(ae.dim("Cost".padEnd(15))+u)),console.log(s("")),console.log(s(ae.dim("Model: ")+ae.model(d))),console.log(ae.border("\u2514"+"\u2500".repeat(r-2)+"\u2518")),console.log("")}var Ac,m3,ae,ii=ce(()=>{"use strict";$e();Ac="0.4.3",m3=[" \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557","\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557 \u255A\u2550\u255D \u255A\u2550\u255D","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551 \u2588\u2588\u2557 \u2588\u2588\u2557","\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551","\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551","\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D"],ae={logo:f.cyan.bold,prompt:f.cyan.bold,model:f.cyan,success:f.green,warning:f.yellow,error:f.red,thinking:f.dim.cyan,filePath:f.blue,code:f.white,muted:f.gray,dim:f.dim,safe:f.green,risky:f.yellow,destructive:f.red,border:f.cyan,bannerBorder:f.cyan}});var yb={};Xt(yb,{getUIStore:()=>Wa,useUIStore:()=>We});import{create as g3}from"zustand";var Sb,We,Wa,$m=ce(()=>{"use strict";Sb={mode:"welcome",agentMode:"normal",status:"",isThinking:!1,isStreaming:!1,currentIteration:0,iterationStartTime:Date.now(),iterationTokens:0,contextPercent:0,contextLevel:"normal",contextTokens:0,contextLimit:2e5,sessionCost:0,provider:"",model:"",projectPath:process.cwd(),branch:void 0,toolsCount:0,mcpServersCount:0,contextFilesCount:0},We=g3(e=>({...Sb,setMode:t=>e({mode:t}),setAgentMode:t=>e({agentMode:t}),setStatus:t=>e({status:t}),setThinking:t=>e({isThinking:t}),setStreaming:t=>e({isStreaming:t}),incrementIteration:()=>e(t=>({currentIteration:t.currentIteration+1,iterationStartTime:Date.now(),iterationTokens:0})),addIterationTokens:t=>e(r=>({iterationTokens:r.iterationTokens+t})),setIterationTokens:t=>e({iterationTokens:t}),updateContext:(t,r)=>{let n=r>0?Math.round(t/r*100):0,i=n>=90?"critical":n>=70?"warning":"normal";e({contextTokens:t,contextLimit:r,contextPercent:n,contextLevel:i})},updateSession:t=>e(t),updateResources:t=>e(t),reset:()=>e(Sb)})),Wa=We.getState});function Km(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function Nb(e){ai=e}function we(e,t=""){let r=typeof e=="string"?e:e.source,n={replace:(i,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(It.caret,"$1"),r=r.replace(i,a),n},getRegex:()=>new RegExp(r,t)};return n}function vr(e,t){if(t){if(It.escapeTest.test(e))return e.replace(It.escapeReplace,bb)}else if(It.escapeTestNoEncode.test(e))return e.replace(It.escapeReplaceNoEncode,bb);return e}function Cb(e){try{e=encodeURI(e).replace(It.percentDecode,"%")}catch{return null}return e}function Db(e,t){let r=e.replace(It.findPipe,(s,a,o)=>{let l=!1,c=a;for(;--c>=0&&o[c]==="\\";)l=!l;return l?"|":" |"}),n=r.split(It.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(It.slashPipe,"|");return n}function ja(e,t,r){let n=e.length;if(n===0)return"";let i=0;for(;i<n;){let s=e.charAt(n-i-1);if(s===t&&!r)i++;else if(s!==t&&r)i++;else break}return e.slice(0,n-i)}function j3(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return r>0?-2:-1}function Ab(e,t,r,n,i){let s=t.href,a=t.title||null,o=e[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:a,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,l}function X3(e,t,r){let n=e.match(r.other.indentCodeCompensation);if(n===null)return t;let i=n[1];return t.split(`
|
|
190
190
|
`).map(s=>{let a=s.match(r.other.beginningSpace);if(a===null)return s;let[o]=a;return o.length>=i.length?s.slice(i.length):s}).join(`
|
|
191
191
|
`)}function Le(e,t){return si.parse(e,t)}var ai,Xa,It,h3,E3,S3,Za,y3,Vm,Ob,Rb,T3,Wm,b3,Qm,C3,D3,kc,jm,A3,wb,N3,Xm,Tb,O3,R3,w3,I3,Ib,v3,xc,Zm,vb,k3,kb,x3,M3,L3,xb,P3,F3,Mb,B3,U3,G3,z3,$3,H3,q3,wc,Y3,Lb,Pb,K3,Jm,V3,Hm,W3,Oc,Qa,Q3,bb,Ic,Vr,vc,ef,Wr,Rc,tf,si,xne,Mne,Lne,Pne,Fne,Bne,Une,Fb=ce(()=>{ai=Km();Xa={exec:()=>null};It={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},h3=/^(?:[ \t]*(?:\n|$))+/,E3=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,S3=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Za=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,y3=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Vm=/(?:[*+-]|\d{1,9}[.)])/,Ob=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Rb=we(Ob).replace(/bull/g,Vm).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),T3=we(Ob).replace(/bull/g,Vm).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Wm=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,b3=/^[^\n]+/,Qm=/(?!\s*\])(?:\\.|[^\[\]\\])+/,C3=we(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Qm).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),D3=we(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Vm).getRegex(),kc="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",jm=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,A3=we("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",jm).replace("tag",kc).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),wb=we(Wm).replace("hr",Za).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",kc).getRegex(),N3=we(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",wb).getRegex(),Xm={blockquote:N3,code:E3,def:C3,fences:S3,heading:y3,hr:Za,html:A3,lheading:Rb,list:D3,newline:h3,paragraph:wb,table:Xa,text:b3},Tb=we("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Za).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",kc).getRegex(),O3={...Xm,lheading:T3,table:Tb,paragraph:we(Wm).replace("hr",Za).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Tb).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",kc).getRegex()},R3={...Xm,html:we(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",jm).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Xa,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:we(Wm).replace("hr",Za).replace("heading",` *#{1,6} *[^
|
|
192
192
|
]`).replace("lheading",Rb).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},w3=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,I3=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ib=/^( {2,}|\\)\n(?!\s*$)/,v3=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,xc=/[\p{P}\p{S}]/u,Zm=/[\s\p{P}\p{S}]/u,vb=/[^\s\p{P}\p{S}]/u,k3=we(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Zm).getRegex(),kb=/(?!~)[\p{P}\p{S}]/u,x3=/(?!~)[\s\p{P}\p{S}]/u,M3=/(?:[^\s\p{P}\p{S}]|~)/u,L3=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,xb=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,P3=we(xb,"u").replace(/punct/g,xc).getRegex(),F3=we(xb,"u").replace(/punct/g,kb).getRegex(),Mb="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",B3=we(Mb,"gu").replace(/notPunctSpace/g,vb).replace(/punctSpace/g,Zm).replace(/punct/g,xc).getRegex(),U3=we(Mb,"gu").replace(/notPunctSpace/g,M3).replace(/punctSpace/g,x3).replace(/punct/g,kb).getRegex(),G3=we("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,vb).replace(/punctSpace/g,Zm).replace(/punct/g,xc).getRegex(),z3=we(/\\(punct)/,"gu").replace(/punct/g,xc).getRegex(),$3=we(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),H3=we(jm).replace("(?:-->|$)","-->").getRegex(),q3=we("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",H3).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),wc=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Y3=we(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",wc).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Lb=we(/^!?\[(label)\]\[(ref)\]/).replace("label",wc).replace("ref",Qm).getRegex(),Pb=we(/^!?\[(ref)\](?:\[\])?/).replace("ref",Qm).getRegex(),K3=we("reflink|nolink(?!\\()","g").replace("reflink",Lb).replace("nolink",Pb).getRegex(),Jm={_backpedal:Xa,anyPunctuation:z3,autolink:$3,blockSkip:L3,br:Ib,code:I3,del:Xa,emStrongLDelim:P3,emStrongRDelimAst:B3,emStrongRDelimUnd:G3,escape:w3,link:Y3,nolink:Pb,punctuation:k3,reflink:Lb,reflinkSearch:K3,tag:q3,text:v3,url:Xa},V3={...Jm,link:we(/^!?\[(label)\]\((.*?)\)/).replace("label",wc).getRegex(),reflink:we(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",wc).getRegex()},Hm={...Jm,emStrongRDelimAst:U3,emStrongLDelim:F3,url:we(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},W3={...Hm,br:we(Ib).replace("{2,}","*").getRegex(),text:we(Hm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Oc={normal:Xm,gfm:O3,pedantic:R3},Qa={normal:Jm,gfm:Hm,breaks:W3,pedantic:V3},Q3={"&":"&","<":"<",">":">",'"':""","'":"'"},bb=e=>Q3[e];Ic=class{options;rules;lexer;constructor(e){this.options=e||ai}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:ja(r,`
|
|
@@ -322,7 +322,7 @@ Your answer (directly addressing the user's request):`,o=`${n}/v0/execute`,l={"C
|
|
|
322
322
|
${e}
|
|
323
323
|
</context>
|
|
324
324
|
|
|
325
|
-
${t}`:t}var y2="0.4.2";function T2(){let e=new F1;return e.name("aii").description("AI-powered CLI assistant").version(y2,"-V, --version","Show version number").helpOption(!1).enablePositionalOptions().argument("[query...]","Natural language query").option("--clean","Clean output mode (just the result)").option("--standard","Standard output mode (result + metrics)").option("--thinking","Thinking mode (full reasoning)").option("-v, --verbose","Verbose output (alias for --thinking)").option("-d, --debug","Debug output").option("--model <model>","Override LLM model").option("--host <host>","API server host:port").option("-y, --yes","Auto-confirm shell commands").option("--offline","Offline mode (no web/MCP)").option("-i, --interactive","Interactive chat mode").option("-c, --continue-chat <id>","Continue chat session").option("-n, --new-chat","Force new chat session").option("--auto","Auto mode - auto-approve all actions").option("-q, --quiet","Quiet mode - minimal output").option("--no-colors","Disable colored output").option("--no-emojis","Disable emoji icons").option("--no-animations","Disable animations").option("--no-streaming","Disable streaming").option("--show-tokens","Show token usage").option("--show-cost","Show cost estimates").option("-h, --help","Show help"),e.command("config").description("Configuration management").argument("[action]","Action: init, show, validate, set").argument("[key]","Config key (for set)").argument("[value]","Config value (for set)").action(()=>{}),e.command("mcp").description("MCP server management").argument("[action]","Action: list, add, remove, status, etc.").argument("[rest...]","Server name and arguments").passThroughOptions().action(()=>{}),e.command("prompt").description("Prompt library").argument("[action]","Action: list, show, use, create").argument("[rest...]","Prompt name and arguments").allowUnknownOption().action(()=>{}),e.command("stats").description("Usage statistics").argument("[type]","Type: models, cost").action(()=>{}),e.command("history").description("Chat history").argument("[action]","Action: list, search, export, delete").argument("[query]","Search query or ID").action(()=>{}),e.command("doctor").description("System health check").action(()=>{}),e.command("chat").description("Interactive chat mode").action(()=>{}),e.command("agent").description("Interactive agent mode with tool execution").argument("[query...]","Optional query (non-interactive if provided)").action(()=>{}),e.command("run").description("Run domain-specific operations").argument("<operation>","Operation (e.g., git commit)").argument("[args...]","Additional arguments").allowUnknownOption().action(()=>{}),e.command("help").description("display help for command").argument("[command]","Command to show help for").action(()=>{}),e.command("version").description("Show version number").action(()=>{}),e}async function U1(e){let t=T2();t.exitOverride(),t.configureOutput({writeErr:()=>{}});let r="query",n,i=[];try{t.parse(e),i=t.args;let c=t.args[0];c&&["config","mcp","prompt","stats","history","doctor","chat","run","help","version","agent"].includes(c)&&(r=c,n=t.args[1],i=t.args.slice(2))}catch(c){c instanceof P1&&(c.code==="commander.version"||c.code==="commander.helpDisplayed")&&process.exit(0),i=e.slice(2)}let s=t.opts(),a={clean:s.clean??!1,standard:s.standard??!1,thinking:s.thinking??!1,verbose:s.verbose??!1,debug:s.debug??!1,model:s.model,host:s.host,yes:s.yes??!1,offline:s.offline??!1,interactive:s.interactive??!1,continueChat:s.continueChat,newChat:s.newChat??!1,auto:s.auto??!1,quiet:s.quiet??!1,noColors:!s.colors,noEmojis:!s.emojis,noAnimations:!s.animations,noStreaming:!s.streaming,showTokens:s.showTokens??!1,showCost:s.showCost??!1,help:s.help??!1,version:s.version??!1},o;s_()&&(o=await B1()),(r==="chat"||a.interactive)&&(r="agent"),r==="query"&&!i.length&&!o&&(r="agent");let l;if(r==="query"&&i.length>0)l=i.join(" ");else if(r==="agent"){let c=[];n&&c.push(n),i.length>0&&c.push(...i),c.length>0&&(l=c.join(" "))}return{command:r,subcommand:n,args:i,flags:a,stdinContent:o,query:l}}var ke;(function(e){e[e.LOCAL=1]="LOCAL",e[e.SERVER=2]="SERVER"})(ke||(ke={}));var a_={translate:"clean",shell:"clean",shell_generate:"clean",mcp:"standard",explain:"standard",code_generate:"standard",code_review:"standard",summarize:"standard",research:"standard",_default:"standard"};function Ri(e,t,r,n){return e.clean?"clean":e.thinking||e.verbose?"thinking":e.standard?"standard":t&&r?.[t]?r[t]:t&&a_[t]?a_[t]:n||a_._default}var G1={config:ke.LOCAL,help:ke.LOCAL,version:ke.LOCAL,doctor:ke.LOCAL,mcp:ke.LOCAL,prompt:ke.LOCAL,stats:ke.LOCAL,history:ke.LOCAL,query:ke.SERVER,chat:ke.SERVER,run:ke.SERVER,agent:ke.SERVER};function o_(e){let t=G1[e.command]??ke.SERVER;switch(e.command){case"config":return b2(e);case"mcp":return C2(e);case"prompt":return D2(e);case"stats":return A2(e);case"history":return N2(e);case"doctor":return{tier:ke.LOCAL,handler:"doctor",params:{}};case"chat":return{tier:ke.SERVER,handler:"chat",params:{continueChat:e.flags.continueChat}};case"run":return O2(e);case"agent":return{tier:ke.SERVER,handler:"agent",params:{interactive:!e.query}};case"help":return{tier:ke.LOCAL,handler:"help",params:{command:e.subcommand}};case"version":return{tier:ke.LOCAL,handler:"version",params:{}};case"query":default:return{tier:t,handler:"query",params:{query:e.query,stdinContent:e.stdinContent}}}}function b2(e){let t=e.subcommand??e.args[0]??"show";return{tier:ke.LOCAL,handler:`config:${t}`,params:{key:e.args[0],value:e.args[1]}}}function C2(e){let t=e.subcommand??e.args[0]??"list";return{tier:ke.LOCAL,handler:`mcp:${t}`,params:{name:e.args[0],args:e.args.slice(1)}}}function D2(e){let t=e.subcommand??e.args[0]??"list";return{tier:ke.LOCAL,handler:`prompt:${t}`,params:{name:e.args[0],args:e.args.slice(1)}}}function A2(e){let t=e.subcommand??e.args[0];return{tier:ke.LOCAL,handler:t?`stats:${t}`:"stats",params:{}}}function N2(e){let t=e.subcommand??e.args[0]??"list";return{tier:ke.LOCAL,handler:`history:${t}`,params:{query:e.args[0],id:e.args[0]}}}function O2(e){let t=[];e.subcommand&&t.push(e.subcommand);let r=e.args.filter(i=>!i.startsWith("-"));t.push(...r);let n=t.join(" ");return{tier:ke.SERVER,handler:"run",params:{operation:n}}}var Qn=ct($p(),1);import*as gt from"fs";import*as Jl from"path";import*as Ry from"os";var Hp={llm:{provider:"anthropic",model:"claude-sonnet-4-20250514",temperature:.7,max_tokens:4e3},api:{url:"http://localhost:26169"},streaming:{enabled:!0,buffer_size:10},output_modes:{default:"standard"}},Zl={configDir:".aii",configFile:"config.yaml",secretsFile:"secrets.yaml",mcpFile:"mcp.json"};var Cn=class e extends Error{code;suggestions;constructor(t,r,n=[]){super(t),this.name="AiiError",this.code=r,this.suggestions=n,Object.setPrototypeOf(this,e.prototype)}},Ra=class e extends Cn{constructor(t,r){super(`Cannot connect to Aii Server at ${t}:${r}`,"CONNECTION_ERROR",[`Check if Aii Server is running: curl ${t}:${r}/api/status`,"Start the Aii Server (separate process)","Verify host in config: aii config show",`Try a different host: aii "hello" --host ${t}:${r}`]),this.name="ConnectionError",Object.setPrototypeOf(this,e.prototype)}},Dt=class e extends Cn{constructor(t,r){super(`Configuration error: ${t}`,"CONFIG_ERROR",r??["Run 'aii config init' to complete setup"]),this.name="ConfigError",Object.setPrototypeOf(this,e.prototype)}},wa=class e extends Cn{constructor(t,r){super(`Operation timed out: ${t} (${r}ms)`,"TIMEOUT_ERROR",["Try again","Check network connectivity","The server might be overloaded"]),this.name="TimeoutError",Object.setPrototypeOf(this,e.prototype)}},Ia=class e extends Cn{constructor(t){super(t,"WEBSOCKET_ERROR",["Check if Aii Server is running","Verify the server URL in config","Check network connectivity"]),this.name="WebSocketError",Object.setPrototypeOf(this,e.prototype)}},va=class e extends Cn{constructor(t,r){super(r,t,["Check server logs for more details","Try again with a different query"]),this.name="ServerError",Object.setPrototypeOf(this,e.prototype)}},At=class e extends Cn{constructor(t="Missing or invalid API key"){super(`Authentication error: ${t}`,"AUTH_ERROR",["Run 'aii config init' to set up your API key","Check that your API key is valid","Verify the API key in ~/.aii/secrets.yaml"]),this.name="AuthError",Object.setPrototypeOf(this,e.prototype)}};var Yp=class{configDir;configPath;secretsPath;config=null;secrets=null;constructor(t){this.configDir=t??Jl.join(Ry.homedir(),Zl.configDir),this.configPath=Jl.join(this.configDir,Zl.configFile),this.secretsPath=Jl.join(this.configDir,Zl.secretsFile)}getConfigDir(){return this.configDir}configExists(){return gt.existsSync(this.configPath)}async load(){if(this.config)return this.config;let t={...Hp};if(gt.existsSync(this.configPath))try{let r=gt.readFileSync(this.configPath,"utf-8"),n=Qn.parse(r);t=this.mergeConfig(Hp,n)}catch{throw new Dt(`Failed to parse config file: ${this.configPath}`,["Check if the YAML syntax is valid","Try running: aii config init"])}return await this.loadSecrets(),t=this.applyEnvOverrides(t),this.config=t,t}async loadSecrets(){if(this.secrets)return this.secrets;let t={};if(gt.existsSync(this.secretsPath))try{let r=gt.readFileSync(this.secretsPath,"utf-8");t=Qn.parse(r)}catch{}return this.secrets=t,t}mergeConfig(t,r){let n={...t};return r.llm&&(n.llm={...t.llm,...r.llm}),r.api&&(n.api={...t.api,...r.api},n.api.url&&!n.api.url.startsWith("http://")&&!n.api.url.startsWith("https://")&&(n.api.url=`http://${n.api.url}`)),r.streaming&&(n.streaming={...t.streaming,...r.streaming}),r.output_modes&&(n.output_modes={...t.output_modes,...r.output_modes}),r.mcp&&(n.mcp=r.mcp),r.web_search&&(n.web_search=r.web_search),n}applyEnvOverrides(t){let r={...t};return process.env.AII_LLM_PROVIDER&&(r.llm.provider=process.env.AII_LLM_PROVIDER),process.env.AII_MODEL&&(r.llm.model=process.env.AII_MODEL),process.env.AII_API_URL&&(r.api.url=process.env.AII_API_URL),r}getServerApiKey(){let t=this.config?.api.keys;return t&&t.length>0?t[0]:this.config?.api.key?this.config.api.key:process.env.AII_API_KEY}getApiKey(t){let r=t??this.config?.llm.provider??"anthropic";if(this.secrets){let a=this.secrets[`${r}_api_key`];if(a)return a;let o=this.secrets.api_keys?.[r];if(o)return o}let n={anthropic:"ANTHROPIC_API_KEY",openai:"OPENAI_API_KEY",gemini:"GEMINI_API_KEY",deepseek:"DEEPSEEK_API_KEY",moonshot:"MOONSHOT_API_KEY",zai:"ZAI_API_KEY"},i=process.env[n[r]];if(i)return i;let s=process.env[`AII_${n[r]}`];if(s)return s}get(t){if(!this.config)return;let r=t.split("."),n=this.config;for(let i of r){if(n==null)return;n=n[i]}return n}async set(t,r){this.config||await this.load();let n=r;t==="api.url"&&typeof r=="string"&&!r.startsWith("http://")&&!r.startsWith("https://")&&(n=`http://${r}`);let i=t.split("."),s=this.config;for(let a=0;a<i.length-1;a++){let o=i[a];s[o]===void 0&&(s[o]={}),s=s[o]}s[i[i.length-1]]=n,await this.save()}async save(){if(!this.config)throw new Dt("No config loaded to save");gt.existsSync(this.configDir)||gt.mkdirSync(this.configDir,{recursive:!0,mode:448});let t=Qn.stringify(this.config);gt.writeFileSync(this.configPath,t,{encoding:"utf-8",mode:384})}loadSecretsSync(){if(this.secrets)return;let t={};if(gt.existsSync(this.secretsPath))try{let r=gt.readFileSync(this.secretsPath,"utf-8");t=Qn.parse(r)}catch{}this.secrets=t}getSecret(t){this.secrets||this.loadSecretsSync();let r=this.secrets?.[t];return typeof r=="string"?r:void 0}async setSecret(t,r){gt.existsSync(this.configDir)||gt.mkdirSync(this.configDir,{recursive:!0,mode:448}),this.secrets||await this.loadSecrets(),this.secrets=this.secrets||{},this.secrets[t]=r;let n=Qn.stringify(this.secrets);gt.writeFileSync(this.secretsPath,n,{encoding:"utf-8",mode:384})}getConfig(){if(!this.config)throw new Dt("Config not loaded. Call load() first.");return this.config}validate(){let t=[];return this.config?(this.config.llm.provider||t.push("Missing LLM provider"),this.config.llm.model||t.push("Missing LLM model"),this.getApiKey()||t.push(`Missing API key for provider: ${this.config.llm.provider}`),this.config.api.url||t.push("Missing API URL"),{valid:t.length===0,issues:t}):(t.push("Configuration not loaded"),{valid:!1,issues:t})}},qp=null;function Ht(){return qp||(qp=new Yp),qp}var SB=ct(CT(),1),yB=ct(rm(),1),TB=ct(sm(),1),xT=ct(dc(),1),bB=ct(kT(),1);var Nn=xT.default;On();var YB={timeout:12e4,retries:3,retryDelay:1e3},ir=class{options;ws=null;activityTimeout=null;mcpExecutor=null;constructor(t){this.options={...YB,...t}}async initializeMCP(){if(!this.mcpExecutor){let{ClientMCPExecutor:t}=await Promise.resolve().then(()=>(hc(),gc));this.mcpExecutor=new t,await this.mcpExecutor.initialize(),H(`MCP executor initialized with ${this.mcpExecutor.getConnectionCount()} connections`)}}async executeRequest(t,r){let n=null;for(let i=0;i<this.options.retries;i++)try{return await this.executeWithRetry(t,r)}catch(s){if(n=s instanceof Error?s:new Error(String(s)),H(`Attempt ${i+1} failed: ${n.message}`),n instanceof va||n.message.includes("Authentication"))throw n;if(i<this.options.retries-1){let a=this.options.retryDelay*Math.pow(2,i);H(`Retrying in ${a}ms...`),await this.sleep(a)}}throw n??new Ia("Max retries exceeded")}async executeWithRetry(t,r){return new Promise((n,i)=>{let s=this.buildWebSocketUrl();H(`Connecting to ${s}`);try{this.ws=new Nn(s)}catch{let l=new URL(this.options.url);i(new Ra(l.hostname||"localhost",l.port||"26169"));return}let a=!1,o=null;this.resetActivityTimeout(()=>{a||(this.cleanup(),i(new wa("WebSocket activity",this.options.timeout)))}),this.ws.on("open",()=>{H("WebSocket connected, sending request"),this.ws?.send(JSON.stringify(t))}),this.ws.on("message",l=>{this.resetActivityTimeout(()=>{a||(this.cleanup(),i(new wa("WebSocket activity",this.options.timeout)))});try{let c=JSON.parse(l.toString());this.handleMessage(c,r,u=>{a=!0,o=u,this.cleanup(),n(u)},u=>{a=!0,this.cleanup(),i(u)})}catch{H(`Failed to parse message: ${l.toString()}`)}}),this.ws.on("error",l=>{if(H(`WebSocket error: ${l.message}`),!a){a=!0,this.cleanup();let c=new URL(this.options.url);i(new Ra(c.hostname||"localhost",c.port||"26169"))}}),this.ws.on("close",(l,c)=>{H(`WebSocket closed: ${l} ${c.toString()}`),a||(a=!0,this.cleanup(),o?n(o):i(new Ia(`Connection closed unexpectedly: ${l}`)))})})}handleMessage(t,r,n,i){switch(t.type){case"token":{let s=t;r?.onToken?.(s.data);break}case"complete":{let s=t,a=s.metadata||{},o=this.convertServerMetadata(s),l={result:s.result,metadata:o,clientSideExecution:a.client_side_execution===!0,userRequest:a.user_request};r?.onComplete?.(l),n(l);break}case"error":{let s=t,a=new va(s.code,s.message);r?.onError?.(a),i(a);break}case"mcp_query_tools":{H("Received mcp_query_tools request"),this.handleMCPQueryTools(t);break}case"mcp_tool_request":{H("Received mcp_tool_request"),this.handleMCPToolRequest(t);break}default:H(`Unknown message type: ${t.type}`)}}convertServerMetadata(t){let r=t.metadata||{},n,i;r.tokens?(n=r.tokens.input,i=r.tokens.output):(n=r.input_tokens,i=r.output_tokens);let s=r.cost??r.cost_usd,a=r.execution_time??r.total_time;return{function_name:t.function_name,tokens_in:n,tokens_out:i,cost:typeof s=="number"?s:void 0,model:typeof r.model=="string"?r.model:void 0,execution_time:typeof a=="number"?a:void 0}}buildWebSocketUrl(){let t=new URL(this.options.url);return`${t.protocol==="https:"?"wss:":"ws:"}//${t.host}/ws/execute`}async handleMCPQueryTools(t){try{if(!this.mcpExecutor){let{ClientMCPExecutor:n}=await Promise.resolve().then(()=>(hc(),gc));this.mcpExecutor=new n,await this.mcpExecutor.initialize()}let r=await this.mcpExecutor.handleQueryTools(t);this.ws?.send(JSON.stringify(r))}catch(r){let n=r instanceof Error?r.message:String(r),i=r instanceof Error?r.stack:void 0;H(`Error handling mcp_query_tools: ${n}${i?`
|
|
325
|
+
${t}`:t}var y2="0.4.3";function T2(){let e=new F1;return e.name("aii").description("AI-powered CLI assistant").version(y2,"-V, --version","Show version number").helpOption(!1).enablePositionalOptions().argument("[query...]","Natural language query").option("--clean","Clean output mode (just the result)").option("--standard","Standard output mode (result + metrics)").option("--thinking","Thinking mode (full reasoning)").option("-v, --verbose","Verbose output (alias for --thinking)").option("-d, --debug","Debug output").option("--model <model>","Override LLM model").option("--host <host>","API server host:port").option("-y, --yes","Auto-confirm shell commands").option("--offline","Offline mode (no web/MCP)").option("-i, --interactive","Interactive chat mode").option("-c, --continue-chat <id>","Continue chat session").option("-n, --new-chat","Force new chat session").option("--auto","Auto mode - auto-approve all actions").option("-q, --quiet","Quiet mode - minimal output").option("--no-colors","Disable colored output").option("--no-emojis","Disable emoji icons").option("--no-animations","Disable animations").option("--no-streaming","Disable streaming").option("--show-tokens","Show token usage").option("--show-cost","Show cost estimates").option("-h, --help","Show help"),e.command("config").description("Configuration management").argument("[action]","Action: init, show, validate, set").argument("[key]","Config key (for set)").argument("[value]","Config value (for set)").action(()=>{}),e.command("mcp").description("MCP server management").argument("[action]","Action: list, add, remove, status, etc.").argument("[rest...]","Server name and arguments").passThroughOptions().action(()=>{}),e.command("prompt").description("Prompt library").argument("[action]","Action: list, show, use, create").argument("[rest...]","Prompt name and arguments").allowUnknownOption().action(()=>{}),e.command("stats").description("Usage statistics").argument("[type]","Type: models, cost").action(()=>{}),e.command("history").description("Chat history").argument("[action]","Action: list, search, export, delete").argument("[query]","Search query or ID").action(()=>{}),e.command("doctor").description("System health check").action(()=>{}),e.command("chat").description("Interactive chat mode").action(()=>{}),e.command("agent").description("Interactive agent mode with tool execution").argument("[query...]","Optional query (non-interactive if provided)").action(()=>{}),e.command("run").description("Run domain-specific operations").argument("<operation>","Operation (e.g., git commit)").argument("[args...]","Additional arguments").allowUnknownOption().action(()=>{}),e.command("help").description("display help for command").argument("[command]","Command to show help for").action(()=>{}),e.command("version").description("Show version number").action(()=>{}),e}async function U1(e){let t=T2();t.exitOverride(),t.configureOutput({writeErr:()=>{}});let r="query",n,i=[];try{t.parse(e),i=t.args;let c=t.args[0];c&&["config","mcp","prompt","stats","history","doctor","chat","run","help","version","agent"].includes(c)&&(r=c,n=t.args[1],i=t.args.slice(2))}catch(c){c instanceof P1&&(c.code==="commander.version"||c.code==="commander.helpDisplayed")&&process.exit(0),i=e.slice(2)}let s=t.opts(),a={clean:s.clean??!1,standard:s.standard??!1,thinking:s.thinking??!1,verbose:s.verbose??!1,debug:s.debug??!1,model:s.model,host:s.host,yes:s.yes??!1,offline:s.offline??!1,interactive:s.interactive??!1,continueChat:s.continueChat,newChat:s.newChat??!1,auto:s.auto??!1,quiet:s.quiet??!1,noColors:!s.colors,noEmojis:!s.emojis,noAnimations:!s.animations,noStreaming:!s.streaming,showTokens:s.showTokens??!1,showCost:s.showCost??!1,help:s.help??!1,version:s.version??!1},o;s_()&&(o=await B1()),(r==="chat"||a.interactive)&&(r="agent"),r==="query"&&!i.length&&!o&&(r="agent");let l;if(r==="query"&&i.length>0)l=i.join(" ");else if(r==="agent"){let c=[];n&&c.push(n),i.length>0&&c.push(...i),c.length>0&&(l=c.join(" "))}return{command:r,subcommand:n,args:i,flags:a,stdinContent:o,query:l}}var ke;(function(e){e[e.LOCAL=1]="LOCAL",e[e.SERVER=2]="SERVER"})(ke||(ke={}));var a_={translate:"clean",shell:"clean",shell_generate:"clean",mcp:"standard",explain:"standard",code_generate:"standard",code_review:"standard",summarize:"standard",research:"standard",_default:"standard"};function Ri(e,t,r,n){return e.clean?"clean":e.thinking||e.verbose?"thinking":e.standard?"standard":t&&r?.[t]?r[t]:t&&a_[t]?a_[t]:n||a_._default}var G1={config:ke.LOCAL,help:ke.LOCAL,version:ke.LOCAL,doctor:ke.LOCAL,mcp:ke.LOCAL,prompt:ke.LOCAL,stats:ke.LOCAL,history:ke.LOCAL,query:ke.SERVER,chat:ke.SERVER,run:ke.SERVER,agent:ke.SERVER};function o_(e){let t=G1[e.command]??ke.SERVER;switch(e.command){case"config":return b2(e);case"mcp":return C2(e);case"prompt":return D2(e);case"stats":return A2(e);case"history":return N2(e);case"doctor":return{tier:ke.LOCAL,handler:"doctor",params:{}};case"chat":return{tier:ke.SERVER,handler:"chat",params:{continueChat:e.flags.continueChat}};case"run":return O2(e);case"agent":return{tier:ke.SERVER,handler:"agent",params:{interactive:!e.query}};case"help":return{tier:ke.LOCAL,handler:"help",params:{command:e.subcommand}};case"version":return{tier:ke.LOCAL,handler:"version",params:{}};case"query":default:return{tier:t,handler:"query",params:{query:e.query,stdinContent:e.stdinContent}}}}function b2(e){let t=e.subcommand??e.args[0]??"show";return{tier:ke.LOCAL,handler:`config:${t}`,params:{key:e.args[0],value:e.args[1]}}}function C2(e){let t=e.subcommand??e.args[0]??"list";return{tier:ke.LOCAL,handler:`mcp:${t}`,params:{name:e.args[0],args:e.args.slice(1)}}}function D2(e){let t=e.subcommand??e.args[0]??"list";return{tier:ke.LOCAL,handler:`prompt:${t}`,params:{name:e.args[0],args:e.args.slice(1)}}}function A2(e){let t=e.subcommand??e.args[0];return{tier:ke.LOCAL,handler:t?`stats:${t}`:"stats",params:{}}}function N2(e){let t=e.subcommand??e.args[0]??"list";return{tier:ke.LOCAL,handler:`history:${t}`,params:{query:e.args[0],id:e.args[0]}}}function O2(e){let t=[];e.subcommand&&t.push(e.subcommand);let r=e.args.filter(i=>!i.startsWith("-"));t.push(...r);let n=t.join(" ");return{tier:ke.SERVER,handler:"run",params:{operation:n}}}var Qn=ct($p(),1);import*as gt from"fs";import*as Jl from"path";import*as Ry from"os";var Hp={llm:{provider:"anthropic",model:"claude-sonnet-4-20250514",temperature:.7,max_tokens:4e3},api:{url:"http://localhost:26169"},streaming:{enabled:!0,buffer_size:10},output_modes:{default:"standard"}},Zl={configDir:".aii",configFile:"config.yaml",secretsFile:"secrets.yaml",mcpFile:"mcp.json"};var Cn=class e extends Error{code;suggestions;constructor(t,r,n=[]){super(t),this.name="AiiError",this.code=r,this.suggestions=n,Object.setPrototypeOf(this,e.prototype)}},Ra=class e extends Cn{constructor(t,r){super(`Cannot connect to Aii Server at ${t}:${r}`,"CONNECTION_ERROR",[`Check if Aii Server is running: curl ${t}:${r}/api/status`,"Start the Aii Server (separate process)","Verify host in config: aii config show",`Try a different host: aii "hello" --host ${t}:${r}`]),this.name="ConnectionError",Object.setPrototypeOf(this,e.prototype)}},Dt=class e extends Cn{constructor(t,r){super(`Configuration error: ${t}`,"CONFIG_ERROR",r??["Run 'aii config init' to complete setup"]),this.name="ConfigError",Object.setPrototypeOf(this,e.prototype)}},wa=class e extends Cn{constructor(t,r){super(`Operation timed out: ${t} (${r}ms)`,"TIMEOUT_ERROR",["Try again","Check network connectivity","The server might be overloaded"]),this.name="TimeoutError",Object.setPrototypeOf(this,e.prototype)}},Ia=class e extends Cn{constructor(t){super(t,"WEBSOCKET_ERROR",["Check if Aii Server is running","Verify the server URL in config","Check network connectivity"]),this.name="WebSocketError",Object.setPrototypeOf(this,e.prototype)}},va=class e extends Cn{constructor(t,r){super(r,t,["Check server logs for more details","Try again with a different query"]),this.name="ServerError",Object.setPrototypeOf(this,e.prototype)}},At=class e extends Cn{constructor(t="Missing or invalid API key"){super(`Authentication error: ${t}`,"AUTH_ERROR",["Run 'aii config init' to set up your API key","Check that your API key is valid","Verify the API key in ~/.aii/secrets.yaml"]),this.name="AuthError",Object.setPrototypeOf(this,e.prototype)}};var Yp=class{configDir;configPath;secretsPath;config=null;secrets=null;constructor(t){this.configDir=t??Jl.join(Ry.homedir(),Zl.configDir),this.configPath=Jl.join(this.configDir,Zl.configFile),this.secretsPath=Jl.join(this.configDir,Zl.secretsFile)}getConfigDir(){return this.configDir}configExists(){return gt.existsSync(this.configPath)}async load(){if(this.config)return this.config;let t={...Hp};if(gt.existsSync(this.configPath))try{let r=gt.readFileSync(this.configPath,"utf-8"),n=Qn.parse(r);t=this.mergeConfig(Hp,n)}catch{throw new Dt(`Failed to parse config file: ${this.configPath}`,["Check if the YAML syntax is valid","Try running: aii config init"])}return await this.loadSecrets(),t=this.applyEnvOverrides(t),this.config=t,t}async loadSecrets(){if(this.secrets)return this.secrets;let t={};if(gt.existsSync(this.secretsPath))try{let r=gt.readFileSync(this.secretsPath,"utf-8");t=Qn.parse(r)}catch{}return this.secrets=t,t}mergeConfig(t,r){let n={...t};return r.llm&&(n.llm={...t.llm,...r.llm}),r.api&&(n.api={...t.api,...r.api},n.api.url&&!n.api.url.startsWith("http://")&&!n.api.url.startsWith("https://")&&(n.api.url=`http://${n.api.url}`)),r.streaming&&(n.streaming={...t.streaming,...r.streaming}),r.output_modes&&(n.output_modes={...t.output_modes,...r.output_modes}),r.mcp&&(n.mcp=r.mcp),r.web_search&&(n.web_search=r.web_search),n}applyEnvOverrides(t){let r={...t};return process.env.AII_LLM_PROVIDER&&(r.llm.provider=process.env.AII_LLM_PROVIDER),process.env.AII_MODEL&&(r.llm.model=process.env.AII_MODEL),process.env.AII_API_URL&&(r.api.url=process.env.AII_API_URL),r}getServerApiKey(){let t=this.config?.api.keys;return t&&t.length>0?t[0]:this.config?.api.key?this.config.api.key:process.env.AII_API_KEY}getApiKey(t){let r=t??this.config?.llm.provider??"anthropic";if(this.secrets){let a=this.secrets[`${r}_api_key`];if(a)return a;let o=this.secrets.api_keys?.[r];if(o)return o}let n={anthropic:"ANTHROPIC_API_KEY",openai:"OPENAI_API_KEY",gemini:"GEMINI_API_KEY",deepseek:"DEEPSEEK_API_KEY",moonshot:"MOONSHOT_API_KEY",zai:"ZAI_API_KEY"},i=process.env[n[r]];if(i)return i;let s=process.env[`AII_${n[r]}`];if(s)return s}get(t){if(!this.config)return;let r=t.split("."),n=this.config;for(let i of r){if(n==null)return;n=n[i]}return n}async set(t,r){this.config||await this.load();let n=r;t==="api.url"&&typeof r=="string"&&!r.startsWith("http://")&&!r.startsWith("https://")&&(n=`http://${r}`);let i=t.split("."),s=this.config;for(let a=0;a<i.length-1;a++){let o=i[a];s[o]===void 0&&(s[o]={}),s=s[o]}s[i[i.length-1]]=n,await this.save()}async save(){if(!this.config)throw new Dt("No config loaded to save");gt.existsSync(this.configDir)||gt.mkdirSync(this.configDir,{recursive:!0,mode:448});let t=Qn.stringify(this.config);gt.writeFileSync(this.configPath,t,{encoding:"utf-8",mode:384})}loadSecretsSync(){if(this.secrets)return;let t={};if(gt.existsSync(this.secretsPath))try{let r=gt.readFileSync(this.secretsPath,"utf-8");t=Qn.parse(r)}catch{}this.secrets=t}getSecret(t){this.secrets||this.loadSecretsSync();let r=this.secrets?.[t];return typeof r=="string"?r:void 0}async setSecret(t,r){gt.existsSync(this.configDir)||gt.mkdirSync(this.configDir,{recursive:!0,mode:448}),this.secrets||await this.loadSecrets(),this.secrets=this.secrets||{},this.secrets[t]=r;let n=Qn.stringify(this.secrets);gt.writeFileSync(this.secretsPath,n,{encoding:"utf-8",mode:384})}getConfig(){if(!this.config)throw new Dt("Config not loaded. Call load() first.");return this.config}validate(){let t=[];return this.config?(this.config.llm.provider||t.push("Missing LLM provider"),this.config.llm.model||t.push("Missing LLM model"),this.getApiKey()||t.push(`Missing API key for provider: ${this.config.llm.provider}`),this.config.api.url||t.push("Missing API URL"),{valid:t.length===0,issues:t}):(t.push("Configuration not loaded"),{valid:!1,issues:t})}},qp=null;function Ht(){return qp||(qp=new Yp),qp}var SB=ct(CT(),1),yB=ct(rm(),1),TB=ct(sm(),1),xT=ct(dc(),1),bB=ct(kT(),1);var Nn=xT.default;On();var YB={timeout:12e4,retries:3,retryDelay:1e3},ir=class{options;ws=null;activityTimeout=null;mcpExecutor=null;constructor(t){this.options={...YB,...t}}async initializeMCP(){if(!this.mcpExecutor){let{ClientMCPExecutor:t}=await Promise.resolve().then(()=>(hc(),gc));this.mcpExecutor=new t,await this.mcpExecutor.initialize(),H(`MCP executor initialized with ${this.mcpExecutor.getConnectionCount()} connections`)}}async executeRequest(t,r){let n=null;for(let i=0;i<this.options.retries;i++)try{return await this.executeWithRetry(t,r)}catch(s){if(n=s instanceof Error?s:new Error(String(s)),H(`Attempt ${i+1} failed: ${n.message}`),n instanceof va||n.message.includes("Authentication"))throw n;if(i<this.options.retries-1){let a=this.options.retryDelay*Math.pow(2,i);H(`Retrying in ${a}ms...`),await this.sleep(a)}}throw n??new Ia("Max retries exceeded")}async executeWithRetry(t,r){return new Promise((n,i)=>{let s=this.buildWebSocketUrl();H(`Connecting to ${s}`);try{this.ws=new Nn(s)}catch{let l=new URL(this.options.url);i(new Ra(l.hostname||"localhost",l.port||"26169"));return}let a=!1,o=null;this.resetActivityTimeout(()=>{a||(this.cleanup(),i(new wa("WebSocket activity",this.options.timeout)))}),this.ws.on("open",()=>{H("WebSocket connected, sending request"),this.ws?.send(JSON.stringify(t))}),this.ws.on("message",l=>{this.resetActivityTimeout(()=>{a||(this.cleanup(),i(new wa("WebSocket activity",this.options.timeout)))});try{let c=JSON.parse(l.toString());this.handleMessage(c,r,u=>{a=!0,o=u,this.cleanup(),n(u)},u=>{a=!0,this.cleanup(),i(u)})}catch{H(`Failed to parse message: ${l.toString()}`)}}),this.ws.on("error",l=>{if(H(`WebSocket error: ${l.message}`),!a){a=!0,this.cleanup();let c=new URL(this.options.url);i(new Ra(c.hostname||"localhost",c.port||"26169"))}}),this.ws.on("close",(l,c)=>{H(`WebSocket closed: ${l} ${c.toString()}`),a||(a=!0,this.cleanup(),o?n(o):i(new Ia(`Connection closed unexpectedly: ${l}`)))})})}handleMessage(t,r,n,i){switch(t.type){case"token":{let s=t;r?.onToken?.(s.data);break}case"complete":{let s=t,a=s.metadata||{},o=this.convertServerMetadata(s),l={result:s.result,metadata:o,clientSideExecution:a.client_side_execution===!0,userRequest:a.user_request};r?.onComplete?.(l),n(l);break}case"error":{let s=t,a=new va(s.code,s.message);r?.onError?.(a),i(a);break}case"mcp_query_tools":{H("Received mcp_query_tools request"),this.handleMCPQueryTools(t);break}case"mcp_tool_request":{H("Received mcp_tool_request"),this.handleMCPToolRequest(t);break}default:H(`Unknown message type: ${t.type}`)}}convertServerMetadata(t){let r=t.metadata||{},n,i;r.tokens?(n=r.tokens.input,i=r.tokens.output):(n=r.input_tokens,i=r.output_tokens);let s=r.cost??r.cost_usd,a=r.execution_time??r.total_time;return{function_name:t.function_name,tokens_in:n,tokens_out:i,cost:typeof s=="number"?s:void 0,model:typeof r.model=="string"?r.model:void 0,execution_time:typeof a=="number"?a:void 0}}buildWebSocketUrl(){let t=new URL(this.options.url);return`${t.protocol==="https:"?"wss:":"ws:"}//${t.host}/ws/execute`}async handleMCPQueryTools(t){try{if(!this.mcpExecutor){let{ClientMCPExecutor:n}=await Promise.resolve().then(()=>(hc(),gc));this.mcpExecutor=new n,await this.mcpExecutor.initialize()}let r=await this.mcpExecutor.handleQueryTools(t);this.ws?.send(JSON.stringify(r))}catch(r){let n=r instanceof Error?r.message:String(r),i=r instanceof Error?r.stack:void 0;H(`Error handling mcp_query_tools: ${n}${i?`
|
|
326
326
|
${i}`:""}`),this.ws?.send(JSON.stringify({type:"mcp_query_tools_response",request_id:t.request_id||"unknown",success:!1,error:n,tools:[]}))}}async handleMCPToolRequest(t){try{if(!this.mcpExecutor){let{ClientMCPExecutor:n}=await Promise.resolve().then(()=>(hc(),gc));this.mcpExecutor=new n,await this.mcpExecutor.initialize()}let r=await this.mcpExecutor.handleToolExecution(t);this.ws?.send(JSON.stringify(r))}catch(r){H(`Error handling mcp_tool_request: ${r}`),this.ws?.send(JSON.stringify({type:"mcp_tool_response",request_id:t.request_id||"unknown",success:!1,error:String(r)}))}}resetActivityTimeout(t){this.activityTimeout&&clearTimeout(this.activityTimeout),this.activityTimeout=setTimeout(t,this.options.timeout)}cleanup(){if(this.activityTimeout&&(clearTimeout(this.activityTimeout),this.activityTimeout=null),this.ws){try{this.ws.close()}catch(t){H(`WebSocket close error: ${t instanceof Error?t.message:String(t)}`)}this.ws=null}}async shutdownMCP(){this.mcpExecutor&&(await this.mcpExecutor.shutdown(),this.mcpExecutor=null)}disconnect(){this.cleanup()}sleep(t){return new Promise(r=>setTimeout(r,t))}};$e();import Dc from"node:process";import JT from"node:process";import Tc from"node:process";var KB=(e,t,r,n)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;let i=Object.getOwnPropertyDescriptor(e,r),s=Object.getOwnPropertyDescriptor(t,r);!VB(i,s)&&n||Object.defineProperty(e,r,s)},VB=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},WB=(e,t)=>{let r=Object.getPrototypeOf(t);r!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,r)},QB=(e,t)=>`/* Wrapped ${e}*/
|
|
327
327
|
${t}`,jB=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),XB=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),ZB=(e,t,r)=>{let n=r===""?"":`with ${r.trim()}() `,i=QB.bind(null,n,t.toString());Object.defineProperty(i,"name",XB);let{writable:s,enumerable:a,configurable:o}=jB;Object.defineProperty(e,"toString",{value:i,writable:s,enumerable:a,configurable:o})};function Tm(e,t,{ignoreNonConfigurable:r=!1}={}){let{name:n}=e;for(let i of Reflect.ownKeys(t))KB(e,t,i,r);return WB(e,t),ZB(e,t,n),e}var Ec=new WeakMap,WT=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let r,n=0,i=e.displayName||e.name||"<anonymous>",s=function(...a){if(Ec.set(s,++n),n===1)r=e.apply(this,a),e=void 0;else if(t.throw===!0)throw new Error(`Function \`${i}\` can only be called once`);return r};return Tm(s,e),Ec.set(s,n),s};WT.callCount=e=>{if(!Ec.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Ec.get(e)};var QT=WT;var ri=[];ri.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&ri.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&ri.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var Sc=e=>!!e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",bm=Symbol.for("signal-exit emitter"),Cm=globalThis,JB=Object.defineProperty.bind(Object),Dm=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Cm[bm])return Cm[bm];JB(Cm,bm,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,r){this.listeners[t].push(r)}removeListener(t,r){let n=this.listeners[t],i=n.indexOf(r);i!==-1&&(i===0&&n.length===1?n.length=0:n.splice(i,1))}emit(t,r,n){if(this.emitted[t])return!1;this.emitted[t]=!0;let i=!1;for(let s of this.listeners[t])i=s(r,n)===!0||i;return t==="exit"&&(i=this.emit("afterExit",r,n)||i),i}},yc=class{},e3=e=>({onExit(t,r){return e.onExit(t,r)},load(){return e.load()},unload(){return e.unload()}}),Am=class extends yc{onExit(){return()=>{}}load(){}unload(){}},Nm=class extends yc{#a=Om.platform==="win32"?"SIGINT":"SIGHUP";#r=new Dm;#e;#i;#_;#t={};#s=!1;constructor(t){super(),this.#e=t,this.#t={};for(let r of ri)this.#t[r]=()=>{let n=this.#e.listeners(r),{count:i}=this.#r,s=t;if(typeof s.__signal_exit_emitter__=="object"&&typeof s.__signal_exit_emitter__.count=="number"&&(i+=s.__signal_exit_emitter__.count),n.length===i){this.unload();let a=this.#r.emit("exit",null,r),o=r==="SIGHUP"?this.#a:r;a||t.kill(t.pid,o)}};this.#_=t.reallyExit,this.#i=t.emit}onExit(t,r){if(!Sc(this.#e))return()=>{};this.#s===!1&&this.load();let n=r?.alwaysLast?"afterExit":"exit";return this.#r.on(n,t),()=>{this.#r.removeListener(n,t),this.#r.listeners.exit.length===0&&this.#r.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#s){this.#s=!0,this.#r.count+=1;for(let t of ri)try{let r=this.#t[t];r&&this.#e.on(t,r)}catch{}this.#e.emit=(t,...r)=>this.#p(t,...r),this.#e.reallyExit=t=>this.#n(t)}}unload(){this.#s&&(this.#s=!1,ri.forEach(t=>{let r=this.#t[t];if(!r)throw new Error("Listener not defined for signal: "+t);try{this.#e.removeListener(t,r)}catch{}}),this.#e.emit=this.#i,this.#e.reallyExit=this.#_,this.#r.count-=1)}#n(t){return Sc(this.#e)?(this.#e.exitCode=t||0,this.#r.emit("exit",this.#e.exitCode,null),this.#_.call(this.#e,this.#e.exitCode)):0}#p(t,...r){let n=this.#i;if(t==="exit"&&Sc(this.#e)){typeof r[0]=="number"&&(this.#e.exitCode=r[0]);let i=n.call(this.#e,t,...r);return this.#r.emit("exit",this.#e.exitCode,null),i}else return n.call(this.#e,t,...r)}},Om=globalThis.process,{onExit:jT,load:kre,unload:xre}=e3(Sc(Om)?new Nm(Om):new Am);var XT=Tc.stderr.isTTY?Tc.stderr:Tc.stdout.isTTY?Tc.stdout:void 0,t3=XT?QT(()=>{jT(()=>{XT.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},ZT=t3;var bc=!1,Xi={};Xi.show=(e=JT.stderr)=>{e.isTTY&&(bc=!1,e.write("\x1B[?25h"))};Xi.hide=(e=JT.stderr)=>{e.isTTY&&(ZT(),bc=!0,e.write("\x1B[?25l"))};Xi.toggle=(e,t)=>{e!==void 0&&(bc=e),bc?Xi.show(t):Xi.hide(t)};var Rm=Xi;var Va=ct(wm(),1);$e();import hr from"node:process";function Im(){return hr.platform!=="win32"?hr.env.TERM!=="linux":!!hr.env.CI||!!hr.env.WT_SESSION||!!hr.env.TERMINUS_SUBLIME||hr.env.ConEmuTask==="{cmd::Cmder}"||hr.env.TERM_PROGRAM==="Terminus-Sublime"||hr.env.TERM_PROGRAM==="vscode"||hr.env.TERM==="xterm-256color"||hr.env.TERM==="alacritty"||hr.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var n3={info:f.blue("\u2139"),success:f.green("\u2714"),warning:f.yellow("\u26A0"),error:f.red("\u2716")},i3={info:f.blue("i"),success:f.green("\u221A"),warning:f.yellow("\u203C"),error:f.red("\xD7")},s3=Im()?n3:i3,qa=s3;vm();var a3=Ya();function Ka(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(a3,"")}function nb(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function ib(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function sb(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||e===129736||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function o3(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function ab(e,{ambiguousAsWide:t=!1}={}){return o3(e),ib(e)||sb(e)||t&&nb(e)?2:1}var cb=ct(lb(),1),l3=new Intl.Segmenter,c3=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function km(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:r=!0,countAnsiEscapeCodes:n=!1}=t;if(n||(e=Ka(e)),e.length===0)return 0;let i=0,s={ambiguousAsWide:!r};for(let{segment:a}of l3.segment(e)){let o=a.codePointAt(0);if(!(o<=31||o>=127&&o<=159)&&!(o>=8203&&o<=8207||o===65279)&&!(o>=768&&o<=879||o>=6832&&o<=6911||o>=7616&&o<=7679||o>=8400&&o<=8447||o>=65056&&o<=65071)&&!(o>=55296&&o<=57343)&&!(o>=65024&&o<=65039)&&!c3.test(a)){if((0,cb.default)().test(a)){i+=2;continue}i+=ab(o,s)}}return i}function xm({stream:e=process.stdout}={}){return!!(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}import ub from"node:process";function Mm(){let{env:e}=ub,{TERM:t,TERM_PROGRAM:r}=e;return ub.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}import wr from"node:process";var u3=3,Lm=class{#a=0;start(){this.#a++,this.#a===1&&this.#r()}stop(){if(this.#a<=0)throw new Error("`stop` called more times than `start`");this.#a--,this.#a===0&&this.#e()}#r(){wr.platform==="win32"||!wr.stdin.isTTY||(wr.stdin.setRawMode(!0),wr.stdin.on("data",this.#i),wr.stdin.resume())}#e(){wr.stdin.isTTY&&(wr.stdin.off("data",this.#i),wr.stdin.pause(),wr.stdin.setRawMode(!1))}#i(t){t[0]===u3&&wr.emit("SIGINT")}},d3=new Lm,Pm=d3;var _3=ct(wm(),1),Fm=class{#a=0;#r=!1;#e=0;#i=-1;#_=0;#t;#s;#n;#p;#f;#c;#u;#d;#g;#o;#l;color;constructor(t){typeof t=="string"&&(t={text:t}),this.#t={color:"cyan",stream:Dc.stderr,discardStdin:!0,hideCursor:!0,...t},this.color=this.#t.color,this.spinner=this.#t.spinner,this.#f=this.#t.interval,this.#n=this.#t.stream,this.#c=typeof this.#t.isEnabled=="boolean"?this.#t.isEnabled:xm({stream:this.#n}),this.#u=typeof this.#t.isSilent=="boolean"?this.#t.isSilent:!1,this.text=this.#t.text,this.prefixText=this.#t.prefixText,this.suffixText=this.#t.suffixText,this.indent=this.#t.indent,Dc.env.NODE_ENV==="test"&&(this._stream=this.#n,this._isEnabled=this.#c,Object.defineProperty(this,"_linesToClear",{get(){return this.#a},set(r){this.#a=r}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#i}}),Object.defineProperty(this,"_lineCount",{get(){return this.#e}}))}get indent(){return this.#d}set indent(t=0){if(!(t>=0&&Number.isInteger(t)))throw new Error("The `indent` option must be an integer from 0 and up");this.#d=t,this.#m()}get interval(){return this.#f??this.#s.interval??100}get spinner(){return this.#s}set spinner(t){if(this.#i=-1,this.#f=void 0,typeof t=="object"){if(t.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#s=t}else if(!Mm())this.#s=Va.default.line;else if(t===void 0)this.#s=Va.default.dots;else if(t!=="default"&&Va.default[t])this.#s=Va.default[t];else throw new Error(`There is no built-in spinner named '${t}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#g}set text(t=""){this.#g=t,this.#m()}get prefixText(){return this.#o}set prefixText(t=""){this.#o=t,this.#m()}get suffixText(){return this.#l}set suffixText(t=""){this.#l=t,this.#m()}get isSpinning(){return this.#p!==void 0}#h(t=this.#o,r=" "){return typeof t=="string"&&t!==""?t+r:typeof t=="function"?t()+r:""}#E(t=this.#l,r=" "){return typeof t=="string"&&t!==""?r+t:typeof t=="function"?r+t():""}#m(){let t=this.#n.columns??80,r=this.#h(this.#o,"-"),n=this.#E(this.#l,"-"),i=" ".repeat(this.#d)+r+"--"+this.#g+"--"+n;this.#e=0;for(let s of Ka(i).split(`
|
|
328
328
|
`))this.#e+=Math.max(1,Math.ceil(km(s,{countAnsiEscapeCodes:!0})/t))}get isEnabled(){return this.#c&&!this.#u}set isEnabled(t){if(typeof t!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#c=t}get isSilent(){return this.#u}set isSilent(t){if(typeof t!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#u=t}frame(){let t=Date.now();(this.#i===-1||t-this.#_>=this.interval)&&(this.#i=++this.#i%this.#s.frames.length,this.#_=t);let{frames:r}=this.#s,n=r[this.#i];this.color&&(n=f[this.color](n));let i=typeof this.#o=="string"&&this.#o!==""?this.#o+" ":"",s=typeof this.text=="string"?" "+this.text:"",a=typeof this.#l=="string"&&this.#l!==""?" "+this.#l:"";return i+n+s+a}clear(){if(!this.#c||!this.#n.isTTY)return this;this.#n.cursorTo(0);for(let t=0;t<this.#a;t++)t>0&&this.#n.moveCursor(0,-1),this.#n.clearLine(1);return(this.#d||this.lastIndent!==this.#d)&&this.#n.cursorTo(this.#d),this.lastIndent=this.#d,this.#a=0,this}render(){return this.#u?this:(this.clear(),this.#n.write(this.frame()),this.#a=this.#e,this)}start(t){return t&&(this.text=t),this.#u?this:this.#c?this.isSpinning?this:(this.#t.hideCursor&&Rm.hide(this.#n),this.#t.discardStdin&&Dc.stdin.isTTY&&(this.#r=!0,Pm.start()),this.render(),this.#p=setInterval(this.render.bind(this),this.interval),this):(this.text&&this.#n.write(`- ${this.text}
|
|
@@ -356,7 +356,7 @@ ${t}`,jB=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),XB=Objec
|
|
|
356
356
|
`)}formatExecutionSummary(t){let r=[];if(t.function_name&&r.push(`${this.emoji("\u{1F527} ")}${t.function_name}`),t.model&&r.push(`${this.emoji("\u{1F916} ")}${t.model}`),t.tokens_in!==void 0||t.tokens_out!==void 0){let i=t.tokens_in??0,s=t.tokens_out??0;r.push(`${this.emoji("\u{1F522} ")}${i}\u2197 ${s}\u2198`)}if(t.cost!==void 0&&r.push(`${this.emoji("\u{1F4B0} ")}$${t.cost.toFixed(6)}`),t.execution_time!==void 0&&r.push(`${this.emoji("\u26A1 ")}${t.execution_time.toFixed(1)}s`),r.length===0)return"";let n=r.join(" \u2022 ");return this.color(n,f.dim)}formatError(t){let r=[];return r.push(this.color(`${this.emoji("\u274C ")}${t.message}`,f.red)),t.suggestions&&t.suggestions.length>0&&(r.push(""),r.push(this.color(`${this.emoji("\u{1F4A1} ")}Solutions:`,f.yellow)),t.suggestions.forEach((n,i)=>{r.push(this.color(` ${i+1}. ${n}`,f.gray))})),r.join(`
|
|
357
357
|
`)}formatConfig(t){let r=[];r.push(this.color(`${this.emoji("\u{1F4CB} ")}Current AII Configuration:`,f.cyan)),r.push(`- Config file: ${t.configFile}`),r.push(`- Storage path: ${t.storagePath}`),t.apiUrl&&r.push(`- Aii Server: ${t.apiUrl}`);let n=t.hasApiKey?this.color("\u2713",f.green):this.color("\u2717",f.red);if(r.push(`- LLM provider: ${t.provider} (${t.model}) - ${n}`),t.webSearch){let i=t.webSearch.enabled?this.color("\u2713",f.green):this.color("\u2717",f.red);r.push(`- Web search: ${t.webSearch.provider??"none"} - ${i}`)}return t.issues&&t.issues.length>0&&r.push(`- Configuration issues: ${t.issues.length}`),r.join(`
|
|
358
358
|
`)}formatHealthCheck(t){let r=[];r.push(this.color(`${this.emoji("\u{1F3E5} ")}AII Health Check`,f.cyan)),r.push("");for(let s of t){let a,o;switch(s.status){case"ok":a="\u2713",o=f.green;break;case"warn":a="\u26A0",o=f.yellow;break;case"error":a="\u2717",o=f.red;break}let l=this.color(a,o),c=this.color(s.message,o);r.push(` ${l} ${s.name.padEnd(20)} ${c}`)}let n=t.some(s=>s.status==="error"),i=t.some(s=>s.status==="warn");return r.push(""),n?r.push(this.color(`${this.emoji("\u274C ")}Some checks failed!`,f.red)):i?r.push(this.color(`${this.emoji("\u26A0\uFE0F ")}All checks passed with warnings`,f.yellow)):r.push(this.color(`${this.emoji("\u2705 ")}All checks passed!`,f.green)),r.join(`
|
|
359
|
-
`)}};function zt(e={}){return new Oh(e)}var mj=[{provider:"anthropic",patterns:[/^claude-/,/^claude$/i]},{provider:"openai",patterns:[/^gpt-/,/^o1-/,/^o3-/,/^chatgpt-/,/^text-davinci/]},{provider:"gemini",patterns:[/^gemini-/,/^gemini$/i]},{provider:"deepseek",patterns:[/^deepseek-/,/^deepseek$/i]},{provider:"moonshot",patterns:[/^kimi-/,/^moonshot-/,/^moonshot$/i]},{provider:"zai",patterns:[/^glm-/,/^glm$/i,/^chatglm/i]}];function fj(e){if(!e)return;let t=e.toLowerCase();for(let{provider:r,patterns:n}of mj)for(let i of n)if(i.test(t))return r}function Ci(e,t){return e?fj(e)??t:t}$e();import*as JL from"readline";import*as Wt from"fs";import*as ud from"path";import*as WL from"os";var cd=ud.join(WL.homedir(),".aii","conversations"),Rh=ud.join(cd,"current.json");function dd(){Wt.existsSync(cd)||Wt.mkdirSync(cd,{recursive:!0})}function gj(){return`conv_${Date.now()}_${Math.random().toString(36).substring(2,9)}`}function hj(e){let r=e.trim().replace(/\s+/g," ");return r.length>50&&(r=r.substring(0,50).trim()+"..."),r}function QL(e){return ud.join(cd,`${e}.json`)}function jL(){dd();try{if(Wt.existsSync(Rh)){let e=Wt.readFileSync(Rh,"utf-8"),t=JSON.parse(e),r=QL(t.id);if(Wt.existsSync(r)){let n=Wt.readFileSync(r,"utf-8");return JSON.parse(n)}}}catch{}return XL()}function XL(){dd();let e={id:gj(),title:"New Conversation",messages:[],createdAt:Date.now(),updatedAt:Date.now()};return Po(e),Ej(e.id),e}function Po(e){if(dd(),e.title==="New Conversation"&&e.messages.length>0){let r=e.messages.find(n=>n.role==="user");r&&(e.title=hj(r.content))}e.updatedAt=Date.now();let t=QL(e.id);Wt.writeFileSync(t,JSON.stringify(e,null,2),"utf-8")}function Ej(e){dd(),Wt.writeFileSync(Rh,JSON.stringify({id:e}),"utf-8")}function ZL(){return XL()}var Sj="0.4.
|
|
359
|
+
`)}};function zt(e={}){return new Oh(e)}var mj=[{provider:"anthropic",patterns:[/^claude-/,/^claude$/i]},{provider:"openai",patterns:[/^gpt-/,/^o1-/,/^o3-/,/^chatgpt-/,/^text-davinci/]},{provider:"gemini",patterns:[/^gemini-/,/^gemini$/i]},{provider:"deepseek",patterns:[/^deepseek-/,/^deepseek$/i]},{provider:"moonshot",patterns:[/^kimi-/,/^moonshot-/,/^moonshot$/i]},{provider:"zai",patterns:[/^glm-/,/^glm$/i,/^chatglm/i]}];function fj(e){if(!e)return;let t=e.toLowerCase();for(let{provider:r,patterns:n}of mj)for(let i of n)if(i.test(t))return r}function Ci(e,t){return e?fj(e)??t:t}$e();import*as JL from"readline";import*as Wt from"fs";import*as ud from"path";import*as WL from"os";var cd=ud.join(WL.homedir(),".aii","conversations"),Rh=ud.join(cd,"current.json");function dd(){Wt.existsSync(cd)||Wt.mkdirSync(cd,{recursive:!0})}function gj(){return`conv_${Date.now()}_${Math.random().toString(36).substring(2,9)}`}function hj(e){let r=e.trim().replace(/\s+/g," ");return r.length>50&&(r=r.substring(0,50).trim()+"..."),r}function QL(e){return ud.join(cd,`${e}.json`)}function jL(){dd();try{if(Wt.existsSync(Rh)){let e=Wt.readFileSync(Rh,"utf-8"),t=JSON.parse(e),r=QL(t.id);if(Wt.existsSync(r)){let n=Wt.readFileSync(r,"utf-8");return JSON.parse(n)}}}catch{}return XL()}function XL(){dd();let e={id:gj(),title:"New Conversation",messages:[],createdAt:Date.now(),updatedAt:Date.now()};return Po(e),Ej(e.id),e}function Po(e){if(dd(),e.title==="New Conversation"&&e.messages.length>0){let r=e.messages.find(n=>n.role==="user");r&&(e.title=hj(r.content))}e.updatedAt=Date.now();let t=QL(e.id);Wt.writeFileSync(t,JSON.stringify(e,null,2),"utf-8")}function Ej(e){dd(),Wt.writeFileSync(Rh,JSON.stringify({id:e}),"utf-8")}function ZL(){return XL()}var Sj="0.4.3",wh=class{configManager;parsed;running=!1;conversation;stats;formatter;constructor(t,r){this.parsed=t,this.configManager=r,this.conversation=jL(),this.stats={startTime:Date.now(),totalRequests:0,cumulativeTokens:0,cumulativeCost:0},this.formatter=zt({colors:!t.flags.noColors,emojis:!t.flags.noEmojis})}async start(){for(this.running=!0,this.displayWelcome();this.running;)try{let t=await this.getUserInput();if(!t.trim()||await this.handleSpecialCommands(t))continue;this.conversation.messages.push({role:"user",content:t,timestamp:Date.now()}),Po(this.conversation),await this.processWithContext(t)}catch(t){if(t instanceof Error&&t.message==="EXIT")break;if(t instanceof Error&&t.message==="INTERRUPTED"){console.log(`
|
|
360
360
|
\u26A0\uFE0F Interrupted. Type /exit to quit or continue chatting.`);continue}console.error(f.red(`
|
|
361
361
|
\u274C Error: ${t instanceof Error?t.message:String(t)}`)),this.conversation.messages.length>0&&this.conversation.messages[this.conversation.messages.length-1].role==="user"&&(this.conversation.messages.pop(),Po(this.conversation))}}displayWelcome(){console.log("\u{1F916} Entering interactive mode."),console.log(""),console.log("Controls:"),console.log(" \u2022 Enter - Send message"),console.log(" \u2022 End with \\ - Multi-line mode"),console.log(" \u2022 /exit - Quit chat"),console.log(" \u2022 /help - Show all commands"),console.log("")}getUserInput(){return new Promise((t,r)=>{let n=JL.createInterface({input:process.stdin,output:process.stdout}),i=[],s=!1,a=()=>{s=!0,n.close()},o=l=>{n.question(l,c=>{if(i.length===0&&c.trim().startsWith("/")){a(),t(c.trim());return}c.endsWith("\\")?(i.push(c.slice(0,-1)),o(" ")):(i.push(c),a(),t(i.join(`
|
|
362
362
|
`).trim()))})};n.on("SIGINT",()=>{a(),r(new Error("INTERRUPTED"))}),n.on("close",()=>{s||r(new Error("EXIT"))}),o("> ")})}async handleSpecialCommands(t){let r=t.trim().toLowerCase();if(r.startsWith("/"))r=r.slice(1);else return!1;switch(r){case"exit":case"quit":return await this.handleExit(),!0;case"help":return this.displayHelp(),!0;case"clear":case"new":return this.clearConversation(),!0;case"history":return this.displayConversationHistory(),!0;case"stats":return this.displayStats(),!0;case"version":return this.displayVersion(),!0;default:return console.log(f.yellow(`Unknown command: /${r}. Type /help for available commands.`)),console.log(""),!0}}async processWithContext(t){let r=await this.configManager.load(),n=this.configManager.validate();if(!n.valid)throw new Dt(n.issues.join(", "));let s=this.configManager.getServerApiKey()||"aii_sk_7WyvfQ0PRzufJ1G66Qn8Sm4gW9Tealpo6vOWDDUeiv4",a=this.parsed.flags.model??r.llm.model,o=Ci(this.parsed.flags.model,r.llm.provider),l=this.configManager.getApiKey(o);if(!l)throw new At(`Missing API key for provider: ${o}`);this.stats.totalRequests++;let c=Ir(!this.parsed.flags.noAnimations);c.start("");let u=Br({spinner:c,enabled:!this.parsed.flags.noStreaming}),d=this.conversation.messages.slice(-21,-1).map(y=>({role:y.role,content:y.content})),_={api_key:s,system_prompt:null,user_prompt:t,user_message:t,output_mode:"CLEAN",streaming:!this.parsed.flags.noStreaming,model:a,llm_provider:o,llm_api_key:l,provider_api_key:l,client_type:"cli",offline:this.parsed.flags.offline,conversation_history:d.length>0?d:void 0},g=this.parsed.flags.host?`http://${this.parsed.flags.host}`:r.api.url,p=new ir({url:g}),h="",E=!1;try{let y=await p.executeRequest(_,{onToken:N=>{h+=N,E=!0,u.onToken(N)}});u.flush();let T=y.result||h;!E&&T&&console.log(T),console.log(""),y.metadata&&this.displayExecutionSummary(y.metadata),T&&(this.conversation.messages.push({role:"assistant",content:T,timestamp:Date.now()}),Po(this.conversation))}catch(y){throw c.stop(!0),y}finally{p.disconnect()}}displayExecutionSummary(t){let r=t.cost||0,n=t.tokens_in||0,i=t.tokens_out||0,s=n+i;this.stats.cumulativeTokens+=s,this.stats.cumulativeCost+=r,console.log(this.formatter.formatExecutionSummary({model:t.model,tokens_in:n,tokens_out:i,cost:r,execution_time:t.execution_time})),console.log("")}clearConversation(){this.conversation=ZL(),console.clear(),this.displayWelcome()}displayConversationHistory(){if(this.conversation.messages.length===0){console.log(`
|
|
@@ -479,7 +479,7 @@ ${r.yellow("EXAMPLES:")}
|
|
|
479
479
|
${r.yellow("CONFIG FILE:")}
|
|
480
480
|
~/.aii/config.yaml Main configuration
|
|
481
481
|
~/.aii/secrets.yaml API keys (secure storage)
|
|
482
|
-
`)}import*as Bo from"fs";async function i9(e,t){let r=zt({colors:!e.flags.noColors,emojis:!e.flags.noEmojis}),n=[];t.configExists()?n.push({name:"Configuration file",status:"ok",message:"Found"}):n.push({name:"Configuration file",status:"warn",message:"Not found (using defaults)"});let i=await t.load(),s=t.getApiKey();if(s){let _=Yj(s);n.push({name:"LLM Model",status:"ok",message:`${i.llm.model}@${i.llm.provider} (${_})`})}else n.push({name:"LLM Model",status:"error",message:`Not configured for ${i.llm.provider}`});let a=await qj(i.api.url);n.push({name:"AII Server",status:a.ok?"ok":"error",message:a.message});let o=`${t.getConfigDir()}/mcp_servers.json`;if(Bo.existsSync(o))try{let _=Bo.readFileSync(o,"utf-8"),g=JSON.parse(_),p=Object.keys(g.mcpServers??{}).length;p>0?n.push({name:"MCP Servers",status:"ok",message:`${p} configured`}):n.push({name:"MCP Servers",status:"warn",message:"Not configured"})}catch{n.push({name:"MCP Servers",status:"warn",message:"Invalid config"})}else n.push({name:"MCP Servers",status:"warn",message:"Not configured"});let l=t.getConfigDir();Bo.existsSync(l)?n.push({name:"Storage Directory",status:"ok",message:l}):n.push({name:"Storage Directory",status:"warn",message:"Not created"});let c=process.version;parseInt(c.slice(1).split(".")[0],10)>=18?n.push({name:"Node.js Version",status:"ok",message:c}):n.push({name:"Node.js Version",status:"error",message:`${c} (requires >= 18)`}),console.log(r.formatHealthCheck(n)),n.some(_=>_.status==="error")&&process.exit(1)}async function qj(e){try{let t=new AbortController,r=setTimeout(()=>t.abort(),3e3),n=await fetch(`${e}/api/status`,{signal:t.signal});if(clearTimeout(r),n.ok){let i=new URL(e);return{ok:!0,message:`Running at ${i.hostname}:${i.port||26169}`}}else return{ok:!1,message:`Not responding (${n.status})`}}catch(t){return t instanceof Error&&t.name==="AbortError"?{ok:!1,message:"Connection timeout"}:{ok:!1,message:"Not running"}}}function Yj(e){return e.length<=10?"***":e.slice(0,6)+"..."+e.slice(-4)}$e();var s9="0.4.
|
|
482
|
+
`)}import*as Bo from"fs";async function i9(e,t){let r=zt({colors:!e.flags.noColors,emojis:!e.flags.noEmojis}),n=[];t.configExists()?n.push({name:"Configuration file",status:"ok",message:"Found"}):n.push({name:"Configuration file",status:"warn",message:"Not found (using defaults)"});let i=await t.load(),s=t.getApiKey();if(s){let _=Yj(s);n.push({name:"LLM Model",status:"ok",message:`${i.llm.model}@${i.llm.provider} (${_})`})}else n.push({name:"LLM Model",status:"error",message:`Not configured for ${i.llm.provider}`});let a=await qj(i.api.url);n.push({name:"AII Server",status:a.ok?"ok":"error",message:a.message});let o=`${t.getConfigDir()}/mcp_servers.json`;if(Bo.existsSync(o))try{let _=Bo.readFileSync(o,"utf-8"),g=JSON.parse(_),p=Object.keys(g.mcpServers??{}).length;p>0?n.push({name:"MCP Servers",status:"ok",message:`${p} configured`}):n.push({name:"MCP Servers",status:"warn",message:"Not configured"})}catch{n.push({name:"MCP Servers",status:"warn",message:"Invalid config"})}else n.push({name:"MCP Servers",status:"warn",message:"Not configured"});let l=t.getConfigDir();Bo.existsSync(l)?n.push({name:"Storage Directory",status:"ok",message:l}):n.push({name:"Storage Directory",status:"warn",message:"Not created"});let c=process.version;parseInt(c.slice(1).split(".")[0],10)>=18?n.push({name:"Node.js Version",status:"ok",message:c}):n.push({name:"Node.js Version",status:"error",message:`${c} (requires >= 18)`}),console.log(r.formatHealthCheck(n)),n.some(_=>_.status==="error")&&process.exit(1)}async function qj(e){try{let t=new AbortController,r=setTimeout(()=>t.abort(),3e3),n=await fetch(`${e}/api/status`,{signal:t.signal});if(clearTimeout(r),n.ok){let i=new URL(e);return{ok:!0,message:`Running at ${i.hostname}:${i.port||26169}`}}else return{ok:!1,message:`Not responding (${n.status})`}}catch(t){return t instanceof Error&&t.name==="AbortError"?{ok:!1,message:"Connection timeout"}:{ok:!1,message:"Not running"}}}function Yj(e){return e.length<=10?"***":e.slice(0,6)+"..."+e.slice(-4)}$e();var s9="0.4.3";function Lh(e){let r=!e.flags.noColors?f:{cyan:n=>n,yellow:n=>n,gray:n=>n,green:n=>n};console.log(`
|
|
483
483
|
${r.cyan("AII")} - AI-powered CLI assistant v${s9}
|
|
484
484
|
|
|
485
485
|
${r.yellow("USAGE:")}
|
|
@@ -1098,7 +1098,7 @@ Prompt validation coming soon.
|
|
|
1098
1098
|
\u274C Missing prompt name`),console.error(` Usage: aii prompt use <name> [--vars]
|
|
1099
1099
|
`),process.exit(1)),await NZ(e,r,n,c);break;case"validate":r||(console.error(`
|
|
1100
1100
|
\u274C Missing file path`),console.error(` Usage: aii prompt validate <file>
|
|
1101
|
-
`),process.exit(1)),await OZ(e,r);break;case"help":case"--help":case"-h":default:CZ(!e.flags.noColors);break}}import{execSync as Gn,spawn as RZ}from"child_process";import{existsSync as wZ,mkdirSync as IZ}from"fs";import{homedir as vZ}from"os";import{join as kZ}from"path";var xZ="aiiware/aii-server:latest",MZ="aii-server",jt=26169,zn="v0.4.
|
|
1101
|
+
`),process.exit(1)),await OZ(e,r);break;case"help":case"--help":case"-h":default:CZ(!e.flags.noColors);break}}import{execSync as Gn,spawn as RZ}from"child_process";import{existsSync as wZ,mkdirSync as IZ}from"fs";import{homedir as vZ}from"os";import{join as kZ}from"path";var xZ="aiiware/aii-server:latest",MZ="aii-server",jt=26169,zn="v0.4.1",Oi="https://aiiware.short.gy/server.sh",Gd=class e{port;host;containerName;image;configDir;constructor(t=jt){this.port=t,this.host="127.0.0.1",this.containerName=MZ,this.image=xZ,this.configDir=kZ(vZ(),".aii")}isDockerAvailable(){try{return Gn("docker info",{stdio:"pipe",timeout:5e3}),!0}catch{return!1}}isContainerExists(){try{return Gn(`docker container inspect ${this.containerName}`,{stdio:"pipe",timeout:5e3}),!0}catch{return!1}}isContainerRunning(){try{return Gn(`docker container inspect -f "{{.State.Running}}" ${this.containerName}`,{stdio:"pipe",timeout:5e3,encoding:"utf-8"}).trim()==="true"}catch{return!1}}async isServerHealthy(){try{let t=new AbortController,r=setTimeout(()=>t.abort(),2e3),n=await fetch(`http://${this.host}:${this.port}/health`,{signal:t.signal});return clearTimeout(r),n.ok}catch{return!1}}async getServerVersion(){try{let t=new AbortController,r=setTimeout(()=>t.abort(),2e3),n=await fetch(`http://${this.host}:${this.port}/v0/status`,{signal:t.signal});return clearTimeout(r),n.ok&&(await n.json()).version||null}catch{return null}}static isVersionBelow(t,r){try{let n=t?.replace(/^v/,"")||"0.0.0",i=r?.replace(/^v/,"")||"0.0.0",s=n.split(".").map(Number),a=i.split(".").map(Number),o=Math.max(s.length,a.length);for(;s.length<o;)s.push(0);for(;a.length<o;)a.push(0);for(let l=0;l<o;l++){if(s[l]<a[l])return!0;if(s[l]>a[l])return!1}return!1}catch{return!1}}async checkServerAtPort(t){try{let r=new AbortController,n=setTimeout(()=>r.abort(),2e3),i=await fetch(`http://${this.host}:${t}/health`,{signal:r.signal});if(clearTimeout(n),!i.ok)return{isCompatible:!1,version:null};let s=new AbortController,a=setTimeout(()=>s.abort(),2e3),o=await fetch(`http://${this.host}:${t}/v0/status`,{signal:s.signal});if(clearTimeout(a),o.ok){let c=(await o.json()).version||null;return c?{isCompatible:!e.isVersionBelow(c,zn),version:c}:{isCompatible:!0,version:null}}return{isCompatible:!0,version:null}}catch{return{isCompatible:!1,version:null}}}getContainerHostPort(){try{let t=Gn(`docker inspect --format='{{(index (index .NetworkSettings.Ports "26169/tcp") 0).HostPort}}' ${this.containerName}`,{stdio:"pipe",timeout:5e3,encoding:"utf-8"}),r=parseInt(t.trim(),10);return isNaN(r)?null:r}catch{return null}}async scanForServer(t=jt,r=10){for(let n=0;n<r;n++){let i=t+n,{isCompatible:s}=await this.checkServerAtPort(i);if(s)return i}return null}startContainer(){try{return Gn(`docker start ${this.containerName}`,{stdio:"pipe",timeout:3e4}),!0}catch{return!1}}stopContainer(){try{return Gn(`docker stop ${this.containerName}`,{stdio:"pipe",timeout:3e4}),!0}catch{return!1}}getContainerLogs(t=50){try{return Gn(`docker logs --tail ${t} ${this.containerName}`,{stdio:"pipe",timeout:1e4,encoding:"utf-8"})}catch{return""}}async waitForHealthy(t=3e4){let r=Date.now(),n=!1,i=()=>{n=!0,process.exit(130)};process.on("SIGINT",i);try{for(;Date.now()-r<t&&!n;){if(await this.isServerHealthy())return!0;await new Promise(s=>setTimeout(s,500))}return!1}finally{process.removeListener("SIGINT",i)}}async runInstallScript(t=!0){return new Promise(r=>{t&&console.log(` Running: curl -fsSL ${Oi} | bash
|
|
1102
1102
|
`);let n=RZ("bash",["-c",`curl -fsSL ${Oi} | bash`],{stdio:t?["pipe","inherit","inherit"]:"pipe",detached:!1}),i=()=>{try{n.kill("SIGINT")}catch{}console.log(`
|
|
1103
1103
|
|
|
1104
1104
|
Cancelled.`),process.exit(130)},s=process.listeners("SIGINT");process.removeAllListeners("SIGINT"),process.on("SIGINT",i),n.on("close",a=>{process.removeListener("SIGINT",i),s.forEach(o=>process.on("SIGINT",o)),r(a===0)}),n.on("error",()=>{process.removeListener("SIGINT",i),s.forEach(a=>process.on("SIGINT",a)),r(!1)})})}async upgradeServer(t=!0){t&&console.log(`
|