@automagik/genie 4.260429.26 → 4.260429.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/genie.js CHANGED
@@ -2893,7 +2893,7 @@ Run: genie send '<SHIP|FIX-FIRST|BLOCKED> \u2014 <summary>' --to ${reviewLeaderT
2893
2893
  WHERE repo_path = ${repo}
2894
2894
  AND wish_file LIKE ${pattern}
2895
2895
  ORDER BY seq
2896
- `).map((r)=>({id:r.id,seq:r.seq,title:r.title,stage:r.stage,repoPath:r.repo_path}))}var init_task_close_merged=__esm(()=>{init_wish_state()});import{existsSync as existsSync63,readFileSync as readFileSync39}from"fs";import{join as join77}from"path";function stripBackticks(value){return value.replace(/^`+|`+$/g,"").trim()}function stripBold(value){return value.replace(/^\*\*|\*\*$/g,"").trim()}function detectHeadings(lines){let spans=[],inFence=!1;for(let i2=0;i2<lines.length;i2++){let line=lines[i2];if(/^\s*```/.test(line)){inFence=!inFence;continue}if(inFence)continue;let m=/^(#{1,6})\s+(.*?)\s*$/.exec(line);if(!m)continue;spans.push({title:m[2],level:m[1].length,start:i2+1})}let total=lines.length;for(let i2=0;i2<spans.length;i2++){let current=spans[i2];current.contentStart=current.start+1;let end=total;for(let j=i2+1;j<spans.length;j++){let candidate=spans[j];if(candidate.level<=current.level){end=candidate.start-1;break}}current.end=end}return spans}function sliceContent(lines,span){let start3=span.contentStart-1,end=span.end;return lines.slice(start3,end)}function extractMetadataFromRows(lines){let metadata={},sawHeader=!1,sawDivider=!1;for(let raw of lines){let line=raw.trim();if(!line.startsWith("|")){if(sawHeader)break;continue}if(!sawHeader){sawHeader=!0;continue}if(!sawDivider){sawDivider=!0;continue}let cells=line.split("|").slice(1,-1).map((c)=>c.trim());if(cells.length<2)continue;let keyRaw=stripBold(cells[0]).toLowerCase(),mapped=METADATA_KEY_MAP[keyRaw];if(mapped)metadata[mapped]=stripBackticks(cells[1])}return{metadata,sawHeader}}function parseMetadataTable(lines,startLine){let{metadata,sawHeader}=extractMetadataFromRows(lines);if(!sawHeader)throw new WishParseError({rule:"metadata-table-missing-field",line:startLine,message:"Metadata table not found at top of wish"});for(let field of REQUIRED_METADATA_FIELDS)if(!metadata[field])throw new WishParseError({rule:"metadata-table-missing-field",line:startLine,message:`Metadata table is missing required field: ${field}`});return metadata}function parseBullets(lines){let out=[];for(let raw of lines){let m=/^\s*[-*]\s+(.*)$/.exec(raw);if(m)out.push(m[1].trim())}return out}function parseChecklist(lines){let out=[];for(let raw of lines){let m=/^\s*[-*]\s+\[[ xX]\]\s+(.*)$/.exec(raw);if(m)out.push(m[1].trim())}return out}function parsePipeTable(lines){let rows=[],sawHeader=!1,sawDivider=!1;for(let raw of lines){let line=raw.trim();if(!line.startsWith("|")){if(sawHeader)break;continue}if(!sawHeader){sawHeader=!0;continue}if(!sawDivider){sawDivider=!0;continue}let cells=line.split("|").slice(1,-1).map((c)=>c.trim());rows.push(cells)}return rows}function parseDecisions(lines){return parsePipeTable(lines).filter((r)=>r.length>=3).map((cells)=>({number:cells[0],decision:cells[1],rationale:cells[2]}))}function parseRisks(lines){return parsePipeTable(lines).filter((r)=>r.length>=3).map((cells)=>({risk:cells[0],severity:cells[1],mitigation:cells[2]}))}function parseExecutionStrategy2(allLines,span,allSpans){let entries=[],waveSpans=allSpans.filter((s2)=>s2.level===3&&s2.start>span.start&&s2.start<=span.end&&/^wave\s+/i.exec(s2.title));for(let waveSpan of waveSpans){let waveName=(/^(wave\s+\d+)/i.exec(waveSpan.title)?.[1]??waveSpan.title).trim(),rows=parsePipeTable(sliceContent(allLines,waveSpan));for(let row of rows){if(row.length<3)continue;entries.push({wave:waveName,group:row[0],agent:row[1],description:row[2]})}}return entries}function parseDependsOnValue(raw){let trimmed=raw.trim().replace(/\.$/,"");if(!trimmed)return{value:[],malformed:!0};if(/^none$/i.test(trimmed))return{value:"none",malformed:!1};let parts=trimmed.split(/\s*,\s*/).filter(Boolean),refPattern=/^(?:Group\s+\d+|[A-Za-z][A-Za-z0-9_-]*(?:\/(?:Group\s+\d+|[A-Za-z][A-Za-z0-9_-]*))*|[A-Za-z][A-Za-z0-9_-]*#\d+)$/i,malformed=parts.some((p)=>!refPattern.test(p));return{value:parts,malformed}}function extractLabeledField(lines,groupStartLine,labelRegex,stopRegex){let idx=lines.findIndex((l)=>labelRegex.test(l));if(idx<0)return{value:"",startLine:groupStartLine,endLine:groupStartLine,found:!1};let labelLine=lines[idx],inlineMatch=labelRegex.exec(labelLine),inline=inlineMatch?labelLine.slice(inlineMatch.index+inlineMatch[0].length).trim():"",collected=[];if(inline)collected.push(inline);let startLine=groupStartLine+idx;idx+=1;while(idx<lines.length){let line=lines[idx];if(stopRegex.test(line))break;collected.push(line),idx+=1}while(collected.length>0&&collected[collected.length-1].trim()==="")collected.pop();return{value:collected.join(`
2896
+ `).map((r)=>({id:r.id,seq:r.seq,title:r.title,stage:r.stage,repoPath:r.repo_path}))}var init_task_close_merged=__esm(()=>{init_wish_state()});import{existsSync as existsSync64,readFileSync as readFileSync40}from"fs";import{join as join78}from"path";function stripBackticks(value){return value.replace(/^`+|`+$/g,"").trim()}function stripBold(value){return value.replace(/^\*\*|\*\*$/g,"").trim()}function detectHeadings(lines){let spans=[],inFence=!1;for(let i2=0;i2<lines.length;i2++){let line=lines[i2];if(/^\s*```/.test(line)){inFence=!inFence;continue}if(inFence)continue;let m=/^(#{1,6})\s+(.*?)\s*$/.exec(line);if(!m)continue;spans.push({title:m[2],level:m[1].length,start:i2+1})}let total=lines.length;for(let i2=0;i2<spans.length;i2++){let current=spans[i2];current.contentStart=current.start+1;let end=total;for(let j=i2+1;j<spans.length;j++){let candidate=spans[j];if(candidate.level<=current.level){end=candidate.start-1;break}}current.end=end}return spans}function sliceContent(lines,span){let start3=span.contentStart-1,end=span.end;return lines.slice(start3,end)}function extractMetadataFromRows(lines){let metadata={},sawHeader=!1,sawDivider=!1;for(let raw of lines){let line=raw.trim();if(!line.startsWith("|")){if(sawHeader)break;continue}if(!sawHeader){sawHeader=!0;continue}if(!sawDivider){sawDivider=!0;continue}let cells=line.split("|").slice(1,-1).map((c)=>c.trim());if(cells.length<2)continue;let keyRaw=stripBold(cells[0]).toLowerCase(),mapped=METADATA_KEY_MAP[keyRaw];if(mapped)metadata[mapped]=stripBackticks(cells[1])}return{metadata,sawHeader}}function parseMetadataTable(lines,startLine){let{metadata,sawHeader}=extractMetadataFromRows(lines);if(!sawHeader)throw new WishParseError({rule:"metadata-table-missing-field",line:startLine,message:"Metadata table not found at top of wish"});for(let field of REQUIRED_METADATA_FIELDS)if(!metadata[field])throw new WishParseError({rule:"metadata-table-missing-field",line:startLine,message:`Metadata table is missing required field: ${field}`});return metadata}function parseBullets(lines){let out=[];for(let raw of lines){let m=/^\s*[-*]\s+(.*)$/.exec(raw);if(m)out.push(m[1].trim())}return out}function parseChecklist(lines){let out=[];for(let raw of lines){let m=/^\s*[-*]\s+\[[ xX]\]\s+(.*)$/.exec(raw);if(m)out.push(m[1].trim())}return out}function parsePipeTable(lines){let rows=[],sawHeader=!1,sawDivider=!1;for(let raw of lines){let line=raw.trim();if(!line.startsWith("|")){if(sawHeader)break;continue}if(!sawHeader){sawHeader=!0;continue}if(!sawDivider){sawDivider=!0;continue}let cells=line.split("|").slice(1,-1).map((c)=>c.trim());rows.push(cells)}return rows}function parseDecisions(lines){return parsePipeTable(lines).filter((r)=>r.length>=3).map((cells)=>({number:cells[0],decision:cells[1],rationale:cells[2]}))}function parseRisks(lines){return parsePipeTable(lines).filter((r)=>r.length>=3).map((cells)=>({risk:cells[0],severity:cells[1],mitigation:cells[2]}))}function parseExecutionStrategy2(allLines,span,allSpans){let entries=[],waveSpans=allSpans.filter((s2)=>s2.level===3&&s2.start>span.start&&s2.start<=span.end&&/^wave\s+/i.exec(s2.title));for(let waveSpan of waveSpans){let waveName=(/^(wave\s+\d+)/i.exec(waveSpan.title)?.[1]??waveSpan.title).trim(),rows=parsePipeTable(sliceContent(allLines,waveSpan));for(let row of rows){if(row.length<3)continue;entries.push({wave:waveName,group:row[0],agent:row[1],description:row[2]})}}return entries}function parseDependsOnValue(raw){let trimmed=raw.trim().replace(/\.$/,"");if(!trimmed)return{value:[],malformed:!0};if(/^none$/i.test(trimmed))return{value:"none",malformed:!1};let parts=trimmed.split(/\s*,\s*/).filter(Boolean),refPattern=/^(?:Group\s+\d+|[A-Za-z][A-Za-z0-9_-]*(?:\/(?:Group\s+\d+|[A-Za-z][A-Za-z0-9_-]*))*|[A-Za-z][A-Za-z0-9_-]*#\d+)$/i,malformed=parts.some((p)=>!refPattern.test(p));return{value:parts,malformed}}function extractLabeledField(lines,groupStartLine,labelRegex,stopRegex){let idx=lines.findIndex((l)=>labelRegex.test(l));if(idx<0)return{value:"",startLine:groupStartLine,endLine:groupStartLine,found:!1};let labelLine=lines[idx],inlineMatch=labelRegex.exec(labelLine),inline=inlineMatch?labelLine.slice(inlineMatch.index+inlineMatch[0].length).trim():"",collected=[];if(inline)collected.push(inline);let startLine=groupStartLine+idx;idx+=1;while(idx<lines.length){let line=lines[idx];if(stopRegex.test(line))break;collected.push(line),idx+=1}while(collected.length>0&&collected[collected.length-1].trim()==="")collected.pop();return{value:collected.join(`
2897
2897
  `).trim(),startLine,endLine:groupStartLine+idx-1,found:!0}}function extractValidationBody(rawValue){let vLines=rawValue.split(`
2898
2898
  `),inFence=!1,collected=[];for(let l of vLines){if(/^\s*```(\S*)\s*$/.exec(l)){if(!inFence){inFence=!0;continue}inFence=!1;break}if(inFence)collected.push(l)}return collected.length>0?collected.join(`
2899
2899
  `):rawValue}function parseExecutionGroup(_allLines,headerLine,headerLineNumber,bodyLines,bodyStartLine,bodyEndLine){let headerMatch=/^###\s+Group\s+(\d+)\s*:\s*(.+?)\s*$/i.exec(headerLine);if(!headerMatch)throw new WishParseError({rule:"group-header-format",line:headerLineNumber,message:`Execution group header not in canonical "### Group N: Title" form: ${headerLine.trim()}`});let number=Number.parseInt(headerMatch[1],10),title=headerMatch[2].trim(),stopRegex=/^(\*\*(Goal|Deliverables|Acceptance Criteria|Validation|depends-on)\s*:\*\*|---\s*$)/i,goalField=extractLabeledField(bodyLines,bodyStartLine,/^\*\*Goal:\*\*/i,stopRegex),deliverablesField=extractLabeledField(bodyLines,bodyStartLine,/^\*\*Deliverables:\*\*/i,stopRegex),acceptanceField=extractLabeledField(bodyLines,bodyStartLine,/^\*\*Acceptance Criteria:\*\*/i,stopRegex),validationField=extractLabeledField(bodyLines,bodyStartLine,/^\*\*Validation:\*\*/i,stopRegex),dependsOnField=extractLabeledField(bodyLines,bodyStartLine,/^\*\*depends-on:\*\*/i,stopRegex),acceptanceItems=acceptanceField.found?parseChecklist(acceptanceField.value.split(`
@@ -2904,7 +2904,7 @@ Run: genie send '<SHIP|FIX-FIRST|BLOCKED> \u2014 <summary>' --to ${reviewLeaderT
2904
2904
  `).split(`
2905
2905
  `),spans=detectHeadings(lines),{title,metadata,titleSpan,firstH2}=parseTitleAndMetadata(lines,spans),summary=requireSummary(lines,spans,firstH2?.start??titleSpan.start),scope=parseScopeSection(lines,spans),decisionsSpan=spans.find((s2)=>s2.level===2&&/^decisions$/i.test(s2.title)),decisions=decisionsSpan?parseDecisions(sliceContent(lines,decisionsSpan)):[],successSpan=spans.find((s2)=>s2.level===2&&/^success criteria$/i.test(s2.title)),successCriteria=successSpan?parseChecklist(sliceContent(lines,successSpan)):[],strategySpan=spans.find((s2)=>s2.level===2&&/^execution strategy$/i.test(s2.title)),executionStrategy=strategySpan?parseExecutionStrategy2(lines,strategySpan,spans):[],executionGroups=parseExecutionGroupsSection(lines,spans,firstH2?.start??titleSpan.start),qaSpan=spans.find((s2)=>s2.level===2&&/^qa criteria$/i.test(s2.title)),qaCriteria=qaSpan?parseChecklist(sliceContent(lines,qaSpan)):[],risksSpan=spans.find((s2)=>s2.level===2&&/^assumptions\s*\/\s*risks$/i.test(s2.title)),assumptionsRisks=risksSpan?parseRisks(sliceContent(lines,risksSpan)):[],reviewSpan=spans.find((s2)=>s2.level===2&&/^review results$/i.test(s2.title)),reviewResults=reviewSpan?stripHorizontalRules(sliceContent(lines,reviewSpan).join(`
2906
2906
  `)):"",filesSpan=spans.find((s2)=>s2.level===2&&/^files to create(\/modify)?$/i.test(s2.title)),filesToCreate=filesSpan?extractFencedBlock(sliceContent(lines,filesSpan).join(`
2907
- `)):"";return{title,metadata,summary,scope,decisions,successCriteria,executionStrategy,executionGroups,qaCriteria,assumptionsRisks,reviewResults,filesToCreate}}function parseWishFile(slug,options={}){let root=options.repoRoot??process.cwd(),path3=join77(root,".genie","wishes",slug,"WISH.md");if(!existsSync63(path3))throw new WishParseError({rule:"missing-title",line:1,file:path3,message:`Wish file not found: ${path3}`});let markdown=readFileSync39(path3,"utf8");try{return parseWish(markdown)}catch(err){if(err instanceof WishParseError)throw new WishParseError({rule:err.rule,line:err.line,column:err.column,message:err.message,file:path3});throw err}}var WishParseError,METADATA_KEY_MAP,REQUIRED_METADATA_FIELDS;var init_wish_parser=__esm(()=>{WishParseError=class WishParseError extends Error{rule;line;column;file;constructor(opts){super(opts.message);this.name="WishParseError",this.rule=opts.rule,this.line=opts.line,this.column=opts.column??1,this.file=opts.file}};METADATA_KEY_MAP={status:"status",slug:"slug",date:"date",author:"author",appetite:"appetite",branch:"branch","repos touched":"reposTouched",design:"design"},REQUIRED_METADATA_FIELDS=["status","slug","date","author","appetite","branch"]});var WishMetadataSchema,DecisionRowSchema,WaveEntrySchema,RiskRowSchema,DependsOnSchema,ExecutionGroupSchema,WishDocumentSchema;var init_wish_schema=__esm(()=>{init_zod();WishMetadataSchema=exports_external.object({status:exports_external.string().min(1),slug:exports_external.string().min(1),date:exports_external.string().min(1),author:exports_external.string().min(1),appetite:exports_external.string().min(1),branch:exports_external.string().min(1),reposTouched:exports_external.string().optional(),design:exports_external.string().optional()}),DecisionRowSchema=exports_external.object({number:exports_external.string(),decision:exports_external.string(),rationale:exports_external.string()}),WaveEntrySchema=exports_external.object({wave:exports_external.string(),group:exports_external.string(),agent:exports_external.string(),description:exports_external.string()}),RiskRowSchema=exports_external.object({risk:exports_external.string(),severity:exports_external.string(),mitigation:exports_external.string()}),DependsOnSchema=exports_external.union([exports_external.literal("none"),exports_external.array(exports_external.string().min(1)).min(1)]),ExecutionGroupSchema=exports_external.object({name:exports_external.string().min(1),number:exports_external.number().int().positive(),title:exports_external.string().min(1),goal:exports_external.string().min(1),deliverables:exports_external.string().min(1),acceptanceCriteria:exports_external.array(exports_external.string().min(1)).min(1),validation:exports_external.string(),dependsOn:DependsOnSchema,startLine:exports_external.number().int().positive(),endLine:exports_external.number().int().positive()}),WishDocumentSchema=exports_external.object({title:exports_external.string().min(1),metadata:WishMetadataSchema,summary:exports_external.string().min(1),scope:exports_external.object({in:exports_external.array(exports_external.string()),out:exports_external.array(exports_external.string().min(1)).min(1,"OUT scope must contain at least one bullet")}),decisions:exports_external.array(DecisionRowSchema),successCriteria:exports_external.array(exports_external.string().min(1)),executionStrategy:exports_external.array(WaveEntrySchema),executionGroups:exports_external.array(ExecutionGroupSchema).min(1,"Wish must contain at least one execution group"),qaCriteria:exports_external.array(exports_external.string()),assumptionsRisks:exports_external.array(RiskRowSchema),reviewResults:exports_external.string(),filesToCreate:exports_external.string()}).superRefine((doc,ctx)=>{let validNumbers=new Set(doc.executionGroups.map((g)=>g.number));for(let group of doc.executionGroups){if(group.dependsOn==="none")continue;for(let ref of group.dependsOn){let m=/^Group\s+(\d+)$/i.exec(ref.trim());if(!m)continue;let n=Number.parseInt(m[1],10);if(!validNumbers.has(n))ctx.addIssue({code:exports_external.ZodIssueCode.custom,path:["executionGroups"],message:`Group ${group.number} depends-on references non-existent Group ${n}`})}}})});var exports_wish_lint={};__export(exports_wish_lint,{lintWish:()=>lintWish,lintMarkdown:()=>lintMarkdown,formatLintReport:()=>formatLintReport,applyFixes:()=>applyFixes});function buildSummary(violations){let fixable=0,unfixable=0;for(let v of violations)if(v.fixable)fixable++;else unfixable++;return{total:violations.length,fixable,unfixable}}function findExecGroupsRange(lines){let inFence=!1,start3=-1;for(let i2=0;i2<lines.length;i2++){let raw=lines[i2];if(/^\s*```/.test(raw)){inFence=!inFence;continue}if(inFence)continue;if(/^##\s+Execution Groups\s*$/i.test(raw)){start3=i2;continue}if(start3>=0&&/^##\s+/.test(raw))return{start:start3,end:i2-1}}if(start3>=0)return{start:start3,end:lines.length-1};return null}function findFirstGroupHeaderLine(lines){let inFence=!1;for(let i2=0;i2<lines.length;i2++){let raw=lines[i2];if(/^\s*```/.test(raw)){inFence=!inFence;continue}if(inFence)continue;if(/^###\s+(group|grupo)\s+\d+/i.test(raw))return i2}return-1}function rewriteStrayGroupHeader(raw){let m=STRAY_GROUP_HEADER.exec(raw);if(!m)return null;let number=m[2],rest=(m[4]??"").trim();return`### Group ${number}: ${rest||"<TODO title>"}`}function detectParseErrorViolation(err){let parseRule=err.rule,fixable=Boolean({"missing-execution-groups-header":!0,"group-header-format":!0,"metadata-table-missing-field":!0}[parseRule]);return{rule:parseRule,severity:"error",line:err.line,column:err.column??1,message:err.message,fixable,fix:null}}function scanStrayGroupHeaders(lines,execRange){let out=[],inFence=!1,startIdx=execRange?execRange.start+1:0,endIdx=execRange?execRange.end:lines.length-1;for(let i2=startIdx;i2<=endIdx;i2++){let raw=lines[i2];if(/^\s*```/.test(raw)){inFence=!inFence;continue}if(inFence)continue;if(CANONICAL_GROUP_HEADER.test(raw))continue;if(!STRAY_GROUP_HEADER.exec(raw))continue;let rewritten=rewriteStrayGroupHeader(raw)??raw;out.push({rule:"group-header-format",severity:"error",line:i2+1,column:1,message:`Group header "${raw.trim()}" is not in canonical "### Group N: Title" form`,fixable:!0,fix:{kind:"rewrite",at:{line:i2+1},content:rewritten,range:{endLine:i2+1,endColumn:(raw.length||1)+1}}})}return out}function scanGroupFieldLabels(doc,lines){let out=[];for(let group of doc.executionGroups){let start3=Math.max(0,group.startLine),end=Math.min(lines.length,group.endLine),slice=lines.slice(start3,end);for(let{label,regex,rule}of REQUIRED_FIELD_LABELS){if(slice.findIndex((l)=>regex.test(l))>=0)continue;let insertAt=start3+1;out.push({rule,severity:"error",line:group.startLine,column:1,message:`Group ${group.number} (${group.title}) is missing the ${label} field label`,fixable:!0,fix:{kind:"insert",at:{line:insertAt},content:`
2907
+ `)):"";return{title,metadata,summary,scope,decisions,successCriteria,executionStrategy,executionGroups,qaCriteria,assumptionsRisks,reviewResults,filesToCreate}}function parseWishFile(slug,options={}){let root=options.repoRoot??process.cwd(),path3=join78(root,".genie","wishes",slug,"WISH.md");if(!existsSync64(path3))throw new WishParseError({rule:"missing-title",line:1,file:path3,message:`Wish file not found: ${path3}`});let markdown=readFileSync40(path3,"utf8");try{return parseWish(markdown)}catch(err){if(err instanceof WishParseError)throw new WishParseError({rule:err.rule,line:err.line,column:err.column,message:err.message,file:path3});throw err}}var WishParseError,METADATA_KEY_MAP,REQUIRED_METADATA_FIELDS;var init_wish_parser=__esm(()=>{WishParseError=class WishParseError extends Error{rule;line;column;file;constructor(opts){super(opts.message);this.name="WishParseError",this.rule=opts.rule,this.line=opts.line,this.column=opts.column??1,this.file=opts.file}};METADATA_KEY_MAP={status:"status",slug:"slug",date:"date",author:"author",appetite:"appetite",branch:"branch","repos touched":"reposTouched",design:"design"},REQUIRED_METADATA_FIELDS=["status","slug","date","author","appetite","branch"]});var WishMetadataSchema,DecisionRowSchema,WaveEntrySchema,RiskRowSchema,DependsOnSchema,ExecutionGroupSchema,WishDocumentSchema;var init_wish_schema=__esm(()=>{init_zod();WishMetadataSchema=exports_external.object({status:exports_external.string().min(1),slug:exports_external.string().min(1),date:exports_external.string().min(1),author:exports_external.string().min(1),appetite:exports_external.string().min(1),branch:exports_external.string().min(1),reposTouched:exports_external.string().optional(),design:exports_external.string().optional()}),DecisionRowSchema=exports_external.object({number:exports_external.string(),decision:exports_external.string(),rationale:exports_external.string()}),WaveEntrySchema=exports_external.object({wave:exports_external.string(),group:exports_external.string(),agent:exports_external.string(),description:exports_external.string()}),RiskRowSchema=exports_external.object({risk:exports_external.string(),severity:exports_external.string(),mitigation:exports_external.string()}),DependsOnSchema=exports_external.union([exports_external.literal("none"),exports_external.array(exports_external.string().min(1)).min(1)]),ExecutionGroupSchema=exports_external.object({name:exports_external.string().min(1),number:exports_external.number().int().positive(),title:exports_external.string().min(1),goal:exports_external.string().min(1),deliverables:exports_external.string().min(1),acceptanceCriteria:exports_external.array(exports_external.string().min(1)).min(1),validation:exports_external.string(),dependsOn:DependsOnSchema,startLine:exports_external.number().int().positive(),endLine:exports_external.number().int().positive()}),WishDocumentSchema=exports_external.object({title:exports_external.string().min(1),metadata:WishMetadataSchema,summary:exports_external.string().min(1),scope:exports_external.object({in:exports_external.array(exports_external.string()),out:exports_external.array(exports_external.string().min(1)).min(1,"OUT scope must contain at least one bullet")}),decisions:exports_external.array(DecisionRowSchema),successCriteria:exports_external.array(exports_external.string().min(1)),executionStrategy:exports_external.array(WaveEntrySchema),executionGroups:exports_external.array(ExecutionGroupSchema).min(1,"Wish must contain at least one execution group"),qaCriteria:exports_external.array(exports_external.string()),assumptionsRisks:exports_external.array(RiskRowSchema),reviewResults:exports_external.string(),filesToCreate:exports_external.string()}).superRefine((doc,ctx)=>{let validNumbers=new Set(doc.executionGroups.map((g)=>g.number));for(let group of doc.executionGroups){if(group.dependsOn==="none")continue;for(let ref of group.dependsOn){let m=/^Group\s+(\d+)$/i.exec(ref.trim());if(!m)continue;let n=Number.parseInt(m[1],10);if(!validNumbers.has(n))ctx.addIssue({code:exports_external.ZodIssueCode.custom,path:["executionGroups"],message:`Group ${group.number} depends-on references non-existent Group ${n}`})}}})});var exports_wish_lint={};__export(exports_wish_lint,{lintWish:()=>lintWish,lintMarkdown:()=>lintMarkdown,formatLintReport:()=>formatLintReport,applyFixes:()=>applyFixes});function buildSummary(violations){let fixable=0,unfixable=0;for(let v of violations)if(v.fixable)fixable++;else unfixable++;return{total:violations.length,fixable,unfixable}}function findExecGroupsRange(lines){let inFence=!1,start3=-1;for(let i2=0;i2<lines.length;i2++){let raw=lines[i2];if(/^\s*```/.test(raw)){inFence=!inFence;continue}if(inFence)continue;if(/^##\s+Execution Groups\s*$/i.test(raw)){start3=i2;continue}if(start3>=0&&/^##\s+/.test(raw))return{start:start3,end:i2-1}}if(start3>=0)return{start:start3,end:lines.length-1};return null}function findFirstGroupHeaderLine(lines){let inFence=!1;for(let i2=0;i2<lines.length;i2++){let raw=lines[i2];if(/^\s*```/.test(raw)){inFence=!inFence;continue}if(inFence)continue;if(/^###\s+(group|grupo)\s+\d+/i.test(raw))return i2}return-1}function rewriteStrayGroupHeader(raw){let m=STRAY_GROUP_HEADER.exec(raw);if(!m)return null;let number=m[2],rest=(m[4]??"").trim();return`### Group ${number}: ${rest||"<TODO title>"}`}function detectParseErrorViolation(err){let parseRule=err.rule,fixable=Boolean({"missing-execution-groups-header":!0,"group-header-format":!0,"metadata-table-missing-field":!0}[parseRule]);return{rule:parseRule,severity:"error",line:err.line,column:err.column??1,message:err.message,fixable,fix:null}}function scanStrayGroupHeaders(lines,execRange){let out=[],inFence=!1,startIdx=execRange?execRange.start+1:0,endIdx=execRange?execRange.end:lines.length-1;for(let i2=startIdx;i2<=endIdx;i2++){let raw=lines[i2];if(/^\s*```/.test(raw)){inFence=!inFence;continue}if(inFence)continue;if(CANONICAL_GROUP_HEADER.test(raw))continue;if(!STRAY_GROUP_HEADER.exec(raw))continue;let rewritten=rewriteStrayGroupHeader(raw)??raw;out.push({rule:"group-header-format",severity:"error",line:i2+1,column:1,message:`Group header "${raw.trim()}" is not in canonical "### Group N: Title" form`,fixable:!0,fix:{kind:"rewrite",at:{line:i2+1},content:rewritten,range:{endLine:i2+1,endColumn:(raw.length||1)+1}}})}return out}function scanGroupFieldLabels(doc,lines){let out=[];for(let group of doc.executionGroups){let start3=Math.max(0,group.startLine),end=Math.min(lines.length,group.endLine),slice=lines.slice(start3,end);for(let{label,regex,rule}of REQUIRED_FIELD_LABELS){if(slice.findIndex((l)=>regex.test(l))>=0)continue;let insertAt=start3+1;out.push({rule,severity:"error",line:group.startLine,column:1,message:`Group ${group.number} (${group.title}) is missing the ${label} field label`,fixable:!0,fix:{kind:"insert",at:{line:insertAt},content:`
2908
2908
  ${label} <TODO>
2909
2909
  `}})}}return out}function scanEmptyFieldContent(doc,lines){let out=[];for(let group of doc.executionGroups){let start3=Math.max(0,group.startLine),end=Math.min(lines.length,group.endLine),slice=lines.slice(start3,end),hasLabel=(regex)=>slice.some((l)=>regex.test(l)),checks=[{labelRegex:/^\*\*Goal\s*:\*\*/i,value:group.goal,rule:"missing-goal-field",name:"Goal"},{labelRegex:/^\*\*Deliverables\s*:\*\*/i,value:group.deliverables,rule:"missing-deliverables-field",name:"Deliverables"},{labelRegex:/^\*\*Acceptance Criteria\s*:\*\*/i,value:group.acceptanceCriteria.length>0?"x":"",rule:"missing-acceptance-field",name:"Acceptance Criteria"},{labelRegex:/^\*\*depends-on\s*:\*\*/i,value:group.dependsOn==="none"||Array.isArray(group.dependsOn)&&group.dependsOn.length>0?"x":"",rule:"missing-depends-on-field",name:"depends-on"}];for(let{labelRegex,value,rule,name}of checks){if(!hasLabel(labelRegex))continue;if(value.trim()!=="")continue;out.push({rule,severity:"error",line:group.startLine,column:1,message:`Group ${group.number} (${group.title}) has the ${name} label but no content`,fixable:!1,fix:null})}}return out}function findValidationFenceInfo(lines,group){let start3=Math.max(0,group.startLine),end=Math.min(lines.length,group.endLine),labelLine=-1;for(let i2=start3;i2<end;i2++)if(/^\*\*Validation\s*:\*\*/i.test(lines[i2])){labelLine=i2;break}if(labelLine<0)return null;let fenceLine=-1,fenceTag=null,fenceClose=null;for(let i2=labelLine+1;i2<end;i2++){let raw=lines[i2];if(/^\*\*(Goal|Deliverables|Acceptance Criteria|depends-on)\s*:\*\*/i.test(raw))break;let fenceOpen=/^\s*```(\S*)\s*$/.exec(raw);if(fenceOpen&&fenceLine<0){fenceLine=i2,fenceTag=fenceOpen[1]||"";continue}if(fenceLine>=0&&/^\s*```\s*$/.test(raw)){fenceClose=i2;break}}return{labelLine,fenceLine,fenceTag,fenceClose}}function collectValidationProse(lines,start3,end){let stop=end;for(let j=start3;j<end;j++)if(FIELD_BOUNDARY_REGEX.test(lines[j])){stop=j;break}let collected=[];for(let j=start3;j<stop;j++)collected.push(lines[j]);while(collected.length>0&&collected[collected.length-1].trim()==="")collected.pop();return collected}function violationForMissingFence(info,contentLines){if(!contentLines.some((l)=>l.trim()!==""))return{rule:"missing-validation-command",severity:"error",line:info.labelLine+1,column:1,message:"Validation block is empty \u2014 add a fenced `bash` block with the verification command",fixable:!1,fix:null};return{rule:"validation-not-fenced-bash",severity:"error",line:info.labelLine+1,column:1,message:"Validation block is not wrapped in a ```bash fenced code block",fixable:!0,fix:{kind:"rewrite",at:{line:info.labelLine+2},content:["```bash",...contentLines,"```"].join(`
2910
2910
  `),range:{endLine:info.labelLine+1+contentLines.length,endColumn:1}}}}function violationsForFencedBlock(lines,info){let out=[];if(info.fenceTag!=="bash")out.push({rule:"validation-not-fenced-bash",severity:"error",line:info.fenceLine+1,column:1,message:`Validation fence has tag "${info.fenceTag??"<none>"}" \u2014 expected \`bash\``,fixable:!0,fix:{kind:"rewrite",at:{line:info.fenceLine+1},content:"```bash",range:{endLine:info.fenceLine+1,endColumn:(lines[info.fenceLine].length||1)+1}}});if(info.fenceClose===null)return out;let body=[];for(let j=info.fenceLine+1;j<info.fenceClose;j++)body.push(lines[j]);if(!body.some((l)=>l.trim()!==""))out.push({rule:"missing-validation-command",severity:"error",line:info.fenceLine+1,column:1,message:"Validation bash block is empty \u2014 add a command that verifies this group",fixable:!1,fix:null});return out}function scanValidation(doc,lines){let out=[];for(let group of doc.executionGroups){let info=findValidationFenceInfo(lines,group);if(!info)continue;if(info.fenceLine<0){let contentLines=collectValidationProse(lines,info.labelLine+1,group.endLine);out.push(violationForMissingFence(info,contentLines));continue}out.push(...violationsForFencedBlock(lines,info))}return out}function findScopeHeaderLine(lines){let inFence=!1;for(let i2=0;i2<lines.length;i2++){let raw=lines[i2];if(/^\s*```/.test(raw)){inFence=!inFence;continue}if(inFence)continue;if(/^##\s+Scope\s*$/i.test(raw))return i2}return-1}function findScopeEndIdx(lines,scopeHeaderLine){for(let i2=scopeHeaderLine+1;i2<lines.length;i2++)if(/^##\s+/.test(lines[i2]))return i2;return lines.length}function findOutLine(lines,start3,end){for(let i2=start3;i2<end;i2++)if(/^###\s+OUT\b/i.test(lines[i2]))return i2;return-1}function scopeMissingViolation(line,message){return{rule:"scope-section-missing",severity:"error",line,column:1,message,fixable:!1,fix:null}}function scanScope(doc,lines){let out=[],scopeHeaderLine=findScopeHeaderLine(lines);if(scopeHeaderLine<0)return out.push(scopeMissingViolation(1,"Wish is missing the `## Scope` section")),out;let endIdx=findScopeEndIdx(lines,scopeHeaderLine),slice=lines.slice(scopeHeaderLine+1,endIdx),hasIn=slice.some((l)=>/^###\s+IN\b/i.test(l)),hasOut=slice.some((l)=>/^###\s+OUT\b/i.test(l));if(!hasIn&&!hasOut)return out.push(scopeMissingViolation(scopeHeaderLine+1,"`## Scope` section has no `### IN` or `### OUT` subsections")),out;if(!hasOut)out.push({rule:"scope-section-missing",severity:"error",line:scopeHeaderLine+1,column:1,message:"`## Scope` is missing the `### OUT` subsection",fixable:!0,fix:{kind:"insert",at:{line:endIdx+1},content:`### OUT
@@ -2994,7 +2994,7 @@ ${label} <TODO>
2994
2994
  ${actor},
2995
2995
  ${tx.json({agent_id:row.agent_id,outcome:TRAP_OUTCOME,reason})}
2996
2996
  )
2997
- `,{noop:!1,executorId,outcome:TRAP_OUTCOME,reason}})}catch(err){let msg=err instanceof Error?err.message:String(err);return console.error(`[pane-trap] swallowed error: ${msg}`),result2}}var TRAP_OUTCOME="clean_exit_unverified";var init_pane_trap=__esm(()=>{init_db()});var exports_pane_trap={};__export(exports_pane_trap,{paneTrapAction:()=>paneTrapAction});function normalizeReason(raw){return raw==="shell_exit"?"shell_exit":"pane_died"}async function paneTrapAction(opts){let result2=await trapPaneExit({executorId:opts.executorId,paneId:opts.paneId,reason:normalizeReason(opts.reason)});if(result2.executorId===null)return;if(result2.noop){console.error(`[pane-trap] no-op for ${result2.executorId} (already closed)`);return}console.error(`[pane-trap] terminalized executor=${result2.executorId} outcome=${result2.outcome} reason=${result2.reason}`)}var init_pane_trap2=__esm(()=>{init_pane_trap()});var highlights_default="./highlights-ghv9g403.scm";var init_highlights=()=>{};var tree_sitter_javascript_default="./tree-sitter-javascript-nd0q4pe9.wasm";var init_tree_sitter_javascript=()=>{};var highlights_default2="./highlights-eq9cgrbb.scm";var init_highlights2=()=>{};var tree_sitter_typescript_default="./tree-sitter-typescript-zxjzwt75.wasm";var init_tree_sitter_typescript=()=>{};var highlights_default3="./highlights-r812a2qc.scm";var init_highlights3=()=>{};var tree_sitter_markdown_default="./tree-sitter-markdown-411r6y9b.wasm";var init_tree_sitter_markdown=()=>{};var injections_default="./injections-73j83es3.scm";var init_injections=()=>{};var highlights_default4="./highlights-x6tmsnaa.scm";var init_highlights4=()=>{};var tree_sitter_markdown_inline_default="./tree-sitter-markdown_inline-j5349f42.wasm";var init_tree_sitter_markdown_inline=()=>{};var highlights_default5="./highlights-hk7bwhj4.scm";var init_highlights5=()=>{};var tree_sitter_zig_default="./tree-sitter-zig-e78zbjpm.wasm";var init_tree_sitter_zig=()=>{};import{EventEmitter as EventEmitter2}from"events";import{Buffer as Buffer2}from"buffer";import{Buffer as Buffer3}from"buffer";import{EventEmitter as EventEmitter22}from"events";import{resolve as resolve18,dirname as dirname22}from"path";import{fileURLToPath as fileURLToPath4}from"url";import{resolve as resolve22,isAbsolute as isAbsolute4,parse as parse2}from"path";import{existsSync as existsSync65}from"fs";import{basename as basename13,join as join79}from"path";import os3 from"os";import path3 from"path";import{EventEmitter as EventEmitter3}from"events";import path22 from"path";import{readFile as readFile22,writeFile as writeFile22,mkdir as mkdir22}from"fs/promises";import*as path4 from"path";import{mkdir as mkdir13,readFile as readFile18,writeFile as writeFile12}from"fs/promises";import*as path32 from"path";import{readdir as readdir12}from"fs/promises";import{dlopen,toArrayBuffer as toArrayBuffer4,JSCallback,ptr as ptr4}from"bun:ffi";import{existsSync as existsSync210,writeFileSync as writeFileSync28}from"fs";import{EventEmitter as EventEmitter4}from"events";import{toArrayBuffer,ptr}from"bun:ffi";import{ptr as ptr2,toArrayBuffer as toArrayBuffer2}from"bun:ffi";import{ptr as ptr3,toArrayBuffer as toArrayBuffer3}from"bun:ffi";import{EventEmitter as EventEmitter5}from"events";import util3 from"util";import{EventEmitter as EventEmitter6}from"events";import{EventEmitter as EventEmitter8}from"events";import{Console}from"console";import fs2 from"fs";import path5 from"path";import util22 from"util";import{Writable}from"stream";import{EventEmitter as EventEmitter7}from"events";import{EventEmitter as EventEmitter9}from"events";function __exportSetter2(name,newValue){this[name]=__returnValue2.bind(null,newValue)}function wrapAssembly(lib){function patch(prototype,name,fn){let original=prototype[name];prototype[name]=function(){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return fn.call(this,original,...args)}}for(let fnName of["setPosition","setMargin","setFlexBasis","setWidth","setHeight","setMinWidth","setMinHeight","setMaxWidth","setMaxHeight","setPadding","setGap"]){let methods={[Unit.Point]:lib.Node.prototype[fnName],[Unit.Percent]:lib.Node.prototype[`${fnName}Percent`],[Unit.Auto]:lib.Node.prototype[`${fnName}Auto`]};patch(lib.Node.prototype,fnName,function(original){for(var _len2=arguments.length,args=Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++)args[_key2-1]=arguments[_key2];let value=args.pop(),unit,asNumber;if(value==="auto")unit=Unit.Auto,asNumber=void 0;else if(typeof value==="object")unit=value.unit,asNumber=value.valueOf();else if(unit=typeof value==="string"&&value.endsWith("%")?Unit.Percent:Unit.Point,asNumber=parseFloat(value),value!==void 0&&!Number.isNaN(value)&&Number.isNaN(asNumber))throw Error(`Invalid value ${value} for ${fnName}`);if(!methods[unit])throw Error(`Failed to execute "${fnName}": Unsupported unit '${value}'`);if(asNumber!==void 0)return methods[unit].call(this,...args,asNumber);else return methods[unit].call(this,...args)})}function wrapMeasureFunction(measureFunction){return lib.MeasureCallback.implement({measure:function(){let{width,height:height2}=measureFunction(...arguments);return{width:width??NaN,height:height2??NaN}}})}patch(lib.Node.prototype,"setMeasureFunc",function(original,measureFunc){if(measureFunc)return original.call(this,wrapMeasureFunction(measureFunc));else return this.unsetMeasureFunc()});function wrapDirtiedFunc(dirtiedFunction){return lib.DirtiedCallback.implement({dirtied:dirtiedFunction})}return patch(lib.Node.prototype,"setDirtiedFunc",function(original,dirtiedFunc){original.call(this,wrapDirtiedFunc(dirtiedFunc))}),patch(lib.Config.prototype,"free",function(){lib.Config.destroy(this)}),patch(lib.Node,"create",(_,config)=>{return config?lib.Node.createWithConfig(config):lib.Node.createDefault()}),patch(lib.Node.prototype,"free",function(){lib.Node.destroy(this)}),patch(lib.Node.prototype,"freeRecursive",function(){for(let t=0,T=this.getChildCount();t<T;++t)this.getChild(0).freeRecursive();this.free()}),patch(lib.Node.prototype,"calculateLayout",function(original){let width=arguments.length>1&&arguments[1]!==void 0?arguments[1]:NaN,height2=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN,direction=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Direction.LTR;return original.call(this,width,height2,direction)}),{Config:lib.Config,Node:lib.Node,...YGEnums_default}}function isValidBorderStyle(value){return typeof value==="string"&&VALID_BORDER_STYLES.includes(value)}function parseBorderStyle(value,fallback="single"){if(isValidBorderStyle(value))return value;if(value!==void 0&&value!==null)console.warn(`Invalid borderStyle "${value}", falling back to "${fallback}". Valid values are: ${VALID_BORDER_STYLES.join(", ")}`);return fallback}function getBorderFromSides(sides){let result2=[];if(sides.top)result2.push("top");if(sides.right)result2.push("right");if(sides.bottom)result2.push("bottom");if(sides.left)result2.push("left");return result2.length>0?result2:!1}function getBorderSides(border){return border===!0?{top:!0,right:!0,bottom:!0,left:!0}:Array.isArray(border)?{top:border.includes("top"),right:border.includes("right"),bottom:border.includes("bottom"),left:border.includes("left")}:{top:!1,right:!1,bottom:!1,left:!1}}function borderCharsToArray(chars){let array=new Uint32Array(11);return array[0]=chars.topLeft.codePointAt(0),array[1]=chars.topRight.codePointAt(0),array[2]=chars.bottomLeft.codePointAt(0),array[3]=chars.bottomRight.codePointAt(0),array[4]=chars.horizontal.codePointAt(0),array[5]=chars.vertical.codePointAt(0),array[6]=chars.topT.codePointAt(0),array[7]=chars.bottomT.codePointAt(0),array[8]=chars.leftT.codePointAt(0),array[9]=chars.rightT.codePointAt(0),array[10]=chars.cross.codePointAt(0),array}class KeyEvent{name;ctrl;meta;shift;option;sequence;number;raw;eventType;source;code;super;hyper;capsLock;numLock;baseCode;repeated;_defaultPrevented=!1;_propagationStopped=!1;constructor(key){this.name=key.name,this.ctrl=key.ctrl,this.meta=key.meta,this.shift=key.shift,this.option=key.option,this.sequence=key.sequence,this.number=key.number,this.raw=key.raw,this.eventType=key.eventType,this.source=key.source,this.code=key.code,this.super=key.super,this.hyper=key.hyper,this.capsLock=key.capsLock,this.numLock=key.numLock,this.baseCode=key.baseCode,this.repeated=key.repeated}get defaultPrevented(){return this._defaultPrevented}get propagationStopped(){return this._propagationStopped}preventDefault(){this._defaultPrevented=!0}stopPropagation(){this._propagationStopped=!0}}class PasteEvent{type="paste";bytes;metadata;_defaultPrevented=!1;_propagationStopped=!1;constructor(bytes,metadata){this.bytes=bytes,this.metadata=metadata}get defaultPrevented(){return this._defaultPrevented}get propagationStopped(){return this._propagationStopped}preventDefault(){this._defaultPrevented=!0}stopPropagation(){this._propagationStopped=!0}}function normalizeColorTag(tag){let normalizedTag=tag!=null&&Number.isFinite(tag)?Math.round(tag):COLOR_TAG_RGB;if(normalizedTag===COLOR_TAG_RGB||normalizedTag===COLOR_TAG_DEFAULT)return normalizedTag;if(Number.isInteger(normalizedTag)&&normalizedTag>=0&&normalizedTag<=255)return normalizedTag;return COLOR_TAG_RGB}function normalizeRGBABuffer(buffer2){if(buffer2.length===RGBA_BUFFER_STRIDE)return buffer2[4]=normalizeColorTag(buffer2[4]),buffer2;let normalized=new Float32Array(RGBA_BUFFER_STRIDE);return normalized[0]=buffer2[0]??0,normalized[1]=buffer2[1]??0,normalized[2]=buffer2[2]??0,normalized[3]=buffer2[3]??0,normalized[4]=COLOR_TAG_RGB,normalized}function withTag(rgba,tag){let tagged=RGBA.clone(rgba);return tagged.tag=tag,tagged}function rgbaForAnsi256Index(index){let[r,g,b2]=ansi256IndexToRgb(index);return RGBA.fromInts(r,g,b2)}function normalizeIndexedColorIndex(index){if(!Number.isInteger(index)||index<0||index>255)throw RangeError(`Indexed color must be an integer in the range 0..255, got ${index}`);return index}function ansi256IndexToRgb(index){let normalizedIndex=normalizeIndexedColorIndex(index);if(normalizedIndex<ANSI16_RGB.length)return ANSI16_RGB[normalizedIndex];if(normalizedIndex<232){let cubeIndex=normalizedIndex-16,r=Math.floor(cubeIndex/36),g=Math.floor(cubeIndex/6)%6,b2=cubeIndex%6;return[ANSI_256_CUBE_LEVELS[r],ANSI_256_CUBE_LEVELS[g],ANSI_256_CUBE_LEVELS[b2]]}let value=8+(normalizedIndex-232)*10;return[value,value,value]}function decodeColorTag(tag){if(tag===COLOR_TAG_DEFAULT)return{kind:"default"};if(tag===COLOR_TAG_RGB)return{kind:"rgb"};return{kind:"indexed",index:normalizeIndexedColorIndex(tag)}}class RGBA{buffer;constructor(buffer2){this.buffer=normalizeRGBABuffer(buffer2)}static fromArray(array){return new RGBA(array)}static fromValues(r,g,b2,a=1,tag=COLOR_TAG_RGB){return new RGBA(new Float32Array([r,g,b2,a,normalizeColorTag(tag)]))}static clone(rgba){return RGBA.fromValues(rgba.r,rgba.g,rgba.b,rgba.a,rgba.tag)}static fromInts(r,g,b2,a=255,tag=COLOR_TAG_RGB){return new RGBA(new Float32Array([r/255,g/255,b2/255,a/255,normalizeColorTag(tag)]))}static fromHex(hex){return hexToRgb2(hex)}static fromIndex(index,snapshot){let normalizedIndex=normalizeIndexedColorIndex(index);return withTag(snapshot?parseColor(snapshot):rgbaForAnsi256Index(normalizedIndex),normalizedIndex)}static defaultForeground(snapshot){return withTag(snapshot?parseColor(snapshot):RGBA.fromInts(...DEFAULT_FOREGROUND_RGB),COLOR_TAG_DEFAULT)}static defaultBackground(snapshot){return withTag(snapshot?parseColor(snapshot):RGBA.fromInts(...DEFAULT_BACKGROUND_RGB),COLOR_TAG_DEFAULT)}static getIntentTag(rgba){return rgba.tag}toInts(){return[Math.round(this.r*255),Math.round(this.g*255),Math.round(this.b*255),Math.round(this.a*255)]}get r(){return this.buffer[0]}set r(value){this.buffer[0]=value}get g(){return this.buffer[1]}set g(value){this.buffer[1]=value}get b(){return this.buffer[2]}set b(value){this.buffer[2]=value}get a(){return this.buffer[3]}set a(value){this.buffer[3]=value}get tag(){return normalizeColorTag(this.buffer[4])}set tag(value){this.buffer[4]=normalizeColorTag(value)}map(fn){return[fn(this.r),fn(this.g),fn(this.b),fn(this.a)]}toString(){return`rgba(${this.r.toFixed(2)}, ${this.g.toFixed(2)}, ${this.b.toFixed(2)}, ${this.a.toFixed(2)})`}equals(other){if(!other)return!1;return this.r===other.r&&this.g===other.g&&this.b===other.b&&this.a===other.a&&this.tag===other.tag}}function normalizeColorValue(value){if(value==null)return null;let rgba=parseColor(value);return{rgba,tag:rgba.tag}}function hexToRgb2(hex){if(hex=hex.replace(/^#/,""),hex.length===3)hex=hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2];else if(hex.length===4)hex=hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2]+hex[3]+hex[3];if(!/^[0-9A-Fa-f]{6}$/.test(hex)&&!/^[0-9A-Fa-f]{8}$/.test(hex))return console.warn(`Invalid hex color: ${hex}, defaulting to magenta`),RGBA.fromValues(1,0,1,1);let r=parseInt(hex.substring(0,2),16)/255,g=parseInt(hex.substring(2,4),16)/255,b2=parseInt(hex.substring(4,6),16)/255,a=hex.length===8?parseInt(hex.substring(6,8),16)/255:1;return RGBA.fromValues(r,g,b2,a)}function rgbToHex2(rgb){return"#"+(rgb.a===1?[rgb.r,rgb.g,rgb.b]:[rgb.r,rgb.g,rgb.b,rgb.a]).map((x)=>{let hex=Math.floor(Math.max(0,Math.min(1,x)*255)).toString(16);return hex.length===1?"0"+hex:hex}).join("")}function hsvToRgb(h,s2,v){let r=0,g=0,b2=0,i2=Math.floor(h/60)%6,f=h/60-Math.floor(h/60),p=v*(1-s2),q=v*(1-f*s2),t=v*(1-(1-f)*s2);switch(i2){case 0:r=v,g=t,b2=p;break;case 1:r=q,g=v,b2=p;break;case 2:r=p,g=v,b2=t;break;case 3:r=p,g=q,b2=v;break;case 4:r=t,g=p,b2=v;break;case 5:r=v,g=p,b2=q;break}return RGBA.fromValues(r,g,b2,1)}function parseColor(color2){if(typeof color2==="string"){let lowerColor=color2.toLowerCase();if(lowerColor==="transparent")return RGBA.fromValues(0,0,0,0);if(CSS_COLOR_NAMES[lowerColor])return hexToRgb2(CSS_COLOR_NAMES[lowerColor]);return hexToRgb2(color2)}return color2}function parseColorTags(text){let segments=[],currentIndex=0,colorTagRegex=/<c(\d+)>(.*?)<\/c\d+>/g,lastIndex=0,match;while((match=colorTagRegex.exec(text))!==null){if(match.index>lastIndex){let plainText=text.slice(lastIndex,match.index);if(plainText)segments.push({text:plainText,colorIndex:0})}let colorIndex=parseInt(match[1])-1,taggedText=match[2];segments.push({text:taggedText,colorIndex:Math.max(0,colorIndex)}),lastIndex=match.index+match[0].length}if(lastIndex<text.length){let remainingText=text.slice(lastIndex);if(remainingText)segments.push({text:remainingText,colorIndex:0})}return segments}function getParsedFont(fontKey){if(!parsedFonts[fontKey]){let fontDef=fonts[fontKey],parsedChars={};for(let[char,lines]of Object.entries(fontDef.chars))parsedChars[char]=lines.map((line)=>parseColorTags(line));parsedFonts[fontKey]={...fontDef,colors:fontDef.colors||1,chars:parsedChars}}return parsedFonts[fontKey]}function measureText({text,font="tiny"}){let fontDef=getParsedFont(font);if(!fontDef)return console.warn(`Font '${font}' not found`),{width:0,height:0};let currentX=0;for(let i2=0;i2<text.length;i2++){let char=text[i2].toUpperCase(),charDef=fontDef.chars[char];if(!charDef){let spaceChar=fontDef.chars[" "];if(spaceChar&&spaceChar[0]){let spaceWidth=0;for(let segment of spaceChar[0])spaceWidth+=segment.text.length;currentX+=spaceWidth}else currentX+=1;continue}let charWidth=0;if(charDef[0])for(let segment of charDef[0])charWidth+=segment.text.length;if(currentX+=charWidth,i2<text.length-1)currentX+=fontDef.letterspace_size}return{width:currentX,height:fontDef.lines}}function getCharacterPositions(text,font="tiny"){let fontDef=getParsedFont(font);if(!fontDef)return[0];let positions=[0],currentX=0;for(let i2=0;i2<text.length;i2++){let char=text[i2].toUpperCase(),charDef=fontDef.chars[char],charWidth=0;if(!charDef){let spaceChar=fontDef.chars[" "];if(spaceChar&&spaceChar[0])for(let segment of spaceChar[0])charWidth+=segment.text.length;else charWidth=1}else if(charDef[0])for(let segment of charDef[0])charWidth+=segment.text.length;if(currentX+=charWidth,i2<text.length-1)currentX+=fontDef.letterspace_size;positions.push(currentX)}return positions}function coordinateToCharacterIndex(x,text,font="tiny"){let positions=getCharacterPositions(text,font);if(x<0)return 0;for(let i2=0;i2<positions.length-1;i2++){let currentPos=positions[i2],nextPos=positions[i2+1];if(x>=currentPos&&x<nextPos){let charMidpoint=currentPos+(nextPos-currentPos)/2;return x<charMidpoint?i2:i2+1}}if(positions.length>0&&x>=positions[positions.length-1])return text.length;return 0}function renderFontToFrameBuffer(buffer2,{text,x=0,y=0,color:color2=[RGBA.fromInts(255,255,255,255)],backgroundColor=RGBA.fromInts(0,0,0,255),font="tiny"}){let{width,height:height2}=buffer2,fontDef=getParsedFont(font);if(!fontDef)return console.warn(`Font '${font}' not found`),{width:0,height:0};let colors8=Array.isArray(color2)?color2:[color2];if(y<0||y+fontDef.lines>height2)return{width:0,height:fontDef.lines};let currentX=x,startX=x;for(let i2=0;i2<text.length;i2++){let char=text[i2].toUpperCase(),charDef=fontDef.chars[char];if(!charDef){let spaceChar=fontDef.chars[" "];if(spaceChar&&spaceChar[0]){let spaceWidth=0;for(let segment of spaceChar[0])spaceWidth+=segment.text.length;currentX+=spaceWidth}else currentX+=1;continue}let charWidth=0;if(charDef[0])for(let segment of charDef[0])charWidth+=segment.text.length;if(currentX>=width)break;if(currentX+charWidth<0){currentX+=charWidth+fontDef.letterspace_size;continue}for(let lineIdx=0;lineIdx<fontDef.lines&&lineIdx<charDef.length;lineIdx++){let segments=charDef[lineIdx],renderY=y+lineIdx;if(renderY>=0&&renderY<height2){let segmentX=currentX;for(let segment of segments){let segmentColor=colors8[segment.colorIndex]||colors8[0];for(let charIdx=0;charIdx<segment.text.length;charIdx++){let renderX=segmentX+charIdx;if(renderX>=0&&renderX<width){let fontChar=segment.text[charIdx];if(fontChar!==" ")buffer2.setCellWithAlphaBlending(renderX,renderY,fontChar,parseColor(segmentColor),parseColor(backgroundColor))}}segmentX+=segment.text.length}}}if(currentX+=charWidth,i2<text.length-1)currentX+=fontDef.letterspace_size}return{width:currentX-startX,height:fontDef.lines}}function getBaseAttributes(attr){return attr&ATTRIBUTE_BASE_MASK}function createTextAttributes({bold=!1,italic=!1,underline=!1,dim=!1,blink=!1,inverse=!1,hidden=!1,strikethrough=!1}={}){let attributes=TextAttributes.NONE;if(bold)attributes|=TextAttributes.BOLD;if(italic)attributes|=TextAttributes.ITALIC;if(underline)attributes|=TextAttributes.UNDERLINE;if(dim)attributes|=TextAttributes.DIM;if(blink)attributes|=TextAttributes.BLINK;if(inverse)attributes|=TextAttributes.INVERSE;if(hidden)attributes|=TextAttributes.HIDDEN;if(strikethrough)attributes|=TextAttributes.STRIKETHROUGH;return attributes}function attributesWithLink(baseAttributes,linkId){let base=baseAttributes&ATTRIBUTE_BASE_MASK2,linkBits=(linkId&LINK_ID_PAYLOAD_MASK)<<LINK_ID_SHIFT;return base|linkBits}function getLinkId(attributes){return attributes>>>LINK_ID_SHIFT&LINK_ID_PAYLOAD_MASK}function visualizeRenderableTree(renderable,maxDepth=10){function buildTreeLines(node,prefix="",parentPrefix="",isLastChild=!0,depth=0){if(depth>=maxDepth)return[`${prefix}${node.id} ... (max depth reached)`];let lines=[],children=node.getChildren();if(lines.push(`${prefix}${node.id}`),children.length>0){let lastChildIndex=children.length-1;children.forEach((child,index)=>{let childIsLast=index===lastChildIndex,connector=childIsLast?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ",childPrefix=parentPrefix+(isLastChild?" ":"\u2502 "),childLines=buildTreeLines(child,childPrefix+connector,childPrefix,childIsLast,depth+1);lines.push(...childLines)})}return lines}let treeLines=buildTreeLines(renderable);console.log(`Renderable Tree:
2997
+ `,{noop:!1,executorId,outcome:TRAP_OUTCOME,reason}})}catch(err){let msg=err instanceof Error?err.message:String(err);return console.error(`[pane-trap] swallowed error: ${msg}`),result2}}var TRAP_OUTCOME="clean_exit_unverified";var init_pane_trap=__esm(()=>{init_db()});var exports_pane_trap={};__export(exports_pane_trap,{paneTrapAction:()=>paneTrapAction});function normalizeReason(raw){return raw==="shell_exit"?"shell_exit":"pane_died"}async function paneTrapAction(opts){let result2=await trapPaneExit({executorId:opts.executorId,paneId:opts.paneId,reason:normalizeReason(opts.reason)});if(result2.executorId===null)return;if(result2.noop){console.error(`[pane-trap] no-op for ${result2.executorId} (already closed)`);return}console.error(`[pane-trap] terminalized executor=${result2.executorId} outcome=${result2.outcome} reason=${result2.reason}`)}var init_pane_trap2=__esm(()=>{init_pane_trap()});var highlights_default="./highlights-ghv9g403.scm";var init_highlights=()=>{};var tree_sitter_javascript_default="./tree-sitter-javascript-nd0q4pe9.wasm";var init_tree_sitter_javascript=()=>{};var highlights_default2="./highlights-eq9cgrbb.scm";var init_highlights2=()=>{};var tree_sitter_typescript_default="./tree-sitter-typescript-zxjzwt75.wasm";var init_tree_sitter_typescript=()=>{};var highlights_default3="./highlights-r812a2qc.scm";var init_highlights3=()=>{};var tree_sitter_markdown_default="./tree-sitter-markdown-411r6y9b.wasm";var init_tree_sitter_markdown=()=>{};var injections_default="./injections-73j83es3.scm";var init_injections=()=>{};var highlights_default4="./highlights-x6tmsnaa.scm";var init_highlights4=()=>{};var tree_sitter_markdown_inline_default="./tree-sitter-markdown_inline-j5349f42.wasm";var init_tree_sitter_markdown_inline=()=>{};var highlights_default5="./highlights-hk7bwhj4.scm";var init_highlights5=()=>{};var tree_sitter_zig_default="./tree-sitter-zig-e78zbjpm.wasm";var init_tree_sitter_zig=()=>{};import{EventEmitter as EventEmitter2}from"events";import{Buffer as Buffer2}from"buffer";import{Buffer as Buffer3}from"buffer";import{EventEmitter as EventEmitter22}from"events";import{resolve as resolve18,dirname as dirname23}from"path";import{fileURLToPath as fileURLToPath4}from"url";import{resolve as resolve22,isAbsolute as isAbsolute4,parse as parse2}from"path";import{existsSync as existsSync66}from"fs";import{basename as basename13,join as join80}from"path";import os3 from"os";import path3 from"path";import{EventEmitter as EventEmitter3}from"events";import path22 from"path";import{readFile as readFile22,writeFile as writeFile22,mkdir as mkdir22}from"fs/promises";import*as path4 from"path";import{mkdir as mkdir13,readFile as readFile18,writeFile as writeFile12}from"fs/promises";import*as path32 from"path";import{readdir as readdir12}from"fs/promises";import{dlopen,toArrayBuffer as toArrayBuffer4,JSCallback,ptr as ptr4}from"bun:ffi";import{existsSync as existsSync210,writeFileSync as writeFileSync29}from"fs";import{EventEmitter as EventEmitter4}from"events";import{toArrayBuffer,ptr}from"bun:ffi";import{ptr as ptr2,toArrayBuffer as toArrayBuffer2}from"bun:ffi";import{ptr as ptr3,toArrayBuffer as toArrayBuffer3}from"bun:ffi";import{EventEmitter as EventEmitter5}from"events";import util3 from"util";import{EventEmitter as EventEmitter6}from"events";import{EventEmitter as EventEmitter8}from"events";import{Console}from"console";import fs2 from"fs";import path5 from"path";import util22 from"util";import{Writable}from"stream";import{EventEmitter as EventEmitter7}from"events";import{EventEmitter as EventEmitter9}from"events";function __exportSetter2(name,newValue){this[name]=__returnValue2.bind(null,newValue)}function wrapAssembly(lib){function patch(prototype,name,fn){let original=prototype[name];prototype[name]=function(){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return fn.call(this,original,...args)}}for(let fnName of["setPosition","setMargin","setFlexBasis","setWidth","setHeight","setMinWidth","setMinHeight","setMaxWidth","setMaxHeight","setPadding","setGap"]){let methods={[Unit.Point]:lib.Node.prototype[fnName],[Unit.Percent]:lib.Node.prototype[`${fnName}Percent`],[Unit.Auto]:lib.Node.prototype[`${fnName}Auto`]};patch(lib.Node.prototype,fnName,function(original){for(var _len2=arguments.length,args=Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++)args[_key2-1]=arguments[_key2];let value=args.pop(),unit,asNumber;if(value==="auto")unit=Unit.Auto,asNumber=void 0;else if(typeof value==="object")unit=value.unit,asNumber=value.valueOf();else if(unit=typeof value==="string"&&value.endsWith("%")?Unit.Percent:Unit.Point,asNumber=parseFloat(value),value!==void 0&&!Number.isNaN(value)&&Number.isNaN(asNumber))throw Error(`Invalid value ${value} for ${fnName}`);if(!methods[unit])throw Error(`Failed to execute "${fnName}": Unsupported unit '${value}'`);if(asNumber!==void 0)return methods[unit].call(this,...args,asNumber);else return methods[unit].call(this,...args)})}function wrapMeasureFunction(measureFunction){return lib.MeasureCallback.implement({measure:function(){let{width,height:height2}=measureFunction(...arguments);return{width:width??NaN,height:height2??NaN}}})}patch(lib.Node.prototype,"setMeasureFunc",function(original,measureFunc){if(measureFunc)return original.call(this,wrapMeasureFunction(measureFunc));else return this.unsetMeasureFunc()});function wrapDirtiedFunc(dirtiedFunction){return lib.DirtiedCallback.implement({dirtied:dirtiedFunction})}return patch(lib.Node.prototype,"setDirtiedFunc",function(original,dirtiedFunc){original.call(this,wrapDirtiedFunc(dirtiedFunc))}),patch(lib.Config.prototype,"free",function(){lib.Config.destroy(this)}),patch(lib.Node,"create",(_,config)=>{return config?lib.Node.createWithConfig(config):lib.Node.createDefault()}),patch(lib.Node.prototype,"free",function(){lib.Node.destroy(this)}),patch(lib.Node.prototype,"freeRecursive",function(){for(let t=0,T=this.getChildCount();t<T;++t)this.getChild(0).freeRecursive();this.free()}),patch(lib.Node.prototype,"calculateLayout",function(original){let width=arguments.length>1&&arguments[1]!==void 0?arguments[1]:NaN,height2=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN,direction=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Direction.LTR;return original.call(this,width,height2,direction)}),{Config:lib.Config,Node:lib.Node,...YGEnums_default}}function isValidBorderStyle(value){return typeof value==="string"&&VALID_BORDER_STYLES.includes(value)}function parseBorderStyle(value,fallback="single"){if(isValidBorderStyle(value))return value;if(value!==void 0&&value!==null)console.warn(`Invalid borderStyle "${value}", falling back to "${fallback}". Valid values are: ${VALID_BORDER_STYLES.join(", ")}`);return fallback}function getBorderFromSides(sides){let result2=[];if(sides.top)result2.push("top");if(sides.right)result2.push("right");if(sides.bottom)result2.push("bottom");if(sides.left)result2.push("left");return result2.length>0?result2:!1}function getBorderSides(border){return border===!0?{top:!0,right:!0,bottom:!0,left:!0}:Array.isArray(border)?{top:border.includes("top"),right:border.includes("right"),bottom:border.includes("bottom"),left:border.includes("left")}:{top:!1,right:!1,bottom:!1,left:!1}}function borderCharsToArray(chars){let array=new Uint32Array(11);return array[0]=chars.topLeft.codePointAt(0),array[1]=chars.topRight.codePointAt(0),array[2]=chars.bottomLeft.codePointAt(0),array[3]=chars.bottomRight.codePointAt(0),array[4]=chars.horizontal.codePointAt(0),array[5]=chars.vertical.codePointAt(0),array[6]=chars.topT.codePointAt(0),array[7]=chars.bottomT.codePointAt(0),array[8]=chars.leftT.codePointAt(0),array[9]=chars.rightT.codePointAt(0),array[10]=chars.cross.codePointAt(0),array}class KeyEvent{name;ctrl;meta;shift;option;sequence;number;raw;eventType;source;code;super;hyper;capsLock;numLock;baseCode;repeated;_defaultPrevented=!1;_propagationStopped=!1;constructor(key){this.name=key.name,this.ctrl=key.ctrl,this.meta=key.meta,this.shift=key.shift,this.option=key.option,this.sequence=key.sequence,this.number=key.number,this.raw=key.raw,this.eventType=key.eventType,this.source=key.source,this.code=key.code,this.super=key.super,this.hyper=key.hyper,this.capsLock=key.capsLock,this.numLock=key.numLock,this.baseCode=key.baseCode,this.repeated=key.repeated}get defaultPrevented(){return this._defaultPrevented}get propagationStopped(){return this._propagationStopped}preventDefault(){this._defaultPrevented=!0}stopPropagation(){this._propagationStopped=!0}}class PasteEvent{type="paste";bytes;metadata;_defaultPrevented=!1;_propagationStopped=!1;constructor(bytes,metadata){this.bytes=bytes,this.metadata=metadata}get defaultPrevented(){return this._defaultPrevented}get propagationStopped(){return this._propagationStopped}preventDefault(){this._defaultPrevented=!0}stopPropagation(){this._propagationStopped=!0}}function normalizeColorTag(tag){let normalizedTag=tag!=null&&Number.isFinite(tag)?Math.round(tag):COLOR_TAG_RGB;if(normalizedTag===COLOR_TAG_RGB||normalizedTag===COLOR_TAG_DEFAULT)return normalizedTag;if(Number.isInteger(normalizedTag)&&normalizedTag>=0&&normalizedTag<=255)return normalizedTag;return COLOR_TAG_RGB}function normalizeRGBABuffer(buffer2){if(buffer2.length===RGBA_BUFFER_STRIDE)return buffer2[4]=normalizeColorTag(buffer2[4]),buffer2;let normalized=new Float32Array(RGBA_BUFFER_STRIDE);return normalized[0]=buffer2[0]??0,normalized[1]=buffer2[1]??0,normalized[2]=buffer2[2]??0,normalized[3]=buffer2[3]??0,normalized[4]=COLOR_TAG_RGB,normalized}function withTag(rgba,tag){let tagged=RGBA.clone(rgba);return tagged.tag=tag,tagged}function rgbaForAnsi256Index(index){let[r,g,b2]=ansi256IndexToRgb(index);return RGBA.fromInts(r,g,b2)}function normalizeIndexedColorIndex(index){if(!Number.isInteger(index)||index<0||index>255)throw RangeError(`Indexed color must be an integer in the range 0..255, got ${index}`);return index}function ansi256IndexToRgb(index){let normalizedIndex=normalizeIndexedColorIndex(index);if(normalizedIndex<ANSI16_RGB.length)return ANSI16_RGB[normalizedIndex];if(normalizedIndex<232){let cubeIndex=normalizedIndex-16,r=Math.floor(cubeIndex/36),g=Math.floor(cubeIndex/6)%6,b2=cubeIndex%6;return[ANSI_256_CUBE_LEVELS[r],ANSI_256_CUBE_LEVELS[g],ANSI_256_CUBE_LEVELS[b2]]}let value=8+(normalizedIndex-232)*10;return[value,value,value]}function decodeColorTag(tag){if(tag===COLOR_TAG_DEFAULT)return{kind:"default"};if(tag===COLOR_TAG_RGB)return{kind:"rgb"};return{kind:"indexed",index:normalizeIndexedColorIndex(tag)}}class RGBA{buffer;constructor(buffer2){this.buffer=normalizeRGBABuffer(buffer2)}static fromArray(array){return new RGBA(array)}static fromValues(r,g,b2,a=1,tag=COLOR_TAG_RGB){return new RGBA(new Float32Array([r,g,b2,a,normalizeColorTag(tag)]))}static clone(rgba){return RGBA.fromValues(rgba.r,rgba.g,rgba.b,rgba.a,rgba.tag)}static fromInts(r,g,b2,a=255,tag=COLOR_TAG_RGB){return new RGBA(new Float32Array([r/255,g/255,b2/255,a/255,normalizeColorTag(tag)]))}static fromHex(hex){return hexToRgb2(hex)}static fromIndex(index,snapshot){let normalizedIndex=normalizeIndexedColorIndex(index);return withTag(snapshot?parseColor(snapshot):rgbaForAnsi256Index(normalizedIndex),normalizedIndex)}static defaultForeground(snapshot){return withTag(snapshot?parseColor(snapshot):RGBA.fromInts(...DEFAULT_FOREGROUND_RGB),COLOR_TAG_DEFAULT)}static defaultBackground(snapshot){return withTag(snapshot?parseColor(snapshot):RGBA.fromInts(...DEFAULT_BACKGROUND_RGB),COLOR_TAG_DEFAULT)}static getIntentTag(rgba){return rgba.tag}toInts(){return[Math.round(this.r*255),Math.round(this.g*255),Math.round(this.b*255),Math.round(this.a*255)]}get r(){return this.buffer[0]}set r(value){this.buffer[0]=value}get g(){return this.buffer[1]}set g(value){this.buffer[1]=value}get b(){return this.buffer[2]}set b(value){this.buffer[2]=value}get a(){return this.buffer[3]}set a(value){this.buffer[3]=value}get tag(){return normalizeColorTag(this.buffer[4])}set tag(value){this.buffer[4]=normalizeColorTag(value)}map(fn){return[fn(this.r),fn(this.g),fn(this.b),fn(this.a)]}toString(){return`rgba(${this.r.toFixed(2)}, ${this.g.toFixed(2)}, ${this.b.toFixed(2)}, ${this.a.toFixed(2)})`}equals(other){if(!other)return!1;return this.r===other.r&&this.g===other.g&&this.b===other.b&&this.a===other.a&&this.tag===other.tag}}function normalizeColorValue(value){if(value==null)return null;let rgba=parseColor(value);return{rgba,tag:rgba.tag}}function hexToRgb2(hex){if(hex=hex.replace(/^#/,""),hex.length===3)hex=hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2];else if(hex.length===4)hex=hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2]+hex[3]+hex[3];if(!/^[0-9A-Fa-f]{6}$/.test(hex)&&!/^[0-9A-Fa-f]{8}$/.test(hex))return console.warn(`Invalid hex color: ${hex}, defaulting to magenta`),RGBA.fromValues(1,0,1,1);let r=parseInt(hex.substring(0,2),16)/255,g=parseInt(hex.substring(2,4),16)/255,b2=parseInt(hex.substring(4,6),16)/255,a=hex.length===8?parseInt(hex.substring(6,8),16)/255:1;return RGBA.fromValues(r,g,b2,a)}function rgbToHex2(rgb){return"#"+(rgb.a===1?[rgb.r,rgb.g,rgb.b]:[rgb.r,rgb.g,rgb.b,rgb.a]).map((x)=>{let hex=Math.floor(Math.max(0,Math.min(1,x)*255)).toString(16);return hex.length===1?"0"+hex:hex}).join("")}function hsvToRgb(h,s2,v){let r=0,g=0,b2=0,i2=Math.floor(h/60)%6,f=h/60-Math.floor(h/60),p=v*(1-s2),q=v*(1-f*s2),t=v*(1-(1-f)*s2);switch(i2){case 0:r=v,g=t,b2=p;break;case 1:r=q,g=v,b2=p;break;case 2:r=p,g=v,b2=t;break;case 3:r=p,g=q,b2=v;break;case 4:r=t,g=p,b2=v;break;case 5:r=v,g=p,b2=q;break}return RGBA.fromValues(r,g,b2,1)}function parseColor(color2){if(typeof color2==="string"){let lowerColor=color2.toLowerCase();if(lowerColor==="transparent")return RGBA.fromValues(0,0,0,0);if(CSS_COLOR_NAMES[lowerColor])return hexToRgb2(CSS_COLOR_NAMES[lowerColor]);return hexToRgb2(color2)}return color2}function parseColorTags(text){let segments=[],currentIndex=0,colorTagRegex=/<c(\d+)>(.*?)<\/c\d+>/g,lastIndex=0,match;while((match=colorTagRegex.exec(text))!==null){if(match.index>lastIndex){let plainText=text.slice(lastIndex,match.index);if(plainText)segments.push({text:plainText,colorIndex:0})}let colorIndex=parseInt(match[1])-1,taggedText=match[2];segments.push({text:taggedText,colorIndex:Math.max(0,colorIndex)}),lastIndex=match.index+match[0].length}if(lastIndex<text.length){let remainingText=text.slice(lastIndex);if(remainingText)segments.push({text:remainingText,colorIndex:0})}return segments}function getParsedFont(fontKey){if(!parsedFonts[fontKey]){let fontDef=fonts[fontKey],parsedChars={};for(let[char,lines]of Object.entries(fontDef.chars))parsedChars[char]=lines.map((line)=>parseColorTags(line));parsedFonts[fontKey]={...fontDef,colors:fontDef.colors||1,chars:parsedChars}}return parsedFonts[fontKey]}function measureText({text,font="tiny"}){let fontDef=getParsedFont(font);if(!fontDef)return console.warn(`Font '${font}' not found`),{width:0,height:0};let currentX=0;for(let i2=0;i2<text.length;i2++){let char=text[i2].toUpperCase(),charDef=fontDef.chars[char];if(!charDef){let spaceChar=fontDef.chars[" "];if(spaceChar&&spaceChar[0]){let spaceWidth=0;for(let segment of spaceChar[0])spaceWidth+=segment.text.length;currentX+=spaceWidth}else currentX+=1;continue}let charWidth=0;if(charDef[0])for(let segment of charDef[0])charWidth+=segment.text.length;if(currentX+=charWidth,i2<text.length-1)currentX+=fontDef.letterspace_size}return{width:currentX,height:fontDef.lines}}function getCharacterPositions(text,font="tiny"){let fontDef=getParsedFont(font);if(!fontDef)return[0];let positions=[0],currentX=0;for(let i2=0;i2<text.length;i2++){let char=text[i2].toUpperCase(),charDef=fontDef.chars[char],charWidth=0;if(!charDef){let spaceChar=fontDef.chars[" "];if(spaceChar&&spaceChar[0])for(let segment of spaceChar[0])charWidth+=segment.text.length;else charWidth=1}else if(charDef[0])for(let segment of charDef[0])charWidth+=segment.text.length;if(currentX+=charWidth,i2<text.length-1)currentX+=fontDef.letterspace_size;positions.push(currentX)}return positions}function coordinateToCharacterIndex(x,text,font="tiny"){let positions=getCharacterPositions(text,font);if(x<0)return 0;for(let i2=0;i2<positions.length-1;i2++){let currentPos=positions[i2],nextPos=positions[i2+1];if(x>=currentPos&&x<nextPos){let charMidpoint=currentPos+(nextPos-currentPos)/2;return x<charMidpoint?i2:i2+1}}if(positions.length>0&&x>=positions[positions.length-1])return text.length;return 0}function renderFontToFrameBuffer(buffer2,{text,x=0,y=0,color:color2=[RGBA.fromInts(255,255,255,255)],backgroundColor=RGBA.fromInts(0,0,0,255),font="tiny"}){let{width,height:height2}=buffer2,fontDef=getParsedFont(font);if(!fontDef)return console.warn(`Font '${font}' not found`),{width:0,height:0};let colors8=Array.isArray(color2)?color2:[color2];if(y<0||y+fontDef.lines>height2)return{width:0,height:fontDef.lines};let currentX=x,startX=x;for(let i2=0;i2<text.length;i2++){let char=text[i2].toUpperCase(),charDef=fontDef.chars[char];if(!charDef){let spaceChar=fontDef.chars[" "];if(spaceChar&&spaceChar[0]){let spaceWidth=0;for(let segment of spaceChar[0])spaceWidth+=segment.text.length;currentX+=spaceWidth}else currentX+=1;continue}let charWidth=0;if(charDef[0])for(let segment of charDef[0])charWidth+=segment.text.length;if(currentX>=width)break;if(currentX+charWidth<0){currentX+=charWidth+fontDef.letterspace_size;continue}for(let lineIdx=0;lineIdx<fontDef.lines&&lineIdx<charDef.length;lineIdx++){let segments=charDef[lineIdx],renderY=y+lineIdx;if(renderY>=0&&renderY<height2){let segmentX=currentX;for(let segment of segments){let segmentColor=colors8[segment.colorIndex]||colors8[0];for(let charIdx=0;charIdx<segment.text.length;charIdx++){let renderX=segmentX+charIdx;if(renderX>=0&&renderX<width){let fontChar=segment.text[charIdx];if(fontChar!==" ")buffer2.setCellWithAlphaBlending(renderX,renderY,fontChar,parseColor(segmentColor),parseColor(backgroundColor))}}segmentX+=segment.text.length}}}if(currentX+=charWidth,i2<text.length-1)currentX+=fontDef.letterspace_size}return{width:currentX-startX,height:fontDef.lines}}function getBaseAttributes(attr){return attr&ATTRIBUTE_BASE_MASK}function createTextAttributes({bold=!1,italic=!1,underline=!1,dim=!1,blink=!1,inverse=!1,hidden=!1,strikethrough=!1}={}){let attributes=TextAttributes.NONE;if(bold)attributes|=TextAttributes.BOLD;if(italic)attributes|=TextAttributes.ITALIC;if(underline)attributes|=TextAttributes.UNDERLINE;if(dim)attributes|=TextAttributes.DIM;if(blink)attributes|=TextAttributes.BLINK;if(inverse)attributes|=TextAttributes.INVERSE;if(hidden)attributes|=TextAttributes.HIDDEN;if(strikethrough)attributes|=TextAttributes.STRIKETHROUGH;return attributes}function attributesWithLink(baseAttributes,linkId){let base=baseAttributes&ATTRIBUTE_BASE_MASK2,linkBits=(linkId&LINK_ID_PAYLOAD_MASK)<<LINK_ID_SHIFT;return base|linkBits}function getLinkId(attributes){return attributes>>>LINK_ID_SHIFT&LINK_ID_PAYLOAD_MASK}function visualizeRenderableTree(renderable,maxDepth=10){function buildTreeLines(node,prefix="",parentPrefix="",isLastChild=!0,depth=0){if(depth>=maxDepth)return[`${prefix}${node.id} ... (max depth reached)`];let lines=[],children=node.getChildren();if(lines.push(`${prefix}${node.id}`),children.length>0){let lastChildIndex=children.length-1;children.forEach((child,index)=>{let childIsLast=index===lastChildIndex,connector=childIsLast?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ",childPrefix=parentPrefix+(isLastChild?" ":"\u2502 "),childLines=buildTreeLines(child,childPrefix+connector,childPrefix,childIsLast,depth+1);lines.push(...childLines)})}return lines}let treeLines=buildTreeLines(renderable);console.log(`Renderable Tree:
2998
2998
  `+treeLines.join(`
2999
2999
  `))}function isStyledText(obj){return obj&&obj[BrandedStyledText]}function stringToStyledText(content){return new StyledText([{__isChunk:!0,text:content}])}function applyStyle(input,style){if(typeof input==="object"&&"__isChunk"in input){let existingChunk=input,fg=style.fg?parseColor(style.fg):existingChunk.fg,bg=style.bg?parseColor(style.bg):existingChunk.bg,newAttrs=createTextAttributes(style),mergedAttrs=existingChunk.attributes?existingChunk.attributes|newAttrs:newAttrs;return{__isChunk:!0,text:existingChunk.text,fg,bg,attributes:mergedAttrs,link:existingChunk.link}}else{let plainTextStr=String(input),fg=style.fg?parseColor(style.fg):void 0,bg=style.bg?parseColor(style.bg):void 0,attributes=createTextAttributes(style);return{__isChunk:!0,text:plainTextStr,fg,bg,attributes}}}function t(strings,...values2){let chunks=[];for(let i2=0;i2<strings.length;i2++){let raw=strings[i2];if(raw)chunks.push({__isChunk:!0,text:raw,attributes:0});let val=values2[i2];if(typeof val==="object"&&"__isChunk"in val)chunks.push(val);else if(val!==void 0){let plainTextStr=String(val);chunks.push({__isChunk:!0,text:plainTextStr,attributes:0})}}return new StyledText(chunks)}function hastToTextChunks(node,syntaxStyle,parentStyles=[]){let chunks=[];if(node.type==="text"){let stylesToMerge=parentStyles.length>0?parentStyles:["default"],mergedStyle=syntaxStyle.mergeStyles(...stylesToMerge);chunks.push({__isChunk:!0,text:node.value,fg:mergedStyle.fg,bg:mergedStyle.bg,attributes:mergedStyle.attributes})}else if(node.type==="element"){let currentStyles=[...parentStyles];if(node.properties?.className){let classes=node.properties.className.split(" ");for(let cls of classes)currentStyles.push(cls)}for(let child of node.children)chunks.push(...hastToTextChunks(child,syntaxStyle,currentStyles))}return chunks}function hastToStyledText(hast,syntaxStyle){let chunks=hastToTextChunks(hast,syntaxStyle);return new StyledText(chunks)}class SystemClock{now(){if(!globalThis.performance||typeof globalThis.performance.now!=="function")throw Error("SystemClock requires globalThis.performance.now()");return globalThis.performance.now()}setTimeout(fn,delayMs){return globalThis.setTimeout(fn,delayMs)}clearTimeout(handle){globalThis.clearTimeout(handle)}setInterval(fn,delayMs){return globalThis.setInterval(fn,delayMs)}clearInterval(handle){globalThis.clearInterval(handle)}}function fromKittyMods(mod){return{shift:!!(mod&1),alt:!!(mod&2),ctrl:!!(mod&4),super:!!(mod&8),hyper:!!(mod&16),meta:!!(mod&32),capsLock:!!(mod&64),numLock:!!(mod&128)}}function parseKittySpecialKey(sequence){let match=/^\x1b\[(\d+);(\d+):(\d+)([A-Z~])$/.exec(sequence);if(!match)return null;let keyNumOrOne=match[1],modifierStr=match[2],eventTypeStr=match[3],terminator=match[4],keyName;if(terminator==="~")keyName=tildeKeyMap[keyNumOrOne];else{if(keyNumOrOne!=="1")return null;keyName=functionalKeyMap[terminator]}if(!keyName)return null;let key={name:keyName,ctrl:!1,meta:!1,shift:!1,option:!1,number:!1,sequence,raw:sequence,eventType:"press",source:"kitty",super:!1,hyper:!1,capsLock:!1,numLock:!1};if(modifierStr){let modifierMask=parseInt(modifierStr,10);if(!isNaN(modifierMask)&&modifierMask>1){let mods=fromKittyMods(modifierMask-1);key.shift=mods.shift,key.ctrl=mods.ctrl,key.meta=mods.alt||mods.meta,key.option=mods.alt,key.super=mods.super,key.hyper=mods.hyper,key.capsLock=mods.capsLock,key.numLock=mods.numLock}}if(eventTypeStr==="1"||!eventTypeStr)key.eventType="press";else if(eventTypeStr==="2")key.eventType="press",key.repeated=!0;else if(eventTypeStr==="3")key.eventType="release";return key}function parseKittyKeyboard(sequence){let specialResult=parseKittySpecialKey(sequence);if(specialResult)return specialResult;let match=/^\x1b\[([^\x1b]+)u$/.exec(sequence);if(!match)return null;let fields=match[1].split(";");if(fields.length<1)return null;let key={name:"",ctrl:!1,meta:!1,shift:!1,option:!1,number:!1,sequence,raw:sequence,eventType:"press",source:"kitty",super:!1,hyper:!1,capsLock:!1,numLock:!1},text="",field1=fields[0]?.split(":")||[],codepointStr=field1[0];if(!codepointStr)return null;let codepoint=parseInt(codepointStr,10);if(isNaN(codepoint))return null;let shiftedCodepoint,baseCodepoint;if(field1[1]){let shifted=parseInt(field1[1],10);if(!isNaN(shifted)&&shifted>0&&shifted<=1114111)shiftedCodepoint=shifted}if(field1[2]){let base=parseInt(field1[2],10);if(!isNaN(base)&&base>0&&base<=1114111)baseCodepoint=base}let knownKey=kittyKeyMap[codepoint];if(knownKey)key.name=knownKey,key.code=`[${codepoint}u`;else if(codepoint===0)key.name="";else if(codepoint>0&&codepoint<=1114111){let char=String.fromCodePoint(codepoint);if(key.name=char,baseCodepoint)key.baseCode=baseCodepoint}else return null;if(fields[1]){let field2=fields[1].split(":"),modifierStr=field2[0],eventTypeStr=field2[1];if(modifierStr){let modifierMask=parseInt(modifierStr,10);if(!isNaN(modifierMask)&&modifierMask>1){let mods=fromKittyMods(modifierMask-1);key.shift=mods.shift,key.ctrl=mods.ctrl,key.meta=mods.alt||mods.meta,key.option=mods.alt,key.super=mods.super,key.hyper=mods.hyper,key.capsLock=mods.capsLock,key.numLock=mods.numLock}}if(eventTypeStr==="1"||!eventTypeStr)key.eventType="press";else if(eventTypeStr==="2")key.eventType="press",key.repeated=!0;else if(eventTypeStr==="3")key.eventType="release";else key.eventType="press"}if(fields[2]){let codepoints=fields[2].split(":");for(let cpStr of codepoints){let cp3=parseInt(cpStr,10);if(!isNaN(cp3)&&cp3>0&&cp3<=1114111)text+=String.fromCodePoint(cp3)}}if(text===""){if(key.name.length>0&&!kittyKeyMap[codepoint])if(key.shift&&shiftedCodepoint)text=String.fromCodePoint(shiftedCodepoint);else if(key.shift&&key.name.length===1)text=key.name.toLocaleUpperCase();else text=key.name}if(key.name===" "&&key.shift&&!key.ctrl&&!key.meta)text=" ";if(text){if(codepoint===0)key.name=text;key.sequence=text}if(codepoint===0&&text==="")return null;return key}class LinearScrollAccel{tick(_now){return 1}reset(){}}class MacOSScrollAccel{opts;lastTickTime=0;velocityHistory=[];historySize=3;streakTimeout=150;minTickInterval=6;constructor(opts={}){this.opts=opts}tick(now=Date.now()){let A=this.opts.A??0.8,tau=this.opts.tau??3,maxMultiplier=this.opts.maxMultiplier??6,dt=this.lastTickTime?now-this.lastTickTime:1/0;if(dt===1/0||dt>this.streakTimeout)return this.lastTickTime=now,this.velocityHistory=[],1;if(dt<this.minTickInterval)return 1;if(this.lastTickTime=now,this.velocityHistory.push(dt),this.velocityHistory.length>this.historySize)this.velocityHistory.shift();let x=100/(this.velocityHistory.reduce((a,b2)=>a+b2,0)/this.velocityHistory.length)/tau,multiplier=1+A*(Math.exp(x)-1);return Math.min(multiplier,maxMultiplier)}reset(){this.lastTickTime=0,this.velocityHistory=[]}}function parseAlign(value){if(value==null)return Align.Auto;switch(value.toLowerCase()){case"auto":return Align.Auto;case"flex-start":return Align.FlexStart;case"center":return Align.Center;case"flex-end":return Align.FlexEnd;case"stretch":return Align.Stretch;case"baseline":return Align.Baseline;case"space-between":return Align.SpaceBetween;case"space-around":return Align.SpaceAround;case"space-evenly":return Align.SpaceEvenly;default:return Align.Auto}}function parseAlignItems(value){if(value==null)return Align.Stretch;switch(value.toLowerCase()){case"auto":return Align.Auto;case"flex-start":return Align.FlexStart;case"center":return Align.Center;case"flex-end":return Align.FlexEnd;case"stretch":return Align.Stretch;case"baseline":return Align.Baseline;case"space-between":return Align.SpaceBetween;case"space-around":return Align.SpaceAround;case"space-evenly":return Align.SpaceEvenly;default:return Align.Stretch}}function parseBoxSizing(value){if(value==null)return BoxSizing.BorderBox;switch(value.toLowerCase()){case"border-box":return BoxSizing.BorderBox;case"content-box":return BoxSizing.ContentBox;default:return BoxSizing.BorderBox}}function parseDimension(value){if(value==null)return Dimension.Width;switch(value.toLowerCase()){case"width":return Dimension.Width;case"height":return Dimension.Height;default:return Dimension.Width}}function parseDirection(value){if(value==null)return Direction.LTR;switch(value.toLowerCase()){case"inherit":return Direction.Inherit;case"ltr":return Direction.LTR;case"rtl":return Direction.RTL;default:return Direction.LTR}}function parseDisplay(value){if(value==null)return Display.Flex;switch(value.toLowerCase()){case"flex":return Display.Flex;case"none":return Display.None;case"contents":return Display.Contents;default:return Display.Flex}}function parseEdge(value){if(value==null)return Edge.All;switch(value.toLowerCase()){case"left":return Edge.Left;case"top":return Edge.Top;case"right":return Edge.Right;case"bottom":return Edge.Bottom;case"start":return Edge.Start;case"end":return Edge.End;case"horizontal":return Edge.Horizontal;case"vertical":return Edge.Vertical;case"all":return Edge.All;default:return Edge.All}}function parseFlexDirection(value){if(value==null)return FlexDirection.Column;switch(value.toLowerCase()){case"column":return FlexDirection.Column;case"column-reverse":return FlexDirection.ColumnReverse;case"row":return FlexDirection.Row;case"row-reverse":return FlexDirection.RowReverse;default:return FlexDirection.Column}}function parseGutter(value){if(value==null)return Gutter.All;switch(value.toLowerCase()){case"column":return Gutter.Column;case"row":return Gutter.Row;case"all":return Gutter.All;default:return Gutter.All}}function parseJustify(value){if(value==null)return Justify.FlexStart;switch(value.toLowerCase()){case"flex-start":return Justify.FlexStart;case"center":return Justify.Center;case"flex-end":return Justify.FlexEnd;case"space-between":return Justify.SpaceBetween;case"space-around":return Justify.SpaceAround;case"space-evenly":return Justify.SpaceEvenly;default:return Justify.FlexStart}}function parseLogLevel(value){if(value==null)return LogLevel.Info;switch(value.toLowerCase()){case"error":return LogLevel.Error;case"warn":return LogLevel.Warn;case"info":return LogLevel.Info;case"debug":return LogLevel.Debug;case"verbose":return LogLevel.Verbose;case"fatal":return LogLevel.Fatal;default:return LogLevel.Info}}function parseMeasureMode(value){if(value==null)return MeasureMode.Undefined;switch(value.toLowerCase()){case"undefined":return MeasureMode.Undefined;case"exactly":return MeasureMode.Exactly;case"at-most":return MeasureMode.AtMost;default:return MeasureMode.Undefined}}function parseOverflow(value){if(value==null)return Overflow.Visible;switch(value.toLowerCase()){case"visible":return Overflow.Visible;case"hidden":return Overflow.Hidden;case"scroll":return Overflow.Scroll;default:return Overflow.Visible}}function parsePositionType(value){if(value==null)return PositionType.Relative;switch(value.toLowerCase()){case"static":return PositionType.Static;case"relative":return PositionType.Relative;case"absolute":return PositionType.Absolute;default:return PositionType.Static}}function parseUnit(value){if(value==null)return Unit.Point;switch(value.toLowerCase()){case"undefined":return Unit.Undefined;case"point":return Unit.Point;case"percent":return Unit.Percent;case"auto":return Unit.Auto;default:return Unit.Point}}function parseWrap(value){if(value==null)return Wrap.NoWrap;switch(value.toLowerCase()){case"no-wrap":return Wrap.NoWrap;case"wrap":return Wrap.Wrap;case"wrap-reverse":return Wrap.WrapReverse;default:return Wrap.NoWrap}}class SelectionAnchor{renderable;relativeX;relativeY;constructor(renderable,absoluteX,absoluteY){this.renderable=renderable,this.relativeX=absoluteX-this.renderable.x,this.relativeY=absoluteY-this.renderable.y}get x(){return this.renderable.x+this.relativeX}get y(){return this.renderable.y+this.relativeY}}class Selection{_anchor;_focus;_selectedRenderables=[];_touchedRenderables=[];_isActive=!0;_isDragging=!0;_isStart=!1;constructor(anchorRenderable,anchor,focus){this._anchor=new SelectionAnchor(anchorRenderable,anchor.x,anchor.y),this._focus={...focus}}get isStart(){return this._isStart}set isStart(value){this._isStart=value}get anchor(){return{x:this._anchor.x,y:this._anchor.y}}get focus(){return{...this._focus}}set focus(value){this._focus={...value}}get isActive(){return this._isActive}set isActive(value){this._isActive=value}get isDragging(){return this._isDragging}set isDragging(value){this._isDragging=value}get bounds(){let minX=Math.min(this._anchor.x,this._focus.x),maxX=Math.max(this._anchor.x,this._focus.x),minY=Math.min(this._anchor.y,this._focus.y),maxY=Math.max(this._anchor.y,this._focus.y),width=maxX-minX+1,height2=maxY-minY+1;return{x:minX,y:minY,width,height:height2}}updateSelectedRenderables(selectedRenderables){this._selectedRenderables=selectedRenderables}get selectedRenderables(){return this._selectedRenderables}updateTouchedRenderables(touchedRenderables){this._touchedRenderables=touchedRenderables}get touchedRenderables(){return this._touchedRenderables}getSelectedText(){return this._selectedRenderables.sort((a,b2)=>{let aY=a.y,bY=b2.y;if(aY!==bY)return aY-bY;return a.x-b2.x}).filter((renderable)=>!renderable.isDestroyed).map((renderable)=>renderable.getSelectedText()).filter((text)=>text).join(`
3000
3000
  `)}}function convertGlobalToLocalSelection(globalSelection,localX,localY){if(!globalSelection?.isActive)return null;return{anchorX:globalSelection.anchor.x-localX,anchorY:globalSelection.anchor.y-localY,focusX:globalSelection.focus.x-localX,focusY:globalSelection.focus.y-localY,isActive:!0}}class ASCIIFontSelectionHelper{getText;getFont;localSelection=null;constructor(getText,getFont){this.getText=getText,this.getFont=getFont}hasSelection(){return this.localSelection!==null}getSelection(){return this.localSelection}shouldStartSelection(localX,localY,width,height2){if(localX<0||localX>=width||localY<0||localY>=height2)return!1;let text=this.getText(),font=this.getFont(),charIndex=coordinateToCharacterIndex(localX,text,font);return charIndex>=0&&charIndex<=text.length}onLocalSelectionChanged(localSelection,width,height2){let previousSelection=this.localSelection;if(!localSelection?.isActive)return this.localSelection=null,previousSelection!==null;let text=this.getText(),font=this.getFont(),selStart={x:localSelection.anchorX,y:localSelection.anchorY},selEnd={x:localSelection.focusX,y:localSelection.focusY};if(height2-1<selStart.y||0>selEnd.y)return this.localSelection=null,previousSelection!==null;let startCharIndex=0,endCharIndex=text.length;if(selStart.y>height2-1)return this.localSelection=null,previousSelection!==null;else if(selStart.y>=0&&selStart.y<=height2-1){if(selStart.x>0)startCharIndex=coordinateToCharacterIndex(selStart.x,text,font)}if(selEnd.y<0)return this.localSelection=null,previousSelection!==null;else if(selEnd.y>=0&&selEnd.y<=height2-1)if(selEnd.x>=0)endCharIndex=coordinateToCharacterIndex(selEnd.x,text,font);else endCharIndex=0;if(startCharIndex<endCharIndex&&startCharIndex>=0&&endCharIndex<=text.length)this.localSelection={start:startCharIndex,end:endCharIndex};else this.localSelection=null;return previousSelection?.start!==this.localSelection?.start||previousSelection?.end!==this.localSelection?.end}}function singleton(key,factory){let bag=globalThis[singletonCacheSymbol]??={};if(!(key in bag))bag[key]=factory();return bag[key]}function destroySingleton(key){let bag=globalThis[singletonCacheSymbol];if(bag&&key in bag)delete bag[key]}function hasSingleton(key){let bag=globalThis[singletonCacheSymbol];return bag&&key in bag}function registerEnvVar(config){let existing=envRegistry[config.name];if(existing){if(existing.description!==config.description||existing.type!==config.type||existing.default!==config.default)throw Error(`Environment variable "${config.name}" is already registered with different configuration. Existing: ${JSON.stringify(existing)}, New: ${JSON.stringify(config)}`);return}envRegistry[config.name]=config}function normalizeBoolean(value){let lowerValue=value.toLowerCase();return["true","1","on","yes"].includes(lowerValue)}function parseEnvValue(config){let envValue=process.env[config.name];if(envValue===void 0&&config.default!==void 0)return config.default;if(envValue===void 0)throw Error(`Required environment variable ${config.name} is not set. ${config.description}`);switch(config.type){case"boolean":return typeof envValue==="boolean"?envValue:normalizeBoolean(envValue);case"number":let numValue=Number(envValue);if(isNaN(numValue))throw Error(`Environment variable ${config.name} must be a valid number, got: ${envValue}`);return numValue;case"string":default:return envValue}}class EnvStore{parsedValues=new Map;get(key){if(this.parsedValues.has(key))return this.parsedValues.get(key);if(!(key in envRegistry))throw Error(`Environment variable ${key} is not registered.`);try{let value=parseEnvValue(envRegistry[key]);return this.parsedValues.set(key,value),value}catch(error2){throw Error(`Failed to parse env var ${key}: ${error2 instanceof Error?error2.message:String(error2)}`)}}has(key){return key in envRegistry}clearCache(){this.parsedValues.clear()}}function clearEnvCache(){envStore.clearCache()}function generateEnvMarkdown(){let configs=Object.values(envRegistry);if(configs.length===0)return`# Environment Variables
@@ -3022,7 +3022,7 @@ No environment variables registered.
3022
3022
  `}else output+=`\x1B[32mDefault:\x1B[0m \x1B[31mRequired\x1B[0m
3023
3023
  `;output+=`
3024
3024
  `}return output}class ByteQueue{buf;start=0;end=0;constructor(capacity=INITIAL_PENDING_CAPACITY){this.buf=new Uint8Array(capacity)}get length(){return this.end-this.start}get capacity(){return this.buf.length}view(){return this.buf.subarray(this.start,this.end)}take(){let chunk=this.view();return this.start=0,this.end=0,chunk}append(chunk){if(chunk.length===0)return;this.ensureCapacity(this.length+chunk.length),this.buf.set(chunk,this.end),this.end+=chunk.length}consume(count){if(count<=0)return;if(count>=this.length){this.start=0,this.end=0;return}if(this.start+=count,this.start>=this.buf.length/2)this.buf.copyWithin(0,this.start,this.end),this.end-=this.start,this.start=0}clear(){this.start=0,this.end=0}reset(capacity=INITIAL_PENDING_CAPACITY){this.buf=new Uint8Array(capacity),this.start=0,this.end=0}ensureCapacity(requiredLength){let currentLength=this.length;if(requiredLength<=this.buf.length){if(this.buf.length-this.end>=requiredLength-currentLength)return;if(this.buf.copyWithin(0,this.start,this.end),this.end=currentLength,this.start=0,requiredLength<=this.buf.length)return}let nextCapacity=this.buf.length;while(nextCapacity<requiredLength)nextCapacity*=2;let next=new Uint8Array(nextCapacity);next.set(this.view(),0),this.buf=next,this.start=0,this.end=currentLength}}function normalizePositiveOption(value,fallback){if(typeof value!=="number"||!Number.isFinite(value)||value<=0)return fallback;return Math.floor(value)}function utf8SequenceLength(first){if(first<128)return 1;if(first>=194&&first<=223)return 2;if(first>=224&&first<=239)return 3;if(first>=240&&first<=244)return 4;return 0}function bytesEqual(left,right){if(left.length!==right.length)return!1;for(let index=0;index<left.length;index+=1)if(left[index]!==right[index])return!1;return!0}function isMouseSgrSequence(sequence){if(sequence.length<7)return!1;if(sequence[0]!==ESC||sequence[1]!==91||sequence[2]!==60)return!1;let final=sequence[sequence.length-1];if(final!==77&&final!==109)return!1;let part=0,hasDigit=!1;for(let index=3;index<sequence.length-1;index+=1){let byte=sequence[index];if(byte>=48&&byte<=57){hasDigit=!0;continue}if(byte===59&&hasDigit&&part<2){part+=1,hasDigit=!1;continue}return!1}return part===2&&hasDigit}function isAsciiDigit(byte){return byte>=48&&byte<=57}function parsePositiveDecimalPrefix(sequence,start3,endExclusive){if(start3>=endExclusive)return null;let value=0,sawDigit=!1;for(let index=start3;index<endExclusive;index+=1){let byte=sequence[index];if(!isAsciiDigit(byte))return null;sawDigit=!0,value=value*10+(byte-48)}return sawDigit?value:null}function parseKittyFirstFieldCodepoint(sequence,start3,endExclusive){if(start3>=endExclusive)return null;let firstColon=-1;for(let index=start3;index<endExclusive;index+=1)if(sequence[index]===58){firstColon=index;break}if(firstColon===-1)return null;let codepoint=parsePositiveDecimalPrefix(sequence,start3,firstColon);if(codepoint===null)return null;for(let index=firstColon+1;index<endExclusive;index+=1){let byte=sequence[index];if(byte!==58&&!isAsciiDigit(byte))return null}return codepoint}function canStillBeKittyU(state){return state.semicolons>=1}function canStillBeKittySpecial(state){return state.semicolons===1&&state.segments>1}function canStillBeExplicitWidthCpr(state){return state.firstParamValue===1&&state.semicolons===1}function canStillBeStartupCursorCpr(state){return state.semicolons===1}function canStillBePixelResolution(state){return state.firstParamValue===4&&state.semicolons===2}function canDeferParametricCsi(state,context){return context.kittyKeyboardEnabled&&(canStillBeKittyU(state)||canStillBeKittySpecial(state))||context.explicitWidthCprActive&&canStillBeExplicitWidthCpr(state)||context.startupCursorCprActive&&canStillBeStartupCursorCpr(state)||context.pixelResolutionQueryActive&&canStillBePixelResolution(state)}function canCompleteDeferredParametricCsi(state,byte,context){if(context.kittyKeyboardEnabled){if(state.hasDigit&&byte===117)return!0;if(state.hasDigit&&state.semicolons===1&&state.segments>1&&(byte===126||byte>=65&&byte<=90))return!0}if(context.explicitWidthCprActive&&state.hasDigit&&state.firstParamValue===1&&state.semicolons===1&&byte===82)return!0;if(context.startupCursorCprActive&&state.hasDigit&&state.semicolons===1&&byte===82)return!0;if(context.pixelResolutionQueryActive&&state.hasDigit&&state.firstParamValue===4&&state.semicolons===2&&byte===116)return!0;return!1}function classifyParametricCsiProtocol(state,finalByte){if(finalByte===82&&state.semicolons===1&&state.segments===1&&state.hasDigit)return"cpr";return"csi"}function canDeferPrivateReplyCsi(context){return context.privateCapabilityRepliesActive}function canCompleteDeferredPrivateReplyCsi(state,byte,context){if(!context.privateCapabilityRepliesActive)return!1;if(state.sawDollar)return state.hasDigit&&byte===121;if(byte===99)return state.hasDigit||state.semicolons>0;if(byte===110)return state.hasDigit;return state.hasDigit&&byte===117}function concatBytes(left,right){if(left.length===0)return right;if(right.length===0)return left;let combined=new Uint8Array(left.length+right.length);return combined.set(left,0),combined.set(right,left.length),combined}function indexOfBytes(haystack,needle){if(needle.length===0)return 0;let limit=haystack.length-needle.length;for(let offset=0;offset<=limit;offset+=1){let matched=!0;for(let index=0;index<needle.length;index+=1)if(haystack[offset+index]!==needle[index]){matched=!1;break}if(matched)return offset}return-1}function decodeLatin1(bytes){return Buffer3.from(bytes.buffer,bytes.byteOffset,bytes.byteLength).toString("latin1")}function decodeUtf8(bytes){return KEY_DECODER.decode(bytes)}function createPasteCollector(){return{tail:EMPTY_BYTES,parts:[],totalLength:0}}function joinPasteBytes(parts,totalLength){if(totalLength===0)return EMPTY_BYTES;if(parts.length===1)return parts[0];let bytes=new Uint8Array(totalLength),offset=0;for(let part of parts)bytes.set(part,offset),offset+=part.length;return bytes}class StdinParser{pending=new ByteQueue(INITIAL_PENDING_CAPACITY);events=[];timeoutMs;maxPendingBytes;armTimeouts;onTimeoutFlush;useKittyKeyboard;mouseParser=new MouseParser;clock;protocolContext;timeoutId=null;destroyed=!1;pendingSinceMs=null;forceFlush=!1;justFlushedEsc=!1;state={tag:"ground"};cursor=0;unitStart=0;paste=null;constructor(options={}){this.timeoutMs=normalizePositiveOption(options.timeoutMs,DEFAULT_TIMEOUT_MS),this.maxPendingBytes=normalizePositiveOption(options.maxPendingBytes,DEFAULT_MAX_PENDING_BYTES),this.armTimeouts=options.armTimeouts??!0,this.onTimeoutFlush=options.onTimeoutFlush??null,this.useKittyKeyboard=options.useKittyKeyboard??!0,this.clock=options.clock??SYSTEM_CLOCK,this.protocolContext={...DEFAULT_PROTOCOL_CONTEXT,kittyKeyboardEnabled:options.protocolContext?.kittyKeyboardEnabled??!1,privateCapabilityRepliesActive:options.protocolContext?.privateCapabilityRepliesActive??!1,pixelResolutionQueryActive:options.protocolContext?.pixelResolutionQueryActive??!1,explicitWidthCprActive:options.protocolContext?.explicitWidthCprActive??!1,startupCursorCprActive:options.protocolContext?.startupCursorCprActive??!1}}get bufferCapacity(){return this.pending.capacity}updateProtocolContext(patch){this.ensureAlive(),this.protocolContext={...this.protocolContext,...patch},this.reconcileDeferredStateWithProtocolContext(),this.reconcileTimeoutState()}push(data){if(this.ensureAlive(),data.length===0){this.emitKeyOrResponse("unknown","");return}let remainder=data;while(remainder.length>0){if(this.paste){remainder=this.consumePasteBytes(remainder);continue}let immediatePasteStartIndex=this.state.tag==="ground"&&this.pending.length===0?indexOfBytes(remainder,BRACKETED_PASTE_START):-1,appendEnd=immediatePasteStartIndex===-1?remainder.length:immediatePasteStartIndex+BRACKETED_PASTE_START.length;if(this.pending.append(remainder.subarray(0,appendEnd)),remainder=remainder.subarray(appendEnd),this.scanPending(),this.paste&&this.pending.length>0){remainder=this.consumePasteBytes(this.takePendingBytes());continue}if(!this.paste&&this.pending.length>this.maxPendingBytes){if(this.flushPendingOverflow(),this.scanPending(),this.paste&&this.pending.length>0)remainder=this.consumePasteBytes(this.takePendingBytes())}}this.reconcileTimeoutState()}read(){if(this.ensureAlive(),this.events.length===0&&this.forceFlush)this.scanPending(),this.reconcileTimeoutState();return this.events.shift()??null}drain(onEvent){this.ensureAlive();while(!0){if(this.destroyed)return;let event=this.read();if(!event)return;onEvent(event)}}flushTimeout(nowMsValue=this.clock.now()){if(this.ensureAlive(),this.pendingSinceMs!==null&&(nowMsValue<this.pendingSinceMs||nowMsValue-this.pendingSinceMs<this.timeoutMs))return;this.tryForceFlush()}tryForceFlush(){if(this.paste||this.pendingSinceMs===null||this.pending.length===0)return;this.forceFlush=!0}reset(){if(this.destroyed)return;this.clearTimeout(),this.resetState()}resetMouseState(){this.ensureAlive(),this.mouseParser.reset()}destroy(){if(this.destroyed)return;this.clearTimeout(),this.destroyed=!0,this.resetState()}ensureAlive(){if(this.destroyed)throw Error("StdinParser has been destroyed")}scanPending(){while(!this.paste){let bytes=this.pending.view();if(this.state.tag==="ground"&&this.cursor>=bytes.length){this.pending.clear(),this.cursor=0,this.unitStart=0,this.pendingSinceMs=null,this.forceFlush=!1;return}let byte=this.cursor<bytes.length?bytes[this.cursor]:-1;switch(this.state.tag){case"ground":{if(this.unitStart=this.cursor,this.justFlushedEsc){if(byte===91){this.justFlushedEsc=!1,this.cursor+=1,this.state={tag:"esc_recovery"};continue}this.justFlushedEsc=!1}if(byte===ESC){this.cursor+=1,this.state={tag:"esc"};continue}if(byte<128){this.emitKeyOrResponse("unknown",decodeUtf8(bytes.subarray(this.cursor,this.cursor+1))),this.consumePrefix(this.cursor+1);continue}let expected=utf8SequenceLength(byte);if(expected===0){if(!this.forceFlush&&this.cursor+1===bytes.length){this.markPending();return}this.emitLegacyHighByte(byte),this.consumePrefix(this.cursor+1);continue}this.cursor+=1,this.state={tag:"utf8",expected,seen:1};continue}case"utf8":{if(this.cursor>=bytes.length){if(!this.forceFlush){this.markPending();return}this.emitLegacyHighByte(bytes[this.unitStart]),this.state={tag:"ground"},this.consumePrefix(this.unitStart+1);continue}if((byte&192)!==128){this.emitLegacyHighByte(bytes[this.unitStart]),this.state={tag:"ground"},this.consumePrefix(this.unitStart+1);continue}let nextSeen=this.state.seen+1;if(this.cursor+=1,nextSeen<this.state.expected){this.state={tag:"utf8",expected:this.state.expected,seen:nextSeen};continue}this.emitKeyOrResponse("unknown",decodeUtf8(bytes.subarray(this.unitStart,this.cursor))),this.state={tag:"ground"},this.consumePrefix(this.cursor);continue}case"esc":{if(this.cursor>=bytes.length){if(!this.forceFlush){this.markPending();return}let flushedLoneEsc=this.cursor===this.unitStart+1&&bytes[this.unitStart]===ESC;this.emitKeyOrResponse("unknown",decodeUtf8(bytes.subarray(this.unitStart,this.cursor))),this.justFlushedEsc=flushedLoneEsc,this.state={tag:"ground"},this.consumePrefix(this.cursor);continue}switch(byte){case 91:this.cursor+=1,this.state={tag:"csi"};continue;case 79:this.cursor+=1,this.state={tag:"ss3"};continue;case 93:this.cursor+=1,this.state={tag:"osc",sawEsc:!1};continue;case 80:this.cursor+=1,this.state={tag:"dcs",sawEsc:!1};continue;case 95:this.cursor+=1,this.state={tag:"apc",sawEsc:!1};continue;case ESC:this.cursor+=1;continue;default:this.cursor+=1,this.emitKeyOrResponse("unknown",decodeUtf8(bytes.subarray(this.unitStart,this.cursor))),this.state={tag:"ground"},this.consumePrefix(this.cursor);continue}}case"ss3":{if(this.cursor>=bytes.length){if(!this.forceFlush){this.markPending();return}this.emitOpaqueResponse("unknown",bytes.subarray(this.unitStart,this.cursor)),this.state={tag:"ground"},this.consumePrefix(this.cursor);continue}if(byte===ESC){this.emitOpaqueResponse("unknown",bytes.subarray(this.unitStart,this.cursor)),this.state={tag:"ground"},this.consumePrefix(this.cursor);continue}this.cursor+=1,this.emitKeyOrResponse("unknown",decodeUtf8(bytes.subarray(this.unitStart,this.cursor))),this.state={tag:"ground"},this.consumePrefix(this.cursor);continue}case"esc_recovery":{if(this.cursor>=bytes.length){if(!this.forceFlush){this.markPending();return}this.emitKeyOrResponse("unknown",decodeUtf8(bytes.subarray(this.unitStart,this.cursor))),this.state={tag:"ground"},this.consumePrefix(this.cursor);continue}if(byte===60){this.cursor+=1,this.state={tag:"esc_less_mouse"};continue}if(byte===77){this.cursor+=1,this.state={tag:"esc_less_x10_mouse"};continue}this.emitKeyOrResponse("unknown",decodeUtf8(bytes.subarray(this.unitStart,this.unitStart+1))),this.state={tag:"ground"},this.consumePrefix(this.unitStart+1);continue}case"csi":{if(this.cursor>=bytes.length){if(!this.forceFlush){this.markPending();return}this.emitOpaqueResponse("unknown",bytes.subarray(this.unitStart,this.cursor)),this.state={tag:"ground"},this.consumePrefix(this.cursor);continue}if(byte===ESC){this.emitOpaqueResponse("unknown",bytes.subarray(this.unitStart,this.cursor)),this.state={tag:"ground"},this.consumePrefix(this.cursor);continue}if(byte===77&&this.cursor===this.unitStart+2){let end=this.cursor+4;if(bytes.length<end){if(!this.forceFlush){this.markPending();return}this.emitOpaqueResponse("unknown",bytes.subarray(this.unitStart,bytes.length)),this.state={tag:"ground"},this.consumePrefix(bytes.length);continue}this.emitMouse(bytes.subarray(this.unitStart,end),"x10"),this.state={tag:"ground"},this.consumePrefix(end);continue}if(byte===36){let candidateEnd=this.cursor+1,candidate=decodeUtf8(bytes.subarray(this.unitStart,candidateEnd));if(RXVT_DOLLAR_CSI_RE.test(candidate)){this.emitKeyOrResponse("csi",candidate),this.state={tag:"ground"},this.consumePrefix(candidateEnd);continue}if(!this.forceFlush&&candidateEnd>=bytes.length){this.markPending();return}}if(byte===60&&this.cursor===this.unitStart+2){this.cursor+=1,this.state={tag:"csi_sgr_mouse",part:0,hasDigit:!1};continue}if(byte===91&&this.cursor===this.unitStart+2){this.cursor+=1;continue}if(byte===63&&this.cursor===this.unitStart+2){this.cursor+=1,this.state={tag:"csi_private_reply",semicolons:0,hasDigit:!1,sawDollar:!1};continue}if(byte===59){let firstParamStart=this.unitStart+2,firstParamEnd=this.cursor,firstParamValue=parsePositiveDecimalPrefix(bytes,firstParamStart,firstParamEnd);if(firstParamValue===null&&this.protocolContext.kittyKeyboardEnabled)firstParamValue=parseKittyFirstFieldCodepoint(bytes,firstParamStart,firstParamEnd);if(firstParamValue!==null){this.cursor+=1,this.state={tag:"csi_parametric",semicolons:1,segments:1,hasDigit:!1,firstParamValue};continue}}if(byte>=64&&byte<=126){let end=this.cursor+1,rawBytes=bytes.subarray(this.unitStart,end);if(bytesEqual(rawBytes,BRACKETED_PASTE_START)){this.state={tag:"ground"},this.consumePrefix(end),this.paste=createPasteCollector();continue}if(isMouseSgrSequence(rawBytes)){this.emitMouse(rawBytes,"sgr"),this.state={tag:"ground"},this.consumePrefix(end);continue}this.emitKeyOrResponse("csi",decodeUtf8(rawBytes)),this.state={tag:"ground"},this.consumePrefix(end);continue}this.cursor+=1;continue}case"csi_sgr_mouse":{if(this.cursor>=bytes.length){if(!this.forceFlush){this.markPending();return}this.state={tag:"csi_sgr_mouse_deferred",part:this.state.part,hasDigit:this.state.hasDigit},this.pendingSinceMs=null,this.forceFlush=!1;return}if(byte===ESC){this.emitOpaqueResponse("unknown",bytes.subarray(this.unitStart,this.cursor)),this.state={tag:"ground"},this.consumePrefix(this.cursor);continue}if(isAsciiDigit(byte)){this.cursor+=1,this.state={tag:"csi_sgr_mouse",part:this.state.part,hasDigit:!0};continue}if(byte===59&&this.state.hasDigit&&this.state.part<2){this.cursor+=1,this.state={tag:"csi_sgr_mouse",part:this.state.part+1,hasDigit:!1};continue}if(byte>=64&&byte<=126){let end=this.cursor+1,rawBytes=bytes.subarray(this.unitStart,end);if(isMouseSgrSequence(rawBytes))this.emitMouse(rawBytes,"sgr");else this.emitKeyOrResponse("csi",decodeUtf8(rawBytes));this.state={tag:"ground"},this.consumePrefix(end);continue}this.state={tag:"csi"};continue}case"csi_sgr_mouse_deferred":{if(this.cursor>=bytes.length){this.pendingSinceMs=null,this.forceFlush=!1;return}if(byte===ESC){this.emitOpaqueResponse("unknown",bytes.subarray(this.unitStart,this.cursor)),this.state={tag:"ground"},this.consumePrefix(this.cursor);continue}if(isAsciiDigit(byte)||byte===59||byte===77||byte===109){this.state={tag:"csi_sgr_mouse",part:this.state.part,hasDigit:this.state.hasDigit};continue}this.emitOpaqueResponse("unknown",bytes.subarray(this.unitStart,this.cursor)),this.state={tag:"ground"},this.consumePrefix(this.cursor);continue}case"csi_parametric":{if(this.cursor>=bytes.length){if(!this.forceFlush){this.markPending();return}if(canDeferParametricCsi(this.state,this.protocolContext)){this.state={tag:"csi_parametric_deferred",semicolons:this.state.semicolons,segments:this.state.segments,hasDigit:this.state.hasDigit,firstParamValue:this.state.firstParamValue},this.pendingSinceMs=null,this.forceFlush=!1;return}this.emitOpaqueResponse("unknown",bytes.subarray(this.unitStart,this.cursor)),this.state={tag:"ground"},this.consumePrefix(this.cursor);continue}if(byte===ESC){this.emitOpaqueResponse("unknown",bytes.subarray(this.unitStart,this.cursor)),this.state={tag:"ground"},this.consumePrefix(this.cursor);continue}if(isAsciiDigit(byte)){this.cursor+=1,this.state={tag:"csi_parametric",semicolons:this.state.semicolons,segments:this.state.segments,hasDigit:!0,firstParamValue:this.state.firstParamValue};continue}if(byte===58&&this.state.hasDigit&&this.state.segments<3){this.cursor+=1,this.state={tag:"csi_parametric",semicolons:this.state.semicolons,segments:this.state.segments+1,hasDigit:!1,firstParamValue:this.state.firstParamValue};continue}if(byte===59&&this.state.semicolons<2){this.cursor+=1,this.state={tag:"csi_parametric",semicolons:this.state.semicolons+1,segments:1,hasDigit:!1,firstParamValue:this.state.firstParamValue};continue}if(byte>=64&&byte<=126){let end=this.cursor+1,protocol=classifyParametricCsiProtocol(this.state,byte);this.emitKeyOrResponse(protocol,decodeUtf8(bytes.subarray(this.unitStart,end))),this.state={tag:"ground"},this.consumePrefix(end);continue}this.state={tag:"csi"};continue}case"csi_parametric_deferred":{if(this.cursor>=bytes.length){this.pendingSinceMs=null,this.forceFlush=!1;return}if(byte===ESC){this.emitOpaqueResponse("unknown",bytes.subarray(this.unitStart,this.cursor)),this.state={tag:"ground"},this.consumePrefix(this.cursor);continue}if(isAsciiDigit(byte)||byte===58||byte===59){this.state={tag:"csi_parametric",semicolons:this.state.semicolons,segments:this.state.segments,hasDigit:this.state.hasDigit,firstParamValue:this.state.firstParamValue};continue}if(canCompleteDeferredParametricCsi(this.state,byte,this.protocolContext)){this.state={tag:"csi_parametric",semicolons:this.state.semicolons,segments:this.state.segments,hasDigit:this.state.hasDigit,firstParamValue:this.state.firstParamValue};continue}this.emitOpaqueResponse("unknown",bytes.subarray(this.unitStart,this.cursor)),this.state={tag:"ground"},this.consumePrefix(this.cursor);continue}case"csi_private_reply":{if(this.cursor>=bytes.length){if(!this.forceFlush){this.markPending();return}if(canDeferPrivateReplyCsi(this.protocolContext)){this.state={tag:"csi_private_reply_deferred",semicolons:this.state.semicolons,hasDigit:this.state.hasDigit,sawDollar:this.state.sawDollar},this.pendingSinceMs=null,this.forceFlush=!1;return}this.emitOpaqueResponse("unknown",bytes.subarray(this.unitStart,this.cursor)),this.state={tag:"ground"},this.consumePrefix(this.cursor);continue}if(byte===ESC){this.emitOpaqueResponse("unknown",bytes.subarray(this.unitStart,this.cursor)),this.state={tag:"ground"},this.consumePrefix(this.cursor);continue}if(isAsciiDigit(byte)){this.cursor+=1,this.state={tag:"csi_private_reply",semicolons:this.state.semicolons,hasDigit:!0,sawDollar:this.state.sawDollar};continue}if(byte===59){this.cursor+=1,this.state={tag:"csi_private_reply",semicolons:this.state.semicolons+1,hasDigit:!1,sawDollar:!1};continue}if(byte===36&&this.state.hasDigit&&!this.state.sawDollar){this.cursor+=1,this.state={tag:"csi_private_reply",semicolons:this.state.semicolons,hasDigit:!0,sawDollar:!0};continue}if(byte>=64&&byte<=126){let end=this.cursor+1;this.emitOpaqueResponse("csi",bytes.subarray(this.unitStart,end)),this.state={tag:"ground"},this.consumePrefix(end);continue}this.state={tag:"csi"};continue}case"csi_private_reply_deferred":{if(this.cursor>=bytes.length){this.pendingSinceMs=null,this.forceFlush=!1;return}if(byte===ESC){this.emitOpaqueResponse("unknown",bytes.subarray(this.unitStart,this.cursor)),this.state={tag:"ground"},this.consumePrefix(this.cursor);continue}if(isAsciiDigit(byte)||byte===59||byte===36){this.state={tag:"csi_private_reply",semicolons:this.state.semicolons,hasDigit:this.state.hasDigit,sawDollar:this.state.sawDollar};continue}if(canCompleteDeferredPrivateReplyCsi(this.state,byte,this.protocolContext)){this.state={tag:"csi_private_reply",semicolons:this.state.semicolons,hasDigit:this.state.hasDigit,sawDollar:this.state.sawDollar};continue}this.emitOpaqueResponse("unknown",bytes.subarray(this.unitStart,this.cursor)),this.state={tag:"ground"},this.consumePrefix(this.cursor);continue}case"osc":{if(this.cursor>=bytes.length){if(!this.forceFlush){this.markPending();return}this.emitOpaqueResponse("unknown",bytes.subarray(this.unitStart,this.cursor)),this.state={tag:"ground"},this.consumePrefix(this.cursor);continue}if(this.state.sawEsc){if(byte===92){let end=this.cursor+1;this.emitOpaqueResponse("osc",bytes.subarray(this.unitStart,end)),this.state={tag:"ground"},this.consumePrefix(end);continue}this.state={tag:"osc",sawEsc:!1};continue}if(byte===BEL){let end=this.cursor+1;this.emitOpaqueResponse("osc",bytes.subarray(this.unitStart,end)),this.state={tag:"ground"},this.consumePrefix(end);continue}if(byte===ESC){this.cursor+=1,this.state={tag:"osc",sawEsc:!0};continue}this.cursor+=1;continue}case"dcs":{if(this.cursor>=bytes.length){if(!this.forceFlush){this.markPending();return}this.emitOpaqueResponse("unknown",bytes.subarray(this.unitStart,this.cursor)),this.state={tag:"ground"},this.consumePrefix(this.cursor);continue}if(this.state.sawEsc){if(byte===92){let end=this.cursor+1;this.emitOpaqueResponse("dcs",bytes.subarray(this.unitStart,end)),this.state={tag:"ground"},this.consumePrefix(end);continue}this.state={tag:"dcs",sawEsc:!1};continue}if(byte===ESC){this.cursor+=1,this.state={tag:"dcs",sawEsc:!0};continue}this.cursor+=1;continue}case"apc":{if(this.cursor>=bytes.length){if(!this.forceFlush){this.markPending();return}this.emitOpaqueResponse("unknown",bytes.subarray(this.unitStart,this.cursor)),this.state={tag:"ground"},this.consumePrefix(this.cursor);continue}if(this.state.sawEsc){if(byte===92){let end=this.cursor+1;this.emitOpaqueResponse("apc",bytes.subarray(this.unitStart,end)),this.state={tag:"ground"},this.consumePrefix(end);continue}this.state={tag:"apc",sawEsc:!1};continue}if(byte===ESC){this.cursor+=1,this.state={tag:"apc",sawEsc:!0};continue}this.cursor+=1;continue}case"esc_less_mouse":{if(this.cursor>=bytes.length){if(!this.forceFlush){this.markPending();return}this.emitOpaqueResponse("unknown",bytes.subarray(this.unitStart,this.cursor)),this.state={tag:"ground"},this.consumePrefix(this.cursor);continue}if(byte>=48&&byte<=57||byte===59){this.cursor+=1;continue}if(byte===77||byte===109){let end=this.cursor+1;this.emitOpaqueResponse("unknown",bytes.subarray(this.unitStart,end)),this.state={tag:"ground"},this.consumePrefix(end);continue}this.emitOpaqueResponse("unknown",bytes.subarray(this.unitStart,this.cursor)),this.state={tag:"ground"},this.consumePrefix(this.cursor);continue}case"esc_less_x10_mouse":{let end=this.unitStart+5;if(bytes.length<end){if(!this.forceFlush){this.markPending();return}this.emitOpaqueResponse("unknown",bytes.subarray(this.unitStart,bytes.length)),this.state={tag:"ground"},this.consumePrefix(bytes.length);continue}this.emitOpaqueResponse("unknown",bytes.subarray(this.unitStart,end)),this.state={tag:"ground"},this.consumePrefix(end);continue}}}}emitKeyOrResponse(protocol,raw){let parsed=parseKeypress(raw,{useKittyKeyboard:this.useKittyKeyboard});if(parsed){this.events.push({type:"key",raw:parsed.raw,key:parsed});return}this.events.push({type:"response",protocol,sequence:raw})}emitMouse(rawBytes,encoding){let event=this.mouseParser.parseMouseEvent(rawBytes);if(!event){this.emitOpaqueResponse("unknown",rawBytes);return}this.events.push({type:"mouse",raw:decodeLatin1(rawBytes),encoding,event})}emitLegacyHighByte(byte){let parsed=parseKeypress(Buffer3.from([byte]),{useKittyKeyboard:this.useKittyKeyboard});if(parsed){this.events.push({type:"key",raw:parsed.raw,key:parsed});return}this.events.push({type:"response",protocol:"unknown",sequence:String.fromCharCode(byte)})}emitOpaqueResponse(protocol,rawBytes){this.events.push({type:"response",protocol,sequence:decodeLatin1(rawBytes)})}consumePrefix(endExclusive){this.pending.consume(endExclusive),this.cursor=0,this.unitStart=0,this.pendingSinceMs=null,this.forceFlush=!1}takePendingBytes(){let buffered=this.pending.take();return this.cursor=0,this.unitStart=0,this.pendingSinceMs=null,this.forceFlush=!1,buffered}flushPendingOverflow(){if(this.pending.length===0)return;this.emitOpaqueResponse("unknown",this.pending.view()),this.pending.clear(),this.cursor=0,this.unitStart=0,this.pendingSinceMs=null,this.forceFlush=!1,this.state={tag:"ground"}}markPending(){this.pendingSinceMs=this.clock.now()}consumePasteBytes(chunk){let paste=this.paste,combined=concatBytes(paste.tail,chunk),endIndex=indexOfBytes(combined,BRACKETED_PASTE_END);if(endIndex!==-1)return this.pushPasteBytes(combined.subarray(0,endIndex)),this.events.push({type:"paste",bytes:joinPasteBytes(paste.parts,paste.totalLength)}),this.paste=null,combined.subarray(endIndex+BRACKETED_PASTE_END.length);let keep=Math.min(BRACKETED_PASTE_END.length-1,combined.length),stableLength=combined.length-keep;if(stableLength>0)this.pushPasteBytes(combined.subarray(0,stableLength));return paste.tail=Uint8Array.from(combined.subarray(stableLength)),EMPTY_BYTES}pushPasteBytes(bytes){if(bytes.length===0)return;this.paste.parts.push(Uint8Array.from(bytes)),this.paste.totalLength+=bytes.length}reconcileDeferredStateWithProtocolContext(){switch(this.state.tag){case"csi_parametric_deferred":if(!canDeferParametricCsi(this.state,this.protocolContext))this.emitOpaqueResponse("unknown",this.pending.view().subarray(this.unitStart,this.cursor)),this.state={tag:"ground"},this.consumePrefix(this.cursor);return;case"csi_private_reply_deferred":if(!canDeferPrivateReplyCsi(this.protocolContext))this.emitOpaqueResponse("unknown",this.pending.view().subarray(this.unitStart,this.cursor)),this.state={tag:"ground"},this.consumePrefix(this.cursor);return}}reconcileTimeoutState(){if(!this.armTimeouts)return;if(this.paste||this.pendingSinceMs===null||this.pending.length===0){this.clearTimeout();return}this.clearTimeout(),this.timeoutId=this.clock.setTimeout(()=>{if(this.timeoutId=null,this.destroyed)return;try{this.tryForceFlush(),this.onTimeoutFlush?.()}catch(error2){console.error("stdin parser timeout flush failed",error2)}},this.timeoutMs)}clearTimeout(){if(!this.timeoutId)return;this.clock.clearTimeout(this.timeoutId),this.timeoutId=null}resetState(){this.pending.reset(INITIAL_PENDING_CAPACITY),this.events.length=0,this.pendingSinceMs=null,this.forceFlush=!1,this.justFlushedEsc=!1,this.state={tag:"ground"},this.cursor=0,this.unitStart=0,this.paste=null,this.mouseParser.reset()}}function getSpecificity(group){return group.split(".").length}function shouldSuppressInInjection(group,meta){if(meta?.isInjection)return!1;return group==="markup.raw.block"}function treeSitterToTextChunks(content,highlights,syntaxStyle,options){let chunks=[],defaultStyle=syntaxStyle.getStyle("default"),concealEnabled=options?.enabled??!0,injectionContainerRanges=[],boundaries=[];for(let i2=0;i2<highlights.length;i2++){let[start3,end,,meta]=highlights[i2];if(start3===end)continue;if(meta?.containsInjection)injectionContainerRanges.push({start:start3,end});boundaries.push({offset:start3,type:"start",highlightIndex:i2}),boundaries.push({offset:end,type:"end",highlightIndex:i2})}boundaries.sort((a,b2)=>{if(a.offset!==b2.offset)return a.offset-b2.offset;if(a.type==="end"&&b2.type==="start")return-1;if(a.type==="start"&&b2.type==="end")return 1;return 0});let activeHighlights=new Set,currentOffset=0;for(let i2=0;i2<boundaries.length;i2++){let boundary=boundaries[i2];if(currentOffset<boundary.offset&&activeHighlights.size>0){let segmentText=content.slice(currentOffset,boundary.offset),activeGroups=[];for(let idx of activeHighlights){let[,,group,meta]=highlights[idx];activeGroups.push({group,meta,index:idx})}let concealHighlight=concealEnabled?activeGroups.find((h)=>h.meta?.conceal!==void 0||h.group==="conceal"||h.group.startsWith("conceal.")):void 0;if(concealHighlight){let replacementText="";if(concealHighlight.meta?.conceal!==void 0)replacementText=concealHighlight.meta.conceal;else if(concealHighlight.group==="conceal.with.space")replacementText=" ";if(replacementText)chunks.push({__isChunk:!0,text:replacementText,fg:defaultStyle?.fg,bg:defaultStyle?.bg,attributes:defaultStyle?createTextAttributes({bold:defaultStyle.bold,italic:defaultStyle.italic,underline:defaultStyle.underline,dim:defaultStyle.dim}):0})}else{let insideInjectionContainer=injectionContainerRanges.some((range)=>currentOffset>=range.start&&currentOffset<range.end),sortedGroups=activeGroups.filter((h)=>{if(insideInjectionContainer&&shouldSuppressInInjection(h.group,h.meta))return!1;return!0}).sort((a,b2)=>{let aSpec=getSpecificity(a.group),bSpec=getSpecificity(b2.group);if(aSpec!==bSpec)return aSpec-bSpec;return a.index-b2.index}),mergedStyle={};for(let{group}of sortedGroups){let styleForGroup=syntaxStyle.getStyle(group);if(!styleForGroup&&group.includes(".")){let baseName=group.split(".")[0];styleForGroup=syntaxStyle.getStyle(baseName)}if(styleForGroup){if(styleForGroup.fg!==void 0)mergedStyle.fg=styleForGroup.fg;if(styleForGroup.bg!==void 0)mergedStyle.bg=styleForGroup.bg;if(styleForGroup.bold!==void 0)mergedStyle.bold=styleForGroup.bold;if(styleForGroup.italic!==void 0)mergedStyle.italic=styleForGroup.italic;if(styleForGroup.underline!==void 0)mergedStyle.underline=styleForGroup.underline;if(styleForGroup.dim!==void 0)mergedStyle.dim=styleForGroup.dim}else if(group.includes(".")){let baseName=group.split(".")[0];if(env.OTUI_TS_STYLE_WARN)console.warn(`Syntax style not found for group "${group}" or base scope "${baseName}", using default style`)}else if(env.OTUI_TS_STYLE_WARN)console.warn(`Syntax style not found for group "${group}", using default style`)}let finalStyle=Object.keys(mergedStyle).length>0?mergedStyle:defaultStyle;chunks.push({__isChunk:!0,text:segmentText,fg:finalStyle?.fg,bg:finalStyle?.bg,attributes:finalStyle?createTextAttributes({bold:finalStyle.bold,italic:finalStyle.italic,underline:finalStyle.underline,dim:finalStyle.dim}):0})}}else if(currentOffset<boundary.offset){let text=content.slice(currentOffset,boundary.offset);chunks.push({__isChunk:!0,text,fg:defaultStyle?.fg,bg:defaultStyle?.bg,attributes:defaultStyle?createTextAttributes({bold:defaultStyle.bold,italic:defaultStyle.italic,underline:defaultStyle.underline,dim:defaultStyle.dim}):0})}if(boundary.type==="start")activeHighlights.add(boundary.highlightIndex);else if(activeHighlights.delete(boundary.highlightIndex),concealEnabled){let[,,group,meta]=highlights[boundary.highlightIndex];if(meta?.concealLines!==void 0){if(boundary.offset<content.length&&content[boundary.offset]===`
3025
- `){currentOffset=boundary.offset+1;continue}}if(meta?.conceal!==void 0){if(meta.conceal===" "){if(boundary.offset<content.length&&content[boundary.offset]===" "){currentOffset=boundary.offset+1;continue}}else if(meta.conceal===""&&group==="conceal"&&!meta.isInjection){if(boundary.offset<content.length&&content[boundary.offset]===" "){currentOffset=boundary.offset+1;continue}}}}currentOffset=boundary.offset}if(currentOffset<content.length){let text=content.slice(currentOffset);chunks.push({__isChunk:!0,text,fg:defaultStyle?.fg,bg:defaultStyle?.bg,attributes:defaultStyle?createTextAttributes({bold:defaultStyle.bold,italic:defaultStyle.italic,underline:defaultStyle.underline,dim:defaultStyle.dim}):0})}return chunks}async function treeSitterToStyledText(content,filetype,syntaxStyle,client,options){let result2=await client.highlightOnce(content,filetype);if(result2.highlights&&result2.highlights.length>0){let chunks=treeSitterToTextChunks(content,result2.highlights,syntaxStyle,options?.conceal);return new StyledText(chunks)}else{let defaultStyle=syntaxStyle.mergeStyles("default"),chunks=[{__isChunk:!0,text:content,fg:defaultStyle.fg,bg:defaultStyle.bg,attributes:defaultStyle.attributes}];return new StyledText(chunks)}}class DebounceController{scopeId;constructor(scopeId){if(this.scopeId=scopeId,!TIMERS_MAP.has(this.scopeId))TIMERS_MAP.set(this.scopeId,new Map)}debounce(id,ms,fn){let scopeMap=TIMERS_MAP.get(this.scopeId);return new Promise((resolve20,reject)=>{if(scopeMap.has(id))clearTimeout(scopeMap.get(id));let timerId=setTimeout(()=>{try{resolve20(fn())}catch(error2){reject(error2)}scopeMap.delete(id)},ms);scopeMap.set(id,timerId)})}clearDebounce(id){let scopeMap=TIMERS_MAP.get(this.scopeId);if(scopeMap&&scopeMap.has(id))clearTimeout(scopeMap.get(id)),scopeMap.delete(id)}clear(){let scopeMap=TIMERS_MAP.get(this.scopeId);if(scopeMap)scopeMap.forEach((timerId)=>clearTimeout(timerId)),scopeMap.clear()}}function createDebounce(scopeId){return new DebounceController(scopeId)}function clearDebounceScope(scopeId){let scopeMap=TIMERS_MAP.get(scopeId);if(scopeMap)scopeMap.forEach((timerId)=>clearTimeout(timerId)),scopeMap.clear()}class ProcessQueue{processor;queue=[];processing=!1;autoProcess=!0;constructor(processor,autoProcess=!0){this.processor=processor,this.autoProcess=autoProcess}enqueue(item){if(this.queue.push(item),!this.processing&&this.autoProcess)this.processQueue()}processQueue(){if(this.queue.length===0)return;this.processing=!0,queueMicrotask(async()=>{if(this.queue.length===0){this.processing=!1;return}let item=this.queue.shift();try{await this.processor(item)}catch(error2){console.error("Error processing queue item:",error2)}if(this.queue.length>0)this.processQueue();else this.processing=!1})}clear(){this.queue=[]}isProcessing(){return this.processing}size(){return this.queue.length}}function getParsers(){if(!_cachedParsers)_cachedParsers=[{filetype:"javascript",aliases:["javascriptreact"],queries:{highlights:[resolve18(dirname22(fileURLToPath4(import.meta.url)),highlights_default)]},wasm:resolve18(dirname22(fileURLToPath4(import.meta.url)),tree_sitter_javascript_default)},{filetype:"typescript",aliases:["typescriptreact"],queries:{highlights:[resolve18(dirname22(fileURLToPath4(import.meta.url)),highlights_default2)]},wasm:resolve18(dirname22(fileURLToPath4(import.meta.url)),tree_sitter_typescript_default)},{filetype:"markdown",queries:{highlights:[resolve18(dirname22(fileURLToPath4(import.meta.url)),highlights_default3)],injections:[resolve18(dirname22(fileURLToPath4(import.meta.url)),injections_default)]},wasm:resolve18(dirname22(fileURLToPath4(import.meta.url)),tree_sitter_markdown_default),injectionMapping:{nodeTypes:{inline:"markdown_inline",pipe_table_cell:"markdown_inline"},infoStringMap:{javascript:"javascript",js:"javascript",jsx:"javascriptreact",javascriptreact:"javascriptreact",typescript:"typescript",ts:"typescript",tsx:"typescriptreact",typescriptreact:"typescriptreact",markdown:"markdown",md:"markdown"}}},{filetype:"markdown_inline",queries:{highlights:[resolve18(dirname22(fileURLToPath4(import.meta.url)),highlights_default4)]},wasm:resolve18(dirname22(fileURLToPath4(import.meta.url)),tree_sitter_markdown_inline_default)},{filetype:"zig",queries:{highlights:[resolve18(dirname22(fileURLToPath4(import.meta.url)),highlights_default5)]},wasm:resolve18(dirname22(fileURLToPath4(import.meta.url)),tree_sitter_zig_default)}];return _cachedParsers}function isBunfsPath(path6){return path6.includes("$bunfs")||/^B:[\\/]~BUN/i.test(path6)}function getBunfsRootPath(){return process.platform==="win32"?"B:\\~BUN\\root":"/$bunfs/root"}function normalizeBunfsPath(fileName){return join79(getBunfsRootPath(),basename13(fileName))}function addDefaultParsers(parsers2){for(let parser of parsers2)DEFAULT_PARSERS=[...DEFAULT_PARSERS.filter((existingParser)=>existingParser.filetype!==parser.filetype),parser]}function isValidDirectoryName(name){if(!name||typeof name!=="string")return!1;if(name.trim().length===0)return!1;if(["CON","PRN","AUX","NUL","COM1","COM2","COM3","COM4","COM5","COM6","COM7","COM8","COM9","LPT1","LPT2","LPT3","LPT4","LPT5","LPT6","LPT7","LPT8","LPT9"].includes(name.toUpperCase()))return!1;if(/[<>:"|?*/\\\x00-\x1f]/.test(name))return!1;if(name.endsWith(".")||name.endsWith(" "))return!1;if(name==="."||name==="..")return!1;return!0}function getDataPaths(){return singleton("data-paths-opentui",()=>new DataPathsManager)}function normalizeFiletypeToken(value){return value.trim().replace(/^\./,"").toLowerCase()||void 0}function getBasename(value){let normalizedValue=value.trim().replaceAll("\\","/");if(!normalizedValue)return;return path22.posix.basename(normalizedValue).toLowerCase()||void 0}function extToFiletype(extension){let normalizedExtension=normalizeFiletypeToken(extension);if(!normalizedExtension)return;return extensionToFiletype.get(normalizedExtension)}function pathToFiletype(path33){if(typeof path33!=="string")return;let basename22=getBasename(path33);if(!basename22)return;let basenameFiletype=basenameToFiletype.get(basename22);if(basenameFiletype)return basenameFiletype;let lastDot=basename22.lastIndexOf(".");if(lastDot===-1||lastDot===basename22.length-1)return;let extension=basename22.substring(lastDot+1);return extToFiletype(extension)}function infoStringToFiletype(infoString){if(typeof infoString!=="string")return;let token=infoString.trim().split(/\s+/,1)[0],directBasenameMatch=basenameToFiletype.get(token.toLowerCase());if(directBasenameMatch)return directBasenameMatch;let normalizedToken=normalizeFiletypeToken(token);if(!normalizedToken)return;return basenameToFiletype.get(normalizedToken)??pathToFiletype(normalizedToken)??extToFiletype(normalizedToken)??normalizedToken}class DownloadUtils{static hashUrl(url){let hash=0;for(let i2=0;i2<url.length;i2++){let char=url.charCodeAt(i2);hash=(hash<<5)-hash+char,hash=hash&hash}return Math.abs(hash).toString(16)}static async downloadOrLoad(source,cacheDir,cacheSubdir,fileExtension,useHashForCache=!0,filetype){if(source.startsWith("http://")||source.startsWith("https://")){let cacheFileName;if(useHashForCache){let hash=this.hashUrl(source);cacheFileName=filetype?`${filetype}-${hash}${fileExtension}`:`${hash}${fileExtension}`}else cacheFileName=path32.basename(source);let cacheFile=path32.join(cacheDir,cacheSubdir,cacheFileName);await mkdir13(path32.dirname(cacheFile),{recursive:!0});try{let cachedContent=await readFile18(cacheFile);if(cachedContent.byteLength>0)return console.log(`Loaded from cache: ${cacheFile} (${source})`),{content:cachedContent,filePath:cacheFile}}catch(error2){}try{console.log(`Downloading from URL: ${source}`);let response=await fetch(source);if(!response.ok)return{error:`Failed to fetch from ${source}: ${response.statusText}`};let content=Buffer.from(await response.arrayBuffer());try{await writeFile12(cacheFile,Buffer.from(content)),console.log(`Cached: ${source}`)}catch(cacheError){console.warn(`Failed to cache: ${cacheError}`)}return{content,filePath:cacheFile}}catch(error2){return{error:`Error downloading from ${source}: ${error2}`}}}else try{return console.log(`Loading from local path: ${source}`),{content:await readFile18(source),filePath:source}}catch(error2){return{error:`Error loading from local path ${source}: ${error2}`}}}static async downloadToPath(source,targetPath){let isUrl2=source.startsWith("http://")||source.startsWith("https://");if(await mkdir13(path32.dirname(targetPath),{recursive:!0}),isUrl2)try{console.log(`Downloading from URL: ${source}`);let response=await fetch(source);if(!response.ok)return{error:`Failed to fetch from ${source}: ${response.statusText}`};let content=Buffer.from(await response.arrayBuffer());return await writeFile12(targetPath,Buffer.from(content)),console.log(`Downloaded: ${source} -> ${targetPath}`),{content,filePath:targetPath}}catch(error2){return{error:`Error downloading from ${source}: ${error2}`}}else try{console.log(`Copying from local path: ${source}`);let content=await readFile18(source);return await writeFile12(targetPath,Buffer.from(content)),{content,filePath:targetPath}}catch(error2){return{error:`Error copying from local path ${source}: ${error2}`}}}static async fetchHighlightQueries(sources,cacheDir,filetype){let queryPromises=sources.map((source)=>this.fetchHighlightQuery(source,cacheDir,filetype));return(await Promise.all(queryPromises)).filter((query2)=>query2.trim().length>0).join(`
3025
+ `){currentOffset=boundary.offset+1;continue}}if(meta?.conceal!==void 0){if(meta.conceal===" "){if(boundary.offset<content.length&&content[boundary.offset]===" "){currentOffset=boundary.offset+1;continue}}else if(meta.conceal===""&&group==="conceal"&&!meta.isInjection){if(boundary.offset<content.length&&content[boundary.offset]===" "){currentOffset=boundary.offset+1;continue}}}}currentOffset=boundary.offset}if(currentOffset<content.length){let text=content.slice(currentOffset);chunks.push({__isChunk:!0,text,fg:defaultStyle?.fg,bg:defaultStyle?.bg,attributes:defaultStyle?createTextAttributes({bold:defaultStyle.bold,italic:defaultStyle.italic,underline:defaultStyle.underline,dim:defaultStyle.dim}):0})}return chunks}async function treeSitterToStyledText(content,filetype,syntaxStyle,client,options){let result2=await client.highlightOnce(content,filetype);if(result2.highlights&&result2.highlights.length>0){let chunks=treeSitterToTextChunks(content,result2.highlights,syntaxStyle,options?.conceal);return new StyledText(chunks)}else{let defaultStyle=syntaxStyle.mergeStyles("default"),chunks=[{__isChunk:!0,text:content,fg:defaultStyle.fg,bg:defaultStyle.bg,attributes:defaultStyle.attributes}];return new StyledText(chunks)}}class DebounceController{scopeId;constructor(scopeId){if(this.scopeId=scopeId,!TIMERS_MAP.has(this.scopeId))TIMERS_MAP.set(this.scopeId,new Map)}debounce(id,ms,fn){let scopeMap=TIMERS_MAP.get(this.scopeId);return new Promise((resolve20,reject)=>{if(scopeMap.has(id))clearTimeout(scopeMap.get(id));let timerId=setTimeout(()=>{try{resolve20(fn())}catch(error2){reject(error2)}scopeMap.delete(id)},ms);scopeMap.set(id,timerId)})}clearDebounce(id){let scopeMap=TIMERS_MAP.get(this.scopeId);if(scopeMap&&scopeMap.has(id))clearTimeout(scopeMap.get(id)),scopeMap.delete(id)}clear(){let scopeMap=TIMERS_MAP.get(this.scopeId);if(scopeMap)scopeMap.forEach((timerId)=>clearTimeout(timerId)),scopeMap.clear()}}function createDebounce(scopeId){return new DebounceController(scopeId)}function clearDebounceScope(scopeId){let scopeMap=TIMERS_MAP.get(scopeId);if(scopeMap)scopeMap.forEach((timerId)=>clearTimeout(timerId)),scopeMap.clear()}class ProcessQueue{processor;queue=[];processing=!1;autoProcess=!0;constructor(processor,autoProcess=!0){this.processor=processor,this.autoProcess=autoProcess}enqueue(item){if(this.queue.push(item),!this.processing&&this.autoProcess)this.processQueue()}processQueue(){if(this.queue.length===0)return;this.processing=!0,queueMicrotask(async()=>{if(this.queue.length===0){this.processing=!1;return}let item=this.queue.shift();try{await this.processor(item)}catch(error2){console.error("Error processing queue item:",error2)}if(this.queue.length>0)this.processQueue();else this.processing=!1})}clear(){this.queue=[]}isProcessing(){return this.processing}size(){return this.queue.length}}function getParsers(){if(!_cachedParsers)_cachedParsers=[{filetype:"javascript",aliases:["javascriptreact"],queries:{highlights:[resolve18(dirname23(fileURLToPath4(import.meta.url)),highlights_default)]},wasm:resolve18(dirname23(fileURLToPath4(import.meta.url)),tree_sitter_javascript_default)},{filetype:"typescript",aliases:["typescriptreact"],queries:{highlights:[resolve18(dirname23(fileURLToPath4(import.meta.url)),highlights_default2)]},wasm:resolve18(dirname23(fileURLToPath4(import.meta.url)),tree_sitter_typescript_default)},{filetype:"markdown",queries:{highlights:[resolve18(dirname23(fileURLToPath4(import.meta.url)),highlights_default3)],injections:[resolve18(dirname23(fileURLToPath4(import.meta.url)),injections_default)]},wasm:resolve18(dirname23(fileURLToPath4(import.meta.url)),tree_sitter_markdown_default),injectionMapping:{nodeTypes:{inline:"markdown_inline",pipe_table_cell:"markdown_inline"},infoStringMap:{javascript:"javascript",js:"javascript",jsx:"javascriptreact",javascriptreact:"javascriptreact",typescript:"typescript",ts:"typescript",tsx:"typescriptreact",typescriptreact:"typescriptreact",markdown:"markdown",md:"markdown"}}},{filetype:"markdown_inline",queries:{highlights:[resolve18(dirname23(fileURLToPath4(import.meta.url)),highlights_default4)]},wasm:resolve18(dirname23(fileURLToPath4(import.meta.url)),tree_sitter_markdown_inline_default)},{filetype:"zig",queries:{highlights:[resolve18(dirname23(fileURLToPath4(import.meta.url)),highlights_default5)]},wasm:resolve18(dirname23(fileURLToPath4(import.meta.url)),tree_sitter_zig_default)}];return _cachedParsers}function isBunfsPath(path6){return path6.includes("$bunfs")||/^B:[\\/]~BUN/i.test(path6)}function getBunfsRootPath(){return process.platform==="win32"?"B:\\~BUN\\root":"/$bunfs/root"}function normalizeBunfsPath(fileName){return join80(getBunfsRootPath(),basename13(fileName))}function addDefaultParsers(parsers2){for(let parser of parsers2)DEFAULT_PARSERS=[...DEFAULT_PARSERS.filter((existingParser)=>existingParser.filetype!==parser.filetype),parser]}function isValidDirectoryName(name){if(!name||typeof name!=="string")return!1;if(name.trim().length===0)return!1;if(["CON","PRN","AUX","NUL","COM1","COM2","COM3","COM4","COM5","COM6","COM7","COM8","COM9","LPT1","LPT2","LPT3","LPT4","LPT5","LPT6","LPT7","LPT8","LPT9"].includes(name.toUpperCase()))return!1;if(/[<>:"|?*/\\\x00-\x1f]/.test(name))return!1;if(name.endsWith(".")||name.endsWith(" "))return!1;if(name==="."||name==="..")return!1;return!0}function getDataPaths(){return singleton("data-paths-opentui",()=>new DataPathsManager)}function normalizeFiletypeToken(value){return value.trim().replace(/^\./,"").toLowerCase()||void 0}function getBasename(value){let normalizedValue=value.trim().replaceAll("\\","/");if(!normalizedValue)return;return path22.posix.basename(normalizedValue).toLowerCase()||void 0}function extToFiletype(extension){let normalizedExtension=normalizeFiletypeToken(extension);if(!normalizedExtension)return;return extensionToFiletype.get(normalizedExtension)}function pathToFiletype(path33){if(typeof path33!=="string")return;let basename22=getBasename(path33);if(!basename22)return;let basenameFiletype=basenameToFiletype.get(basename22);if(basenameFiletype)return basenameFiletype;let lastDot=basename22.lastIndexOf(".");if(lastDot===-1||lastDot===basename22.length-1)return;let extension=basename22.substring(lastDot+1);return extToFiletype(extension)}function infoStringToFiletype(infoString){if(typeof infoString!=="string")return;let token=infoString.trim().split(/\s+/,1)[0],directBasenameMatch=basenameToFiletype.get(token.toLowerCase());if(directBasenameMatch)return directBasenameMatch;let normalizedToken=normalizeFiletypeToken(token);if(!normalizedToken)return;return basenameToFiletype.get(normalizedToken)??pathToFiletype(normalizedToken)??extToFiletype(normalizedToken)??normalizedToken}class DownloadUtils{static hashUrl(url){let hash=0;for(let i2=0;i2<url.length;i2++){let char=url.charCodeAt(i2);hash=(hash<<5)-hash+char,hash=hash&hash}return Math.abs(hash).toString(16)}static async downloadOrLoad(source,cacheDir,cacheSubdir,fileExtension,useHashForCache=!0,filetype){if(source.startsWith("http://")||source.startsWith("https://")){let cacheFileName;if(useHashForCache){let hash=this.hashUrl(source);cacheFileName=filetype?`${filetype}-${hash}${fileExtension}`:`${hash}${fileExtension}`}else cacheFileName=path32.basename(source);let cacheFile=path32.join(cacheDir,cacheSubdir,cacheFileName);await mkdir13(path32.dirname(cacheFile),{recursive:!0});try{let cachedContent=await readFile18(cacheFile);if(cachedContent.byteLength>0)return console.log(`Loaded from cache: ${cacheFile} (${source})`),{content:cachedContent,filePath:cacheFile}}catch(error2){}try{console.log(`Downloading from URL: ${source}`);let response=await fetch(source);if(!response.ok)return{error:`Failed to fetch from ${source}: ${response.statusText}`};let content=Buffer.from(await response.arrayBuffer());try{await writeFile12(cacheFile,Buffer.from(content)),console.log(`Cached: ${source}`)}catch(cacheError){console.warn(`Failed to cache: ${cacheError}`)}return{content,filePath:cacheFile}}catch(error2){return{error:`Error downloading from ${source}: ${error2}`}}}else try{return console.log(`Loading from local path: ${source}`),{content:await readFile18(source),filePath:source}}catch(error2){return{error:`Error loading from local path ${source}: ${error2}`}}}static async downloadToPath(source,targetPath){let isUrl2=source.startsWith("http://")||source.startsWith("https://");if(await mkdir13(path32.dirname(targetPath),{recursive:!0}),isUrl2)try{console.log(`Downloading from URL: ${source}`);let response=await fetch(source);if(!response.ok)return{error:`Failed to fetch from ${source}: ${response.statusText}`};let content=Buffer.from(await response.arrayBuffer());return await writeFile12(targetPath,Buffer.from(content)),console.log(`Downloaded: ${source} -> ${targetPath}`),{content,filePath:targetPath}}catch(error2){return{error:`Error downloading from ${source}: ${error2}`}}else try{console.log(`Copying from local path: ${source}`);let content=await readFile18(source);return await writeFile12(targetPath,Buffer.from(content)),{content,filePath:targetPath}}catch(error2){return{error:`Error copying from local path ${source}: ${error2}`}}}static async fetchHighlightQueries(sources,cacheDir,filetype){let queryPromises=sources.map((source)=>this.fetchHighlightQuery(source,cacheDir,filetype));return(await Promise.all(queryPromises)).filter((query2)=>query2.trim().length>0).join(`
3026
3026
  `)}static async fetchHighlightQuery(source,cacheDir,filetype){let result2=await this.downloadOrLoad(source,cacheDir,"queries",".scm",!0,filetype);if(result2.error)return console.error(`Error fetching highlight query from ${source}:`,result2.error),"";if(result2.content)return new TextDecoder().decode(result2.content);return""}}function getDefaultOptions(){return{configPath:path4.resolve(__dirname2,"../parsers-config"),assetsDir:path4.resolve(__dirname2),outputPath:path4.resolve(__dirname2,"../default-parsers.ts")}}async function loadConfig2(configPath2){let ext=path4.extname(configPath2),resolvedConfigPath=configPath2;if(ext===""){let file=(await readdir12(path4.dirname(configPath2))).find((file2)=>file2.startsWith(path4.basename(configPath2))&&(file2.endsWith(".json")||file2.endsWith(".ts")||file2.endsWith(".js")));if(!file)throw Error(`No config file found for ${configPath2}`);resolvedConfigPath=path4.join(path4.dirname(configPath2),file),ext=path4.extname(resolvedConfigPath)}if(ext===".json"){let configContent=await readFile22(resolvedConfigPath,"utf-8");return JSON.parse(configContent)}else if(ext===".ts"||ext===".js"){let{default:configContent}=await import(resolvedConfigPath);return configContent}throw Error(`Unsupported config file extension: ${ext}`)}async function downloadLanguage(filetype,languageUrl,assetsDir,outputPath){let languageDir=path4.join(assetsDir,filetype),languageFilename=path4.basename(languageUrl),languagePath=path4.join(languageDir,languageFilename),result2=await DownloadUtils.downloadToPath(languageUrl,languagePath);if(result2.error)throw Error(`Failed to download language for ${filetype}: ${result2.error}`);return"./"+path4.relative(path4.dirname(outputPath),languagePath)}async function downloadAndCombineQueries(filetype,queryUrls,assetsDir,outputPath,queryType,configPath2){let queriesDir=path4.join(assetsDir,filetype),queryPath=path4.join(queriesDir,`${queryType}.scm`),queryContents=[];for(let i2=0;i2<queryUrls.length;i2++){let queryUrl=queryUrls[i2];if(queryUrl.startsWith("./")){console.log(` Using local query ${i2+1}/${queryUrls.length}: ${queryUrl}`);try{let localPath=path4.resolve(path4.dirname(configPath2),queryUrl),content=await readFile22(localPath,"utf-8");if(content.trim())queryContents.push(content),console.log(` \u2713 Loaded ${content.split(`
3027
3027
  `).length} lines from local file`)}catch(error2){console.warn(`Failed to read local query from ${queryUrl}: ${error2}`);continue}}else{console.log(` Downloading query ${i2+1}/${queryUrls.length}: ${queryUrl}`);try{let response=await fetch(queryUrl);if(!response.ok){console.warn(`Failed to download query from ${queryUrl}: ${response.statusText}`);continue}let content=await response.text();if(content.trim())queryContents.push(`; Query from: ${queryUrl}
3028
3028
  ${content}`),console.log(` \u2713 Downloaded ${content.split(`
@@ -3066,14 +3066,14 @@ ${parserDefinitions},
3066
3066
  `){lineEnd=i2+1;break}let deleteLength=lineEnd-lineStart;this.originalDeleteLine(),this.adjustExtmarksAfterDeletion(lineStart,deleteLength)}}wrapInsertion(){this.editBuffer.insertText=(text)=>{if(this.destroyed){this.originalInsertText(text);return}this.saveSnapshot();let currentOffset=this.editorView.getVisualCursor().offset;this.originalInsertText(text),this.adjustExtmarksAfterInsertion(currentOffset,text.length)},this.editBuffer.insertChar=(char)=>{if(this.destroyed){this.originalInsertChar(char);return}this.saveSnapshot();let currentOffset=this.editorView.getVisualCursor().offset;this.originalInsertChar(char),this.adjustExtmarksAfterInsertion(currentOffset,1)},this.editBuffer.setText=(text)=>{if(this.destroyed){this.originalSetText(text);return}this.clear(),this.originalSetText(text)},this.editBuffer.replaceText=(text)=>{if(this.destroyed){this.originalReplaceText(text);return}this.saveSnapshot(),this.clear(),this.originalReplaceText(text)},this.editBuffer.clear=()=>{if(this.destroyed){this.originalClear();return}this.saveSnapshot(),this.clear(),this.originalClear()},this.editBuffer.newLine=()=>{if(this.destroyed){this.originalNewLine();return}this.saveSnapshot();let currentOffset=this.editorView.getVisualCursor().offset;this.originalNewLine(),this.adjustExtmarksAfterInsertion(currentOffset,1)}}wrapEditorViewDeleteSelectedText(){this.editorView.deleteSelectedText=()=>{if(this.destroyed){this.originalEditorViewDeleteSelectedText();return}this.saveSnapshot();let selection=this.editorView.getSelection();if(!selection){this.originalEditorViewDeleteSelectedText();return}let deleteOffset=Math.min(selection.start,selection.end),deleteLength=Math.abs(selection.end-selection.start);if(this.originalEditorViewDeleteSelectedText(),deleteLength>0)this.adjustExtmarksAfterDeletion(deleteOffset,deleteLength)}}setupContentChangeListener(){this.editBuffer.on("content-changed",()=>{if(this.destroyed)return;this.updateHighlights()})}deleteExtmarkById(id){let extmark=this.extmarks.get(id);if(extmark)this.extmarks.delete(id),this.extmarksByTypeId.get(extmark.typeId)?.delete(id),this.metadata.delete(id)}findVirtualExtmarkContaining(offset){for(let extmark of this.extmarks.values())if(extmark.virtual&&offset>=extmark.start&&offset<extmark.end)return extmark;return null}adjustExtmarksAfterInsertion(insertOffset,length){for(let extmark of this.extmarks.values())if(extmark.start>=insertOffset)extmark.start+=length,extmark.end+=length;else if(extmark.end>insertOffset)extmark.end+=length;this.updateHighlights()}adjustExtmarksAfterDeletion(deleteOffset,length){let toDelete=[];for(let extmark of this.extmarks.values()){if(extmark.end<=deleteOffset)continue;if(extmark.start>=deleteOffset+length)extmark.start-=length,extmark.end-=length;else if(extmark.start>=deleteOffset&&extmark.end<=deleteOffset+length)toDelete.push(extmark.id);else if(extmark.start<deleteOffset&&extmark.end>deleteOffset+length)extmark.end-=length;else if(extmark.start<deleteOffset&&extmark.end>deleteOffset)extmark.end-=Math.min(extmark.end,deleteOffset+length)-deleteOffset;else if(extmark.start<deleteOffset+length&&extmark.end>deleteOffset+length){let overlap=deleteOffset+length-extmark.start;extmark.start=deleteOffset,extmark.end-=length}}for(let id of toDelete)this.deleteExtmarkById(id);this.updateHighlights()}offsetToPosition(offset){let result2=this.editBuffer.offsetToPosition(offset);if(!result2)return{row:0,col:0};return result2}positionToOffset(row,col){return this.editBuffer.positionToOffset(row,col)}updateHighlights(){this.editBuffer.clearAllHighlights();for(let extmark of this.extmarks.values())if(extmark.styleId!==void 0){let startWithoutNewlines=this.offsetExcludingNewlines(extmark.start),endWithoutNewlines=this.offsetExcludingNewlines(extmark.end);this.editBuffer.addHighlightByCharRange({start:startWithoutNewlines,end:endWithoutNewlines,styleId:extmark.styleId,priority:extmark.priority??0,hlRef:extmark.id})}}offsetExcludingNewlines(offset){let text=this.editBuffer.getText(),displayWidthSoFar=0,newlineCount=0,i2=0;while(i2<text.length&&displayWidthSoFar<offset)if(text[i2]===`
3067
3067
  `)displayWidthSoFar++,newlineCount++,i2++;else{let j=i2;while(j<text.length&&text[j]!==`
3068
3068
  `)j++;let chunk=text.substring(i2,j),chunkWidth=Bun.stringWidth(chunk);if(displayWidthSoFar+chunkWidth<offset)displayWidthSoFar+=chunkWidth,i2=j;else{for(let k=i2;k<j&&displayWidthSoFar<offset;k++){let charWidth=Bun.stringWidth(text[k]);displayWidthSoFar+=charWidth}break}}return offset-newlineCount}create(options){if(this.destroyed)throw Error("ExtmarksController is destroyed");let id=this.nextId++,typeId=options.typeId??0,extmark={id,start:options.start,end:options.end,virtual:options.virtual??!1,styleId:options.styleId,priority:options.priority,data:options.data,typeId};if(this.extmarks.set(id,extmark),!this.extmarksByTypeId.has(typeId))this.extmarksByTypeId.set(typeId,new Set);if(this.extmarksByTypeId.get(typeId).add(id),options.metadata!==void 0)this.metadata.set(id,options.metadata);return this.updateHighlights(),id}delete(id){if(this.destroyed)throw Error("ExtmarksController is destroyed");if(!this.extmarks.get(id))return!1;return this.deleteExtmarkById(id),this.updateHighlights(),!0}get(id){if(this.destroyed)return null;return this.extmarks.get(id)??null}getAll(){if(this.destroyed)return[];return Array.from(this.extmarks.values())}getVirtual(){if(this.destroyed)return[];return Array.from(this.extmarks.values()).filter((e)=>e.virtual)}getAtOffset(offset){if(this.destroyed)return[];return Array.from(this.extmarks.values()).filter((e)=>offset>=e.start&&offset<e.end)}getAllForTypeId(typeId){if(this.destroyed)return[];let ids=this.extmarksByTypeId.get(typeId);if(!ids)return[];return Array.from(ids).map((id)=>this.extmarks.get(id)).filter((e)=>e!==void 0)}clear(){if(this.destroyed)return;this.extmarks.clear(),this.extmarksByTypeId.clear(),this.metadata.clear(),this.updateHighlights()}saveSnapshot(){this.history.saveSnapshot(this.extmarks,this.nextId)}restoreSnapshot(snapshot){this.extmarks=new Map(Array.from(snapshot.extmarks.entries()).map(([id,extmark])=>[id,{...extmark}])),this.nextId=snapshot.nextId,this.updateHighlights()}wrapUndoRedo(){this.editBuffer.undo=()=>{if(this.destroyed)return this.originalUndo();if(!this.history.canUndo())return this.originalUndo();let currentSnapshot={extmarks:new Map(Array.from(this.extmarks.entries()).map(([id,extmark])=>[id,{...extmark}])),nextId:this.nextId};this.history.pushRedo(currentSnapshot);let snapshot=this.history.undo();return this.restoreSnapshot(snapshot),this.originalUndo()},this.editBuffer.redo=()=>{if(this.destroyed)return this.originalRedo();if(!this.history.canRedo())return this.originalRedo();let currentSnapshot={extmarks:new Map(Array.from(this.extmarks.entries()).map(([id,extmark])=>[id,{...extmark}])),nextId:this.nextId};this.history.pushUndo(currentSnapshot);let snapshot=this.history.redo();return this.restoreSnapshot(snapshot),this.originalRedo()}}registerType(typeName){if(this.destroyed)throw Error("ExtmarksController is destroyed");let existing=this.typeNameToId.get(typeName);if(existing!==void 0)return existing;let typeId=this.nextTypeId++;return this.typeNameToId.set(typeName,typeId),this.typeIdToName.set(typeId,typeName),typeId}getTypeId(typeName){if(this.destroyed)return null;return this.typeNameToId.get(typeName)??null}getTypeName(typeId){if(this.destroyed)return null;return this.typeIdToName.get(typeId)??null}getMetadataFor(extmarkId){if(this.destroyed)return;return this.metadata.get(extmarkId)}destroy(){if(this.destroyed)return;this.editBuffer.moveCursorLeft=this.originalMoveCursorLeft,this.editBuffer.moveCursorRight=this.originalMoveCursorRight,this.editBuffer.setCursorByOffset=this.originalSetCursorByOffset,this.editorView.moveUpVisual=this.originalMoveUpVisual,this.editorView.moveDownVisual=this.originalMoveDownVisual,this.editBuffer.deleteCharBackward=this.originalDeleteCharBackward,this.editBuffer.deleteChar=this.originalDeleteChar,this.editBuffer.insertText=this.originalInsertText,this.editBuffer.insertChar=this.originalInsertChar,this.editBuffer.deleteRange=this.originalDeleteRange,this.editBuffer.setText=this.originalSetText,this.editBuffer.replaceText=this.originalReplaceText,this.editBuffer.clear=this.originalClear,this.editBuffer.newLine=this.originalNewLine,this.editBuffer.deleteLine=this.originalDeleteLine,this.editorView.deleteSelectedText=this.originalEditorViewDeleteSelectedText,this.editBuffer.undo=this.originalUndo,this.editBuffer.redo=this.originalRedo,this.extmarks.clear(),this.extmarksByTypeId.clear(),this.metadata.clear(),this.typeNameToId.clear(),this.typeIdToName.clear(),this.history.clear(),this.destroyed=!0}}function createExtmarksController(editBuffer,editorView){return new ExtmarksController(editBuffer,editorView)}function scaleComponent(comp){let val=parseInt(comp,16),maxIn=(1<<4*comp.length)-1;return Math.round(val/maxIn*255).toString(16).padStart(2,"0")}function toHex(r,g,b2,hex6){if(hex6)return`#${hex6.toLowerCase()}`;if(r&&g&&b2)return`#${scaleComponent(r)}${scaleComponent(g)}${scaleComponent(b2)}`;return"#000000"}function wrapForTmux(osc){return`\x1BPtmux;${osc.replace(/\x1b/g,"\x1B\x1B")}\x1B\\`}class TerminalPalette{stdin;stdout;writeFn;activeQuerySessions=[];inLegacyTmux;oscSource;clock;constructor(stdin,stdout,writeFn,isLegacyTmux,oscSource,clock){this.stdin=stdin,this.stdout=stdout,this.writeFn=writeFn||((data)=>stdout.write(data)),this.inLegacyTmux=isLegacyTmux??!1,this.oscSource=oscSource,this.clock=clock??SYSTEM_CLOCK2}writeOsc(osc){let data=this.inLegacyTmux?wrapForTmux(osc):osc;return this.writeFn(data)}cleanup(){for(let cleanupSession of[...this.activeQuerySessions])cleanupSession();this.activeQuerySessions=[]}subscribeInput(handler){if(this.oscSource)return this.oscSource.subscribeOsc((sequence)=>{handler(sequence)});return this.stdin.on("data",handler),()=>{this.stdin.removeListener("data",handler)}}createQuerySession(){let timers=new Set,subscriptions=new Set,closed=!1,cleanup=()=>{if(closed)return;closed=!0;for(let timer2 of timers)this.clock.clearTimeout(timer2);timers.clear();for(let unsubscribe of subscriptions)unsubscribe();subscriptions.clear();let idx=this.activeQuerySessions.indexOf(cleanup);if(idx!==-1)this.activeQuerySessions.splice(idx,1)};return this.activeQuerySessions.push(cleanup),{setTimer:(fn,ms)=>{let timer2=this.clock.setTimeout(fn,ms);return timers.add(timer2),timer2},resetTimer:(existing,fn,ms)=>{if(existing)this.clock.clearTimeout(existing),timers.delete(existing);let timer2=this.clock.setTimeout(fn,ms);return timers.add(timer2),timer2},subscribeInput:(handler)=>{let unsubscribe=this.subscribeInput(handler);return subscriptions.add(unsubscribe),()=>{if(!subscriptions.has(unsubscribe))return;subscriptions.delete(unsubscribe),unsubscribe()}},cleanup}}async detectOSCSupport(timeoutMs=300){if(!this.stdout.isTTY||!this.stdin.isTTY)return!1;return new Promise((resolve42)=>{let session=this.createQuerySession(),buffer2="",settled=!1,finish=(supported)=>{if(settled)return;settled=!0,session.cleanup(),resolve42(supported)},onData=(chunk)=>{if(buffer2+=chunk.toString(),OSC4_RESPONSE.lastIndex=0,OSC4_RESPONSE.test(buffer2))finish(!0)};session.setTimer(()=>{finish(!1)},timeoutMs),session.subscribeInput(onData),this.writeOsc("\x1B]4;0;?\x07")})}async queryPalette(indices,timeoutMs=1200){let out=this.stdout,results=new Map;if(indices.forEach((i2)=>results.set(i2,null)),!out.isTTY||!this.stdin.isTTY)return results;return new Promise((resolve42)=>{let session=this.createQuerySession(),buffer2="",idleTimer=null,settled=!1,finish=()=>{if(settled)return;settled=!0,session.cleanup(),resolve42(results)},onData=(chunk)=>{buffer2+=chunk.toString();let m;OSC4_RESPONSE.lastIndex=0;while(m=OSC4_RESPONSE.exec(buffer2)){let idx=parseInt(m[1],10);if(results.has(idx))results.set(idx,toHex(m[2],m[3],m[4],m[5]))}if(buffer2.length>8192)buffer2=buffer2.slice(-4096);if([...results.values()].filter((v)=>v!==null).length===results.size){finish();return}idleTimer=session.resetTimer(idleTimer,finish,150)};session.setTimer(finish,timeoutMs),session.subscribeInput(onData),this.writeOsc(indices.map((i2)=>`\x1B]4;${i2};?\x07`).join(""))})}async querySpecialColors(timeoutMs=1200){let out=this.stdout,results={10:null,11:null,12:null,13:null,14:null,15:null,16:null,17:null,19:null};if(!out.isTTY||!this.stdin.isTTY)return results;return new Promise((resolve42)=>{let session=this.createQuerySession(),buffer2="",idleTimer=null,settled=!1,finish=()=>{if(settled)return;settled=!0,session.cleanup(),resolve42(results)},onData=(chunk)=>{buffer2+=chunk.toString();let updated=!1,m;OSC_SPECIAL_RESPONSE.lastIndex=0;while(m=OSC_SPECIAL_RESPONSE.exec(buffer2)){let idx=parseInt(m[1],10);if(idx in results)results[idx]=toHex(m[2],m[3],m[4],m[5]),updated=!0}if(buffer2.length>8192)buffer2=buffer2.slice(-4096);if(Object.values(results).filter((v)=>v!==null).length===Object.keys(results).length){finish();return}if(!updated)return;idleTimer=session.resetTimer(idleTimer,finish,150)};session.setTimer(finish,timeoutMs),session.subscribeInput(onData),this.writeOsc(["\x1B]10;?\x07","\x1B]11;?\x07","\x1B]12;?\x07","\x1B]13;?\x07","\x1B]14;?\x07","\x1B]15;?\x07","\x1B]16;?\x07","\x1B]17;?\x07","\x1B]19;?\x07"].join(""))})}async detect(options){let{timeout=5000,size=16}=options||{};if(!await this.detectOSCSupport())return{palette:Array(size).fill(null),defaultForeground:null,defaultBackground:null,cursorColor:null,mouseForeground:null,mouseBackground:null,tekForeground:null,tekBackground:null,highlightBackground:null,highlightForeground:null};let indicesToQuery=[...Array(size).keys()],[paletteResults,specialColors]=await Promise.all([this.queryPalette(indicesToQuery,timeout),this.querySpecialColors(timeout)]);return{palette:[...Array(size).keys()].map((i2)=>paletteResults.get(i2)??null),defaultForeground:specialColors[10],defaultBackground:specialColors[11],cursorColor:specialColors[12],mouseForeground:specialColors[13],mouseBackground:specialColors[14],tekForeground:specialColors[15],tekBackground:specialColors[16],highlightBackground:specialColors[17],highlightForeground:specialColors[19]}}}function createTerminalPalette(stdin,stdout,writeFn,isLegacyTmux,oscSource,clock){return new TerminalPalette(stdin,stdout,writeFn,isLegacyTmux,oscSource,clock)}function getFallbackAnsi256Palette(){if(!fallbackAnsi256Palette)fallbackAnsi256Palette=Array.from({length:256},(_,index)=>{let[r,g,b2]=ansi256IndexToRgb(index);return RGBA.fromInts(r,g,b2)});return fallbackAnsi256Palette}function normalizeTerminalPalette(colors8){let fallbackPalette=getFallbackAnsi256Palette();return{palette:Array.from({length:256},(_,index)=>{let detected=colors8?.palette[index];return detected?RGBA.fromHex(detected):RGBA.clone(fallbackPalette[index])}),defaultForeground:colors8?.defaultForeground?RGBA.fromHex(colors8.defaultForeground):RGBA.clone(DEFAULT_FOREGROUND_FALLBACK),defaultBackground:colors8?.defaultBackground?RGBA.fromHex(colors8.defaultBackground):RGBA.clone(DEFAULT_BACKGROUND_FALLBACK)}}function buildTerminalPaletteSignature(colors8){let normalized=normalizeTerminalPalette(colors8);return[normalized.palette.map((color2)=>color2.toInts().join(",")).join(";"),normalized.defaultForeground.toInts().join(","),normalized.defaultBackground.toInts().join(",")].join("|")}function decodePasteBytes(bytes){return PASTE_TEXT_DECODER.decode(bytes)}function stripAnsiSequences(text){return Bun.stripANSI(text)}function detectLinks(chunks,context){let{content,highlights}=context,ranges=[];for(let i2=0;i2<highlights.length;i2++){let[start3,end,group]=highlights[i2];if(!URL_SCOPES.includes(group))continue;let url=content.slice(start3,end);ranges.push({start:start3,end,url});for(let j=i2-1;j>=0;j--){let[labelStart,labelEnd,prev]=highlights[j];if(prev==="markup.link.label"){ranges.push({start:labelStart,end:labelEnd,url});break}if(!prev.startsWith("markup.link"))break}}if(ranges.length===0)return chunks;let contentPos=0;for(let chunk of chunks){if(chunk.text.length<=1)continue;let idx=content.indexOf(chunk.text,contentPos);if(idx<0)continue;for(let range of ranges)if(idx<range.end&&idx+chunk.text.length>range.start){chunk.link={url:range.url};break}contentPos=idx+chunk.text.length}return chunks}function packDrawOptions(border2,shouldFill,titleAlignment,bottomTitleAlignment){let packed=0;if(border2===!0)packed|=15;else if(Array.isArray(border2)){if(border2.includes("top"))packed|=8;if(border2.includes("right"))packed|=4;if(border2.includes("bottom"))packed|=2;if(border2.includes("left"))packed|=1}if(shouldFill)packed|=16;let alignmentMap={left:0,center:1,right:2},alignment=alignmentMap[titleAlignment],bottomAlignment=alignmentMap[bottomTitleAlignment];return packed|=alignment<<5,packed|=bottomAlignment<<7,packed}class OptimizedBuffer{static fbIdCounter=0;id;lib;bufferPtr;_width;_height;_widthMethod;respectAlpha=!1;_rawBuffers=null;_rawColorTags=null;_destroyed=!1;get ptr(){return this.bufferPtr}guard(){if(this._destroyed)throw Error(`Buffer ${this.id} is destroyed`)}ensureRawBufferViews(){if(this._rawBuffers!==null&&this._rawColorTags!==null)return;let size=this._width*this._height,charPtr=this.lib.bufferGetCharPtr(this.bufferPtr),fgPtr=this.lib.bufferGetFgPtr(this.bufferPtr),bgPtr=this.lib.bufferGetBgPtr(this.bufferPtr),fgTagPtr=this.lib.bufferGetFgTagPtr(this.bufferPtr),bgTagPtr=this.lib.bufferGetBgTagPtr(this.bufferPtr),attributesPtr=this.lib.bufferGetAttributesPtr(this.bufferPtr);this._rawBuffers={char:new Uint32Array(toArrayBuffer(charPtr,0,size*4)),fg:new Float32Array(toArrayBuffer(fgPtr,0,size*4*4)),bg:new Float32Array(toArrayBuffer(bgPtr,0,size*4*4)),attributes:new Uint32Array(toArrayBuffer(attributesPtr,0,size*4))},this._rawColorTags={fg:new Uint16Array(toArrayBuffer(fgTagPtr,0,size*2)),bg:new Uint16Array(toArrayBuffer(bgTagPtr,0,size*2))}}get buffers(){return this.guard(),this.ensureRawBufferViews(),this._rawBuffers}get rawColorTags(){return this.guard(),this.ensureRawBufferViews(),this._rawColorTags}constructor(lib,ptr22,width,height2,options){this.id=options.id||`fb_${OptimizedBuffer.fbIdCounter++}`,this.lib=lib,this.respectAlpha=options.respectAlpha||!1,this._width=width,this._height=height2,this._widthMethod=options.widthMethod||"unicode",this.bufferPtr=ptr22}static create(width,height2,widthMethod,options={}){let lib=resolveRenderLib(),respectAlpha=options.respectAlpha||!1,id=options.id&&options.id.trim()!==""?options.id:"unnamed buffer";return lib.createOptimizedBuffer(width,height2,widthMethod,respectAlpha,id)}get widthMethod(){return this._widthMethod}get width(){return this._width}get height(){return this._height}setRespectAlpha(respectAlpha){this.guard(),this.lib.bufferSetRespectAlpha(this.bufferPtr,respectAlpha),this.respectAlpha=respectAlpha}getNativeId(){return this.guard(),this.lib.bufferGetId(this.bufferPtr)}getRealCharBytes(addLineBreaks=!1){this.guard();let realSize=this.lib.bufferGetRealCharSize(this.bufferPtr),outputBuffer=new Uint8Array(realSize),bytesWritten=this.lib.bufferWriteResolvedChars(this.bufferPtr,outputBuffer,addLineBreaks);return outputBuffer.slice(0,bytesWritten)}getSpanLines(){this.guard();let{char,fg:fg2,bg:bg2,attributes}=this.buffers,{fg:fgTag,bg:bgTag}=this.rawColorTags,lines=[],CHAR_FLAG_CONTINUATION=-1073741824,CHAR_FLAG_MASK=-1073741824,realTextBytes=this.getRealCharBytes(!0),realTextLines=new TextDecoder().decode(realTextBytes).split(`
3069
- `);for(let y=0;y<this._height;y++){let spans=[],currentSpan=null,lineChars=[...realTextLines[y]||""],charIdx=0;for(let x=0;x<this._width;x++){let i2=y*this._width+x,cp3=char[i2],cellFg=RGBA.fromValues(fg2[i2*4],fg2[i2*4+1],fg2[i2*4+2],fg2[i2*4+3],fgTag[i2]),cellBg=RGBA.fromValues(bg2[i2*4],bg2[i2*4+1],bg2[i2*4+2],bg2[i2*4+3],bgTag[i2]),cellAttrs=attributes[i2]&255,cellChar=(cp3&CHAR_FLAG_MASK)===CHAR_FLAG_CONTINUATION?"":lineChars[charIdx++]??" ";if(currentSpan&&currentSpan.fg.equals(cellFg)&&currentSpan.bg.equals(cellBg)&&currentSpan.attributes===cellAttrs)currentSpan.text+=cellChar,currentSpan.width+=1;else{if(currentSpan)spans.push(currentSpan);currentSpan={text:cellChar,fg:cellFg,bg:cellBg,attributes:cellAttrs,width:1}}}if(currentSpan)spans.push(currentSpan);lines.push({spans})}return lines}clear(bg2=RGBA.fromValues(0,0,0,1)){this.guard(),this.lib.bufferClear(this.bufferPtr,bg2)}setCell(x,y,char,fg2,bg2,attributes=0){this.guard(),this.lib.bufferSetCell(this.bufferPtr,x,y,char,fg2,bg2,attributes)}setCellWithAlphaBlending(x,y,char,fg2,bg2,attributes=0){this.guard(),this.lib.bufferSetCellWithAlphaBlending(this.bufferPtr,x,y,char,fg2,bg2,attributes)}drawText(text,x,y,fg2,bg2,attributes=0,selection2){if(this.guard(),!selection2){this.lib.bufferDrawText(this.bufferPtr,text,x,y,fg2,bg2,attributes);return}let{start:start3,end}=selection2,selectionBg,selectionFg;if(selection2.bgColor)selectionBg=selection2.bgColor,selectionFg=selection2.fgColor||fg2;else{let defaultBg=bg2||RGBA.fromValues(0,0,0,0);selectionFg=defaultBg.a>0?defaultBg:RGBA.fromValues(0,0,0,1),selectionBg=fg2}if(start3>0){let beforeText=text.slice(0,start3);this.lib.bufferDrawText(this.bufferPtr,beforeText,x,y,fg2,bg2,attributes)}if(end>start3){let selectedText=text.slice(start3,end);this.lib.bufferDrawText(this.bufferPtr,selectedText,x+start3,y,selectionFg,selectionBg,attributes)}if(end<text.length){let afterText=text.slice(end);this.lib.bufferDrawText(this.bufferPtr,afterText,x+end,y,fg2,bg2,attributes)}}fillRect(x,y,width,height2,bg2){this.lib.bufferFillRect(this.bufferPtr,x,y,width,height2,bg2)}colorMatrix(matrix,cellMask,strength=1,target=3){if(this.guard(),matrix.length!==16)throw RangeError(`colorMatrix matrix must have length 16, got ${matrix.length}`);let cellMaskCount=Math.floor(cellMask.length/3);this.lib.bufferColorMatrix(this.bufferPtr,ptr(matrix),ptr(cellMask),cellMaskCount,strength,target)}colorMatrixUniform(matrix,strength=1,target=3){if(this.guard(),matrix.length!==16)throw RangeError(`colorMatrixUniform matrix must have length 16, got ${matrix.length}`);if(strength===0)return;this.lib.bufferColorMatrixUniform(this.bufferPtr,ptr(matrix),strength,target)}drawFrameBuffer(destX,destY,frameBuffer,sourceX,sourceY,sourceWidth,sourceHeight){this.guard(),this.lib.drawFrameBuffer(this.bufferPtr,destX,destY,frameBuffer.ptr,sourceX,sourceY,sourceWidth,sourceHeight)}destroy(){if(this._destroyed)return;this._destroyed=!0,this.lib.destroyOptimizedBuffer(this.bufferPtr)}drawTextBuffer(textBufferView,x,y){this.guard(),this.lib.bufferDrawTextBufferView(this.bufferPtr,textBufferView.ptr,x,y)}drawEditorView(editorView,x,y){this.guard(),this.lib.bufferDrawEditorView(this.bufferPtr,editorView.ptr,x,y)}drawSuperSampleBuffer(x,y,pixelDataPtr,pixelDataLength,format,alignedBytesPerRow){this.guard(),this.lib.bufferDrawSuperSampleBuffer(this.bufferPtr,x,y,pixelDataPtr,pixelDataLength,format,alignedBytesPerRow)}drawPackedBuffer(dataPtr,dataLen,posX,posY,terminalWidthCells,terminalHeightCells){this.guard(),this.lib.bufferDrawPackedBuffer(this.bufferPtr,dataPtr,dataLen,posX,posY,terminalWidthCells,terminalHeightCells)}drawGrayscaleBuffer(posX,posY,intensities,srcWidth,srcHeight,fg2=null,bg2=null){this.guard(),this.lib.bufferDrawGrayscaleBuffer(this.bufferPtr,posX,posY,ptr(intensities),srcWidth,srcHeight,fg2,bg2)}drawGrayscaleBufferSupersampled(posX,posY,intensities,srcWidth,srcHeight,fg2=null,bg2=null){this.guard(),this.lib.bufferDrawGrayscaleBufferSupersampled(this.bufferPtr,posX,posY,ptr(intensities),srcWidth,srcHeight,fg2,bg2)}resize(width,height2){if(this.guard(),this._width===width&&this._height===height2)return;this._width=width,this._height=height2,this._rawBuffers=null,this._rawColorTags=null,this.lib.bufferResize(this.bufferPtr,width,height2)}drawBox(options){this.guard();let style=parseBorderStyle(options.borderStyle,"single"),borderChars=options.customBorderChars??BorderCharArrays[style],packedOptions=packDrawOptions(options.border,options.shouldFill??!1,options.titleAlignment||"left",options.bottomTitleAlignment||"left");this.lib.bufferDrawBox(this.bufferPtr,options.x,options.y,options.width,options.height,borderChars,packedOptions,options.borderColor,options.backgroundColor,options.title??null,options.bottomTitle??null)}pushScissorRect(x,y,width,height2){this.guard(),this.lib.bufferPushScissorRect(this.bufferPtr,x,y,width,height2)}popScissorRect(){this.guard(),this.lib.bufferPopScissorRect(this.bufferPtr)}clearScissorRects(){this.guard(),this.lib.bufferClearScissorRects(this.bufferPtr)}pushOpacity(opacity){this.guard(),this.lib.bufferPushOpacity(this.bufferPtr,Math.max(0,Math.min(1,opacity)))}popOpacity(){this.guard(),this.lib.bufferPopOpacity(this.bufferPtr)}getCurrentOpacity(){return this.guard(),this.lib.bufferGetCurrentOpacity(this.bufferPtr)}clearOpacity(){this.guard(),this.lib.bufferClearOpacity(this.bufferPtr)}encodeUnicode(text){return this.guard(),this.lib.encodeUnicode(text,this._widthMethod)}freeUnicode(encoded){this.guard(),this.lib.freeUnicode(encoded)}drawGrid(options){this.guard();let columnCount=Math.max(0,options.columnOffsets.length-1),rowCount=Math.max(0,options.rowOffsets.length-1);this.lib.bufferDrawGrid(this.bufferPtr,options.borderChars,options.borderFg,options.borderBg,options.columnOffsets,columnCount,options.rowOffsets,rowCount,{drawInner:options.drawInner,drawOuter:options.drawOuter})}drawChar(char,x,y,fg2,bg2,attributes=0){this.guard(),this.lib.bufferDrawChar(this.bufferPtr,char,x,y,fg2,bg2,attributes)}}function fatalError(...args){let message=args.join(" ");throw console.error("FATAL ERROR:",message),Error(message)}function isPrimitiveType(type2){return typeof type2==="string"&&primitiveKeys.includes(type2)}function isObjectPointerDef(type2){return typeof type2==="object"&&type2!==null&&type2.__type==="objectPointer"}function alignOffset(offset,align){return offset+(align-1)&~(align-1)}function enumTypeError(value){throw TypeError(`Invalid enum value: ${value}`)}function defineEnum(mapping,base="u32"){let reverse2=Object.fromEntries(Object.entries(mapping).map(([k,v])=>[v,k]));return{__type:"enum",type:base,to(value){return typeof value==="number"?value:mapping[value]??enumTypeError(String(value))},from(value){return reverse2[value]??enumTypeError(String(value))},enum:mapping}}function isEnum(type2){return typeof type2==="object"&&type2.__type==="enum"}function isStruct(type2){return typeof type2==="object"&&type2.__type==="struct"}function primitivePackers(type2){let pack,unpack;switch(type2){case"u8":pack=(view,off,val)=>view.setUint8(off,val),unpack=(view,off)=>view.getUint8(off);break;case"bool_u8":pack=(view,off,val)=>view.setUint8(off,val?1:0),unpack=(view,off)=>Boolean(view.getUint8(off));break;case"bool_u32":pack=(view,off,val)=>view.setUint32(off,val?1:0,!0),unpack=(view,off)=>Boolean(view.getUint32(off,!0));break;case"u16":pack=(view,off,val)=>view.setUint16(off,val,!0),unpack=(view,off)=>view.getUint16(off,!0);break;case"i16":pack=(view,off,val)=>view.setInt16(off,val,!0),unpack=(view,off)=>view.getInt16(off,!0);break;case"u32":pack=(view,off,val)=>view.setUint32(off,val,!0),unpack=(view,off)=>view.getUint32(off,!0);break;case"i32":pack=(view,off,val)=>view.setInt32(off,val,!0),unpack=(view,off)=>view.getInt32(off,!0);break;case"u64":pack=(view,off,val)=>view.setBigUint64(off,BigInt(val),!0),unpack=(view,off)=>view.getBigUint64(off,!0);break;case"f32":pack=(view,off,val)=>view.setFloat32(off,val,!0),unpack=(view,off)=>view.getFloat32(off,!0);break;case"f64":pack=(view,off,val)=>view.setFloat64(off,val,!0),unpack=(view,off)=>view.getFloat64(off,!0);break;case"pointer":pack=(view,off,val)=>{pointerSize===8?view.setBigUint64(off,val?BigInt(val):0n,!0):view.setUint32(off,val?Number(val):0,!0)},unpack=(view,off)=>{let bint=pointerSize===8?view.getBigUint64(off,!0):BigInt(view.getUint32(off,!0));return Number(bint)};break;default:fatalError(`Unsupported primitive type: ${type2}`)}return{pack,unpack}}function packObjectArray(val){let buffer2=new ArrayBuffer(val.length*pointerSize),bufferView=new DataView(buffer2);for(let i2=0;i2<val.length;i2++){let ptrValue=val[i2]?.ptr??null;pointerPacker(bufferView,i2*pointerSize,ptrValue)}return bufferView}function defineStruct(fields,structDefOptions){let offset=0,maxAlign=1,layout=[],lengthOfFields={},lengthOfRequested=[],arrayFieldsMetadata={};for(let[name,typeOrStruct,options={}]of fields){if(options.condition&&!options.condition())continue;let size=0,align=0,pack,unpack,needsLengthOf=!1,lengthOfDef=null;if(isPrimitiveType(typeOrStruct))size=typeSizes[typeOrStruct],align=typeAlignments[typeOrStruct],{pack,unpack}=primitivePackers(typeOrStruct);else if(typeof typeOrStruct==="string"&&typeOrStruct==="cstring")size=pointerSize,align=pointerSize,pack=(view,off,val)=>{let bufPtr=val?ptr2(encoder.encode(val+"\x00")):null;pointerPacker(view,off,bufPtr)},unpack=(view,off)=>{return pointerUnpacker(view,off)};else if(typeof typeOrStruct==="string"&&typeOrStruct==="char*")size=pointerSize,align=pointerSize,pack=(view,off,val)=>{let bufPtr=val?ptr2(encoder.encode(val)):null;pointerPacker(view,off,bufPtr)},unpack=(view,off)=>{return pointerUnpacker(view,off)},needsLengthOf=!0;else if(isEnum(typeOrStruct)){let base=typeOrStruct.type;size=typeSizes[base],align=typeAlignments[base];let{pack:packEnum}=primitivePackers(base);pack=(view,off,val)=>{let num=typeOrStruct.to(val);packEnum(view,off,num)},unpack=(view,off)=>{let raw=typeGetters[base](view,off);return typeOrStruct.from(raw)}}else if(isStruct(typeOrStruct))if(options.asPointer===!0)size=pointerSize,align=pointerSize,pack=(view,off,val,obj,options2)=>{if(!val){pointerPacker(view,off,null);return}let nestedBuf=typeOrStruct.pack(val,options2);pointerPacker(view,off,ptr2(nestedBuf))},unpack=(view,off)=>{throw Error("Not implemented yet")};else size=typeOrStruct.size,align=typeOrStruct.align,pack=(view,off,val,obj,options2)=>{let nestedBuf=typeOrStruct.pack(val,options2),nestedView=new Uint8Array(nestedBuf);new Uint8Array(view.buffer).set(nestedView,off)},unpack=(view,off)=>{let slice=view.buffer.slice(off,off+size);return typeOrStruct.unpack(slice)};else if(isObjectPointerDef(typeOrStruct))size=pointerSize,align=pointerSize,pack=(view,off,value)=>{let ptrValue=value?.ptr??null;if(ptrValue===void 0)console.warn(`Field '${name}' expected object with '.ptr' property, but got undefined pointer value from:`,value),pointerPacker(view,off,null);else pointerPacker(view,off,ptrValue)},unpack=(view,off)=>{return pointerUnpacker(view,off)};else if(Array.isArray(typeOrStruct)&&typeOrStruct.length===1&&typeOrStruct[0]!==void 0){let[def]=typeOrStruct;size=pointerSize,align=pointerSize;let arrayElementSize;if(isEnum(def))arrayElementSize=typeSizes[def.type],pack=(view,off,val,obj)=>{if(!val||val.length===0){pointerPacker(view,off,null);return}let buffer2=new ArrayBuffer(val.length*arrayElementSize),bufferView=new DataView(buffer2);for(let i2=0;i2<val.length;i2++){let num=def.to(val[i2]);bufferView.setUint32(i2*arrayElementSize,num,!0)}pointerPacker(view,off,ptr2(buffer2))},unpack=null,needsLengthOf=!0,lengthOfDef=def;else if(isStruct(def))arrayElementSize=def.size,pack=(view,off,val,obj,options2)=>{if(!val||val.length===0){pointerPacker(view,off,null);return}let buffer2=new ArrayBuffer(val.length*arrayElementSize),bufferView=new DataView(buffer2);for(let i2=0;i2<val.length;i2++)def.packInto(val[i2],bufferView,i2*arrayElementSize,options2);pointerPacker(view,off,ptr2(buffer2))},unpack=(view,off)=>{throw Error("Not implemented yet")};else if(isPrimitiveType(def)){arrayElementSize=typeSizes[def];let{pack:primitivePack}=primitivePackers(def);pack=(view,off,val)=>{if(!val||val.length===0){pointerPacker(view,off,null);return}let buffer2=new ArrayBuffer(val.length*arrayElementSize),bufferView=new DataView(buffer2);for(let i2=0;i2<val.length;i2++)primitivePack(bufferView,i2*arrayElementSize,val[i2]);pointerPacker(view,off,ptr2(buffer2))},unpack=null,needsLengthOf=!0,lengthOfDef=def}else if(isObjectPointerDef(def))arrayElementSize=pointerSize,pack=(view,off,val)=>{if(!val||val.length===0){pointerPacker(view,off,null);return}let packedView=packObjectArray(val);pointerPacker(view,off,ptr2(packedView.buffer))},unpack=()=>{throw Error("not implemented yet")};else throw Error(`Unsupported array element type for ${name}: ${JSON.stringify(def)}`);let lengthOfField=Object.values(lengthOfFields).find((f)=>f.lengthOf===name);if(lengthOfField&&isPrimitiveType(lengthOfField.type)){let{pack:lengthPack}=primitivePackers(lengthOfField.type);arrayFieldsMetadata[name]={elementSize:arrayElementSize,arrayOffset:offset,lengthOffset:lengthOfField.offset,lengthPack}}}else throw Error(`Unsupported field type for ${name}: ${JSON.stringify(typeOrStruct)}`);if(offset=alignOffset(offset,align),options.unpackTransform){let originalUnpack=unpack;unpack=(view,off)=>options.unpackTransform(originalUnpack(view,off))}if(options.packTransform){let originalPack=pack;pack=(view,off,val,obj,packOptions)=>originalPack(view,off,options.packTransform(val),obj,packOptions)}if(options.optional){let originalPack=pack;if(isStruct(typeOrStruct)&&!options.asPointer)pack=(view,off,val,obj,packOptions)=>{if(val||options.mapOptionalInline)originalPack(view,off,val,obj,packOptions)};else pack=(view,off,val,obj,packOptions)=>originalPack(view,off,val??0,obj,packOptions)}if(options.lengthOf){let originalPack=pack;pack=(view,off,val,obj,packOptions)=>{let targetValue=obj[options.lengthOf],length=0;if(targetValue)if(typeof targetValue==="string")length=Buffer.byteLength(targetValue);else length=targetValue.length;return originalPack(view,off,length,obj,packOptions)}}let validateFunctions;if(options.validate)validateFunctions=Array.isArray(options.validate)?options.validate:[options.validate];let layoutField={name,offset,size,align,validate:validateFunctions,optional:!!options.optional||!!options.lengthOf||options.default!==void 0,default:options.default,pack,unpack,type:typeOrStruct,lengthOf:options.lengthOf};if(layout.push(layoutField),options.lengthOf)lengthOfFields[options.lengthOf]=layoutField;if(needsLengthOf){let def=typeof typeOrStruct==="string"&&typeOrStruct==="char*"?"char*":lengthOfDef;if(!def)fatalError(`Internal error: needsLengthOf=true but def is null for ${name}`);lengthOfRequested.push({requester:layoutField,def})}offset+=size,maxAlign=Math.max(maxAlign,align)}for(let{requester,def}of lengthOfRequested){let lengthOfField=lengthOfFields[requester.name];if(!lengthOfField){if(def==="char*")continue;throw Error(`lengthOf field not found for array field ${requester.name}`)}if(def==="char*")requester.unpack=(view,off)=>{let ptrAddress=pointerUnpacker(view,off),length=lengthOfField.unpack(view,lengthOfField.offset);if(ptrAddress===0)return null;let byteLength=typeof length==="bigint"?Number(length):length;if(byteLength===0)return"";let buffer2=toArrayBuffer2(ptrAddress,0,byteLength);return decoder.decode(buffer2)};else if(isPrimitiveType(def)){let elemSize=typeSizes[def],{unpack:primitiveUnpack}=primitivePackers(def);requester.unpack=(view,off)=>{let result2=[],length=lengthOfField.unpack(view,lengthOfField.offset),ptrAddress=pointerUnpacker(view,off);if(ptrAddress===0n&&length>0)throw Error(`Array field ${requester.name} has null pointer but length ${length}.`);if(ptrAddress===0n||length===0)return[];let buffer2=toArrayBuffer2(ptrAddress,0,length*elemSize),bufferView=new DataView(buffer2);for(let i2=0;i2<length;i2++)result2.push(primitiveUnpack(bufferView,i2*elemSize));return result2}}else{let elemSize=def.type==="u32"?4:8;requester.unpack=(view,off)=>{let result2=[],length=lengthOfField.unpack(view,lengthOfField.offset),ptrAddress=pointerUnpacker(view,off);if(ptrAddress===0n&&length>0)throw Error(`Array field ${requester.name} has null pointer but length ${length}.`);if(ptrAddress===0n||length===0)return[];let buffer2=toArrayBuffer2(ptrAddress,0,length*elemSize),bufferView=new DataView(buffer2);for(let i2=0;i2<length;i2++)result2.push(def.from(bufferView.getUint32(i2*elemSize,!0)));return result2}}}let totalSize=alignOffset(offset,maxAlign),description=layout.map((f)=>({name:f.name,offset:f.offset,size:f.size,align:f.align,optional:f.optional,type:f.type,lengthOf:f.lengthOf})),layoutByName=new Map(description.map((f)=>[f.name,f])),arrayFields=new Map(Object.entries(arrayFieldsMetadata));return{__type:"struct",size:totalSize,align:maxAlign,hasMapValue:!!structDefOptions?.mapValue,layoutByName,arrayFields,pack(obj,options){let buf=new ArrayBuffer(totalSize),view=new DataView(buf),mappedObj=obj;if(structDefOptions?.mapValue)mappedObj=structDefOptions.mapValue(obj);for(let field of layout){let value=mappedObj[field.name]??field.default;if(!field.optional&&value===void 0)fatalError(`Packing non-optional field '${field.name}' but value is undefined (and no default provided)`);if(field.validate)for(let validateFn of field.validate)validateFn(value,field.name,{hints:options?.validationHints,input:mappedObj});field.pack(view,field.offset,value,mappedObj,options)}return view.buffer},packInto(obj,view,offset2,options){let mappedObj=obj;if(structDefOptions?.mapValue)mappedObj=structDefOptions.mapValue(obj);for(let field of layout){let value=mappedObj[field.name]??field.default;if(!field.optional&&value===void 0)console.warn(`packInto missing value for non-optional field '${field.name}' at offset ${offset2+field.offset}. Writing default or zero.`);if(field.validate)for(let validateFn of field.validate)validateFn(value,field.name,{hints:options?.validationHints,input:mappedObj});field.pack(view,offset2+field.offset,value,mappedObj,options)}},unpack(buf){if(buf.byteLength<totalSize)fatalError(`Buffer size (${buf.byteLength}) is smaller than struct size (${totalSize}) for unpacking.`);let view=new DataView(buf),result2=structDefOptions?.default?{...structDefOptions.default}:{};for(let field of layout){if(!field.unpack)continue;try{result2[field.name]=field.unpack(view,field.offset)}catch(e){throw console.error(`Error unpacking field '${field.name}' at offset ${field.offset}:`,e),e}}if(structDefOptions?.reduceValue)return structDefOptions.reduceValue(result2);return result2},packList(objects,options){if(objects.length===0)return new ArrayBuffer(0);let buffer2=new ArrayBuffer(totalSize*objects.length),view=new DataView(buffer2);for(let i2=0;i2<objects.length;i2++){let mappedObj=objects[i2];if(structDefOptions?.mapValue)mappedObj=structDefOptions.mapValue(objects[i2]);for(let field of layout){let value=mappedObj[field.name]??field.default;if(!field.optional&&value===void 0)fatalError(`Packing non-optional field '${field.name}' at index ${i2} but value is undefined (and no default provided)`);if(field.validate)for(let validateFn of field.validate)validateFn(value,field.name,{hints:options?.validationHints,input:mappedObj});field.pack(view,i2*totalSize+field.offset,value,mappedObj,options)}}return buffer2},unpackList(buf,count){if(count===0)return[];let expectedSize=totalSize*count;if(buf.byteLength<expectedSize)fatalError(`Buffer size (${buf.byteLength}) is smaller than expected size (${expectedSize}) for unpacking ${count} structs.`);let view=new DataView(buf),results=[];for(let i2=0;i2<count;i2++){let offset2=i2*totalSize,result2=structDefOptions?.default?{...structDefOptions.default}:{};for(let field of layout){if(!field.unpack)continue;try{result2[field.name]=field.unpack(view,offset2+field.offset)}catch(e){throw console.error(`Error unpacking field '${field.name}' at index ${i2}, offset ${offset2+field.offset}:`,e),e}}if(structDefOptions?.reduceValue)results.push(structDefOptions.reduceValue(result2));else results.push(result2)}return results},describe(){return description}}}function toPointer(value){if(typeof value==="bigint"){if(value>BigInt(Number.MAX_SAFE_INTEGER))throw Error("Pointer exceeds safe integer range");return Number(value)}return value}function toNumber(value){return typeof value==="bigint"?Number(value):value}function getOpenTUILib(libPath){let rawSymbols=dlopen(libPath||targetLibPath,{setLogCallback:{args:["ptr"],returns:"void"},setEventCallback:{args:["ptr"],returns:"void"},createRenderer:{args:["u32","u32","bool","bool"],returns:"ptr"},setTerminalEnvVar:{args:["ptr","ptr","usize","ptr","usize"],returns:"bool"},destroyRenderer:{args:["ptr"],returns:"void"},setUseThread:{args:["ptr","bool"],returns:"void"},setClearOnShutdown:{args:["ptr","bool"],returns:"void"},setBackgroundColor:{args:["ptr","ptr"],returns:"void"},setRenderOffset:{args:["ptr","u32"],returns:"void"},resetSplitScrollback:{args:["ptr","u32","u32"],returns:"u32"},syncSplitScrollback:{args:["ptr","u32"],returns:"u32"},setPendingSplitFooterTransition:{args:["ptr","u8","u32","u32","u32","u32"],returns:"void"},clearPendingSplitFooterTransition:{args:["ptr"],returns:"void"},updateStats:{args:["ptr","f64","u32","f64"],returns:"void"},updateMemoryStats:{args:["ptr","u32","u32","u32"],returns:"void"},render:{args:["ptr","bool"],returns:"void"},repaintSplitFooter:{args:["ptr","u32","bool"],returns:"u32"},commitSplitFooterSnapshot:{args:["ptr","ptr","u32","bool","bool","u32","bool","bool","bool"],returns:"u32"},getNextBuffer:{args:["ptr"],returns:"ptr"},getCurrentBuffer:{args:["ptr"],returns:"ptr"},rendererSetPaletteState:{args:["ptr","ptr","usize","ptr","ptr","u32"],returns:"void"},queryPixelResolution:{args:["ptr"],returns:"void"},queryThemeColors:{args:["ptr"],returns:"void"},createOptimizedBuffer:{args:["u32","u32","bool","u8","ptr","usize"],returns:"ptr"},destroyOptimizedBuffer:{args:["ptr"],returns:"void"},drawFrameBuffer:{args:["ptr","i32","i32","ptr","u32","u32","u32","u32"],returns:"void"},getBufferWidth:{args:["ptr"],returns:"u32"},getBufferHeight:{args:["ptr"],returns:"u32"},bufferClear:{args:["ptr","ptr"],returns:"void"},bufferGetCharPtr:{args:["ptr"],returns:"ptr"},bufferGetFgPtr:{args:["ptr"],returns:"ptr"},bufferGetBgPtr:{args:["ptr"],returns:"ptr"},bufferGetFgTagPtr:{args:["ptr"],returns:"ptr"},bufferGetBgTagPtr:{args:["ptr"],returns:"ptr"},bufferGetAttributesPtr:{args:["ptr"],returns:"ptr"},bufferGetRespectAlpha:{args:["ptr"],returns:"bool"},bufferSetRespectAlpha:{args:["ptr","bool"],returns:"void"},bufferGetId:{args:["ptr","ptr","usize"],returns:"usize"},bufferGetRealCharSize:{args:["ptr"],returns:"u32"},bufferWriteResolvedChars:{args:["ptr","ptr","usize","bool"],returns:"u32"},bufferDrawText:{args:["ptr","ptr","u32","u32","u32","ptr","ptr","u32"],returns:"void"},bufferSetCellWithAlphaBlending:{args:["ptr","u32","u32","u32","ptr","ptr","u32"],returns:"void"},bufferSetCell:{args:["ptr","u32","u32","u32","ptr","ptr","u32"],returns:"void"},bufferFillRect:{args:["ptr","u32","u32","u32","u32","ptr"],returns:"void"},bufferColorMatrix:{args:["ptr","ptr","ptr","usize","f32","u8"],returns:"void"},bufferColorMatrixUniform:{args:["ptr","ptr","f32","u8"],returns:"void"},bufferResize:{args:["ptr","u32","u32"],returns:"void"},linkAlloc:{args:["ptr","u32"],returns:"u32"},linkGetUrl:{args:["u32","ptr","u32"],returns:"u32"},attributesWithLink:{args:["u32","u32"],returns:"u32"},attributesGetLinkId:{args:["u32"],returns:"u32"},resizeRenderer:{args:["ptr","u32","u32"],returns:"void"},setCursorPosition:{args:["ptr","i32","i32","bool"],returns:"void"},setCursorColor:{args:["ptr","ptr"],returns:"void"},getCursorState:{args:["ptr","ptr"],returns:"void"},setCursorStyleOptions:{args:["ptr","ptr"],returns:"void"},setDebugOverlay:{args:["ptr","bool","u8"],returns:"void"},clearTerminal:{args:["ptr"],returns:"void"},setTerminalTitle:{args:["ptr","ptr","usize"],returns:"void"},copyToClipboardOSC52:{args:["ptr","u8","ptr","usize"],returns:"bool"},clearClipboardOSC52:{args:["ptr","u8"],returns:"bool"},bufferDrawSuperSampleBuffer:{args:["ptr","u32","u32","ptr","usize","u8","u32"],returns:"void"},bufferDrawPackedBuffer:{args:["ptr","ptr","usize","u32","u32","u32","u32"],returns:"void"},bufferDrawGrayscaleBuffer:{args:["ptr","i32","i32","ptr","u32","u32","ptr","ptr"],returns:"void"},bufferDrawGrayscaleBufferSupersampled:{args:["ptr","i32","i32","ptr","u32","u32","ptr","ptr"],returns:"void"},bufferDrawGrid:{args:["ptr","ptr","ptr","ptr","ptr","u32","ptr","u32","ptr"],returns:"void"},bufferDrawBox:{args:["ptr","i32","i32","u32","u32","ptr","u32","ptr","ptr","ptr","u32","ptr","u32"],returns:"void"},bufferPushScissorRect:{args:["ptr","i32","i32","u32","u32"],returns:"void"},bufferPopScissorRect:{args:["ptr"],returns:"void"},bufferClearScissorRects:{args:["ptr"],returns:"void"},bufferPushOpacity:{args:["ptr","f32"],returns:"void"},bufferPopOpacity:{args:["ptr"],returns:"void"},bufferGetCurrentOpacity:{args:["ptr"],returns:"f32"},bufferClearOpacity:{args:["ptr"],returns:"void"},addToHitGrid:{args:["ptr","i32","i32","u32","u32","u32"],returns:"void"},clearCurrentHitGrid:{args:["ptr"],returns:"void"},hitGridPushScissorRect:{args:["ptr","i32","i32","u32","u32"],returns:"void"},hitGridPopScissorRect:{args:["ptr"],returns:"void"},hitGridClearScissorRects:{args:["ptr"],returns:"void"},addToCurrentHitGridClipped:{args:["ptr","i32","i32","u32","u32","u32"],returns:"void"},checkHit:{args:["ptr","u32","u32"],returns:"u32"},getHitGridDirty:{args:["ptr"],returns:"bool"},dumpHitGrid:{args:["ptr"],returns:"void"},dumpBuffers:{args:["ptr","i64"],returns:"void"},dumpStdoutBuffer:{args:["ptr","i64"],returns:"void"},restoreTerminalModes:{args:["ptr"],returns:"void"},enableMouse:{args:["ptr","bool"],returns:"void"},disableMouse:{args:["ptr"],returns:"void"},enableKittyKeyboard:{args:["ptr","u8"],returns:"void"},disableKittyKeyboard:{args:["ptr"],returns:"void"},setKittyKeyboardFlags:{args:["ptr","u8"],returns:"void"},getKittyKeyboardFlags:{args:["ptr"],returns:"u8"},setupTerminal:{args:["ptr","bool"],returns:"void"},suspendRenderer:{args:["ptr"],returns:"void"},resumeRenderer:{args:["ptr"],returns:"void"},writeOut:{args:["ptr","ptr","u64"],returns:"void"},createTextBuffer:{args:["u8"],returns:"ptr"},destroyTextBuffer:{args:["ptr"],returns:"void"},textBufferGetLength:{args:["ptr"],returns:"u32"},textBufferGetByteSize:{args:["ptr"],returns:"u32"},textBufferReset:{args:["ptr"],returns:"void"},textBufferClear:{args:["ptr"],returns:"void"},textBufferSetDefaultFg:{args:["ptr","ptr"],returns:"void"},textBufferSetDefaultBg:{args:["ptr","ptr"],returns:"void"},textBufferSetDefaultAttributes:{args:["ptr","ptr"],returns:"void"},textBufferResetDefaults:{args:["ptr"],returns:"void"},textBufferGetTabWidth:{args:["ptr"],returns:"u8"},textBufferSetTabWidth:{args:["ptr","u8"],returns:"void"},textBufferRegisterMemBuffer:{args:["ptr","ptr","usize","bool"],returns:"u16"},textBufferReplaceMemBuffer:{args:["ptr","u8","ptr","usize","bool"],returns:"bool"},textBufferClearMemRegistry:{args:["ptr"],returns:"void"},textBufferSetTextFromMem:{args:["ptr","u8"],returns:"void"},textBufferAppend:{args:["ptr","ptr","usize"],returns:"void"},textBufferAppendFromMemId:{args:["ptr","u8"],returns:"void"},textBufferLoadFile:{args:["ptr","ptr","usize"],returns:"bool"},textBufferSetStyledText:{args:["ptr","ptr","usize"],returns:"void"},textBufferGetLineCount:{args:["ptr"],returns:"u32"},textBufferGetPlainText:{args:["ptr","ptr","usize"],returns:"usize"},textBufferAddHighlightByCharRange:{args:["ptr","ptr"],returns:"void"},textBufferAddHighlight:{args:["ptr","u32","ptr"],returns:"void"},textBufferRemoveHighlightsByRef:{args:["ptr","u16"],returns:"void"},textBufferClearLineHighlights:{args:["ptr","u32"],returns:"void"},textBufferClearAllHighlights:{args:["ptr"],returns:"void"},textBufferSetSyntaxStyle:{args:["ptr","ptr"],returns:"void"},textBufferGetLineHighlightsPtr:{args:["ptr","u32","ptr"],returns:"ptr"},textBufferFreeLineHighlights:{args:["ptr","usize"],returns:"void"},textBufferGetHighlightCount:{args:["ptr"],returns:"u32"},textBufferGetTextRange:{args:["ptr","u32","u32","ptr","usize"],returns:"usize"},textBufferGetTextRangeByCoords:{args:["ptr","u32","u32","u32","u32","ptr","usize"],returns:"usize"},createTextBufferView:{args:["ptr"],returns:"ptr"},destroyTextBufferView:{args:["ptr"],returns:"void"},textBufferViewSetSelection:{args:["ptr","u32","u32","ptr","ptr"],returns:"void"},textBufferViewResetSelection:{args:["ptr"],returns:"void"},textBufferViewGetSelectionInfo:{args:["ptr"],returns:"u64"},textBufferViewSetLocalSelection:{args:["ptr","i32","i32","i32","i32","ptr","ptr"],returns:"bool"},textBufferViewUpdateSelection:{args:["ptr","u32","ptr","ptr"],returns:"void"},textBufferViewUpdateLocalSelection:{args:["ptr","i32","i32","i32","i32","ptr","ptr"],returns:"bool"},textBufferViewResetLocalSelection:{args:["ptr"],returns:"void"},textBufferViewSetWrapWidth:{args:["ptr","u32"],returns:"void"},textBufferViewSetWrapMode:{args:["ptr","u8"],returns:"void"},textBufferViewSetFirstLineOffset:{args:["ptr","u32"],returns:"void"},textBufferViewSetViewportSize:{args:["ptr","u32","u32"],returns:"void"},textBufferViewSetViewport:{args:["ptr","u32","u32","u32","u32"],returns:"void"},textBufferViewGetVirtualLineCount:{args:["ptr"],returns:"u32"},textBufferViewGetLineInfoDirect:{args:["ptr","ptr"],returns:"void"},textBufferViewGetLogicalLineInfoDirect:{args:["ptr","ptr"],returns:"void"},textBufferViewGetSelectedText:{args:["ptr","ptr","usize"],returns:"usize"},textBufferViewGetPlainText:{args:["ptr","ptr","usize"],returns:"usize"},textBufferViewSetTabIndicator:{args:["ptr","u32"],returns:"void"},textBufferViewSetTabIndicatorColor:{args:["ptr","ptr"],returns:"void"},textBufferViewSetTruncate:{args:["ptr","bool"],returns:"void"},textBufferViewMeasureForDimensions:{args:["ptr","u32","u32","ptr"],returns:"bool"},bufferDrawTextBufferView:{args:["ptr","ptr","i32","i32"],returns:"void"},bufferDrawEditorView:{args:["ptr","ptr","i32","i32"],returns:"void"},createEditorView:{args:["ptr","u32","u32"],returns:"ptr"},destroyEditorView:{args:["ptr"],returns:"void"},editorViewSetViewportSize:{args:["ptr","u32","u32"],returns:"void"},editorViewSetViewport:{args:["ptr","u32","u32","u32","u32","bool"],returns:"void"},editorViewGetViewport:{args:["ptr","ptr","ptr","ptr","ptr"],returns:"void"},editorViewSetScrollMargin:{args:["ptr","f32"],returns:"void"},editorViewSetWrapMode:{args:["ptr","u8"],returns:"void"},editorViewGetVirtualLineCount:{args:["ptr"],returns:"u32"},editorViewGetTotalVirtualLineCount:{args:["ptr"],returns:"u32"},editorViewGetTextBufferView:{args:["ptr"],returns:"ptr"},editorViewGetLineInfoDirect:{args:["ptr","ptr"],returns:"void"},editorViewGetLogicalLineInfoDirect:{args:["ptr","ptr"],returns:"void"},createEditBuffer:{args:["u8"],returns:"ptr"},destroyEditBuffer:{args:["ptr"],returns:"void"},editBufferSetText:{args:["ptr","ptr","usize"],returns:"void"},editBufferSetTextFromMem:{args:["ptr","u8"],returns:"void"},editBufferReplaceText:{args:["ptr","ptr","usize"],returns:"void"},editBufferReplaceTextFromMem:{args:["ptr","u8"],returns:"void"},editBufferGetText:{args:["ptr","ptr","usize"],returns:"usize"},editBufferInsertChar:{args:["ptr","ptr","usize"],returns:"void"},editBufferInsertText:{args:["ptr","ptr","usize"],returns:"void"},editBufferDeleteChar:{args:["ptr"],returns:"void"},editBufferDeleteCharBackward:{args:["ptr"],returns:"void"},editBufferDeleteRange:{args:["ptr","u32","u32","u32","u32"],returns:"void"},editBufferNewLine:{args:["ptr"],returns:"void"},editBufferDeleteLine:{args:["ptr"],returns:"void"},editBufferMoveCursorLeft:{args:["ptr"],returns:"void"},editBufferMoveCursorRight:{args:["ptr"],returns:"void"},editBufferMoveCursorUp:{args:["ptr"],returns:"void"},editBufferMoveCursorDown:{args:["ptr"],returns:"void"},editBufferGotoLine:{args:["ptr","u32"],returns:"void"},editBufferSetCursor:{args:["ptr","u32","u32"],returns:"void"},editBufferSetCursorToLineCol:{args:["ptr","u32","u32"],returns:"void"},editBufferSetCursorByOffset:{args:["ptr","u32"],returns:"void"},editBufferGetCursorPosition:{args:["ptr","ptr"],returns:"void"},editBufferGetId:{args:["ptr"],returns:"u16"},editBufferGetTextBuffer:{args:["ptr"],returns:"ptr"},editBufferDebugLogRope:{args:["ptr"],returns:"void"},editBufferUndo:{args:["ptr","ptr","usize"],returns:"usize"},editBufferRedo:{args:["ptr","ptr","usize"],returns:"usize"},editBufferCanUndo:{args:["ptr"],returns:"bool"},editBufferCanRedo:{args:["ptr"],returns:"bool"},editBufferClearHistory:{args:["ptr"],returns:"void"},editBufferClear:{args:["ptr"],returns:"void"},editBufferGetNextWordBoundary:{args:["ptr","ptr"],returns:"void"},editBufferGetPrevWordBoundary:{args:["ptr","ptr"],returns:"void"},editBufferGetEOL:{args:["ptr","ptr"],returns:"void"},editBufferOffsetToPosition:{args:["ptr","u32","ptr"],returns:"bool"},editBufferPositionToOffset:{args:["ptr","u32","u32"],returns:"u32"},editBufferGetLineStartOffset:{args:["ptr","u32"],returns:"u32"},editBufferGetTextRange:{args:["ptr","u32","u32","ptr","usize"],returns:"usize"},editBufferGetTextRangeByCoords:{args:["ptr","u32","u32","u32","u32","ptr","usize"],returns:"usize"},editorViewSetSelection:{args:["ptr","u32","u32","ptr","ptr"],returns:"void"},editorViewResetSelection:{args:["ptr"],returns:"void"},editorViewGetSelection:{args:["ptr"],returns:"u64"},editorViewSetLocalSelection:{args:["ptr","i32","i32","i32","i32","ptr","ptr","bool","bool"],returns:"bool"},editorViewUpdateSelection:{args:["ptr","u32","ptr","ptr"],returns:"void"},editorViewUpdateLocalSelection:{args:["ptr","i32","i32","i32","i32","ptr","ptr","bool","bool"],returns:"bool"},editorViewResetLocalSelection:{args:["ptr"],returns:"void"},editorViewGetSelectedTextBytes:{args:["ptr","ptr","usize"],returns:"usize"},editorViewGetCursor:{args:["ptr","ptr","ptr"],returns:"void"},editorViewGetText:{args:["ptr","ptr","usize"],returns:"usize"},editorViewGetVisualCursor:{args:["ptr","ptr"],returns:"void"},editorViewMoveUpVisual:{args:["ptr"],returns:"void"},editorViewMoveDownVisual:{args:["ptr"],returns:"void"},editorViewDeleteSelectedText:{args:["ptr"],returns:"void"},editorViewSetCursorByOffset:{args:["ptr","u32"],returns:"void"},editorViewGetNextWordBoundary:{args:["ptr","ptr"],returns:"void"},editorViewGetPrevWordBoundary:{args:["ptr","ptr"],returns:"void"},editorViewGetEOL:{args:["ptr","ptr"],returns:"void"},editorViewGetVisualSOL:{args:["ptr","ptr"],returns:"void"},editorViewGetVisualEOL:{args:["ptr","ptr"],returns:"void"},editorViewSetPlaceholderStyledText:{args:["ptr","ptr","usize"],returns:"void"},editorViewSetTabIndicator:{args:["ptr","u32"],returns:"void"},editorViewSetTabIndicatorColor:{args:["ptr","ptr"],returns:"void"},getArenaAllocatedBytes:{args:[],returns:"usize"},getBuildOptions:{args:["ptr"],returns:"void"},getAllocatorStats:{args:["ptr"],returns:"void"},createSyntaxStyle:{args:[],returns:"ptr"},destroySyntaxStyle:{args:["ptr"],returns:"void"},syntaxStyleRegister:{args:["ptr","ptr","usize","ptr","ptr","u32"],returns:"u32"},syntaxStyleResolveByName:{args:["ptr","ptr","usize"],returns:"u32"},syntaxStyleGetStyleCount:{args:["ptr"],returns:"usize"},getTerminalCapabilities:{args:["ptr","ptr"],returns:"void"},processCapabilityResponse:{args:["ptr","ptr","usize"],returns:"void"},encodeUnicode:{args:["ptr","usize","ptr","ptr","u8"],returns:"bool"},freeUnicode:{args:["ptr","usize"],returns:"void"},bufferDrawChar:{args:["ptr","u32","u32","u32","ptr","ptr","u32"],returns:"void"},createNativeSpanFeed:{args:["ptr"],returns:"ptr"},attachNativeSpanFeed:{args:["ptr"],returns:"i32"},destroyNativeSpanFeed:{args:["ptr"],returns:"void"},streamWrite:{args:["ptr","ptr","u64"],returns:"i32"},streamCommit:{args:["ptr"],returns:"i32"},streamDrainSpans:{args:["ptr","ptr","u32"],returns:"u32"},streamClose:{args:["ptr"],returns:"i32"},streamReserve:{args:["ptr","u32","ptr"],returns:"i32"},streamCommitReserved:{args:["ptr","u32"],returns:"i32"},streamSetOptions:{args:["ptr","ptr"],returns:"i32"},streamGetStats:{args:["ptr","ptr"],returns:"i32"},streamSetCallback:{args:["ptr","ptr"],returns:"void"}});if(env.OTUI_DEBUG_FFI||env.OTUI_TRACE_FFI)return{symbols:convertToDebugSymbols(rawSymbols.symbols)};return rawSymbols}function convertToDebugSymbols(symbols){if(!globalTraceSymbols)globalTraceSymbols={};if(env.OTUI_DEBUG_FFI&&!globalFFILogPath)globalFFILogPath=`ffi_otui_debug_${new Date().toISOString().replace(/[:.]/g,"-").replace(/T/,"_").split("Z")[0]}.log`;let debugSymbols={},hasTracing=!1;if(Object.entries(symbols).forEach(([key,value])=>{debugSymbols[key]=value}),env.OTUI_DEBUG_FFI&&globalFFILogPath){let logPath=globalFFILogPath,writeSync3=(msg)=>{writeFileSync28(logPath,msg+`
3069
+ `);for(let y=0;y<this._height;y++){let spans=[],currentSpan=null,lineChars=[...realTextLines[y]||""],charIdx=0;for(let x=0;x<this._width;x++){let i2=y*this._width+x,cp3=char[i2],cellFg=RGBA.fromValues(fg2[i2*4],fg2[i2*4+1],fg2[i2*4+2],fg2[i2*4+3],fgTag[i2]),cellBg=RGBA.fromValues(bg2[i2*4],bg2[i2*4+1],bg2[i2*4+2],bg2[i2*4+3],bgTag[i2]),cellAttrs=attributes[i2]&255,cellChar=(cp3&CHAR_FLAG_MASK)===CHAR_FLAG_CONTINUATION?"":lineChars[charIdx++]??" ";if(currentSpan&&currentSpan.fg.equals(cellFg)&&currentSpan.bg.equals(cellBg)&&currentSpan.attributes===cellAttrs)currentSpan.text+=cellChar,currentSpan.width+=1;else{if(currentSpan)spans.push(currentSpan);currentSpan={text:cellChar,fg:cellFg,bg:cellBg,attributes:cellAttrs,width:1}}}if(currentSpan)spans.push(currentSpan);lines.push({spans})}return lines}clear(bg2=RGBA.fromValues(0,0,0,1)){this.guard(),this.lib.bufferClear(this.bufferPtr,bg2)}setCell(x,y,char,fg2,bg2,attributes=0){this.guard(),this.lib.bufferSetCell(this.bufferPtr,x,y,char,fg2,bg2,attributes)}setCellWithAlphaBlending(x,y,char,fg2,bg2,attributes=0){this.guard(),this.lib.bufferSetCellWithAlphaBlending(this.bufferPtr,x,y,char,fg2,bg2,attributes)}drawText(text,x,y,fg2,bg2,attributes=0,selection2){if(this.guard(),!selection2){this.lib.bufferDrawText(this.bufferPtr,text,x,y,fg2,bg2,attributes);return}let{start:start3,end}=selection2,selectionBg,selectionFg;if(selection2.bgColor)selectionBg=selection2.bgColor,selectionFg=selection2.fgColor||fg2;else{let defaultBg=bg2||RGBA.fromValues(0,0,0,0);selectionFg=defaultBg.a>0?defaultBg:RGBA.fromValues(0,0,0,1),selectionBg=fg2}if(start3>0){let beforeText=text.slice(0,start3);this.lib.bufferDrawText(this.bufferPtr,beforeText,x,y,fg2,bg2,attributes)}if(end>start3){let selectedText=text.slice(start3,end);this.lib.bufferDrawText(this.bufferPtr,selectedText,x+start3,y,selectionFg,selectionBg,attributes)}if(end<text.length){let afterText=text.slice(end);this.lib.bufferDrawText(this.bufferPtr,afterText,x+end,y,fg2,bg2,attributes)}}fillRect(x,y,width,height2,bg2){this.lib.bufferFillRect(this.bufferPtr,x,y,width,height2,bg2)}colorMatrix(matrix,cellMask,strength=1,target=3){if(this.guard(),matrix.length!==16)throw RangeError(`colorMatrix matrix must have length 16, got ${matrix.length}`);let cellMaskCount=Math.floor(cellMask.length/3);this.lib.bufferColorMatrix(this.bufferPtr,ptr(matrix),ptr(cellMask),cellMaskCount,strength,target)}colorMatrixUniform(matrix,strength=1,target=3){if(this.guard(),matrix.length!==16)throw RangeError(`colorMatrixUniform matrix must have length 16, got ${matrix.length}`);if(strength===0)return;this.lib.bufferColorMatrixUniform(this.bufferPtr,ptr(matrix),strength,target)}drawFrameBuffer(destX,destY,frameBuffer,sourceX,sourceY,sourceWidth,sourceHeight){this.guard(),this.lib.drawFrameBuffer(this.bufferPtr,destX,destY,frameBuffer.ptr,sourceX,sourceY,sourceWidth,sourceHeight)}destroy(){if(this._destroyed)return;this._destroyed=!0,this.lib.destroyOptimizedBuffer(this.bufferPtr)}drawTextBuffer(textBufferView,x,y){this.guard(),this.lib.bufferDrawTextBufferView(this.bufferPtr,textBufferView.ptr,x,y)}drawEditorView(editorView,x,y){this.guard(),this.lib.bufferDrawEditorView(this.bufferPtr,editorView.ptr,x,y)}drawSuperSampleBuffer(x,y,pixelDataPtr,pixelDataLength,format,alignedBytesPerRow){this.guard(),this.lib.bufferDrawSuperSampleBuffer(this.bufferPtr,x,y,pixelDataPtr,pixelDataLength,format,alignedBytesPerRow)}drawPackedBuffer(dataPtr,dataLen,posX,posY,terminalWidthCells,terminalHeightCells){this.guard(),this.lib.bufferDrawPackedBuffer(this.bufferPtr,dataPtr,dataLen,posX,posY,terminalWidthCells,terminalHeightCells)}drawGrayscaleBuffer(posX,posY,intensities,srcWidth,srcHeight,fg2=null,bg2=null){this.guard(),this.lib.bufferDrawGrayscaleBuffer(this.bufferPtr,posX,posY,ptr(intensities),srcWidth,srcHeight,fg2,bg2)}drawGrayscaleBufferSupersampled(posX,posY,intensities,srcWidth,srcHeight,fg2=null,bg2=null){this.guard(),this.lib.bufferDrawGrayscaleBufferSupersampled(this.bufferPtr,posX,posY,ptr(intensities),srcWidth,srcHeight,fg2,bg2)}resize(width,height2){if(this.guard(),this._width===width&&this._height===height2)return;this._width=width,this._height=height2,this._rawBuffers=null,this._rawColorTags=null,this.lib.bufferResize(this.bufferPtr,width,height2)}drawBox(options){this.guard();let style=parseBorderStyle(options.borderStyle,"single"),borderChars=options.customBorderChars??BorderCharArrays[style],packedOptions=packDrawOptions(options.border,options.shouldFill??!1,options.titleAlignment||"left",options.bottomTitleAlignment||"left");this.lib.bufferDrawBox(this.bufferPtr,options.x,options.y,options.width,options.height,borderChars,packedOptions,options.borderColor,options.backgroundColor,options.title??null,options.bottomTitle??null)}pushScissorRect(x,y,width,height2){this.guard(),this.lib.bufferPushScissorRect(this.bufferPtr,x,y,width,height2)}popScissorRect(){this.guard(),this.lib.bufferPopScissorRect(this.bufferPtr)}clearScissorRects(){this.guard(),this.lib.bufferClearScissorRects(this.bufferPtr)}pushOpacity(opacity){this.guard(),this.lib.bufferPushOpacity(this.bufferPtr,Math.max(0,Math.min(1,opacity)))}popOpacity(){this.guard(),this.lib.bufferPopOpacity(this.bufferPtr)}getCurrentOpacity(){return this.guard(),this.lib.bufferGetCurrentOpacity(this.bufferPtr)}clearOpacity(){this.guard(),this.lib.bufferClearOpacity(this.bufferPtr)}encodeUnicode(text){return this.guard(),this.lib.encodeUnicode(text,this._widthMethod)}freeUnicode(encoded){this.guard(),this.lib.freeUnicode(encoded)}drawGrid(options){this.guard();let columnCount=Math.max(0,options.columnOffsets.length-1),rowCount=Math.max(0,options.rowOffsets.length-1);this.lib.bufferDrawGrid(this.bufferPtr,options.borderChars,options.borderFg,options.borderBg,options.columnOffsets,columnCount,options.rowOffsets,rowCount,{drawInner:options.drawInner,drawOuter:options.drawOuter})}drawChar(char,x,y,fg2,bg2,attributes=0){this.guard(),this.lib.bufferDrawChar(this.bufferPtr,char,x,y,fg2,bg2,attributes)}}function fatalError(...args){let message=args.join(" ");throw console.error("FATAL ERROR:",message),Error(message)}function isPrimitiveType(type2){return typeof type2==="string"&&primitiveKeys.includes(type2)}function isObjectPointerDef(type2){return typeof type2==="object"&&type2!==null&&type2.__type==="objectPointer"}function alignOffset(offset,align){return offset+(align-1)&~(align-1)}function enumTypeError(value){throw TypeError(`Invalid enum value: ${value}`)}function defineEnum(mapping,base="u32"){let reverse2=Object.fromEntries(Object.entries(mapping).map(([k,v])=>[v,k]));return{__type:"enum",type:base,to(value){return typeof value==="number"?value:mapping[value]??enumTypeError(String(value))},from(value){return reverse2[value]??enumTypeError(String(value))},enum:mapping}}function isEnum(type2){return typeof type2==="object"&&type2.__type==="enum"}function isStruct(type2){return typeof type2==="object"&&type2.__type==="struct"}function primitivePackers(type2){let pack,unpack;switch(type2){case"u8":pack=(view,off,val)=>view.setUint8(off,val),unpack=(view,off)=>view.getUint8(off);break;case"bool_u8":pack=(view,off,val)=>view.setUint8(off,val?1:0),unpack=(view,off)=>Boolean(view.getUint8(off));break;case"bool_u32":pack=(view,off,val)=>view.setUint32(off,val?1:0,!0),unpack=(view,off)=>Boolean(view.getUint32(off,!0));break;case"u16":pack=(view,off,val)=>view.setUint16(off,val,!0),unpack=(view,off)=>view.getUint16(off,!0);break;case"i16":pack=(view,off,val)=>view.setInt16(off,val,!0),unpack=(view,off)=>view.getInt16(off,!0);break;case"u32":pack=(view,off,val)=>view.setUint32(off,val,!0),unpack=(view,off)=>view.getUint32(off,!0);break;case"i32":pack=(view,off,val)=>view.setInt32(off,val,!0),unpack=(view,off)=>view.getInt32(off,!0);break;case"u64":pack=(view,off,val)=>view.setBigUint64(off,BigInt(val),!0),unpack=(view,off)=>view.getBigUint64(off,!0);break;case"f32":pack=(view,off,val)=>view.setFloat32(off,val,!0),unpack=(view,off)=>view.getFloat32(off,!0);break;case"f64":pack=(view,off,val)=>view.setFloat64(off,val,!0),unpack=(view,off)=>view.getFloat64(off,!0);break;case"pointer":pack=(view,off,val)=>{pointerSize===8?view.setBigUint64(off,val?BigInt(val):0n,!0):view.setUint32(off,val?Number(val):0,!0)},unpack=(view,off)=>{let bint=pointerSize===8?view.getBigUint64(off,!0):BigInt(view.getUint32(off,!0));return Number(bint)};break;default:fatalError(`Unsupported primitive type: ${type2}`)}return{pack,unpack}}function packObjectArray(val){let buffer2=new ArrayBuffer(val.length*pointerSize),bufferView=new DataView(buffer2);for(let i2=0;i2<val.length;i2++){let ptrValue=val[i2]?.ptr??null;pointerPacker(bufferView,i2*pointerSize,ptrValue)}return bufferView}function defineStruct(fields,structDefOptions){let offset=0,maxAlign=1,layout=[],lengthOfFields={},lengthOfRequested=[],arrayFieldsMetadata={};for(let[name,typeOrStruct,options={}]of fields){if(options.condition&&!options.condition())continue;let size=0,align=0,pack,unpack,needsLengthOf=!1,lengthOfDef=null;if(isPrimitiveType(typeOrStruct))size=typeSizes[typeOrStruct],align=typeAlignments[typeOrStruct],{pack,unpack}=primitivePackers(typeOrStruct);else if(typeof typeOrStruct==="string"&&typeOrStruct==="cstring")size=pointerSize,align=pointerSize,pack=(view,off,val)=>{let bufPtr=val?ptr2(encoder.encode(val+"\x00")):null;pointerPacker(view,off,bufPtr)},unpack=(view,off)=>{return pointerUnpacker(view,off)};else if(typeof typeOrStruct==="string"&&typeOrStruct==="char*")size=pointerSize,align=pointerSize,pack=(view,off,val)=>{let bufPtr=val?ptr2(encoder.encode(val)):null;pointerPacker(view,off,bufPtr)},unpack=(view,off)=>{return pointerUnpacker(view,off)},needsLengthOf=!0;else if(isEnum(typeOrStruct)){let base=typeOrStruct.type;size=typeSizes[base],align=typeAlignments[base];let{pack:packEnum}=primitivePackers(base);pack=(view,off,val)=>{let num=typeOrStruct.to(val);packEnum(view,off,num)},unpack=(view,off)=>{let raw=typeGetters[base](view,off);return typeOrStruct.from(raw)}}else if(isStruct(typeOrStruct))if(options.asPointer===!0)size=pointerSize,align=pointerSize,pack=(view,off,val,obj,options2)=>{if(!val){pointerPacker(view,off,null);return}let nestedBuf=typeOrStruct.pack(val,options2);pointerPacker(view,off,ptr2(nestedBuf))},unpack=(view,off)=>{throw Error("Not implemented yet")};else size=typeOrStruct.size,align=typeOrStruct.align,pack=(view,off,val,obj,options2)=>{let nestedBuf=typeOrStruct.pack(val,options2),nestedView=new Uint8Array(nestedBuf);new Uint8Array(view.buffer).set(nestedView,off)},unpack=(view,off)=>{let slice=view.buffer.slice(off,off+size);return typeOrStruct.unpack(slice)};else if(isObjectPointerDef(typeOrStruct))size=pointerSize,align=pointerSize,pack=(view,off,value)=>{let ptrValue=value?.ptr??null;if(ptrValue===void 0)console.warn(`Field '${name}' expected object with '.ptr' property, but got undefined pointer value from:`,value),pointerPacker(view,off,null);else pointerPacker(view,off,ptrValue)},unpack=(view,off)=>{return pointerUnpacker(view,off)};else if(Array.isArray(typeOrStruct)&&typeOrStruct.length===1&&typeOrStruct[0]!==void 0){let[def]=typeOrStruct;size=pointerSize,align=pointerSize;let arrayElementSize;if(isEnum(def))arrayElementSize=typeSizes[def.type],pack=(view,off,val,obj)=>{if(!val||val.length===0){pointerPacker(view,off,null);return}let buffer2=new ArrayBuffer(val.length*arrayElementSize),bufferView=new DataView(buffer2);for(let i2=0;i2<val.length;i2++){let num=def.to(val[i2]);bufferView.setUint32(i2*arrayElementSize,num,!0)}pointerPacker(view,off,ptr2(buffer2))},unpack=null,needsLengthOf=!0,lengthOfDef=def;else if(isStruct(def))arrayElementSize=def.size,pack=(view,off,val,obj,options2)=>{if(!val||val.length===0){pointerPacker(view,off,null);return}let buffer2=new ArrayBuffer(val.length*arrayElementSize),bufferView=new DataView(buffer2);for(let i2=0;i2<val.length;i2++)def.packInto(val[i2],bufferView,i2*arrayElementSize,options2);pointerPacker(view,off,ptr2(buffer2))},unpack=(view,off)=>{throw Error("Not implemented yet")};else if(isPrimitiveType(def)){arrayElementSize=typeSizes[def];let{pack:primitivePack}=primitivePackers(def);pack=(view,off,val)=>{if(!val||val.length===0){pointerPacker(view,off,null);return}let buffer2=new ArrayBuffer(val.length*arrayElementSize),bufferView=new DataView(buffer2);for(let i2=0;i2<val.length;i2++)primitivePack(bufferView,i2*arrayElementSize,val[i2]);pointerPacker(view,off,ptr2(buffer2))},unpack=null,needsLengthOf=!0,lengthOfDef=def}else if(isObjectPointerDef(def))arrayElementSize=pointerSize,pack=(view,off,val)=>{if(!val||val.length===0){pointerPacker(view,off,null);return}let packedView=packObjectArray(val);pointerPacker(view,off,ptr2(packedView.buffer))},unpack=()=>{throw Error("not implemented yet")};else throw Error(`Unsupported array element type for ${name}: ${JSON.stringify(def)}`);let lengthOfField=Object.values(lengthOfFields).find((f)=>f.lengthOf===name);if(lengthOfField&&isPrimitiveType(lengthOfField.type)){let{pack:lengthPack}=primitivePackers(lengthOfField.type);arrayFieldsMetadata[name]={elementSize:arrayElementSize,arrayOffset:offset,lengthOffset:lengthOfField.offset,lengthPack}}}else throw Error(`Unsupported field type for ${name}: ${JSON.stringify(typeOrStruct)}`);if(offset=alignOffset(offset,align),options.unpackTransform){let originalUnpack=unpack;unpack=(view,off)=>options.unpackTransform(originalUnpack(view,off))}if(options.packTransform){let originalPack=pack;pack=(view,off,val,obj,packOptions)=>originalPack(view,off,options.packTransform(val),obj,packOptions)}if(options.optional){let originalPack=pack;if(isStruct(typeOrStruct)&&!options.asPointer)pack=(view,off,val,obj,packOptions)=>{if(val||options.mapOptionalInline)originalPack(view,off,val,obj,packOptions)};else pack=(view,off,val,obj,packOptions)=>originalPack(view,off,val??0,obj,packOptions)}if(options.lengthOf){let originalPack=pack;pack=(view,off,val,obj,packOptions)=>{let targetValue=obj[options.lengthOf],length=0;if(targetValue)if(typeof targetValue==="string")length=Buffer.byteLength(targetValue);else length=targetValue.length;return originalPack(view,off,length,obj,packOptions)}}let validateFunctions;if(options.validate)validateFunctions=Array.isArray(options.validate)?options.validate:[options.validate];let layoutField={name,offset,size,align,validate:validateFunctions,optional:!!options.optional||!!options.lengthOf||options.default!==void 0,default:options.default,pack,unpack,type:typeOrStruct,lengthOf:options.lengthOf};if(layout.push(layoutField),options.lengthOf)lengthOfFields[options.lengthOf]=layoutField;if(needsLengthOf){let def=typeof typeOrStruct==="string"&&typeOrStruct==="char*"?"char*":lengthOfDef;if(!def)fatalError(`Internal error: needsLengthOf=true but def is null for ${name}`);lengthOfRequested.push({requester:layoutField,def})}offset+=size,maxAlign=Math.max(maxAlign,align)}for(let{requester,def}of lengthOfRequested){let lengthOfField=lengthOfFields[requester.name];if(!lengthOfField){if(def==="char*")continue;throw Error(`lengthOf field not found for array field ${requester.name}`)}if(def==="char*")requester.unpack=(view,off)=>{let ptrAddress=pointerUnpacker(view,off),length=lengthOfField.unpack(view,lengthOfField.offset);if(ptrAddress===0)return null;let byteLength=typeof length==="bigint"?Number(length):length;if(byteLength===0)return"";let buffer2=toArrayBuffer2(ptrAddress,0,byteLength);return decoder.decode(buffer2)};else if(isPrimitiveType(def)){let elemSize=typeSizes[def],{unpack:primitiveUnpack}=primitivePackers(def);requester.unpack=(view,off)=>{let result2=[],length=lengthOfField.unpack(view,lengthOfField.offset),ptrAddress=pointerUnpacker(view,off);if(ptrAddress===0n&&length>0)throw Error(`Array field ${requester.name} has null pointer but length ${length}.`);if(ptrAddress===0n||length===0)return[];let buffer2=toArrayBuffer2(ptrAddress,0,length*elemSize),bufferView=new DataView(buffer2);for(let i2=0;i2<length;i2++)result2.push(primitiveUnpack(bufferView,i2*elemSize));return result2}}else{let elemSize=def.type==="u32"?4:8;requester.unpack=(view,off)=>{let result2=[],length=lengthOfField.unpack(view,lengthOfField.offset),ptrAddress=pointerUnpacker(view,off);if(ptrAddress===0n&&length>0)throw Error(`Array field ${requester.name} has null pointer but length ${length}.`);if(ptrAddress===0n||length===0)return[];let buffer2=toArrayBuffer2(ptrAddress,0,length*elemSize),bufferView=new DataView(buffer2);for(let i2=0;i2<length;i2++)result2.push(def.from(bufferView.getUint32(i2*elemSize,!0)));return result2}}}let totalSize=alignOffset(offset,maxAlign),description=layout.map((f)=>({name:f.name,offset:f.offset,size:f.size,align:f.align,optional:f.optional,type:f.type,lengthOf:f.lengthOf})),layoutByName=new Map(description.map((f)=>[f.name,f])),arrayFields=new Map(Object.entries(arrayFieldsMetadata));return{__type:"struct",size:totalSize,align:maxAlign,hasMapValue:!!structDefOptions?.mapValue,layoutByName,arrayFields,pack(obj,options){let buf=new ArrayBuffer(totalSize),view=new DataView(buf),mappedObj=obj;if(structDefOptions?.mapValue)mappedObj=structDefOptions.mapValue(obj);for(let field of layout){let value=mappedObj[field.name]??field.default;if(!field.optional&&value===void 0)fatalError(`Packing non-optional field '${field.name}' but value is undefined (and no default provided)`);if(field.validate)for(let validateFn of field.validate)validateFn(value,field.name,{hints:options?.validationHints,input:mappedObj});field.pack(view,field.offset,value,mappedObj,options)}return view.buffer},packInto(obj,view,offset2,options){let mappedObj=obj;if(structDefOptions?.mapValue)mappedObj=structDefOptions.mapValue(obj);for(let field of layout){let value=mappedObj[field.name]??field.default;if(!field.optional&&value===void 0)console.warn(`packInto missing value for non-optional field '${field.name}' at offset ${offset2+field.offset}. Writing default or zero.`);if(field.validate)for(let validateFn of field.validate)validateFn(value,field.name,{hints:options?.validationHints,input:mappedObj});field.pack(view,offset2+field.offset,value,mappedObj,options)}},unpack(buf){if(buf.byteLength<totalSize)fatalError(`Buffer size (${buf.byteLength}) is smaller than struct size (${totalSize}) for unpacking.`);let view=new DataView(buf),result2=structDefOptions?.default?{...structDefOptions.default}:{};for(let field of layout){if(!field.unpack)continue;try{result2[field.name]=field.unpack(view,field.offset)}catch(e){throw console.error(`Error unpacking field '${field.name}' at offset ${field.offset}:`,e),e}}if(structDefOptions?.reduceValue)return structDefOptions.reduceValue(result2);return result2},packList(objects,options){if(objects.length===0)return new ArrayBuffer(0);let buffer2=new ArrayBuffer(totalSize*objects.length),view=new DataView(buffer2);for(let i2=0;i2<objects.length;i2++){let mappedObj=objects[i2];if(structDefOptions?.mapValue)mappedObj=structDefOptions.mapValue(objects[i2]);for(let field of layout){let value=mappedObj[field.name]??field.default;if(!field.optional&&value===void 0)fatalError(`Packing non-optional field '${field.name}' at index ${i2} but value is undefined (and no default provided)`);if(field.validate)for(let validateFn of field.validate)validateFn(value,field.name,{hints:options?.validationHints,input:mappedObj});field.pack(view,i2*totalSize+field.offset,value,mappedObj,options)}}return buffer2},unpackList(buf,count){if(count===0)return[];let expectedSize=totalSize*count;if(buf.byteLength<expectedSize)fatalError(`Buffer size (${buf.byteLength}) is smaller than expected size (${expectedSize}) for unpacking ${count} structs.`);let view=new DataView(buf),results=[];for(let i2=0;i2<count;i2++){let offset2=i2*totalSize,result2=structDefOptions?.default?{...structDefOptions.default}:{};for(let field of layout){if(!field.unpack)continue;try{result2[field.name]=field.unpack(view,offset2+field.offset)}catch(e){throw console.error(`Error unpacking field '${field.name}' at index ${i2}, offset ${offset2+field.offset}:`,e),e}}if(structDefOptions?.reduceValue)results.push(structDefOptions.reduceValue(result2));else results.push(result2)}return results},describe(){return description}}}function toPointer(value){if(typeof value==="bigint"){if(value>BigInt(Number.MAX_SAFE_INTEGER))throw Error("Pointer exceeds safe integer range");return Number(value)}return value}function toNumber(value){return typeof value==="bigint"?Number(value):value}function getOpenTUILib(libPath){let rawSymbols=dlopen(libPath||targetLibPath,{setLogCallback:{args:["ptr"],returns:"void"},setEventCallback:{args:["ptr"],returns:"void"},createRenderer:{args:["u32","u32","bool","bool"],returns:"ptr"},setTerminalEnvVar:{args:["ptr","ptr","usize","ptr","usize"],returns:"bool"},destroyRenderer:{args:["ptr"],returns:"void"},setUseThread:{args:["ptr","bool"],returns:"void"},setClearOnShutdown:{args:["ptr","bool"],returns:"void"},setBackgroundColor:{args:["ptr","ptr"],returns:"void"},setRenderOffset:{args:["ptr","u32"],returns:"void"},resetSplitScrollback:{args:["ptr","u32","u32"],returns:"u32"},syncSplitScrollback:{args:["ptr","u32"],returns:"u32"},setPendingSplitFooterTransition:{args:["ptr","u8","u32","u32","u32","u32"],returns:"void"},clearPendingSplitFooterTransition:{args:["ptr"],returns:"void"},updateStats:{args:["ptr","f64","u32","f64"],returns:"void"},updateMemoryStats:{args:["ptr","u32","u32","u32"],returns:"void"},render:{args:["ptr","bool"],returns:"void"},repaintSplitFooter:{args:["ptr","u32","bool"],returns:"u32"},commitSplitFooterSnapshot:{args:["ptr","ptr","u32","bool","bool","u32","bool","bool","bool"],returns:"u32"},getNextBuffer:{args:["ptr"],returns:"ptr"},getCurrentBuffer:{args:["ptr"],returns:"ptr"},rendererSetPaletteState:{args:["ptr","ptr","usize","ptr","ptr","u32"],returns:"void"},queryPixelResolution:{args:["ptr"],returns:"void"},queryThemeColors:{args:["ptr"],returns:"void"},createOptimizedBuffer:{args:["u32","u32","bool","u8","ptr","usize"],returns:"ptr"},destroyOptimizedBuffer:{args:["ptr"],returns:"void"},drawFrameBuffer:{args:["ptr","i32","i32","ptr","u32","u32","u32","u32"],returns:"void"},getBufferWidth:{args:["ptr"],returns:"u32"},getBufferHeight:{args:["ptr"],returns:"u32"},bufferClear:{args:["ptr","ptr"],returns:"void"},bufferGetCharPtr:{args:["ptr"],returns:"ptr"},bufferGetFgPtr:{args:["ptr"],returns:"ptr"},bufferGetBgPtr:{args:["ptr"],returns:"ptr"},bufferGetFgTagPtr:{args:["ptr"],returns:"ptr"},bufferGetBgTagPtr:{args:["ptr"],returns:"ptr"},bufferGetAttributesPtr:{args:["ptr"],returns:"ptr"},bufferGetRespectAlpha:{args:["ptr"],returns:"bool"},bufferSetRespectAlpha:{args:["ptr","bool"],returns:"void"},bufferGetId:{args:["ptr","ptr","usize"],returns:"usize"},bufferGetRealCharSize:{args:["ptr"],returns:"u32"},bufferWriteResolvedChars:{args:["ptr","ptr","usize","bool"],returns:"u32"},bufferDrawText:{args:["ptr","ptr","u32","u32","u32","ptr","ptr","u32"],returns:"void"},bufferSetCellWithAlphaBlending:{args:["ptr","u32","u32","u32","ptr","ptr","u32"],returns:"void"},bufferSetCell:{args:["ptr","u32","u32","u32","ptr","ptr","u32"],returns:"void"},bufferFillRect:{args:["ptr","u32","u32","u32","u32","ptr"],returns:"void"},bufferColorMatrix:{args:["ptr","ptr","ptr","usize","f32","u8"],returns:"void"},bufferColorMatrixUniform:{args:["ptr","ptr","f32","u8"],returns:"void"},bufferResize:{args:["ptr","u32","u32"],returns:"void"},linkAlloc:{args:["ptr","u32"],returns:"u32"},linkGetUrl:{args:["u32","ptr","u32"],returns:"u32"},attributesWithLink:{args:["u32","u32"],returns:"u32"},attributesGetLinkId:{args:["u32"],returns:"u32"},resizeRenderer:{args:["ptr","u32","u32"],returns:"void"},setCursorPosition:{args:["ptr","i32","i32","bool"],returns:"void"},setCursorColor:{args:["ptr","ptr"],returns:"void"},getCursorState:{args:["ptr","ptr"],returns:"void"},setCursorStyleOptions:{args:["ptr","ptr"],returns:"void"},setDebugOverlay:{args:["ptr","bool","u8"],returns:"void"},clearTerminal:{args:["ptr"],returns:"void"},setTerminalTitle:{args:["ptr","ptr","usize"],returns:"void"},copyToClipboardOSC52:{args:["ptr","u8","ptr","usize"],returns:"bool"},clearClipboardOSC52:{args:["ptr","u8"],returns:"bool"},bufferDrawSuperSampleBuffer:{args:["ptr","u32","u32","ptr","usize","u8","u32"],returns:"void"},bufferDrawPackedBuffer:{args:["ptr","ptr","usize","u32","u32","u32","u32"],returns:"void"},bufferDrawGrayscaleBuffer:{args:["ptr","i32","i32","ptr","u32","u32","ptr","ptr"],returns:"void"},bufferDrawGrayscaleBufferSupersampled:{args:["ptr","i32","i32","ptr","u32","u32","ptr","ptr"],returns:"void"},bufferDrawGrid:{args:["ptr","ptr","ptr","ptr","ptr","u32","ptr","u32","ptr"],returns:"void"},bufferDrawBox:{args:["ptr","i32","i32","u32","u32","ptr","u32","ptr","ptr","ptr","u32","ptr","u32"],returns:"void"},bufferPushScissorRect:{args:["ptr","i32","i32","u32","u32"],returns:"void"},bufferPopScissorRect:{args:["ptr"],returns:"void"},bufferClearScissorRects:{args:["ptr"],returns:"void"},bufferPushOpacity:{args:["ptr","f32"],returns:"void"},bufferPopOpacity:{args:["ptr"],returns:"void"},bufferGetCurrentOpacity:{args:["ptr"],returns:"f32"},bufferClearOpacity:{args:["ptr"],returns:"void"},addToHitGrid:{args:["ptr","i32","i32","u32","u32","u32"],returns:"void"},clearCurrentHitGrid:{args:["ptr"],returns:"void"},hitGridPushScissorRect:{args:["ptr","i32","i32","u32","u32"],returns:"void"},hitGridPopScissorRect:{args:["ptr"],returns:"void"},hitGridClearScissorRects:{args:["ptr"],returns:"void"},addToCurrentHitGridClipped:{args:["ptr","i32","i32","u32","u32","u32"],returns:"void"},checkHit:{args:["ptr","u32","u32"],returns:"u32"},getHitGridDirty:{args:["ptr"],returns:"bool"},dumpHitGrid:{args:["ptr"],returns:"void"},dumpBuffers:{args:["ptr","i64"],returns:"void"},dumpStdoutBuffer:{args:["ptr","i64"],returns:"void"},restoreTerminalModes:{args:["ptr"],returns:"void"},enableMouse:{args:["ptr","bool"],returns:"void"},disableMouse:{args:["ptr"],returns:"void"},enableKittyKeyboard:{args:["ptr","u8"],returns:"void"},disableKittyKeyboard:{args:["ptr"],returns:"void"},setKittyKeyboardFlags:{args:["ptr","u8"],returns:"void"},getKittyKeyboardFlags:{args:["ptr"],returns:"u8"},setupTerminal:{args:["ptr","bool"],returns:"void"},suspendRenderer:{args:["ptr"],returns:"void"},resumeRenderer:{args:["ptr"],returns:"void"},writeOut:{args:["ptr","ptr","u64"],returns:"void"},createTextBuffer:{args:["u8"],returns:"ptr"},destroyTextBuffer:{args:["ptr"],returns:"void"},textBufferGetLength:{args:["ptr"],returns:"u32"},textBufferGetByteSize:{args:["ptr"],returns:"u32"},textBufferReset:{args:["ptr"],returns:"void"},textBufferClear:{args:["ptr"],returns:"void"},textBufferSetDefaultFg:{args:["ptr","ptr"],returns:"void"},textBufferSetDefaultBg:{args:["ptr","ptr"],returns:"void"},textBufferSetDefaultAttributes:{args:["ptr","ptr"],returns:"void"},textBufferResetDefaults:{args:["ptr"],returns:"void"},textBufferGetTabWidth:{args:["ptr"],returns:"u8"},textBufferSetTabWidth:{args:["ptr","u8"],returns:"void"},textBufferRegisterMemBuffer:{args:["ptr","ptr","usize","bool"],returns:"u16"},textBufferReplaceMemBuffer:{args:["ptr","u8","ptr","usize","bool"],returns:"bool"},textBufferClearMemRegistry:{args:["ptr"],returns:"void"},textBufferSetTextFromMem:{args:["ptr","u8"],returns:"void"},textBufferAppend:{args:["ptr","ptr","usize"],returns:"void"},textBufferAppendFromMemId:{args:["ptr","u8"],returns:"void"},textBufferLoadFile:{args:["ptr","ptr","usize"],returns:"bool"},textBufferSetStyledText:{args:["ptr","ptr","usize"],returns:"void"},textBufferGetLineCount:{args:["ptr"],returns:"u32"},textBufferGetPlainText:{args:["ptr","ptr","usize"],returns:"usize"},textBufferAddHighlightByCharRange:{args:["ptr","ptr"],returns:"void"},textBufferAddHighlight:{args:["ptr","u32","ptr"],returns:"void"},textBufferRemoveHighlightsByRef:{args:["ptr","u16"],returns:"void"},textBufferClearLineHighlights:{args:["ptr","u32"],returns:"void"},textBufferClearAllHighlights:{args:["ptr"],returns:"void"},textBufferSetSyntaxStyle:{args:["ptr","ptr"],returns:"void"},textBufferGetLineHighlightsPtr:{args:["ptr","u32","ptr"],returns:"ptr"},textBufferFreeLineHighlights:{args:["ptr","usize"],returns:"void"},textBufferGetHighlightCount:{args:["ptr"],returns:"u32"},textBufferGetTextRange:{args:["ptr","u32","u32","ptr","usize"],returns:"usize"},textBufferGetTextRangeByCoords:{args:["ptr","u32","u32","u32","u32","ptr","usize"],returns:"usize"},createTextBufferView:{args:["ptr"],returns:"ptr"},destroyTextBufferView:{args:["ptr"],returns:"void"},textBufferViewSetSelection:{args:["ptr","u32","u32","ptr","ptr"],returns:"void"},textBufferViewResetSelection:{args:["ptr"],returns:"void"},textBufferViewGetSelectionInfo:{args:["ptr"],returns:"u64"},textBufferViewSetLocalSelection:{args:["ptr","i32","i32","i32","i32","ptr","ptr"],returns:"bool"},textBufferViewUpdateSelection:{args:["ptr","u32","ptr","ptr"],returns:"void"},textBufferViewUpdateLocalSelection:{args:["ptr","i32","i32","i32","i32","ptr","ptr"],returns:"bool"},textBufferViewResetLocalSelection:{args:["ptr"],returns:"void"},textBufferViewSetWrapWidth:{args:["ptr","u32"],returns:"void"},textBufferViewSetWrapMode:{args:["ptr","u8"],returns:"void"},textBufferViewSetFirstLineOffset:{args:["ptr","u32"],returns:"void"},textBufferViewSetViewportSize:{args:["ptr","u32","u32"],returns:"void"},textBufferViewSetViewport:{args:["ptr","u32","u32","u32","u32"],returns:"void"},textBufferViewGetVirtualLineCount:{args:["ptr"],returns:"u32"},textBufferViewGetLineInfoDirect:{args:["ptr","ptr"],returns:"void"},textBufferViewGetLogicalLineInfoDirect:{args:["ptr","ptr"],returns:"void"},textBufferViewGetSelectedText:{args:["ptr","ptr","usize"],returns:"usize"},textBufferViewGetPlainText:{args:["ptr","ptr","usize"],returns:"usize"},textBufferViewSetTabIndicator:{args:["ptr","u32"],returns:"void"},textBufferViewSetTabIndicatorColor:{args:["ptr","ptr"],returns:"void"},textBufferViewSetTruncate:{args:["ptr","bool"],returns:"void"},textBufferViewMeasureForDimensions:{args:["ptr","u32","u32","ptr"],returns:"bool"},bufferDrawTextBufferView:{args:["ptr","ptr","i32","i32"],returns:"void"},bufferDrawEditorView:{args:["ptr","ptr","i32","i32"],returns:"void"},createEditorView:{args:["ptr","u32","u32"],returns:"ptr"},destroyEditorView:{args:["ptr"],returns:"void"},editorViewSetViewportSize:{args:["ptr","u32","u32"],returns:"void"},editorViewSetViewport:{args:["ptr","u32","u32","u32","u32","bool"],returns:"void"},editorViewGetViewport:{args:["ptr","ptr","ptr","ptr","ptr"],returns:"void"},editorViewSetScrollMargin:{args:["ptr","f32"],returns:"void"},editorViewSetWrapMode:{args:["ptr","u8"],returns:"void"},editorViewGetVirtualLineCount:{args:["ptr"],returns:"u32"},editorViewGetTotalVirtualLineCount:{args:["ptr"],returns:"u32"},editorViewGetTextBufferView:{args:["ptr"],returns:"ptr"},editorViewGetLineInfoDirect:{args:["ptr","ptr"],returns:"void"},editorViewGetLogicalLineInfoDirect:{args:["ptr","ptr"],returns:"void"},createEditBuffer:{args:["u8"],returns:"ptr"},destroyEditBuffer:{args:["ptr"],returns:"void"},editBufferSetText:{args:["ptr","ptr","usize"],returns:"void"},editBufferSetTextFromMem:{args:["ptr","u8"],returns:"void"},editBufferReplaceText:{args:["ptr","ptr","usize"],returns:"void"},editBufferReplaceTextFromMem:{args:["ptr","u8"],returns:"void"},editBufferGetText:{args:["ptr","ptr","usize"],returns:"usize"},editBufferInsertChar:{args:["ptr","ptr","usize"],returns:"void"},editBufferInsertText:{args:["ptr","ptr","usize"],returns:"void"},editBufferDeleteChar:{args:["ptr"],returns:"void"},editBufferDeleteCharBackward:{args:["ptr"],returns:"void"},editBufferDeleteRange:{args:["ptr","u32","u32","u32","u32"],returns:"void"},editBufferNewLine:{args:["ptr"],returns:"void"},editBufferDeleteLine:{args:["ptr"],returns:"void"},editBufferMoveCursorLeft:{args:["ptr"],returns:"void"},editBufferMoveCursorRight:{args:["ptr"],returns:"void"},editBufferMoveCursorUp:{args:["ptr"],returns:"void"},editBufferMoveCursorDown:{args:["ptr"],returns:"void"},editBufferGotoLine:{args:["ptr","u32"],returns:"void"},editBufferSetCursor:{args:["ptr","u32","u32"],returns:"void"},editBufferSetCursorToLineCol:{args:["ptr","u32","u32"],returns:"void"},editBufferSetCursorByOffset:{args:["ptr","u32"],returns:"void"},editBufferGetCursorPosition:{args:["ptr","ptr"],returns:"void"},editBufferGetId:{args:["ptr"],returns:"u16"},editBufferGetTextBuffer:{args:["ptr"],returns:"ptr"},editBufferDebugLogRope:{args:["ptr"],returns:"void"},editBufferUndo:{args:["ptr","ptr","usize"],returns:"usize"},editBufferRedo:{args:["ptr","ptr","usize"],returns:"usize"},editBufferCanUndo:{args:["ptr"],returns:"bool"},editBufferCanRedo:{args:["ptr"],returns:"bool"},editBufferClearHistory:{args:["ptr"],returns:"void"},editBufferClear:{args:["ptr"],returns:"void"},editBufferGetNextWordBoundary:{args:["ptr","ptr"],returns:"void"},editBufferGetPrevWordBoundary:{args:["ptr","ptr"],returns:"void"},editBufferGetEOL:{args:["ptr","ptr"],returns:"void"},editBufferOffsetToPosition:{args:["ptr","u32","ptr"],returns:"bool"},editBufferPositionToOffset:{args:["ptr","u32","u32"],returns:"u32"},editBufferGetLineStartOffset:{args:["ptr","u32"],returns:"u32"},editBufferGetTextRange:{args:["ptr","u32","u32","ptr","usize"],returns:"usize"},editBufferGetTextRangeByCoords:{args:["ptr","u32","u32","u32","u32","ptr","usize"],returns:"usize"},editorViewSetSelection:{args:["ptr","u32","u32","ptr","ptr"],returns:"void"},editorViewResetSelection:{args:["ptr"],returns:"void"},editorViewGetSelection:{args:["ptr"],returns:"u64"},editorViewSetLocalSelection:{args:["ptr","i32","i32","i32","i32","ptr","ptr","bool","bool"],returns:"bool"},editorViewUpdateSelection:{args:["ptr","u32","ptr","ptr"],returns:"void"},editorViewUpdateLocalSelection:{args:["ptr","i32","i32","i32","i32","ptr","ptr","bool","bool"],returns:"bool"},editorViewResetLocalSelection:{args:["ptr"],returns:"void"},editorViewGetSelectedTextBytes:{args:["ptr","ptr","usize"],returns:"usize"},editorViewGetCursor:{args:["ptr","ptr","ptr"],returns:"void"},editorViewGetText:{args:["ptr","ptr","usize"],returns:"usize"},editorViewGetVisualCursor:{args:["ptr","ptr"],returns:"void"},editorViewMoveUpVisual:{args:["ptr"],returns:"void"},editorViewMoveDownVisual:{args:["ptr"],returns:"void"},editorViewDeleteSelectedText:{args:["ptr"],returns:"void"},editorViewSetCursorByOffset:{args:["ptr","u32"],returns:"void"},editorViewGetNextWordBoundary:{args:["ptr","ptr"],returns:"void"},editorViewGetPrevWordBoundary:{args:["ptr","ptr"],returns:"void"},editorViewGetEOL:{args:["ptr","ptr"],returns:"void"},editorViewGetVisualSOL:{args:["ptr","ptr"],returns:"void"},editorViewGetVisualEOL:{args:["ptr","ptr"],returns:"void"},editorViewSetPlaceholderStyledText:{args:["ptr","ptr","usize"],returns:"void"},editorViewSetTabIndicator:{args:["ptr","u32"],returns:"void"},editorViewSetTabIndicatorColor:{args:["ptr","ptr"],returns:"void"},getArenaAllocatedBytes:{args:[],returns:"usize"},getBuildOptions:{args:["ptr"],returns:"void"},getAllocatorStats:{args:["ptr"],returns:"void"},createSyntaxStyle:{args:[],returns:"ptr"},destroySyntaxStyle:{args:["ptr"],returns:"void"},syntaxStyleRegister:{args:["ptr","ptr","usize","ptr","ptr","u32"],returns:"u32"},syntaxStyleResolveByName:{args:["ptr","ptr","usize"],returns:"u32"},syntaxStyleGetStyleCount:{args:["ptr"],returns:"usize"},getTerminalCapabilities:{args:["ptr","ptr"],returns:"void"},processCapabilityResponse:{args:["ptr","ptr","usize"],returns:"void"},encodeUnicode:{args:["ptr","usize","ptr","ptr","u8"],returns:"bool"},freeUnicode:{args:["ptr","usize"],returns:"void"},bufferDrawChar:{args:["ptr","u32","u32","u32","ptr","ptr","u32"],returns:"void"},createNativeSpanFeed:{args:["ptr"],returns:"ptr"},attachNativeSpanFeed:{args:["ptr"],returns:"i32"},destroyNativeSpanFeed:{args:["ptr"],returns:"void"},streamWrite:{args:["ptr","ptr","u64"],returns:"i32"},streamCommit:{args:["ptr"],returns:"i32"},streamDrainSpans:{args:["ptr","ptr","u32"],returns:"u32"},streamClose:{args:["ptr"],returns:"i32"},streamReserve:{args:["ptr","u32","ptr"],returns:"i32"},streamCommitReserved:{args:["ptr","u32"],returns:"i32"},streamSetOptions:{args:["ptr","ptr"],returns:"i32"},streamGetStats:{args:["ptr","ptr"],returns:"i32"},streamSetCallback:{args:["ptr","ptr"],returns:"void"}});if(env.OTUI_DEBUG_FFI||env.OTUI_TRACE_FFI)return{symbols:convertToDebugSymbols(rawSymbols.symbols)};return rawSymbols}function convertToDebugSymbols(symbols){if(!globalTraceSymbols)globalTraceSymbols={};if(env.OTUI_DEBUG_FFI&&!globalFFILogPath)globalFFILogPath=`ffi_otui_debug_${new Date().toISOString().replace(/[:.]/g,"-").replace(/T/,"_").split("Z")[0]}.log`;let debugSymbols={},hasTracing=!1;if(Object.entries(symbols).forEach(([key,value])=>{debugSymbols[key]=value}),env.OTUI_DEBUG_FFI&&globalFFILogPath){let logPath=globalFFILogPath,writeSync3=(msg)=>{writeFileSync29(logPath,msg+`
3070
3070
  `,{flag:"a"})};Object.entries(symbols).forEach(([key,value])=>{if(typeof value==="function")debugSymbols[key]=(...args)=>{writeSync3(`${key}(${args.map((arg)=>String(arg)).join(", ")})`);let result2=value(...args);return writeSync3(`${key} returned: ${String(result2)}`),result2}})}if(env.OTUI_TRACE_FFI)hasTracing=!0,Object.entries(symbols).forEach(([key,value])=>{if(typeof value==="function"){if(!globalTraceSymbols[key])globalTraceSymbols[key]=[];let originalFunc=debugSymbols[key];debugSymbols[key]=(...args)=>{let start3=performance.now(),result2=originalFunc(...args),end=performance.now();return globalTraceSymbols[key].push(end-start3),result2}}});if((env.OTUI_DEBUG_FFI||env.OTUI_TRACE_FFI)&&!exitHandlerRegistered2)exitHandlerRegistered2=!0,process.on("exit",()=>{if(globalTraceSymbols){let allStats=[];for(let[key,timings]of Object.entries(globalTraceSymbols)){if(!Array.isArray(timings)||timings.length===0)continue;let sortedTimings=[...timings].sort((a,b2)=>a-b2),count=sortedTimings.length,total=sortedTimings.reduce((acc,t2)=>acc+t2,0),average=total/count,min=sortedTimings[0],max=sortedTimings[count-1],medianIndex=Math.floor(count/2),p90Index=Math.floor(count*0.9),p99Index=Math.floor(count*0.99),median=sortedTimings[medianIndex],p90=sortedTimings[Math.min(p90Index,count-1)],p99=sortedTimings[Math.min(p99Index,count-1)];allStats.push({name:key,count,total,average,min,max,median,p90,p99})}allStats.sort((a,b2)=>b2.total-a.total);let lines=[];if(lines.push(`
3071
3071
  --- OpenTUI FFI Call Performance ---`),lines.push("Sorted by total time spent (descending)"),lines.push("-------------------------------------------------------------------------------------------------------------------------"),allStats.length===0)lines.push("No trace data collected or all symbols had zero calls.");else{let nameWidth=Math.max(6,...allStats.map((s2)=>s2.name.length)),countWidth=Math.max(5,...allStats.map((s2)=>String(s2.count).length)),totalWidth=Math.max(10,...allStats.map((s2)=>s2.total.toFixed(2).length)),avgWidth=Math.max(8,...allStats.map((s2)=>s2.average.toFixed(2).length)),statWidthMin=Math.max(8,...allStats.map((s2)=>s2.min.toFixed(2).length)),statWidthMax=Math.max(8,...allStats.map((s2)=>s2.max.toFixed(2).length)),medianWidth=Math.max(8,...allStats.map((s2)=>s2.median.toFixed(2).length)),p90Width=Math.max(8,...allStats.map((s2)=>s2.p90.toFixed(2).length)),p99Width=Math.max(8,...allStats.map((s2)=>s2.p99.toFixed(2).length));lines.push(`${"Symbol".padEnd(nameWidth)} | ${"Calls".padStart(countWidth)} | ${"Total (ms)".padStart(totalWidth)} | ${"Avg (ms)".padStart(avgWidth)} | ${"Min (ms)".padStart(statWidthMin)} | ${"Max (ms)".padStart(statWidthMax)} | ${"Med (ms)".padStart(medianWidth)} | ${"P90 (ms)".padStart(p90Width)} | ${"P99 (ms)".padStart(p99Width)}`),lines.push(`${"-".repeat(nameWidth)}-+-${"-".repeat(countWidth)}-+-${"-".repeat(totalWidth)}-+-${"-".repeat(avgWidth)}-+-${"-".repeat(statWidthMin)}-+-${"-".repeat(statWidthMax)}-+-${"-".repeat(medianWidth)}-+-${"-".repeat(p90Width)}-+-${"-".repeat(p99Width)}`),allStats.forEach((stat12)=>{lines.push(`${stat12.name.padEnd(nameWidth)} | ${String(stat12.count).padStart(countWidth)} | ${stat12.total.toFixed(2).padStart(totalWidth)} | ${stat12.average.toFixed(2).padStart(avgWidth)} | ${stat12.min.toFixed(2).padStart(statWidthMin)} | ${stat12.max.toFixed(2).padStart(statWidthMax)} | ${stat12.median.toFixed(2).padStart(medianWidth)} | ${stat12.p90.toFixed(2).padStart(p90Width)} | ${stat12.p99.toFixed(2).padStart(p99Width)}`)})}lines.push("-------------------------------------------------------------------------------------------------------------------------");let output=lines.join(`
3072
3072
  `);console.log(output);try{let traceFilePath=`ffi_otui_trace_${new Date().toISOString().replace(/[:.]/g,"-").replace(/T/,"_").split("Z")[0]}.log`;Bun.write(traceFilePath,output)}catch(e){console.error("Failed to write FFI trace file:",e)}}});return debugSymbols}class FFIRenderLib{opentui;encoder=new TextEncoder;decoder=new TextDecoder;logCallbackWrapper;eventCallbackWrapper;_nativeEvents=new EventEmitter4;_anyEventHandlers=[];nativeSpanFeedCallbackWrapper=null;nativeSpanFeedHandlers=new Map;constructor(libPath){this.opentui=getOpenTUILib(libPath),this.setupLogging(),this.setupEventBus()}setupLogging(){if(this.logCallbackWrapper)return;let logCallback=new JSCallback((level,msgPtr,msgLenBigInt)=>{try{let msgLen=typeof msgLenBigInt==="bigint"?Number(msgLenBigInt):msgLenBigInt;if(msgLen===0||!msgPtr)return;let msgBuffer=toArrayBuffer4(msgPtr,0,msgLen),msgBytes=new Uint8Array(msgBuffer),message=this.decoder.decode(msgBytes);switch(level){case 0:console.error(message);break;case 1:console.warn(message);break;case 2:console.info(message);break;case 3:console.debug(message);break;default:console.log(message)}}catch(error2){console.error("Error in Zig log callback:",error2)}},{args:["u8","ptr","usize"],returns:"void"});if(this.logCallbackWrapper=logCallback,!logCallback.ptr)throw Error("Failed to create log callback");this.setLogCallback(logCallback.ptr)}setLogCallback(callbackPtr){this.opentui.symbols.setLogCallback(callbackPtr)}setupEventBus(){if(this.eventCallbackWrapper)return;let eventCallback=new JSCallback((namePtr,nameLenBigInt,dataPtr,dataLenBigInt)=>{try{let nameLen=typeof nameLenBigInt==="bigint"?Number(nameLenBigInt):nameLenBigInt,dataLen=typeof dataLenBigInt==="bigint"?Number(dataLenBigInt):dataLenBigInt;if(nameLen===0||!namePtr)return;let nameBuffer=toArrayBuffer4(namePtr,0,nameLen),nameBytes=new Uint8Array(nameBuffer),eventName=this.decoder.decode(nameBytes),eventData;if(dataLen>0&&dataPtr)eventData=toArrayBuffer4(dataPtr,0,dataLen).slice();else eventData=new ArrayBuffer(0);queueMicrotask(()=>{this._nativeEvents.emit(eventName,eventData);for(let handler of this._anyEventHandlers)handler(eventName,eventData)})}catch(error2){console.error("Error in native event callback:",error2)}},{args:["ptr","usize","ptr","usize"],returns:"void"});if(this.eventCallbackWrapper=eventCallback,!eventCallback.ptr)throw Error("Failed to create event callback");this.setEventCallback(eventCallback.ptr)}ensureNativeSpanFeedCallback(){if(this.nativeSpanFeedCallbackWrapper)return this.nativeSpanFeedCallbackWrapper;let callback=new JSCallback((streamPtr,eventId,arg0,arg1)=>{let handler=this.nativeSpanFeedHandlers.get(toPointer(streamPtr));if(handler)handler(eventId,arg0,arg1)},{args:["ptr","u32","ptr","u64"],returns:"void"});if(this.nativeSpanFeedCallbackWrapper=callback,!callback.ptr)throw Error("Failed to create native span feed callback");return callback}setEventCallback(callbackPtr){this.opentui.symbols.setEventCallback(callbackPtr)}createRenderer(width,height2,options={}){let testing=options.testing??!1,remote=options.remote??!1;return this.opentui.symbols.createRenderer(width,height2,testing,remote)}setTerminalEnvVar(renderer,key,value){let keyBytes=this.encoder.encode(key),valueBytes=this.encoder.encode(value);return this.opentui.symbols.setTerminalEnvVar(renderer,keyBytes,keyBytes.length,valueBytes,valueBytes.length)}destroyRenderer(renderer){this.opentui.symbols.destroyRenderer(renderer)}setUseThread(renderer,useThread){this.opentui.symbols.setUseThread(renderer,useThread)}setClearOnShutdown(renderer,clear){this.opentui.symbols.setClearOnShutdown(renderer,clear)}setBackgroundColor(renderer,color2){this.opentui.symbols.setBackgroundColor(renderer,color2.buffer)}setRenderOffset(renderer,offset){this.opentui.symbols.setRenderOffset(renderer,offset)}resetSplitScrollback(renderer,seedRows,pinnedRenderOffset){return this.opentui.symbols.resetSplitScrollback(renderer,seedRows,pinnedRenderOffset)}syncSplitScrollback(renderer,pinnedRenderOffset){return this.opentui.symbols.syncSplitScrollback(renderer,pinnedRenderOffset)}setPendingSplitFooterTransition(renderer,mode,sourceTopLine,sourceHeight,targetTopLine,targetHeight){this.opentui.symbols.setPendingSplitFooterTransition(renderer,mode,sourceTopLine,sourceHeight,targetTopLine,targetHeight)}clearPendingSplitFooterTransition(renderer){this.opentui.symbols.clearPendingSplitFooterTransition(renderer)}updateStats(renderer,time,fps,frameCallbackTime){this.opentui.symbols.updateStats(renderer,time,fps,frameCallbackTime)}updateMemoryStats(renderer,heapUsed,heapTotal,arrayBuffers){this.opentui.symbols.updateMemoryStats(renderer,heapUsed,heapTotal,arrayBuffers)}getNextBuffer(renderer){let bufferPtr=this.opentui.symbols.getNextBuffer(renderer);if(!bufferPtr)throw Error("Failed to get next buffer");let width=this.opentui.symbols.getBufferWidth(bufferPtr),height2=this.opentui.symbols.getBufferHeight(bufferPtr);return new OptimizedBuffer(this,bufferPtr,width,height2,{id:"next buffer",widthMethod:"unicode"})}getCurrentBuffer(renderer){let bufferPtr=this.opentui.symbols.getCurrentBuffer(renderer);if(!bufferPtr)throw Error("Failed to get current buffer");let width=this.opentui.symbols.getBufferWidth(bufferPtr),height2=this.opentui.symbols.getBufferHeight(bufferPtr);return new OptimizedBuffer(this,bufferPtr,width,height2,{id:"current buffer",widthMethod:"unicode"})}rendererSetPaletteState(renderer,palette2,defaultForeground,defaultBackground,paletteEpoch){let paletteBuffer=new Float32Array(palette2.length*4);for(let index=0;index<palette2.length;index++){let color2=palette2[index],base=index*4;paletteBuffer[base]=color2.r,paletteBuffer[base+1]=color2.g,paletteBuffer[base+2]=color2.b,paletteBuffer[base+3]=color2.a}this.opentui.symbols.rendererSetPaletteState(renderer,paletteBuffer,paletteBuffer.length,defaultForeground.buffer,defaultBackground.buffer,paletteEpoch>>>0)}bufferGetCharPtr(buffer2){let ptr5=this.opentui.symbols.bufferGetCharPtr(buffer2);if(!ptr5)throw Error("Failed to get char pointer");return ptr5}bufferGetFgPtr(buffer2){let ptr5=this.opentui.symbols.bufferGetFgPtr(buffer2);if(!ptr5)throw Error("Failed to get fg pointer");return ptr5}bufferGetBgPtr(buffer2){let ptr5=this.opentui.symbols.bufferGetBgPtr(buffer2);if(!ptr5)throw Error("Failed to get bg pointer");return ptr5}bufferGetFgTagPtr(buffer2){let ptr5=this.opentui.symbols.bufferGetFgTagPtr(buffer2);if(!ptr5)throw Error("Failed to get fg tag pointer");return ptr5}bufferGetBgTagPtr(buffer2){let ptr5=this.opentui.symbols.bufferGetBgTagPtr(buffer2);if(!ptr5)throw Error("Failed to get bg tag pointer");return ptr5}bufferGetAttributesPtr(buffer2){let ptr5=this.opentui.symbols.bufferGetAttributesPtr(buffer2);if(!ptr5)throw Error("Failed to get attributes pointer");return ptr5}bufferGetRespectAlpha(buffer2){return this.opentui.symbols.bufferGetRespectAlpha(buffer2)}bufferSetRespectAlpha(buffer2,respectAlpha){this.opentui.symbols.bufferSetRespectAlpha(buffer2,respectAlpha)}bufferGetId(buffer2){let outBuffer=new Uint8Array(256),actualLen=this.opentui.symbols.bufferGetId(buffer2,outBuffer,256),len=typeof actualLen==="bigint"?Number(actualLen):actualLen;return this.decoder.decode(outBuffer.slice(0,len))}bufferGetRealCharSize(buffer2){return this.opentui.symbols.bufferGetRealCharSize(buffer2)}bufferWriteResolvedChars(buffer2,outputBuffer,addLineBreaks){let bytesWritten=this.opentui.symbols.bufferWriteResolvedChars(buffer2,outputBuffer,outputBuffer.length,addLineBreaks);return typeof bytesWritten==="bigint"?Number(bytesWritten):bytesWritten}getBufferWidth(buffer2){return this.opentui.symbols.getBufferWidth(buffer2)}getBufferHeight(buffer2){return this.opentui.symbols.getBufferHeight(buffer2)}bufferClear(buffer2,color2){this.opentui.symbols.bufferClear(buffer2,color2.buffer)}bufferDrawText(buffer2,text,x,y,color2,bgColor,attributes){let textBytes=this.encoder.encode(text),textLength=textBytes.byteLength,bg2=bgColor?bgColor.buffer:null,fg2=color2.buffer;this.opentui.symbols.bufferDrawText(buffer2,textBytes,textLength,x,y,fg2,bg2,attributes??0)}bufferSetCellWithAlphaBlending(buffer2,x,y,char,color2,bgColor,attributes){let charPtr=char.codePointAt(0)??" ".codePointAt(0),bg2=bgColor.buffer,fg2=color2.buffer;this.opentui.symbols.bufferSetCellWithAlphaBlending(buffer2,x,y,charPtr,fg2,bg2,attributes??0)}bufferSetCell(buffer2,x,y,char,color2,bgColor,attributes){let charPtr=char.codePointAt(0)??" ".codePointAt(0),bg2=bgColor.buffer,fg2=color2.buffer;this.opentui.symbols.bufferSetCell(buffer2,x,y,charPtr,fg2,bg2,attributes??0)}bufferFillRect(buffer2,x,y,width,height2,color2){let bg2=color2.buffer;this.opentui.symbols.bufferFillRect(buffer2,x,y,width,height2,bg2)}bufferColorMatrix(buffer2,matrixPtr,cellMaskPtr,cellMaskCount,strength,target){this.opentui.symbols.bufferColorMatrix(buffer2,matrixPtr,cellMaskPtr,cellMaskCount,strength,target)}bufferColorMatrixUniform(buffer2,matrixPtr,strength,target){this.opentui.symbols.bufferColorMatrixUniform(buffer2,matrixPtr,strength,target)}bufferDrawSuperSampleBuffer(buffer2,x,y,pixelDataPtr,pixelDataLength,format,alignedBytesPerRow){let formatId=format==="bgra8unorm"?0:1;this.opentui.symbols.bufferDrawSuperSampleBuffer(buffer2,x,y,pixelDataPtr,pixelDataLength,formatId,alignedBytesPerRow)}bufferDrawPackedBuffer(buffer2,dataPtr,dataLen,posX,posY,terminalWidthCells,terminalHeightCells){this.opentui.symbols.bufferDrawPackedBuffer(buffer2,dataPtr,dataLen,posX,posY,terminalWidthCells,terminalHeightCells)}bufferDrawGrayscaleBuffer(buffer2,posX,posY,intensitiesPtr,srcWidth,srcHeight,fg2,bg2){this.opentui.symbols.bufferDrawGrayscaleBuffer(buffer2,posX,posY,intensitiesPtr,srcWidth,srcHeight,fg2?.buffer??null,bg2?.buffer??null)}bufferDrawGrayscaleBufferSupersampled(buffer2,posX,posY,intensitiesPtr,srcWidth,srcHeight,fg2,bg2){this.opentui.symbols.bufferDrawGrayscaleBufferSupersampled(buffer2,posX,posY,intensitiesPtr,srcWidth,srcHeight,fg2?.buffer??null,bg2?.buffer??null)}bufferDrawGrid(buffer2,borderChars,borderFg,borderBg,columnOffsets,columnCount,rowOffsets,rowCount,options){let optionsBuffer=GridDrawOptionsStruct.pack({drawInner:options.drawInner,drawOuter:options.drawOuter});this.opentui.symbols.bufferDrawGrid(buffer2,borderChars,borderFg.buffer,borderBg.buffer,columnOffsets,columnCount,rowOffsets,rowCount,ptr4(optionsBuffer))}bufferDrawBox(buffer2,x,y,width,height2,borderChars,packedOptions,borderColor,backgroundColor,title,bottomTitle){let titleBytes=title?this.encoder.encode(title):null,titleLen=title?titleBytes.length:0,titlePtr=title?titleBytes:null,bottomTitleBytes=bottomTitle?this.encoder.encode(bottomTitle):null,bottomTitleLen=bottomTitle?bottomTitleBytes.length:0,bottomTitlePtr=bottomTitle?bottomTitleBytes:null;this.opentui.symbols.bufferDrawBox(buffer2,x,y,width,height2,borderChars,packedOptions,borderColor.buffer,backgroundColor.buffer,titlePtr,titleLen,bottomTitlePtr,bottomTitleLen)}bufferResize(buffer2,width,height2){this.opentui.symbols.bufferResize(buffer2,width,height2)}linkAlloc(url){let urlBytes=this.encoder.encode(url);return this.opentui.symbols.linkAlloc(urlBytes,urlBytes.length)}linkGetUrl(linkId,maxLen=512){let outBuffer=new Uint8Array(maxLen),actualLen=this.opentui.symbols.linkGetUrl(linkId,outBuffer,maxLen);return this.decoder.decode(outBuffer.slice(0,actualLen))}attributesWithLink(baseAttributes,linkId){return this.opentui.symbols.attributesWithLink(baseAttributes,linkId)}attributesGetLinkId(attributes){return this.opentui.symbols.attributesGetLinkId(attributes)}resizeRenderer(renderer,width,height2){this.opentui.symbols.resizeRenderer(renderer,width,height2)}setCursorPosition(renderer,x,y,visible){this.opentui.symbols.setCursorPosition(renderer,x,y,visible)}setCursorColor(renderer,color2){this.opentui.symbols.setCursorColor(renderer,color2.buffer)}getCursorState(renderer){let cursorBuffer=new ArrayBuffer(CursorStateStruct.size);this.opentui.symbols.getCursorState(renderer,ptr4(cursorBuffer));let struct=CursorStateStruct.unpack(cursorBuffer);return{x:struct.x,y:struct.y,visible:struct.visible,style:CURSOR_ID_TO_STYLE[struct.style]??"block",blinking:struct.blinking,color:RGBA.fromValues(struct.r,struct.g,struct.b,struct.a)}}setCursorStyleOptions(renderer,options){let style=options.style!=null?CURSOR_STYLE_TO_ID[options.style]:255,blinking=options.blinking!=null?options.blinking?1:0:255,cursor=options.cursor!=null?MOUSE_STYLE_TO_ID[options.cursor]:255,buffer2=CursorStyleOptionsStruct.pack({style,blinking,color:options.color,cursor});this.opentui.symbols.setCursorStyleOptions(renderer,ptr4(buffer2))}render(renderer,force){this.opentui.symbols.render(renderer,force)}repaintSplitFooter(renderer,pinnedRenderOffset,force){return this.opentui.symbols.repaintSplitFooter(renderer,pinnedRenderOffset,force)}commitSplitFooterSnapshot(renderer,snapshot,rowColumns,startOnNewLine,trailingNewline,pinnedRenderOffset,force,beginFrame=!0,finalizeFrame=!0){return this.opentui.symbols.commitSplitFooterSnapshot(renderer,snapshot.ptr,rowColumns,startOnNewLine,trailingNewline,pinnedRenderOffset,force,beginFrame,finalizeFrame)}createOptimizedBuffer(width,height2,widthMethod,respectAlpha=!1,id){if(Number.isNaN(width)||Number.isNaN(height2))console.error(Error(`Invalid dimensions for OptimizedBuffer: ${width}x${height2}`).stack);let widthMethodCode=widthMethod==="wcwidth"?0:1,idToUse=id||"unnamed buffer",idBytes=this.encoder.encode(idToUse),bufferPtr=this.opentui.symbols.createOptimizedBuffer(width,height2,respectAlpha,widthMethodCode,idBytes,idBytes.length);if(!bufferPtr)throw Error(`Failed to create optimized buffer: ${width}x${height2}`);return new OptimizedBuffer(this,bufferPtr,width,height2,{respectAlpha,id,widthMethod})}destroyOptimizedBuffer(bufferPtr){this.opentui.symbols.destroyOptimizedBuffer(bufferPtr)}drawFrameBuffer(targetBufferPtr,destX,destY,bufferPtr,sourceX,sourceY,sourceWidth,sourceHeight){let srcX=sourceX??0,srcY=sourceY??0,srcWidth=sourceWidth??0,srcHeight=sourceHeight??0;this.opentui.symbols.drawFrameBuffer(targetBufferPtr,destX,destY,bufferPtr,srcX,srcY,srcWidth,srcHeight)}setDebugOverlay(renderer,enabled,corner){this.opentui.symbols.setDebugOverlay(renderer,enabled,corner)}clearTerminal(renderer){this.opentui.symbols.clearTerminal(renderer)}setTerminalTitle(renderer,title){let titleBytes=this.encoder.encode(title);this.opentui.symbols.setTerminalTitle(renderer,titleBytes,titleBytes.length)}copyToClipboardOSC52(renderer,target,payload){return this.opentui.symbols.copyToClipboardOSC52(renderer,target,payload,payload.length)}clearClipboardOSC52(renderer,target){return this.opentui.symbols.clearClipboardOSC52(renderer,target)}addToHitGrid(renderer,x,y,width,height2,id){this.opentui.symbols.addToHitGrid(renderer,x,y,width,height2,id)}clearCurrentHitGrid(renderer){this.opentui.symbols.clearCurrentHitGrid(renderer)}hitGridPushScissorRect(renderer,x,y,width,height2){this.opentui.symbols.hitGridPushScissorRect(renderer,x,y,width,height2)}hitGridPopScissorRect(renderer){this.opentui.symbols.hitGridPopScissorRect(renderer)}hitGridClearScissorRects(renderer){this.opentui.symbols.hitGridClearScissorRects(renderer)}addToCurrentHitGridClipped(renderer,x,y,width,height2,id){this.opentui.symbols.addToCurrentHitGridClipped(renderer,x,y,width,height2,id)}checkHit(renderer,x,y){return this.opentui.symbols.checkHit(renderer,x,y)}getHitGridDirty(renderer){return this.opentui.symbols.getHitGridDirty(renderer)}dumpHitGrid(renderer){this.opentui.symbols.dumpHitGrid(renderer)}dumpBuffers(renderer,timestamp2){let ts3=timestamp2??Date.now();this.opentui.symbols.dumpBuffers(renderer,ts3)}dumpStdoutBuffer(renderer,timestamp2){let ts3=timestamp2??Date.now();this.opentui.symbols.dumpStdoutBuffer(renderer,ts3)}restoreTerminalModes(renderer){this.opentui.symbols.restoreTerminalModes(renderer)}enableMouse(renderer,enableMovement){this.opentui.symbols.enableMouse(renderer,enableMovement)}disableMouse(renderer){this.opentui.symbols.disableMouse(renderer)}enableKittyKeyboard(renderer,flags){this.opentui.symbols.enableKittyKeyboard(renderer,flags)}disableKittyKeyboard(renderer){this.opentui.symbols.disableKittyKeyboard(renderer)}setKittyKeyboardFlags(renderer,flags){this.opentui.symbols.setKittyKeyboardFlags(renderer,flags)}getKittyKeyboardFlags(renderer){return this.opentui.symbols.getKittyKeyboardFlags(renderer)}setupTerminal(renderer,useAlternateScreen){this.opentui.symbols.setupTerminal(renderer,useAlternateScreen)}suspendRenderer(renderer){this.opentui.symbols.suspendRenderer(renderer)}resumeRenderer(renderer){this.opentui.symbols.resumeRenderer(renderer)}queryPixelResolution(renderer){this.opentui.symbols.queryPixelResolution(renderer)}queryThemeColors(renderer){this.opentui.symbols.queryThemeColors(renderer)}writeOut(renderer,data){let bytes=typeof data==="string"?new TextEncoder().encode(data):data;if(bytes.length===0)return;this.opentui.symbols.writeOut(renderer,ptr4(bytes),bytes.length)}createTextBuffer(widthMethod){let widthMethodCode=widthMethod==="wcwidth"?0:1,bufferPtr=this.opentui.symbols.createTextBuffer(widthMethodCode);if(!bufferPtr)throw Error("Failed to create TextBuffer");return new TextBuffer(this,bufferPtr)}destroyTextBuffer(buffer2){this.opentui.symbols.destroyTextBuffer(buffer2)}textBufferGetLength(buffer2){return this.opentui.symbols.textBufferGetLength(buffer2)}textBufferGetByteSize(buffer2){return this.opentui.symbols.textBufferGetByteSize(buffer2)}textBufferReset(buffer2){this.opentui.symbols.textBufferReset(buffer2)}textBufferClear(buffer2){this.opentui.symbols.textBufferClear(buffer2)}textBufferSetDefaultFg(buffer2,fg2){let fgPtr=fg2?fg2.buffer:null;this.opentui.symbols.textBufferSetDefaultFg(buffer2,fgPtr)}textBufferSetDefaultBg(buffer2,bg2){let bgPtr=bg2?bg2.buffer:null;this.opentui.symbols.textBufferSetDefaultBg(buffer2,bgPtr)}textBufferSetDefaultAttributes(buffer2,attributes){let attrValue=attributes===null?null:new Uint8Array([attributes]);this.opentui.symbols.textBufferSetDefaultAttributes(buffer2,attrValue)}textBufferResetDefaults(buffer2){this.opentui.symbols.textBufferResetDefaults(buffer2)}textBufferGetTabWidth(buffer2){return this.opentui.symbols.textBufferGetTabWidth(buffer2)}textBufferSetTabWidth(buffer2,width){this.opentui.symbols.textBufferSetTabWidth(buffer2,width)}textBufferRegisterMemBuffer(buffer2,bytes,owned=!1){let result2=this.opentui.symbols.textBufferRegisterMemBuffer(buffer2,bytes,bytes.length,owned);if(result2===65535)throw Error("Failed to register memory buffer");return result2}textBufferReplaceMemBuffer(buffer2,memId,bytes,owned=!1){return this.opentui.symbols.textBufferReplaceMemBuffer(buffer2,memId,bytes,bytes.length,owned)}textBufferClearMemRegistry(buffer2){this.opentui.symbols.textBufferClearMemRegistry(buffer2)}textBufferSetTextFromMem(buffer2,memId){this.opentui.symbols.textBufferSetTextFromMem(buffer2,memId)}textBufferAppend(buffer2,bytes){this.opentui.symbols.textBufferAppend(buffer2,bytes,bytes.length)}textBufferAppendFromMemId(buffer2,memId){this.opentui.symbols.textBufferAppendFromMemId(buffer2,memId)}textBufferLoadFile(buffer2,path52){let pathBytes=this.encoder.encode(path52);return this.opentui.symbols.textBufferLoadFile(buffer2,pathBytes,pathBytes.length)}textBufferSetStyledText(buffer2,chunks){if(chunks.length===0){this.textBufferClear(buffer2);return}let chunksBuffer=StyledChunkStruct.packList(chunks);this.opentui.symbols.textBufferSetStyledText(buffer2,ptr4(chunksBuffer),chunks.length)}textBufferGetLineCount(buffer2){return this.opentui.symbols.textBufferGetLineCount(buffer2)}textBufferGetPlainText(buffer2,outPtr,maxLen){let result2=this.opentui.symbols.textBufferGetPlainText(buffer2,outPtr,maxLen);return typeof result2==="bigint"?Number(result2):result2}getPlainTextBytes(buffer2,maxLength){let outBuffer=new Uint8Array(maxLength),actualLen=this.textBufferGetPlainText(buffer2,ptr4(outBuffer),maxLength);if(actualLen===0)return null;return outBuffer.slice(0,actualLen)}textBufferGetTextRange(buffer2,startOffset,endOffset,maxLength){let outBuffer=new Uint8Array(maxLength),actualLen=this.opentui.symbols.textBufferGetTextRange(buffer2,startOffset,endOffset,ptr4(outBuffer),maxLength),len=typeof actualLen==="bigint"?Number(actualLen):actualLen;if(len===0)return null;return outBuffer.slice(0,len)}textBufferGetTextRangeByCoords(buffer2,startRow,startCol,endRow,endCol,maxLength){let outBuffer=new Uint8Array(maxLength),actualLen=this.opentui.symbols.textBufferGetTextRangeByCoords(buffer2,startRow,startCol,endRow,endCol,ptr4(outBuffer),maxLength),len=typeof actualLen==="bigint"?Number(actualLen):actualLen;if(len===0)return null;return outBuffer.slice(0,len)}createTextBufferView(textBuffer){let viewPtr=this.opentui.symbols.createTextBufferView(textBuffer);if(!viewPtr)throw Error("Failed to create TextBufferView");return viewPtr}destroyTextBufferView(view){this.opentui.symbols.destroyTextBufferView(view)}textBufferViewSetSelection(view,start3,end,bgColor,fgColor){let bg2=bgColor?bgColor.buffer:null,fg2=fgColor?fgColor.buffer:null;this.opentui.symbols.textBufferViewSetSelection(view,start3,end,bg2,fg2)}textBufferViewResetSelection(view){this.opentui.symbols.textBufferViewResetSelection(view)}textBufferViewGetSelection(view){let packedInfo=this.textBufferViewGetSelectionInfo(view);if(packedInfo===0xffff_ffff_ffff_ffffn)return null;let start3=Number(packedInfo>>32n),end=Number(packedInfo&0xffff_ffffn);return{start:start3,end}}textBufferViewGetSelectionInfo(view){return this.opentui.symbols.textBufferViewGetSelectionInfo(view)}textBufferViewSetLocalSelection(view,anchorX,anchorY,focusX,focusY,bgColor,fgColor){let bg2=bgColor?bgColor.buffer:null,fg2=fgColor?fgColor.buffer:null;return this.opentui.symbols.textBufferViewSetLocalSelection(view,anchorX,anchorY,focusX,focusY,bg2,fg2)}textBufferViewUpdateSelection(view,end,bgColor,fgColor){let bg2=bgColor?bgColor.buffer:null,fg2=fgColor?fgColor.buffer:null;this.opentui.symbols.textBufferViewUpdateSelection(view,end,bg2,fg2)}textBufferViewUpdateLocalSelection(view,anchorX,anchorY,focusX,focusY,bgColor,fgColor){let bg2=bgColor?bgColor.buffer:null,fg2=fgColor?fgColor.buffer:null;return this.opentui.symbols.textBufferViewUpdateLocalSelection(view,anchorX,anchorY,focusX,focusY,bg2,fg2)}textBufferViewResetLocalSelection(view){this.opentui.symbols.textBufferViewResetLocalSelection(view)}textBufferViewSetWrapWidth(view,width){this.opentui.symbols.textBufferViewSetWrapWidth(view,width)}textBufferViewSetWrapMode(view,mode){let modeValue=mode==="none"?0:mode==="char"?1:2;this.opentui.symbols.textBufferViewSetWrapMode(view,modeValue)}textBufferViewSetFirstLineOffset(view,offset){this.opentui.symbols.textBufferViewSetFirstLineOffset(view,offset)}textBufferViewSetViewportSize(view,width,height2){this.opentui.symbols.textBufferViewSetViewportSize(view,width,height2)}textBufferViewSetViewport(view,x,y,width,height2){this.opentui.symbols.textBufferViewSetViewport(view,x,y,width,height2)}textBufferViewGetLineInfo(view){let outBuffer=new ArrayBuffer(LineInfoStruct.size);this.textBufferViewGetLineInfoDirect(view,ptr4(outBuffer));let struct=LineInfoStruct.unpack(outBuffer),lineStartCols=struct.startCols,lineWidthCols=struct.widthCols,lineWidthColsMax=struct.widthColsMax;return{lineStartCols,lineWidthCols,lineWidthColsMax,lineSources:struct.sources,lineWraps:struct.wraps}}textBufferViewGetLogicalLineInfo(view){let outBuffer=new ArrayBuffer(LineInfoStruct.size);this.textBufferViewGetLogicalLineInfoDirect(view,ptr4(outBuffer));let struct=LineInfoStruct.unpack(outBuffer),lineStartCols=struct.startCols,lineWidthCols=struct.widthCols,lineWidthColsMax=struct.widthColsMax;return{lineStartCols,lineWidthCols,lineWidthColsMax,lineSources:struct.sources,lineWraps:struct.wraps}}textBufferViewGetVirtualLineCount(view){return this.opentui.symbols.textBufferViewGetVirtualLineCount(view)}textBufferViewGetLineInfoDirect(view,outPtr){this.opentui.symbols.textBufferViewGetLineInfoDirect(view,outPtr)}textBufferViewGetLogicalLineInfoDirect(view,outPtr){this.opentui.symbols.textBufferViewGetLogicalLineInfoDirect(view,outPtr)}textBufferViewGetSelectedText(view,outPtr,maxLen){let result2=this.opentui.symbols.textBufferViewGetSelectedText(view,outPtr,maxLen);return typeof result2==="bigint"?Number(result2):result2}textBufferViewGetPlainText(view,outPtr,maxLen){let result2=this.opentui.symbols.textBufferViewGetPlainText(view,outPtr,maxLen);return typeof result2==="bigint"?Number(result2):result2}textBufferViewGetSelectedTextBytes(view,maxLength){let outBuffer=new Uint8Array(maxLength),actualLen=this.textBufferViewGetSelectedText(view,ptr4(outBuffer),maxLength);if(actualLen===0)return null;return outBuffer.slice(0,actualLen)}textBufferViewGetPlainTextBytes(view,maxLength){let outBuffer=new Uint8Array(maxLength),actualLen=this.textBufferViewGetPlainText(view,ptr4(outBuffer),maxLength);if(actualLen===0)return null;return outBuffer.slice(0,actualLen)}textBufferViewSetTabIndicator(view,indicator){this.opentui.symbols.textBufferViewSetTabIndicator(view,indicator)}textBufferViewSetTabIndicatorColor(view,color2){this.opentui.symbols.textBufferViewSetTabIndicatorColor(view,color2.buffer)}textBufferViewSetTruncate(view,truncate5){this.opentui.symbols.textBufferViewSetTruncate(view,truncate5)}textBufferViewMeasureForDimensions(view,width,height2){let resultBuffer=new ArrayBuffer(MeasureResultStruct.size),resultPtr=ptr4(new Uint8Array(resultBuffer));if(!this.opentui.symbols.textBufferViewMeasureForDimensions(view,width,height2,resultPtr))return null;return MeasureResultStruct.unpack(resultBuffer)}textBufferAddHighlightByCharRange(buffer2,highlight){let packedHighlight=HighlightStruct.pack(highlight);this.opentui.symbols.textBufferAddHighlightByCharRange(buffer2,ptr4(packedHighlight))}textBufferAddHighlight(buffer2,lineIdx,highlight){let packedHighlight=HighlightStruct.pack(highlight);this.opentui.symbols.textBufferAddHighlight(buffer2,lineIdx,ptr4(packedHighlight))}textBufferRemoveHighlightsByRef(buffer2,hlRef){this.opentui.symbols.textBufferRemoveHighlightsByRef(buffer2,hlRef)}textBufferClearLineHighlights(buffer2,lineIdx){this.opentui.symbols.textBufferClearLineHighlights(buffer2,lineIdx)}textBufferClearAllHighlights(buffer2){this.opentui.symbols.textBufferClearAllHighlights(buffer2)}textBufferSetSyntaxStyle(buffer2,style){this.opentui.symbols.textBufferSetSyntaxStyle(buffer2,style)}textBufferGetLineHighlights(buffer2,lineIdx){let outCountBuf=new BigUint64Array(1),nativePtr=this.opentui.symbols.textBufferGetLineHighlightsPtr(buffer2,lineIdx,ptr4(outCountBuf));if(!nativePtr)return[];let count=Number(outCountBuf[0]),byteLen=count*HighlightStruct.size,raw=toArrayBuffer4(nativePtr,0,byteLen),results=HighlightStruct.unpackList(raw,count);return this.opentui.symbols.textBufferFreeLineHighlights(nativePtr,count),results}textBufferGetHighlightCount(buffer2){return this.opentui.symbols.textBufferGetHighlightCount(buffer2)}getArenaAllocatedBytes(){let result2=this.opentui.symbols.getArenaAllocatedBytes();return typeof result2==="bigint"?Number(result2):result2}getBuildOptions(){let optionsBuffer=new ArrayBuffer(BuildOptionsStruct.size);this.opentui.symbols.getBuildOptions(ptr4(optionsBuffer));let options=BuildOptionsStruct.unpack(optionsBuffer);return{gpaSafeStats:!!options.gpaSafeStats,gpaMemoryLimitTracking:!!options.gpaMemoryLimitTracking}}getAllocatorStats(){let statsBuffer=new ArrayBuffer(AllocatorStatsStruct.size);this.opentui.symbols.getAllocatorStats(ptr4(statsBuffer));let stats2=AllocatorStatsStruct.unpack(statsBuffer);return{totalRequestedBytes:toNumber(stats2.totalRequestedBytes),activeAllocations:toNumber(stats2.activeAllocations),smallAllocations:toNumber(stats2.smallAllocations),largeAllocations:toNumber(stats2.largeAllocations),requestedBytesValid:!!stats2.requestedBytesValid}}bufferDrawTextBufferView(buffer2,view,x,y){this.opentui.symbols.bufferDrawTextBufferView(buffer2,view,x,y)}bufferDrawEditorView(buffer2,view,x,y){this.opentui.symbols.bufferDrawEditorView(buffer2,view,x,y)}createEditorView(editBufferPtr,viewportWidth,viewportHeight){let viewPtr=this.opentui.symbols.createEditorView(editBufferPtr,viewportWidth,viewportHeight);if(!viewPtr)throw Error("Failed to create EditorView");return viewPtr}destroyEditorView(view){this.opentui.symbols.destroyEditorView(view)}editorViewSetViewportSize(view,width,height2){this.opentui.symbols.editorViewSetViewportSize(view,width,height2)}editorViewSetViewport(view,x,y,width,height2,moveCursor){this.opentui.symbols.editorViewSetViewport(view,x,y,width,height2,moveCursor)}editorViewGetViewport(view){let x=new Uint32Array(1),y=new Uint32Array(1),width=new Uint32Array(1),height2=new Uint32Array(1);return this.opentui.symbols.editorViewGetViewport(view,ptr4(x),ptr4(y),ptr4(width),ptr4(height2)),{offsetX:x[0],offsetY:y[0],width:width[0],height:height2[0]}}editorViewSetScrollMargin(view,margin){this.opentui.symbols.editorViewSetScrollMargin(view,margin)}editorViewSetWrapMode(view,mode){let modeValue=mode==="none"?0:mode==="char"?1:2;this.opentui.symbols.editorViewSetWrapMode(view,modeValue)}editorViewGetVirtualLineCount(view){return this.opentui.symbols.editorViewGetVirtualLineCount(view)}editorViewGetTotalVirtualLineCount(view){return this.opentui.symbols.editorViewGetTotalVirtualLineCount(view)}editorViewGetTextBufferView(view){let result2=this.opentui.symbols.editorViewGetTextBufferView(view);if(!result2)throw Error("Failed to get TextBufferView from EditorView");return result2}editorViewGetLineInfo(view){let outBuffer=new ArrayBuffer(LineInfoStruct.size);this.opentui.symbols.editorViewGetLineInfoDirect(view,ptr4(outBuffer));let struct=LineInfoStruct.unpack(outBuffer),lineStartCols=struct.startCols,lineWidthCols=struct.widthCols,lineWidthColsMax=struct.widthColsMax;return{lineStartCols,lineWidthCols,lineWidthColsMax,lineSources:struct.sources,lineWraps:struct.wraps}}editorViewGetLogicalLineInfo(view){let outBuffer=new ArrayBuffer(LineInfoStruct.size);this.opentui.symbols.editorViewGetLogicalLineInfoDirect(view,ptr4(outBuffer));let struct=LineInfoStruct.unpack(outBuffer),lineStartCols=struct.startCols,lineWidthCols=struct.widthCols,lineWidthColsMax=struct.widthColsMax;return{lineStartCols,lineWidthCols,lineWidthColsMax,lineSources:struct.sources,lineWraps:struct.wraps}}createEditBuffer(widthMethod){let widthMethodCode=widthMethod==="wcwidth"?0:1,bufferPtr=this.opentui.symbols.createEditBuffer(widthMethodCode);if(!bufferPtr)throw Error("Failed to create EditBuffer");return bufferPtr}destroyEditBuffer(buffer2){this.opentui.symbols.destroyEditBuffer(buffer2)}editBufferSetText(buffer2,textBytes){this.opentui.symbols.editBufferSetText(buffer2,textBytes,textBytes.length)}editBufferSetTextFromMem(buffer2,memId){this.opentui.symbols.editBufferSetTextFromMem(buffer2,memId)}editBufferReplaceText(buffer2,textBytes){this.opentui.symbols.editBufferReplaceText(buffer2,textBytes,textBytes.length)}editBufferReplaceTextFromMem(buffer2,memId){this.opentui.symbols.editBufferReplaceTextFromMem(buffer2,memId)}editBufferGetText(buffer2,maxLength){let outBuffer=new Uint8Array(maxLength),actualLen=this.opentui.symbols.editBufferGetText(buffer2,ptr4(outBuffer),maxLength),len=typeof actualLen==="bigint"?Number(actualLen):actualLen;if(len===0)return null;return outBuffer.slice(0,len)}editBufferInsertChar(buffer2,char){let charBytes=this.encoder.encode(char);this.opentui.symbols.editBufferInsertChar(buffer2,charBytes,charBytes.length)}editBufferInsertText(buffer2,text){let textBytes=this.encoder.encode(text);this.opentui.symbols.editBufferInsertText(buffer2,textBytes,textBytes.length)}editBufferDeleteChar(buffer2){this.opentui.symbols.editBufferDeleteChar(buffer2)}editBufferDeleteCharBackward(buffer2){this.opentui.symbols.editBufferDeleteCharBackward(buffer2)}editBufferDeleteRange(buffer2,startLine,startCol,endLine,endCol){this.opentui.symbols.editBufferDeleteRange(buffer2,startLine,startCol,endLine,endCol)}editBufferNewLine(buffer2){this.opentui.symbols.editBufferNewLine(buffer2)}editBufferDeleteLine(buffer2){this.opentui.symbols.editBufferDeleteLine(buffer2)}editBufferMoveCursorLeft(buffer2){this.opentui.symbols.editBufferMoveCursorLeft(buffer2)}editBufferMoveCursorRight(buffer2){this.opentui.symbols.editBufferMoveCursorRight(buffer2)}editBufferMoveCursorUp(buffer2){this.opentui.symbols.editBufferMoveCursorUp(buffer2)}editBufferMoveCursorDown(buffer2){this.opentui.symbols.editBufferMoveCursorDown(buffer2)}editBufferGotoLine(buffer2,line){this.opentui.symbols.editBufferGotoLine(buffer2,line)}editBufferSetCursor(buffer2,line,byteOffset){this.opentui.symbols.editBufferSetCursor(buffer2,line,byteOffset)}editBufferSetCursorToLineCol(buffer2,line,col){this.opentui.symbols.editBufferSetCursorToLineCol(buffer2,line,col)}editBufferSetCursorByOffset(buffer2,offset){this.opentui.symbols.editBufferSetCursorByOffset(buffer2,offset)}editBufferGetCursorPosition(buffer2){let cursorBuffer=new ArrayBuffer(LogicalCursorStruct.size);return this.opentui.symbols.editBufferGetCursorPosition(buffer2,ptr4(cursorBuffer)),LogicalCursorStruct.unpack(cursorBuffer)}editBufferGetId(buffer2){return this.opentui.symbols.editBufferGetId(buffer2)}editBufferGetTextBuffer(buffer2){let result2=this.opentui.symbols.editBufferGetTextBuffer(buffer2);if(!result2)throw Error("Failed to get TextBuffer from EditBuffer");return result2}editBufferDebugLogRope(buffer2){this.opentui.symbols.editBufferDebugLogRope(buffer2)}editBufferUndo(buffer2,maxLength){let outBuffer=new Uint8Array(maxLength),actualLen=this.opentui.symbols.editBufferUndo(buffer2,ptr4(outBuffer),maxLength),len=typeof actualLen==="bigint"?Number(actualLen):actualLen;if(len===0)return null;return outBuffer.slice(0,len)}editBufferRedo(buffer2,maxLength){let outBuffer=new Uint8Array(maxLength),actualLen=this.opentui.symbols.editBufferRedo(buffer2,ptr4(outBuffer),maxLength),len=typeof actualLen==="bigint"?Number(actualLen):actualLen;if(len===0)return null;return outBuffer.slice(0,len)}editBufferCanUndo(buffer2){return this.opentui.symbols.editBufferCanUndo(buffer2)}editBufferCanRedo(buffer2){return this.opentui.symbols.editBufferCanRedo(buffer2)}editBufferClearHistory(buffer2){this.opentui.symbols.editBufferClearHistory(buffer2)}editBufferClear(buffer2){this.opentui.symbols.editBufferClear(buffer2)}editBufferGetNextWordBoundary(buffer2){let cursorBuffer=new ArrayBuffer(LogicalCursorStruct.size);return this.opentui.symbols.editBufferGetNextWordBoundary(buffer2,ptr4(cursorBuffer)),LogicalCursorStruct.unpack(cursorBuffer)}editBufferGetPrevWordBoundary(buffer2){let cursorBuffer=new ArrayBuffer(LogicalCursorStruct.size);return this.opentui.symbols.editBufferGetPrevWordBoundary(buffer2,ptr4(cursorBuffer)),LogicalCursorStruct.unpack(cursorBuffer)}editBufferGetEOL(buffer2){let cursorBuffer=new ArrayBuffer(LogicalCursorStruct.size);return this.opentui.symbols.editBufferGetEOL(buffer2,ptr4(cursorBuffer)),LogicalCursorStruct.unpack(cursorBuffer)}editBufferOffsetToPosition(buffer2,offset){let cursorBuffer=new ArrayBuffer(LogicalCursorStruct.size);if(!this.opentui.symbols.editBufferOffsetToPosition(buffer2,offset,ptr4(cursorBuffer)))return null;return LogicalCursorStruct.unpack(cursorBuffer)}editBufferPositionToOffset(buffer2,row,col){return this.opentui.symbols.editBufferPositionToOffset(buffer2,row,col)}editBufferGetLineStartOffset(buffer2,row){return this.opentui.symbols.editBufferGetLineStartOffset(buffer2,row)}editBufferGetTextRange(buffer2,startOffset,endOffset,maxLength){let outBuffer=new Uint8Array(maxLength),actualLen=this.opentui.symbols.editBufferGetTextRange(buffer2,startOffset,endOffset,ptr4(outBuffer),maxLength),len=typeof actualLen==="bigint"?Number(actualLen):actualLen;if(len===0)return null;return outBuffer.slice(0,len)}editBufferGetTextRangeByCoords(buffer2,startRow,startCol,endRow,endCol,maxLength){let outBuffer=new Uint8Array(maxLength),actualLen=this.opentui.symbols.editBufferGetTextRangeByCoords(buffer2,startRow,startCol,endRow,endCol,ptr4(outBuffer),maxLength),len=typeof actualLen==="bigint"?Number(actualLen):actualLen;if(len===0)return null;return outBuffer.slice(0,len)}editorViewSetSelection(view,start3,end,bgColor,fgColor){let bg2=bgColor?bgColor.buffer:null,fg2=fgColor?fgColor.buffer:null;this.opentui.symbols.editorViewSetSelection(view,start3,end,bg2,fg2)}editorViewResetSelection(view){this.opentui.symbols.editorViewResetSelection(view)}editorViewGetSelection(view){let packedInfo=this.opentui.symbols.editorViewGetSelection(view);if(packedInfo===0xffff_ffff_ffff_ffffn)return null;let start3=Number(packedInfo>>32n),end=Number(packedInfo&0xffff_ffffn);return{start:start3,end}}editorViewSetLocalSelection(view,anchorX,anchorY,focusX,focusY,bgColor,fgColor,updateCursor,followCursor){let bg2=bgColor?bgColor.buffer:null,fg2=fgColor?fgColor.buffer:null;return this.opentui.symbols.editorViewSetLocalSelection(view,anchorX,anchorY,focusX,focusY,bg2,fg2,updateCursor,followCursor)}editorViewUpdateSelection(view,end,bgColor,fgColor){let bg2=bgColor?bgColor.buffer:null,fg2=fgColor?fgColor.buffer:null;this.opentui.symbols.editorViewUpdateSelection(view,end,bg2,fg2)}editorViewUpdateLocalSelection(view,anchorX,anchorY,focusX,focusY,bgColor,fgColor,updateCursor,followCursor){let bg2=bgColor?bgColor.buffer:null,fg2=fgColor?fgColor.buffer:null;return this.opentui.symbols.editorViewUpdateLocalSelection(view,anchorX,anchorY,focusX,focusY,bg2,fg2,updateCursor,followCursor)}editorViewResetLocalSelection(view){this.opentui.symbols.editorViewResetLocalSelection(view)}editorViewGetSelectedTextBytes(view,maxLength){let outBuffer=new Uint8Array(maxLength),actualLen=this.opentui.symbols.editorViewGetSelectedTextBytes(view,ptr4(outBuffer),maxLength),len=typeof actualLen==="bigint"?Number(actualLen):actualLen;if(len===0)return null;return outBuffer.slice(0,len)}editorViewGetCursor(view){let row=new Uint32Array(1),col=new Uint32Array(1);return this.opentui.symbols.editorViewGetCursor(view,ptr4(row),ptr4(col)),{row:row[0],col:col[0]}}editorViewGetText(view,maxLength){let outBuffer=new Uint8Array(maxLength),actualLen=this.opentui.symbols.editorViewGetText(view,ptr4(outBuffer),maxLength),len=typeof actualLen==="bigint"?Number(actualLen):actualLen;if(len===0)return null;return outBuffer.slice(0,len)}editorViewGetVisualCursor(view){let cursorBuffer=new ArrayBuffer(VisualCursorStruct.size);return this.opentui.symbols.editorViewGetVisualCursor(view,ptr4(cursorBuffer)),VisualCursorStruct.unpack(cursorBuffer)}editorViewMoveUpVisual(view){this.opentui.symbols.editorViewMoveUpVisual(view)}editorViewMoveDownVisual(view){this.opentui.symbols.editorViewMoveDownVisual(view)}editorViewDeleteSelectedText(view){this.opentui.symbols.editorViewDeleteSelectedText(view)}editorViewSetCursorByOffset(view,offset){this.opentui.symbols.editorViewSetCursorByOffset(view,offset)}editorViewGetNextWordBoundary(view){let cursorBuffer=new ArrayBuffer(VisualCursorStruct.size);return this.opentui.symbols.editorViewGetNextWordBoundary(view,ptr4(cursorBuffer)),VisualCursorStruct.unpack(cursorBuffer)}editorViewGetPrevWordBoundary(view){let cursorBuffer=new ArrayBuffer(VisualCursorStruct.size);return this.opentui.symbols.editorViewGetPrevWordBoundary(view,ptr4(cursorBuffer)),VisualCursorStruct.unpack(cursorBuffer)}editorViewGetEOL(view){let cursorBuffer=new ArrayBuffer(VisualCursorStruct.size);return this.opentui.symbols.editorViewGetEOL(view,ptr4(cursorBuffer)),VisualCursorStruct.unpack(cursorBuffer)}editorViewGetVisualSOL(view){let cursorBuffer=new ArrayBuffer(VisualCursorStruct.size);return this.opentui.symbols.editorViewGetVisualSOL(view,ptr4(cursorBuffer)),VisualCursorStruct.unpack(cursorBuffer)}editorViewGetVisualEOL(view){let cursorBuffer=new ArrayBuffer(VisualCursorStruct.size);return this.opentui.symbols.editorViewGetVisualEOL(view,ptr4(cursorBuffer)),VisualCursorStruct.unpack(cursorBuffer)}bufferPushScissorRect(buffer2,x,y,width,height2){this.opentui.symbols.bufferPushScissorRect(buffer2,x,y,width,height2)}bufferPopScissorRect(buffer2){this.opentui.symbols.bufferPopScissorRect(buffer2)}bufferClearScissorRects(buffer2){this.opentui.symbols.bufferClearScissorRects(buffer2)}bufferPushOpacity(buffer2,opacity){this.opentui.symbols.bufferPushOpacity(buffer2,opacity)}bufferPopOpacity(buffer2){this.opentui.symbols.bufferPopOpacity(buffer2)}bufferGetCurrentOpacity(buffer2){return this.opentui.symbols.bufferGetCurrentOpacity(buffer2)}bufferClearOpacity(buffer2){this.opentui.symbols.bufferClearOpacity(buffer2)}getTerminalCapabilities(renderer){let capsBuffer=new ArrayBuffer(TerminalCapabilitiesStruct.size);this.opentui.symbols.getTerminalCapabilities(renderer,ptr4(capsBuffer));let caps=TerminalCapabilitiesStruct.unpack(capsBuffer);return{kitty_keyboard:caps.kitty_keyboard,kitty_graphics:caps.kitty_graphics,rgb:caps.rgb,ansi256:caps.ansi256,unicode:caps.unicode,sgr_pixels:caps.sgr_pixels,color_scheme_updates:caps.color_scheme_updates,explicit_width:caps.explicit_width,scaled_text:caps.scaled_text,sixel:caps.sixel,focus_tracking:caps.focus_tracking,sync:caps.sync,bracketed_paste:caps.bracketed_paste,hyperlinks:caps.hyperlinks,osc52:caps.osc52,explicit_cursor_positioning:caps.explicit_cursor_positioning,terminal:{name:caps.term_name??"",version:caps.term_version??"",from_xtversion:caps.term_from_xtversion}}}processCapabilityResponse(renderer,response){let responseBytes=this.encoder.encode(response);this.opentui.symbols.processCapabilityResponse(renderer,responseBytes,responseBytes.length)}encodeUnicode(text,widthMethod){let textBytes=this.encoder.encode(text),widthMethodCode=widthMethod==="wcwidth"?0:1,outPtrBuffer=new ArrayBuffer(8),outLenBuffer=new ArrayBuffer(8);if(!this.opentui.symbols.encodeUnicode(textBytes,textBytes.length,ptr4(outPtrBuffer),ptr4(outLenBuffer),widthMethodCode))return null;let outPtrView=new BigUint64Array(outPtrBuffer),outLenView=new BigUint64Array(outLenBuffer),resultPtr=Number(outPtrView[0]),resultLen=Number(outLenView[0]);if(resultLen===0)return{ptr:resultPtr,data:[]};let byteLen=resultLen*EncodedCharStruct.size,raw=toArrayBuffer4(resultPtr,0,byteLen),data=EncodedCharStruct.unpackList(raw,resultLen);return{ptr:resultPtr,data}}freeUnicode(encoded){this.opentui.symbols.freeUnicode(encoded.ptr,encoded.data.length)}bufferDrawChar(buffer2,char,x,y,fg2,bg2,attributes=0){this.opentui.symbols.bufferDrawChar(buffer2,char,x,y,fg2.buffer,bg2.buffer,attributes)}registerNativeSpanFeedStream(stream,handler){let callback=this.ensureNativeSpanFeedCallback();this.nativeSpanFeedHandlers.set(toPointer(stream),handler),this.opentui.symbols.streamSetCallback(stream,callback.ptr)}unregisterNativeSpanFeedStream(stream){this.opentui.symbols.streamSetCallback(stream,null),this.nativeSpanFeedHandlers.delete(toPointer(stream))}createNativeSpanFeed(options){let optionsBuffer=options==null?null:NativeSpanFeedOptionsStruct.pack(options),streamPtr=this.opentui.symbols.createNativeSpanFeed(optionsBuffer?ptr4(optionsBuffer):null);if(!streamPtr)throw Error("Failed to create stream");return toPointer(streamPtr)}attachNativeSpanFeed(stream){return this.opentui.symbols.attachNativeSpanFeed(stream)}destroyNativeSpanFeed(stream){this.opentui.symbols.destroyNativeSpanFeed(stream),this.nativeSpanFeedHandlers.delete(toPointer(stream))}streamWrite(stream,data){let bytes=typeof data==="string"?this.encoder.encode(data):data;return this.opentui.symbols.streamWrite(stream,ptr4(bytes),bytes.length)}streamCommit(stream){return this.opentui.symbols.streamCommit(stream)}streamDrainSpans(stream,outBuffer,maxSpans){let count=this.opentui.symbols.streamDrainSpans(stream,ptr4(outBuffer),maxSpans);return toNumber(count)}streamClose(stream){return this.opentui.symbols.streamClose(stream)}streamSetOptions(stream,options){let optionsBuffer=NativeSpanFeedOptionsStruct.pack(options);return this.opentui.symbols.streamSetOptions(stream,ptr4(optionsBuffer))}streamGetStats(stream){let statsBuffer=new ArrayBuffer(NativeSpanFeedStatsStruct.size);if(this.opentui.symbols.streamGetStats(stream,ptr4(statsBuffer))!==0)return null;let stats2=NativeSpanFeedStatsStruct.unpack(statsBuffer);return{bytesWritten:typeof stats2.bytesWritten==="bigint"?stats2.bytesWritten:BigInt(stats2.bytesWritten),spansCommitted:typeof stats2.spansCommitted==="bigint"?stats2.spansCommitted:BigInt(stats2.spansCommitted),chunks:stats2.chunks,pendingSpans:stats2.pendingSpans}}streamReserve(stream,minLen){let reserveBuffer=new ArrayBuffer(ReserveInfoStruct.size),status=this.opentui.symbols.streamReserve(stream,minLen,ptr4(reserveBuffer));if(status!==0)return{status,info:null};return{status,info:ReserveInfoStruct.unpack(reserveBuffer)}}streamCommitReserved(stream,length){return this.opentui.symbols.streamCommitReserved(stream,length)}createSyntaxStyle(){let stylePtr=this.opentui.symbols.createSyntaxStyle();if(!stylePtr)throw Error("Failed to create SyntaxStyle");return stylePtr}destroySyntaxStyle(style){this.opentui.symbols.destroySyntaxStyle(style)}syntaxStyleRegister(style,name,fg2,bg2,attributes){let nameBytes=this.encoder.encode(name),fgPtr=fg2?fg2.buffer:null,bgPtr=bg2?bg2.buffer:null;return this.opentui.symbols.syntaxStyleRegister(style,nameBytes,nameBytes.length,fgPtr,bgPtr,attributes)}syntaxStyleResolveByName(style,name){let nameBytes=this.encoder.encode(name),id=this.opentui.symbols.syntaxStyleResolveByName(style,nameBytes,nameBytes.length);return id===0?null:id}syntaxStyleGetStyleCount(style){let result2=this.opentui.symbols.syntaxStyleGetStyleCount(style);return typeof result2==="bigint"?Number(result2):result2}editorViewSetPlaceholderStyledText(view,chunks){let nonEmptyChunks=chunks.filter((c)=>c.text.length>0);if(nonEmptyChunks.length===0){this.opentui.symbols.editorViewSetPlaceholderStyledText(view,null,0);return}let chunksBuffer=StyledChunkStruct.packList(nonEmptyChunks);this.opentui.symbols.editorViewSetPlaceholderStyledText(view,ptr4(chunksBuffer),nonEmptyChunks.length)}editorViewSetTabIndicator(view,indicator){this.opentui.symbols.editorViewSetTabIndicator(view,indicator)}editorViewSetTabIndicatorColor(view,color2){this.opentui.symbols.editorViewSetTabIndicatorColor(view,color2.buffer)}onNativeEvent(name,handler){this._nativeEvents.on(name,handler)}onceNativeEvent(name,handler){this._nativeEvents.once(name,handler)}offNativeEvent(name,handler){this._nativeEvents.off(name,handler)}onAnyNativeEvent(handler){this._anyEventHandlers.push(handler)}}function setRenderLibPath(libPath){if(opentuiLibPath!==libPath)opentuiLibPath=libPath,opentuiLib=void 0}function resolveRenderLib(){if(!opentuiLib)try{opentuiLib=new FFIRenderLib(opentuiLibPath)}catch(error2){throw Error(`Failed to initialize OpenTUI render library: ${error2 instanceof Error?error2.message:"Unknown error"}`)}return opentuiLib}class TextBuffer{lib;bufferPtr;_length=0;_byteSize=0;_lineInfo;_destroyed=!1;_syntaxStyle;_textBytes;_memId;_appendedChunks=[];constructor(lib,ptr5){this.lib=lib,this.bufferPtr=ptr5}static create(widthMethod){return resolveRenderLib().createTextBuffer(widthMethod)}guard(){if(this._destroyed)throw Error("TextBuffer is destroyed")}setText(text){if(this.guard(),this._textBytes=this.lib.encoder.encode(text),this._memId===void 0)this._memId=this.lib.textBufferRegisterMemBuffer(this.bufferPtr,this._textBytes,!1);else this.lib.textBufferReplaceMemBuffer(this.bufferPtr,this._memId,this._textBytes,!1);this.lib.textBufferSetTextFromMem(this.bufferPtr,this._memId),this._length=this.lib.textBufferGetLength(this.bufferPtr),this._byteSize=this.lib.textBufferGetByteSize(this.bufferPtr),this._lineInfo=void 0,this._appendedChunks=[]}append(text){this.guard();let textBytes=this.lib.encoder.encode(text);this._appendedChunks.push(textBytes),this.lib.textBufferAppend(this.bufferPtr,textBytes),this._length=this.lib.textBufferGetLength(this.bufferPtr),this._byteSize=this.lib.textBufferGetByteSize(this.bufferPtr),this._lineInfo=void 0}loadFile(path52){if(this.guard(),!this.lib.textBufferLoadFile(this.bufferPtr,path52))throw Error(`Failed to load file: ${path52}`);this._length=this.lib.textBufferGetLength(this.bufferPtr),this._byteSize=this.lib.textBufferGetByteSize(this.bufferPtr),this._lineInfo=void 0,this._textBytes=void 0}setStyledText(text){this.guard(),this.lib.textBufferSetStyledText(this.bufferPtr,text.chunks),this._length=this.lib.textBufferGetLength(this.bufferPtr),this._byteSize=this.lib.textBufferGetByteSize(this.bufferPtr),this._lineInfo=void 0}setDefaultFg(fg2){this.guard(),this.lib.textBufferSetDefaultFg(this.bufferPtr,fg2)}setDefaultBg(bg2){this.guard(),this.lib.textBufferSetDefaultBg(this.bufferPtr,bg2)}setDefaultAttributes(attributes){this.guard(),this.lib.textBufferSetDefaultAttributes(this.bufferPtr,attributes)}resetDefaults(){this.guard(),this.lib.textBufferResetDefaults(this.bufferPtr)}getLineCount(){return this.guard(),this.lib.textBufferGetLineCount(this.bufferPtr)}get length(){return this.guard(),this._length}get byteSize(){return this.guard(),this._byteSize}get ptr(){return this.guard(),this.bufferPtr}getPlainText(){if(this.guard(),this._byteSize===0)return"";let plainBytes=this.lib.getPlainTextBytes(this.bufferPtr,this._byteSize);if(!plainBytes)return"";return this.lib.decoder.decode(plainBytes)}getTextRange(startOffset,endOffset){if(this.guard(),startOffset>=endOffset)return"";if(this._byteSize===0)return"";let rangeBytes=this.lib.textBufferGetTextRange(this.bufferPtr,startOffset,endOffset,this._byteSize);if(!rangeBytes)return"";return this.lib.decoder.decode(rangeBytes)}addHighlightByCharRange(highlight){this.guard(),this.lib.textBufferAddHighlightByCharRange(this.bufferPtr,highlight)}addHighlight(lineIdx,highlight){this.guard(),this.lib.textBufferAddHighlight(this.bufferPtr,lineIdx,highlight)}removeHighlightsByRef(hlRef){this.guard(),this.lib.textBufferRemoveHighlightsByRef(this.bufferPtr,hlRef)}clearLineHighlights(lineIdx){this.guard(),this.lib.textBufferClearLineHighlights(this.bufferPtr,lineIdx)}clearAllHighlights(){this.guard(),this.lib.textBufferClearAllHighlights(this.bufferPtr)}getLineHighlights(lineIdx){return this.guard(),this.lib.textBufferGetLineHighlights(this.bufferPtr,lineIdx)}getHighlightCount(){return this.guard(),this.lib.textBufferGetHighlightCount(this.bufferPtr)}setSyntaxStyle(style){this.guard(),this._syntaxStyle=style??void 0,this.lib.textBufferSetSyntaxStyle(this.bufferPtr,style?.ptr??null)}getSyntaxStyle(){return this.guard(),this._syntaxStyle??null}setTabWidth(width){this.guard(),this.lib.textBufferSetTabWidth(this.bufferPtr,width)}getTabWidth(){return this.guard(),this.lib.textBufferGetTabWidth(this.bufferPtr)}clear(){this.guard(),this.lib.textBufferClear(this.bufferPtr),this._length=0,this._byteSize=0,this._lineInfo=void 0,this._textBytes=void 0,this._appendedChunks=[]}reset(){this.guard(),this.lib.textBufferReset(this.bufferPtr),this._length=0,this._byteSize=0,this._lineInfo=void 0,this._textBytes=void 0,this._memId=void 0,this._appendedChunks=[]}destroy(){if(this._destroyed)return;this._destroyed=!0,this.lib.destroyTextBuffer(this.bufferPtr)}}function validateOptions(id,options){if(typeof options.width==="number"){if(options.width<0)throw TypeError(`Invalid width for Renderable ${id}: ${options.width}`)}if(typeof options.height==="number"){if(options.height<0)throw TypeError(`Invalid height for Renderable ${id}: ${options.height}`)}}function isValidPercentage(value){if(typeof value==="string"&&value.endsWith("%")){let numPart=value.slice(0,-1),num=parseFloat(numPart);return!Number.isNaN(num)}return!1}function isMarginType(value){if(typeof value==="number"&&!Number.isNaN(value))return!0;if(value==="auto")return!0;return isValidPercentage(value)}function isPaddingType(value){if(typeof value==="number"&&!Number.isNaN(value))return!0;return isValidPercentage(value)}function isPositionType(value){if(typeof value==="number"&&!Number.isNaN(value))return!0;if(value==="auto")return!0;return isValidPercentage(value)}function isPositionTypeType(value){return value==="relative"||value==="absolute"}function isOverflowType(value){return value==="visible"||value==="hidden"||value==="scroll"}function isDimensionType(value){return isPositionType(value)}function isFlexBasisType(value){if(value===void 0||value==="auto")return!0;if(typeof value==="number"&&!Number.isNaN(value))return!0;return!1}function isSizeType(value){if(value===void 0)return!0;if(typeof value==="number"&&!Number.isNaN(value))return!0;return isValidPercentage(value)}function isRenderable(obj){return!!obj?.[BrandedRenderable]}function isRenderableConstructor(value){return typeof value==="function"&&value.prototype&&Renderable.prototype.isPrototypeOf(value.prototype)}function flattenChildren(children){let result2=[];for(let child of children)if(Array.isArray(child))result2.push(...flattenChildren(child));else if(child!==null&&child!==void 0&&child!==!1)result2.push(child);return result2}function h(type2,props,...children){if(typeof type2!=="function")throw TypeError("h() received an invalid vnode type");let vnode={[BrandedVNode]:!0,type:type2,props,children:flattenChildren(children),__pendingCalls:[]};if(isRenderableConstructor(type2))return new Proxy(vnode,{get(target,prop,receiver){if(prop in target)return Reflect.get(target,prop,receiver);if(typeof prop==="string"){let prototype=type2.prototype;if(prototype&&(typeof prototype[prop]==="function"||Object.getOwnPropertyDescriptor(prototype,prop)||Object.getOwnPropertyDescriptor(Object.getPrototypeOf(prototype),prop)))return(...args)=>{return target.__pendingCalls=target.__pendingCalls||[],target.__pendingCalls.push({method:prop,args}),target}}return Reflect.get(target,prop,receiver)},set(target,prop,value,receiver){if(typeof prop==="string"&&isRenderableConstructor(type2)){let prototype=type2.prototype,descriptor=Object.getOwnPropertyDescriptor(prototype,prop)||Object.getOwnPropertyDescriptor(Object.getPrototypeOf(prototype),prop);if(descriptor&&descriptor.set)return target.__pendingCalls=target.__pendingCalls||[],target.__pendingCalls.push({method:prop,args:[value],isProperty:!0}),!0}return Reflect.set(target,prop,value,receiver)}});return vnode}function isVNode(node){return node&&node[BrandedVNode]}function maybeMakeRenderable(ctx,node){if(isRenderable(node))return node;if(isVNode(node))return instantiate(ctx,node);return console.warn("maybeMakeRenderable received an invalid node",util3.inspect(node,{depth:2})),null}function wrapWithDelegates(instance,delegateMap){if(!delegateMap||Object.keys(delegateMap).length===0)return instance;let descendantCache=new Map,getDescendant=(id)=>{if(descendantCache.has(id)){let cached=descendantCache.get(id);if(cached!==void 0)return cached}let descendant=instance.findDescendantById(id);if(descendant)descendantCache.set(id,descendant);return descendant};return new Proxy(instance,{get(target,prop,receiver){if(typeof prop==="string"&&delegateMap[prop]){let host=getDescendant(delegateMap[prop]);if(host){let value=host[prop];if(typeof value==="function")return value.bind(host);return value}}return Reflect.get(target,prop,receiver)},set(target,prop,value,receiver){if(typeof prop==="string"&&delegateMap[prop]){let host=getDescendant(delegateMap[prop]);if(host)return Reflect.set(host,prop,value)}return Reflect.set(target,prop,value,receiver)}})}function instantiate(ctx,node){if(isRenderable(node))return node;if(!node||typeof node!=="object")throw TypeError("mount() received an invalid vnode");let vnode=node,{type:type2,props}=vnode,children=flattenChildren(vnode.children||[]),delegateMap=vnode.__delegateMap;if(isRenderableConstructor(type2)){let instance=new type2(ctx,props||{});for(let child of children)if(isRenderable(child))instance.add(child);else{let mounted=instantiate(ctx,child);instance.add(mounted)}let delegatedInstance=wrapWithDelegates(instance,delegateMap),pendingCalls=vnode.__pendingCalls;if(pendingCalls)for(let call of pendingCalls)if(call.isProperty)delegatedInstance[call.method]=call.args[0];else delegatedInstance[call.method].apply(delegatedInstance,call.args);return delegatedInstance}let resolved=type2(props||{},children),inst=instantiate(ctx,resolved);return wrapWithDelegates(inst,delegateMap)}function delegate(mapping,vnode){if(isRenderable(vnode))return wrapWithDelegates(vnode,mapping);if(!vnode||typeof vnode!=="object")return vnode;return vnode.__delegateMap={...vnode.__delegateMap||{},...mapping},vnode}class TextBufferView{lib;viewPtr;textBuffer;_destroyed=!1;constructor(lib,ptr5,textBuffer){this.lib=lib,this.viewPtr=ptr5,this.textBuffer=textBuffer}static create(textBuffer){let lib=resolveRenderLib(),viewPtr=lib.createTextBufferView(textBuffer.ptr);return new TextBufferView(lib,viewPtr,textBuffer)}guard(){if(this._destroyed)throw Error("TextBufferView is destroyed")}get ptr(){return this.guard(),this.viewPtr}setSelection(start3,end,bgColor,fgColor){this.guard(),this.lib.textBufferViewSetSelection(this.viewPtr,start3,end,bgColor||null,fgColor||null)}updateSelection(end,bgColor,fgColor){this.guard(),this.lib.textBufferViewUpdateSelection(this.viewPtr,end,bgColor||null,fgColor||null)}resetSelection(){this.guard(),this.lib.textBufferViewResetSelection(this.viewPtr)}getSelection(){return this.guard(),this.lib.textBufferViewGetSelection(this.viewPtr)}hasSelection(){return this.guard(),this.getSelection()!==null}setLocalSelection(anchorX,anchorY,focusX,focusY,bgColor,fgColor){return this.guard(),this.lib.textBufferViewSetLocalSelection(this.viewPtr,anchorX,anchorY,focusX,focusY,bgColor||null,fgColor||null)}updateLocalSelection(anchorX,anchorY,focusX,focusY,bgColor,fgColor){return this.guard(),this.lib.textBufferViewUpdateLocalSelection(this.viewPtr,anchorX,anchorY,focusX,focusY,bgColor||null,fgColor||null)}resetLocalSelection(){this.guard(),this.lib.textBufferViewResetLocalSelection(this.viewPtr)}setWrapWidth(width){this.guard(),this.lib.textBufferViewSetWrapWidth(this.viewPtr,width??0)}setWrapMode(mode){this.guard(),this.lib.textBufferViewSetWrapMode(this.viewPtr,mode)}setFirstLineOffset(offset){this.guard(),this.lib.textBufferViewSetFirstLineOffset(this.viewPtr,offset)}setViewportSize(width,height2){this.guard(),this.lib.textBufferViewSetViewportSize(this.viewPtr,width,height2)}setViewport(x,y,width,height2){this.guard(),this.lib.textBufferViewSetViewport(this.viewPtr,x,y,width,height2)}get lineInfo(){return this.guard(),this.lib.textBufferViewGetLineInfo(this.viewPtr)}get logicalLineInfo(){return this.guard(),this.lib.textBufferViewGetLogicalLineInfo(this.viewPtr)}getSelectedText(){this.guard();let byteSize=this.textBuffer.byteSize;if(byteSize===0)return"";let selectedBytes=this.lib.textBufferViewGetSelectedTextBytes(this.viewPtr,byteSize);if(!selectedBytes)return"";return this.lib.decoder.decode(selectedBytes)}getPlainText(){this.guard();let byteSize=this.textBuffer.byteSize;if(byteSize===0)return"";let plainBytes=this.lib.textBufferViewGetPlainTextBytes(this.viewPtr,byteSize);if(!plainBytes)return"";return this.lib.decoder.decode(plainBytes)}setTabIndicator(indicator){this.guard();let codePoint=typeof indicator==="string"?indicator.codePointAt(0)??0:indicator;this.lib.textBufferViewSetTabIndicator(this.viewPtr,codePoint)}setTabIndicatorColor(color2){this.guard(),this.lib.textBufferViewSetTabIndicatorColor(this.viewPtr,color2)}setTruncate(truncate5){this.guard(),this.lib.textBufferViewSetTruncate(this.viewPtr,truncate5)}measureForDimensions(width,height2){return this.guard(),this.lib.textBufferViewMeasureForDimensions(this.viewPtr,width,height2)}getVirtualLineCount(){return this.guard(),this.lib.textBufferViewGetVirtualLineCount(this.viewPtr)}destroy(){if(this._destroyed)return;this._destroyed=!0,this.lib.destroyTextBufferView(this.viewPtr)}}class EditorView{lib;viewPtr;editBuffer;_destroyed=!1;_extmarksController;_textBufferViewPtr;constructor(lib,ptr5,editBuffer){this.lib=lib,this.viewPtr=ptr5,this.editBuffer=editBuffer}static create(editBuffer,viewportWidth,viewportHeight){let lib=resolveRenderLib(),viewPtr=lib.createEditorView(editBuffer.ptr,viewportWidth,viewportHeight);return new EditorView(lib,viewPtr,editBuffer)}guard(){if(this._destroyed)throw Error("EditorView is destroyed")}get ptr(){return this.guard(),this.viewPtr}setViewportSize(width,height2){this.guard(),this.lib.editorViewSetViewportSize(this.viewPtr,width,height2)}setViewport(x,y,width,height2,moveCursor=!0){this.guard(),this.lib.editorViewSetViewport(this.viewPtr,x,y,width,height2,moveCursor)}getViewport(){return this.guard(),this.lib.editorViewGetViewport(this.viewPtr)}setScrollMargin(margin){this.guard(),this.lib.editorViewSetScrollMargin(this.viewPtr,margin)}setWrapMode(mode){this.guard(),this.lib.editorViewSetWrapMode(this.viewPtr,mode)}getVirtualLineCount(){return this.guard(),this.lib.editorViewGetVirtualLineCount(this.viewPtr)}getTotalVirtualLineCount(){return this.guard(),this.lib.editorViewGetTotalVirtualLineCount(this.viewPtr)}setSelection(start3,end,bgColor,fgColor){this.guard(),this.lib.editorViewSetSelection(this.viewPtr,start3,end,bgColor||null,fgColor||null)}updateSelection(end,bgColor,fgColor){this.guard(),this.lib.editorViewUpdateSelection(this.viewPtr,end,bgColor||null,fgColor||null)}resetSelection(){this.guard(),this.lib.editorViewResetSelection(this.viewPtr)}getSelection(){return this.guard(),this.lib.editorViewGetSelection(this.viewPtr)}hasSelection(){return this.guard(),this.getSelection()!==null}setLocalSelection(anchorX,anchorY,focusX,focusY,bgColor,fgColor,updateCursor,followCursor){return this.guard(),this.lib.editorViewSetLocalSelection(this.viewPtr,anchorX,anchorY,focusX,focusY,bgColor||null,fgColor||null,updateCursor??!1,followCursor??!1)}updateLocalSelection(anchorX,anchorY,focusX,focusY,bgColor,fgColor,updateCursor,followCursor){return this.guard(),this.lib.editorViewUpdateLocalSelection(this.viewPtr,anchorX,anchorY,focusX,focusY,bgColor||null,fgColor||null,updateCursor??!1,followCursor??!1)}resetLocalSelection(){this.guard(),this.lib.editorViewResetLocalSelection(this.viewPtr)}getSelectedText(){this.guard();let maxLength=1048576,selectedBytes=this.lib.editorViewGetSelectedTextBytes(this.viewPtr,maxLength);if(!selectedBytes)return"";return this.lib.decoder.decode(selectedBytes)}getCursor(){return this.guard(),this.lib.editorViewGetCursor(this.viewPtr)}getText(){this.guard();let maxLength=1048576,textBytes=this.lib.editorViewGetText(this.viewPtr,maxLength);if(!textBytes)return"";return this.lib.decoder.decode(textBytes)}getVisualCursor(){return this.guard(),this.lib.editorViewGetVisualCursor(this.viewPtr)}moveUpVisual(){this.guard(),this.lib.editorViewMoveUpVisual(this.viewPtr)}moveDownVisual(){this.guard(),this.lib.editorViewMoveDownVisual(this.viewPtr)}deleteSelectedText(){this.guard(),this.lib.editorViewDeleteSelectedText(this.viewPtr)}setCursorByOffset(offset){this.guard(),this.lib.editorViewSetCursorByOffset(this.viewPtr,offset)}getNextWordBoundary(){return this.guard(),this.lib.editorViewGetNextWordBoundary(this.viewPtr)}getPrevWordBoundary(){return this.guard(),this.lib.editorViewGetPrevWordBoundary(this.viewPtr)}getEOL(){return this.guard(),this.lib.editorViewGetEOL(this.viewPtr)}getVisualSOL(){return this.guard(),this.lib.editorViewGetVisualSOL(this.viewPtr)}getVisualEOL(){return this.guard(),this.lib.editorViewGetVisualEOL(this.viewPtr)}getLineInfo(){return this.guard(),this.lib.editorViewGetLineInfo(this.viewPtr)}getLogicalLineInfo(){return this.guard(),this.lib.editorViewGetLogicalLineInfo(this.viewPtr)}get extmarks(){if(!this._extmarksController)this._extmarksController=createExtmarksController(this.editBuffer,this);return this._extmarksController}setPlaceholderStyledText(chunks){this.guard(),this.lib.editorViewSetPlaceholderStyledText(this.viewPtr,chunks)}setTabIndicator(indicator){this.guard();let codePoint=typeof indicator==="string"?indicator.codePointAt(0)??0:indicator;this.lib.editorViewSetTabIndicator(this.viewPtr,codePoint)}setTabIndicatorColor(color2){this.guard(),this.lib.editorViewSetTabIndicatorColor(this.viewPtr,color2)}measureForDimensions(width,height2){if(this.guard(),!this._textBufferViewPtr)this._textBufferViewPtr=this.lib.editorViewGetTextBufferView(this.viewPtr);return this.lib.textBufferViewMeasureForDimensions(this._textBufferViewPtr,width,height2)}destroy(){if(this._destroyed)return;if(this._extmarksController)this._extmarksController.destroy(),this._extmarksController=void 0;this._destroyed=!0,this.lib.destroyEditorView(this.viewPtr)}}function convertThemeToStyles(theme){let flatStyles={};for(let tokenStyle of theme){let styleDefinition={};if(tokenStyle.style.foreground)styleDefinition.fg=parseColor(tokenStyle.style.foreground);if(tokenStyle.style.background)styleDefinition.bg=parseColor(tokenStyle.style.background);if(tokenStyle.style.bold!==void 0)styleDefinition.bold=tokenStyle.style.bold;if(tokenStyle.style.italic!==void 0)styleDefinition.italic=tokenStyle.style.italic;if(tokenStyle.style.underline!==void 0)styleDefinition.underline=tokenStyle.style.underline;if(tokenStyle.style.dim!==void 0)styleDefinition.dim=tokenStyle.style.dim;for(let scope of tokenStyle.scope)flatStyles[scope]=styleDefinition}return flatStyles}class SyntaxStyle{lib;stylePtr;_destroyed=!1;nameCache=new Map;styleDefs=new Map;mergedCache=new Map;constructor(lib,ptr5){this.lib=lib,this.stylePtr=ptr5}static create(){let lib=resolveRenderLib(),ptr5=lib.createSyntaxStyle();return new SyntaxStyle(lib,ptr5)}static fromTheme(theme){let style=SyntaxStyle.create(),flatStyles=convertThemeToStyles(theme);for(let[name,styleDef]of Object.entries(flatStyles))style.registerStyle(name,styleDef);return style}static fromStyles(styles){let style=SyntaxStyle.create();for(let[name,styleDef]of Object.entries(styles))style.registerStyle(name,styleDef);return style}guard(){if(this._destroyed)throw Error("NativeSyntaxStyle is destroyed")}registerStyle(name,style){this.guard();let attributes=createTextAttributes({bold:style.bold,italic:style.italic,underline:style.underline,dim:style.dim}),id=this.lib.syntaxStyleRegister(this.stylePtr,name,style.fg||null,style.bg||null,attributes);return this.nameCache.set(name,id),this.styleDefs.set(name,style),id}resolveStyleId(name){this.guard();let cached=this.nameCache.get(name);if(cached!==void 0)return cached;let id=this.lib.syntaxStyleResolveByName(this.stylePtr,name);if(id!==null)this.nameCache.set(name,id);return id}getStyleId(name){this.guard();let id=this.resolveStyleId(name);if(id!==null)return id;if(name.includes(".")){let baseName=name.split(".")[0];return this.resolveStyleId(baseName)}return null}get ptr(){return this.guard(),this.stylePtr}getStyleCount(){return this.guard(),this.lib.syntaxStyleGetStyleCount(this.stylePtr)}clearNameCache(){this.nameCache.clear()}getStyle(name){if(this.guard(),Object.prototype.hasOwnProperty.call(this.styleDefs,name))return;let style=this.styleDefs.get(name);if(style)return style;if(name.includes(".")){let baseName=name.split(".")[0];if(Object.prototype.hasOwnProperty.call(this.styleDefs,baseName))return;return this.styleDefs.get(baseName)}return}mergeStyles(...styleNames){this.guard();let cacheKey=styleNames.join(":"),cached=this.mergedCache.get(cacheKey);if(cached)return cached;let styleDefinition={};for(let name of styleNames){let style=this.getStyle(name);if(!style)continue;if(style.fg)styleDefinition.fg=style.fg;if(style.bg)styleDefinition.bg=style.bg;if(style.bold!==void 0)styleDefinition.bold=style.bold;if(style.italic!==void 0)styleDefinition.italic=style.italic;if(style.underline!==void 0)styleDefinition.underline=style.underline;if(style.dim!==void 0)styleDefinition.dim=style.dim}let attributes=createTextAttributes({bold:styleDefinition.bold,italic:styleDefinition.italic,underline:styleDefinition.underline,dim:styleDefinition.dim}),merged={fg:styleDefinition.fg,bg:styleDefinition.bg,attributes};return this.mergedCache.set(cacheKey,merged),merged}clearCache(){this.guard(),this.mergedCache.clear()}getCacheSize(){return this.guard(),this.mergedCache.size}getAllStyles(){return this.guard(),new Map(this.styleDefs)}getRegisteredNames(){return this.guard(),Array.from(this.styleDefs.keys())}destroy(){if(this._destroyed)return;this._destroyed=!0,this.nameCache.clear(),this.styleDefs.clear(),this.mergedCache.clear(),this.lib.destroySyntaxStyle(this.stylePtr)}}function isGapType(value){if(value===void 0)return!0;if(typeof value==="number"&&!Number.isNaN(value))return!0;return isValidPercentage(value)}function isTextNodeRenderable(obj){return!!obj?.[BrandedTextNodeRenderable]}function styledTextToTextNodes(styledText){return styledText.chunks.map((chunk)=>{let node=new TextNodeRenderable({fg:chunk.fg,bg:chunk.bg,attributes:chunk.attributes,link:chunk.link});return node.add(chunk.text),node})}function mergeKeyAliases(defaults,custom2){return{...defaults,...custom2}}function mergeKeyBindings(defaults,custom2){let map2=new Map;for(let binding of defaults){let key=getKeyBindingKey(binding);map2.set(key,binding)}for(let binding of custom2){let key=getKeyBindingKey(binding);map2.set(key,binding)}return Array.from(map2.values())}function getKeyBindingKey(binding){return`${binding.name}:${binding.ctrl?1:0}:${binding.shift?1:0}:${binding.meta?1:0}:${binding.super?1:0}`}function getBaseCodeKeyName(baseCode){if(baseCode===void 0||baseCode<32||baseCode===127)return;try{let name=String.fromCodePoint(baseCode);if(name.length===1&&name>="A"&&name<="Z")return name.toLowerCase();return name}catch{return}}function getKeyBindingKeys(binding){let names=new Set([binding.name]),baseCodeName=getBaseCodeKeyName(binding.baseCode);if(baseCodeName)names.add(baseCodeName);return[...names].map((name)=>getKeyBindingKey({...binding,name}))}function getKeyBindingAction(map2,binding){for(let key of getKeyBindingKeys(binding)){let action=map2.get(key);if(action!==void 0)return action}return}function matchesKeyBinding(binding,match){let matchKey=getKeyBindingKey(match);return getKeyBindingKeys(binding).includes(matchKey)}function buildKeyBindingsMap(bindings,aliasMap){let map2=new Map,aliases=aliasMap||{};for(let binding of bindings){let key=getKeyBindingKey(binding);map2.set(key,binding.action)}for(let binding of bindings){let normalizedName=aliases[binding.name]||binding.name;if(normalizedName!==binding.name){let aliasedKey=getKeyBindingKey({...binding,name:normalizedName});map2.set(aliasedKey,binding.action)}}return map2}function keyBindingToString(binding){let parts=[];if(binding.ctrl)parts.push("ctrl");if(binding.shift)parts.push("shift");if(binding.meta)parts.push("meta");if(binding.super)parts.push("super");return parts.push(binding.name),parts.join("+")}function getCallerInfo(){let stackLines=Error().stack?.split(`
3073
3073
  `).slice(5)||[];if(!stackLines.length)return null;let callerLine=stackLines[0].trim(),regex=/at\s+(?:([\w$.<>]+)\s+\()?((?:\/|[A-Za-z]:\\)[^:]+):(\d+):(\d+)\)?/,match=callerLine.match(regex);if(!match)return null;let functionName=match[1]||"<anonymous>",fullPath=match[2],fileName=fullPath.split(/[\\/]/).pop()||"<unknown>",lineNumber=parseInt(match[3],10)||0,columnNumber=parseInt(match[4],10)||0;return{functionName,fullPath,fileName,lineNumber,columnNumber}}function sameCapture(a,b2){if(a===b2)return!0;if(!a||!b2)return!a&&!b2;if(a.length!==b2.length)return!1;return a.every((item,i2)=>item===b2[i2])}function sameTraits(a,b2){return a.suspend===b2.suspend&&a.status===b2.status&&sameCapture(a.capture,b2.capture)}function isEditBufferRenderable(obj){return!!(obj&&typeof obj==="object"&&(BrandedEditBufferRenderable in obj))}function encodeOsc52Payload(text,encoder2=new TextEncoder){let base64=Buffer.from(text).toString("base64");return encoder2.encode(base64)}class Clipboard{lib;rendererPtr;constructor(lib,rendererPtr){this.lib=lib,this.rendererPtr=rendererPtr}copyToClipboardOSC52(text,target=0){if(!this.isOsc52Supported())return!1;let payload=encodeOsc52Payload(text,this.lib.encoder);return this.lib.copyToClipboardOSC52(this.rendererPtr,target,payload)}clearClipboardOSC52(target=0){if(!this.isOsc52Supported())return!1;return this.lib.clearClipboardOSC52(this.rendererPtr,target)}isOsc52Supported(){let caps=this.lib.getTerminalCapabilities(this.rendererPtr);return Boolean(caps?.osc52)}}function getObjectsInViewport(viewport,objects,direction="column",padding=10,minTriggerSize=16){if(viewport.width<=0||viewport.height<=0)return[];if(objects.length===0)return[];if(objects.length<minTriggerSize)return objects;let viewportTop=viewport.y-padding,viewportBottom=viewport.y+viewport.height+padding,viewportLeft=viewport.x-padding,viewportRight=viewport.x+viewport.width+padding,isRow=direction==="row",children=objects,totalChildren=children.length;if(totalChildren===0)return[];let vpStart=isRow?viewportLeft:viewportTop,vpEnd=isRow?viewportRight:viewportBottom,lo=0,hi=totalChildren-1,candidate=-1;while(lo<=hi){let mid=lo+hi>>1,c=children[mid],start3=isRow?c.screenX:c.screenY;if((isRow?c.screenX+c.width:c.screenY+c.height)<vpStart)lo=mid+1;else if(start3>vpEnd)hi=mid-1;else{candidate=mid;break}}let visibleChildren=[];if(candidate===-1)candidate=lo>0?lo-1:0;let maxLookBehind=50,left=candidate,gapCount=0;while(left-1>=0){let prev=children[left-1];if((isRow?prev.screenX+prev.width:prev.screenY+prev.height)<=vpStart){if(gapCount++,gapCount>=maxLookBehind)break}else gapCount=0;left--}let right=candidate+1;while(right<totalChildren){let next=children[right];if((isRow?next.screenX:next.screenY)>=vpEnd)break;right++}for(let i2=left;i2<right;i2++){let child=children[i2],start3=isRow?child.screenX:child.screenY;if((isRow?child.screenX+child.width:child.screenY+child.height)<=vpStart)continue;if(start3>=vpEnd)break;if(isRow){if(child.screenY+child.height<viewportTop)continue;if(child.screenY>viewportBottom)continue}else{if(child.screenX+child.width<viewportLeft)continue;if(child.screenX>viewportRight)continue}visibleChildren.push(child)}if(visibleChildren.length>1)visibleChildren.sort((a,b2)=>a.zIndex>b2.zIndex?1:a.zIndex<b2.zIndex?-1:0);return visibleChildren}function calculateRenderGeometry(screenMode,terminalWidth,terminalHeight,footerHeight){let safeTerminalWidth=Math.max(terminalWidth,0),safeTerminalHeight=Math.max(terminalHeight,0);if(screenMode!=="split-footer")return{effectiveFooterHeight:0,renderOffset:0,renderWidth:safeTerminalWidth,renderHeight:safeTerminalHeight};let effectiveFooterHeight=Math.min(footerHeight,safeTerminalHeight);return{effectiveFooterHeight,renderOffset:safeTerminalHeight-effectiveFooterHeight,renderWidth:safeTerminalWidth,renderHeight:effectiveFooterHeight}}function isCapabilityResponse(sequence){if(/\x1b\[\?\d+(?:;\d+)*\$y/.test(sequence))return!0;if(/\x1b\[1;(?!1R)\d+R/.test(sequence))return!0;if(/\x1bP>\|[\s\S]*?\x1b\\/.test(sequence))return!0;if(/\x1b_G[\s\S]*?\x1b\\/.test(sequence))return!0;if(/\x1b\[\?\d+(?:;\d+)?u/.test(sequence))return!0;if(/\x1b\[\?[0-9;]*c/.test(sequence))return!0;return!1}function isPixelResolutionResponse(sequence){return/\x1b\[4;\d+;\d+t/.test(sequence)}function parsePixelResolution(sequence){let match=sequence.match(/\x1b\[4;(\d+);(\d+)t/);if(match)return{width:parseInt(match[2]),height:parseInt(match[1])};return null}function scaleOscThemeComponent(component){let value=parseInt(component,16),maxValue=(1<<4*component.length)-1;return Math.round(value/maxValue*255).toString(16).padStart(2,"0")}function oscThemeColorToHex(r,g,b2,hex6){if(hex6)return`#${hex6.toLowerCase()}`;if(r&&g&&b2)return`#${scaleOscThemeComponent(r)}${scaleOscThemeComponent(g)}${scaleOscThemeComponent(b2)}`;return"#000000"}function inferThemeModeFromBackgroundColor(color2){let[r,g,b2]=parseColor(color2).toInts();return(r*299+g*587+b2*114)/1000>128?"light":"dark"}class RendererThemeMode{host;clock;static QUERY_TIMEOUT_MS=250;_themeMode=null;themeQueryPending=!0;themeOscForeground=null;themeOscBackground=null;themeRefreshTimeoutId=null;waiters=new Set;constructor(host,clock2){this.host=host,this.clock=clock2}get themeMode(){return this._themeMode}waitForThemeMode(timeoutMs,isDestroyed){if(this._themeMode!==null||isDestroyed||timeoutMs===0)return Promise.resolve(this._themeMode);return new Promise((resolve42)=>{let waiter={resolve:resolve42,timeoutHandle:null};if(timeoutMs>0)waiter.timeoutHandle=this.clock.setTimeout(()=>{this.waiters.delete(waiter),waiter.timeoutHandle=null,resolve42(this._themeMode)},timeoutMs);this.waiters.add(waiter)})}cancelRefresh(){if(this.themeRefreshTimeoutId===null)return;this.clock.clearTimeout(this.themeRefreshTimeoutId),this.themeRefreshTimeoutId=null,this.themeQueryPending=!1}dispose(){this.cancelRefresh();for(let waiter of this.waiters){if(waiter.timeoutHandle!==null)this.clock.clearTimeout(waiter.timeoutHandle);waiter.resolve(this._themeMode)}this.waiters.clear()}handleSequence(sequence){if(sequence==="\x1B[?997;1n"||sequence==="\x1B[?997;2n")return this.requestThemeOscColors(),{handled:!0,changedMode:null};let handledOscThemeResponse=!1,match;OSC_THEME_RESPONSE.lastIndex=0;while(match=OSC_THEME_RESPONSE.exec(sequence)){handledOscThemeResponse=!0;let color2=oscThemeColorToHex(match[2],match[3],match[4],match[5]);if(match[1]==="10")this.themeOscForeground=color2;else this.themeOscBackground=color2}if(!handledOscThemeResponse)return{handled:!1,changedMode:null};if(!this.themeQueryPending)return{handled:!0,changedMode:null};if(!this.themeOscForeground||!this.themeOscBackground)return{handled:!0,changedMode:null};let nextMode=inferThemeModeFromBackgroundColor(this.themeOscBackground),changedMode=this.applyThemeMode(nextMode);return this.completeThemeQuery(),{handled:!0,changedMode}}clearThemeRefreshTimeout(){if(this.themeRefreshTimeoutId===null)return;this.clock.clearTimeout(this.themeRefreshTimeoutId),this.themeRefreshTimeoutId=null}completeThemeQuery(){this.clearThemeRefreshTimeout(),this.themeQueryPending=!1}requestThemeOscColors(){this.themeQueryPending=!0,this.themeOscForeground=null,this.themeOscBackground=null,this.host.queryThemeColors(),this.clearThemeRefreshTimeout(),this.themeRefreshTimeoutId=this.clock.setTimeout(()=>{this.completeThemeQuery()},RendererThemeMode.QUERY_TIMEOUT_MS)}applyThemeMode(mode){let changed=this._themeMode!==mode;if(this._themeMode=mode,!changed)return null;for(let waiter of this.waiters){if(waiter.timeoutHandle!==null)this.clock.clearTimeout(waiter.timeoutHandle);waiter.resolve(mode)}return this.waiters.clear(),mode}}function normalizeFooterHeight(footerHeight){if(footerHeight===void 0)return DEFAULT_FOOTER_HEIGHT;if(!Number.isFinite(footerHeight))throw Error("footerHeight must be a finite number");let normalizedFooterHeight=Math.trunc(footerHeight);if(normalizedFooterHeight<=0)throw Error("footerHeight must be greater than 0");return normalizedFooterHeight}function resolveModes(config){let screenMode=config.screenMode??"alternate-screen";if(process.env.OTUI_USE_ALTERNATE_SCREEN!==void 0)screenMode=env.OTUI_USE_ALTERNATE_SCREEN?"alternate-screen":"main-screen";let footerHeight=screenMode==="split-footer"?normalizeFooterHeight(config.footerHeight):DEFAULT_FOOTER_HEIGHT,externalOutputMode=config.externalOutputMode??(screenMode==="split-footer"?"capture-stdout":"passthrough");if(process.env.OTUI_OVERRIDE_STDOUT!==void 0)externalOutputMode=env.OTUI_OVERRIDE_STDOUT&&screenMode==="split-footer"?"capture-stdout":"passthrough";if(externalOutputMode==="capture-stdout"&&screenMode!=="split-footer")throw Error('externalOutputMode "capture-stdout" requires screenMode "split-footer"');return{screenMode,footerHeight,externalOutputMode}}class ExternalOutputQueue{commits=[];get size(){return this.commits.length}writeSnapshot(commit){this.commits.push(commit)}claim(limit=Number.POSITIVE_INFINITY){if(this.commits.length===0)return[];let clampedLimit=Number.isFinite(limit)?Math.max(1,Math.trunc(limit)):this.commits.length;if(clampedLimit>=this.commits.length){let output2=this.commits;return this.commits=[],output2}let output=this.commits.slice(0,clampedLimit);return this.commits=this.commits.slice(clampedLimit),output}clear(){for(let commit of this.commits)commit.snapshot.destroy();this.commits=[]}}function buildKittyKeyboardFlags(config){if(!config)return 0;let flags=0;if(config.disambiguate!==!1)flags|=KITTY_FLAG_DISAMBIGUATE;if(config.alternateKeys!==!1)flags|=KITTY_FLAG_ALTERNATE_KEYS;if(config.events===!0)flags|=KITTY_FLAG_EVENT_TYPES;if(config.allKeysAsEscapes===!0)flags|=KITTY_FLAG_ALL_KEYS_AS_ESCAPES;if(config.reportText===!0)flags|=KITTY_FLAG_REPORT_TEXT;return flags}class MouseEvent{type;button;x;y;source;modifiers;scroll;target;isDragging;_propagationStopped=!1;_defaultPrevented=!1;get propagationStopped(){return this._propagationStopped}get defaultPrevented(){return this._defaultPrevented}constructor(target,attributes){this.target=target,this.type=attributes.type,this.button=attributes.button,this.x=attributes.x,this.y=attributes.y,this.modifiers=attributes.modifiers,this.scroll=attributes.scroll,this.source=attributes.source,this.isDragging=attributes.isDragging}stopPropagation(){this._propagationStopped=!0}preventDefault(){this._defaultPrevented=!0}}async function createCliRenderer(config={}){if(process.argv.includes("--delay-start"))await new Promise((resolve42)=>setTimeout(resolve42,5000));let stdin=config.stdin||process.stdin,stdout=config.stdout||process.stdout,{screenMode,footerHeight}=resolveModes(config),width=stdout.columns||80,height2=stdout.rows||24,geometry=calculateRenderGeometry(screenMode,width,height2,footerHeight),ziglib=resolveRenderLib(),rendererPtr=ziglib.createRenderer(geometry.renderWidth,geometry.renderHeight,{remote:config.remote??!1,testing:config.testing??!1});if(!rendererPtr)throw Error("Failed to create renderer");if(config.useThread===void 0)config.useThread=!0;if(process.platform==="linux")config.useThread=!1;ziglib.setUseThread(rendererPtr,config.useThread);let kittyConfig=config.useKittyKeyboard??{},kittyFlags=buildKittyKeyboardFlags(kittyConfig);ziglib.setKittyKeyboardFlags(rendererPtr,kittyFlags);let renderer=new CliRenderer(ziglib,rendererPtr,stdin,stdout,width,height2,config);if(!config.testing)await renderer.setupTerminal();return renderer}var __defProp2,__returnValue2=(v)=>v,__export2=(target,all)=>{for(var name in all)__defProp2(target,name,{get:all[name],enumerable:!0,configurable:!0,set:__exportSetter2.bind(all,name)})},exports_src2,loadYoga,yoga_wasm_base64_esm_default,Align,BoxSizing,Dimension,Direction,Display,Edge,Errata,ExperimentalFeature,FlexDirection,Gutter,Justify,LogLevel,MeasureMode,NodeType,Overflow,PositionType,Unit,Wrap,constants,YGEnums_default,Yoga,src_default2,VALID_BORDER_STYLES,BorderChars,BorderCharArrays,KeyHandler,InternalKeyHandler,COLOR_TAG_RGB=256,COLOR_TAG_DEFAULT=257,DEFAULT_FOREGROUND_RGB,DEFAULT_BACKGROUND_RGB,RGBA_BUFFER_STRIDE=5,ANSI16_RGB,ANSI_256_CUBE_LEVELS,CSS_COLOR_NAMES,block_default,shade_default,slick_default,tiny_default,huge_default,grid_default,pallet_default,fonts,parsedFonts,TextAttributes,ATTRIBUTE_BASE_BITS=8,ATTRIBUTE_BASE_MASK=255,DebugOverlayCorner,TargetChannel,ATTRIBUTE_BASE_MASK2=255,LINK_ID_SHIFT=8,LINK_ID_PAYLOAD_MASK=16777215,BrandedStyledText,StyledText,black=(input)=>applyStyle(input,{fg:"black"}),red=(input)=>applyStyle(input,{fg:"red"}),green=(input)=>applyStyle(input,{fg:"green"}),yellow=(input)=>applyStyle(input,{fg:"yellow"}),blue=(input)=>applyStyle(input,{fg:"blue"}),magenta=(input)=>applyStyle(input,{fg:"magenta"}),cyan=(input)=>applyStyle(input,{fg:"cyan"}),white=(input)=>applyStyle(input,{fg:"white"}),brightBlack=(input)=>applyStyle(input,{fg:"brightBlack"}),brightRed=(input)=>applyStyle(input,{fg:"brightRed"}),brightGreen=(input)=>applyStyle(input,{fg:"brightGreen"}),brightYellow=(input)=>applyStyle(input,{fg:"brightYellow"}),brightBlue=(input)=>applyStyle(input,{fg:"brightBlue"}),brightMagenta=(input)=>applyStyle(input,{fg:"brightMagenta"}),brightCyan=(input)=>applyStyle(input,{fg:"brightCyan"}),brightWhite=(input)=>applyStyle(input,{fg:"brightWhite"}),bgBlack=(input)=>applyStyle(input,{bg:"black"}),bgRed=(input)=>applyStyle(input,{bg:"red"}),bgGreen=(input)=>applyStyle(input,{bg:"green"}),bgYellow=(input)=>applyStyle(input,{bg:"yellow"}),bgBlue=(input)=>applyStyle(input,{bg:"blue"}),bgMagenta=(input)=>applyStyle(input,{bg:"magenta"}),bgCyan=(input)=>applyStyle(input,{bg:"cyan"}),bgWhite=(input)=>applyStyle(input,{bg:"white"}),bold=(input)=>applyStyle(input,{bold:!0}),italic=(input)=>applyStyle(input,{italic:!0}),underline=(input)=>applyStyle(input,{underline:!0}),strikethrough=(input)=>applyStyle(input,{strikethrough:!0}),dim=(input)=>applyStyle(input,{dim:!0}),reverse=(input)=>applyStyle(input,{reverse:!0}),blink=(input)=>applyStyle(input,{blink:!0}),fg=(color2)=>(input)=>applyStyle(input,{fg:color2}),bg=(color2)=>(input)=>applyStyle(input,{bg:color2}),link=(url)=>(input)=>{return{...typeof input==="object"&&"__isChunk"in input?input:{__isChunk:!0,text:String(input)},link:{url}}},kittyKeyMap,functionalKeyMap,tildeKeyMap,metaKeyCodeRe,fnKeyRe,keyName,nonAlphanumericKeys,isShiftKey=(code)=>{return["[a","[b","[c","[d","[e","[2$","[3$","[5$","[6$","[7$","[8$","[Z"].includes(code)},isCtrlKey=(code)=>{return["Oa","Ob","Oc","Od","Oe","[2^","[3^","[5^","[6^","[7^","[8^"].includes(code)},getCtrlKeyName=(charCode)=>{if(charCode===0)return"space";if(charCode>=1&&charCode<=26)return String.fromCharCode(charCode+97-1);if(charCode>=28&&charCode<=31)return String.fromCharCode(charCode+64);return},modifyOtherKeysRe,parseKeypress=(s2="",options={})=>{let parts;if(Buffer2.isBuffer(s2))if(s2[0]>127&&s2[1]===void 0)s2[0]-=128,s2="\x1B"+String(s2);else s2=String(s2);else if(s2!==void 0&&typeof s2!=="string")s2=String(s2);else if(!s2)s2="";if(/^\x1b\[<\d+;\d+;\d+[Mm]$/.test(s2))return null;if(/^\[<\d+;\d+;\d+[Mm]$/.test(s2))return null;if(/^\x1b\[<[\d;]*$/.test(s2))return null;if(/^\[<[\d;]*$/.test(s2))return null;if(s2.startsWith("\x1B[M")&&s2.length>=6)return null;if(/^\x1b\[\d+;\d+;\d+t$/.test(s2))return null;if(/^\x1b\[\d+;\d+R$/.test(s2))return null;if(/^\x1b\[\?[\d;]+c$/.test(s2))return null;if(/^\x1b\[\?[\d;]+\$y$/.test(s2))return null;if(s2==="\x1B[I"||s2==="\x1B[O")return null;if(/^\x1b\][\d;].*(\x1b\\|\x07)$/.test(s2))return null;if(s2==="\x1B[200~"||s2==="\x1B[201~")return null;let key={name:"",ctrl:!1,meta:!1,shift:!1,option:!1,number:!1,sequence:s2,raw:s2,eventType:"press",source:"raw"};key.sequence=key.sequence||s2||key.name;let ctrlKeyName=s2.length===1?getCtrlKeyName(s2.charCodeAt(0)):void 0,metaCtrlKeyName=s2.length===2&&s2[0]==="\x1B"?getCtrlKeyName(s2.charCodeAt(1)):void 0;if(options.useKittyKeyboard){let kittyResult=parseKittyKeyboard(s2);if(kittyResult)return kittyResult}let modifyOtherKeysMatch=modifyOtherKeysRe.exec(s2);if(modifyOtherKeysMatch){let modifier=parseInt(modifyOtherKeysMatch[1],10)-1,charCode=parseInt(modifyOtherKeysMatch[2],10);if(key.ctrl=!!(modifier&4),key.meta=!!(modifier&2),key.shift=!!(modifier&1),key.option=!!(modifier&2),key.super=!!(modifier&8),key.hyper=!!(modifier&16),charCode===13)key.name="return";else if(charCode===27)key.name="escape";else if(charCode===9)key.name="tab";else if(charCode===32)key.name="space";else if(charCode===127||charCode===8)key.name="backspace";else{let char=String.fromCharCode(charCode);if(key.name=char,key.sequence=char,charCode>=48&&charCode<=57)key.number=!0}return key}if(s2==="\r"||s2==="\x1B\r")key.name="return",key.meta=s2.length===2;else if(s2===`
3074
3074
  `||s2===`\x1B
3075
3075
  `)key.name="linefeed",key.meta=s2.length===2;else if(s2==="\t")key.name="tab";else if(s2==="\b"||s2==="\x1B\b"||s2==="\x7F"||s2==="\x1B\x7F")key.name="backspace",key.meta=s2.charAt(0)==="\x1B";else if(s2==="\x1B"||s2==="\x1B\x1B")key.name="escape",key.meta=s2.length===2;else if(s2===" "||s2==="\x1B ")key.name="space",key.meta=s2.length===2;else if(ctrlKeyName)key.name=ctrlKeyName,key.ctrl=!0;else if(s2.length===1&&s2>="0"&&s2<="9")key.name=s2,key.number=!0;else if(s2.length===1&&s2>="a"&&s2<="z")key.name=s2;else if(s2.length===1&&s2>="A"&&s2<="Z")key.name=s2.toLowerCase(),key.shift=!0;else if(s2.length===1||s2.length===2&&s2.codePointAt(0)>65535)key.name=s2;else if(parts=metaKeyCodeRe.exec(s2)){key.meta=!0;let char=parts[1],isUpperCase=/^[A-Z]$/.test(char);if(char==="F")key.name="right";else if(char==="B")key.name="left";else if(isUpperCase)key.shift=!0,key.name=char;else key.name=char}else if(metaCtrlKeyName)key.meta=!0,key.ctrl=!0,key.name=metaCtrlKeyName;else if(parts=fnKeyRe.exec(s2)){let segs=[...s2];if(segs[0]==="\x1B"&&segs[1]==="\x1B")key.option=!0,key.meta=!0;let code=[parts[1],parts[2],parts[4],parts[6]].filter(Boolean).join(""),modifier=parseInt(parts[3]||parts[5]||"1",10)-1;key.ctrl=key.ctrl||!!(modifier&4),key.meta=key.meta||!!(modifier&2),key.shift=key.shift||!!(modifier&1),key.option=key.option||!!(modifier&2),key.super=!!(modifier&8),key.hyper=!!(modifier&16),key.code=code;let keyNameResult=keyName[code];if(keyNameResult)key.name=keyNameResult,key.shift=isShiftKey(code)||key.shift,key.ctrl=isCtrlKey(code)||key.ctrl;else key.name="",key.code=void 0}else if(s2==="\x1B[3~")key.name="delete",key.meta=!1,key.code="[3~";return key},MouseParser,singletonCacheSymbol,envRegistry,envStore,env,DEFAULT_TIMEOUT_MS=20,DEFAULT_MAX_PENDING_BYTES=65536,INITIAL_PENDING_CAPACITY=256,ESC=27,BEL=7,BRACKETED_PASTE_START,BRACKETED_PASTE_END,EMPTY_BYTES,KEY_DECODER,DEFAULT_PROTOCOL_CONTEXT,RXVT_DOLLAR_CSI_RE,SYSTEM_CLOCK,TIMERS_MAP,_cachedParsers,DEFAULT_PARSERS,isUrl=(path6)=>path6.startsWith("http://")||path6.startsWith("https://"),TreeSitterClient,DataPathsManager,extensionToFiletype,basenameToFiletype,__dirname2="/Users/runner/work/opentui/opentui/packages/core/src/lib/tree-sitter/assets",SYSTEM_CLOCK2,OSC4_RESPONSE,OSC_SPECIAL_RESPONSE,DEFAULT_FOREGROUND_FALLBACK,DEFAULT_BACKGROUND_FALLBACK,fallbackAnsi256Palette=null,PASTE_TEXT_DECODER,URL_SCOPES,pointerSize,typeSizes,primitiveKeys,typeAlignments,typeGetters,pointerPacker,pointerUnpacker,encoder,decoder,rgbaPackTransform=(rgba)=>rgba?ptr3(rgba.buffer):null,rgbaUnpackTransform=(ptr42)=>ptr42?RGBA.fromArray(new Float32Array(toArrayBuffer3(ptr42))):void 0,StyledChunkStruct,HighlightStruct,LogicalCursorStruct,VisualCursorStruct,UnicodeMethodEnum,TerminalCapabilitiesStruct,EncodedCharStruct,LineInfoStruct,MeasureResultStruct,CursorStateStruct,CursorStyleOptionsStruct,GridDrawOptionsStruct,BuildOptionsStruct,AllocatorStatsStruct,GrowthPolicyEnum,NativeSpanFeedOptionsStruct,NativeSpanFeedStatsStruct,SpanInfoStruct,ReserveInfoStruct,module,targetLibPath,CURSOR_STYLE_TO_ID,CURSOR_ID_TO_STYLE,MOUSE_STYLE_TO_ID,globalTraceSymbols=null,globalFFILogPath=null,exitHandlerRegistered2=!1,LogLevel2,opentuiLibPath,opentuiLib,BrandedRenderable,LayoutEvents,RenderableEvents,BaseRenderable,yogaConfig,Renderable,RootRenderable,BrandedVNode,EditBuffer,BoxRenderable,TextBufferRenderable,CodeRenderable,BrandedTextNodeRenderable,TextNodeRenderable,RootTextNodeRenderable,TextRenderable,Capture,CapturedWritableStream,defaultKeyAliases,capture,TerminalConsoleCache,terminalConsoleCache,ConsolePosition,defaultConsoleKeybindings,DEFAULT_CONSOLE_OPTIONS,INDENT_WIDTH=2,TerminalConsole,BrandedEditBufferRenderable,EditBufferRenderableEvents,EditBufferRenderable,ANSI3,OSC_THEME_RESPONSE,DEFAULT_FOOTER_HEIGHT=12,MAX_SCROLLBACK_SURFACE_HEIGHT_PASSES=4,TRANSPARENT_RGBA,scrollbackSurfaceCounter=0,CHAR_FLAG_CONTINUATION=3221225472,CHAR_FLAG_MASK=3221225472,ScrollbackSnapshotRenderContext,DEFAULT_FORWARDED_ENV_KEYS,KITTY_FLAG_DISAMBIGUATE=1,KITTY_FLAG_EVENT_TYPES=2,KITTY_FLAG_ALTERNATE_KEYS=4,KITTY_FLAG_ALL_KEYS_AS_ESCAPES=8,KITTY_FLAG_REPORT_TEXT=16,DEFAULT_STDIN_PARSER_MAX_BUFFER_BYTES=67108864,MouseButton,rendererTracker,CliRenderEvents,RendererControlState,CliRenderer;var init_index_4pvh4sbk=__esm(async()=>{init_highlights();init_tree_sitter_javascript();init_highlights2();init_tree_sitter_typescript();init_highlights3();init_tree_sitter_markdown();init_injections();init_highlights4();init_tree_sitter_markdown_inline();init_highlights5();init_tree_sitter_zig();__defProp2=Object.defineProperty;exports_src2={};__export2(exports_src2,{default:()=>src_default2,Wrap:()=>Wrap,Unit:()=>Unit,PositionType:()=>PositionType,Overflow:()=>Overflow,NodeType:()=>NodeType,MeasureMode:()=>MeasureMode,LogLevel:()=>LogLevel,Justify:()=>Justify,Gutter:()=>Gutter,FlexDirection:()=>FlexDirection,ExperimentalFeature:()=>ExperimentalFeature,Errata:()=>Errata,Edge:()=>Edge,Display:()=>Display,Direction:()=>Direction,Dimension:()=>Dimension,BoxSizing:()=>BoxSizing,Align:()=>Align});loadYoga=(()=>{var _scriptDir=import.meta.url;return function(loadYoga2){loadYoga2=loadYoga2||{};var h;h||(h=typeof loadYoga2<"u"?loadYoga2:{});var aa,ca;h.ready=new Promise(function(a,b2){aa=a,ca=b2});var da=Object.assign({},h),q="";typeof document<"u"&&document.currentScript&&(q=document.currentScript.src),_scriptDir&&(q=_scriptDir),q.indexOf("blob:")!==0?q=q.substr(0,q.replace(/[?#].*/,"").lastIndexOf("/")+1):q="";var ea=h.print||console.log.bind(console),v=h.printErr||console.warn.bind(console);Object.assign(h,da),da=null;var w;h.wasmBinary&&(w=h.wasmBinary);var noExitRuntime=h.noExitRuntime||!0;typeof WebAssembly!="object"&&x("no native wasm support detected");var fa,ha=!1;function z(a,b2,c){c=b2+c;for(var d="";!(b2>=c);){var e=a[b2++];if(!e)break;if(e&128){var f=a[b2++]&63;if((e&224)==192)d+=String.fromCharCode((e&31)<<6|f);else{var g=a[b2++]&63;e=(e&240)==224?(e&15)<<12|f<<6|g:(e&7)<<18|f<<12|g<<6|a[b2++]&63,65536>e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}return d}var ia,ja,A,C,ka,D,E,la,ma;function na(){var a=fa.buffer;ia=a,h.HEAP8=ja=new Int8Array(a),h.HEAP16=C=new Int16Array(a),h.HEAP32=D=new Int32Array(a),h.HEAPU8=A=new Uint8Array(a),h.HEAPU16=ka=new Uint16Array(a),h.HEAPU32=E=new Uint32Array(a),h.HEAPF32=la=new Float32Array(a),h.HEAPF64=ma=new Float64Array(a)}var oa,pa=[],qa=[],ra=[];function sa(){var a=h.preRun.shift();pa.unshift(a)}var F=0,ta=null,G=null;function x(a){if(h.onAbort)h.onAbort(a);throw a="Aborted("+a+")",v(a),ha=!0,a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info."),ca(a),a}function ua(a){return a.startsWith("data:application/octet-stream;base64,")}var H="data:application/octet-stream;base64,AGFzbQEAAAABugM3YAF/AGACf38AYAF/AX9gA39/fwBgAn98AGACf38Bf2ADf39/AX9gBH9/f30BfWADf398AGAAAGAEf39/fwBgAX8BfGACf38BfGAFf39/f38Bf2AAAX9gA39/fwF9YAZ/f31/fX8AYAV/f39/fwBgAn9/AX1gBX9/f319AX1gAX8BfWADf35/AX5gB39/f39/f38AYAZ/f39/f38AYAR/f39/AX9gBn9/f319fQF9YAR/f31/AGADf399AX1gBn98f39/fwF/YAR/fHx/AGACf30AYAh/f39/f39/fwBgDX9/f39/f39/f39/f38AYAp/f39/f39/f39/AGAFf39/f38BfGAEfHx/fwF9YA1/fX1/f399fX9/f39/AX9gB39/f319f38AYAJ+fwF/YAN/fX0BfWABfAF8YAN/fHwAYAR/f319AGAHf39/fX19fQF9YA1/fX99f31/fX19fX1/AX9gC39/f39/f399fX19AX9gCH9/f39/f319AGAEf39+fgBgB39/f39/f38Bf2ACfH8BfGAFf398fH8AYAN/f38BfGAEf39/fABgA39/fQBgBn9/fX99fwF/ArUBHgFhAWEAHwFhAWIAAwFhAWMACQFhAWQAFgFhAWUAEQFhAWYAIAFhAWcAAAFhAWgAIQFhAWkAAwFhAWoAAAFhAWsAFwFhAWwACgFhAW0ABQFhAW4AAwFhAW8AAQFhAXAAFwFhAXEABgFhAXIAAAFhAXMAIgFhAXQACgFhAXUADQFhAXYAFgFhAXcAAgFhAXgAAwFhAXkAGAFhAXoAAgFhAUEAAQFhAUIAEQFhAUMAAQFhAUQAAAOiAqACAgMSBwcACRkDAAoRBgYKEwAPDxMBBiMTCgcHGgMUASQFJRQHAwMKCgMmAQYYDxobFAAKBw8KBwMDAgkCAAAFGwACBwIHBgIDAQMIDAABKAkHBQURACkZASoAAAIrLAIALQcHBy4HLwkFCgMCMA0xAgMJAgACAQYKAQIBBQEACQIFAQEABQAODQ0GFQIBHBUGAgkCEAAAAAUyDzMMBQYINAUCAwUODg41AgMCAgIDBgICNgIBDAwMAQsLCwsLCx0CAAIAAAABABABBQICAQMCEgMMCwEBAQEBAQsLAQICAwICAgICAgIDAgIICAEICAgEBAQEBAQEBAQABAQABAQEBAAE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GiABQQA2AvADIAFCADcC6AMgAigC7AMiAyACKALoAyIERwRAIAMgBGsiBEEASA0FIAEgBBAeIgM2AuwDIAEgAzYC6AMgASADIARqNgLwAyACKALoAyIEIAIoAuwDIghHBEADQCADIAQoAgA2AgAgA0EEaiEDIARBBGoiBCAIRw0ACwsgASADNgLsAwsgASACKQL0AzcC9AMgASACKAKEBDYChAQgASACKQL8AzcC/AMgAUEANgLkAwsgBSABNgIAIAEgADYC5AMLIAZBAWohBiAFQQRqIgUgB0cNAAsLDwsQAgALUAACQAJAAkACQAJAIAIOBAQAAQIDCyAAIAEgAUEwahBDDwsgACABIAFBMGogAxBEDwsgACABIAFBMGoQQg8LECQACyAAIAEgAUEwaiADEEULcAIBfwF9IwBBEGsiBCQAIARBCGogACABQQJ0QdwlaigCACACEDZDAADAfyEFAkACQAJAIAQtAAxBAWsOAgABAgsgBCoCCCEFDAELIAQqAgggA5RDCtcjPJQhBQsgBEEQaiQAIAVDAAAAACAFIAVbGwt5AgF/AX0jAEEQayIDJAAgA0EIaiAAIAFBAnRB7CVqKAIAIAIQU0MAAMB/IQQCQAJAAkAgAy0ADEEBaw4CAAECCyADKgIIIQQMAQsgAyoCCEMAAAAAlEMK1yM8lCEECyADQRBqJAAgBEMAAAAAl0MAAAAAIAQgBFsbC1QAAkACQAJAAkACQCACDgQEAAECAwsgACABIAFBwgBqEEMPCyAAIAEgAUHCAGogAxBEDwsgACABIAFBwgBqEEIPCxAkAAsgACABIAFBwgBqIAMQRQsvACAAIAJFQQF0IgIgASADEGAgACACIAEQS5IgACACIAEgAxB/IAAgAiABEFKSkgvOAQIDfwJ9IwBBEGsiAyQAQQEhBCADQQhqIABB/ABqIgUgACABQQF0akH2AGoiAS8BABAfAkACQCADKgIIIgcgAioCACIGXARAIAcgB1sEQCACLQAEIQIMAgsgBiAGXCEECyACLQAEIQIgBEUNACADLQAMIAJB/wFxRg0BCyAFIAEgBiACEDkDQCAALQAAIgFBBHENASAAIAFBBHI6AAAgACgCECIBBEAgACABEQAACyAAQYCAgP4HNgKcASAAKALkAyIADQALCyADQRBqJAALzgECA38CfSMAQRBrIgMkAEEBIQQgA0EIaiAAQfwAaiIFIAAgAUEBdGpB8gBqIgEvAQAQHwJAAkAgAyoCCCIHIAIqAgAiBlwEQCAHIAdbBEAgAi0ABCECDAILIAYgBlwhBAsgAi0ABCECIARFDQAgAy0ADCACQf8BcUYNAQsgBSABIAYgAhA5A0AgAC0AACIBQQRxDQEgACABQQRyOgAAIAAoAhAiAQRAIAAgAREAAAsgAEGAgID+BzYCnAEgACgC5AMiAA0ACwsgA0EQaiQACwoAIABBMGtBCkkLBQAQAgALBAAgAAsUACAABEAgACAAKAIAKAIEEQAACwsrAQF/IAAoAgwiAQRAIAEQIwsgACgCACIBBEAgACABNgIEIAEQIwsgABAjC4EEAQN/IwBBEGsiAyQAIABCADcCBCAAQcEgOwAVIABCADcCDCAAQoCAgICAgIACNwIYIAAgAC0AF0HgAXE6ABcgACAALQAAQeABcUEFcjoAACAAIAAtABRBgAFxOgAUIABBIGpBAEHOABAqGiAAQgA3AXIgAEGEgBA2AW4gAEEANgF6IABCADcCgAEgAEIANwKIASAAQgA3ApABIABCADcCoAEgAEKAgICAgICA4P8ANwKYASAAQQA6AKgBIABBrAFqQQBBxAEQKhogAEHwAmohBCAAQbABaiECA0AgAkKAgID8i4CAwL9/NwIQIAJCgYCAgBA3AgggAkKAgID8i4CAwL9/NwIAIAJBGGoiAiAERw0ACyAAQoCAgPyLgIDAv383AvACIABCgICA/IuAgMC/fzcCgAMgAEKBgICAEDcC+AIgAEKAgID+h4CA4P8ANwKUAyAAQoCAgP6HgIDg/wA3AowDIABBiANqIgIgAi0AAEH4AXE6AAAgAEGcA2pBAEHYABAqGiAAQQA6AIQEIABBgICA/gc2AoAEIABBADoA/AMgAEGAgID+BzYC+AMgACABNgL0AyABBEAgAS0ACEEBcQRAIAAgAC0AFEHzAXFBCHI6ABQgACAALwAVQfD/A3FBBHI7ABULIANBEGokACAADwsgA0GiGjYCACADEHIQJAALMwAgACABQQJ0QfwlaigCAEECdGoqApQDIABBFGoiACABQQEgAhAiIAAgAUEBIAIQIZKSC44DAQp/IwBB0AJrIgEkACAAKALoAyIDIAAoAuwDIgVHBEAgAUGMAmohBiABQeABaiEHIAFBIGohCCABQRxqIQkgAUEQaiEEA0AgAygCACICLQAXQRB0QYCAMHFBgIAgRgRAIAFBCGpBAEHEAhAqGiABQYCAgP4HNgIMIARBADoACCAEQgA3AgAgCUEAQcQBECoaIAghAANAIABCgICA/IuAgMC/fzcCECAAQoGAgIAQNwIIIABCgICA/IuAgMC/fzcCACAAQRhqIgAgB0cNAAsgAUKAgID8i4CAwL9/NwPwASABQoGAgIAQNwPoASABQoCAgPyLgIDAv383A+ABIAFCgICA/oeAgOD/ADcChAIgAUKAgID+h4CA4P8ANwL8ASABIAEtAPgBQfgBcToA+AEgBkEAQcAAECoaIAJBmAFqIAFBCGpBxAIQKxogAkIANwKMAyACIAItAAAiAEEBciIKQfsBcSAKIABBBHEbOgAAIAIQTyACEF4LIANBBGoiAyAFRw0ACwsgAUHQAmokAAtMAQF/QQEhAQJAIAAtAB5BB3ENACAALQAiQQdxDQAgAC0ALkEHcQ0AIAAtACpBB3ENACAALQAmQQdxDQAgAC0AKEEHcUEARyEBCyABC3YCAX8BfSMAQRBrIgQkACAEQQhqIAAgAUECdEHcJWooAgAgAhBQQwAAwH8hBQJAAkACQCAELQAMQQFrDgIAAQILIAQqAgghBQwBCyAEKgIIIAOUQwrXIzyUIQULIARBEGokACAFQwAAAACXQwAAAAAgBSAFWxsLogQCBn8CfgJ/QQghBAJAAkAgAEFHSw0AA0BBCCAEIARBCE0bIQRB6DopAwAiBwJ/QQggAEEDakF8cSAAQQhNGyIAQf8ATQRAIABBA3ZBAWsMAQsgAEEdIABnIgFrdkEEcyABQQJ0a0HuAGogAEH/H00NABpBPyAAQR4gAWt2QQJzIAFBAXRrQccAaiIBIAFBP08bCyIDrYgiCFBFBEADQCAIIAh6IgiIIQcCfiADIAinaiIDQQR0IgJB6DJqKAIAIgEgAkHgMmoiBkcEQCABIAQgABBjIgUNBSABKAIEIgUgASgCCDYCCCABKAIIIAU2AgQgASAGNgIIIAEgAkHkMmoiAigCADYCBCACIAE2AgAgASgCBCABNgIIIANBAWohAyAHQgGIDAELQeg6Qeg6KQMAQn4gA62JgzcDACAHQgGFCyIIQgBSDQALQeg6KQMAIQcLAkAgB1BFBEBBPyAHeadrIgZBBHQiAkHoMmooAgAhAQJAIAdCgICAgARUDQBB4wAhAyABIAJB4DJqIgJGDQADQCADRQ0BIAEgBCAAEGMiBQ0FIANBAWshAyABKAIIIgEgAkcNAAsgAiEBCyAAQTBqEGQNASABRQ0EIAEgBkEEdEHgMmoiAkYNBANAIAEgBCAAEGMiBQ0EIAEoAggiASACRw0ACwwECyAAQTBqEGRFDQMLQQAhBSAEIARBAWtxDQEgAEFHTQ0ACwsgBQwBC0EACwtwAgF/AX0jAEEQayIEJAAgBEEIaiAAIAFBAnRB7CVqKAIAIAIQKEMAAMB/IQUCQAJAAkAgBC0ADEEBaw4CAAECCyAEKgIIIQUMAQsgBCoCCCADlEMK1yM8lCEFCyAEQRBqJAAgBUMAAAAAIAUgBVsbC6ADAQN/IAEgAEEEaiIEakEBa0EAIAFrcSIFIAJqIAAgACgCACIBakEEa00EfyAAKAIEIgMgACgCCDYCCCAAKAIIIAM2AgQgBCAFRwRAIAAgAEEEaygCAEF+cWsiAyAFIARrIgQgAygCAGoiBTYCACAFQXxxIANqQQRrIAU2AgAgACAEaiIAIAEgBGsiATYCAAsCQCABIAJBGGpPBEAgACACakEIaiIDIAEgAmtBCGsiATYCACABQXxxIANqQQRrIAFBAXI2AgAgAwJ/IAMoAgBBCGsiAUH/AE0EQCABQQN2QQFrDAELIAFnIQQgAUEdIARrdkEEcyAEQQJ0a0HuAGogAUH/H00NABpBPyABQR4gBGt2QQJzIARBAXRrQccAaiIBIAFBP08bCyIBQQR0IgRB4DJqNgIEIAMgBEHoMmoiBCgCADYCCCAEIAM2AgAgAygCCCADNgIEQeg6Qeg6KQMAQgEgAa2GhDcDACAAIAJBCGoiATYCACABQXxxIABqQQRrIAE2AgAMAQsgACABakEEayABNgIACyAAQQRqBSADCwvmAwEFfwJ/QbAwKAIAIgEgAEEHakF4cSIDaiECAkAgA0EAIAEgAk8bDQAgAj8AQRB0SwRAIAIQFkUNAQtBsDAgAjYCACABDAELQfw7QTA2AgBBfwsiAkF/RwRAIAAgAmoiA0EQayIBQRA2AgwgAUEQNgIAAkACf0HgOigCACIABH8gACgCCAVBAAsgAkYEQCACIAJBBGsoAgBBfnFrIgRBBGsoAgAhBSAAIAM2AghBcCAEIAVBfnFrIgAgACgCAGpBBGstAABBAXFFDQEaIAAoAgQiAyAAKAIINgIIIAAoAgggAzYCBCAAIAEgAGsiATYCAAwCCyACQRA2AgwgAkEQNgIAIAIgAzYCCCACIAA2AgRB4DogAjYCAEEQCyACaiIAIAEgAGsiATYCAAsgAUF8cSAAakEEayABQQFyNgIAIAACfyAAKAIAQQhrIgFB/wBNBEAgAUEDdkEBawwBCyABQR0gAWciA2t2QQRzIANBAnRrQe4AaiABQf8fTQ0AGkE/IAFBHiADa3ZBAnMgA0EBdGtBxwBqIgEgAUE/TxsLIgFBBHQiA0HgMmo2AgQgACADQegyaiIDKAIANgIIIAMgADYCACAAKAIIIAA2AgRB6DpB6DopAwBCASABrYaENwMACyACQX9HC80BAgN/An0jAEEQayIDJABBASEEIANBCGogAEH8AGoiBSAAIAFBAXRqQSBqIgEvAQAQHwJAAkAgAyoCCCIHIAIqAgAiBlwEQCAHIAdbBEAgAi0ABCECDAILIAYgBlwhBAsgAi0ABCECIARFDQAgAy0ADCACQf8BcUYNAQsgBSABIAYgAhA5A0AgAC0AACIBQQRxDQEgACABQQRyOgAAIAAoAhAiAQRAIAAgAREAAAsgAEGAgID+BzYCnAEgACgC5AMiAA0ACwsgA0EQaiQAC0ABAX8CQEGsOy0AAEEBcQRAQag7KAIAIQIMAQtBAUGAJxAMIQJBrDtBAToAAEGoOyACNgIACyACIAAgAUEAEBMLzQECA38CfSMAQRBrIgMkAEEBIQQgA0EIaiAAQfwAaiIFIAAgAUEBdGpBMmoiAS8BABAfAkACQCADKgIIIgcgAioCACIGXARAIAcgB1sEQCACLQAEIQIMAgsgBiAGXCEECyACLQAEIQIgBEUNACADLQAMIAJB/wFxRg0BCyAFIAEgBiACEDkDQCAALQAAIgFBBHENASAAIAFBBHI6AAAgACgCECIBBEAgACABEQAACyAAQYCAgP4HNgKcASAAKALkAyIADQALCyADQRBqJAALDwAgASAAKAIAaiACOQMACw0AIAEgACgCAGorAwALCwAgAARAIAAQIwsLxwECBH8CfSMAQRBrIgIkACACQQhqIABB/ABqIgQgAEEeaiIFLwEAEB9BASEDAkACQCACKgIIIgcgASoCACIGXARAIAcgB1sEQCABLQAEIQEMAgsgBiAGXCEDCyABLQAEIQEgA0UNACACLQAMIAFB/wFxRg0BCyAEIAUgBiABEDkDQCAALQAAIgFBBHENASAAIAFBBHI6AAAgACgCECIBBEAgACABEQAACyAAQYCAgP4HNgKcASAAKALkAyIADQALCyACQRBqJAALlgMCA34CfyAAvSICQjSIp0H/D3EiBEH/D0YEQCAARAAAAAAAAPA/oiIAIACjDwsgAkIBhiIBQoCAgICAgIDw/wBYBEAgAEQAAAAAAAAAAKIgACABQoCAgICAgIDw/wBRGw8LAn4gBEUEQEEAIQQgAkIMhiIBQgBZBEADQCAEQQFrIQQgAUIBhiIBQgBZDQALCyACQQEgBGuthgwBCyACQv////////8Hg0KAgICAgICACIQLIQEgBEH/B0oEQANAAkAgAUKAgICAgICACH0iA0IAUw0AIAMiAUIAUg0AIABEAAAAAAAAAACiDwsgAUIBhiEBIARBAWsiBEH/B0oNAAtB/wchBAsCQCABQoCAgICAgIAIfSIDQgBTDQAgAyIBQgBSDQAgAEQAAAAAAAAAAKIPCyABQv////////8HWARAA0AgBEEBayEEIAFCgICAgICAgARUIQUgAUIBhiEBIAUNAAsLIAJCgICAgICAgICAf4MgAUKAgICAgICACH0gBK1CNIaEIAFBASAEa62IIARBAEobhL8LiwEBA38DQCAAQQR0IgFB5DJqIAFB4DJqIgI2AgAgAUHoMmogAjYCACAAQQFqIgBBwABHDQALQTAQZBpBmDtBBjYCAEGcO0EANgIAEJwBQZw7Qcg7KAIANgIAQcg7QZg7NgIAQcw7QcMBNgIAQdA7QQA2AgAQjwFB0DtByDsoAgA2AgBByDtBzDs2AgALjwEBAn8jAEEQayIEJAACfUMAAAAAIAAvABVBgOAAcUUNABogBEEIaiAAQRRqIgBBASACQQJGQQF0IAFB/gFxQQJHGyIFIAIQNgJAIAQtAAxFDQAgBEEIaiAAIAUgAhA2IAQtAAxBA0YNACAAIAEgAiADEIEBDAELIAAgASACIAMQgAGMCyEDIARBEGokACADC4QBAQJ/AkACQCAAKALoAyICIAAoAuwDIgNGDQADQCACKAIAIAFGDQEgAkEEaiICIANHDQALDAELIAIgA0YNACABLQAXQRB0QYCAMHFBgIAgRgRAIAAgACgC4ANBAWs2AuADCyACIAJBBGoiASADIAFrEDMaIAAgA0EEazYC7ANBAQ8LQQALCwBByDEgACABEEkLPAAgAEUEQCACQQVHQQAgAhtFBEBBuDAgAyAEEEkaDwsgAyAEEHAaDwsgACABIAIgAyAEIAAoAgQRDQAaCyYBAX8jAEEQayIBJAAgASAANgIMQbgwQdglIAAQSRogAUEQaiQAC4cDAwN/BXwCfSAAKgKgA7siBiACoCECIAAqApwDuyIHIAGgIQggACgC9AMqAhgiC0MAAAAAXARAIAAqApADuyEJIAAqAowDIQwgACAHIAu7IgFBACAALQAAQRBxIgNBBHYiBBA0OAKcAyAAIAYgAUEAIAQQNDgCoAMgASAMuyIHohBsIgYgBmIiBEUgBplELUMc6+I2Gj9jcUUEQCAEIAZEAAAAAAAA8L+gmUQtQxzr4jYaP2NFciEFCyACIAmgIQogCCAHoCEHAn8gASAJohBsIgYgBmIiBEUEQEEAIAaZRC1DHOviNho/Yw0BGgsgBCAGRAAAAAAAAPC/oJlELUMc6+I2Gj9jRXILIQQgACAHIAEgA0EARyIDIAVxIAMgBUEBc3EQNCAIIAFBACADEDSTOAKMAyAAIAogASADIARxIAMgBEEBc3EQNCACIAFBACADEDSTOAKQAwsgACgC6AMiAyAAKALsAyIARwRAA0AgAygCACAIIAIQcyADQQRqIgMgAEcNAAsLC1UBAX0gAEEUaiIAIAEgAkECSSICIAQgBRA1IQYgACABIAIgBCAFEC0iBUMAAAAAYCADIAVecQR9IAUFIAZDAAAAAGBFBEAgAw8LIAYgAyADIAZdGwsLeAEBfwJAIAAoAgAiAgRAA0AgAUUNAiACIAEoAgQ2AgQgAiABKAIINgIIIAEoAgAhASAAKAIAIQAgAigCACICDQALCyAAIAEQPA8LAkAgAEUNACAAKAIAIgFFDQAgAEEANgIAA0AgASgCACEAIAEQIyAAIgENAAsLC5kCAgZ/AX0gAEEUaiEHQQMhBCAALQAUQQJ2QQNxIQUCQAJ/AkAgAUEBIAAoAuQDGyIIQQJGBEACQCAFQQJrDgIEAAILQQIhBAwDC0ECIQRBACAFQQFLDQEaCyAECyEGIAUhBAsgACAEIAggAyACIARBAkkiBRsQbiEKIAAgBiAIIAIgAyAFGxBuIQMgAEGcA2oiAEEBIAFBAkZBAXQiCCAFG0ECdGogCiAHIAQgASACECKSOAIAIABBAyABQQJHQQF0IgkgBRtBAnRqIAogByAEIAEgAhAhkjgCACAAIAhBASAGQQF2IgQbQQJ0aiADIAcgBiABIAIQIpI4AgAgACAJQQMgBBtBAnRqIAMgByAGIAEgAhAhkjgCAAvUAgEDfyMAQdACayIBJAAgAUEIakEAQcQCECoaIAFBADoAGCABQgA3AxAgAUGAgID+BzYCDCABQRxqQQBBxAEQKhogAUHgAWohAyABQSBqIQIDQCACQoCAgPyLgIDAv383AhAgAkKBgICAEDcCCCACQoCAgPyLgIDAv383AgAgAkEYaiICIANHDQALIAFCgICA/IuAgMC/fzcD8AEgAUKBgICAEDcD6AEgAUKAgID8i4CAwL9/NwPgASABQoCAgP6HgIDg/wA3AoQCIAFCgICA/oeAgOD/ADcC/AEgASABLQD4AUH4AXE6APgBIAFBjAJqQQBBwAAQKhogAEGYAWogAUEIakHEAhArGiAAQgA3AowDIAAgAC0AAEEBcjoAACAAEE8gACgC6AMiAiAAKALsAyIARwRAA0AgAigCABB3IAJBBGoiAiAARw0ACwsgAUHQAmokAAuuAgIKfwJ9IwBBIGsiASQAIAFBgAI7AB4gAEHuAGohByAAQfgDaiEFIABB8gBqIQggAEH2AGohCSAAQfwAaiEDQQAhAANAIAFBEGogAyAJIAFBHmogBGotAAAiAkEBdCIEaiIGLwEAEB8CQAJAIAEtABRFDQAgAUEIaiADIAYvAQAQHyABIAMgBCAIai8BABAfIAEtAAwgAS0ABEcNAAJAIAEqAggiDCAMXCIKIAEqAgAiCyALXHJFBEAgDCALk4tDF7fROF0NAQwCCyAKRSALIAtbcg0BCyABQRBqIAMgBi8BABAfDAELIAFBEGogAyAEIAdqLwEAEB8LIAUgAkEDdGoiAiABLQAUOgAEIAIgASgCEDYCAEEBIQQgACECQQEhACACRQ0ACyABQSBqJAALMgACf0EAIAAvABVBgOAAcUGAwABGDQAaQQEgABA7QwAAAABcDQAaIAAQQEMAAAAAXAsLewEBfSADIASTIgMgA1sEfUMAAAAAIABBFGoiACABIAIgBSAGEDUiByAEkyAHIAdcGyIHQ///f38gACABIAIgBSAGEC0iBSAEkyAFIAVcGyIEIAMgAyAEXhsiAyADIAddGyAHIAMgAyADXBsgAyADWyAHIAdbcRsFIAMLC98FAwR/BX0BfCAJQwAAAABdIAhDAAAAAF1yBH8gDQUgBSESIAEhEyADIRQgByERIAwqAhgiFUMAAAAAXARAIAG7IBW7IhZBAEEAEDQhEyADuyAWQQBBABA0IRQgBbsgFkEAQQAQNCESIAe7IBZBAEEAEDQhEQsCf0EAIAAgBEcNABogEiATk4tDF7fROF0gEyATXCINIBIgElxyRQ0AGkEAIBIgElsNABogDQshDAJAIAIgBkcNACAUIBRcIg0gESARXHJFBEAgESAUk4tDF7fROF0hDwwBCyARIBFbDQAgDSEPC0EBIQ5BASENAkAgDA0AIAEgCpMhAQJAIABFBEAgASABXCIAIAggCFxyRQRAQQAhDCABIAiTi0MXt9E4XUUNAgwDC0EAIQwgCCAIWw0BIAANAgwBCyAAQQJGIQwgAEECRw0AIARBAUcNACABIAhgDQECQCAIIAhcIgAgASABXHJFBEAgASAIk4tDF7fROF1FDQEMAwtBACENIAEgAVsNAkEBIQ0gAA0CC0EAIQ0MAQtBACENIAggCFwiACABIAVdRXINACAMRSABIAFcIhAgBSAFXHIgBEECR3JyDQBBASENIAEgCGANAEEAIQ0gACAQcg0AIAEgCJOLQxe30ThdIQ0LAkAgDw0AIAMgC5MhAQJAAkAgAkUEQCABIAFcIgIgCSAJXHJFBEBBACEAIAEgCZOLQxe30ThdRQ0CDAQLQQAhACAJIAlbDQEgAg0DDAELIAJBAkYhACACQQJHIAZBAUdyDQAgASAJYARADAMLIAkgCVwiACABIAFcckUEQCABIAmTi0MXt9E4XUUNAgwDC0EAIQ4gASABWw0CQQEhDiAADQIMAQsgCSAJXCICIAEgB11Fcg0AIABFIAEgAVwiBCAHIAdcciAGQQJHcnINACABIAlgDQFBACEOIAIgBHINASABIAmTi0MXt9E4XSEODAELQQAhDgsgDSAOcQsL4wEBA38jAEEQayIBJAACQAJAIAAtABRBCHFFDQBBASEDIAAvABVB8AFxQdAARg0AIAEgABAyIAEoAgQhAAJAIAEoAgAiAkUEQEEAIQMgAEUNAQsDQCACKALsAyACKALoAyICa0ECdSAATQ0DIAIgAEECdGooAgAiAC8AFSAALQAXQRB0ciIAQYDgAHFBgMAARyAAQYAecUGACkZxIgMNASABEC4gASgCBCIAIAEoAgAiAnINAAsLIAEoAggiAEUNAANAIAAoAgAhAiAAECMgAiIADQALCyABQRBqJAAgAw8LEAIAC7IBAQR/AkACQCAAKAIEIgMgACgCACIEKALsAyAEKALoAyIBa0ECdUkEQCABIANBAnRqIQIDQCACKAIAIgEtABdBEHRBgIAwcUGAgCBHDQMgASgC7AMgASgC6ANGDQJBDBAeIgIgBDYCBCACIAM2AgggAiAAKAIINgIAQQAhAyAAQQA2AgQgACABNgIAIAAgAjYCCCABIQQgASgC6AMiAiABKALsA0cNAAsLEAIACyAAEC4LC4wQAgx/B30jAEEgayINJAAgDUEIaiABEDIgDSgCCCIOIA0oAgwiDHIEQCADQQEgAxshFSAAQRRqIRQgBUEBaiEWA0ACQAJAAn8CQAJAAkACQAJAIAwgDigC7AMgDigC6AMiDmtBAnVJBEAgDiAMQQJ0aigCACILLwAVIAstABdBEHRyIgxBgIAwcUGAgBBGDQgCQAJAIAxBDHZBA3EOAwEKAAoLIAkhFyAKIRogASgC9AMtABRBBHFFBEAgACoClAMgFEECQQEQMCAUQQJBARAvkpMhFyAAKgKYAyAUQQBBARAwIBRBAEEBEC+SkyEaCyALQRRqIQ8gAS0AFEECdkEDcSEQAkACfwJAIANBAkciE0UEQEEAIQ5BAyEMAkAgEEECaw4CBAACC0ECIQwMAwtBAiEMQQAgEEEBSw0BGgsgDAshDiAQIQwLIA9BAkEBIBcQIiAPQQJBASAXECGSIR0gD0EAQQEgFxAiIRwgD0EAQQEgFxAhIRsgCyoC+AMhGAJAAkACQAJAIAstAPwDQQFrDgIBAAILIBggF5RDCtcjPJQhGAsgGEMAAAAAYEUNACAdIAsgA0EAIBcgFxAxkiEYDAELIA1BGGogDyALQTJqIhAgAxBFQwAAwH8hGCANLQAcRQ0AIA1BGGogDyAQIAMQRCANLQAcRQ0AIA1BGGogDyAQIAMQRSANLQAcQQNGDQAgDUEYaiAPIBAgAxBEIA0tABxBA0YNACALQQIgAyAAKgKUAyAUQQIgAxBLIBRBAiADEFKSkyAPQQIgAyAXEFEgD0ECIAMgFxCDAZKTIBcgFxAlIRgLIBwgG5IhHCALKgKABCEZAkACQAJAIAstAIQEQQFrDgIBAAILIBkgGpRDCtcjPJQhGQsgGUMAAAAAYEUNACAcIAsgA0EBIBogFxAxkiEZDAMLIA1BGGogDyALQTJqIhAQQwJAIA0tABxFDQAgDUEYaiAPIBAQQiANLQAcRQ0AIA1BGGogDyAQEEMgDS0AHEEDRg0AIA1BGGogDyAQEEIgDS0AHEEDRg0AIAtBACADIAAqApgDIBRBACADEEsgFEEAIAMQUpKTIA9BACADIBoQUSAPQQAgAyAaEIMBkpMgGiAXECUhGQwDC0MAAMB/IRkgGCAYXA0GIAtB/ABqIhAgC0H6AGoiEi8BABAgIhsgG1sNAwwFCyALLQAAQQhxDQggCxBPIAAgCyACIAstABRBA3EiDCAVIAwbIAQgFiAGIAsqApwDIAeSIAsqAqADIAiSIAkgChB+IBFyIQxBACERIAxBAXFFDQhBASERIAsgCy0AAEEBcjoAAAwICxACAAsgGCAYXCAZIBlcRg0BIAtB/ABqIhAgC0H6AGoiEi8BABAgIhsgG1wNASAYIBhcBEAgGSAckyAQIAsvAXoQIJQgHZIhGAwCCyAZIBlbDQELIBwgGCAdkyAQIBIvAQAQIJWSIRkLIBggGFwNASAZIBlbDQMLQQAMAQtBAQshEiALIBcgGCACQQFHIAxBAklxIBdDAAAAAF5xIBJxIhAbIBkgA0ECIBIgEBsgGSAZXCAXIBpBAEEGIAQgBSAGED0aIAsqApQDIA9BAkEBIBcQIiAPQQJBASAXECGSkiEYIAsqApgDIA9BAEEBIBcQIiAPQQBBASAXECGSkiEZC0EBIRAgCyAYIBkgA0EAQQAgFyAaQQFBASAEIAUgBhA9GiAAIAEgCyADIAxBASAXIBoQggEgACABIAsgAyAOQQAgFyAaEIIBIBFBAXFFBEAgCy0AAEEBcSEQCyABLQAUIhJBAnZBA3EhDAJAAn8CQAJAAkACQAJAAkACQAJAAkACfwJAIBNFBEBBACERQQMhDiAMQQJrDgIDDQELQQIhDkEAIAxBAUsNARoLIA4LIREgEkEEcUUNBCASQQhxRQ0BIAwhDgsgASEMIA8QXw0BDAILAkAgCy0ANEEHcQ0AIAstADhBB3ENACALLQBCQQdxDQAgDCEOIAEhDCALQUBrLwEAQQdxRQ0CDAELIAwhDgsgACEMCwJ/AkACQAJAIA5BAWsOAwABAgULIAtBmANqIQ4gC0GoA2ohE0EBIRIgDEGYA2oMAgsgC0GUA2ohDiALQZwDaiETQQIhEiAMQZQDagwBCyALQZQDaiEOIAtBpANqIRNBACESIAxBlANqCyEMIAsgEkECdGogDCoCACAOKgIAkyATKgIAkzgCnAMLIBFBAXFFDQUCQAJAIBFBAnEEQCABIQwgDxBfDQEMAgsgCy0ANEEHcQ0AIAstADhBB3ENACALLQBCQQdxDQAgASEMIAtBQGsvAQBBB3FFDQELIAAhDAsgEUEBaw4DAQIDAAsQJAALIAtBmANqIREgC0GoA2ohDkEBIRMgDEGYA2oMAgsgC0GUA2ohESALQZwDaiEOQQIhEyAMQZQDagwBCyALQZQDaiERIAtBpANqIQ5BACETIAxBlANqCyEMIAsgE0ECdGogDCoCACARKgIAkyAOKgIAkzgCnAMLIAsqAqADIRsgCyoCnAMgB0MAAAAAIA8QXxuTIRcCfQJAIAstADRBB3ENACALLQA4QQdxDQAgCy0AQkEHcQ0AIAtBQGsvAQBBB3ENAEMAAAAADAELIAgLIRogCyAXOAKcAyALIBsgGpM4AqADIBAhEQsgDUEIahAuIA0oAgwiDCANKAIIIg5yDQALCyANKAIQIgwEQANAIAwoAgAhACAMECMgACIMDQALCyANQSBqJAAgEUEBcQt2AgF/AX0jAEEQayIEJAAgBEEIaiAAIAFBAnRB7CVqKAIAIAIQUEMAAMB/IQUCQAJAAkAgBC0ADEEBaw4CAAECCyAEKgIIIQUMAQsgBCoCCCADlEMK1yM8lCEFCyAEQRBqJAAgBUMAAAAAl0MAAAAAIAUgBVsbC3gCAX8BfSMAQRBrIgQkACAEQQhqIABBAyACQQJHQQF0IAFB/gFxQQJHGyACEDZDAADAfyEFAkACQAJAIAQtAAxBAWsOAgABAgsgBCoCCCEFDAELIAQqAgggA5RDCtcjPJQhBQsgBEEQaiQAIAVDAAAAACAFIAVbGwt4AgF/AX0jAEEQayIEJAAgBEEIaiAAQQEgAkECRkEBdCABQf4BcUECRxsgAhA2QwAAwH8hBQJAAkACQCAELQAMQQFrDgIAAQILIAQqAgghBQwBCyAEKgIIIAOUQwrXIzyUIQULIARBEGokACAFQwAAAAAgBSAFWxsLoA0BBH8jAEEQayIJJAAgCUEIaiACQRRqIgggA0ECRkEBdEEBIARB/gFxQQJGIgobIgsgAxA2IAYgByAKGyEHAkACQAJAAkACQAJAIAktAAxFDQAgCUEIaiAIIAsgAxA2IAktAAxBA0YNACAIIAQgAyAHEIEBIABBFGogBCADEDCSIAggBCADIAcQIpIhBkEBIQMCQAJ/AkACQAJAAkAgBA4EAgMBAAcLQQIhAwwBC0EAIQMLIAMgC0YNAgJAAkAgBA4EAgIAAQYLIABBlANqIQNBAAwCCyAAQZQDaiEDQQAMAQsgAEGYA2ohA0EBCyEAIAMqAgAgAiAAQQJ0aioClAOTIAaTIQYLIAIgBEECdEHcJWooAgBBAnRqIAY4ApwDDAULIAlBCGogCCADQQJHQQF0QQMgChsiCiADEDYCQCAJLQAMRQ0AIAlBCGogCCAKIAMQNiAJLQAMQQNGDQACfwJAAkACQCAEDgQCAgABBQsgAEGUA2ohBUEADAILIABBlANqIQVBAAwBCyAAQZgDaiEFQQELIQEgBSoCACACQZQDaiIFIAFBAnRqKgIAkyAAQRRqIAQgAxAvkyAIIAQgAyAHECGTIAggBCADIAcQgAGTIQZBASEDAkACfwJAAkACQAJAIAQOBAIDAQAHC0ECIQMMAQtBACEDCyADIAtGDQICQAJAIAQOBAICAAEGCyAAQZQDaiEDQQAMAgsgAEGUA2ohA0EADAELIABBmANqIQNBAQshACADKgIAIAUgAEECdGoqAgCTIAaTIQYLIAIgBEECdEHcJWooAgBBAnRqIAY4ApwDDAULAkACQAJAIAUEQCABLQAUQQR2QQdxIgBBBUsNCEEBIAB0IgBBMnENASAAQQlxBEAgBEECdEHcJWooAgAhACAIIAQgAyAGEEEgASAAQQJ0IgBqIgEqArwDkiEGIAAgAmogAigC9AMtABRBAnEEfSAGBSAGIAEqAswDkgs4ApwDDAkLIAEgBEECdEHsJWooAgBBAnRqIgAqArwDIAggBCADIAYQYpIhBiACKAL0Ay0AFEECcUUEQCAGIAAqAswDkiEGCwJAAkACQAJAIAQOBAEBAgAICyABKgKUAyACKgKUA5MhB0ECIQMMAgsgASoCmAMgAioCmAOTIQdBASEDAkAgBA4CAgAHC0EDIQMMAQsgASoClAMgAioClAOTIQdBACEDCyACIANBAnRqIAcgBpM4ApwDDAgLIAIvABZBD3EiBUUEQCABLQAVQQR2IQULIAVBBUYEQCABLQAUQQhxRQ0CCyABLwAVQYCAA3FBgIACRgRAIAVBAmsOAgEHAwsgBUEISw0HQQEgBXRB8wNxDQYgBUECRw0CC0EAIQACfQJ/AkACQAJAAkACfwJAAkACQCAEDgQCAgABBAsgASoClAMhB0ECIQAgAUG8A2oMAgsgASoClAMhByABQcQDagwBCyABKgKYAyEHAkACQCAEDgIAAQMLQQMhACABQcADagwBC0EBIQAgAUHIA2oLIQUgByAFKgIAkyABQbwDaiIIIABBAnRqKgIAkyIHIAIoAvQDLQAUQQJxDQUaAkAgBA4EAAIDBAELQQMhACABQdADagwECxAkAAtBASEAIAFB2ANqDAILQQIhACABQcwDagwBC0EAIQAgAUHUA2oLIQUgByAFKgIAkyABIABBAnRqKgLMA5MLIAIgBEECdCIFQfwlaigCAEECdGoqApQDIAJBFGoiACAEQQEgBhAiIAAgBEEBIAYQIZKSk0MAAAA/lCAIIAVB3CVqKAIAIgVBAnRqKgIAkiAAIAQgAyAGEEGSIQYgAiAFQQJ0aiACKAL0Ay0AFEECcQR9IAYFIAYgASAFQQJ0aioCzAOSCzgCnAMMBgsgAS8AFUGAgANxQYCAAkcNBAsgASAEQQJ0QewlaigCAEECdGoiACoCvAMgCCAEIAMgBhBikiEGIAIoAvQDLQAUQQJxRQRAIAYgACoCzAOSIQYLAkACQCAEDgQBAQMAAgsgASoClAMgAioClAOTIQdBAiEDDAMLIAEqApgDIAIqApgDkyEHQQEhAwJAIAQOAgMAAQtBAyEDDAILECQACyABKgKUAyACKgKUA5MhB0EAIQMLIAIgA0ECdGogByAGkzgCnAMMAQsgBEECdEHcJWooAgAhACAIIAQgAyAGEEEgASAAQQJ0IgBqIgEqArwDkiEGIAAgAmogAigC9AMtABRBAnEEfSAGBSAGIAEqAswDkgs4ApwDCyAJQRBqJAALcAIBfwF9IwBBEGsiBCQAIARBCGogACABQQJ0QewlaigCACACEDZDAADAfyEFAkACQAJAIAQtAAxBAWsOAgABAgsgBCoCCCEFDAELIAQqAgggA5RDCtcjPJQhBQsgBEEQaiQAIAVDAAAAACAFIAVbGwscACAAIAFBCCACpyACQiCIpyADpyADQiCIpxAVCwUAEFgACzkAIABFBEBBAA8LAn8gAUGAf3FBgL8DRiABQf8ATXJFBEBB/DtBGTYCAEF/DAELIAAgAToAAEEBCwvEAgACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCABQQlrDhIACgsMCgsCAwQFDAsMDAoLBwgJCyACIAIoAgAiAUEEajYCACAAIAEoAgA2AgAPCwALIAIgAigCACIBQQRqNgIAIAAgATIBADcDAA8LIAIgAigCACIBQQRqNgIAIAAgATMBADcDAA8LIAIgAigCACIBQQRqNgIAIAAgATAAADcDAA8LIAIgAigCACIBQQRqNgIAIAAgATEAADcDAA8LAAsgAiACKAIAQQdqQXhxIgFBCGo2AgAgACABKwMAOQMADwsgACACIAMRAQALDwsgAiACKAIAIgFBBGo2AgAgACABNAIANwMADwsgAiACKAIAIgFBBGo2AgAgACABNQIANwMADwsgAiACKAIAQQdqQXhxIgFBCGo2AgAgACABKQMANwMAC84BAgN/An0jAEEQayIDJABBASEEIANBCGogAEH8AGoiBSAAIAFBAXRqQegAaiIBLwEAEB8CQAJAIAMqAggiByACKgIAIgZcBEAgByAHWwRAIAItAAQhAgwCCyAGIAZcIQQLIAItAAQhAiAERQ0AIAMtAAwgAkH/AXFGDQELIAUgASAGIAIQOQNAIAAtAAAiAUEEcQ0BIAAgAUEEcjoAACAAKAIQIgEEQCAAIAERAAALIABBgICA/gc2ApwBIAAoAuQDIgANAAsLIANBEGokAAtdAQR/IAAoAgAhAgNAIAIsAAAiAxBXBEBBfyEEIAAgAkEBaiICNgIAIAFBzJmz5gBNBH9BfyADQTBrIgMgAUEKbCIEaiADIARB/////wdzShsFIAQLIQEMAQsLIAELrhQCEn8BfiMAQdAAayIIJAAgCCABNgJMIAhBN2ohFyAIQThqIRQCQAJAAkACQANAIAEhDSAHIA5B/////wdzSg0BIAcgDmohDgJAAkACQCANIgctAAAiCQRAA0ACQAJAIAlB/wFxIgFFBEAgByEBDAELIAFBJUcNASAH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IQEgAEIANwIEIAAgATYCACABIAA2AgQgAkEQaiQAIAALGwEBfyAABEAgACgCACIBBEAgARAjCyAAECMLC0kBAn9BBBAeIQFBIBAeIgBBADYCHCAAQoCAgICAgIDAPzcCFCAAQgA3AgwgAEEAOgAIIABBAzYCBCAAQQA2AgAgASAANgIAIAELIAAgAkEFR0EAIAIbRQRAQbgwIAMgBBBJDwsgAyAEEHALIgEBfiABIAKtIAOtQiCGhCAEIAARFQAiBUIgiKckASAFpwuoAQEFfyAAKAJUIgMoAgAhBSADKAIEIgQgACgCFCAAKAIcIgdrIgYgBCAGSRsiBgRAIAUgByAGECsaIAMgAygCACAGaiIFNgIAIAMgAygCBCAGayIENgIECyAEIAIgAiAESxsiBARAIAUgASAEECsaIAMgAygCACAEaiIFNgIAIAMgAygCBCAEazYCBAsgBUEAOgAAIAAgACgCLCIBNgIcIAAgATYCFCACCwQAQgALBABBAAuKBQIGfgJ/IAEgASgCAEEHakF4cSIBQRBqNgIAIAAhCSABKQMAIQMgASkDCCEGIwBBIGsiCCQAAkAgBkL///////////8AgyIEQoCAgICAgMCAPH0gBEKAgICAgIDA/8MAfVQEQCAGQgSGIANCPIiEIQQgA0L//////////w+DIgNCgYCAgICAgIAIWgRAIARCgYCAgICAgIDAAHwhAgwCCyAEQoCAgICAgICAQH0hAiADQoCAgICAgICACFINASACIARCAYN8IQIMAQsgA1AgBEKAgICAgIDA//8AVCAEQoCAgICAgMD//wBRG0UEQCAGQgSGIANCPIiEQv////////8Dg0KAgICAgICA/P8AhCECDAELQoCAgICAgID4/wAhAiAEQv///////7//wwBWDQBCACECIARCMIinIgBBkfcASQ0AIAMhAiAGQv///////z+DQoCAgICAgMAAhCIFIQcCQCAAQYH3AGsiAUHAAHEEQCACIAFBQGqthiEHQgAhAgwBCyABRQ0AIAcgAa0iBIYgAkHAACABa62IhCEHIAIgBIYhAgsgCCACNwMQIAggBzcDGAJAQYH4ACAAayIAQcAAcQRAIAUgAEFAaq2IIQNCACEFDAELIABFDQAgBUHAACAAa62GIAMgAK0iAoiEIQMgBSACiCEFCyAIIAM3AwAgCCAF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ASAAKAIAIQAgASACQQFxBH8gASgCACAAaigCAAUgAAsRCwALYQECfyMAQRBrIgIkACABIAAoAgQiA0EBdWohASAAKAIAIQAgAiABIANBAXEEfyABKAIAIABqKAIABSAACxEBAEEQEB4iACACKQMINwMIIAAgAikDADcDACACQRBqJAAgAAtjAQJ/IwBBEGsiAyQAIAEgACgCBCIEQQF1aiEBIAAoAgAhACADIAEgAiAEQQFxBH8gASgCACAAaigCAAUgAAsRAwBBEBAeIgAgAykDCDcDCCAAIAMpAwA3AwAgA0EQaiQAIAALNwEBfyABIAAoAgQiA0EBdWohASAAKAIAIQAgASACIANBAXEEfyABKAIAIABqKAIABSAACxEEAAs5AQF/IAEgACgCBCIEQQF1aiEBIAAoAgAhACABIAIgAyAEQQFxBH8gASgCACAAaigCAAUgAAsRCAALCQAgASAAEQIACwUAQcM7Cw8AIAEgACgCAGogAjYCAAsNACABIAAoAgBqKAIACxgBAX9BEBAeIgBCADcDCCAAQQA2AgAgAAsYAQF/QRAQHiIAQgA3AwAgAEIANwMIIAALDABBMBAeQQBBMBAqCzcBAX8gASAAKAIEIgNBAXVqIQEgACgCACEAIAEgAiADQQFxBH8gASgCACAAaigCAAUgAAsRHgALBQBBvjsLIQAgACABKAIAIAEgASwAC0EASBtBuzsgAigCABAQNgIACyoBAX9BDBAeIgFBADoABCABIAAoAgA2AgggAEEANgIAIAFB2Cc2AgAgAQsFAEG7OwsFAEG4OwshACAAIAEoAgAgASABLAALQQBIG0GkOyACKAIAEBA2AgAL2AEBBH8jAEEgayIDJAAgASgCACIEQfD///8HSQRAAkACQCAEQQtPBEAgBEEPckEBaiIFEB4hBiADIAVBgICAgHhyNgIQIAMgBjYCCCADIAQ2AgwgBCAGaiEFDAELIAMgBDoAEyADQQhqIgYgBGohBSAERQ0BCyAGIAFBBGogBBArGgsgBUEAOgAAIAMgAjYCACADQRhqIANBCGogAyAAEQMAIAMoAhgQHSADKAIYIgAQBiADKAIAEAYgAywAE0EASARAIAMoAggQIwsgA0EgaiQAIAAPCxACAAsqAQF/QQwQHiIBQQA6AAQgASAAKAIANgIIIABBADYCACABQeAmNgIA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AkEIaiAIIAYQHyACIAcgAC8AABAfQQEhAyACKgIIIgogAioCACILXAR/IAogClsNAyALIAtcBSADC0UNAiACLQAMIAItAARHDQILIABBAmohAEEBIQMgBCEGQQEhBCAGRQ0ACyABLwB6IgBBB3FFBEAgBS0AekEHcUUNAgsgCCAAECAiCiAHIAUvAHoQICILWw0BIAogClsNACALIAtcDQELIAFBFGogBUEUakHoABArGiABQfwAaiAFQfwAahCgAQNAIAEtAAAiAEEEcQ0BIAEgAEEEcjoAACABKAIQIgAEQCABIAARAAALIAFBgICA/gc2ApwBIAEoAuQDIgENAAsLIAJBEGokAAvGAwEEfyMAQaAEayICJAAgACgCBCEBIABBADYCBCABBEAgASABKAIAKAIEEQAACyAAKAIIIQEgAEEANgIIIAEEQCABIAEoAgAoAgQRAAALAkAgACgCACIAKALoAyAAKALsA0YEQCAAKALkAw0BIAAgAkEYaiAAKAL0AxBcIgEpAgA3AgAgACABKAIQNgIQIAAgASkCCDcCCCAAQRRqIAFBFGpB6AAQKxogACABKQKMATcCjAEgACABKQKEATcChAEgACABKQJ8NwJ8IAEoApQBIQQgAUEANgKUASAAKAKUASEDIAAgBDYClAEgAwRAIAMQWwsgAEGYAWogAUGYAWpB0AIQKxogACgC6AMiAwRAIAAgAzYC7AMgAxAjCyAAIAEoAugDNgLoAyAAIAEoAuwDNgLsAyAAIAEoAvADNgLwAyABQQA2AvADIAFCADcC6AMgACABKQL8AzcC/AMgACABKQL0AzcC9AMgACABKAKEBDYChAQgASgClAEhACABQQA2ApQBIAAEQCAAEFsLIAJBoARqJAAPCyACQfAcNgIQIABBBUHYJSACQRBqECwQJAALIAJB5hE2AgAgAEEFQdglIAIQLBAkAAsLAEEMEB4gABCiAQsLAEEMEB5BABCiAQsNACAAKAIALQAIQQFxCwoAIAAoAgAoAhQLGQAgAUH/AXEEQBACAAsgACgCACgCEEEBcQsYACAAKAIAIgAgAC0ACEH+AXEgAXI6AAgLJgAgASAAKAIAIgAoAhRHBEAgACABNgIUIAAgACgCDEEBajYCDAsLkgEBAn8jAEEQayICJAAgACgCACEAIAFDAAAAAGAEQCABIAAqAhhcBEAgACABOAIYIAAgACgCDEEBajYCDAsgAkEQaiQADwsgAkGIFDYCACMAQRBrIgMkACADIAI2AgwCQCAARQRAQbgwQdglIAIQSRoMAQsgAEEAQQVB2CUgAiAAKAIEEQ0AGgsgA0EQaiQAECQACz8AIAFB/wFxRQRAIAIgACgCACIAKAIQIgFBAXFHBEAgACABQX5xIAJyNgIQIAAgACgCDEEBajYCDAsPCxACAAsL4CYjAEGACAuBHk9ubHkgbGVhZiBub2RlcyB3aXRoIGN1c3RvbSBtZWFzdXJlIGZ1bmN0aW9ucyBzaG91bGQgbWFudWFsbHkgbWFyayB0aGVtc2VsdmVzIGFzIGRpcnR5AGlzRGlydHkAbWFya0RpcnR5AGRlc3Ryb3kAc2V0RGlzcGxheQBnZXREaXNwbGF5AHNldEZsZXgALSsgICAwWDB4AC0wWCswWCAwWC0weCsweCAweABzZXRGbGV4R3JvdwBnZXRGbGV4R3JvdwBzZXRPdmVyZmxvdwBnZXRPdmVyZmxvdwBoYXNOZXdMYXlvdXQAY2FsY3VsYXRlTGF5b3V0AGdldENvbXB1dGVkTGF5b3V0AHVuc2lnbmVkIHNob3J0AGdldENoaWxkQ291bnQAdW5zaWduZWQgaW50AHNldEp1c3RpZnlDb250ZW50AGdldEp1c3RpZnlDb250ZW50AGF2YWlsYWJsZUhlaWdodCBpcyBpbmRlZmluaXRlIHNvIGhlaWdodFNpemluZ01vZGUgbXVzdCBiZSBTaXppbmdNb2RlOjpNYXhDb250ZW50AGF2YWlsYWJsZVdpZHRoIGlzIGluZGVmaW5pdGUgc28gd2lkdGhTaXppbmdNb2RlIG11c3QgYmUgU2l6aW5nTW9kZTo6TWF4Q29udGVudABzZXRBbGlnbkNvbnRlbnQAZ2V0QWxpZ25Db250ZW50AGdldFBhcmVudABpbXBsZW1lbnQAc2V0TWF4SGVpZ2h0UGVyY2VudABzZXRIZWlnaHRQZXJjZW50AHNldE1pbkhlaWdodFBlcmNlbnQAc2V0RmxleEJhc2lzUGVyY2VudABzZXRHYXBQZXJjZW50AHNldFBvc2l0aW9uUGVyY2VudABzZXRNYXJnaW5QZXJjZW50AHNldE1heFdpZHRoUGVyY2VudABzZXRXaWR0aFBlcmNlbnQAc2V0TWluV2lkdGhQZXJjZW50AHNldFBhZGRpbmdQZXJjZW50AGhhbmRsZS50eXBlKCkgPT0gU3R5bGVWYWx1ZUhhbmRsZTo6VHlwZTo6UG9pbnQgfHwgaGFuZGxlLnR5cGUoKSA9PSBTdHlsZVZhbHVlSGFuZGxlOjpUeXBlOjpQZXJjZW50AGNyZWF0ZURlZmF1bHQAdW5pdAByaWdodABoZWlnaHQAc2V0TWF4SGVpZ2h0AGdldE1heEhlaWdodABzZXRIZWlnaHQAZ2V0SGVpZ2h0AHNldE1pbkhlaWdodABnZXRNaW5IZWlnaHQAZ2V0Q29tcHV0ZWRIZWlnaHQAZ2V0Q29tcHV0ZWRSaWdodABsZWZ0AGdldENvbXB1dGVkTGVmdAByZXNldABfX2Rlc3RydWN0AGZsb2F0AHVpbnQ2NF90AHVzZVdlYkRlZmF1bHRzAHNldFVzZVdlYkRlZmF1bHRzAHNldEFsaWduSXRlbXMAZ2V0QWxpZ25JdGVtcwBzZXRGbGV4QmFzaXMAZ2V0RmxleEJhc2lzAENhbm5vdCBnZXQgbGF5b3V0IHByb3BlcnRpZXMgb2YgbXVsdGktZWRnZSBzaG9ydGhhbmRzAHNldFBvaW50U2NhbGVGYWN0b3IATWVhc3VyZUNhbGxiYWNrV3JhcHBlcgBEaXJ0aWVkQ2FsbGJhY2tXcmFwcGVyAENhbm5vdCByZXNldCBhIG5vZGUgc3RpbGwgYXR0YWNoZWQgdG8gYSBvd25lcgBzZXRCb3JkZXIAZ2V0Qm9yZGVyAGdldENvbXB1dGVkQm9yZGVyAGdldE51bWJlcgBoYW5kbGUudHlwZSgpID09IFN0eWxlVmFsdWVIYW5kbGU6OlR5cGU6Ok51bWJlcgB1bnNpZ25lZCBjaGFyAHRvcABnZXRDb21wdXRlZFRvcABzZXRGbGV4V3JhcABnZXRGbGV4V3JhcABzZXRHYXAAZ2V0R2FwACVwAHNldEhlaWdodEF1dG8Ac2V0RmxleEJhc2lzQXV0bwBzZXRQb3NpdGlvbkF1dG8Ac2V0TWFyZ2luQXV0bwBzZXRXaWR0aEF1dG8AU2NhbGUgZmFjdG9yIHNob3VsZCBub3QgYmUgbGVzcyB0aGFuIHplcm8Ac2V0QXNwZWN0UmF0aW8AZ2V0QXNwZWN0UmF0aW8Ac2V0UG9zaXRpb24AZ2V0UG9zaXRpb24Abm90aWZ5T25EZXN0cnVjdGlvbgBzZXRGbGV4RGlyZWN0aW9uAGdldEZsZXhEaXJlY3Rpb24Ac2V0RGlyZWN0aW9uAGdldERpcmVjdGlvbgBzZXRNYXJnaW4AZ2V0TWFyZ2luAGdldENvbXB1dGVkTWFyZ2luAG1hcmtMYXlvdXRTZWVuAG5hbgBib3R0b20AZ2V0Q29tcHV0ZWRCb3R0b20AYm9vbABlbXNjcmlwdGVuOjp2YWwAc2V0RmxleFNocmluawBnZXRGbGV4U2hyaW5rAHNldEFsd2F5c0Zvcm1zQ29udGFpbmluZ0Jsb2NrAE1lYXN1cmVDYWxsYmFjawBEaXJ0aWVkQ2FsbGJhY2sAZ2V0TGVuZ3RoAHdpZHRoAHNldE1heFdpZHRoAGdldE1heFdpZHRoAHNldFdpZHRoAGdldFdpZHRoAHNldE1pbldpZHRoAGdldE1pbldpZHRoAGdldENvbXB1dGVkV2lkdGgAcHVzaAAvaG9tZS9ydW5uZXIvd29yay95b2dhL3lvZ2EvamF2YXNjcmlwdC8uLi95b2dhL3N0eWxlL1NtYWxsVmFsdWVCdWZmZXIuaAAvaG9tZS9ydW5uZXIvd29yay95b2dhL3lvZ2EvamF2YXNjcmlwdC8uLi95b2dhL3N0eWxlL1N0eWxlVmFsdWVQb29sLmgAdW5zaWduZWQgbG9uZwBzZXRCb3hTaXppbmcAZ2V0Qm94U2l6aW5nAHN0ZDo6d3N0cmluZwBzdGQ6OnN0cmluZwBzdGQ6OnUxNnN0cmluZwBzdGQ6OnUzMnN0cmluZwBzZXRQYWRkaW5nAGdldFBhZGRpbmcAZ2V0Q29tcHV0ZWRQYWRkaW5nAFRyaWVkIHRvIGNvbnN0cnVjdCBZR05vZGUgd2l0aCBudWxsIGNvbmZpZwBBdHRlbXB0aW5nIHRvIGNvbnN0cnVjdCBOb2RlIHdpdGggbnVsbCBjb25maWcAY3JlYXRlV2l0aENvbmZpZwBpbmYAc2V0QWxpZ25TZWxmAGdldEFsaWduU2VsZgBTaXplAHZhbHVlAFZhbHVlAGNyZWF0ZQBtZWFzdXJlAHNldFBvc2l0aW9uVHlwZQBnZXRQb3NpdGlvblR5cGUAaXNSZWZlcmVuY2VCYXNlbGluZQBzZXRJc1JlZmVyZW5jZUJhc2VsaW5lAGNvcHlTdHlsZQBkb3VibGUATm9kZQBleHRlbmQAaW5zZXJ0Q2hpbGQAZ2V0Q2hpbGQAcmVtb3ZlQ2hpbGQAdm9pZABzZXRFeHBlcmltZW50YWxGZWF0dXJlRW5hYmxlZABpc0V4cGVyaW1lbnRhbEZlYXR1cmVFbmFibGVkAGRpcnRpZWQAQ2Fubm90IHJlc2V0IGEgbm9kZSB3aGljaCBzdGlsbCBoYXMgY2hpbGRyZW4gYXR0YWNoZWQAdW5zZXRNZWFzdXJlRnVuYwB1bnNldERpcnRpZWRGdW5jAHNldEVycmF0YQBnZXRFcnJhdGEATWVhc3VyZSBmdW5jdGlvbiByZXR1cm5lZCBhbiBpbnZhbGlkIGRpbWVuc2lvbiB0byBZb2dhOiBbd2lkdGg9JWYsIGhlaWdodD0lZl0ARXhwZWN0IGN1c3RvbSBiYXNlbGluZSBmdW5jdGlvbiB0byBub3QgcmV0dXJuIE5hTgBOQU4ASU5GAGVtc2NyaXB0ZW46Om1lbW9yeV92aWV3PHNob3J0PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzx1bnNpZ25lZCBzaG9ydD4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8aW50PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzx1bnNpZ25lZCBpbnQ+AGVtc2NyaXB0ZW46Om1lbW9yeV92aWV3PGZsb2F0PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzx1aW50OF90PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzxpbnQ4X3Q+AGVtc2NyaXB0ZW46Om1lbW9yeV92aWV3PHVpbnQxNl90PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzxpbnQxNl90PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzx1aW50MzJfdD4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8aW50MzJfdD4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8Y2hhcj4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8dW5zaWduZWQgY2hhcj4Ac3RkOjpiYXNpY19zdHJpbmc8dW5zaWduZWQgY2hhcj4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8c2lnbmVk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";if(!ua(H)){var va=H;H=h.locateFile?h.locateFile(va,q):q+va}function wa(){var a=H;try{if(a==H&&w)return new Uint8Array(w);if(ua(a))try{var b2=xa(a.slice(37)),c=new Uint8Array(b2.length);for(a=0;a<b2.length;++a)c[a]=b2.charCodeAt(a);var d=c}catch(f){throw Error("Converting base64 string to bytes failed.")}else d=void 0;var e=d;if(e)return e;throw"both async and sync fetching of the wasm failed"}catch(f){x(f)}}function ya(){return w||typeof fetch!="function"?Promise.resolve().then(function(){return wa()}):fetch(H,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+H+"'";return a.arrayBuffer()}).catch(function(){return wa()})}function za(a){for(;0<a.length;)a.shift()(h)}function Aa(a){if(a===void 0)return"_unknown";a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b2=a.charCodeAt(0);return 48<=b2&&57>=b2?"_"+a:a}function Ba(a,b2){return a=Aa(a),function(){return b2.apply(this,arguments)}}var J=[{},{value:void 0},{value:null},{value:!0},{value:!1}],Ca=[];function Da(a){var b2=Error,c=Ba(a,function(d){this.name=a,this.message=d,d=Error(d).stack,d!==void 0&&(this.stack=this.toString()+`
3076
- `+d.replace(/^Error(:[^\n]*)?\n/,""))});return c.prototype=Object.create(b2.prototype),c.prototype.constructor=c,c.prototype.toString=function(){return this.message===void 0?this.name:this.name+": "+this.message},c}var K=void 0;function L(a){throw new K(a)}var M=(a)=>{return a||L("Cannot use deleted val. handle = "+a),J[a].value},Ea=(a)=>{switch(a){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var b2=Ca.length?Ca.pop():J.length;return J[b2]={ga:1,value:a},b2}},Fa=void 0,Ga=void 0;function N(a){for(var b2="";A[a];)b2+=Ga[A[a++]];return b2}var O=[];function Ha(){for(;O.length;){var a=O.pop();a.M.$=!1,a.delete()}}var P=void 0,Q={};function Ia(a,b2){for(b2===void 0&&L("ptr should not be undefined");a.R;)b2=a.ba(b2),a=a.R;return b2}var R={};function Ja(a){a=Ka(a);var b2=N(a);return S(a),b2}function La(a,b2){var c=R[a];return c===void 0&&L(b2+" has unknown type "+Ja(a)),c}function Ma(){}var Na=!1;function Oa(a){--a.count.value,a.count.value===0&&(a.T?a.U.W(a.T):a.P.N.W(a.O))}function Pa(a,b2,c){if(b2===c)return a;if(c.R===void 0)return null;return a=Pa(a,b2,c.R),a===null?null:c.na(a)}var Qa={};function Ra(a,b2){return b2=Ia(a,b2),Q[b2]}var Sa=void 0;function Ta(a){throw new Sa(a)}function Ua(a,b2){return b2.P&&b2.O||Ta("makeClassHandle requires ptr and ptrType"),!!b2.U!==!!b2.T&&Ta("Both smartPtrType and smartPtr must be specified"),b2.count={value:1},T(Object.create(a,{M:{value:b2}}))}function T(a){if(typeof FinalizationRegistry>"u")return T=(b2)=>b2,a;return Na=new FinalizationRegistry((b2)=>{Oa(b2.M)}),T=(b2)=>{var c=b2.M;return c.T&&Na.register(b2,{M:c},b2),b2},Ma=(b2)=>{Na.unregister(b2)},T(a)}var Va={};function Wa(a){for(;a.length;){var b2=a.pop();a.pop()(b2)}}function Xa(a){return this.fromWireType(D[a>>2])}var U={},Ya={};function V(a,b2,c){function d(k){k=c(k),k.length!==a.length&&Ta("Mismatched type converter count");for(var m=0;m<a.length;++m)W(a[m],k[m])}a.forEach(function(k){Ya[k]=b2});var e=Array(b2.length),f=[],g=0;b2.forEach((k,m)=>{R.hasOwnProperty(k)?e[m]=R[k]:(f.push(k),U.hasOwnProperty(k)||(U[k]=[]),U[k].push(()=>{e[m]=R[k],++g,g===f.length&&d(e)}))}),f.length===0&&d(e)}function Za(a){switch(a){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw TypeError("Unknown type size: "+a)}}function W(a,b2,c={}){if(!("argPackAdvance"in b2))throw TypeError("registerType registeredInstance requires argPackAdvance");var d=b2.name;if(a||L('type "'+d+'" must have a positive integer typeid pointer'),R.hasOwnProperty(a)){if(c.ua)return;L("Cannot register type '"+d+"' twice")}R[a]=b2,delete Ya[a],U.hasOwnProperty(a)&&(b2=U[a],delete U[a],b2.forEach((e)=>e()))}function $a(a){L(a.M.P.N.name+" instance already deleted")}function X(){}function ab(a,b2,c){if(a[b2].S===void 0){var d=a[b2];a[b2]=function(){return a[b2].S.hasOwnProperty(arguments.length)||L("Function '"+c+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+a[b2].S+")!"),a[b2].S[arguments.length].apply(this,arguments)},a[b2].S=[],a[b2].S[d.Z]=d}}function bb(a,b2){h.hasOwnProperty(a)?(L("Cannot register public name '"+a+"' twice"),ab(h,a,a),h.hasOwnProperty(void 0)&&L("Cannot register multiple overloads of a function with the same number of arguments (undefined)!"),h[a].S[void 0]=b2):h[a]=b2}function cb(a,b2,c,d,e,f,g,k){this.name=a,this.constructor=b2,this.X=c,this.W=d,this.R=e,this.pa=f,this.ba=g,this.na=k,this.ja=[]}function db(a,b2,c){for(;b2!==c;)b2.ba||L("Expected null or instance of "+c.name+", got an instance of "+b2.name),a=b2.ba(a),b2=b2.R;return a}function eb(a,b2){if(b2===null)return this.ea&&L("null is not a valid "+this.name),0;return b2.M||L('Cannot pass "'+fb(b2)+'" as a '+this.name),b2.M.O||L("Cannot pass deleted object as a pointer of type "+this.name),db(b2.M.O,b2.M.P.N,this.N)}function gb(a,b2){if(b2===null){if(this.ea&&L("null is not a valid "+this.name),this.da){var c=this.fa();return a!==null&&a.push(this.W,c),c}return 0}if(b2.M||L('Cannot pass "'+fb(b2)+'" as a '+this.name),b2.M.O||L("Cannot pass deleted object as a pointer of type "+this.name),!this.ca&&b2.M.P.ca&&L("Cannot convert argument of type "+(b2.M.U?b2.M.U.name:b2.M.P.name)+" to parameter type "+this.name),c=db(b2.M.O,b2.M.P.N,this.N),this.da)switch(b2.M.T===void 0&&L("Passing raw pointer to smart pointer is illegal"),this.Ba){case 0:b2.M.U===this?c=b2.M.T:L("Cannot convert argument of type "+(b2.M.U?b2.M.U.name:b2.M.P.name)+" to parameter type "+this.name);break;case 1:c=b2.M.T;break;case 2:if(b2.M.U===this)c=b2.M.T;else{var d=b2.clone();c=this.xa(c,Ea(function(){d.delete()})),a!==null&&a.push(this.W,c)}break;default:L("Unsupporting sharing policy")}return c}function hb(a,b2){if(b2===null)return this.ea&&L("null is not a valid "+this.name),0;return b2.M||L('Cannot pass "'+fb(b2)+'" as a '+this.name),b2.M.O||L("Cannot pass deleted object as a pointer of type "+this.name),b2.M.P.ca&&L("Cannot convert argument of type "+b2.M.P.name+" to parameter type "+this.name),db(b2.M.O,b2.M.P.N,this.N)}function Y(a,b2,c,d){this.name=a,this.N=b2,this.ea=c,this.ca=d,this.da=!1,this.W=this.xa=this.fa=this.ka=this.Ba=this.wa=void 0,b2.R!==void 0?this.toWireType=gb:(this.toWireType=d?eb:hb,this.V=null)}function ib(a,b2){h.hasOwnProperty(a)||Ta("Replacing nonexistant public symbol"),h[a]=b2,h[a].Z=void 0}function jb(a,b2){var c=[];return function(){if(c.length=0,Object.assign(c,arguments),a.includes("j")){var d=h["dynCall_"+a];d=c&&c.length?d.apply(null,[b2].concat(c)):d.call(null,b2)}else d=oa.get(b2).apply(null,c);return d}}function Z(a,b2){a=N(a);var c=a.includes("j")?jb(a,b2):oa.get(b2);return typeof c!="function"&&L("unknown function pointer with signature "+a+": "+b2),c}var mb=void 0;function nb(a,b2){function c(f){e[f]||R[f]||(Ya[f]?Ya[f].forEach(c):(d.push(f),e[f]=!0))}var d=[],e={};throw b2.forEach(c),new mb(a+": "+d.map(Ja).join([", "]))}function ob(a,b2,c,d,e){var f=b2.length;2>f&&L("argTypes array size mismatch! Must at least get return value and 'this' types!");var g=b2[1]!==null&&c!==null,k=!1;for(c=1;c<b2.length;++c)if(b2[c]!==null&&b2[c].V===void 0){k=!0;break}var m=b2[0].name!=="void",l=f-2,n=Array(l),p=[],r=[];return function(){if(arguments.length!==l&&L("function "+a+" called with "+arguments.length+" arguments, expected "+l+" args!"),r.length=0,p.length=g?2:1,p[0]=e,g){var u=b2[1].toWireType(r,this);p[1]=u}for(var t=0;t<l;++t)n[t]=b2[t+2].toWireType(r,arguments[t]),p.push(n[t]);if(t=d.apply(null,p),k)Wa(r);else for(var y=g?1:2;y<b2.length;y++){var B=y===1?u:n[y-2];b2[y].V!==null&&b2[y].V(B)}return u=m?b2[0].fromWireType(t):void 0,u}}function pb(a,b2){for(var c=[],d=0;d<a;d++)c.push(E[b2+4*d>>2]);return c}function qb(a){4<a&&--J[a].ga===0&&(J[a]=void 0,Ca.push(a))}function fb(a){if(a===null)return"null";var b2=typeof a;return b2==="object"||b2==="array"||b2==="function"?a.toString():""+a}function rb(a,b2){switch(b2){case 2:return function(c){return this.fromWireType(la[c>>2])};case 3:return function(c){return this.fromWireType(ma[c>>3])};default:throw TypeError("Unknown float type: "+a)}}function sb(a,b2,c){switch(b2){case 0:return c?function(d){return ja[d]}:function(d){return A[d]};case 1:return c?function(d){return C[d>>1]}:function(d){return ka[d>>1]};case 2:return c?function(d){return D[d>>2]}:function(d){return E[d>>2]};default:throw TypeError("Unknown integer type: "+a)}}function tb(a,b2){for(var c="",d=0;!(d>=b2/2);++d){var e=C[a+2*d>>1];if(e==0)break;c+=String.fromCharCode(e)}return c}function ub(a,b2,c){if(c===void 0&&(c=2147483647),2>c)return 0;c-=2;var d=b2;c=c<2*a.length?c/2:a.length;for(var e=0;e<c;++e)C[b2>>1]=a.charCodeAt(e),b2+=2;return C[b2>>1]=0,b2-d}function vb(a){return 2*a.length}function wb(a,b2){for(var c=0,d="";!(c>=b2/4);){var e=D[a+4*c>>2];if(e==0)break;++c,65536<=e?(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023)):d+=String.fromCharCode(e)}return d}function xb(a,b2,c){if(c===void 0&&(c=2147483647),4>c)return 0;var d=b2;c=d+c-4;for(var e=0;e<a.length;++e){var f=a.charCodeAt(e);if(55296<=f&&57343>=f){var g=a.charCodeAt(++e);f=65536+((f&1023)<<10)|g&1023}if(D[b2>>2]=f,b2+=4,b2+4>c)break}return D[b2>>2]=0,b2-d}function yb(a){for(var b2=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&++c,b2+=4}return b2}var zb={};function Ab(a){var b2=zb[a];return b2===void 0?N(a):b2}var Bb=[];function Cb(a){var b2=Bb.length;return Bb.push(a),b2}function Db(a,b2){for(var c=Array(a),d=0;d<a;++d)c[d]=La(E[b2+4*d>>2],"parameter "+d);return c}var Eb=[],Fb=[null,[],[]];K=h.BindingError=Da("BindingError"),h.count_emval_handles=function(){for(var a=0,b2=5;b2<J.length;++b2)J[b2]!==void 0&&++a;return a},h.get_first_emval=function(){for(var a=5;a<J.length;++a)if(J[a]!==void 0)return J[a];return null},Fa=h.PureVirtualError=Da("PureVirtualError");for(var Gb=Array(256),Hb=0;256>Hb;++Hb)Gb[Hb]=String.fromCharCode(Hb);Ga=Gb,h.getInheritedInstanceCount=function(){return Object.keys(Q).length},h.getLiveInheritedInstances=function(){var a=[],b2;for(b2 in Q)Q.hasOwnProperty(b2)&&a.push(Q[b2]);return a},h.flushPendingDeletes=Ha,h.setDelayFunction=function(a){P=a,O.length&&P&&P(Ha)},Sa=h.InternalError=Da("InternalError"),X.prototype.isAliasOf=function(a){if(!(this instanceof X&&a instanceof X))return!1;var b2=this.M.P.N,c=this.M.O,d=a.M.P.N;for(a=a.M.O;b2.R;)c=b2.ba(c),b2=b2.R;for(;d.R;)a=d.ba(a),d=d.R;return b2===d&&c===a},X.prototype.clone=function(){if(this.M.O||$a(this),this.M.aa)return this.M.count.value+=1,this;var a=T,b2=Object,c=b2.create,d=Object.getPrototypeOf(this),e=this.M;return a=a(c.call(b2,d,{M:{value:{count:e.count,$:e.$,aa:e.aa,O:e.O,P:e.P,T:e.T,U:e.U}}})),a.M.count.value+=1,a.M.$=!1,a},X.prototype.delete=function(){this.M.O||$a(this),this.M.$&&!this.M.aa&&L("Object already scheduled for deletion"),Ma(this),Oa(this.M),this.M.aa||(this.M.T=void 0,this.M.O=void 0)},X.prototype.isDeleted=function(){return!this.M.O},X.prototype.deleteLater=function(){return this.M.O||$a(this),this.M.$&&!this.M.aa&&L("Object already scheduled for deletion"),O.push(this),O.length===1&&P&&P(Ha),this.M.$=!0,this},Y.prototype.qa=function(a){return this.ka&&(a=this.ka(a)),a},Y.prototype.ha=function(a){this.W&&this.W(a)},Y.prototype.argPackAdvance=8,Y.prototype.readValueFromPointer=Xa,Y.prototype.deleteObject=function(a){if(a!==null)a.delete()},Y.prototype.fromWireType=function(a){function b2(){return this.da?Ua(this.N.X,{P:this.wa,O:c,U:this,T:a}):Ua(this.N.X,{P:this,O:a})}var c=this.qa(a);if(!c)return this.ha(a),null;var d=Ra(this.N,c);if(d!==void 0){if(d.M.count.value===0)return d.M.O=c,d.M.T=a,d.clone();return d=d.clone(),this.ha(a),d}if(d=this.N.pa(c),d=Qa[d],!d)return b2.call(this);d=this.ca?d.la:d.pointerType;var e=Pa(c,this.N,d.N);return e===null?b2.call(this):this.da?Ua(d.N.X,{P:d,O:e,U:this,T:a}):Ua(d.N.X,{P:d,O:e})},mb=h.UnboundTypeError=Da("UnboundTypeError");var xa=typeof atob=="function"?atob:function(a){var b2="",c=0;a=a.replace(/[^A-Za-z0-9\+\/=]/g,"");do{var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++)),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++)),f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++)),g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++));d=d<<2|e>>4,e=(e&15)<<4|f>>2;var k=(f&3)<<6|g;b2+=String.fromCharCode(d),f!==64&&(b2+=String.fromCharCode(e)),g!==64&&(b2+=String.fromCharCode(k))}while(c<a.length);return b2},Jb={l:function(a,b2,c,d){x("Assertion failed: "+(a?z(A,a):"")+", at: "+[b2?b2?z(A,b2):"":"unknown filename",c,d?d?z(A,d):"":"unknown function"])},q:function(a,b2,c){a=N(a),b2=La(b2,"wrapper"),c=M(c);var d=[].slice,e=b2.N,f=e.X,g=e.R.X,k=e.R.constructor;a=Ba(a,function(){e.R.ja.forEach(function(l){if(this[l]===g[l])throw new Fa("Pure virtual function "+l+" must be implemented in JavaScript")}.bind(this)),Object.defineProperty(this,"__parent",{value:f}),this.__construct.apply(this,d.call(arguments))}),f.__construct=function(){this===f&&L("Pass correct 'this' to __construct");var l=k.implement.apply(void 0,[this].concat(d.call(arguments)));Ma(l);var n=l.M;l.notifyOnDestruction(),n.aa=!0,Object.defineProperties(this,{M:{value:n}}),T(this),l=n.O,l=Ia(e,l),Q.hasOwnProperty(l)?L("Tried to register registered instance: "+l):Q[l]=this},f.__destruct=function(){this===f&&L("Pass correct 'this' to __destruct"),Ma(this);var l=this.M.O;l=Ia(e,l),Q.hasOwnProperty(l)?delete Q[l]:L("Tried to unregister unregistered instance: "+l)},a.prototype=Object.create(f);for(var m in c)a.prototype[m]=c[m];return Ea(a)},j:function(a){var b2=Va[a];delete Va[a];var{fa:c,W:d,ia:e}=b2,f=e.map((g)=>g.ta).concat(e.map((g)=>g.za));V([a],f,(g)=>{var k={};return e.forEach((m,l)=>{var n=g[l],p=m.ra,r=m.sa,u=g[l+e.length],t=m.ya,y=m.Aa;k[m.oa]={read:(B)=>n.fromWireType(p(r,B)),write:(B,ba)=>{var I=[];t(y,B,u.toWireType(I,ba)),Wa(I)}}}),[{name:b2.name,fromWireType:function(m){var l={},n;for(n in k)l[n]=k[n].read(m);return d(m),l},toWireType:function(m,l){for(var n in k)if(!(n in l))throw TypeError('Missing field: "'+n+'"');var p=c();for(n in k)k[n].write(p,l[n]);return m!==null&&m.push(d,p),p},argPackAdvance:8,readValueFromPointer:Xa,V:d}]})},v:function(){},B:function(a,b2,c,d,e){var f=Za(c);b2=N(b2),W(a,{name:b2,fromWireType:function(g){return!!g},toWireType:function(g,k){return k?d:e},argPackAdvance:8,readValueFromPointer:function(g){if(c===1)var k=ja;else if(c===2)k=C;else if(c===4)k=D;else throw TypeError("Unknown boolean type size: "+b2);return this.fromWireType(k[g>>f])},V:null})},f:function(a,b2,c,d,e,f,g,k,m,l,n,p,r){n=N(n),f=Z(e,f),k&&(k=Z(g,k)),l&&(l=Z(m,l)),r=Z(p,r);var u=Aa(n);bb(u,function(){nb("Cannot construct "+n+" due to unbound types",[d])}),V([a,b2,c],d?[d]:[],function(t){if(t=t[0],d)var y=t.N,B=y.X;else B=X.prototype;t=Ba(u,function(){if(Object.getPrototypeOf(this)!==ba)throw new K("Use 'new' to construct "+n);if(I.Y===void 0)throw new K(n+" has no accessible constructor");var kb=I.Y[arguments.length];if(kb===void 0)throw new K("Tried to invoke ctor of "+n+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(I.Y).toString()+") parameters instead!");return kb.apply(this,arguments)});var ba=Object.create(B,{constructor:{value:t}});t.prototype=ba;var I=new cb(n,t,ba,r,y,f,k,l);y=new Y(n,I,!0,!1),B=new Y(n+"*",I,!1,!1);var lb=new Y(n+" const*",I,!1,!0);return Qa[a]={pointerType:B,la:lb},ib(u,t),[y,B,lb]})},d:function(a,b2,c,d,e,f,g){var k=pb(c,d);b2=N(b2),f=Z(e,f),V([],[a],function(m){function l(){nb("Cannot call "+n+" due to unbound types",k)}m=m[0];var n=m.name+"."+b2;b2.startsWith("@@")&&(b2=Symbol[b2.substring(2)]);var p=m.N.constructor;return p[b2]===void 0?(l.Z=c-1,p[b2]=l):(ab(p,b2,n),p[b2].S[c-1]=l),V([],k,function(r){return r=ob(n,[r[0],null].concat(r.slice(1)),null,f,g),p[b2].S===void 0?(r.Z=c-1,p[b2]=r):p[b2].S[c-1]=r,[]}),[]})},p:function(a,b2,c,d,e,f){0<b2||x();var g=pb(b2,c);e=Z(d,e),V([],[a],function(k){k=k[0];var m="constructor "+k.name;if(k.N.Y===void 0&&(k.N.Y=[]),k.N.Y[b2-1]!==void 0)throw new K("Cannot register multiple constructors with identical number of parameters ("+(b2-1)+") for class '"+k.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return k.N.Y[b2-1]=()=>{nb("Cannot construct "+k.name+" due to unbound types",g)},V([],g,function(l){return l.splice(1,0,null),k.N.Y[b2-1]=ob(m,l,null,e,f),[]}),[]})},a:function(a,b2,c,d,e,f,g,k){var m=pb(c,d);b2=N(b2),f=Z(e,f),V([],[a],function(l){function n(){nb("Cannot call "+p+" due to unbound types",m)}l=l[0];var p=l.name+"."+b2;b2.startsWith("@@")&&(b2=Symbol[b2.substring(2)]),k&&l.N.ja.push(b2);var r=l.N.X,u=r[b2];return u===void 0||u.S===void 0&&u.className!==l.name&&u.Z===c-2?(n.Z=c-2,n.className=l.name,r[b2]=n):(ab(r,b2,p),r[b2].S[c-2]=n),V([],m,function(t){return t=ob(p,t,l,f,g),r[b2].S===void 0?(t.Z=c-2,r[b2]=t):r[b2].S[c-2]=t,[]}),[]})},A:function(a,b2){b2=N(b2),W(a,{name:b2,fromWireType:function(c){var d=M(c);return qb(c),d},toWireType:function(c,d){return Ea(d)},argPackAdvance:8,readValueFromPointer:Xa,V:null})},n:function(a,b2,c){c=Za(c),b2=N(b2),W(a,{name:b2,fromWireType:function(d){return d},toWireType:function(d,e){return e},argPackAdvance:8,readValueFromPointer:rb(b2,c),V:null})},e:function(a,b2,c,d,e){b2=N(b2),e===-1&&(e=4294967295),e=Za(c);var f=(k)=>k;if(d===0){var g=32-8*c;f=(k)=>k<<g>>>g}c=b2.includes("unsigned")?function(k,m){return m>>>0}:function(k,m){return m},W(a,{name:b2,fromWireType:f,toWireType:c,argPackAdvance:8,readValueFromPointer:sb(b2,e,d!==0),V:null})},b:function(a,b2,c){function d(f){f>>=2;var g=E;return new e(ia,g[f+1],g[f])}var e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][b2];c=N(c),W(a,{name:c,fromWireType:d,argPackAdvance:8,readValueFromPointer:d},{ua:!0})},o:function(a,b2){b2=N(b2);var c=b2==="std::string";W(a,{name:b2,fromWireType:function(d){var e=E[d>>2],f=d+4;if(c)for(var g=f,k=0;k<=e;++k){var m=f+k;if(k==e||A[m]==0){if(g=g?z(A,g,m-g):"",l===void 0)var l=g;else l+=String.fromCharCode(0),l+=g;g=m+1}}else{l=Array(e);for(k=0;k<e;++k)l[k]=String.fromCharCode(A[f+k]);l=l.join("")}return S(d),l},toWireType:function(d,e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var f,g=typeof e=="string";if(g||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||L("Cannot pass non-string to std::string"),c&&g){var k=0;for(f=0;f<e.length;++f){var m=e.charCodeAt(f);127>=m?k++:2047>=m?k+=2:55296<=m&&57343>=m?(k+=4,++f):k+=3}f=k}else f=e.length;if(k=Ib(4+f+1),m=k+4,E[k>>2]=f,c&&g){if(g=m,m=f+1,f=A,0<m){m=g+m-1;for(var l=0;l<e.length;++l){var n=e.charCodeAt(l);if(55296<=n&&57343>=n){var p=e.charCodeAt(++l);n=65536+((n&1023)<<10)|p&1023}if(127>=n){if(g>=m)break;f[g++]=n}else{if(2047>=n){if(g+1>=m)break;f[g++]=192|n>>6}else{if(65535>=n){if(g+2>=m)break;f[g++]=224|n>>12}else{if(g+3>=m)break;f[g++]=240|n>>18,f[g++]=128|n>>12&63}f[g++]=128|n>>6&63}f[g++]=128|n&63}}f[g]=0}}else if(g)for(g=0;g<f;++g)l=e.charCodeAt(g),255<l&&(S(m),L("String has UTF-16 code units that do not fit in 8 bits")),A[m+g]=l;else for(g=0;g<f;++g)A[m+g]=e[g];return d!==null&&d.push(S,k),k},argPackAdvance:8,readValueFromPointer:Xa,V:function(d){S(d)}})},i:function(a,b2,c){if(c=N(c),b2===2)var d=tb,e=ub,f=vb,g=()=>ka,k=1;else b2===4&&(d=wb,e=xb,f=yb,g=()=>E,k=2);W(a,{name:c,fromWireType:function(m){for(var l=E[m>>2],n=g(),p,r=m+4,u=0;u<=l;++u){var t=m+4+u*b2;if(u==l||n[t>>k]==0)r=d(r,t-r),p===void 0?p=r:(p+=String.fromCharCode(0),p+=r),r=t+b2}return S(m),p},toWireType:function(m,l){typeof l!="string"&&L("Cannot pass non-string to C++ string type "+c);var n=f(l),p=Ib(4+n+b2);return E[p>>2]=n>>k,e(l,p+4,n+b2),m!==null&&m.push(S,p),p},argPackAdvance:8,readValueFromPointer:Xa,V:function(m){S(m)}})},k:function(a,b2,c,d,e,f){Va[a]={name:N(b2),fa:Z(c,d),W:Z(e,f),ia:[]}},h:function(a,b2,c,d,e,f,g,k,m,l){Va[a].ia.push({oa:N(b2),ta:c,ra:Z(d,e),sa:f,za:g,ya:Z(k,m),Aa:l})},C:function(a,b2){b2=N(b2),W(a,{va:!0,name:b2,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},s:function(a,b2,c,d,e){a=Bb[a],b2=M(b2),c=Ab(c);var f=[];return E[d>>2]=Ea(f),a(b2,c,f,e)},t:function(a,b2,c,d){a=Bb[a],b2=M(b2),c=Ab(c),a(b2,c,null,d)},g:qb,m:function(a,b2){var c=Db(a,b2),d=c[0];b2=d.name+"_$"+c.slice(1).map(function(g){return g.name}).join("_")+"$";var e=Eb[b2];if(e!==void 0)return e;var f=Array(a-1);return e=Cb((g,k,m,l)=>{for(var n=0,p=0;p<a-1;++p)f[p]=c[p+1].readValueFromPointer(l+n),n+=c[p+1].argPackAdvance;g=g[k].apply(g,f);for(p=0;p<a-1;++p)c[p+1].ma&&c[p+1].ma(f[p]);if(!d.va)return d.toWireType(m,g)}),Eb[b2]=e},D:function(a){4<a&&(J[a].ga+=1)},r:function(a){var b2=M(a);Wa(b2),qb(a)},c:function(){x("")},x:function(a,b2,c){A.copyWithin(a,b2,b2+c)},w:function(a){var b2=A.length;if(a>>>=0,2147483648<a)return!1;for(var c=1;4>=c;c*=2){var d=b2*(1+0.2/c);d=Math.min(d,a+100663296);var e=Math;d=Math.max(a,d),e=e.min.call(e,2147483648,d+(65536-d%65536)%65536);a:{try{fa.grow(e-ia.byteLength+65535>>>16),na();var f=1;break a}catch(g){}f=void 0}if(f)return!0}return!1},z:function(){return 52},u:function(){return 70},y:function(a,b2,c,d){for(var e=0,f=0;f<c;f++){var g=E[b2>>2],k=E[b2+4>>2];b2+=8;for(var m=0;m<k;m++){var l=A[g+m],n=Fb[a];l===0||l===10?((a===1?ea:v)(z(n,0)),n.length=0):n.push(l)}e+=k}return E[d>>2]=e,0}};(function(){function a(e){h.asm=e.exports,fa=h.asm.E,na(),oa=h.asm.J,qa.unshift(h.asm.F),F--,h.monitorRunDependencies&&h.monitorRunDependencies(F),F==0&&(ta!==null&&(clearInterval(ta),ta=null),G&&(e=G,G=null,e()))}function b2(e){a(e.instance)}function c(e){return ya().then(function(f){return WebAssembly.instantiate(f,d)}).then(function(f){return f}).then(e,function(f){v("failed to asynchronously prepare wasm: "+f),x(f)})}var d={a:Jb};if(F++,h.monitorRunDependencies&&h.monitorRunDependencies(F),h.instantiateWasm)try{return h.instantiateWasm(d,a)}catch(e){v("Module.instantiateWasm callback failed with error: "+e),ca(e)}return function(){return w||typeof WebAssembly.instantiateStreaming!="function"||ua(H)||typeof fetch!="function"?c(b2):fetch(H,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,d).then(b2,function(f){return v("wasm streaming compile failed: "+f),v("falling back to ArrayBuffer instantiation"),c(b2)})})}().catch(ca),{}})(),h.___wasm_call_ctors=function(){return(h.___wasm_call_ctors=h.asm.F).apply(null,arguments)};var Ka=h.___getTypeName=function(){return(Ka=h.___getTypeName=h.asm.G).apply(null,arguments)};h.__embind_initialize_bindings=function(){return(h.__embind_initialize_bindings=h.asm.H).apply(null,arguments)};var Ib=h._malloc=function(){return(Ib=h._malloc=h.asm.I).apply(null,arguments)},S=h._free=function(){return(S=h._free=h.asm.K).apply(null,arguments)};h.dynCall_jiji=function(){return(h.dynCall_jiji=h.asm.L).apply(null,arguments)};var Kb;G=function Lb(){Kb||Mb(),Kb||(G=Lb)};function Mb(){function a(){if(!Kb&&(Kb=!0,h.calledRun=!0,!ha)){if(za(qa),aa(h),h.onRuntimeInitialized)h.onRuntimeInitialized();if(h.postRun)for(typeof h.postRun=="function"&&(h.postRun=[h.postRun]);h.postRun.length;){var b2=h.postRun.shift();ra.unshift(b2)}za(ra)}}if(!(0<F)){if(h.preRun)for(typeof h.preRun=="function"&&(h.preRun=[h.preRun]);h.preRun.length;)sa();za(pa),0<F||(h.setStatus?(h.setStatus("Running..."),setTimeout(function(){setTimeout(function(){h.setStatus("")},1),a()},1)):a())}}if(h.preInit)for(typeof h.preInit=="function"&&(h.preInit=[h.preInit]);0<h.preInit.length;)h.preInit.pop()();return Mb(),loadYoga2.ready}})(),yoga_wasm_base64_esm_default=loadYoga,Align=function(Align2){return Align2[Align2.Auto=0]="Auto",Align2[Align2.FlexStart=1]="FlexStart",Align2[Align2.Center=2]="Center",Align2[Align2.FlexEnd=3]="FlexEnd",Align2[Align2.Stretch=4]="Stretch",Align2[Align2.Baseline=5]="Baseline",Align2[Align2.SpaceBetween=6]="SpaceBetween",Align2[Align2.SpaceAround=7]="SpaceAround",Align2[Align2.SpaceEvenly=8]="SpaceEvenly",Align2}({}),BoxSizing=function(BoxSizing2){return BoxSizing2[BoxSizing2.BorderBox=0]="BorderBox",BoxSizing2[BoxSizing2.ContentBox=1]="ContentBox",BoxSizing2}({}),Dimension=function(Dimension2){return Dimension2[Dimension2.Width=0]="Width",Dimension2[Dimension2.Height=1]="Height",Dimension2}({}),Direction=function(Direction2){return Direction2[Direction2.Inherit=0]="Inherit",Direction2[Direction2.LTR=1]="LTR",Direction2[Direction2.RTL=2]="RTL",Direction2}({}),Display=function(Display2){return Display2[Display2.Flex=0]="Flex",Display2[Display2.None=1]="None",Display2[Display2.Contents=2]="Contents",Display2}({}),Edge=function(Edge2){return Edge2[Edge2.Left=0]="Left",Edge2[Edge2.Top=1]="Top",Edge2[Edge2.Right=2]="Right",Edge2[Edge2.Bottom=3]="Bottom",Edge2[Edge2.Start=4]="Start",Edge2[Edge2.End=5]="End",Edge2[Edge2.Horizontal=6]="Horizontal",Edge2[Edge2.Vertical=7]="Vertical",Edge2[Edge2.All=8]="All",Edge2}({}),Errata=function(Errata2){return Errata2[Errata2.None=0]="None",Errata2[Errata2.StretchFlexBasis=1]="StretchFlexBasis",Errata2[Errata2.AbsolutePositionWithoutInsetsExcludesPadding=2]="AbsolutePositionWithoutInsetsExcludesPadding",Errata2[Errata2.AbsolutePercentAgainstInnerSize=4]="AbsolutePercentAgainstInnerSize",Errata2[Errata2.All=2147483647]="All",Errata2[Errata2.Classic=2147483646]="Classic",Errata2}({}),ExperimentalFeature=function(ExperimentalFeature2){return ExperimentalFeature2[ExperimentalFeature2.WebFlexBasis=0]="WebFlexBasis",ExperimentalFeature2}({}),FlexDirection=function(FlexDirection2){return FlexDirection2[FlexDirection2.Column=0]="Column",FlexDirection2[FlexDirection2.ColumnReverse=1]="ColumnReverse",FlexDirection2[FlexDirection2.Row=2]="Row",FlexDirection2[FlexDirection2.RowReverse=3]="RowReverse",FlexDirection2}({}),Gutter=function(Gutter2){return Gutter2[Gutter2.Column=0]="Column",Gutter2[Gutter2.Row=1]="Row",Gutter2[Gutter2.All=2]="All",Gutter2}({}),Justify=function(Justify2){return Justify2[Justify2.FlexStart=0]="FlexStart",Justify2[Justify2.Center=1]="Center",Justify2[Justify2.FlexEnd=2]="FlexEnd",Justify2[Justify2.SpaceBetween=3]="SpaceBetween",Justify2[Justify2.SpaceAround=4]="SpaceAround",Justify2[Justify2.SpaceEvenly=5]="SpaceEvenly",Justify2}({}),LogLevel=function(LogLevel2){return LogLevel2[LogLevel2.Error=0]="Error",LogLevel2[LogLevel2.Warn=1]="Warn",LogLevel2[LogLevel2.Info=2]="Info",LogLevel2[LogLevel2.Debug=3]="Debug",LogLevel2[LogLevel2.Verbose=4]="Verbose",LogLevel2[LogLevel2.Fatal=5]="Fatal",LogLevel2}({}),MeasureMode=function(MeasureMode2){return MeasureMode2[MeasureMode2.Undefined=0]="Undefined",MeasureMode2[MeasureMode2.Exactly=1]="Exactly",MeasureMode2[MeasureMode2.AtMost=2]="AtMost",MeasureMode2}({}),NodeType=function(NodeType2){return NodeType2[NodeType2.Default=0]="Default",NodeType2[NodeType2.Text=1]="Text",NodeType2}({}),Overflow=function(Overflow2){return Overflow2[Overflow2.Visible=0]="Visible",Overflow2[Overflow2.Hidden=1]="Hidden",Overflow2[Overflow2.Scroll=2]="Scroll",Overflow2}({}),PositionType=function(PositionType2){return PositionType2[PositionType2.Static=0]="Static",PositionType2[PositionType2.Relative=1]="Relative",PositionType2[PositionType2.Absolute=2]="Absolute",PositionType2}({}),Unit=function(Unit2){return Unit2[Unit2.Undefined=0]="Undefined",Unit2[Unit2.Point=1]="Point",Unit2[Unit2.Percent=2]="Percent",Unit2[Unit2.Auto=3]="Auto",Unit2}({}),Wrap=function(Wrap2){return Wrap2[Wrap2.NoWrap=0]="NoWrap",Wrap2[Wrap2.Wrap=1]="Wrap",Wrap2[Wrap2.WrapReverse=2]="WrapReverse",Wrap2}({}),constants={ALIGN_AUTO:Align.Auto,ALIGN_FLEX_START:Align.FlexStart,ALIGN_CENTER:Align.Center,ALIGN_FLEX_END:Align.FlexEnd,ALIGN_STRETCH:Align.Stretch,ALIGN_BASELINE:Align.Baseline,ALIGN_SPACE_BETWEEN:Align.SpaceBetween,ALIGN_SPACE_AROUND:Align.SpaceAround,ALIGN_SPACE_EVENLY:Align.SpaceEvenly,BOX_SIZING_BORDER_BOX:BoxSizing.BorderBox,BOX_SIZING_CONTENT_BOX:BoxSizing.ContentBox,DIMENSION_WIDTH:Dimension.Width,DIMENSION_HEIGHT:Dimension.Height,DIRECTION_INHERIT:Direction.Inherit,DIRECTION_LTR:Direction.LTR,DIRECTION_RTL:Direction.RTL,DISPLAY_FLEX:Display.Flex,DISPLAY_NONE:Display.None,DISPLAY_CONTENTS:Display.Contents,EDGE_LEFT:Edge.Left,EDGE_TOP:Edge.Top,EDGE_RIGHT:Edge.Right,EDGE_BOTTOM:Edge.Bottom,EDGE_START:Edge.Start,EDGE_END:Edge.End,EDGE_HORIZONTAL:Edge.Horizontal,EDGE_VERTICAL:Edge.Vertical,EDGE_ALL:Edge.All,ERRATA_NONE:Errata.None,ERRATA_STRETCH_FLEX_BASIS:Errata.StretchFlexBasis,ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING:Errata.AbsolutePositionWithoutInsetsExcludesPadding,ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE:Errata.AbsolutePercentAgainstInnerSize,ERRATA_ALL:Errata.All,ERRATA_CLASSIC:Errata.Classic,EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS:ExperimentalFeature.WebFlexBasis,FLEX_DIRECTION_COLUMN:FlexDirection.Column,FLEX_DIRECTION_COLUMN_REVERSE:FlexDirection.ColumnReverse,FLEX_DIRECTION_ROW:FlexDirection.Row,FLEX_DIRECTION_ROW_REVERSE:FlexDirection.RowReverse,GUTTER_COLUMN:Gutter.Column,GUTTER_ROW:Gutter.Row,GUTTER_ALL:Gutter.All,JUSTIFY_FLEX_START:Justify.FlexStart,JUSTIFY_CENTER:Justify.Center,JUSTIFY_FLEX_END:Justify.FlexEnd,JUSTIFY_SPACE_BETWEEN:Justify.SpaceBetween,JUSTIFY_SPACE_AROUND:Justify.SpaceAround,JUSTIFY_SPACE_EVENLY:Justify.SpaceEvenly,LOG_LEVEL_ERROR:LogLevel.Error,LOG_LEVEL_WARN:LogLevel.Warn,LOG_LEVEL_INFO:LogLevel.Info,LOG_LEVEL_DEBUG:LogLevel.Debug,LOG_LEVEL_VERBOSE:LogLevel.Verbose,LOG_LEVEL_FATAL:LogLevel.Fatal,MEASURE_MODE_UNDEFINED:MeasureMode.Undefined,MEASURE_MODE_EXACTLY:MeasureMode.Exactly,MEASURE_MODE_AT_MOST:MeasureMode.AtMost,NODE_TYPE_DEFAULT:NodeType.Default,NODE_TYPE_TEXT:NodeType.Text,OVERFLOW_VISIBLE:Overflow.Visible,OVERFLOW_HIDDEN:Overflow.Hidden,OVERFLOW_SCROLL:Overflow.Scroll,POSITION_TYPE_STATIC:PositionType.Static,POSITION_TYPE_RELATIVE:PositionType.Relative,POSITION_TYPE_ABSOLUTE:PositionType.Absolute,UNIT_UNDEFINED:Unit.Undefined,UNIT_POINT:Unit.Point,UNIT_PERCENT:Unit.Percent,UNIT_AUTO:Unit.Auto,WRAP_NO_WRAP:Wrap.NoWrap,WRAP_WRAP:Wrap.Wrap,WRAP_WRAP_REVERSE:Wrap.WrapReverse},YGEnums_default=constants;Yoga=wrapAssembly(await yoga_wasm_base64_esm_default()),src_default2=Yoga,VALID_BORDER_STYLES=["single","double","rounded","heavy"];BorderChars={single:{topLeft:"\u250C",topRight:"\u2510",bottomLeft:"\u2514",bottomRight:"\u2518",horizontal:"\u2500",vertical:"\u2502",topT:"\u252C",bottomT:"\u2534",leftT:"\u251C",rightT:"\u2524",cross:"\u253C"},double:{topLeft:"\u2554",topRight:"\u2557",bottomLeft:"\u255A",bottomRight:"\u255D",horizontal:"\u2550",vertical:"\u2551",topT:"\u2566",bottomT:"\u2569",leftT:"\u2560",rightT:"\u2563",cross:"\u256C"},rounded:{topLeft:"\u256D",topRight:"\u256E",bottomLeft:"\u2570",bottomRight:"\u256F",horizontal:"\u2500",vertical:"\u2502",topT:"\u252C",bottomT:"\u2534",leftT:"\u251C",rightT:"\u2524",cross:"\u253C"},heavy:{topLeft:"\u250F",topRight:"\u2513",bottomLeft:"\u2517",bottomRight:"\u251B",horizontal:"\u2501",vertical:"\u2503",topT:"\u2533",bottomT:"\u253B",leftT:"\u2523",rightT:"\u252B",cross:"\u254B"}};BorderCharArrays={single:borderCharsToArray(BorderChars.single),double:borderCharsToArray(BorderChars.double),rounded:borderCharsToArray(BorderChars.rounded),heavy:borderCharsToArray(BorderChars.heavy)};KeyHandler=class KeyHandler extends EventEmitter2{processParsedKey(parsedKey){try{switch(parsedKey.eventType){case"press":this.emit("keypress",new KeyEvent(parsedKey));break;case"release":this.emit("keyrelease",new KeyEvent(parsedKey));break;default:this.emit("keypress",new KeyEvent(parsedKey));break}}catch(error2){return console.error("[KeyHandler] Error processing parsed key:",error2),!0}return!0}processPaste(bytes,metadata){try{this.emit("paste",new PasteEvent(bytes,metadata))}catch(error2){console.error("[KeyHandler] Error processing paste:",error2)}}};InternalKeyHandler=class InternalKeyHandler extends KeyHandler{renderableHandlers=new Map;emit(event,...args){return this.emitWithPriority(event,...args)}emitWithPriority(event,...args){let hasGlobalListeners=!1,globalListeners=this.listeners(event);if(globalListeners.length>0){hasGlobalListeners=!0;for(let listener of globalListeners){try{listener(...args)}catch(error2){console.error(`[KeyHandler] Error in global ${event} handler:`,error2)}if(event==="keypress"||event==="keyrelease"||event==="paste"){if(args[0].propagationStopped)return hasGlobalListeners}}}let renderableSet=this.renderableHandlers.get(event),renderableHandlers=renderableSet&&renderableSet.size>0?[...renderableSet]:[],hasRenderableListeners=!1;if(renderableSet&&renderableSet.size>0){if(hasRenderableListeners=!0,event==="keypress"||event==="keyrelease"||event==="paste"){let keyEvent=args[0];if(keyEvent.defaultPrevented)return hasGlobalListeners||hasRenderableListeners;if(keyEvent.propagationStopped)return hasGlobalListeners||hasRenderableListeners}for(let handler of renderableHandlers){try{handler(...args)}catch(error2){console.error(`[KeyHandler] Error in renderable ${event} handler:`,error2)}if(event==="keypress"||event==="keyrelease"||event==="paste"){if(args[0].propagationStopped)return hasGlobalListeners||hasRenderableListeners}}}return hasGlobalListeners||hasRenderableListeners}onInternal(event,handler){if(!this.renderableHandlers.has(event))this.renderableHandlers.set(event,new Set);this.renderableHandlers.get(event).add(handler)}offInternal(event,handler){let handlers2=this.renderableHandlers.get(event);if(handlers2)handlers2.delete(handler)}};DEFAULT_FOREGROUND_RGB=[255,255,255],DEFAULT_BACKGROUND_RGB=[0,0,0],ANSI16_RGB=[[0,0,0],[128,0,0],[0,128,0],[128,128,0],[0,0,128],[128,0,128],[0,128,128],[192,192,192],[128,128,128],[255,0,0],[0,255,0],[255,255,0],[0,0,255],[255,0,255],[0,255,255],[255,255,255]],ANSI_256_CUBE_LEVELS=[0,95,135,175,215,255];CSS_COLOR_NAMES={black:"#000000",white:"#FFFFFF",red:"#FF0000",green:"#008000",blue:"#0000FF",yellow:"#FFFF00",cyan:"#00FFFF",magenta:"#FF00FF",silver:"#C0C0C0",gray:"#808080",grey:"#808080",maroon:"#800000",olive:"#808000",lime:"#00FF00",aqua:"#00FFFF",teal:"#008080",navy:"#000080",fuchsia:"#FF00FF",purple:"#800080",orange:"#FFA500",brightblack:"#666666",brightred:"#FF6666",brightgreen:"#66FF66",brightblue:"#6666FF",brightyellow:"#FFFF66",brightcyan:"#66FFFF",brightmagenta:"#FF66FF",brightwhite:"#FFFFFF"};block_default={name:"block",version:"0.2.0",homepage:"https://github.com/dominikwilkowski/cfonts",colors:2,lines:6,buffer:["","","","","",""],letterspace:[" "," "," "," "," "," "],letterspace_size:1,chars:{A:[" <c1>\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2> ","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A\u2550\u255D \u255A\u2550\u255D</c2>"],B:["<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u2550\u255D </c2>"],C:[" <c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550\u2550\u255D</c2>","<c1>\u2588\u2588</c1><c2>\u2551 </c2>","<c1>\u2588\u2588</c1><c2>\u2551 </c2>","<c2>\u255A</c2><c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2> \u255A\u2550\u2550\u2550\u2550\u2550\u255D</c2>"],D:["<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u2550\u255D </c2>"],E:["<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550\u2550\u255D</c2>","<c1>\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u255D </c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D</c2>"],F:["<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550\u2550\u255D</c2>","<c1>\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u255D </c2>","<c1>\u2588\u2588</c1><c2>\u2551 </c2>","<c2>\u255A\u2550\u255D </c2>"],G:[" <c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550\u2550\u255D </c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A</c2><c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A\u2550\u2550\u2550\u2550\u2550\u255D </c2>"],H:["<c1>\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A\u2550\u255D \u255A\u2550\u255D</c2>"],I:["<c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A\u2550\u255D</c2>"],J:["<c1> \u2588\u2588</c1><c2>\u2557</c2>","<c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588 \u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A</c2><c1>\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A\u2550\u2550\u2550\u2550\u255D </c2>"],K:["<c1>\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2554\u255D</c2>","<c1>\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u255D \u255A\u2550\u255D</c2>"],L:["<c1>\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2551 </c2>","<c1>\u2588\u2588</c1><c2>\u2551 </c2>","<c1>\u2588\u2588</c1><c2>\u2551 </c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D</c2>"],M:["<c1>\u2588\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2554</c2><c1>\u2588\u2588\u2588\u2588</c1><c2>\u2554</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551\u255A</c2><c1>\u2588\u2588</c1><c2>\u2554\u255D</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551 \u255A\u2550\u255D</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A\u2550\u255D \u255A\u2550\u255D</c2>"],N:["<c1>\u2588\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2554</c2><c1>\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551\u255A</c2><c1>\u2588\u2588</c1><c2>\u2557</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551 \u255A</c2><c1>\u2588\u2588\u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D</c2>"],O:[" <c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A</c2><c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A\u2550\u2550\u2550\u2550\u2550\u255D </c2>"],P:["<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550\u255D </c2>","<c1>\u2588\u2588</c1><c2>\u2551 </c2>","<c2>\u255A\u2550\u255D </c2>"],Q:[" <c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1>\u2584\u2584 \u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A</c2><c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A\u2550\u2550</c2><c1>\u2580\u2580</c1><c2>\u2550\u255D </c2>"],R:["<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A\u2550\u255D \u255A\u2550\u255D</c2>"],S:["<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550\u2550\u255D</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D</c2>"],T:["<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u255D</c2>","<c1> \u2588\u2588</c1><c2>\u2551 </c2>","<c1> \u2588\u2588</c1><c2>\u2551 </c2>","<c1> \u2588\u2588</c1><c2>\u2551 </c2>","<c2> \u255A\u2550\u255D </c2>"],U:["<c1>\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A</c2><c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A\u2550\u2550\u2550\u2550\u2550\u255D </c2>"],V:["<c1>\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A</c2><c1>\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A</c2><c1>\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D </c2>","<c2> \u255A\u2550\u2550\u2550\u255D </c2>"],W:["<c1>\u2588\u2588</c1><c2>\u2557 </c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551 </c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1>\u2588\u2588\u2588</c1><c2>\u2557</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A</c2><c1>\u2588\u2588\u2588</c1><c2>\u2554</c2><c1>\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A\u2550\u2550\u255D\u255A\u2550\u2550\u255D </c2>"],X:["<c1>\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A</c2><c1>\u2588\u2588</c1><c2>\u2557</c2><c1>\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A</c2><c1>\u2588\u2588\u2588</c1><c2>\u2554\u255D </c2>"," <c1>\u2588\u2588</c1><c2>\u2554</c2><c1>\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u255D</c2><c1> \u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u255D \u255A\u2550\u255D</c2>"],Y:["<c1>\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A</c2><c1>\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A</c2><c1>\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D </c2>","<c2> \u255A</c2><c1>\u2588\u2588</c1><c2>\u2554\u255D </c2>","<c1> \u2588\u2588</c1><c2>\u2551 </c2>","<c2> \u255A\u2550\u255D </c2>"],Z:["<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550</c2><c1>\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c1> \u2588\u2588\u2588</c1><c2>\u2554\u255D </c2>"," <c1>\u2588\u2588\u2588</c1><c2>\u2554\u255D </c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D</c2>"],"0":[" <c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550</c2><c1>\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1>\u2588\u2588</c1><c2>\u2554</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A</c2><c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A\u2550\u2550\u2550\u2550\u2550\u255D </c2>"],"1":[" <c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>"," <c1>\u2588\u2588</c1><c2>\u2551</c2>"," <c1>\u2588\u2588</c1><c2>\u2551</c2>","<c2> \u255A\u2550\u255D</c2>"],"2":["<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c2>\u255A\u2550\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>"," <c1>\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550\u255D </c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D</c2>"],"3":["<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c2>\u255A\u2550\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>"," <c1>\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u2550\u255D </c2>"],"4":["<c1>\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A\u2550\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1> \u2588\u2588</c1><c2>\u2551</c2>","<c2> \u255A\u2550\u255D</c2>"],"5":["<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550\u2550\u255D</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D</c2>"],"6":[" <c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550\u2550\u255D </c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A</c2><c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A\u2550\u2550\u2550\u2550\u2550\u255D </c2>"],"7":["<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1> \u2588\u2588</c1><c2>\u2554\u255D</c2>","<c1> \u2588\u2588</c1><c2>\u2554\u255D </c2>","<c1> \u2588\u2588</c1><c2>\u2551 </c2>","<c2> \u255A\u2550\u255D </c2>"],"8":[" <c1>\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A</c2><c1>\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A</c2><c1>\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A\u2550\u2550\u2550\u2550\u255D </c2>"],"9":[" <c1>\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A</c2><c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2551</c2>","<c2> \u255A\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>"," <c1>\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A\u2550\u2550\u2550\u2550\u255D </c2>"],"!":["<c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A\u2550\u255D</c2>","<c1>\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u255D</c2>"],"?":["<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c2>\u255A\u2550\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1> \u2584\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c1> \u2580\u2580</c1><c2>\u2550\u2550\u255D </c2>","<c1> \u2588\u2588</c1><c2>\u2557 </c2>","<c2> \u255A\u2550\u255D </c2>"],".":[" "," "," "," ","<c1>\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u255D</c2>"],"+":[" ","<c1> \u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2> \u255A</c2><c1>\u2588\u2588</c1><c2>\u2554\u2550\u255D</c2>","<c2> \u255A\u2550\u255D </c2>"," "],"-":[" "," ","<c1>\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u255D</c2>"," "," "],_:[" "," "," "," ","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D</c2>"],"=":[" ","<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u2550\u255D</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u2550\u255D</c2>"," "],"@":[" <c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1>\u2588\u2588</c1><c2>\u2557</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1>\u2588\u2588</c1><c2>\u2551</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A</c2><c1>\u2588</c1><c2>\u2551</c2><c1>\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A\u255D\u255A\u2550\u2550\u2550\u255D </c2>"],"#":[" <c1>\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A</c2><c1>\u2588\u2588</c1><c2>\u2554\u2550</c2><c1>\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A</c2><c1>\u2588\u2588</c1><c2>\u2554\u2550</c2><c1>\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A\u2550\u255D \u255A\u2550\u255D </c2>"],$:["<c1>\u2584\u2584\u2588\u2588\u2588\u2584\u2584</c1><c2>\xB7</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550\u2550\u255D</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A\u2550</c2><c1>\u2580\u2580\u2580</c1><c2>\u2550\u2550\u255D</c2>"],"%":["<c1>\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u255D</c2><c1>\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c1> \u2588\u2588</c1><c2>\u2554\u255D </c2>"," <c1>\u2588\u2588</c1><c2>\u2554\u255D </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u255D</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u255D \u255A\u2550\u255D</c2>"],"&":["<c1> \u2588\u2588</c1><c2>\u2557 </c2>","<c1> \u2588\u2588</c1><c2>\u2551 </c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550</c2><c1>\u2588\u2588</c1><c2>\u2554\u2550\u255D</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2551 </c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u2550\u255D </c2>"],"(":[" <c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c1>\u2588\u2588</c1><c2>\u2551 ","<c1>\u2588\u2588</c1><c2>\u2551 ","<c2>\u255A</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c2> \u255A\u2550\u255D</c2>"],")":["<c1>\u2588\u2588</c1><c2>\u2557 </c2>","<c2>\u255A</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>"," <c1>\u2588\u2588</c1><c2>\u2551</c2>"," <c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2>\u255A\u2550\u255D </c2>"],"/":["<c1> \u2588\u2588</c1><c2>\u2557</c2>","<c1> \u2588\u2588</c1><c2>\u2554\u255D</c2>","<c1> \u2588\u2588</c1><c2>\u2554\u255D </c2>"," <c1>\u2588\u2588</c1><c2>\u2554\u255D </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u255D </c2>","<c2>\u255A\u2550\u255D </c2>"],":":[" ","<c1>\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u255D</c2>","<c1>\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u255D</c2>"," "],";":[" "," ","<c1>\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u255D</c2>","<c1>\u2584\u2588</c1><c2>\u2557</c2>","<c1>\u2580</c1><c2>\u2550\u255D</c2>"],",":[" "," "," "," ","<c1>\u2584\u2588</c1><c2>\u2557</c2>","<c1>\u2580</c1><c2>\u2550\u255D</c2>"],"'":["<c1>\u2588</c1><c2>\u2557</c2> ","<c2>\u255A\u255D</c2> "," "," "," "," "],'"':["<c1>\u2588</c1><c2>\u2557</c2><c1>\u2588</c1><c2>\u2557</c2> ","<c2>\u255A\u255D\u255A\u255D</c2> "," "," "," "," "]," ":[" "," "," "," "," "," "]}},shade_default={name:"shade",version:"0.2.0",homepage:"https://github.com/dominikwilkowski/cfonts",colors:2,lines:8,buffer:["","","","","","","",""],letterspace:["<c2>\u2591</c2>","<c2>\u2591</c2>","<c2>\u2591</c2>","<c2>\u2591</c2>","<c2>\u2591</c2>","<c2>\u2591</c2>","<c2>\u2591</c2>","<c2>\u2591</c2>"],letterspace_size:1,chars:{A:["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588 \u2588</c1>","<c1>\u2588\u2588\u2588\u2588</c1>","<c1>\u2588 \u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>"," <c2>\u2591\u2591</c2> ","<c2>\u2591\u2591\u2591\u2591</c2>"],B:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588 \u2588</c1>","<c1>\u2588\u2588\u2588</c1> ","<c1>\u2588 \u2588</c1>","<c1>\u2588\u2588\u2588</c1> "," <c2>\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],C:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>","<c1>\u2588</c1> ","<c1>\u2588</c1><c2>\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>"," ","<c2>\u2591\u2591\u2591\u2591</c2>"],D:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588 \u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588\u2588\u2588</c1> "," <c2>\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],E:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>","<c1>\u2588</c1> ","<c1>\u2588\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588</c1> <c2>\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>"," ","<c2>\u2591\u2591\u2591\u2591</c2>"],F:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>","<c1>\u2588</c1> ","<c1>\u2588\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588</c1> <c2>\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591\u2591</c2>"," <c2>\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],G:["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588\u2588</c1>","<c1>\u2588</c1> ","<c1>\u2588</c1><c2>\u2591</c2><c1>\u2588\u2588</c1>","<c1>\u2588</c1><c2>\u2591</c2> <c1>\u2588</c1>","<c1>\u2588\u2588\u2588</c1> "," <c2>\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],H:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588\u2588\u2588\u2588</c1>","<c1>\u2588 \u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>"," <c2>\u2591\u2591</c2> ","<c2>\u2591\u2591\u2591\u2591</c2>"],I:["<c2>\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588</c1>"," <c1>\u2588</c1> ","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c1>\u2588\u2588\u2588</c1>"," ","<c2>\u2591\u2591\u2591</c2>"],J:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588</c1><c2>\u2591</c2>"," <c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c1>\u2588</c1><c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c1>\u2588\u2588\u2588</c1><c2>\u2591</c2>"," <c2>\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],K:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588\u2588\u2588</c1> ","<c1>\u2588 \u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>"," <c2>\u2591\u2591</c2> ","<c2>\u2591\u2591\u2591\u2591</c2>"],L:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>"," ","<c2>\u2591\u2591\u2591\u2591</c2>"],M:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588\u2588\u2588\u2588</c1>","<c1>\u2588 \u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>"," <c2>\u2591\u2591</c2> ","<c2>\u2591\u2591\u2591\u2591</c2>"],N:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588\u2588</c1><c2>\u2591</c2><c1>\u2588</c1>","<c1>\u2588 \u2588\u2588</c1>","<c1>\u2588</c1><c2>\u2591</c2> <c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>"," <c2>\u2591\u2591</c2> ","<c2>\u2591\u2591\u2591\u2591</c2>"],O:["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588 \u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>"," <c1>\u2588\u2588</c1> ","<c2>\u2591 \u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],P:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588 \u2588</c1>","<c1>\u2588\u2588\u2588</c1> ","<c1>\u2588</c1> <c2>\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591\u2591</c2>"," <c2>\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],Q:["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588 \u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>"," <c1>\u2588\u2588\u2588</c1>","<c2>\u2591</c2> ","<c2>\u2591\u2591\u2591\u2591</c2>"],R:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588 \u2588</c1>","<c1>\u2588\u2588\u2588</c1> ","<c1>\u2588 \u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>"," <c2>\u2591\u2591</c2> ","<c2>\u2591\u2591\u2591\u2591</c2>"],S:["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588\u2588</c1>","<c1>\u2588</c1> "," <c1>\u2588\u2588</c1><c2>\u2591</c2>","<c2>\u2591</c2> <c1>\u2588</c1>","<c1>\u2588\u2588\u2588</c1> "," <c2>\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],T:["<c2>\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588</c1>"," <c1>\u2588</c1> ","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591 \u2591</c2>","<c2>\u2591\u2591\u2591</c2>"],U:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>"," <c1>\u2588\u2588</c1> ","<c2>\u2591 \u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],V:["<c2>\u2591\u2591\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591\u2591</c2><c1>\u2588</c1>"," <c1>\u2588</c1><c2>\u2591</c2><c1>\u2588</c1> ","<c2>\u2591</c2> <c1>\u2588</c1> <c2>\u2591</c2>","<c2>\u2591\u2591 \u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591\u2591</c2>"],W:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588\u2588\u2588\u2588</c1>","<c1>\u2588 \u2588</c1>"," <c2>\u2591\u2591</c2> ","<c2>\u2591\u2591\u2591\u2591</c2>"],X:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>"," <c1>\u2588\u2588</c1> ","<c1>\u2588 \u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>"," <c2>\u2591\u2591</c2> ","<c2>\u2591\u2591\u2591\u2591</c2>"],Y:["<c2>\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591</c2><c1>\u2588</c1>","<c1>\u2588\u2588\u2588</c1>"," <c1>\u2588</c1> ","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591 \u2591</c2>","<c2>\u2591\u2591\u2591</c2>"],Z:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>"," <c1>\u2588</c1> ","<c2>\u2591</c2><c1>\u2588</c1> <c2>\u2591</c2>","<c1>\u2588</c1> <c2>\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>"," ","<c2>\u2591\u2591\u2591\u2591</c2>"],"0":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588 \u2588</c1>","<c1>\u2588</c1><c2>\u2591</c2><c1>\u258C\u2588</c1>","<c1>\u2588</c1><c2>\u2591</c2> <c1>\u2588</c1>"," <c1>\u2588\u2588</c1> ","<c2>\u2591 \u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],"1":["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588</c1><c2>\u2591\u2591</c2>"," <c1>\u2588</c1><c2>\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591\u2591</c2>","<c1>\u2588\u2588\u2588</c1><c2>\u2591</c2>"," <c2>\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],"2":["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2590\u2588\u2588</c1><c2>\u2591</c2>"," <c1>\u2588</c1>","<c2>\u2591\u2591</c2><c1>\u2588</c1> ","<c2>\u2591</c2><c1>\u2588</c1> <c2>\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>"," ","<c2>\u2591\u2591\u2591\u2591</c2>"],"3":["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>"," <c1>\u2588</c1>","<c2>\u2591\u2591</c2><c1>\u2588\u2588</c1>","<c2>\u2591\u2591</c2> <c1>\u2588</c1>","<c1>\u2588\u2588\u2588\u2588</c1>"," ","<c2>\u2591\u2591\u2591\u2591</c2>"],"4":["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>"," <c1>\u2588</c1>","<c2>\u2591\u2591\u2591</c2><c1>\u2588</c1>","<c2>\u2591\u2591\u2591</c2> ","<c2>\u2591\u2591\u2591\u2591</c2>"],"5":["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>","<c1>\u2588</c1> ","<c1>\u2588\u2588\u2588</c1><c2>\u2591</c2>"," <c1>\u2588</c1>","<c1>\u2588\u2588\u2588</c1> "," <c2>\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],"6":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588\u2588</c1>","<c1>\u2588</c1> ","<c1>\u2588\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588 \u2588</c1>"," <c1>\u2588\u2588</c1> ","<c2>\u2591 \u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],"7":["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>"," <c1>\u2588</c1>","<c1>\u2588\u2588\u2588\u2588</c1>"," <c1>\u2588</c1> ","<c1>\u2588</c1> <c2>\u2591\u2591</c2>"," <c2>\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],"8":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588 \u2588</c1>"," <c1>\u2588\u2588</c1> ","<c1>\u2588 \u2588</c1>"," <c1>\u2588\u2588</c1> ","<c2>\u2591 \u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],"9":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588 \u2588</c1>"," <c1>\u2588\u2588\u2588</c1>","<c2>\u2591</c2> <c1>\u2588</c1>","<c2>\u2591\u2591</c2><c1>\u2588</c1> ","<c2>\u2591\u2591 \u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],"!":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588</c1><c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588</c1><c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588</c1><c2>\u2591</c2>","<c2>\u2591 \u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588</c1><c2>\u2591</c2>","<c2>\u2591 \u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],"?":["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2590\u2588\u2588</c1><c2>\u2591</c2>"," <c1>\u2588</c1>","<c2>\u2591\u2591</c2><c1>\u2588</c1> ","<c2>\u2591\u2591 \u2591</c2>","<c2>\u2591\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591\u2591 \u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],".":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591\u2591 \u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],"+":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588\u2588</c1>","<c2>\u2591</c2> <c1>\u2588</c1> ","<c2>\u2591\u2591 \u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],"-":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>"," ","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],_:["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>"," "],"=":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>"," ","<c1>\u2588\u2588\u2588\u2588</c1>"," ","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],"@":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588 \u2588</c1>","<c1>\u2588</c1><c2>\u2591</c2><c1>\u258C\u2588</c1>","<c1>\u2588</c1><c2>\u2591</c2><c1>\u2588</c1> "," <c1>\u2588\u2588\u2588</c1>"," ","<c2>\u2591\u2591\u2591\u2591</c2>"],"#":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>"," <c1>\u258C\u2590</c1> ","<c1>\u2588\u2588\u2588\u2588</c1>"," <c1>\u258C\u2590</c1> ","<c2>\u2591 \u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],$:["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591</c2><c1>\u258C</c1><c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588\u2588</c1>","<c1>\u2588 \u2588</c1> "," <c1>\u2588\u2588</c1><c2>\u2591</c2>","<c2>\u2591\u2591</c2><c1>\u258C\u2588</c1>","<c1>\u2588\u2588\u2588</c1> "," <c2>\u2591</c2>"],"%":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591</c2><c1>\u2588</c1> "," <c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1> <c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1> <c2>\u2591</c2> "," <c2>\u2591\u2591\u2591</c2>"],"&":["<c2>\u2591\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588\u2588</c1>","<c1>\u2588 \u2588</c1> ","<c1>\u2588\u2588\u2588\u2588</c1><c2>\u2591</c2>","<c2> </c2> ","<c2>\u2591\u2591\u2591\u2591\u2591</c2>"],"(":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1> <c2>\u2591</c2>","<c1>\u2588</c1> <c2>\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591\u2591</c2>"," <c1>\u2588</c1><c2>\u2591\u2591</c2>","<c2>\u2591</c2> <c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591\u2591 \u2591</c2>"],")":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591\u2591</c2>","<c2>\u2591</c2> <c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591\u2591</c2> <c1>\u2588</c1>","<c2>\u2591\u2591\u2591</c2><c1>\u2588</c1>","<c2>\u2591\u2591</c2><c1>\u2588</c1> ","<c2>\u2591</c2><c1>\u2588</c1> <c2>\u2591</c2>","<c2>\u2591 \u2591\u2591</c2>"],"/":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591</c2><c1>\u2588</c1>","<c2>\u2591\u2591</c2><c1>\u2588</c1> ","<c2>\u2591\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1> <c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591\u2591</c2>","<c1>\u2588</c1> <c2>\u2591\u2591</c2>"," <c2>\u2591\u2591\u2591</c2>"],":":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591\u2591</c2>","<c2>\u2591 \u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591\u2591</c2>","<c2>\u2591 \u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],";":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591\u2591</c2>","<c2>\u2591 \u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591\u2591</c2>"],",":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1> <c2>\u2591</c2>"],"'":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591\u2591</c2>","<c2>\u2591 \u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],'"':["<c2>\u2591\u2591\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2><c1>\u2588</c1><c2>\u2591\u2591</c2>","<c2>\u2591 \u2591 \u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591\u2591\u2591</c2>"]," ":["<c2>\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591</c2>"]}},slick_default={name:"slick",version:"0.1.0",homepage:"https://github.com/dominikwilkowski/cfonts",colors:2,lines:6,buffer:["","","","","",""],letterspace:["<c2>\u2571</c2>","<c2>\u2571</c2>","<c2>\u2571</c2>","<c2>\u2571</c2>","<c2>\u2571</c2>","<c2>\u2571</c2>"],letterspace_size:1,chars:{A:["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2503\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2570\u256F</c1><c2>\u2571</c2><c1>\u2570\u256F</c1>"],B:["<c1>\u256D\u2501\u2501\u256E</c1><c2>\u2571</c2>","<c1>\u2503\u256D\u256E\u2503</c1><c2>\u2571</c2>","<c1>\u2503\u2570\u256F\u2570\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],C:["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2570\u256F</c1>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u256D\u256E</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],D:["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2570\u256E\u256D\u256E\u2503</c1>","<c2>\u2571</c2><c1>\u2503\u2503\u2503\u2503</c1>","<c2>\u2571</c2><c1>\u2503\u2503\u2503\u2503</c1>","<c1>\u256D\u256F\u2570\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],E:["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u2501\u256F</c1>","<c1>\u2503\u2570\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u2501\u256F</c1>","<c1>\u2503\u2570\u2501\u2501\u256E</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],F:["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u2501\u256F</c1>","<c1>\u2503\u2570\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u2501\u256F</c1>","<c1>\u2503\u2503</c1><c2>\u2571\u2571\u2571</c2>","<c1>\u2570\u256F</c1><c2>\u2571\u2571\u2571</c2>"],G:["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2570\u256F</c1>","<c1>\u2503\u2503\u256D\u2501\u256E</c1>","<c1>\u2503\u2570\u253B\u2501\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],H:["<c1>\u256D\u256E</c1><c2>\u2571</c2><c1>\u256D\u256E</c1>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2503\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2503\u2503</c1>","<c1>\u2570\u256F</c1><c2>\u2571</c2><c1>\u2570\u256F</c1>"],I:["<c1>\u256D\u2501\u2501\u256E</c1>","<c1>\u2570\u252B\u2523\u256F</c1>","<c2>\u2571</c2><c1>\u2503\u2503</c1><c2>\u2571</c2>","<c2>\u2571</c2><c1>\u2503\u2503</c1><c2>\u2571</c2>","<c1>\u256D\u252B\u2523\u256E</c1>","<c1>\u2570\u2501\u2501\u256F</c1>"],J:["<c2>\u2571\u2571</c2><c1>\u256D\u256E</c1>","<c2>\u2571\u2571</c2><c1>\u2503\u2503</c1>","<c2>\u2571\u2571</c2><c1>\u2503\u2503</c1>","<c1>\u256D\u256E\u2503\u2503</c1>","<c1>\u2503\u2570\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u256F</c1>"],K:["<c1>\u256D\u256E\u256D\u2501\u256E</c1>","<c1>\u2503\u2503\u2503\u256D\u256F</c1>","<c1>\u2503\u2570\u256F\u256F</c1><c2>\u2571</c2>","<c1>\u2503\u256D\u256E\u2503</c1><c2>\u2571</c2>","<c1>\u2503\u2503\u2503\u2570\u256E</c1>","<c1>\u2570\u256F\u2570\u2501\u256F</c1>"],L:["<c1>\u256D\u256E</c1><c2>\u2571\u2571\u2571</c2>","<c1>\u2503\u2503</c1><c2>\u2571\u2571\u2571</c2>","<c1>\u2503\u2503</c1><c2>\u2571\u2571\u2571</c2>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u256D\u256E</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],M:["<c1>\u256D\u2501\u256E\u256D\u2501\u256E</c1>","<c1>\u2503\u2503\u2570\u256F\u2503\u2503</c1>","<c1>\u2503\u256D\u256E\u256D\u256E\u2503</c1>","<c1>\u2503\u2503\u2503\u2503\u2503\u2503</c1>","<c1>\u2503\u2503\u2503\u2503\u2503\u2503</c1>","<c1>\u2570\u256F\u2570\u256F\u2570\u256F</c1>"],N:["<c1>\u256D\u2501\u256E</c1><c2>\u2571</c2><c1>\u256D\u256E</c1>","<c1>\u2503\u2503\u2570\u256E\u2503\u2503</c1>","<c1>\u2503\u256D\u256E\u2570\u256F\u2503</c1>","<c1>\u2503\u2503\u2570\u256E\u2503\u2503</c1>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2503\u2503\u2503</c1>","<c1>\u2570\u256F</c1><c2>\u2571</c2><c1>\u2570\u2501\u256F</c1>"],O:["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2503\u2503</c1>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2503\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],P:["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2503\u256D\u2501\u2501\u256F</c1>","<c1>\u2503\u2503</c1><c2>\u2571\u2571\u2571</c2>","<c1>\u2570\u256F</c1><c2>\u2571\u2571\u2571</c2>"],Q:["<c1>\u256D\u2501\u2501\u2501\u256E</c1><c2>\u2571</c2>","<c1>\u2503\u256D\u2501\u256E\u2503</c1><c2>\u2571</c2>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2503\u2503</c1><c2>\u2571</c2>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2503\u2503</c1><c2>\u2571</c2>","<c1>\u2503\u2570\u2501\u256F\u2503\u256E</c1>","<c1>\u2570\u2501\u2501\u2501\u2501\u256F</c1>"],R:["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2503\u256D\u256E\u256D\u256F</c1>","<c1>\u2503\u2503\u2503\u2570\u256E</c1>","<c1>\u2570\u256F\u2570\u2501\u256F</c1>"],S:["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2570\u2501\u2501\u256E</c1>","<c1>\u2570\u2501\u2501\u256E\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],T:["<c1>\u256D\u2501\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u256E\u256D\u256E\u2503</c1>","<c1>\u2570\u256F\u2503\u2503\u2570\u256F</c1>","<c2>\u2571\u2571</c2><c1>\u2503\u2503</c1><c2>\u2571\u2571</c2>","<c2>\u2571\u2571</c2><c1>\u2503\u2503</c1><c2>\u2571\u2571</c2>","<c2>\u2571\u2571</c2><c1>\u2570\u256F</c1><c2>\u2571\u2571</c2>"],U:["<c1>\u256D\u256E</c1><c2>\u2571</c2><c1>\u256D\u256E</c1>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2503\u2503</c1>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2503\u2503</c1>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2503\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],V:["<c1>\u256D\u256E</c1><c2>\u2571\u2571</c2><c1>\u256D\u256E</c1>","<c1>\u2503\u2570\u256E\u256D\u256F\u2503</c1>","<c1>\u2570\u256E\u2503\u2503\u256D\u256F</c1>","<c2>\u2571</c2><c1>\u2503\u2570\u256F\u2503</c1><c2>\u2571</c2>","<c2>\u2571</c2><c1>\u2570\u256E\u256D\u256F</c1><c2>\u2571</c2>","<c2>\u2571\u2571</c2><c1>\u2570\u256F</c1><c2>\u2571\u2571</c2>"],W:["<c1>\u256D\u256E\u256D\u256E\u256D\u256E</c1>","<c1>\u2503\u2503\u2503\u2503\u2503\u2503</c1>","<c1>\u2503\u2503\u2503\u2503\u2503\u2503</c1>","<c1>\u2503\u2570\u256F\u2570\u256F\u2503</c1>","<c1>\u2570\u256E\u256D\u256E\u256D\u256F</c1>","<c2>\u2571</c2><c1>\u2570\u256F\u2570\u256F</c1><c2>\u2571</c2>"],X:["<c1>\u256D\u2501\u256E\u256D\u2501\u256E</c1>","<c1>\u2570\u256E\u2570\u256F\u256D\u256F</c1>","<c2>\u2571</c2><c1>\u2570\u256E\u256D\u256F</c1><c2>\u2571</c2>","<c2>\u2571</c2><c1>\u256D\u256F\u2570\u256E</c1><c2>\u2571</c2>","<c1>\u256D\u256F\u256D\u256E\u2570\u256E</c1>","<c1>\u2570\u2501\u256F\u2570\u2501\u256F</c1>"],Y:["<c1>\u256D\u256E</c1><c2>\u2571\u2571</c2><c1>\u256D\u256E</c1>","<c1>\u2503\u2570\u256E\u256D\u256F\u2503</c1>","<c1>\u2570\u256E\u2570\u256F\u256D\u256F</c1>","<c2>\u2571</c2><c1>\u2570\u256E\u256D\u256F</c1><c2>\u2571</c2>","<c2>\u2571\u2571</c2><c1>\u2503\u2503</c1><c2>\u2571\u2571</c2>","<c2>\u2571\u2571</c2><c1>\u2570\u256F</c1><c2>\u2571\u2571</c2>"],Z:["<c1>\u256D\u2501\u2501\u2501\u2501\u256E</c1>","<c1>\u2570\u2501\u2501\u256E\u2501\u2503</c1>","<c2>\u2571\u2571</c2><c1>\u256D\u256F\u256D\u256F</c1>","<c2>\u2571</c2><c1>\u256D\u256F\u256D\u256F</c1><c2>\u2571</c2>","<c1>\u256D\u256F\u2501\u2570\u2501\u256E</c1>","<c1>\u2570\u2501\u2501\u2501\u2501\u256F</c1>"],"0":["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2503\u2503\u2503\u2503</c1>","<c1>\u2503\u2503\u2503\u2503\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],"1":["<c2>\u2571</c2><c1>\u256D\u256E</c1><c2>\u2571</c2>","<c1>\u256D\u256F\u2503</c1><c2>\u2571</c2>","<c1>\u2570\u256E\u2503</c1><c2>\u2571</c2>","<c2>\u2571</c2><c1>\u2503\u2503</c1><c2>\u2571</c2>","<c1>\u256D\u256F\u2570\u256E</c1>","<c1>\u2570\u2501\u2501\u256F</c1>"],"2":["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2570\u256F\u256D\u256F\u2503</c1>","<c1>\u256D\u2501\u256F\u256D\u256F</c1>","<c1>\u2503\u2570\u2501\u2501\u256E</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],"3":["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2570\u256F\u256D\u256F\u2503</c1>","<c1>\u256D\u256E\u2570\u256E\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],"4":["<c1>\u256D\u256E</c1><c2>\u2571</c2><c1>\u256D\u256E</c1>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2503\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u256E\u2503</c1>","<c2>\u2571\u2571\u2571</c2><c1>\u2503\u2503</c1>","<c2>\u2571\u2571\u2571</c2><c1>\u2570\u256F</c1>"],"5":["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u2501\u256F</c1>","<c1>\u2503\u2570\u2501\u2501\u256E</c1>","<c1>\u2570\u2501\u2501\u256E\u2503</c1>","<c1>\u256D\u2501\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],"6":["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u2501\u256F</c1>","<c1>\u2503\u2570\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],"7":["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2570\u256F\u256D\u256F\u2503</c1>","<c2>\u2571\u2571</c2><c1>\u2503\u256D\u256F</c1>","<c2>\u2571\u2571</c2><c1>\u2503\u2503</c1><c2>\u2571</c2>","<c2>\u2571\u2571</c2><c1>\u2570\u256F</c1><c2>\u2571</c2>"],"8":["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],"9":["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u256E\u2503</c1>","<c1>\u256D\u2501\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],"!":["<c1>\u256D\u256E</c1>","<c1>\u2503\u2503</c1>","<c1>\u2503\u2503</c1>","<c1>\u2570\u256F</c1>","<c1>\u256D\u256E</c1>","<c1>\u2570\u256F</c1>"],"?":["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2570\u256F\u256D\u256F\u2503</c1>","<c2>\u2571\u2571</c2><c1>\u2503\u256D\u256F</c1>","<c2>\u2571\u2571</c2><c1>\u256D\u256E</c1><c2>\u2571</c2>","<c2>\u2571\u2571</c2><c1>\u2570\u256F</c1><c2>\u2571</c2>"],".":["<c2>\u2571\u2571</c2>","<c2>\u2571\u2571</c2>","<c2>\u2571\u2571</c2>","<c2>\u2571\u2571</c2>","<c1>\u256D\u256E</c1>","<c1>\u2570\u256F</c1>"],"+":["<c2>\u2571\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571\u2571</c2>","<c2>\u2571</c2><c1>\u256D\u256E</c1><c2>\u2571</c2>","<c1>\u256D\u256F\u2570\u256E</c1>","<c1>\u2570\u256E\u256D\u256F</c1>","<c2>\u2571</c2><c1>\u2570\u256F</c1><c2>\u2571</c2>"],"-":["<c2>\u2571\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571\u2571</c2>","<c1>\u256D\u2501\u2501\u256E</c1>","<c1>\u2570\u2501\u2501\u256F</c1>","<c2>\u2571\u2571\u2571\u2571</c2>"],_:["<c2>\u2571\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571\u2571</c2>","<c1>\u256D\u2501\u2501\u256E</c1>","<c1>\u2570\u2501\u2501\u256F</c1>"],"=":["<c2>\u2571\u2571\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571\u2571\u2571</c2>","<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>","<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],"@":["<c1>\u256D\u2501\u2501\u2501\u2501\u256E</c1><c2>\u2571</c2>","<c1>\u2503\u256D\u2501\u2501\u256E\u2503</c1><c2>\u2571</c2>","<c1>\u2503\u2503\u256D\u2501\u2503\u2503</c1><c2>\u2571</c2>","<c1>\u2503\u2503\u2570\u256F\u2503\u2503</c1><c2>\u2571</c2>","<c1>\u2503\u2570\u2501\u2501\u256F\u2501\u256E</c1>","<c1>\u2570\u2501\u2501\u2501\u2501\u2501\u256F</c1>"],"#":["<c2>\u2571</c2><c1>\u256D\u2501\u2501\u256E</c1><c2>\u2571</c2>","<c1>\u256D\u256F\u256D\u256E\u2570\u256E</c1>","<c1>\u2570\u256E\u2503\u2503\u256D\u256F</c1>","<c1>\u256D\u256F\u2503\u2503\u2570\u256E</c1>","<c1>\u2570\u256E\u2570\u256F\u256D\u256F</c1>","<c2>\u2571</c2><c1>\u2570\u2501\u2501\u256F</c1><c2>\u2571</c2>"],$:["<c2>\u2571\u2571</c2><c1>\u256D\u256E</c1><c2>\u2571</c2>","<c1>\u256D\u2501\u256F\u2570\u256E</c1>","<c1>\u2503\u2570\u2501\u2501\u256E</c1>","<c1>\u2570\u2501\u2501\u256E\u2503</c1>","<c1>\u2570\u256E\u256D\u2501\u256F</c1>","<c2>\u2571</c2><c1>\u2570\u256F</c1><c2>\u2571\u2571</c2>"],"%":["<c1>\u256D\u256E</c1><c2>\u2571\u2571</c2><c1>\u256D\u2501\u256E</c1>","<c1>\u2570\u256F</c1><c2>\u2571</c2><c1>\u256D\u256F\u256D\u256F</c1>","<c2>\u2571\u2571</c2><c1>\u256D\u256F\u256D\u256F</c1><c2>\u2571</c2>","<c2>\u2571</c2><c1>\u256D\u256F\u256D\u256F</c1><c2>\u2571\u2571</c2>","<c1>\u256D\u256F\u256D\u256F</c1><c2>\u2571</c2><c1>\u256D\u256E</c1>","<c1>\u2570\u2501\u256F</c1><c2>\u2571\u2571</c2><c1>\u2570\u256F</c1>"],"&":["<c2>\u2571</c2><c1>\u256D\u2501\u2501\u256E</c1>","<c2>\u2571</c2><c1>\u2503\u256D\u2501\u256F</c1>","<c1>\u256D\u256F\u2570\u256E</c1><c2>\u2571</c2>","<c1>\u2503\u256D\u256E\u2503</c1><c2>\u2571</c2>","<c1>\u2503\u2570\u256F\u2503\u256E</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],"(":["<c2>\u2571\u2571</c2><c1>\u256D\u2501\u256E</c1>","<c2>\u2571</c2><c1>\u256D\u256F\u256D\u256F</c1>","<c1>\u256D\u256F\u256D\u256F</c1><c2>\u2571</c2>","<c1>\u2570\u256E\u2570\u256E</c1><c2>\u2571</c2>","<c2>\u2571</c2><c1>\u2570\u256E\u2570\u256E</c1>","<c2>\u2571\u2571</c2><c1>\u2570\u2501\u256F</c1>"],")":["<c1>\u256D\u2501\u256E</c1><c2>\u2571\u2571</c2>","<c1>\u2570\u256E\u2570\u256E</c1><c2>\u2571</c2>","<c2>\u2571</c2><c1>\u2570\u256E\u2570\u256E</c1>","<c2>\u2571</c2><c1>\u256D\u256F\u256D\u256F</c1>","<c1>\u256D\u256F\u256D\u256F</c1><c2>\u2571</c2>","<c1>\u2570\u2501\u256F</c1><c2>\u2571\u2571</c2>"],"/":["<c2>\u2571\u2571\u2571\u2571</c2><c1>\u256D\u2501\u256E</c1>","<c2>\u2571\u2571\u2571</c2><c1>\u256D\u256F\u256D\u256F</c1>","<c2>\u2571\u2571</c2><c1>\u256D\u256F\u256D\u256F</c1><c2>\u2571</c2>","<c2>\u2571</c2><c1>\u256D\u256F\u256D\u256F</c1><c2>\u2571\u2571</c2>","<c1>\u256D\u256F\u256D\u256F</c1><c2>\u2571\u2571\u2571</c2>","<c1>\u2570\u2501\u256F</c1><c2>\u2571\u2571\u2571\u2571</c2>"],":":["<c2>\u2571\u2571</c2>","<c1>\u256D\u256E</c1>","<c1>\u2570\u256F</c1>","<c1>\u256D\u256E</c1>","<c1>\u2570\u256F</c1>","<c2>\u2571\u2571</c2>"],";":["<c1>\u256D\u256E</c1>","<c1>\u2503\u2503</c1>","<c1>\u2570\u256F</c1>","<c1>\u256D\u256E</c1>","<c1>\u2570\u252B</c1>","<c2>\u2571</c2><c1>\u256F</c1>"],",":["<c2>\u2571\u2571</c2>","<c2>\u2571\u2571</c2>","<c2>\u2571\u2571</c2>","<c1>\u256D\u256E</c1>","<c1>\u2570\u252B</c1>","<c2>\u2571</c2><c1>\u256F</c1>"],"'":["<c1>\u256D\u256E</c1>","<c1>\u2570\u256F</c1>","<c2>\u2571\u2571</c2>","<c2>\u2571\u2571</c2>","<c2>\u2571\u2571</c2>","<c2>\u2571\u2571</c2>"],'"':["<c1>\u256D\u256E\u256D\u256E</c1>","<c1>\u2570\u256F\u2570\u256F</c1>","<c2>\u2571\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571\u2571</c2>"]," ":["<c2>\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571</c2>"]}},tiny_default={name:"tiny",version:"0.2.0",homepage:"https://github.com/dominikwilkowski/cfonts",colors:1,lines:2,buffer:["",""],letterspace:[" "," "],letterspace_size:1,chars:{A:["\u2584\u2580\u2588","\u2588\u2580\u2588"],B:["\u2588\u2584\u2584","\u2588\u2584\u2588"],C:["\u2588\u2580\u2580","\u2588\u2584\u2584"],D:["\u2588\u2580\u2584","\u2588\u2584\u2580"],E:["\u2588\u2580\u2580","\u2588\u2588\u2584"],F:["\u2588\u2580\u2580","\u2588\u2580 "],G:["\u2588\u2580\u2580","\u2588\u2584\u2588"],H:["\u2588 \u2588","\u2588\u2580\u2588"],I:["\u2588","\u2588"],J:[" \u2588","\u2588\u2584\u2588"],K:["\u2588\u2584\u2580","\u2588 \u2588"],L:["\u2588 ","\u2588\u2584\u2584"],M:["\u2588\u2580\u2584\u2580\u2588","\u2588 \u2580 \u2588"],N:["\u2588\u2584 \u2588","\u2588 \u2580\u2588"],O:["\u2588\u2580\u2588","\u2588\u2584\u2588"],P:["\u2588\u2580\u2588","\u2588\u2580\u2580"],Q:["\u2588\u2580\u2588","\u2580\u2580\u2588"],R:["\u2588\u2580\u2588","\u2588\u2580\u2584"],S:["\u2588\u2580\u2580","\u2584\u2584\u2588"],T:["\u2580\u2588\u2580"," \u2588 "],U:["\u2588 \u2588","\u2588\u2584\u2588"],V:["\u2588 \u2588","\u2580\u2584\u2580"],W:["\u2588 \u2588 \u2588","\u2580\u2584\u2580\u2584\u2580"],X:["\u2580\u2584\u2580","\u2588 \u2588"],Y:["\u2588\u2584\u2588"," \u2588 "],Z:["\u2580\u2588","\u2588\u2584"],"0":["\u259E\u2588\u259A","\u259A\u2588\u259E"],"1":["\u2584\u2588"," \u2588"],"2":["\u2580\u2588","\u2588\u2584"],"3":["\u2580\u2580\u2588","\u2584\u2588\u2588"],"4":["\u2588 \u2588","\u2580\u2580\u2588"],"5":["\u2588\u2580","\u2584\u2588"],"6":["\u2588\u2584\u2584","\u2588\u2584\u2588"],"7":["\u2580\u2580\u2588"," \u2588"],"8":["\u2588\u2588\u2588","\u2588\u2584\u2588"],"9":["\u2588\u2580\u2588","\u2580\u2580\u2588"],"!":["\u2588","\u2584"],"?":["\u2580\u2588"," \u2584"],".":[" ","\u2584"],"+":["\u2584\u2588\u2584"," \u2580 "],"-":["\u2584\u2584"," "],_:[" ","\u2584\u2584"],"=":["\u2580\u2580","\u2580\u2580"],"@":["\u259B\u2588\u259C","\u2599\u259F\u2583"],"#":["\u259F\u2584\u2599","\u259C\u2580\u259B"],$:["\u2596\u2588\u2597","\u2598\u2588\u259D"],"%":["\u2580 \u2584\u2580","\u2584\u2580 \u2584"],"&":["\u2584\u2584\u2588","\u2588\u2584\u2588"],"(":["\u2584\u2580","\u2580\u2584"],")":["\u2580\u2584","\u2584\u2580"],"/":[" \u2584\u2580","\u2584\u2580 "],":":["\u2580","\u2584"],";":[" ","\u2584\u2580"],",":[" ","\u2588"],"'":["\u2580"," "],'"':["\u259B \u259C"," "]," ":[" "," "]}},huge_default={name:"huge",version:"0.2.0",homepage:"https://github.com/dominikwilkowski/cfonts",colors:2,lines:11,buffer:["","","","","","","","","","",""],letterspace:[" "," "," "," "," "," "," "," "," "," "," "],letterspace_size:1,chars:{A:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2580 \u2580</c1> "],B:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],C:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],D:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],E:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],F:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2580</c1> "],G:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],H:[" <c1>\u2584 \u2584</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2580 \u2580</c1> "],I:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],J:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],K:[" <c1>\u2584 \u2584</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2580 \u2580</c1> "],L:[" <c1>\u2584</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],M:[" <c1>\u2584\u2584 \u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2580 \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2580 \u2580</c1> "],N:[" <c1>\u2584\u2584 \u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580 \u2580\u2580</c1> "],O:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],P:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2580</c1> "],Q:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2580</c1> "],R:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2580 \u2580</c1> "],S:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],T:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2580</c1> "],U:[" <c1>\u2584 \u2584</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],V:[" <c1>\u2584 \u2584</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2580</c1> "],W:[" <c1>\u2584 \u2584</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2584 \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580 \u2580\u2580</c1> "],X:[" <c1>\u2584 \u2584</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2580 \u2580</c1> "],Y:[" <c1>\u2584 \u2584</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2580</c1> "],Z:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],"0":[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> "," <c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],"1":[" <c1>\u2584\u2584\u2584\u2584</c1> "," <c1>\u2584\u2588</c1><c2>\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2580\u2580 \u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],"2":[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],"3":[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],"4":[" <c1>\u2584 \u2584</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2580</c1> "],"5":[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],"6":[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],"7":[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2580</c1> "],"8":[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],"9":[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],"!":[" <c1>\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580</c1> "," <c1>\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580</c1> "],"?":[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> "," <c1>\u2584\u2588</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u2588\u2584</c1> "," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580 \u2584\u2584\u2584\u2588</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2584\u2588</c1><c2>\u2591\u2591\u2591\u2591\u2591</c2><c1>\u2588</c1> "," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C\u2580\u2580\u2580\u2580</c1> "," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2580\u2580</c1> "," <c1>\u2584\u2584</c1> "," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2580\u2580</c1> "],".":[" "," "," "," "," "," "," "," "," <c1>\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580</c1> "],"+":[" "," "," <c1>\u2584\u2584</c1> "," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2584\u2584\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588\u2580\u2580</c1> "," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2580\u2580</c1> "," "," "],"-":[" "," "," "," "," <c1>\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580</c1> "," "," "," "," "],_:[" "," "," "," "," "," "," "," <c1>\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580</c1> "," "],"=":[" "," "," <c1>\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580</c1> "," "," <c1>\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580</c1> "," "," "],"@":[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2584\u2584\u2584\u2584 \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2588</c1><c2>\u2591\u2591\u2591\u2591</c2><c1>\u2588 \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591</c2><c1>\u2588\u2588\u2588\u2588</c1><c2>\u2591</c2><c1>\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2588</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C\u2584\u2584\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],"#":[" <c1>\u2584 \u2584</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2584\u2588</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u2588\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2584\u2588</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u2588\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2580 \u2580</c1> "],$:[" <c1>\u2584</c1> "," <c1>\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580</c1> "," <c1>\u2580</c1> "],"%":[" <c1>\u2584</c1> "," <c1>\u2584 \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2580 \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2584</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2580</c1> "," <c1>\u2580</c1> "],"&":[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C \u2584</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2580\u2580\u2580\u2580\u2580\u2580 \u2580</c1> "],"(":[" <c1>\u2584\u2584\u2584\u2584\u2584</c1> "," <c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u2588\u2580\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u2588\u2584\u2584\u2584</c1> "," <c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580</c1> "],")":[" <c1>\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2580\u2580\u2580\u2588</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2584\u2584\u2584\u2588</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2580\u2580\u2580\u2580\u2580</c1> "],"/":[" <c1>\u2584</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2580</c1> "],":":[" "," "," <c1>\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580</c1> "," "," <c1>\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580</c1> "," "," "],";":[" "," "," <c1>\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580</c1> "," "," <c1>\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u258C</c1> "," <c1>\u2580</c1> "," "],",":[" "," "," "," "," "," "," "," <c1>\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u258C</c1> "," <c1>\u2580</c1> "],"'":[" <c1>\u2584</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2590</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2590</c1>"," <c1>\u2580</c1> "," "," "," "," "," "," "," "],'"':[" <c1>\u2584 \u2584</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2590\u2590</c1><c2>\u2591</c2><c1>\u2590</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2590\u2590</c1><c2>\u2591</c2><c1>\u2590</c1>"," <c1>\u2580 \u2580</c1> "," "," "," "," "," "," "," "]," ":[" "," "," "," "," "," "," "," "," "," "," "]}},grid_default={name:"grid",version:"0.1.0",homepage:"https://github.com/dominikwilkowski/cfonts",colors:2,lines:6,buffer:["","","","","",""],letterspace:["<c2>\u254B</c2>","<c2>\u254B</c2>","<c2>\u254B</c2>","<c2>\u254B</c2>","<c2>\u254B</c2>","<c2>\u254B</c2>"],letterspace_size:1,chars:{A:["<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2513\u2503</c1>","<c1>\u2503\u250F\u2513\u2503</c1>","<c1>\u2517\u251B\u2517\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],B:["<c1>\u250F\u2513</c1><c2>\u254B\u254B</c2>","<c1>\u2503\u2517\u2501\u2513</c1>","<c1>\u2503\u250F\u2513\u2503</c1>","<c1>\u2503\u2517\u251B\u2503</c1>","<c1>\u2517\u2501\u2501\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],C:["<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2501\u251B</c1>","<c1>\u2503\u2517\u2501\u2513</c1>","<c1>\u2517\u2501\u2501\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],D:["<c2>\u254B\u254B</c2><c1>\u250F\u2513</c1>","<c1>\u250F\u2501\u251B\u2503</c1>","<c1>\u2503\u250F\u2513\u2503</c1>","<c1>\u2503\u2517\u251B\u2503</c1>","<c1>\u2517\u2501\u2501\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],E:["<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2501\u2513</c1>","<c1>\u2503\u2503\u2501\u252B</c1>","<c1>\u2503\u2503\u2501\u252B</c1>","<c1>\u2517\u2501\u2501\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],F:["<c2>\u254B</c2><c1>\u250F\u2501\u2513</c1>","<c1>\u250F\u251B\u2517\u2513</c1>","<c1>\u2517\u2513\u250F\u251B</c1>","<c2>\u254B</c2><c1>\u2503\u2503</c1><c2>\u254B</c2>","<c2>\u254B</c2><c1>\u2517\u251B</c1><c2>\u254B</c2>","<c2>\u254B\u254B\u254B\u254B</c2>"],G:["<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2513\u2503</c1>","<c1>\u2503\u2517\u251B\u2503</c1>","<c1>\u2517\u2501\u2513\u2503</c1>","<c1>\u2517\u2501\u2501\u251B</c1>"],H:["<c1>\u250F\u2513</c1><c2>\u254B\u254B</c2>","<c1>\u2503\u2517\u2501\u2513</c1>","<c1>\u2503\u250F\u2513\u2503</c1>","<c1>\u2503\u2503\u2503\u2503</c1>","<c1>\u2517\u251B\u2517\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],I:["<c1>\u250F\u2513</c1>","<c1>\u2517\u251B</c1>","<c1>\u250F\u2513</c1>","<c1>\u2503\u2503</c1>","<c1>\u2517\u251B</c1>","<c2>\u254B\u254B</c2>"],J:["<c2>\u254B</c2><c1>\u250F\u2513</c1>","<c2>\u254B</c2><c1>\u2517\u251B</c1>","<c2>\u254B</c2><c1>\u250F\u2513</c1>","<c2>\u254B</c2><c1>\u2503\u2503</c1>","<c1>\u250F\u251B\u2503</c1>","<c1>\u2517\u2501\u251B</c1>"],K:["<c1>\u250F\u2513</c1><c2>\u254B\u254B</c2>","<c1>\u2503\u2503\u250F\u2513</c1>","<c1>\u2503\u2517\u251B\u251B</c1>","<c1>\u2503\u250F\u2513\u2513</c1>","<c1>\u2517\u251B\u2517\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],L:["<c1>\u250F\u2513</c1><c2>\u254B</c2>","<c1>\u2503\u2503</c1><c2>\u254B</c2>","<c1>\u2503\u2503</c1><c2>\u254B</c2>","<c1>\u2503\u2517\u2513</c1>","<c1>\u2517\u2501\u251B</c1>","<c2>\u254B\u254B\u254B</c2>"],M:["<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2513\u250F\u2513</c1>","<c1>\u2503\u2517\u251B\u2503</c1>","<c1>\u2503\u2503\u2503\u2503</c1>","<c1>\u2517\u253B\u253B\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],N:["<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2513</c1><c2>\u254B</c2>","<c1>\u2503\u250F\u2513\u2513</c1>","<c1>\u2503\u2503\u2503\u2503</c1>","<c1>\u2517\u251B\u2517\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],O:["<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2513\u2503</c1>","<c1>\u2503\u2517\u251B\u2503</c1>","<c1>\u2517\u2501\u2501\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],P:["<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2513\u2503</c1>","<c1>\u2503\u2517\u251B\u2503</c1>","<c1>\u2503\u250F\u2501\u251B</c1>","<c1>\u2517\u251B</c1><c2>\u254B\u254B</c2>"],Q:["<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2513\u2503</c1>","<c1>\u2503\u2517\u251B\u2503</c1>","<c1>\u2517\u2501\u2513\u2503</c1>","<c2>\u254B\u254B</c2><c1>\u2517\u251B</c1>"],R:["<c2>\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2513</c1>","<c1>\u2503\u250F\u251B</c1>","<c1>\u2503\u2503</c1><c2>\u254B</c2>","<c1>\u2517\u251B</c1><c2>\u254B</c2>","<c2>\u254B\u254B\u254B</c2>"],S:["<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2501\u2513</c1>","<c1>\u2503\u2501\u2501\u252B</c1>","<c1>\u2523\u2501\u2501\u2503</c1>","<c1>\u2517\u2501\u2501\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],T:["<c2>\u254B</c2><c1>\u250F\u2513</c1><c2>\u254B</c2>","<c1>\u250F\u251B\u2517\u2513</c1>","<c1>\u2517\u2513\u250F\u251B</c1>","<c2>\u254B</c2><c1>\u2503\u2517\u2513</c1>","<c2>\u254B</c2><c1>\u2517\u2501\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],U:["<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2513\u250F\u2513</c1>","<c1>\u2503\u2503\u2503\u2503</c1>","<c1>\u2503\u2517\u251B\u2503</c1>","<c1>\u2517\u2501\u2501\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],V:["<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2513\u250F\u2513</c1>","<c1>\u2503\u2517\u251B\u2503</c1>","<c1>\u2517\u2513\u250F\u251B</c1>","<c2>\u254B</c2><c1>\u2517\u251B</c1><c2>\u254B</c2>","<c2>\u254B\u254B\u254B\u254B</c2>"],W:["<c2>\u254B\u254B\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2513\u250F\u2513\u250F\u2513</c1>","<c1>\u2503\u2517\u251B\u2517\u251B\u2503</c1>","<c1>\u2517\u2513\u250F\u2513\u250F\u251B</c1>","<c2>\u254B</c2><c1>\u2517\u251B\u2517\u251B</c1><c2>\u254B</c2>","<c2>\u254B\u254B\u254B\u254B\u254B\u254B</c2>"],X:["<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2513\u250F\u2513</c1>","<c1>\u2517\u254B\u254B\u251B</c1>","<c1>\u250F\u254B\u254B\u2513</c1>","<c1>\u2517\u251B\u2517\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],Y:["<c2>\u254B\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2513</c1><c2>\u254B</c2><c1>\u250F\u2513</c1>","<c1>\u2503\u2517\u2501\u251B\u2503</c1>","<c1>\u2517\u2501\u2513\u250F\u251B</c1>","<c1>\u2517\u2501\u2501\u251B</c1><c2>\u254B</c2>","<c2>\u254B\u254B\u254B\u254B\u254B</c2>"],Z:["<c2>\u254B\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2501\u2501\u2513</c1>","<c1>\u2523\u2501\u2501\u2503\u2503</c1>","<c1>\u2503\u2503\u2501\u2501\u252B</c1>","<c1>\u2517\u2501\u2501\u2501\u251B</c1>","<c2>\u254B\u254B\u254B\u254B\u254B</c2>"],"0":["<c1>\u250F\u2501\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2501\u2513\u2503</c1>","<c1>\u2503\u2503\u2503\u2503\u2503</c1>","<c1>\u2503\u2503\u2503\u2503\u2503</c1>","<c1>\u2503\u2517\u2501\u251B\u2503</c1>","<c1>\u2517\u2501\u2501\u2501\u251B</c1>"],"1":["<c2>\u254B</c2><c1>\u250F\u2513</c1><c2>\u254B</c2>","<c1>\u250F\u251B\u2503</c1><c2>\u254B</c2>","<c1>\u2517\u2513\u2503</c1><c2>\u254B</c2>","<c2>\u254B</c2><c1>\u2503\u2503</c1><c2>\u254B</c2>","<c1>\u250F\u251B\u2517\u2513</c1>","<c1>\u2517\u2501\u2501\u251B</c1>"],"2":["<c1>\u250F\u2501\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2501\u2513\u2503</c1>","<c1>\u2517\u251B\u250F\u251B\u2503</c1>","<c1>\u250F\u2501\u251B\u250F\u251B</c1>","<c1>\u2503\u2517\u2501\u253B\u2513</c1>","<c1>\u2517\u2501\u2501\u2501\u251B</c1>"],"3":["<c1>\u250F\u2501\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2501\u2513\u2503</c1>","<c1>\u2517\u251B\u250F\u251B\u2503</c1>","<c1>\u250F\u2513\u2517\u2513\u2503</c1>","<c1>\u2503\u2517\u2501\u251B\u2503</c1>","<c1>\u2517\u2501\u2501\u2501\u251B</c1>"],"4":["<c1>\u250F\u2513</c1><c2>\u254B</c2><c1>\u250F\u2513</c1>","<c1>\u2503\u2503</c1><c2>\u254B</c2><c1>\u2503\u2503</c1>","<c1>\u2503\u2517\u2501\u251B\u2503</c1>","<c1>\u2517\u2501\u2501\u2513\u2503</c1>","<c2>\u254B\u254B\u254B</c2><c1>\u2503\u2503</c1>","<c2>\u254B\u254B\u254B</c2><c1>\u2517\u251B</c1>"],"5":["<c1>\u250F\u2501\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2501\u2501\u251B</c1>","<c1>\u2503\u2517\u2501\u2501\u2513</c1>","<c1>\u2517\u2501\u2501\u2513\u2503</c1>","<c1>\u250F\u2501\u2501\u251B\u2503</c1>","<c1>\u2517\u2501\u2501\u2501\u251B</c1>"],"6":["<c1>\u250F\u2501\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2501\u2501\u251B</c1>","<c1>\u2503\u2517\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2501\u2513\u2503</c1>","<c1>\u2503\u2517\u2501\u251B\u2503</c1>","<c1>\u2517\u2501\u2501\u2501\u251B</c1>"],"7":["<c1>\u250F\u2501\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2501\u2513\u2503</c1>","<c1>\u2517\u251B\u250F\u251B\u2503</c1>","<c2>\u254B\u254B</c2><c1>\u2503\u250F\u251B</c1>","<c2>\u254B\u254B</c2><c1>\u2503\u2503</c1><c2>\u254B</c2>","<c2>\u254B\u254B</c2><c1>\u2517\u251B</c1><c2>\u254B</c2>"],"8":["<c1>\u250F\u2501\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2501\u2513\u2503</c1>","<c1>\u2503\u2517\u2501\u251B\u2503</c1>","<c1>\u2503\u250F\u2501\u2513\u2503</c1>","<c1>\u2503\u2517\u2501\u251B\u2503</c1>","<c1>\u2517\u2501\u2501\u2501\u251B</c1>"],"9":["<c1>\u250F\u2501\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2501\u2513\u2503</c1>","<c1>\u2503\u2517\u2501\u251B\u2503</c1>","<c1>\u2517\u2501\u2501\u2513\u2503</c1>","<c1>\u250F\u2501\u2501\u251B\u2503</c1>","<c1>\u2517\u2501\u2501\u2501\u251B</c1>"],"!":["<c1>\u250F\u2513</c1>","<c1>\u2503\u2503</c1>","<c1>\u2503\u2503</c1>","<c1>\u2517\u251B</c1>","<c1>\u250F\u2513</c1>","<c1>\u2517\u251B</c1>"],"?":["<c1>\u250F\u2501\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2501\u2513\u2503</c1>","<c1>\u2517\u251B\u250F\u251B\u2503</c1>","<c2>\u254B\u254B</c2><c1>\u2503\u250F\u251B</c1>","<c2>\u254B\u254B</c2><c1>\u250F\u2513</c1><c2>\u254B</c2>","<c2>\u254B\u254B</c2><c1>\u2517\u251B</c1><c2>\u254B</c2>"],".":["<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>","<c1>\u250F\u2513</c1>","<c1>\u2517\u251B</c1>"],"+":["<c2>\u254B\u254B\u254B\u254B</c2>","<c2>\u254B</c2><c1>\u250F\u2513</c1><c2>\u254B</c2>","<c1>\u250F\u251B\u2517\u2513</c1>","<c1>\u2517\u2513\u250F\u251B</c1>","<c2>\u254B</c2><c1>\u2517\u251B</c1><c2>\u254B</c2>","<c2>\u254B\u254B\u254B\u254B</c2>"],"-":["<c2>\u254B\u254B\u254B\u254B</c2>","<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2501\u2513</c1>","<c1>\u2517\u2501\u2501\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>","<c2>\u254B\u254B\u254B\u254B</c2>"],_:["<c2>\u254B\u254B\u254B\u254B</c2>","<c2>\u254B\u254B\u254B\u254B</c2>","<c2>\u254B\u254B\u254B\u254B</c2>","<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2501\u2513</c1>","<c1>\u2517\u2501\u2501\u251B</c1>"],"=":["<c2>\u254B\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2501\u2501\u2513</c1>","<c1>\u2517\u2501\u2501\u2501\u251B</c1>","<c1>\u250F\u2501\u2501\u2501\u2513</c1>","<c1>\u2517\u2501\u2501\u2501\u251B</c1>","<c2>\u254B\u254B\u254B\u254B\u254B</c2>"],"@":["<c1>\u250F\u2501\u2501\u2501\u2501\u2513</c1><c2>\u254B</c2>","<c1>\u2503\u250F\u2501\u2501\u2513\u2503</c1><c2>\u254B</c2>","<c1>\u2503\u2503\u250F\u2501\u2503\u2503</c1><c2>\u254B</c2>","<c1>\u2503\u2503\u2517\u251B\u2503\u2503</c1><c2>\u254B</c2>","<c1>\u2503\u2517\u2501\u2501\u251B\u2517\u2513</c1>","<c1>\u2517\u2501\u2501\u2501\u2501\u2501\u251B</c1>"],"#":["<c2>\u254B</c2><c1>\u250F\u2501\u2501\u2501\u2513</c1><c2>\u254B</c2>","<c1>\u250F\u251B\u250F\u2501\u2513\u2517\u2513</c1>","<c1>\u2517\u2513\u2503\u2503\u2503\u250F\u251B</c1>","<c1>\u250F\u251B\u2503\u2503\u2503\u2517\u2513</c1>","<c1>\u2517\u2513\u2517\u2501\u251B\u250F\u251B</c1>","<c2>\u254B</c2><c1>\u2517\u2501\u2501\u2501\u251B</c1><c2>\u254B</c2>"],$:["<c2>\u254B</c2><c1>\u250F\u2513</c1><c2>\u254B</c2>","<c1>\u250F\u251B\u2517\u2513</c1>","<c1>\u2503\u2501\u2501\u252B</c1>","<c1>\u2523\u2501\u2501\u2503</c1>","<c1>\u2517\u2513\u250F\u251B</c1>","<c2>\u254B</c2><c1>\u2517\u251B</c1><c2>\u254B</c2>"],"%":["<c1>\u250F\u2513</c1><c2>\u254B\u254B</c2><c1>\u250F\u2501\u2513</c1>","<c1>\u2517\u251B</c1><c2>\u254B</c2><c1>\u250F\u251B\u250F\u251B</c1>","<c2>\u254B\u254B</c2><c1>\u250F\u251B\u250F\u251B</c1><c2>\u254B</c2>","<c2>\u254B</c2><c1>\u250F\u251B\u250F\u251B</c1><c2>\u254B\u254B</c2>","<c1>\u250F\u251B\u250F\u251B</c1><c2>\u254B</c2><c1>\u250F\u2513</c1>","<c1>\u2517\u2501\u251B</c1><c2>\u254B\u254B</c2><c1>\u2517\u251B</c1>"],"&":["<c2>\u254B\u254B</c2><c1>\u250F\u2513</c1><c2>\u254B</c2>","<c2>\u254B\u254B</c2><c1>\u2503\u2503</c1><c2>\u254B</c2>","<c1>\u250F\u2501\u251B\u2517\u2513</c1>","<c1>\u2503\u250F\u2513\u250F\u251B</c1>","<c1>\u2503\u2517\u251B\u2503</c1><c2>\u254B</c2>","<c1>\u2517\u2501\u2501\u251B</c1><c2>\u254B</c2>"],"(":["<c2>\u254B\u254B</c2><c1>\u250F\u2501\u2513</c1>","<c2>\u254B</c2><c1>\u250F\u251B\u250F\u251B</c1>","<c1>\u250F\u251B\u250F\u251B</c1><c2>\u254B</c2>","<c1>\u2517\u2513\u2517\u2513</c1><c2>\u254B</c2>","<c2>\u254B</c2><c1>\u2517\u2513\u2517\u2513</c1>","<c2>\u254B\u254B</c2><c1>\u2517\u2501\u251B</c1>"],")":["<c1>\u250F\u2501\u2513</c1><c2>\u254B\u254B</c2>","<c1>\u2517\u2513\u2517\u2513</c1><c2>\u254B</c2>","<c2>\u254B</c2><c1>\u2517\u2513\u2517\u2513</c1>","<c2>\u254B</c2><c1>\u250F\u251B\u250F\u251B</c1>","<c1>\u250F\u251B\u250F\u251B</c1><c2>\u254B</c2>","<c1>\u2517\u2501\u251B</c1><c2>\u254B\u254B</c2>"],"/":["<c2>\u254B\u254B\u254B\u254B</c2><c1>\u250F\u2501\u2513</c1>","<c2>\u254B\u254B\u254B</c2><c1>\u250F\u251B\u250F\u251B</c1>","<c2>\u254B\u254B</c2><c1>\u250F\u251B\u250F\u251B</c1><c2>\u254B</c2>","<c2>\u254B</c2><c1>\u250F\u251B\u250F\u251B</c1><c2>\u254B\u254B</c2>","<c1>\u250F\u251B\u250F\u251B</c1><c2>\u254B\u254B\u254B</c2>","<c1>\u2517\u2501\u251B</c1><c2>\u254B\u254B\u254B\u254B</c2>"],":":["<c2>\u254B\u254B</c2>","<c1>\u250F\u2513</c1>","<c1>\u2517\u251B</c1>","<c1>\u250F\u2513</c1>","<c1>\u2517\u251B</c1>","<c2>\u254B\u254B</c2>"],";":["<c2>\u254B\u254B</c2>","<c1>\u250F\u2513</c1>","<c1>\u2517\u251B</c1>","<c2>\u254B\u254B</c2>","<c1>\u250F\u2513</c1>","<c1>\u2517\u252B</c1>"],",":["<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>","<c1>\u250F\u2513</c1>","<c1>\u2517\u252B</c1>"],"'":["<c1>\u250F\u2513</c1>","<c1>\u2517\u251B</c1>","<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>"],'"':["<c1>\u250F\u2513\u250F\u2513</c1>","<c1>\u2517\u251B\u2517\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>","<c2>\u254B\u254B\u254B\u254B</c2>","<c2>\u254B\u254B\u254B\u254B</c2>","<c2>\u254B\u254B\u254B\u254B</c2>"]," ":["<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>"]}},pallet_default={name:"pallet",version:"0.1.0",homepage:"https://github.com/dominikwilkowski/cfonts",colors:2,lines:6,buffer:["","","","","",""],letterspace:["<c2>\u2500</c2>","<c2>\u2500</c2>","<c2>\u2500</c2>","<c2>\u2500</c2>","<c2>\u2500</c2>","<c2>\u2500</c2>"],letterspace_size:1,chars:{A:["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2551\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u255A\u255D</c1><c2>\u2500</c2><c1>\u255A\u255D</c1>"],B:["<c1>\u2554\u2550\u2550\u2557</c1><c2>\u2500</c2>","<c1>\u2551\u2554\u2557\u2551</c1><c2>\u2500</c2>","<c1>\u2551\u255A\u255D\u255A\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],C:["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u255A\u255D</c1>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2554\u2557</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],D:["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u255A\u2557\u2554\u2557\u2551</c1>","<c2>\u2500</c2><c1>\u2551\u2551\u2551\u2551</c1>","<c2>\u2500</c2><c1>\u2551\u2551\u2551\u2551</c1>","<c1>\u2554\u255D\u255A\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],E:["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2550\u255D</c1>","<c1>\u2551\u255A\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2550\u255D</c1>","<c1>\u2551\u255A\u2550\u2550\u2557</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],F:["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2550\u255D</c1>","<c1>\u2551\u255A\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2550\u255D</c1>","<c1>\u2551\u2551</c1><c2>\u2500\u2500\u2500</c2>","<c1>\u255A\u255D</c1><c2>\u2500\u2500\u2500</c2>"],G:["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u255A\u255D</c1>","<c1>\u2551\u2551\u2554\u2550\u2557</c1>","<c1>\u2551\u255A\u2569\u2550\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],H:["<c1>\u2554\u2557</c1><c2>\u2500</c2><c1>\u2554\u2557</c1>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2551\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2551\u2551</c1>","<c1>\u255A\u255D</c1><c2>\u2500</c2><c1>\u255A\u255D</c1>"],I:["<c1>\u2554\u2550\u2550\u2557</c1>","<c1>\u255A\u2563\u2560\u255D</c1>","<c2>\u2500</c2><c1>\u2551\u2551</c1><c2>\u2500</c2>","<c2>\u2500</c2><c1>\u2551\u2551</c1><c2>\u2500</c2>","<c1>\u2554\u2563\u2560\u2557</c1>","<c1>\u255A\u2550\u2550\u255D</c1>"],J:["<c2>\u2500\u2500</c2><c1>\u2554\u2557</c1>","<c2>\u2500\u2500</c2><c1>\u2551\u2551</c1>","<c2>\u2500\u2500</c2><c1>\u2551\u2551</c1>","<c1>\u2554\u2557\u2551\u2551</c1>","<c1>\u2551\u255A\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u255D</c1>"],K:["<c1>\u2554\u2557\u2554\u2550\u2557</c1>","<c1>\u2551\u2551\u2551\u2554\u255D</c1>","<c1>\u2551\u255A\u255D\u255D</c1><c2>\u2500</c2>","<c1>\u2551\u2554\u2557\u2551</c1><c2>\u2500</c2>","<c1>\u2551\u2551\u2551\u255A\u2557</c1>","<c1>\u255A\u255D\u255A\u2550\u255D</c1>"],L:["<c1>\u2554\u2557</c1><c2>\u2500\u2500\u2500</c2>","<c1>\u2551\u2551</c1><c2>\u2500\u2500\u2500</c2>","<c1>\u2551\u2551</c1><c2>\u2500\u2500\u2500</c2>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2554\u2557</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],M:["<c1>\u2554\u2550\u2557\u2554\u2550\u2557</c1>","<c1>\u2551\u2551\u255A\u255D\u2551\u2551</c1>","<c1>\u2551\u2554\u2557\u2554\u2557\u2551</c1>","<c1>\u2551\u2551\u2551\u2551\u2551\u2551</c1>","<c1>\u2551\u2551\u2551\u2551\u2551\u2551</c1>","<c1>\u255A\u255D\u255A\u255D\u255A\u255D</c1>"],N:["<c1>\u2554\u2550\u2557</c1><c2>\u2500</c2><c1>\u2554\u2557</c1>","<c1>\u2551\u2551\u255A\u2557\u2551\u2551</c1>","<c1>\u2551\u2554\u2557\u255A\u255D\u2551</c1>","<c1>\u2551\u2551\u255A\u2557\u2551\u2551</c1>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2551\u2551\u2551</c1>","<c1>\u255A\u255D</c1><c2>\u2500</c2><c1>\u255A\u2550\u255D</c1>"],O:["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2551\u2551</c1>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2551\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],P:["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u2551\u2554\u2550\u2550\u255D</c1>","<c1>\u2551\u2551</c1><c2>\u2500\u2500\u2500</c2>","<c1>\u255A\u255D</c1><c2>\u2500\u2500\u2500</c2>"],Q:["<c1>\u2554\u2550\u2550\u2550\u2557</c1><c2>\u2500</c2>","<c1>\u2551\u2554\u2550\u2557\u2551</c1><c2>\u2500</c2>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2551\u2551</c1><c2>\u2500</c2>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2551\u2551</c1><c2>\u2500</c2>","<c1>\u2551\u255A\u2550\u255D\u2560\u2557</c1>","<c1>\u255A\u2550\u2550\u2550\u2550\u255D</c1>"],R:["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u2551\u2554\u2557\u2554\u255D</c1>","<c1>\u2551\u2551\u2551\u255A\u2557</c1>","<c1>\u255A\u255D\u255A\u2550\u255D</c1>"],S:["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u255A\u2550\u2550\u2557</c1>","<c1>\u255A\u2550\u2550\u2557\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],T:["<c1>\u2554\u2550\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2557\u2554\u2557\u2551</c1>","<c1>\u255A\u255D\u2551\u2551\u255A\u255D</c1>","<c2>\u2500\u2500</c2><c1>\u2551\u2551</c1><c2>\u2500\u2500</c2>","<c2>\u2500\u2500</c2><c1>\u2551\u2551</c1><c2>\u2500\u2500</c2>","<c2>\u2500\u2500</c2><c1>\u255A\u255D</c1><c2>\u2500\u2500</c2>"],U:["<c1>\u2554\u2557</c1><c2>\u2500</c2><c1>\u2554\u2557</c1>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2551\u2551</c1>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2551\u2551</c1>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2551\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],V:["<c1>\u2554\u2557</c1><c2>\u2500\u2500</c2><c1>\u2554\u2557</c1>","<c1>\u2551\u255A\u2557\u2554\u255D\u2551</c1>","<c1>\u255A\u2557\u2551\u2551\u2554\u255D</c1>","<c2>\u2500</c2><c1>\u2551\u255A\u255D\u2551</c1><c2>\u2500</c2>","<c2>\u2500</c2><c1>\u255A\u2557\u2554\u255D</c1><c2>\u2500</c2>","<c2>\u2500\u2500</c2><c1>\u255A\u255D</c1><c2>\u2500\u2500</c2>"],W:["<c1>\u2554\u2557\u2554\u2557\u2554\u2557</c1>","<c1>\u2551\u2551\u2551\u2551\u2551\u2551</c1>","<c1>\u2551\u2551\u2551\u2551\u2551\u2551</c1>","<c1>\u2551\u255A\u255D\u255A\u255D\u2551</c1>","<c1>\u255A\u2557\u2554\u2557\u2554\u255D</c1>","<c2>\u2500</c2><c1>\u255A\u255D\u255A\u255D</c1><c2>\u2500</c2>"],X:["<c1>\u2554\u2550\u2557\u2554\u2550\u2557</c1>","<c1>\u255A\u2557\u255A\u255D\u2554\u255D</c1>","<c2>\u2500</c2><c1>\u255A\u2557\u2554\u255D</c1><c2>\u2500</c2>","<c2>\u2500</c2><c1>\u2554\u255D\u255A\u2557</c1><c2>\u2500</c2>","<c1>\u2554\u255D\u2554\u2557\u255A\u2557</c1>","<c1>\u255A\u2550\u255D\u255A\u2550\u255D</c1>"],Y:["<c1>\u2554\u2557</c1><c2>\u2500\u2500</c2><c1>\u2554\u2557</c1>","<c1>\u2551\u255A\u2557\u2554\u255D\u2551</c1>","<c1>\u255A\u2557\u255A\u255D\u2554\u255D</c1>","<c2>\u2500</c2><c1>\u255A\u2557\u2554\u255D</c1><c2>\u2500</c2>","<c2>\u2500\u2500</c2><c1>\u2551\u2551</c1><c2>\u2500\u2500</c2>","<c2>\u2500\u2500</c2><c1>\u255A\u255D</c1><c2>\u2500\u2500</c2>"],Z:["<c1>\u2554\u2550\u2550\u2550\u2550\u2557</c1>","<c1>\u255A\u2550\u2550\u2557\u2550\u2551</c1>","<c2>\u2500\u2500</c2><c1>\u2554\u255D\u2554\u255D</c1>","<c2>\u2500</c2><c1>\u2554\u255D\u2554\u255D</c1><c2>\u2500</c2>","<c1>\u2554\u255D\u2550\u255A\u2550\u2557</c1>","<c1>\u255A\u2550\u2550\u2550\u2550\u255D</c1>"],"0":["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u2551\u2551\u2551\u2551</c1>","<c1>\u2551\u2551\u2551\u2551\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],"1":["<c2>\u2500</c2><c1>\u2554\u2557</c1><c2>\u2500</c2>","<c1>\u2554\u255D\u2551</c1><c2>\u2500</c2>","<c1>\u255A\u2557\u2551</c1><c2>\u2500</c2>","<c2>\u2500</c2><c1>\u2551\u2551</c1><c2>\u2500</c2>","<c1>\u2554\u255D\u255A\u2557</c1>","<c1>\u255A\u2550\u2550\u255D</c1>"],"2":["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u255A\u255D\u2554\u255D\u2551</c1>","<c1>\u2554\u2550\u255D\u2554\u255D</c1>","<c1>\u2551\u2551\u255A\u2550\u2557</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],"3":["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u255A\u255D\u2554\u255D\u2551</c1>","<c1>\u2554\u2557\u255A\u2557\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],"4":["<c1>\u2554\u2557</c1><c2>\u2500</c2><c1>\u2554\u2557</c1>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2551\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2557\u2551</c1>","<c2>\u2500\u2500\u2500</c2><c1>\u2551\u2551</c1>","<c2>\u2500\u2500\u2500</c2><c1>\u255A\u255D</c1>"],"5":["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2550\u255D</c1>","<c1>\u2551\u255A\u2550\u2550\u2557</c1>","<c1>\u255A\u2550\u2550\u2557\u2551</c1>","<c1>\u2554\u2550\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],"6":["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2550\u255D</c1>","<c1>\u2551\u255A\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],"7":["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u255A\u255D\u2554\u255D\u2551</c1>","<c2>\u2500\u2500</c2><c1>\u2551\u2554\u255D</c1>","<c2>\u2500\u2500</c2><c1>\u2551\u2551</c1><c2>\u2500</c2>","<c2>\u2500\u2500</c2><c1>\u255A\u255D</c1><c2>\u2500</c2>"],"8":["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],"9":["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2557\u2551</c1>","<c1>\u2554\u2550\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],"!":["<c1>\u2554\u2557</c1>","<c1>\u2551\u2551</c1>","<c1>\u2551\u2551</c1>","<c1>\u255A\u255D</c1>","<c1>\u2554\u2557</c1>","<c1>\u255A\u255D</c1>"],"?":["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u255A\u255D\u2554\u255D\u2551</c1>","<c2>\u2500\u2500</c2><c1>\u2551\u2554\u255D</c1>","<c2>\u2500\u2500</c2><c1>\u2554\u2557</c1><c2>\u2500</c2>","<c2>\u2500\u2500</c2><c1>\u255A\u255D</c1><c2>\u2500</c2>"],".":["<c2>\u2500\u2500</c2>","<c2>\u2500\u2500</c2>","<c2>\u2500\u2500</c2>","<c2>\u2500\u2500</c2>","<c1>\u2554\u2557</c1>","<c1>\u255A\u255D</c1>"],"+":["<c2>\u2500\u2500\u2500\u2500</c2>","<c2>\u2500\u2500\u2500\u2500</c2>","<c2>\u2500</c2><c1>\u2554\u2557</c1><c2>\u2500</c2>","<c1>\u2554\u255D\u255A\u2557</c1>","<c1>\u255A\u2557\u2554\u255D</c1>","<c2>\u2500</c2><c1>\u255A\u255D</c1><c2>\u2500</c2>"],"-":["<c2>\u2500\u2500\u2500\u2500</c2>","<c2>\u2500\u2500\u2500\u2500</c2>","<c1>\u2554\u2550\u2550\u2557</c1>","<c1>\u255A\u2550\u2550\u255D</c1>","<c2>\u2500\u2500\u2500\u2500</c2>","<c2>\u2500\u2500\u2500\u2500</c2>"],_:["<c2>\u2500\u2500\u2500\u2500</c2>","<c2>\u2500\u2500\u2500\u2500</c2>","<c2>\u2500\u2500\u2500\u2500</c2>","<c2>\u2500\u2500\u2500\u2500</c2>","<c1>\u2554\u2550\u2550\u2557</c1>","<c1>\u255A\u2550\u2550\u255D</c1>"],"=":["<c2>\u2500\u2500\u2500\u2500\u2500</c2>","<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>","<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>","<c2>\u2500\u2500\u2500\u2500\u2500</c2>"],"@":["<c1>\u2554\u2550\u2550\u2550\u2550\u2557</c1><c2>\u2500</c2>","<c1>\u2551\u2554\u2550\u2550\u2557\u2551</c1><c2>\u2500</c2>","<c1>\u2551\u2551\u2554\u2550\u2551\u2551</c1><c2>\u2500</c2>","<c1>\u2551\u2551\u255A\u255D\u2551\u2551</c1><c2>\u2500</c2>","<c1>\u2551\u255A\u2550\u2550\u255D\u2560\u2557</c1>","<c1>\u255A\u2550\u2550\u2550\u2550\u2550\u255D</c1>"],"#":["<c2>\u2500</c2><c1>\u2554\u2569\u2569\u2569\u2557</c1><c2>\u2500</c2>","<c1>\u2554\u255D\u2554\u2550\u2557\u255A\u2557</c1>","<c1>\u255A\u2557\u2560\u2550\u2563\u2554\u255D</c1>","<c1>\u2554\u255D\u2560\u2550\u2563\u255A\u2557</c1>","<c1>\u255A\u2557\u255A\u2550\u255D\u2554\u255D</c1>","<c2>\u2500</c2><c1>\u255A\u2566\u2566\u2566\u255D</c1><c2>\u2500</c2>"],$:["<c1>\u2554\u255D\u2569\u255A\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u255A\u2550\u2550\u2557</c1>","<c1>\u255A\u2550\u2550\u2557\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u255A\u2557\u2566\u2554\u255D</c1>"],"%":["<c1>\u2554\u2557</c1><c2>\u2500\u2500</c2><c1>\u2554\u2550\u2557</c1>","<c1>\u255A\u255D</c1><c2>\u2500</c2><c1>\u2554\u255D\u2554\u255D</c1>","<c2>\u2500\u2500</c2><c1>\u2554\u255D\u2554\u255D</c1><c2>\u2500</c2>","<c2>\u2500</c2><c1>\u2554\u255D\u2554\u255D</c1><c2>\u2500\u2500</c2>","<c1>\u2554\u255D\u2554\u255D</c1><c2>\u2500</c2><c1>\u2554\u2557</c1>","<c1>\u255A\u2550\u255D</c1><c2>\u2500\u2500</c2><c1>\u255A\u255D</c1>"],"&":["<c2>\u2500\u2500</c2><c1>\u2554\u2557</c1><c2>\u2500</c2>","<c2>\u2500\u2500</c2><c1>\u2551\u2551</c1><c2>\u2500</c2>","<c1>\u2554\u2550\u255D\u255A\u2557</c1>","<c1>\u2551\u2554\u2557\u2554\u255D</c1>","<c1>\u2551\u255A\u255D\u2551</c1><c2>\u2500</c2>","<c1>\u255A\u2550\u2550\u255D</c1><c2>\u2500</c2>"],"(":["<c2>\u2500\u2500</c2><c1>\u2554\u2550\u2557</c1>","<c2>\u2500</c2><c1>\u2554\u255D\u2554\u255D</c1>","<c1>\u2554\u255D\u2554\u255D</c1><c2>\u2500</c2>","<c1>\u255A\u2557\u255A\u2557</c1><c2>\u2500</c2>","<c2>\u2500</c2><c1>\u255A\u2557\u255A\u2557</c1>","<c2>\u2500\u2500</c2><c1>\u255A\u2550\u255D</c1>"],")":["<c1>\u2554\u2550\u2557</c1><c2>\u2500\u2500</c2>","<c1>\u255A\u2557\u255A\u2557</c1><c2>\u2500</c2>","<c2>\u2500</c2><c1>\u255A\u2557\u255A\u2557</c1>","<c2>\u2500</c2><c1>\u2554\u255D\u2554\u255D</c1>","<c1>\u2554\u255D\u2554\u255D</c1><c2>\u2500</c2>","<c1>\u255A\u2550\u255D</c1><c2>\u2500\u2500</c2>"],"/":["<c2>\u2500\u2500\u2500\u2500</c2><c1>\u2554\u2550\u2557</c1>","<c2>\u2500\u2500\u2500</c2><c1>\u2554\u255D\u2554\u255D</c1>","<c2>\u2500\u2500</c2><c1>\u2554\u255D\u2554\u255D</c1><c2>\u2500</c2>","<c2>\u2500</c2><c1>\u2554\u255D\u2554\u255D</c1><c2>\u2500\u2500</c2>","<c1>\u2554\u255D\u2554\u255D</c1><c2>\u2500\u2500\u2500</c2>","<c1>\u255A\u2550\u255D</c1><c2>\u2500\u2500\u2500\u2500</c2>"],":":["<c2>\u2500\u2500</c2>","<c1>\u2554\u2557</c1>","<c1>\u255A\u255D</c1>","<c1>\u2554\u2557</c1>","<c1>\u255A\u255D</c1>","<c2>\u2500\u2500</c2>"],";":["<c2>\u2500\u2500</c2>","<c2>\u2500\u2500</c2>","<c2>\u2500\u2500</c2>","<c1>\u2554\u2557</c1>","<c1>\u255A\u2563</c1>","<c2>\u2500</c2><c1>\u255D</c1>"],",":["<c1>\u2554\u2557</c1>","<c1>\u2551\u2551</c1>","<c1>\u255A\u255D</c1>","<c1>\u2554\u2557</c1>","<c1>\u255A\u2563</c1>","<c2>\u2500</c2><c1>\u255D</c1>"],"'":["<c1>\u2554\u2557</c1>","<c1>\u2551\u2551</c1>","<c1>\u255A\u255D</c1>","<c2>\u2500\u2500</c2>","<c2>\u2500\u2500</c2>","<c2>\u2500\u2500</c2>"],'"':["<c1>\u2554\u2557\u2554\u2557</c1>","<c1>\u2551\u2551\u2551\u2551</c1>","<c1>\u255A\u255D\u255A\u255D</c1>","<c2>\u2500\u2500\u2500\u2500</c2>","<c2>\u2500\u2500\u2500\u2500</c2>","<c2>\u2500\u2500\u2500\u2500</c2>"]," ":["<c2>\u2500\u2500\u2500</c2>","<c2>\u2500\u2500\u2500</c2>","<c2>\u2500\u2500\u2500</c2>","<c2>\u2500\u2500\u2500</c2>","<c2>\u2500\u2500\u2500</c2>","<c2>\u2500\u2500\u2500</c2>"]}},fonts={tiny:tiny_default,block:block_default,shade:shade_default,slick:slick_default,huge:huge_default,grid:grid_default,pallet:pallet_default},parsedFonts={};TextAttributes={NONE:0,BOLD:1,DIM:2,ITALIC:4,UNDERLINE:8,BLINK:16,INVERSE:32,HIDDEN:64,STRIKETHROUGH:128};((DebugOverlayCorner2)=>{DebugOverlayCorner2[DebugOverlayCorner2.topLeft=0]="topLeft",DebugOverlayCorner2[DebugOverlayCorner2.topRight=1]="topRight",DebugOverlayCorner2[DebugOverlayCorner2.bottomLeft=2]="bottomLeft",DebugOverlayCorner2[DebugOverlayCorner2.bottomRight=3]="bottomRight"})(DebugOverlayCorner||={});((TargetChannel2)=>{TargetChannel2[TargetChannel2.FG=1]="FG",TargetChannel2[TargetChannel2.BG=2]="BG",TargetChannel2[TargetChannel2.Both=3]="Both"})(TargetChannel||={});BrandedStyledText=Symbol.for("@opentui/core/StyledText");StyledText=class StyledText{[BrandedStyledText]=!0;chunks;constructor(chunks){this.chunks=chunks}};kittyKeyMap={27:"escape",9:"tab",13:"return",127:"backspace",57344:"escape",57345:"return",57346:"tab",57347:"backspace",57348:"insert",57349:"delete",57350:"left",57351:"right",57352:"up",57353:"down",57354:"pageup",57355:"pagedown",57356:"home",57357:"end",57358:"capslock",57359:"scrolllock",57360:"numlock",57361:"printscreen",57362:"pause",57363:"menu",57364:"f1",57365:"f2",57366:"f3",57367:"f4",57368:"f5",57369:"f6",57370:"f7",57371:"f8",57372:"f9",57373:"f10",57374:"f11",57375:"f12",57376:"f13",57377:"f14",57378:"f15",57379:"f16",57380:"f17",57381:"f18",57382:"f19",57383:"f20",57384:"f21",57385:"f22",57386:"f23",57387:"f24",57388:"f25",57389:"f26",57390:"f27",57391:"f28",57392:"f29",57393:"f30",57394:"f31",57395:"f32",57396:"f33",57397:"f34",57398:"f35",57399:"kp0",57400:"kp1",57401:"kp2",57402:"kp3",57403:"kp4",57404:"kp5",57405:"kp6",57406:"kp7",57407:"kp8",57408:"kp9",57409:"kpdecimal",57410:"kpdivide",57411:"kpmultiply",57412:"kpminus",57413:"kpplus",57414:"kpenter",57415:"kpequal",57416:"kpseparator",57417:"kpleft",57418:"kpright",57419:"kpup",57420:"kpdown",57421:"kppageup",57422:"kppagedown",57423:"kphome",57424:"kpend",57425:"kpinsert",57426:"kpdelete",57427:"clear",57428:"mediaplay",57429:"mediapause",57430:"mediaplaypause",57431:"mediareverse",57432:"mediastop",57433:"mediafastforward",57434:"mediarewind",57435:"medianext",57436:"mediaprev",57437:"mediarecord",57438:"volumedown",57439:"volumeup",57440:"mute",57441:"leftshift",57442:"leftctrl",57443:"leftalt",57444:"leftsuper",57445:"lefthyper",57446:"leftmeta",57447:"rightshift",57448:"rightctrl",57449:"rightalt",57450:"rightsuper",57451:"righthyper",57452:"rightmeta",57453:"iso_level3_shift",57454:"iso_level5_shift"};functionalKeyMap={A:"up",B:"down",C:"right",D:"left",H:"home",F:"end",E:"clear",P:"f1",Q:"f2",S:"f4"},tildeKeyMap={"1":"home","2":"insert","3":"delete","4":"end","5":"pageup","6":"pagedown","7":"home","8":"end","11":"f1","12":"f2","13":"f3","14":"f4","15":"f5","17":"f6","18":"f7","19":"f8","20":"f9","21":"f10","23":"f11","24":"f12","29":"menu","57427":"clear"};metaKeyCodeRe=/^(?:\x1b)([a-zA-Z0-9])$/,fnKeyRe=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,keyName={OP:"f1",OQ:"f2",OR:"f3",OS:"f4","[11~":"f1","[12~":"f2","[13~":"f3","[14~":"f4","[[A":"f1","[[B":"f2","[[C":"f3","[[D":"f4","[[E":"f5","[15~":"f5","[17~":"f6","[18~":"f7","[19~":"f8","[20~":"f9","[21~":"f10","[23~":"f11","[24~":"f12","[29~":"menu","[57427~":"clear","[A":"up","[B":"down","[C":"right","[D":"left","[E":"clear","[F":"end","[H":"home","[P":"f1","[Q":"f2","[S":"f4",OA:"up",OB:"down",OC:"right",OD:"left",OE:"clear",OF:"end",OH:"home","[1~":"home","[2~":"insert","[3~":"delete","[4~":"end","[5~":"pageup","[6~":"pagedown","[[5~":"pageup","[[6~":"pagedown","[7~":"home","[8~":"end","[a":"up","[b":"down","[c":"right","[d":"left","[e":"clear",f:"right",b:"left",p:"up",n:"down","[2$":"insert","[3$":"delete","[5$":"pageup","[6$":"pagedown","[7$":"home","[8$":"end",Oa:"up",Ob:"down",Oc:"right",Od:"left",Oe:"clear","[2^":"insert","[3^":"delete","[5^":"pageup","[6^":"pagedown","[7^":"home","[8^":"end","[Z":"tab"},nonAlphanumericKeys=[...Object.values(keyName),"backspace"],modifyOtherKeysRe=/^\x1b\[27;(\d+);(\d+)~$/;MouseParser=class MouseParser{mouseButtonsPressed=new Set;static SCROLL_DIRECTIONS={0:"up",1:"down",2:"left",3:"right"};reset(){this.mouseButtonsPressed.clear()}decodeInput(data){return(Buffer.isBuffer(data)?data:Buffer.from(data.buffer,data.byteOffset,data.byteLength)).toString("latin1")}parseMouseEvent(data){let str5=this.decodeInput(data);return this.parseMouseSequenceAt(str5,0)?.event??null}parseAllMouseEvents(data){let str5=this.decodeInput(data),events=[],offset=0;while(offset<str5.length){let parsed=this.parseMouseSequenceAt(str5,offset);if(!parsed)break;events.push(parsed.event),offset+=parsed.consumed}return events}parseMouseSequenceAt(str5,offset){if(!str5.startsWith("\x1B[",offset))return null;let introducer=str5[offset+2];if(introducer==="<")return this.parseSgrSequence(str5,offset);if(introducer==="M")return this.parseBasicSequence(str5,offset);return null}parseSgrSequence(str5,offset){let index=offset+3,values2=[0,0,0],part=0,hasDigit=!1;while(index<str5.length){let char=str5[index],charCode=str5.charCodeAt(index);if(charCode>=48&&charCode<=57){hasDigit=!0,values2[part]=values2[part]*10+(charCode-48),index++;continue}switch(char){case";":{if(!hasDigit||part>=2)return null;part++,hasDigit=!1,index++;break}case"M":case"m":{if(!hasDigit||part!==2)return null;return{event:this.decodeSgrEvent(values2[0],values2[1],values2[2],char),consumed:index-offset+1}}default:return null}}return null}parseBasicSequence(str5,offset){if(offset+6>str5.length)return null;let buttonByte=str5.charCodeAt(offset+3)-32,x=str5.charCodeAt(offset+4)-33,y=str5.charCodeAt(offset+5)-33;return{event:this.decodeBasicEvent(buttonByte,x,y),consumed:6}}decodeSgrEvent(rawButtonCode,wireX,wireY,pressRelease){let button=rawButtonCode&3,isScroll=(rawButtonCode&64)!==0,scrollDirection=!isScroll?void 0:MouseParser.SCROLL_DIRECTIONS[button],isMotion=(rawButtonCode&32)!==0,modifiers={shift:(rawButtonCode&4)!==0,alt:(rawButtonCode&8)!==0,ctrl:(rawButtonCode&16)!==0},type2,scrollInfo;if(isMotion){let isDragging=this.mouseButtonsPressed.size>0;if(button===3)type2="move";else if(isDragging)type2="drag";else type2="move"}else if(isScroll&&pressRelease==="M")type2="scroll",scrollInfo={direction:scrollDirection,delta:1};else if(type2=pressRelease==="M"?"down":"up",type2==="down"&&button!==3)this.mouseButtonsPressed.add(button);else if(type2==="up")this.mouseButtonsPressed.clear();return{type:type2,button:button===3?0:button,x:wireX-1,y:wireY-1,modifiers,scroll:scrollInfo}}decodeBasicEvent(buttonByte,x,y){let button=buttonByte&3,isScroll=(buttonByte&64)!==0,isMotion=(buttonByte&32)!==0,scrollDirection=!isScroll?void 0:MouseParser.SCROLL_DIRECTIONS[button],modifiers={shift:(buttonByte&4)!==0,alt:(buttonByte&8)!==0,ctrl:(buttonByte&16)!==0},type2,actualButton,scrollInfo;if(isMotion)type2="move",actualButton=button===3?-1:button;else if(isScroll)type2="scroll",actualButton=0,scrollInfo={direction:scrollDirection,delta:1};else type2=button===3?"up":"down",actualButton=button===3?0:button;return{type:type2,button:actualButton,x,y,modifiers,scroll:scrollInfo}}};singletonCacheSymbol=Symbol.for("@opentui/core/singleton");envRegistry=singleton("env-registry",()=>({}));envStore=singleton("env-store",()=>new EnvStore);env=new Proxy({},{get(target,prop){if(typeof prop!=="string")return;return envStore.get(prop)},has(target,prop){return envStore.has(prop)},ownKeys(){return Object.keys(envRegistry)},getOwnPropertyDescriptor(target,prop){if(envStore.has(prop))return{enumerable:!0,configurable:!0,get:()=>envStore.get(prop)};return}}),BRACKETED_PASTE_START=Buffer3.from("\x1B[200~"),BRACKETED_PASTE_END=Buffer3.from("\x1B[201~"),EMPTY_BYTES=new Uint8Array(0),KEY_DECODER=new TextDecoder,DEFAULT_PROTOCOL_CONTEXT={kittyKeyboardEnabled:!1,privateCapabilityRepliesActive:!1,pixelResolutionQueryActive:!1,explicitWidthCprActive:!1,startupCursorCprActive:!1},RXVT_DOLLAR_CSI_RE=/^\x1b\[\d+\$$/,SYSTEM_CLOCK=new SystemClock;registerEnvVar({name:"OTUI_TS_STYLE_WARN",default:!1,description:"Enable warnings for missing syntax styles"});TIMERS_MAP=new Map;registerEnvVar({name:"OTUI_TREE_SITTER_WORKER_PATH",description:"Path to the TreeSitter worker",type:"string",default:""});DEFAULT_PARSERS=getParsers();TreeSitterClient=class TreeSitterClient extends EventEmitter22{initialized=!1;worker;buffers=new Map;initializePromise;initializeResolvers;messageCallbacks=new Map;messageIdCounter=0;editQueues=new Map;debouncer;options;constructor(options){super();this.options=options,this.debouncer=createDebounce("tree-sitter-client"),this.startWorker()}emitError(error2,bufferId){if(this.listenerCount("error")>0)this.emit("error",error2,bufferId)}emitWarning(warning,bufferId){if(this.listenerCount("warning")>0)this.emit("warning",warning,bufferId)}startWorker(){if(this.worker)return;let worker_path;if(env.OTUI_TREE_SITTER_WORKER_PATH)worker_path=env.OTUI_TREE_SITTER_WORKER_PATH;else if(typeof OTUI_TREE_SITTER_WORKER_PATH<"u")worker_path=OTUI_TREE_SITTER_WORKER_PATH;else if(this.options.workerPath)worker_path=this.options.workerPath;else if(worker_path=new URL("./parser.worker.js",import.meta.url).href,!existsSync65(resolve22(import.meta.dirname,"parser.worker.js")))worker_path=new URL("./parser.worker.ts",import.meta.url).href;this.worker=new Worker(worker_path),this.worker.onmessage=this.handleWorkerMessage.bind(this),this.worker.onerror=(error2)=>{if(console.error("TreeSitter worker error:",error2.message),this.initializeResolvers)clearTimeout(this.initializeResolvers.timeoutId),this.initializeResolvers.reject(Error(`Worker error: ${error2.message}`)),this.initializeResolvers=void 0;this.emitError(`Worker error: ${error2.message}`)}}stopWorker(){if(!this.worker)return;this.worker.terminate(),this.worker=void 0}handleReset(){return this.buffers.clear(),this.stopWorker(),this.startWorker(),this.initializePromise=void 0,this.initializeResolvers=void 0,this.initialize()}async initialize(){if(this.initializePromise)return this.initializePromise;return this.initializePromise=new Promise((resolve32,reject)=>{let timeoutMs=this.options.initTimeout??1e4,timeoutId=setTimeout(()=>{let error2=Error("Worker initialization timed out");console.error("TreeSitter client:",error2.message),this.initializeResolvers=void 0,reject(error2)},timeoutMs);this.initializeResolvers={resolve:resolve32,reject,timeoutId},this.worker?.postMessage({type:"INIT",dataPath:this.options.dataPath})}),await this.initializePromise,await this.registerDefaultParsers(),this.initializePromise}async registerDefaultParsers(){for(let parser of DEFAULT_PARSERS)this.addFiletypeParser(parser)}resolvePath(path6){if(isUrl(path6))return path6;if(isBunfsPath(path6))return normalizeBunfsPath(parse2(path6).base);if(!isAbsolute4(path6))return resolve22(path6);return path6}addFiletypeParser(filetypeParser){let resolvedParser={...filetypeParser,aliases:filetypeParser.aliases?[...new Set(filetypeParser.aliases.filter((alias)=>alias!==filetypeParser.filetype))]:void 0,wasm:this.resolvePath(filetypeParser.wasm),queries:{highlights:filetypeParser.queries.highlights.map((path6)=>this.resolvePath(path6)),injections:filetypeParser.queries.injections?.map((path6)=>this.resolvePath(path6))}};this.worker?.postMessage({type:"ADD_FILETYPE_PARSER",filetypeParser:resolvedParser})}async getPerformance(){let messageId=`performance_${this.messageIdCounter++}`;return new Promise((resolve32)=>{this.messageCallbacks.set(messageId,resolve32),this.worker?.postMessage({type:"GET_PERFORMANCE",messageId})})}async highlightOnce(content,filetype){if(!this.initialized)try{await this.initialize()}catch(error2){return{error:"Could not highlight because of initialization error"}}let messageId=`oneshot_${this.messageIdCounter++}`;return new Promise((resolve32)=>{this.messageCallbacks.set(messageId,resolve32),this.worker?.postMessage({type:"ONESHOT_HIGHLIGHT",content,filetype,messageId})})}handleWorkerMessage(event){let{type:type2,bufferId,error:error2,highlights,warning,messageId,hasParser,performance:performance22,version}=event.data;if(type2==="HIGHLIGHT_RESPONSE"){let buffer2=this.buffers.get(bufferId);if(!buffer2||!buffer2.hasParser)return;if(buffer2.version!==version){this.resetBuffer(bufferId,buffer2.version,buffer2.content);return}this.emit("highlights:response",bufferId,version,highlights)}if(type2==="INIT_RESPONSE"){if(this.initializeResolvers){if(clearTimeout(this.initializeResolvers.timeoutId),error2)console.error("TreeSitter client initialization failed:",error2),this.initializeResolvers.reject(Error(error2));else this.initialized=!0,this.initializeResolvers.resolve();this.initializeResolvers=void 0;return}}if(type2==="PARSER_INIT_RESPONSE"){let callback=this.messageCallbacks.get(messageId);if(callback)this.messageCallbacks.delete(messageId),callback({hasParser,warning,error:error2});return}if(type2==="PRELOAD_PARSER_RESPONSE"){let callback=this.messageCallbacks.get(messageId);if(callback)this.messageCallbacks.delete(messageId),callback({hasParser});return}if(type2==="BUFFER_DISPOSED"){let callback=this.messageCallbacks.get(`dispose_${bufferId}`);if(callback)this.messageCallbacks.delete(`dispose_${bufferId}`),callback(!0);this.emit("buffer:disposed",bufferId);return}if(type2==="PERFORMANCE_RESPONSE"){let callback=this.messageCallbacks.get(messageId);if(callback)this.messageCallbacks.delete(messageId),callback(performance22);return}if(type2==="ONESHOT_HIGHLIGHT_RESPONSE"){let callback=this.messageCallbacks.get(messageId);if(callback)this.messageCallbacks.delete(messageId),callback({highlights,warning,error:error2});return}if(type2==="UPDATE_DATA_PATH_RESPONSE"){let callback=this.messageCallbacks.get(messageId);if(callback)this.messageCallbacks.delete(messageId),callback({error:error2});return}if(type2==="CLEAR_CACHE_RESPONSE"){let callback=this.messageCallbacks.get(messageId);if(callback)this.messageCallbacks.delete(messageId),callback({error:error2});return}if(warning){this.emitWarning(warning,bufferId);return}if(error2){this.emitError(error2,bufferId);return}if(type2==="WORKER_LOG"){let{logType,data}=event.data,message=data.join(" ");this.emit("worker:log",logType,message);return}}async preloadParser(filetype){let messageId=`has_parser_${this.messageIdCounter++}`;return(await new Promise((resolve32)=>{this.messageCallbacks.set(messageId,resolve32),this.worker?.postMessage({type:"PRELOAD_PARSER",filetype,messageId})})).hasParser}async createBuffer(id,content,filetype,version=1,autoInitialize=!0){if(!this.initialized){if(!autoInitialize)return this.emitError("Could not create buffer because client is not initialized"),!1;try{await this.initialize()}catch(error2){return this.emitError("Could not create buffer because of initialization error"),!1}}if(this.buffers.has(id))throw Error(`Buffer with id ${id} already exists`);this.buffers.set(id,{id,content,filetype,version,hasParser:!1});let messageId=`init_${this.messageIdCounter++}`,response=await new Promise((resolve32)=>{this.messageCallbacks.set(messageId,resolve32),this.worker?.postMessage({type:"INITIALIZE_PARSER",bufferId:id,version,content,filetype,messageId})});if(!response.hasParser){if(this.emit("buffer:initialized",id,!1),filetype!=="plaintext")this.emitWarning(response.warning||response.error||"Buffer has no parser",id);return!1}let bufferState={id,content,filetype,version,hasParser:!0};return this.buffers.set(id,bufferState),this.emit("buffer:initialized",id,!0),!0}async updateBuffer(id,edits,newContent,version){if(!this.initialized)return;let buffer2=this.buffers.get(id);if(!buffer2||!buffer2.hasParser)return;if(this.buffers.set(id,{...buffer2,content:newContent,version}),!this.editQueues.has(id))this.editQueues.set(id,new ProcessQueue((item)=>this.processEdit(id,item.edits,item.newContent,item.version,item.isReset)));this.editQueues.get(id).enqueue({edits,newContent,version})}async processEdit(bufferId,edits,newContent,version,isReset=!1){this.worker?.postMessage({type:isReset?"RESET_BUFFER":"HANDLE_EDITS",bufferId,version,content:newContent,edits})}async removeBuffer(bufferId){if(!this.initialized)return;if(this.buffers.delete(bufferId),this.editQueues.has(bufferId))this.editQueues.get(bufferId)?.clear(),this.editQueues.delete(bufferId);if(this.worker)await new Promise((resolve32)=>{let messageId=`dispose_${bufferId}`;this.messageCallbacks.set(messageId,resolve32);try{this.worker.postMessage({type:"DISPOSE_BUFFER",bufferId})}catch(error2){console.error("Error disposing buffer",error2),resolve32(!1)}setTimeout(()=>{if(this.messageCallbacks.has(messageId))this.messageCallbacks.delete(messageId),console.warn({bufferId},"Timed out waiting for buffer to be disposed"),resolve32(!1)},3000)});this.debouncer.clearDebounce(`reset-${bufferId}`)}async destroy(){if(this.initializeResolvers)clearTimeout(this.initializeResolvers.timeoutId),this.initializeResolvers.reject(Error("Client destroyed during initialization")),this.initializeResolvers=void 0;for(let[messageId,callback]of this.messageCallbacks.entries())if(typeof callback==="function")try{callback({error:"Client destroyed"})}catch(e){}this.messageCallbacks.clear(),clearDebounceScope("tree-sitter-client"),this.debouncer.clear(),this.editQueues.clear(),this.buffers.clear(),this.stopWorker(),this.initialized=!1,this.initializePromise=void 0}async resetBuffer(bufferId,version,content){if(!this.initialized)return;let buffer2=this.buffers.get(bufferId);if(!buffer2||!buffer2.hasParser){this.emitError("Cannot reset buffer with no parser",bufferId);return}this.buffers.set(bufferId,{...buffer2,content,version}),this.debouncer.debounce(`reset-${bufferId}`,10,()=>this.processEdit(bufferId,[],content,version,!0))}getBuffer(bufferId){return this.buffers.get(bufferId)}getAllBuffers(){return Array.from(this.buffers.values())}isInitialized(){return this.initialized}async setDataPath(dataPath){if(this.options.dataPath===dataPath)return;if(this.options.dataPath=dataPath,this.initialized&&this.worker){let messageId=`update_datapath_${this.messageIdCounter++}`;return new Promise((resolve32,reject)=>{this.messageCallbacks.set(messageId,(response)=>{if(response.error)reject(Error(response.error));else resolve32()}),this.worker.postMessage({type:"UPDATE_DATA_PATH",dataPath,messageId})})}}async clearCache(){if(!this.initialized||!this.worker)throw Error("Cannot clear cache: client is not initialized");let messageId=`clear_cache_${this.messageIdCounter++}`;return new Promise((resolve32,reject)=>{this.messageCallbacks.set(messageId,(response)=>{if(response.error)reject(Error(response.error));else resolve32()}),this.worker.postMessage({type:"CLEAR_CACHE",messageId})})}};registerEnvVar({name:"XDG_CONFIG_HOME",description:"Base directory for user-specific configuration files",type:"string",default:""});registerEnvVar({name:"XDG_DATA_HOME",description:"Base directory for user-specific data files",type:"string",default:""});DataPathsManager=class DataPathsManager extends EventEmitter3{_appName;_globalConfigPath;_globalConfigFile;_localConfigFile;_globalDataPath;constructor(){super();this._appName="opentui"}get appName(){return this._appName}set appName(value){if(!isValidDirectoryName(value))throw Error(`Invalid app name "${value}": must be a valid directory name`);if(this._appName!==value)this._appName=value,this._globalConfigPath=void 0,this._globalConfigFile=void 0,this._localConfigFile=void 0,this._globalDataPath=void 0,this.emit("paths:changed",this.toObject())}get globalConfigPath(){if(this._globalConfigPath===void 0){let homeDir=os3.homedir(),baseConfigDir=env.XDG_CONFIG_HOME||path3.join(homeDir,".config");this._globalConfigPath=path3.join(baseConfigDir,this._appName)}return this._globalConfigPath}get globalConfigFile(){if(this._globalConfigFile===void 0)this._globalConfigFile=path3.join(this.globalConfigPath,"init.ts");return this._globalConfigFile}get localConfigFile(){if(this._localConfigFile===void 0)this._localConfigFile=path3.join(process.cwd(),`.${this._appName}.ts`);return this._localConfigFile}get globalDataPath(){if(this._globalDataPath===void 0){let homeDir=os3.homedir(),baseDataDir=env.XDG_DATA_HOME||path3.join(homeDir,".local/share");this._globalDataPath=path3.join(baseDataDir,this._appName)}return this._globalDataPath}toObject(){return{globalConfigPath:this.globalConfigPath,globalConfigFile:this.globalConfigFile,localConfigFile:this.localConfigFile,globalDataPath:this.globalDataPath}}};extensionToFiletype=new Map([["astro","astro"],["bash","bash"],["c","c"],["cc","cpp"],["cjs","javascript"],["clj","clojure"],["cljs","clojure"],["cljc","clojure"],["cpp","cpp"],["cxx","cpp"],["cs","csharp"],["cts","typescript"],["ctsx","typescriptreact"],["dart","dart"],["diff","diff"],["edn","clojure"],["go","go"],["gemspec","ruby"],["groovy","groovy"],["h","c"],["handlebars","handlebars"],["hbs","handlebars"],["hpp","cpp"],["hxx","cpp"],["h++","cpp"],["hh","cpp"],["hrl","erlang"],["hs","haskell"],["htm","html"],["html","html"],["ini","ini"],["js","javascript"],["jsx","javascriptreact"],["jl","julia"],["json","json"],["ksh","bash"],["kt","kotlin"],["kts","kotlin"],["latex","latex"],["less","less"],["lua","lua"],["markdown","markdown"],["md","markdown"],["mdown","markdown"],["mkd","markdown"],["mjs","javascript"],["ml","ocaml"],["mli","ocaml"],["mts","typescript"],["mtsx","typescriptreact"],["patch","diff"],["php","php"],["pl","perl"],["pm","perl"],["ps1","powershell"],["psm1","powershell"],["py","python"],["pyi","python"],["r","r"],["rb","ruby"],["rake","ruby"],["rs","rust"],["ru","ruby"],["sass","sass"],["sc","scala"],["scala","scala"],["scss","scss"],["sh","bash"],["sql","sql"],["svelte","svelte"],["swift","swift"],["ts","typescript"],["tsx","typescriptreact"],["tex","latex"],["toml","toml"],["vue","vue"],["vim","vim"],["xml","xml"],["xsl","xsl"],["yaml","yaml"],["yml","yaml"],["zig","zig"],["zon","zig"],["zsh","bash"],["c++","cpp"],["erl","erlang"],["exs","elixir"],["ex","elixir"],["elm","elm"],["fsharp","fsharp"],["fs","fsharp"],["fsx","fsharp"],["fsscript","fsharp"],["fsi","fsharp"],["java","java"],["css","css"]]),basenameToFiletype=new Map([[".bash_aliases","bash"],[".bash_logout","bash"],[".bash_profile","bash"],[".bashrc","bash"],[".kshrc","bash"],[".profile","bash"],[".vimrc","vim"],[".zlogin","bash"],[".zlogout","bash"],[".zprofile","bash"],[".zshenv","bash"],[".zshrc","bash"],["appfile","ruby"],["berksfile","ruby"],["brewfile","ruby"],["cheffile","ruby"],["containerfile","dockerfile"],["dockerfile","dockerfile"],["fastfile","ruby"],["gemfile","ruby"],["gnumakefile","make"],["gvimrc","vim"],["guardfile","ruby"],["makefile","make"],["podfile","ruby"],["rakefile","ruby"],["thorfile","ruby"],["vagrantfile","ruby"]]);SYSTEM_CLOCK2=new SystemClock,OSC4_RESPONSE=/\x1b]4;(\d+);(?:(?:rgb:)([0-9a-fA-F]+)\/([0-9a-fA-F]+)\/([0-9a-fA-F]+)|#([0-9a-fA-F]{6}))(?:\x07|\x1b\\)/g,OSC_SPECIAL_RESPONSE=/\x1b](\d+);(?:(?:rgb:)([0-9a-fA-F]+)\/([0-9a-fA-F]+)\/([0-9a-fA-F]+)|#([0-9a-fA-F]{6}))(?:\x07|\x1b\\)/g;DEFAULT_FOREGROUND_FALLBACK=RGBA.fromInts(...DEFAULT_FOREGROUND_RGB),DEFAULT_BACKGROUND_FALLBACK=RGBA.fromInts(...DEFAULT_BACKGROUND_RGB);PASTE_TEXT_DECODER=new TextDecoder;URL_SCOPES=["markup.link.url","string.special.url"];pointerSize=process.arch==="x64"||process.arch==="arm64"?8:4,typeSizes={u8:1,bool_u8:1,bool_u32:4,u16:2,i16:2,u32:4,u64:8,f32:4,f64:8,pointer:pointerSize,i32:4},primitiveKeys=Object.keys(typeSizes);typeAlignments={...typeSizes},typeGetters={u8:(view,offset)=>view.getUint8(offset),bool_u8:(view,offset)=>Boolean(view.getUint8(offset)),bool_u32:(view,offset)=>Boolean(view.getUint32(offset,!0)),u16:(view,offset)=>view.getUint16(offset,!0),i16:(view,offset)=>view.getInt16(offset,!0),u32:(view,offset)=>view.getUint32(offset,!0),u64:(view,offset)=>view.getBigUint64(offset,!0),f32:(view,offset)=>view.getFloat32(offset,!0),f64:(view,offset)=>view.getFloat64(offset,!0),i32:(view,offset)=>view.getInt32(offset,!0),pointer:(view,offset)=>pointerSize===8?view.getBigUint64(offset,!0):BigInt(view.getUint32(offset,!0))};({pack:pointerPacker,unpack:pointerUnpacker}=primitivePackers("pointer"));encoder=new TextEncoder,decoder=new TextDecoder;StyledChunkStruct=defineStruct([["text","char*"],["text_len","u64",{lengthOf:"text"}],["fg","pointer",{optional:!0,packTransform:rgbaPackTransform,unpackTransform:rgbaUnpackTransform}],["bg","pointer",{optional:!0,packTransform:rgbaPackTransform,unpackTransform:rgbaUnpackTransform}],["fg_tag","u16",{default:COLOR_TAG_RGB}],["bg_tag","u16",{default:COLOR_TAG_RGB}],["attributes","u32",{default:0}],["link","char*",{default:""}],["link_len","u64",{lengthOf:"link"}]],{mapValue:(chunk)=>{let normalizedFg=normalizeColorValue(chunk.fg??null),normalizedBg=normalizeColorValue(chunk.bg??null);if(!chunk.link||typeof chunk.link==="string")return{...chunk,fg:normalizedFg?.rgba??null,bg:normalizedBg?.rgba??null,fg_tag:normalizedFg?.tag??COLOR_TAG_RGB,bg_tag:normalizedBg?.tag??COLOR_TAG_RGB};return{...chunk,fg:normalizedFg?.rgba??null,bg:normalizedBg?.rgba??null,fg_tag:normalizedFg?.tag??COLOR_TAG_RGB,bg_tag:normalizedBg?.tag??COLOR_TAG_RGB,link:chunk.link.url}}}),HighlightStruct=defineStruct([["start","u32"],["end","u32"],["styleId","u32"],["priority","u8",{default:0}],["hlRef","u16",{default:0}]]),LogicalCursorStruct=defineStruct([["row","u32"],["col","u32"],["offset","u32"]]),VisualCursorStruct=defineStruct([["visualRow","u32"],["visualCol","u32"],["logicalRow","u32"],["logicalCol","u32"],["offset","u32"]]),UnicodeMethodEnum=defineEnum({wcwidth:0,unicode:1},"u8"),TerminalCapabilitiesStruct=defineStruct([["kitty_keyboard","bool_u8"],["kitty_graphics","bool_u8"],["rgb","bool_u8"],["ansi256","bool_u8"],["unicode",UnicodeMethodEnum],["sgr_pixels","bool_u8"],["color_scheme_updates","bool_u8"],["explicit_width","bool_u8"],["scaled_text","bool_u8"],["sixel","bool_u8"],["focus_tracking","bool_u8"],["sync","bool_u8"],["bracketed_paste","bool_u8"],["hyperlinks","bool_u8"],["osc52","bool_u8"],["explicit_cursor_positioning","bool_u8"],["term_name","char*"],["term_name_len","u64",{lengthOf:"term_name"}],["term_version","char*"],["term_version_len","u64",{lengthOf:"term_version"}],["term_from_xtversion","bool_u8"]]),EncodedCharStruct=defineStruct([["width","u8"],["char","u32"]]),LineInfoStruct=defineStruct([["startCols",["u32"]],["startColsLen","u32",{lengthOf:"startCols"}],["widthCols",["u32"]],["widthColsLen","u32",{lengthOf:"widthCols"}],["sources",["u32"]],["sourcesLen","u32",{lengthOf:"sources"}],["wraps",["u32"]],["wrapsLen","u32",{lengthOf:"wraps"}],["widthColsMax","u32"]]),MeasureResultStruct=defineStruct([["lineCount","u32"],["widthColsMax","u32"]]),CursorStateStruct=defineStruct([["x","u32"],["y","u32"],["visible","bool_u8"],["style","u8"],["blinking","bool_u8"],["r","f32"],["g","f32"],["b","f32"],["a","f32"]]),CursorStyleOptionsStruct=defineStruct([["style","u8",{default:255}],["blinking","u8",{default:255}],["color","pointer",{optional:!0,packTransform:rgbaPackTransform,unpackTransform:rgbaUnpackTransform}],["cursor","u8",{default:255}]]),GridDrawOptionsStruct=defineStruct([["drawInner","bool_u8",{default:!0}],["drawOuter","bool_u8",{default:!0}]]),BuildOptionsStruct=defineStruct([["gpaSafeStats","bool_u8"],["gpaMemoryLimitTracking","bool_u8"]]),AllocatorStatsStruct=defineStruct([["totalRequestedBytes","u64"],["activeAllocations","u64"],["smallAllocations","u64"],["largeAllocations","u64"],["requestedBytesValid","bool_u8"]]),GrowthPolicyEnum=defineEnum({grow:0,block:1},"u8"),NativeSpanFeedOptionsStruct=defineStruct([["chunkSize","u32",{default:65536}],["initialChunks","u32",{default:2}],["maxBytes","u64",{default:0n}],["growthPolicy",GrowthPolicyEnum,{default:"grow"}],["autoCommitOnFull","bool_u8",{default:!0}],["spanQueueCapacity","u32",{default:0}]]),NativeSpanFeedStatsStruct=defineStruct([["bytesWritten","u64"],["spansCommitted","u64"],["chunks","u32"],["pendingSpans","u32"]]),SpanInfoStruct=defineStruct([["chunkPtr","pointer"],["offset","u32"],["len","u32"],["chunkIndex","u32"],["reserved","u32",{default:0}]],{reduceValue:(value)=>({chunkPtr:value.chunkPtr,offset:value.offset,len:value.len,chunkIndex:value.chunkIndex})}),ReserveInfoStruct=defineStruct([["ptr","pointer"],["len","u32"],["reserved","u32",{default:0}]],{reduceValue:(value)=>({ptr:value.ptr,len:value.len})}),module=await import(`@opentui/core-${process.platform}-${process.arch}/index.ts`),targetLibPath=module.default;if(isBunfsPath(targetLibPath))targetLibPath=targetLibPath.replace("../","");if(!existsSync210(targetLibPath))throw Error(`opentui is not supported on the current platform: ${process.platform}-${process.arch}`);registerEnvVar({name:"OTUI_DEBUG_FFI",description:"Enable debug logging for the FFI bindings.",type:"boolean",default:!1});registerEnvVar({name:"OTUI_TRACE_FFI",description:"Enable tracing for the FFI bindings.",type:"boolean",default:!1});registerEnvVar({name:"OPENTUI_FORCE_WCWIDTH",description:"Use wcwidth for character width calculations",type:"boolean",default:!1});registerEnvVar({name:"OPENTUI_FORCE_UNICODE",description:"Force Mode 2026 Unicode support in terminal capabilities",type:"boolean",default:!1});registerEnvVar({name:"OPENTUI_GRAPHICS",description:"Enable Kitty graphics protocol detection",type:"boolean",default:!0});registerEnvVar({name:"OPENTUI_FORCE_NOZWJ",description:"Use no_zwj width method (Unicode without ZWJ joining)",type:"boolean",default:!1});CURSOR_STYLE_TO_ID={block:0,line:1,underline:2,default:3},CURSOR_ID_TO_STYLE=["block","line","underline","default"],MOUSE_STYLE_TO_ID={default:0,pointer:1,text:2,crosshair:3,move:4,"not-allowed":5};((LogLevel3)=>{LogLevel3[LogLevel3.Error=0]="Error",LogLevel3[LogLevel3.Warn=1]="Warn",LogLevel3[LogLevel3.Info=2]="Info",LogLevel3[LogLevel3.Debug=3]="Debug"})(LogLevel2||={});try{opentuiLib=new FFIRenderLib(opentuiLibPath)}catch(error2){}BrandedRenderable=Symbol.for("@opentui/core/Renderable");((LayoutEvents2)=>{LayoutEvents2.LAYOUT_CHANGED="layout-changed",LayoutEvents2.ADDED="added",LayoutEvents2.REMOVED="removed",LayoutEvents2.RESIZED="resized"})(LayoutEvents||={});((RenderableEvents2)=>{RenderableEvents2.FOCUSED="focused",RenderableEvents2.BLURRED="blurred"})(RenderableEvents||={});BaseRenderable=class BaseRenderable extends EventEmitter5{[BrandedRenderable]=!0;static renderableNumber=1;_id;num;_dirty=!1;parent=null;_visible=!0;constructor(options){super();this.num=BaseRenderable.renderableNumber++,this._id=options.id??`renderable-${this.num}`}get id(){return this._id}set id(value){this._id=value}get isDirty(){return this._dirty}markClean(){this._dirty=!1}markDirty(){this._dirty=!0}destroy(){}destroyRecursively(){}get visible(){return this._visible}set visible(value){this._visible=value}};yogaConfig=src_default2.Config.create();yogaConfig.setUseWebDefaults(!1);yogaConfig.setPointScaleFactor(1);Renderable=class Renderable extends BaseRenderable{static renderablesByNumber=new Map;_isDestroyed=!1;_ctx;_translateX=0;_translateY=0;_x=0;_y=0;_screenX=0;_screenY=0;_width;_height;_widthValue=0;_heightValue=0;_zIndex;selectable=!1;buffered;frameBuffer=null;_focusable=!1;_focused=!1;_hasFocusedDescendant=!1;keypressHandler=null;pasteHandler=null;_live=!1;_liveCount=0;_sizeChangeListener=void 0;_mouseListener=null;_mouseListeners={};_pasteListener=void 0;_keyListeners={};yogaNode;_positionType="relative";_overflow="visible";_position={};_opacity=1;_flexShrink=1;renderableMapById=new Map;_childrenInLayoutOrder=[];_childrenInZIndexOrder=[];needsZIndexSort=!1;parent=null;childrenPrimarySortDirty=!0;childrenSortedByPrimaryAxis=[];_shouldUpdateBefore=new Set;_lastLayoutFrame=-1;onLifecyclePass=null;renderBefore;renderAfter;constructor(ctx,options){super(options);if(this._ctx=ctx,Renderable.renderablesByNumber.set(this.num,this),validateOptions(this.id,options),this.renderBefore=options.renderBefore,this.renderAfter=options.renderAfter,this._width=options.width??"auto",this._height=options.height??"auto",typeof this._width==="number")this._widthValue=this._width;if(typeof this._height==="number")this._heightValue=this._height;if(this._zIndex=options.zIndex??0,this._visible=options.visible!==!1,this.buffered=options.buffered??!1,this._live=options.live??!1,this._liveCount=this._live&&this._visible?1:0,this._opacity=options.opacity!==void 0?Math.max(0,Math.min(1,options.opacity)):1,this.yogaNode=src_default2.Node.create(yogaConfig),this.yogaNode.setDisplay(this._visible?Display.Flex:Display.None),this.setupYogaProperties(options),this.applyEventOptions(options),this.buffered)this.createFrameBuffer()}get id(){return this._id}set id(value){if(this.parent)this.parent.renderableMapById.delete(this.id),this.parent.renderableMapById.set(value,this);super.id=value}get focusable(){return this._focusable}set focusable(value){this._focusable=value}get ctx(){return this._ctx}get visible(){return this._visible}get primaryAxis(){let dir=this.yogaNode.getFlexDirection();return dir===2||dir===3?"row":"column"}set visible(value){if(this._visible===value)return;let wasVisible=this._visible;if(this._visible=value,this.yogaNode.setDisplay(value?Display.Flex:Display.None),this._live){if(!wasVisible&&value)this.propagateLiveCount(1);else if(wasVisible&&!value)this.propagateLiveCount(-1)}if(this._focused)this.blur();this.requestRender()}get opacity(){return this._opacity}set opacity(value){let clamped=Math.max(0,Math.min(1,value));if(this._opacity!==clamped)this._opacity=clamped,this.requestRender()}hasSelection(){return!1}onSelectionChanged(selection2){return!1}getSelectedText(){return""}shouldStartSelection(x,y){return!1}focus(){if(this._isDestroyed||this._focused||!this._focusable)return;this._ctx.focusRenderable(this),this._focused=!0,this.requestRender(),this.keypressHandler=(key)=>{if(this._isDestroyed)return;if(this._keyListeners.down?.(key),this._isDestroyed)return;if(!key.defaultPrevented&&this.handleKeyPress)this.handleKeyPress(key)},this.pasteHandler=(event)=>{if(this._isDestroyed)return;if(this._pasteListener?.call(this,event),this._isDestroyed)return;if(!event.defaultPrevented&&this.handlePaste)this.handlePaste(event)},this.ctx._internalKeyInput.onInternal("keypress",this.keypressHandler),this.ctx._internalKeyInput.onInternal("paste",this.pasteHandler),this.propagateFocusChange(!0),this.emit("focused")}propagateFocusChange(hasFocus){let parent=this.parent;while(parent){if(parent._hasFocusedDescendant!==hasFocus)parent._hasFocusedDescendant=hasFocus,parent.markDirty();parent=parent.parent}this.requestRender()}blur(){if(!this._focused||!this._focusable)return;if(this._ctx.blurRenderable(this),this._focused=!1,this.requestRender(),this.keypressHandler)this.ctx._internalKeyInput.offInternal("keypress",this.keypressHandler),this.keypressHandler=null;if(this.pasteHandler)this.ctx._internalKeyInput.offInternal("paste",this.pasteHandler),this.pasteHandler=null;this.propagateFocusChange(!1),this.emit("blurred")}get focused(){return this._focused}get hasFocusedDescendant(){return this._hasFocusedDescendant}get live(){return this._live}get liveCount(){return this._liveCount}set live(value){if(this._live===value)return;if(this._live=value,this._visible){let delta=value?1:-1;this.propagateLiveCount(delta)}}propagateLiveCount(delta){this._liveCount+=delta,this.parent?.propagateLiveCount(delta)}findDescendantById(id){for(let child of this._childrenInLayoutOrder){if(child.id===id)return child;if(isRenderable(child)){let found=child.findDescendantById(id);if(found)return found}}return}requestRender(){this.markDirty(),this._ctx.requestRender()}get translateX(){return this._translateX}set translateX(value){if(this._translateX===value)return;this._translateX=value;let parentScreenX=this.parent?this.parent._screenX:0;if(this._screenX=parentScreenX+this._x+this._translateX,this.parent)this.parent.childrenPrimarySortDirty=!0;this.requestRender()}get translateY(){return this._translateY}set translateY(value){if(this._translateY===value)return;this._translateY=value;let parentScreenY=this.parent?this.parent._screenY:0;if(this._screenY=parentScreenY+this._y+this._translateY,this.parent)this.parent.childrenPrimarySortDirty=!0;this.requestRender()}get screenX(){return(this.parent?this.parent._screenX:0)+this._x+this._translateX}get screenY(){return(this.parent?this.parent._screenY:0)+this._y+this._translateY}get x(){if(this.parent)return this.parent.x+this._x+this._translateX;return this._x+this._translateX}set x(value){this.left=value}get top(){return this._position.top}set top(value){if(isPositionType(value)||value===void 0)this.setPosition({top:value})}get right(){return this._position.right}set right(value){if(isPositionType(value)||value===void 0)this.setPosition({right:value})}get bottom(){return this._position.bottom}set bottom(value){if(isPositionType(value)||value===void 0)this.setPosition({bottom:value})}get left(){return this._position.left}set left(value){if(isPositionType(value)||value===void 0)this.setPosition({left:value})}get y(){if(this.parent)return this.parent.y+this._y+this._translateY;return this._y+this._translateY}set y(value){this.top=value}get width(){return this._widthValue}set width(value){if(!isDimensionType(value)||this._width===value)return;if(this._width=value,this.yogaNode.setWidth(value),typeof value==="number"&&this._flexShrink===1)this._flexShrink=0,this.yogaNode.setFlexShrink(0);this.requestRender()}get height(){return this._heightValue}set height(value){if(!isDimensionType(value)||this._height===value)return;if(this._height=value,this.yogaNode.setHeight(value),typeof value==="number"&&this._flexShrink===1)this._flexShrink=0,this.yogaNode.setFlexShrink(0);this.requestRender()}get zIndex(){return this._zIndex}set zIndex(value){if(this._zIndex!==value)this._zIndex=value,this.parent?.requestZIndexSort(),this.requestRender()}requestZIndexSort(){this.needsZIndexSort=!0}ensureZIndexSorted(){if(this.needsZIndexSort)this._childrenInZIndexOrder.sort((a,b2)=>a.zIndex>b2.zIndex?1:a.zIndex<b2.zIndex?-1:0),this.needsZIndexSort=!1}getChildrenSortedByPrimaryAxis(){if(!this.childrenPrimarySortDirty&&this.childrenSortedByPrimaryAxis.length===this._childrenInLayoutOrder.length)return this.childrenSortedByPrimaryAxis;let dir=this.yogaNode.getFlexDirection(),axis=dir===2||dir===3?"x":"y",sorted=[...this._childrenInLayoutOrder];return sorted.sort((a,b2)=>{let va=axis==="y"?a.screenY:a.screenX,vb=axis==="y"?b2.screenY:b2.screenX;return va-vb}),this.childrenSortedByPrimaryAxis=sorted,this.childrenPrimarySortDirty=!1,this.childrenSortedByPrimaryAxis}setupYogaProperties(options){let node=this.yogaNode;if(isFlexBasisType(options.flexBasis))node.setFlexBasis(options.flexBasis);if(isSizeType(options.minWidth))node.setMinWidth(options.minWidth);if(isSizeType(options.minHeight))node.setMinHeight(options.minHeight);if(options.flexGrow!==void 0)node.setFlexGrow(options.flexGrow);else node.setFlexGrow(0);if(options.flexShrink!==void 0)this._flexShrink=options.flexShrink,node.setFlexShrink(options.flexShrink);else{let hasExplicitWidth=typeof options.width==="number",hasExplicitHeight=typeof options.height==="number";this._flexShrink=hasExplicitWidth||hasExplicitHeight?0:1,node.setFlexShrink(this._flexShrink)}if(node.setFlexDirection(parseFlexDirection(options.flexDirection)),node.setFlexWrap(parseWrap(options.flexWrap)),node.setAlignItems(parseAlignItems(options.alignItems)),node.setJustifyContent(parseJustify(options.justifyContent)),node.setAlignSelf(parseAlign(options.alignSelf)),isDimensionType(options.width))this._width=options.width,this.yogaNode.setWidth(options.width);if(isDimensionType(options.height))this._height=options.height,this.yogaNode.setHeight(options.height);if(this._positionType=options.position==="absolute"?"absolute":"relative",this._positionType!=="relative")node.setPositionType(parsePositionType(this._positionType));if(this._overflow=options.overflow==="hidden"?"hidden":options.overflow==="scroll"?"scroll":"visible",this._overflow!=="visible")node.setOverflow(parseOverflow(this._overflow));if(options.top!==void 0||options.right!==void 0||options.bottom!==void 0||options.left!==void 0)this._position={top:options.top,right:options.right,bottom:options.bottom,left:options.left},this.updateYogaPosition(this._position);if(isSizeType(options.maxWidth))node.setMaxWidth(options.maxWidth);if(isSizeType(options.maxHeight))node.setMaxHeight(options.maxHeight);this.setupMarginAndPadding(options)}setupMarginAndPadding(options){let node=this.yogaNode;if(isMarginType(options.margin))node.setMargin(Edge.All,options.margin);if(isMarginType(options.marginX))node.setMargin(Edge.Horizontal,options.marginX);if(isMarginType(options.marginY))node.setMargin(Edge.Vertical,options.marginY);if(isMarginType(options.marginTop))node.setMargin(Edge.Top,options.marginTop);if(isMarginType(options.marginRight))node.setMargin(Edge.Right,options.marginRight);if(isMarginType(options.marginBottom))node.setMargin(Edge.Bottom,options.marginBottom);if(isMarginType(options.marginLeft))node.setMargin(Edge.Left,options.marginLeft);if(isPaddingType(options.padding))node.setPadding(Edge.All,options.padding);if(isPaddingType(options.paddingX))node.setPadding(Edge.Horizontal,options.paddingX);if(isPaddingType(options.paddingY))node.setPadding(Edge.Vertical,options.paddingY);if(isPaddingType(options.paddingTop))node.setPadding(Edge.Top,options.paddingTop);if(isPaddingType(options.paddingRight))node.setPadding(Edge.Right,options.paddingRight);if(isPaddingType(options.paddingBottom))node.setPadding(Edge.Bottom,options.paddingBottom);if(isPaddingType(options.paddingLeft))node.setPadding(Edge.Left,options.paddingLeft)}set position(positionType){if(!isPositionTypeType(positionType)||this._positionType===positionType)return;this._positionType=positionType,this.yogaNode.setPositionType(parsePositionType(positionType)),this.requestRender()}get overflow(){return this._overflow}set overflow(overflow){if(!isOverflowType(overflow)||this._overflow===overflow)return;this._overflow=overflow,this.yogaNode.setOverflow(parseOverflow(overflow)),this.requestRender()}setPosition(position){this._position={...this._position,...position},this.updateYogaPosition(position)}updateYogaPosition(position){let node=this.yogaNode,{top,right,bottom,left}=position;if(isPositionType(top))if(top==="auto")node.setPositionAuto(Edge.Top);else node.setPosition(Edge.Top,top);if(isPositionType(right))if(right==="auto")node.setPositionAuto(Edge.Right);else node.setPosition(Edge.Right,right);if(isPositionType(bottom))if(bottom==="auto")node.setPositionAuto(Edge.Bottom);else node.setPosition(Edge.Bottom,bottom);if(isPositionType(left))if(left==="auto")node.setPositionAuto(Edge.Left);else node.setPosition(Edge.Left,left);this.requestRender()}set flexGrow(grow){if(grow==null)this.yogaNode.setFlexGrow(0);else this.yogaNode.setFlexGrow(grow);this.requestRender()}set flexShrink(shrink){let value=shrink==null?1:shrink;this._flexShrink=value,this.yogaNode.setFlexShrink(value),this.requestRender()}set flexDirection(direction){this.yogaNode.setFlexDirection(parseFlexDirection(direction)),this.requestRender()}set flexWrap(wrap){this.yogaNode.setFlexWrap(parseWrap(wrap)),this.requestRender()}set alignItems(alignItems){this.yogaNode.setAlignItems(parseAlignItems(alignItems)),this.requestRender()}set justifyContent(justifyContent){this.yogaNode.setJustifyContent(parseJustify(justifyContent)),this.requestRender()}set alignSelf(alignSelf){this.yogaNode.setAlignSelf(parseAlign(alignSelf)),this.requestRender()}set flexBasis(basis){if(isFlexBasisType(basis))this.yogaNode.setFlexBasis(basis),this.requestRender()}set minWidth(minWidth){if(isSizeType(minWidth))this.yogaNode.setMinWidth(minWidth),this.requestRender()}set maxWidth(maxWidth){if(isSizeType(maxWidth))this.yogaNode.setMaxWidth(maxWidth),this.requestRender()}set minHeight(minHeight){if(isSizeType(minHeight))this.yogaNode.setMinHeight(minHeight),this.requestRender()}set maxHeight(maxHeight){if(isSizeType(maxHeight))this.yogaNode.setMaxHeight(maxHeight),this.requestRender()}set margin(margin){if(isMarginType(margin))this.yogaNode.setMargin(Edge.All,margin),this.requestRender()}set marginX(marginX){if(isMarginType(marginX))this.yogaNode.setMargin(Edge.Horizontal,marginX),this.requestRender()}set marginY(marginY){if(isMarginType(marginY))this.yogaNode.setMargin(Edge.Vertical,marginY),this.requestRender()}set marginTop(margin){if(isMarginType(margin))this.yogaNode.setMargin(Edge.Top,margin),this.requestRender()}set marginRight(margin){if(isMarginType(margin))this.yogaNode.setMargin(Edge.Right,margin),this.requestRender()}set marginBottom(margin){if(isMarginType(margin))this.yogaNode.setMargin(Edge.Bottom,margin),this.requestRender()}set marginLeft(margin){if(isMarginType(margin))this.yogaNode.setMargin(Edge.Left,margin),this.requestRender()}set padding(padding){if(isPaddingType(padding))this.yogaNode.setPadding(Edge.All,padding),this.requestRender()}set paddingX(paddingX){if(isPaddingType(paddingX))this.yogaNode.setPadding(Edge.Horizontal,paddingX),this.requestRender()}set paddingY(paddingY){if(isPaddingType(paddingY))this.yogaNode.setPadding(Edge.Vertical,paddingY),this.requestRender()}set paddingTop(padding){if(isPaddingType(padding))this.yogaNode.setPadding(Edge.Top,padding),this.requestRender()}set paddingRight(padding){if(isPaddingType(padding))this.yogaNode.setPadding(Edge.Right,padding),this.requestRender()}set paddingBottom(padding){if(isPaddingType(padding))this.yogaNode.setPadding(Edge.Bottom,padding),this.requestRender()}set paddingLeft(padding){if(isPaddingType(padding))this.yogaNode.setPadding(Edge.Left,padding),this.requestRender()}getLayoutNode(){return this.yogaNode}updateFromLayout(){let frameId=this._ctx.frameId;if(this._lastLayoutFrame===frameId)return;this._lastLayoutFrame=frameId;let layout=this.yogaNode.getComputedLayout(),oldX=this._x,oldY=this._y,oldWidth=this._widthValue,oldHeight=this._heightValue;this._x=layout.left,this._y=layout.top;let parentScreenX=this.parent?this.parent._screenX:0,parentScreenY=this.parent?this.parent._screenY:0;this._screenX=parentScreenX+this._x+this._translateX,this._screenY=parentScreenY+this._y+this._translateY;let newWidth=Math.max(layout.width,1),newHeight=Math.max(layout.height,1),sizeChanged=oldWidth!==newWidth||oldHeight!==newHeight;if(this._widthValue=newWidth,this._heightValue=newHeight,sizeChanged)this.onLayoutResize(newWidth,newHeight);if(oldX!==this._x||oldY!==this._y){if(this.parent)this.parent.childrenPrimarySortDirty=!0}}onLayoutResize(width,height2){if(this._visible)this.handleFrameBufferResize(width,height2),this.onResize(width,height2),this.requestRender()}handleFrameBufferResize(width,height2){if(!this.buffered)return;if(width<=0||height2<=0)return;if(this.frameBuffer)this.frameBuffer.resize(width,height2);else this.createFrameBuffer()}createFrameBuffer(){let w=this.width,h=this.height;if(w<=0||h<=0)return;try{let widthMethod=this._ctx.widthMethod;this.frameBuffer=OptimizedBuffer.create(w,h,widthMethod,{respectAlpha:!0,id:`framebuffer-${this.id}`})}catch(error2){console.error(`Failed to create frame buffer for ${this.id}:`,error2),this.frameBuffer=null}}onResize(width,height2){this.onSizeChange?.(),this.emit("resize")}replaceParent(obj){if(obj.parent)obj.parent.remove(obj.id);obj.parent=this}add(obj,index){if(!obj)return-1;let renderable=maybeMakeRenderable(this._ctx,obj);if(!renderable)return-1;if(renderable.isDestroyed)return console.warn(`Renderable with id ${renderable.id} was already destroyed, skipping add`),-1;let anchorRenderable=index!==void 0?this._childrenInLayoutOrder[index]:void 0;if(anchorRenderable)return this.insertBefore(renderable,anchorRenderable);if(renderable.parent===this)this.yogaNode.removeChild(renderable.getLayoutNode()),this._childrenInLayoutOrder.splice(this._childrenInLayoutOrder.indexOf(renderable),1);else{if(this.replaceParent(renderable),this.needsZIndexSort=!0,this.renderableMapById.set(renderable.id,renderable),this._childrenInZIndexOrder.push(renderable),typeof renderable.onLifecyclePass==="function")this._ctx.registerLifecyclePass(renderable);if(renderable._liveCount>0)this.propagateLiveCount(renderable._liveCount)}let childLayoutNode=renderable.getLayoutNode(),insertedIndex=this._childrenInLayoutOrder.length;return this._childrenInLayoutOrder.push(renderable),this.yogaNode.insertChild(childLayoutNode,insertedIndex),this.childrenPrimarySortDirty=!0,this._shouldUpdateBefore.add(renderable),this.requestRender(),insertedIndex}insertBefore(obj,anchor){if(!anchor)return this.add(obj);if(!obj)return-1;let renderable=maybeMakeRenderable(this._ctx,obj);if(!renderable)return-1;if(renderable.isDestroyed)return console.warn(`Renderable with id ${renderable.id} was already destroyed, skipping insertBefore`),-1;if(!isRenderable(anchor))throw Error("Anchor must be a Renderable");if(anchor.isDestroyed)return console.warn(`Anchor with id ${anchor.id} was already destroyed, skipping insertBefore`),-1;if(!this.renderableMapById.has(anchor.id))return console.warn(`Anchor with id ${anchor.id} does not exist within the parent ${this.id}, skipping insertBefore`),-1;if(renderable===anchor||renderable.id===anchor.id)return console.warn(`Anchor is the same as the node ${renderable.id} being inserted, skipping insertBefore`),-1;if(renderable.parent===this)this.yogaNode.removeChild(renderable.getLayoutNode()),this._childrenInLayoutOrder.splice(this._childrenInLayoutOrder.indexOf(renderable),1);else{if(this.replaceParent(renderable),this.needsZIndexSort=!0,this.renderableMapById.set(renderable.id,renderable),this._childrenInZIndexOrder.push(renderable),typeof renderable.onLifecyclePass==="function")this._ctx.registerLifecyclePass(renderable);if(renderable._liveCount>0)this.propagateLiveCount(renderable._liveCount)}this.childrenPrimarySortDirty=!0;let anchorIndex=this._childrenInLayoutOrder.indexOf(anchor),insertedIndex=Math.max(0,Math.min(anchorIndex,this._childrenInLayoutOrder.length));return this._childrenInLayoutOrder.splice(insertedIndex,0,renderable),this.yogaNode.insertChild(renderable.getLayoutNode(),insertedIndex),this._shouldUpdateBefore.add(renderable),this.requestRender(),insertedIndex}getRenderable(id){return this.renderableMapById.get(id)}remove(id){if(!id)return;if(this.renderableMapById.has(id)){let obj=this.renderableMapById.get(id);if(obj){if(obj._liveCount>0)this.propagateLiveCount(-obj._liveCount);let childLayoutNode=obj.getLayoutNode();this.yogaNode.removeChild(childLayoutNode),this.requestRender(),obj.onRemove(),obj.parent=null,this._ctx.unregisterLifecyclePass(obj),this.renderableMapById.delete(id);let index=this._childrenInLayoutOrder.findIndex((obj2)=>obj2.id===id);if(index!==-1)this._childrenInLayoutOrder.splice(index,1);let zIndexIndex=this._childrenInZIndexOrder.findIndex((obj2)=>obj2.id===id);if(zIndexIndex!==-1)this._childrenInZIndexOrder.splice(zIndexIndex,1);this.childrenPrimarySortDirty=!0}}}onRemove(){}getChildren(){return[...this._childrenInLayoutOrder]}getChildrenCount(){return this._childrenInLayoutOrder.length}updateLayout(deltaTime,renderList=[]){if(!this.visible)return;if(this.onUpdate(deltaTime),this._isDestroyed)return;if(this.updateFromLayout(),this._shouldUpdateBefore.size>0){for(let child of this._shouldUpdateBefore)if(!child.isDestroyed)child.updateFromLayout();this._shouldUpdateBefore.clear()}if(this._isDestroyed)return;let shouldPushOpacity=this._opacity<1;if(shouldPushOpacity)renderList.push({action:"pushOpacity",opacity:this._opacity});renderList.push({action:"render",renderable:this}),this.ensureZIndexSorted();let shouldPushScissor=this._overflow!=="visible"&&this.width>0&&this.height>0;if(shouldPushScissor){let scissorRect=this.getScissorRect();renderList.push({action:"pushScissorRect",x:scissorRect.x,y:scissorRect.y,width:scissorRect.width,height:scissorRect.height,screenX:this._screenX,screenY:this._screenY})}if(!this._hasVisibleChildFilter())for(let child of this._childrenInZIndexOrder)child.updateLayout(deltaTime,renderList);else{for(let child of this._childrenInZIndexOrder){if(child.isDestroyed)continue;child.updateFromLayout()}let visibleChildren=this._getVisibleChildren(),visibleChildSet=new Set(visibleChildren);for(let child of this._childrenInZIndexOrder){if(!visibleChildSet.has(child.num))continue;child.updateLayout(deltaTime,renderList)}}if(shouldPushScissor)renderList.push({action:"popScissorRect"});if(shouldPushOpacity)renderList.push({action:"popOpacity"})}render(buffer2,deltaTime){let renderBuffer=buffer2;if(this.buffered&&this.frameBuffer)renderBuffer=this.frameBuffer;if(this.renderBefore)this.renderBefore.call(this,renderBuffer,deltaTime);if(this.renderSelf(renderBuffer,deltaTime),this.renderAfter)this.renderAfter.call(this,renderBuffer,deltaTime);let screenX=this._screenX,screenY=this._screenY;if(this.markClean(),this._ctx.addToHitGrid(screenX,screenY,this.width,this.height,this.num),this.buffered&&this.frameBuffer)buffer2.drawFrameBuffer(screenX,screenY,this.frameBuffer)}_hasVisibleChildFilter(){return this._getVisibleChildren!==Renderable.prototype._getVisibleChildren}_getVisibleChildren(){return this._childrenInZIndexOrder.map((child)=>child.num)}onUpdate(deltaTime){}getScissorRect(){return{x:this.buffered?0:this._screenX,y:this.buffered?0:this._screenY,width:this.width,height:this.height}}renderSelf(buffer2,deltaTime){}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)return;if(this._isDestroyed=!0,this.parent)this.parent.remove(this.id);if(this.frameBuffer)this.frameBuffer.destroy(),this.frameBuffer=null;for(let child of this._childrenInLayoutOrder)this.remove(child.id);this._childrenInLayoutOrder=[],this.renderableMapById.clear(),Renderable.renderablesByNumber.delete(this.num),this.blur(),this.removeAllListeners(),this.destroySelf();try{this.yogaNode.free()}catch(e){}}destroyRecursively(){let children=[...this._childrenInLayoutOrder];for(let child of children)child.destroyRecursively();this.destroy()}destroySelf(){}processMouseEvent(event){if(this._mouseListener?.call(this,event),this._mouseListeners[event.type]?.call(this,event),this.onMouseEvent(event),this.parent&&!event.propagationStopped)this.parent.processMouseEvent(event)}onMouseEvent(event){}set onMouse(handler){if(handler)this._mouseListener=handler;else this._mouseListener=null}set onMouseDown(handler){if(handler)this._mouseListeners.down=handler;else delete this._mouseListeners.down}set onMouseUp(handler){if(handler)this._mouseListeners.up=handler;else delete this._mouseListeners.up}set onMouseMove(handler){if(handler)this._mouseListeners.move=handler;else delete this._mouseListeners.move}set onMouseDrag(handler){if(handler)this._mouseListeners.drag=handler;else delete this._mouseListeners.drag}set onMouseDragEnd(handler){if(handler)this._mouseListeners["drag-end"]=handler;else delete this._mouseListeners["drag-end"]}set onMouseDrop(handler){if(handler)this._mouseListeners.drop=handler;else delete this._mouseListeners.drop}set onMouseOver(handler){if(handler)this._mouseListeners.over=handler;else delete this._mouseListeners.over}set onMouseOut(handler){if(handler)this._mouseListeners.out=handler;else delete this._mouseListeners.out}set onMouseScroll(handler){if(handler)this._mouseListeners.scroll=handler;else delete this._mouseListeners.scroll}set onPaste(handler){this._pasteListener=handler}get onPaste(){return this._pasteListener}set onKeyDown(handler){if(handler)this._keyListeners.down=handler;else delete this._keyListeners.down}get onKeyDown(){return this._keyListeners.down}set onSizeChange(handler){this._sizeChangeListener=handler}get onSizeChange(){return this._sizeChangeListener}applyEventOptions(options){this.onMouse=options.onMouse,this.onMouseDown=options.onMouseDown,this.onMouseUp=options.onMouseUp,this.onMouseMove=options.onMouseMove,this.onMouseDrag=options.onMouseDrag,this.onMouseDragEnd=options.onMouseDragEnd,this.onMouseDrop=options.onMouseDrop,this.onMouseOver=options.onMouseOver,this.onMouseOut=options.onMouseOut,this.onMouseScroll=options.onMouseScroll,this.onPaste=options.onPaste,this.onKeyDown=options.onKeyDown,this.onSizeChange=options.onSizeChange}};RootRenderable=class RootRenderable extends Renderable{renderList=[];constructor(ctx){super(ctx,{id:"__root__",zIndex:0,visible:!0,width:ctx.width,height:ctx.height,enableLayout:!0});if(this.yogaNode)this.yogaNode.free();this.yogaNode=src_default2.Node.create(yogaConfig),this.yogaNode.setWidth(ctx.width),this.yogaNode.setHeight(ctx.height),this.yogaNode.setFlexDirection(FlexDirection.Column),this.calculateLayout()}render(buffer2,deltaTime){if(!this.visible)return;for(let renderable of this._ctx.getLifecyclePasses())renderable.onLifecyclePass?.call(renderable);if(this.yogaNode.isDirty())this.calculateLayout();this.renderList.length=0,this.updateLayout(deltaTime,this.renderList),this._ctx.clearHitGridScissorRects();for(let i2=1;i2<this.renderList.length;i2++){let command=this.renderList[i2];switch(command.action){case"render":if(!command.renderable.isDestroyed)command.renderable.render(buffer2,deltaTime);break;case"pushScissorRect":buffer2.pushScissorRect(command.x,command.y,command.width,command.height),this._ctx.pushHitGridScissorRect(command.screenX,command.screenY,command.width,command.height);break;case"popScissorRect":buffer2.popScissorRect(),this._ctx.popHitGridScissorRect();break;case"pushOpacity":buffer2.pushOpacity(command.opacity);break;case"popOpacity":buffer2.popOpacity();break}}}propagateLiveCount(delta){let oldCount=this._liveCount;if(this._liveCount+=delta,oldCount===0&&this._liveCount>0)this._ctx.requestLive();else if(oldCount>0&&this._liveCount===0)this._ctx.dropLive()}calculateLayout(){this.yogaNode.calculateLayout(this.width,this.height,Direction.LTR),this.emit("layout-changed")}resize(width,height2){this.width=width,this.height=height2,this.emit("resized",{width,height:height2})}};BrandedVNode=Symbol.for("@opentui/core/VNode");EditBuffer=class EditBuffer extends EventEmitter6{static registry=new Map;static nativeEventsSubscribed=!1;lib;bufferPtr;textBufferPtr;id;_destroyed=!1;_textBytes=[];_singleTextBytes=null;_singleTextMemId=null;_syntaxStyle;constructor(lib,ptr5){super();this.lib=lib,this.bufferPtr=ptr5,this.textBufferPtr=lib.editBufferGetTextBuffer(ptr5),this.id=lib.editBufferGetId(ptr5),EditBuffer.registry.set(this.id,this),EditBuffer.subscribeToNativeEvents(lib)}static create(widthMethod){let lib=resolveRenderLib(),ptr5=lib.createEditBuffer(widthMethod);return new EditBuffer(lib,ptr5)}static subscribeToNativeEvents(lib){if(EditBuffer.nativeEventsSubscribed)return;EditBuffer.nativeEventsSubscribed=!0,lib.onAnyNativeEvent((name,data)=>{let buffer2=new Uint16Array(data);if(name.startsWith("eb_")&&buffer2.length>=1){let id=buffer2[0],instance=EditBuffer.registry.get(id);if(instance){let eventName=name.slice(3),eventData=data.slice(2);instance.emit(eventName,eventData)}}})}guard(){if(this._destroyed)throw Error("EditBuffer is destroyed")}get ptr(){return this.guard(),this.bufferPtr}setText(text){this.guard();let textBytes=this.lib.encoder.encode(text);if(this._singleTextMemId!==null)this.lib.textBufferReplaceMemBuffer(this.textBufferPtr,this._singleTextMemId,textBytes,!1);else this._singleTextMemId=this.lib.textBufferRegisterMemBuffer(this.textBufferPtr,textBytes,!1);this._singleTextBytes=textBytes,this.lib.editBufferSetTextFromMem(this.bufferPtr,this._singleTextMemId)}setTextOwned(text){this.guard();let textBytes=this.lib.encoder.encode(text);this.lib.editBufferSetText(this.bufferPtr,textBytes)}replaceText(text){this.guard();let textBytes=this.lib.encoder.encode(text);this._textBytes.push(textBytes);let memId=this.lib.textBufferRegisterMemBuffer(this.textBufferPtr,textBytes,!1);this.lib.editBufferReplaceTextFromMem(this.bufferPtr,memId)}replaceTextOwned(text){this.guard();let textBytes=this.lib.encoder.encode(text);this.lib.editBufferReplaceText(this.bufferPtr,textBytes)}getLineCount(){return this.guard(),this.lib.textBufferGetLineCount(this.textBufferPtr)}getText(){this.guard();let maxSize=1048576,textBytes=this.lib.editBufferGetText(this.bufferPtr,maxSize);if(!textBytes)return"";return this.lib.decoder.decode(textBytes)}insertChar(char){this.guard(),this.lib.editBufferInsertChar(this.bufferPtr,char)}insertText(text){this.guard(),this.lib.editBufferInsertText(this.bufferPtr,text)}deleteChar(){this.guard(),this.lib.editBufferDeleteChar(this.bufferPtr)}deleteCharBackward(){this.guard(),this.lib.editBufferDeleteCharBackward(this.bufferPtr)}deleteRange(startLine,startCol,endLine,endCol){this.guard(),this.lib.editBufferDeleteRange(this.bufferPtr,startLine,startCol,endLine,endCol)}newLine(){this.guard(),this.lib.editBufferNewLine(this.bufferPtr)}deleteLine(){this.guard(),this.lib.editBufferDeleteLine(this.bufferPtr)}moveCursorLeft(){this.guard(),this.lib.editBufferMoveCursorLeft(this.bufferPtr)}moveCursorRight(){this.guard(),this.lib.editBufferMoveCursorRight(this.bufferPtr)}moveCursorUp(){this.guard(),this.lib.editBufferMoveCursorUp(this.bufferPtr)}moveCursorDown(){this.guard(),this.lib.editBufferMoveCursorDown(this.bufferPtr)}gotoLine(line){this.guard(),this.lib.editBufferGotoLine(this.bufferPtr,line)}setCursor(line,col){this.guard(),this.lib.editBufferSetCursor(this.bufferPtr,line,col)}setCursorToLineCol(line,col){this.guard(),this.lib.editBufferSetCursorToLineCol(this.bufferPtr,line,col)}setCursorByOffset(offset){this.guard(),this.lib.editBufferSetCursorByOffset(this.bufferPtr,offset)}getCursorPosition(){return this.guard(),this.lib.editBufferGetCursorPosition(this.bufferPtr)}getNextWordBoundary(){this.guard();let boundary=this.lib.editBufferGetNextWordBoundary(this.bufferPtr);return{row:boundary.row,col:boundary.col,offset:boundary.offset}}getPrevWordBoundary(){this.guard();let boundary=this.lib.editBufferGetPrevWordBoundary(this.bufferPtr);return{row:boundary.row,col:boundary.col,offset:boundary.offset}}getEOL(){this.guard();let boundary=this.lib.editBufferGetEOL(this.bufferPtr);return{row:boundary.row,col:boundary.col,offset:boundary.offset}}offsetToPosition(offset){this.guard();let result2=this.lib.editBufferOffsetToPosition(this.bufferPtr,offset);if(!result2)return null;return{row:result2.row,col:result2.col}}positionToOffset(row,col){return this.guard(),this.lib.editBufferPositionToOffset(this.bufferPtr,row,col)}getLineStartOffset(row){return this.guard(),this.lib.editBufferGetLineStartOffset(this.bufferPtr,row)}getTextRange(startOffset,endOffset){if(this.guard(),startOffset>=endOffset)return"";let maxSize=1048576,textBytes=this.lib.editBufferGetTextRange(this.bufferPtr,startOffset,endOffset,maxSize);if(!textBytes)return"";return this.lib.decoder.decode(textBytes)}getTextRangeByCoords(startRow,startCol,endRow,endCol){this.guard();let maxSize=1048576,textBytes=this.lib.editBufferGetTextRangeByCoords(this.bufferPtr,startRow,startCol,endRow,endCol,maxSize);if(!textBytes)return"";return this.lib.decoder.decode(textBytes)}debugLogRope(){this.guard(),this.lib.editBufferDebugLogRope(this.bufferPtr)}undo(){this.guard();let maxSize=256,metaBytes=this.lib.editBufferUndo(this.bufferPtr,maxSize);if(!metaBytes)return null;return this.lib.decoder.decode(metaBytes)}redo(){this.guard();let maxSize=256,metaBytes=this.lib.editBufferRedo(this.bufferPtr,maxSize);if(!metaBytes)return null;return this.lib.decoder.decode(metaBytes)}canUndo(){return this.guard(),this.lib.editBufferCanUndo(this.bufferPtr)}canRedo(){return this.guard(),this.lib.editBufferCanRedo(this.bufferPtr)}clearHistory(){this.guard(),this.lib.editBufferClearHistory(this.bufferPtr)}setDefaultFg(fg2){this.guard(),this.lib.textBufferSetDefaultFg(this.textBufferPtr,fg2)}setDefaultBg(bg2){this.guard(),this.lib.textBufferSetDefaultBg(this.textBufferPtr,bg2)}setDefaultAttributes(attributes){this.guard(),this.lib.textBufferSetDefaultAttributes(this.textBufferPtr,attributes)}resetDefaults(){this.guard(),this.lib.textBufferResetDefaults(this.textBufferPtr)}setSyntaxStyle(style){this.guard(),this._syntaxStyle=style??void 0,this.lib.textBufferSetSyntaxStyle(this.textBufferPtr,style?.ptr??null)}getSyntaxStyle(){return this.guard(),this._syntaxStyle??null}addHighlight(lineIdx,highlight){this.guard(),this.lib.textBufferAddHighlight(this.textBufferPtr,lineIdx,highlight)}addHighlightByCharRange(highlight){this.guard(),this.lib.textBufferAddHighlightByCharRange(this.textBufferPtr,highlight)}removeHighlightsByRef(hlRef){this.guard(),this.lib.textBufferRemoveHighlightsByRef(this.textBufferPtr,hlRef)}clearLineHighlights(lineIdx){this.guard(),this.lib.textBufferClearLineHighlights(this.textBufferPtr,lineIdx)}clearAllHighlights(){this.guard(),this.lib.textBufferClearAllHighlights(this.textBufferPtr)}getLineHighlights(lineIdx){return this.guard(),this.lib.textBufferGetLineHighlights(this.textBufferPtr,lineIdx)}clear(){this.guard(),this.lib.editBufferClear(this.bufferPtr)}destroy(){if(this._destroyed)return;this._destroyed=!0,EditBuffer.registry.delete(this.id),this.lib.destroyEditBuffer(this.bufferPtr)}};BoxRenderable=class BoxRenderable extends Renderable{_backgroundColor;_border;_borderStyle;_borderColor;_focusedBorderColor;_customBorderCharsObj;_customBorderChars;borderSides;shouldFill;_title;_titleAlignment;_bottomTitle;_bottomTitleAlignment;_defaultOptions={backgroundColor:"transparent",borderStyle:"single",border:!1,borderColor:"#FFFFFF",shouldFill:!0,titleAlignment:"left",bottomTitleAlignment:"left",focusedBorderColor:"#00AAFF"};constructor(ctx,options){super(ctx,options);if(options.focusable===!0)this._focusable=!0;if(this._backgroundColor=parseColor(options.backgroundColor||this._defaultOptions.backgroundColor),this._border=options.border??this._defaultOptions.border,!options.border&&(options.borderStyle||options.borderColor||options.focusedBorderColor||options.customBorderChars))this._border=!0;if(this._borderStyle=parseBorderStyle(options.borderStyle,this._defaultOptions.borderStyle),this._borderColor=parseColor(options.borderColor||this._defaultOptions.borderColor),this._focusedBorderColor=parseColor(options.focusedBorderColor||this._defaultOptions.focusedBorderColor),this._customBorderCharsObj=options.customBorderChars,this._customBorderChars=this._customBorderCharsObj?borderCharsToArray(this._customBorderCharsObj):void 0,this.borderSides=getBorderSides(this._border),this.shouldFill=options.shouldFill??this._defaultOptions.shouldFill,this._title=options.title,this._titleAlignment=options.titleAlignment||this._defaultOptions.titleAlignment,this._bottomTitle=options.bottomTitle,this._bottomTitleAlignment=options.bottomTitleAlignment||this._defaultOptions.bottomTitleAlignment,this.applyYogaBorders(),options.gap!==void 0||options.rowGap!==void 0||options.columnGap!==void 0)this.applyYogaGap(options)}initializeBorder(){if(this._border===!1)this._border=!0,this.borderSides=getBorderSides(this._border),this.applyYogaBorders()}get customBorderChars(){return this._customBorderCharsObj}set customBorderChars(value){this._customBorderCharsObj=value,this._customBorderChars=value?borderCharsToArray(value):void 0,this.requestRender()}get backgroundColor(){return this._backgroundColor}set backgroundColor(value){let newColor=parseColor(value??this._defaultOptions.backgroundColor);if(this._backgroundColor!==newColor)this._backgroundColor=newColor,this.requestRender()}get border(){return this._border}set border(value){if(this._border!==value)this._border=value,this.borderSides=getBorderSides(value),this.applyYogaBorders(),this.requestRender()}get borderStyle(){return this._borderStyle}set borderStyle(value){let _value=parseBorderStyle(value,this._defaultOptions.borderStyle);if(this._borderStyle!==_value||!this._border)this._borderStyle=_value,this._customBorderChars=void 0,this.initializeBorder(),this.requestRender()}get borderColor(){return this._borderColor}set borderColor(value){let newColor=parseColor(value??this._defaultOptions.borderColor);if(this._borderColor!==newColor)this._borderColor=newColor,this.initializeBorder(),this.requestRender()}get focusedBorderColor(){return this._focusedBorderColor}set focusedBorderColor(value){let newColor=parseColor(value??this._defaultOptions.focusedBorderColor);if(this._focusedBorderColor!==newColor){if(this._focusedBorderColor=newColor,this.initializeBorder(),this._focused)this.requestRender()}}get title(){return this._title}set title(value){if(this._title!==value)this._title=value,this.requestRender()}get titleAlignment(){return this._titleAlignment}set titleAlignment(value){if(this._titleAlignment!==value)this._titleAlignment=value,this.requestRender()}get bottomTitle(){return this._bottomTitle}set bottomTitle(value){if(this._bottomTitle!==value)this._bottomTitle=value,this.requestRender()}get bottomTitleAlignment(){return this._bottomTitleAlignment}set bottomTitleAlignment(value){if(this._bottomTitleAlignment!==value)this._bottomTitleAlignment=value,this.requestRender()}renderSelf(buffer2){let hasBorder=this.borderSides.top||this.borderSides.right||this.borderSides.bottom||this.borderSides.left,hasVisibleFill=this.shouldFill&&this._backgroundColor.a>0;if(!hasBorder&&!hasVisibleFill)return;let currentBorderColor=this._focusable&&(this._focused||this._hasFocusedDescendant)?this._focusedBorderColor:this._borderColor,screenX=this._screenX,screenY=this._screenY;buffer2.drawBox({x:screenX,y:screenY,width:this.width,height:this.height,borderStyle:this._borderStyle,customBorderChars:this._customBorderChars,border:this._border,borderColor:currentBorderColor,backgroundColor:this._backgroundColor,shouldFill:this.shouldFill,title:this._title,titleAlignment:this._titleAlignment,bottomTitle:this._bottomTitle,bottomTitleAlignment:this._bottomTitleAlignment})}getScissorRect(){let baseRect=super.getScissorRect();if(!this.borderSides.top&&!this.borderSides.right&&!this.borderSides.bottom&&!this.borderSides.left)return baseRect;let leftInset=this.borderSides.left?1:0,rightInset=this.borderSides.right?1:0,topInset=this.borderSides.top?1:0,bottomInset=this.borderSides.bottom?1:0;return{x:baseRect.x+leftInset,y:baseRect.y+topInset,width:Math.max(0,baseRect.width-leftInset-rightInset),height:Math.max(0,baseRect.height-topInset-bottomInset)}}applyYogaBorders(){let node=this.yogaNode;node.setBorder(Edge.Left,this.borderSides.left?1:0),node.setBorder(Edge.Right,this.borderSides.right?1:0),node.setBorder(Edge.Top,this.borderSides.top?1:0),node.setBorder(Edge.Bottom,this.borderSides.bottom?1:0),this.requestRender()}applyYogaGap(options){let node=this.yogaNode;if(isGapType(options.gap))node.setGap(Gutter.All,options.gap);if(isGapType(options.rowGap))node.setGap(Gutter.Row,options.rowGap);if(isGapType(options.columnGap))node.setGap(Gutter.Column,options.columnGap)}set gap(gap){if(isGapType(gap))this.yogaNode.setGap(Gutter.All,gap),this.requestRender()}set rowGap(rowGap){if(isGapType(rowGap))this.yogaNode.setGap(Gutter.Row,rowGap),this.requestRender()}set columnGap(columnGap){if(isGapType(columnGap))this.yogaNode.setGap(Gutter.Column,columnGap),this.requestRender()}};TextBufferRenderable=class TextBufferRenderable extends Renderable{selectable=!0;_defaultFg;_defaultBg;_defaultAttributes;_selectionBg;_selectionFg;_wrapMode="word";lastLocalSelection=null;_tabIndicator;_tabIndicatorColor;_scrollX=0;_scrollY=0;_truncate=!1;_firstLineOffset=0;textBuffer;textBufferView;_textBufferSyntaxStyle;_defaultOptions={fg:RGBA.fromValues(1,1,1,1),bg:RGBA.fromValues(0,0,0,0),selectionBg:void 0,selectionFg:void 0,selectable:!0,attributes:0,wrapMode:"word",tabIndicator:void 0,tabIndicatorColor:void 0,truncate:!1};constructor(ctx,options){super(ctx,options);if(this._defaultFg=parseColor(options.fg??this._defaultOptions.fg),this._defaultBg=parseColor(options.bg??this._defaultOptions.bg),this._defaultAttributes=options.attributes??this._defaultOptions.attributes,this._selectionBg=options.selectionBg?parseColor(options.selectionBg):this._defaultOptions.selectionBg,this._selectionFg=options.selectionFg?parseColor(options.selectionFg):this._defaultOptions.selectionFg,this.selectable=options.selectable??this._defaultOptions.selectable,this._wrapMode=options.wrapMode??this._defaultOptions.wrapMode,this._tabIndicator=options.tabIndicator??this._defaultOptions.tabIndicator,this._tabIndicatorColor=options.tabIndicatorColor?parseColor(options.tabIndicatorColor):this._defaultOptions.tabIndicatorColor,this._truncate=options.truncate??this._defaultOptions.truncate,this.textBuffer=TextBuffer.create(this._ctx.widthMethod),this.textBufferView=TextBufferView.create(this.textBuffer),this._firstLineOffset=ctx.claimFirstLineOffset?.(this)??0,this._textBufferSyntaxStyle=SyntaxStyle.create(),this.textBuffer.setSyntaxStyle(this._textBufferSyntaxStyle),this.textBufferView.setWrapMode(this._wrapMode),this.textBufferView.setFirstLineOffset(this._firstLineOffset),this.setupMeasureFunc(),this.textBuffer.setDefaultFg(this._defaultFg),this.textBuffer.setDefaultBg(this._defaultBg),this.textBuffer.setDefaultAttributes(this._defaultAttributes),this._tabIndicator!==void 0)this.textBufferView.setTabIndicator(this._tabIndicator);if(this._tabIndicatorColor!==void 0)this.textBufferView.setTabIndicatorColor(this._tabIndicatorColor);if(this._wrapMode!=="none"&&this.width>0)this.textBufferView.setWrapWidth(this.width);if(this.width>0&&this.height>0)this.textBufferView.setViewport(this._scrollX,this._scrollY,this.width,this.height);this.textBufferView.setTruncate(this._truncate),this.updateTextInfo()}onMouseEvent(event){if(event.type==="scroll")this.handleScroll(event)}handleScroll(event){if(!event.scroll)return;let{direction,delta}=event.scroll;if(direction==="up")this.scrollY-=delta;else if(direction==="down")this.scrollY+=delta;if(this._wrapMode==="none"){if(direction==="left")this.scrollX-=delta;else if(direction==="right")this.scrollX+=delta}}get lineInfo(){return this.textBufferView.logicalLineInfo}get lineCount(){return this.textBuffer.getLineCount()}get virtualLineCount(){return this.textBufferView.getVirtualLineCount()}get scrollY(){return this._scrollY}set scrollY(value){let maxScrollY=Math.max(0,this.scrollHeight-this.height),clamped=Math.max(0,Math.min(value,maxScrollY));if(this._scrollY!==clamped)this._scrollY=clamped,this.updateViewportOffset(),this.requestRender()}get scrollX(){return this._scrollX}set scrollX(value){let maxScrollX=Math.max(0,this.scrollWidth-this.width),clamped=Math.max(0,Math.min(value,maxScrollX));if(this._scrollX!==clamped)this._scrollX=clamped,this.updateViewportOffset(),this.requestRender()}get scrollWidth(){return this.lineInfo.lineWidthColsMax}get scrollHeight(){return this.lineInfo.lineStartCols.length}get maxScrollY(){return Math.max(0,this.scrollHeight-this.height)}get maxScrollX(){return Math.max(0,this.scrollWidth-this.width)}updateViewportOffset(){if(this.width>0&&this.height>0)this.textBufferView.setViewport(this._scrollX,this._scrollY,this.width,this.height)}get plainText(){return this.textBuffer.getPlainText()}get textLength(){return this.textBuffer.length}get fg(){return this._defaultFg}set fg(value){let newColor=parseColor(value??this._defaultOptions.fg);if(this._defaultFg!==newColor)this._defaultFg=newColor,this.textBuffer.setDefaultFg(this._defaultFg),this.onFgChanged(newColor),this.requestRender()}get selectionBg(){return this._selectionBg}set selectionBg(value){let newColor=value?parseColor(value):this._defaultOptions.selectionBg;if(this._selectionBg!==newColor){if(this._selectionBg=newColor,this.lastLocalSelection)this.updateLocalSelection(this.lastLocalSelection);this.requestRender()}}get selectionFg(){return this._selectionFg}set selectionFg(value){let newColor=value?parseColor(value):this._defaultOptions.selectionFg;if(this._selectionFg!==newColor){if(this._selectionFg=newColor,this.lastLocalSelection)this.updateLocalSelection(this.lastLocalSelection);this.requestRender()}}get bg(){return this._defaultBg}set bg(value){let newColor=parseColor(value??this._defaultOptions.bg);if(this._defaultBg!==newColor)this._defaultBg=newColor,this.textBuffer.setDefaultBg(this._defaultBg),this.onBgChanged(newColor),this.requestRender()}get attributes(){return this._defaultAttributes}set attributes(value){if(this._defaultAttributes!==value)this._defaultAttributes=value,this.textBuffer.setDefaultAttributes(this._defaultAttributes),this.onAttributesChanged(value),this.requestRender()}get wrapMode(){return this._wrapMode}set wrapMode(value){if(this._wrapMode!==value){if(this._wrapMode=value,this.textBufferView.setWrapMode(this._wrapMode),value!=="none"&&this.width>0)this.textBufferView.setWrapWidth(this.width);this.yogaNode.markDirty(),this.requestRender()}}get tabIndicator(){return this._tabIndicator}set tabIndicator(value){if(this._tabIndicator!==value){if(this._tabIndicator=value,value!==void 0)this.textBufferView.setTabIndicator(value);this.requestRender()}}get tabIndicatorColor(){return this._tabIndicatorColor}set tabIndicatorColor(value){let newColor=value?parseColor(value):void 0;if(this._tabIndicatorColor!==newColor){if(this._tabIndicatorColor=newColor,newColor!==void 0)this.textBufferView.setTabIndicatorColor(newColor);this.requestRender()}}get truncate(){return this._truncate}set truncate(value){if(this._truncate!==value)this._truncate=value,this.textBufferView.setTruncate(value),this.requestRender()}onResize(width,height2){this.textBufferView.setViewport(this._scrollX,this._scrollY,width,height2),this.yogaNode.markDirty(),this.requestRender(),this.emit("line-info-change")}refreshLocalSelection(){if(this.lastLocalSelection)return this.updateLocalSelection(this.lastLocalSelection);return!1}updateLocalSelection(localSelection){if(!localSelection?.isActive)return this.textBufferView.resetLocalSelection(),!0;return this.textBufferView.setLocalSelection(localSelection.anchorX,localSelection.anchorY,localSelection.focusX,localSelection.focusY,this._selectionBg,this._selectionFg)}updateTextInfo(){if(this.lastLocalSelection)this.updateLocalSelection(this.lastLocalSelection);this.yogaNode.markDirty(),this.requestRender(),this.emit("line-info-change")}setupMeasureFunc(){let measureFunc=(width,widthMode,height2,heightMode)=>{let effectiveWidth;if(widthMode===MeasureMode.Undefined||isNaN(width))effectiveWidth=0;else effectiveWidth=width;let effectiveHeight=isNaN(height2)?1:height2,measureResult=this.textBufferView.measureForDimensions(Math.floor(effectiveWidth),Math.floor(effectiveHeight)),measuredWidth=measureResult?Math.max(1,measureResult.widthColsMax):1,measuredHeight=measureResult?Math.max(1,measureResult.lineCount):1;if(widthMode===MeasureMode.AtMost&&this._positionType!=="absolute")return{width:Math.min(effectiveWidth,measuredWidth),height:Math.min(effectiveHeight,measuredHeight)};return{width:measuredWidth,height:measuredHeight}};this.yogaNode.setMeasureFunc(measureFunc)}shouldStartSelection(x,y){if(!this.selectable)return!1;let localX=x-this.x,localY=y-this.y;return localX>=0&&localX<this.width&&localY>=0&&localY<this.height}onSelectionChanged(selection2){let localSelection=convertGlobalToLocalSelection(selection2,this.x,this.y);this.lastLocalSelection=localSelection;let changed;if(!localSelection?.isActive)this.textBufferView.resetLocalSelection(),changed=!0;else if(selection2?.isStart)changed=this.textBufferView.setLocalSelection(localSelection.anchorX,localSelection.anchorY,localSelection.focusX,localSelection.focusY,this._selectionBg,this._selectionFg);else changed=this.textBufferView.updateLocalSelection(localSelection.anchorX,localSelection.anchorY,localSelection.focusX,localSelection.focusY,this._selectionBg,this._selectionFg);if(changed)this.requestRender();return this.hasSelection()}getSelectedText(){return this.textBufferView.getSelectedText()}hasSelection(){return this.textBufferView.hasSelection()}getSelection(){return this.textBufferView.getSelection()}render(buffer2,deltaTime){if(!this.visible)return;let screenX=this._screenX,screenY=this._screenY;if(this.markClean(),this._ctx.addToHitGrid(screenX,screenY,this.width,this.height,this.num),this.renderSelf(buffer2),this.buffered&&this.frameBuffer)buffer2.drawFrameBuffer(screenX,screenY,this.frameBuffer)}renderSelf(buffer2){if(this.textBuffer.ptr)buffer2.drawTextBuffer(this.textBufferView,this._screenX,this._screenY)}destroy(){if(this.isDestroyed)return;this.textBuffer.setSyntaxStyle(null),this._textBufferSyntaxStyle.destroy(),this.textBufferView.destroy(),this.textBuffer.destroy(),super.destroy()}onFgChanged(newColor){}onBgChanged(newColor){}onAttributesChanged(newAttributes){}};CodeRenderable=class CodeRenderable extends TextBufferRenderable{_content;_filetype;_syntaxStyle;_isHighlighting=!1;_treeSitterClient;_highlightsDirty=!1;_highlightSnapshotId=0;_conceal;_drawUnstyledText;_shouldRenderTextBuffer=!0;_streaming;_hadInitialContent=!1;_lastHighlights=[];_onHighlight;_onChunks;_highlightingPromise=Promise.resolve();_contentDefaultOptions={content:"",conceal:!0,drawUnstyledText:!0,streaming:!1};constructor(ctx,options){super(ctx,options);if(this._content=options.content??this._contentDefaultOptions.content,this._filetype=options.filetype,this._syntaxStyle=options.syntaxStyle,this._treeSitterClient=options.treeSitterClient??getTreeSitterClient(),this._conceal=options.conceal??this._contentDefaultOptions.conceal,this._drawUnstyledText=options.drawUnstyledText??this._contentDefaultOptions.drawUnstyledText,this._streaming=options.streaming??this._contentDefaultOptions.streaming,this._onHighlight=options.onHighlight,this._onChunks=options.onChunks,this._content.length>0)this.textBuffer.setText(this._content),this.updateTextInfo(),this._shouldRenderTextBuffer=this._drawUnstyledText||!this._filetype;this._highlightsDirty=this._content.length>0}get content(){return this._content}set content(value){if(this._content!==value){if(this._content=value,this._highlightsDirty=!0,this._highlightSnapshotId++,this._streaming&&!this._drawUnstyledText&&this._filetype){this.requestRender();return}this.textBuffer.setText(value),this.updateTextInfo()}}get filetype(){return this._filetype}set filetype(value){if(this._filetype!==value)this._filetype=value,this._highlightsDirty=!0}get syntaxStyle(){return this._syntaxStyle}set syntaxStyle(value){if(this._syntaxStyle!==value)this._syntaxStyle=value,this._highlightsDirty=!0}get conceal(){return this._conceal}set conceal(value){if(this._conceal!==value)this._conceal=value,this._highlightsDirty=!0}get drawUnstyledText(){return this._drawUnstyledText}set drawUnstyledText(value){if(this._drawUnstyledText!==value)this._drawUnstyledText=value,this._highlightsDirty=!0}get streaming(){return this._streaming}set streaming(value){if(this._streaming!==value)this._streaming=value,this._hadInitialContent=!1,this._lastHighlights=[],this._highlightsDirty=!0}get treeSitterClient(){return this._treeSitterClient}set treeSitterClient(value){if(this._treeSitterClient!==value)this._treeSitterClient=value,this._highlightsDirty=!0}get onHighlight(){return this._onHighlight}set onHighlight(value){if(this._onHighlight!==value)this._onHighlight=value,this._highlightsDirty=!0}get onChunks(){return this._onChunks}set onChunks(value){if(this._onChunks!==value)this._onChunks=value,this._highlightsDirty=!0}get isHighlighting(){return this._isHighlighting}get highlightingDone(){return this._highlightingPromise}async transformChunks(chunks,context){if(!this._onChunks)return chunks;return await this._onChunks(chunks,context)??chunks}ensureVisibleTextBeforeHighlight(){if(this.isDestroyed)return;let content=this._content;if(!this._filetype){this._shouldRenderTextBuffer=!0;return}let isInitialContent=this._streaming&&!this._hadInitialContent,shouldDrawUnstyledNow=this._streaming?isInitialContent&&this._drawUnstyledText:this._drawUnstyledText;if(this._streaming&&!isInitialContent)this._shouldRenderTextBuffer=!0;else if(shouldDrawUnstyledNow)this.textBuffer.setText(content),this._shouldRenderTextBuffer=!0;else this._shouldRenderTextBuffer=!1}async startHighlight(){let content=this._content,filetype=this._filetype,snapshotId=++this._highlightSnapshotId;if(!filetype)return;if(this._streaming&&!this._hadInitialContent)this._hadInitialContent=!0;this._isHighlighting=!0;try{let result2=await this._treeSitterClient.highlightOnce(content,filetype);if(snapshotId!==this._highlightSnapshotId)return;if(this.isDestroyed)return;let highlights=result2.highlights??[];if(this._onHighlight&&highlights.length>=0){let context={content,filetype,syntaxStyle:this._syntaxStyle},modified=await this._onHighlight(highlights,context);if(modified!==void 0)highlights=modified}if(snapshotId!==this._highlightSnapshotId)return;if(this.isDestroyed)return;if(highlights.length>0){if(this._streaming)this._lastHighlights=highlights}if(highlights.length>0||this._onChunks){let context={content,filetype,syntaxStyle:this._syntaxStyle,highlights},chunks=treeSitterToTextChunks(content,highlights,this._syntaxStyle,{enabled:this._conceal});if(chunks=await this.transformChunks(chunks,context),snapshotId!==this._highlightSnapshotId)return;if(this.isDestroyed)return;let styledText=new StyledText(chunks);this.textBuffer.setStyledText(styledText)}else this.textBuffer.setText(content);this._shouldRenderTextBuffer=!0,this._isHighlighting=!1,this._highlightsDirty=!1,this.updateTextInfo(),this.requestRender()}catch(error2){if(snapshotId!==this._highlightSnapshotId)return;if(console.warn("Code highlighting failed, falling back to plain text:",error2),this.isDestroyed)return;this.textBuffer.setText(content),this._shouldRenderTextBuffer=!0,this._isHighlighting=!1,this._highlightsDirty=!1,this.updateTextInfo(),this.requestRender()}}getLineHighlights(lineIdx){return this.textBuffer.getLineHighlights(lineIdx)}renderSelf(buffer2){if(this._highlightsDirty){if(this.isDestroyed)return;if(this._content.length===0)this._shouldRenderTextBuffer=!1,this._highlightsDirty=!1;else if(!this._filetype)this._shouldRenderTextBuffer=!0,this._highlightsDirty=!1;else this.ensureVisibleTextBeforeHighlight(),this._highlightsDirty=!1,this._highlightingPromise=this.startHighlight()}if(!this._shouldRenderTextBuffer)return;super.renderSelf(buffer2)}};BrandedTextNodeRenderable=Symbol.for("@opentui/core/TextNodeRenderable");TextNodeRenderable=class TextNodeRenderable extends BaseRenderable{[BrandedTextNodeRenderable]=!0;_fg;_bg;_attributes;_link;_children=[];parent=null;constructor(options){super(options);this._fg=options.fg?parseColor(options.fg):void 0,this._bg=options.bg?parseColor(options.bg):void 0,this._attributes=options.attributes??0,this._link=options.link}get children(){return this._children}set children(children){this._children=children,this.requestRender()}requestRender(){this.markDirty(),this.parent?.requestRender()}add(obj,index){if(typeof obj==="string"){if(index!==void 0)return this._children.splice(index,0,obj),this.requestRender(),index;let insertIndex=this._children.length;return this._children.push(obj),this.requestRender(),insertIndex}if(isTextNodeRenderable(obj)){if(index!==void 0)return this._children.splice(index,0,obj),obj.parent=this,this.requestRender(),index;let insertIndex=this._children.length;return this._children.push(obj),obj.parent=this,this.requestRender(),insertIndex}if(isStyledText(obj)){let textNodes=styledTextToTextNodes(obj);if(index!==void 0)return this._children.splice(index,0,...textNodes),textNodes.forEach((node)=>node.parent=this),this.requestRender(),index;let insertIndex=this._children.length;return this._children.push(...textNodes),textNodes.forEach((node)=>node.parent=this),this.requestRender(),insertIndex}throw Error("TextNodeRenderable only accepts strings, TextNodeRenderable instances, or StyledText instances")}replace(obj,index){if(this._children[index]=obj,typeof obj!=="string")obj.parent=this;this.requestRender()}insertBefore(child,anchorNode){if(!anchorNode||!isTextNodeRenderable(anchorNode))throw Error("Anchor must be a TextNodeRenderable");let anchorIndex=this._children.indexOf(anchorNode);if(anchorIndex===-1)throw Error("Anchor node not found in children");if(typeof child==="string")this._children.splice(anchorIndex,0,child);else if(isTextNodeRenderable(child))this._children.splice(anchorIndex,0,child),child.parent=this;else if(child instanceof StyledText){let textNodes=styledTextToTextNodes(child);this._children.splice(anchorIndex,0,...textNodes),textNodes.forEach((node)=>node.parent=this)}else throw Error("Child must be a string, TextNodeRenderable, or StyledText instance");return this.requestRender(),this}remove(id){let childIndex=this.getRenderableIndex(id);if(childIndex===-1)throw Error("Child not found in children");let child=this._children[childIndex];return this._children.splice(childIndex,1),child.parent=null,this.requestRender(),this}clear(){this._children=[],this.requestRender()}mergeStyles(parentStyle){return{fg:this._fg??parentStyle.fg,bg:this._bg??parentStyle.bg,attributes:this._attributes|parentStyle.attributes,link:this._link??parentStyle.link}}gatherWithInheritedStyle(parentStyle={fg:void 0,bg:void 0,attributes:0}){let currentStyle=this.mergeStyles(parentStyle),chunks=[];for(let child of this._children)if(typeof child==="string")chunks.push({__isChunk:!0,text:child,fg:currentStyle.fg,bg:currentStyle.bg,attributes:currentStyle.attributes,link:currentStyle.link});else{let childChunks=child.gatherWithInheritedStyle(currentStyle);chunks.push(...childChunks)}return this.markClean(),chunks}static fromString(text,options={}){let node=new TextNodeRenderable(options);return node.add(text),node}static fromNodes(nodes,options={}){let node=new TextNodeRenderable(options);for(let childNode of nodes)node.add(childNode);return node}toChunks(parentStyle={fg:void 0,bg:void 0,attributes:0}){return this.gatherWithInheritedStyle(parentStyle)}getChildren(){return this._children.filter((child)=>typeof child!=="string")}getChildrenCount(){return this._children.length}getRenderable(id){return this._children.find((child)=>typeof child!=="string"&&child.id===id)}getRenderableIndex(id){return this._children.findIndex((child)=>isTextNodeRenderable(child)&&child.id===id)}get fg(){return this._fg}set fg(fg2){if(!fg2){this._fg=void 0,this.requestRender();return}this._fg=parseColor(fg2),this.requestRender()}set bg(bg2){if(!bg2){this._bg=void 0,this.requestRender();return}this._bg=parseColor(bg2),this.requestRender()}get bg(){return this._bg}set attributes(attributes){this._attributes=attributes,this.requestRender()}get attributes(){return this._attributes}set link(link2){this._link=link2,this.requestRender()}get link(){return this._link}findDescendantById(id){return}};RootTextNodeRenderable=class RootTextNodeRenderable extends TextNodeRenderable{ctx;textParent;constructor(ctx,options,textParent){super(options);this.ctx=ctx,this.textParent=textParent}requestRender(){this.markDirty(),this.ctx.requestRender()}};TextRenderable=class TextRenderable extends TextBufferRenderable{_text;_hasManualStyledText=!1;rootTextNode;_contentDefaultOptions={content:""};constructor(ctx,options){super(ctx,options);let content=options.content??this._contentDefaultOptions.content,styledText=typeof content==="string"?stringToStyledText(content):content;this._text=styledText,this._hasManualStyledText=options.content!==void 0&&content!=="",this.rootTextNode=new RootTextNodeRenderable(ctx,{id:`${this.id}-root`,fg:this._defaultFg,bg:this._defaultBg,attributes:this._defaultAttributes},this),this.updateTextBuffer(styledText)}updateTextBuffer(styledText){this.textBuffer.setStyledText(styledText),this.clearChunks(styledText)}clearChunks(styledText){}get content(){return this._text}get chunks(){return this._text.chunks}get textNode(){return this.rootTextNode}set content(value){this._hasManualStyledText=!0;let styledText=typeof value==="string"?stringToStyledText(value):value;if(this._text!==styledText)this._text=styledText,this.updateTextBuffer(styledText),this.updateTextInfo()}updateTextFromNodes(){if(this.rootTextNode.isDirty&&!this._hasManualStyledText){let chunks=this.rootTextNode.gatherWithInheritedStyle({fg:this._defaultFg,bg:this._defaultBg,attributes:this._defaultAttributes,link:void 0});this.textBuffer.setStyledText(new StyledText(chunks)),this.refreshLocalSelection(),this.yogaNode.markDirty()}}add(obj,index){return this.rootTextNode.add(obj,index)}remove(id){this.rootTextNode.remove(id)}insertBefore(obj,anchor){return this.rootTextNode.insertBefore(obj,anchor),this.rootTextNode.children.indexOf(obj)}getTextChildren(){return this.rootTextNode.getChildren()}clear(){this.rootTextNode.clear();let emptyStyledText=stringToStyledText("");this._text=emptyStyledText,this.updateTextBuffer(emptyStyledText),this.updateTextInfo(),this.requestRender()}onLifecyclePass=()=>{this.updateTextFromNodes()};onFgChanged(newColor){this.rootTextNode.fg=newColor}onBgChanged(newColor){this.rootTextNode.bg=newColor}onAttributesChanged(newAttributes){this.rootTextNode.attributes=newAttributes}destroy(){this.rootTextNode.children.length=0,super.destroy()}};Capture=class Capture extends EventEmitter7{output=[];constructor(){super()}get size(){return this.output.length}write(stream,data){this.output.push({stream,output:data}),this.emit("write",stream,data)}claimOutput(){let output=this.output.map((o)=>o.output).join("");return this.clear(),output}clear(){this.output=[]}};CapturedWritableStream=class CapturedWritableStream extends Writable{stream;capture;isTTY=!0;columns=process.stdout.columns||80;rows=process.stdout.rows||24;constructor(stream,capture){super();this.stream=stream,this.capture=capture}_write(chunk,encoding,callback){let data=chunk.toString();this.capture.write(this.stream,data),callback()}getColorDepth(){return process.stdout.getColorDepth?.()||8}};defaultKeyAliases={enter:"return",esc:"escape",kp0:"0",kp1:"1",kp2:"2",kp3:"3",kp4:"4",kp5:"5",kp6:"6",kp7:"7",kp8:"8",kp9:"9",kpdecimal:".",kpdivide:"/",kpmultiply:"*",kpminus:"-",kpplus:"+",kpenter:"enter",kpequal:"=",kpseparator:",",kpleft:"left",kpright:"right",kpup:"up",kpdown:"down",kppageup:"pageup",kppagedown:"pagedown",kphome:"home",kpend:"end",kpinsert:"insert",kpdelete:"delete"};capture=singleton("ConsoleCapture",()=>new Capture);registerEnvVar({name:"OTUI_USE_CONSOLE",description:"Whether to use the console. Will not capture console output if set to false.",type:"boolean",default:!0});registerEnvVar({name:"SHOW_CONSOLE",description:"Show the console at startup if set to true.",type:"boolean",default:!1});TerminalConsoleCache=class TerminalConsoleCache extends EventEmitter8{_cachedLogs=[];MAX_CACHE_SIZE=1000;_collectCallerInfo=!1;_cachingEnabled=!0;_originalConsole=null;get cachedLogs(){return this._cachedLogs}constructor(){super()}activate(){if(!this._originalConsole)this._originalConsole=global.console;this.setupConsoleCapture(),this.overrideConsoleMethods()}setupConsoleCapture(){if(!env.OTUI_USE_CONSOLE)return;let mockStdout=new CapturedWritableStream("stdout",capture),mockStderr=new CapturedWritableStream("stderr",capture);global.console=new Console({stdout:mockStdout,stderr:mockStderr,colorMode:!0,inspectOptions:{compact:!1,breakLength:80,depth:2}})}overrideConsoleMethods(){console.log=(...args)=>{this.appendToConsole("LOG",...args)},console.info=(...args)=>{this.appendToConsole("INFO",...args)},console.warn=(...args)=>{this.appendToConsole("WARN",...args)},console.error=(...args)=>{this.appendToConsole("ERROR",...args)},console.debug=(...args)=>{this.appendToConsole("DEBUG",...args)}}setCollectCallerInfo(enabled){this._collectCallerInfo=enabled}clearConsole(){this._cachedLogs=[]}setCachingEnabled(enabled){this._cachingEnabled=enabled}deactivate(){this.restoreOriginalConsole()}restoreOriginalConsole(){if(this._originalConsole)global.console=this._originalConsole}addLogEntry(level,...args){let callerInfo=this._collectCallerInfo?getCallerInfo():null,logEntry=[new Date,level,args,callerInfo];if(this._cachingEnabled){if(this._cachedLogs.length>=this.MAX_CACHE_SIZE)this._cachedLogs.shift();this._cachedLogs.push(logEntry)}return logEntry}appendToConsole(level,...args){if(this._cachedLogs.length>=this.MAX_CACHE_SIZE)this._cachedLogs.shift();let entry2=this.addLogEntry(level,...args);this.emit("entry",entry2)}destroy(){this.deactivate()}};terminalConsoleCache=singleton("TerminalConsoleCache",()=>{let terminalConsoleCache2=new TerminalConsoleCache;return process.on("exit",()=>{terminalConsoleCache2.destroy()}),terminalConsoleCache2});((ConsolePosition2)=>{ConsolePosition2.TOP="top",ConsolePosition2.BOTTOM="bottom",ConsolePosition2.LEFT="left",ConsolePosition2.RIGHT="right"})(ConsolePosition||={});defaultConsoleKeybindings=[{name:"up",action:"scroll-up"},{name:"down",action:"scroll-down"},{name:"up",shift:!0,action:"scroll-to-top"},{name:"down",shift:!0,action:"scroll-to-bottom"},{name:"p",ctrl:!0,action:"position-previous"},{name:"o",ctrl:!0,action:"position-next"},{name:"+",action:"size-increase"},{name:"=",shift:!0,action:"size-increase"},{name:"-",action:"size-decrease"},{name:"s",ctrl:!0,action:"save-logs"},{name:"c",ctrl:!0,shift:!0,action:"copy-selection"}],DEFAULT_CONSOLE_OPTIONS={position:"bottom",sizePercent:30,zIndex:1/0,colorInfo:"#00FFFF",colorWarn:"#FFFF00",colorError:"#FF0000",colorDebug:"#808080",colorDefault:"#FFFFFF",backgroundColor:RGBA.fromValues(0.1,0.1,0.1,0.7),startInDebugMode:!1,title:"Console",titleBarColor:RGBA.fromValues(0.05,0.05,0.05,0.7),titleBarTextColor:"#FFFFFF",cursorColor:"#00A0FF",maxStoredLogs:2000,maxDisplayLines:3000,onCopySelection:void 0,keyBindings:void 0,keyAliasMap:void 0,selectionColor:RGBA.fromValues(0.3,0.5,0.8,0.5),copyButtonColor:"#00A0FF"};TerminalConsole=class TerminalConsole extends EventEmitter8{isVisible=!1;isFocused=!1;renderer;keyHandler;options;_debugModeEnabled=!1;frameBuffer=null;consoleX=0;consoleY=0;consoleWidth=0;consoleHeight=0;scrollTopIndex=0;isScrolledToBottom=!0;currentLineIndex=0;_displayLines=[];_allLogEntries=[];_needsFrameBufferUpdate=!1;_entryListener;_selectionStart=null;_selectionEnd=null;_isDragging=!1;_copyButtonBounds={x:0,y:0,width:0,height:0};_autoScrollInterval=null;clock;_keyBindingsMap;_keyAliasMap;_keyBindings;_mergedKeyBindings;_actionHandlers;markNeedsRerender(){this._needsFrameBufferUpdate=!0,this.renderer.requestRender()}getCopyButtonLabel(){let copyBindings=this._mergedKeyBindings.filter((b2)=>b2.action==="copy-selection"),copyBinding=copyBindings[copyBindings.length-1];if(copyBinding)return`[Copy (${keyBindingToString(copyBinding)})]`;return"[Copy]"}_rgbaInfo;_rgbaWarn;_rgbaError;_rgbaDebug;_rgbaDefault;backgroundColor;_rgbaTitleBar;_rgbaTitleBarText;_title;_rgbaCursor;_rgbaSelection;_rgbaCopyButton;_positions=["top","right","bottom","left"];constructor(renderer,options={}){super();if(this.renderer=renderer,this.clock=options.clock??new SystemClock,this.options={...DEFAULT_CONSOLE_OPTIONS,...options},this.keyHandler=this.handleKeyPress.bind(this),this._debugModeEnabled=this.options.startInDebugMode,terminalConsoleCache.setCollectCallerInfo(this._debugModeEnabled),this._rgbaInfo=parseColor(this.options.colorInfo),this._rgbaWarn=parseColor(this.options.colorWarn),this._rgbaError=parseColor(this.options.colorError),this._rgbaDebug=parseColor(this.options.colorDebug),this._rgbaDefault=parseColor(this.options.colorDefault),this.backgroundColor=parseColor(this.options.backgroundColor),this._rgbaTitleBar=parseColor(this.options.titleBarColor),this._rgbaTitleBarText=parseColor(this.options.titleBarTextColor||this.options.colorDefault),this._title=this.options.title,this._rgbaCursor=parseColor(this.options.cursorColor),this._rgbaSelection=parseColor(this.options.selectionColor),this._rgbaCopyButton=parseColor(this.options.copyButtonColor),this._keyAliasMap=mergeKeyAliases(defaultKeyAliases,options.keyAliasMap||{}),this._keyBindings=options.keyBindings||[],this._mergedKeyBindings=mergeKeyBindings(defaultConsoleKeybindings,this._keyBindings),this._keyBindingsMap=buildKeyBindingsMap(this._mergedKeyBindings,this._keyAliasMap),this._actionHandlers=this.buildActionHandlers(),this._updateConsoleDimensions(),this._scrollToBottom(!0),this._entryListener=(logEntry)=>{this._handleNewLog(logEntry)},terminalConsoleCache.on("entry",this._entryListener),env.SHOW_CONSOLE)this.show()}buildActionHandlers(){return new Map([["scroll-up",()=>this.scrollUp()],["scroll-down",()=>this.scrollDown()],["scroll-to-top",()=>this.scrollToTop()],["scroll-to-bottom",()=>this.scrollToBottomAction()],["position-previous",()=>this.positionPrevious()],["position-next",()=>this.positionNext()],["size-increase",()=>this.sizeIncrease()],["size-decrease",()=>this.sizeDecrease()],["save-logs",()=>this.saveLogsAction()],["copy-selection",()=>this.triggerCopyAction()]])}activate(){terminalConsoleCache.activate()}deactivate(){terminalConsoleCache.deactivate()}_handleNewLog(logEntry){if(!this.isVisible)return;if(this._allLogEntries.push(logEntry),this._allLogEntries.length>this.options.maxStoredLogs)this._allLogEntries.splice(0,this._allLogEntries.length-this.options.maxStoredLogs);let newDisplayLines=this._processLogEntry(logEntry);if(this._displayLines.push(...newDisplayLines),this._displayLines.length>this.options.maxDisplayLines){this._displayLines.splice(0,this._displayLines.length-this.options.maxDisplayLines);let linesRemoved=this._displayLines.length-this.options.maxDisplayLines;this.scrollTopIndex=Math.max(0,this.scrollTopIndex-linesRemoved)}if(this.isScrolledToBottom)this._scrollToBottom();this.markNeedsRerender()}_updateConsoleDimensions(termWidth,termHeight){let width=termWidth??this.renderer.width,height2=termHeight??this.renderer.height,sizePercent=this.options.sizePercent/100;switch(this.options.position){case"top":this.consoleX=0,this.consoleY=0,this.consoleWidth=width,this.consoleHeight=Math.max(1,Math.floor(height2*sizePercent));break;case"bottom":this.consoleHeight=Math.max(1,Math.floor(height2*sizePercent)),this.consoleWidth=width,this.consoleX=0,this.consoleY=height2-this.consoleHeight;break;case"left":this.consoleWidth=Math.max(1,Math.floor(width*sizePercent)),this.consoleHeight=height2,this.consoleX=0,this.consoleY=0;break;case"right":this.consoleWidth=Math.max(1,Math.floor(width*sizePercent)),this.consoleHeight=height2,this.consoleY=0,this.consoleX=width-this.consoleWidth;break}this.currentLineIndex=Math.max(0,Math.min(this.currentLineIndex,this.consoleHeight-1))}handleKeyPress(event){if(event.name==="escape"){this.blur();return}let action=getKeyBindingAction(this._keyBindingsMap,event);if(action){let handler=this._actionHandlers.get(action);if(handler){handler();return}}}scrollUp(){let logAreaHeight=Math.max(1,this.consoleHeight-1);if(this.currentLineIndex>0)this.currentLineIndex--,this.markNeedsRerender();else if(this.scrollTopIndex>0)this.scrollTopIndex--,this.isScrolledToBottom=!1,this.markNeedsRerender();return!0}scrollDown(){let displayLineCount=this._displayLines.length,logAreaHeight=Math.max(1,this.consoleHeight-1),maxScrollTop=Math.max(0,displayLineCount-logAreaHeight);if(this.currentLineIndex<logAreaHeight-1&&this.scrollTopIndex+this.currentLineIndex<displayLineCount-1)this.currentLineIndex++,this.markNeedsRerender();else if(this.scrollTopIndex<maxScrollTop)this.scrollTopIndex++,this.isScrolledToBottom=this.scrollTopIndex===maxScrollTop,this.markNeedsRerender();return!0}scrollToTop(){if(this.scrollTopIndex>0||this.currentLineIndex>0)this.scrollTopIndex=0,this.currentLineIndex=0,this.isScrolledToBottom=this._displayLines.length<=Math.max(1,this.consoleHeight-1),this.markNeedsRerender();return!0}scrollToBottomAction(){let logAreaHeightForScroll=Math.max(1,this.consoleHeight-1),maxScrollPossible=Math.max(0,this._displayLines.length-logAreaHeightForScroll);if(this.scrollTopIndex<maxScrollPossible||!this.isScrolledToBottom)this._scrollToBottom(!0),this.markNeedsRerender();return!0}positionPrevious(){let prevIndex=(this._positions.indexOf(this.options.position)-1+this._positions.length)%this._positions.length;return this.options.position=this._positions[prevIndex],this.resize(this.renderer.width,this.renderer.height),!0}positionNext(){let nextIndex=(this._positions.indexOf(this.options.position)+1)%this._positions.length;return this.options.position=this._positions[nextIndex],this.resize(this.renderer.width,this.renderer.height),!0}sizeIncrease(){return this.options.sizePercent=Math.min(100,this.options.sizePercent+5),this.resize(this.renderer.width,this.renderer.height),!0}sizeDecrease(){return this.options.sizePercent=Math.max(10,this.options.sizePercent-5),this.resize(this.renderer.width,this.renderer.height),!0}saveLogsAction(){return this.saveLogsToFile(),!0}triggerCopyAction(){return this.triggerCopy(),!0}attachStdin(){if(this.isFocused)return;this.renderer.keyInput.on("keypress",this.keyHandler),this.isFocused=!0}detachStdin(){if(!this.isFocused)return;this.renderer.keyInput.off("keypress",this.keyHandler),this.isFocused=!1}formatTimestamp(date){return new Intl.DateTimeFormat("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(date)}formatArguments(args){return args.map((arg)=>{if(arg instanceof Error){let errorProps=arg;return`Error: ${errorProps.message}
3076
+ `+d.replace(/^Error(:[^\n]*)?\n/,""))});return c.prototype=Object.create(b2.prototype),c.prototype.constructor=c,c.prototype.toString=function(){return this.message===void 0?this.name:this.name+": "+this.message},c}var K=void 0;function L(a){throw new K(a)}var M=(a)=>{return a||L("Cannot use deleted val. handle = "+a),J[a].value},Ea=(a)=>{switch(a){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var b2=Ca.length?Ca.pop():J.length;return J[b2]={ga:1,value:a},b2}},Fa=void 0,Ga=void 0;function N(a){for(var b2="";A[a];)b2+=Ga[A[a++]];return b2}var O=[];function Ha(){for(;O.length;){var a=O.pop();a.M.$=!1,a.delete()}}var P=void 0,Q={};function Ia(a,b2){for(b2===void 0&&L("ptr should not be undefined");a.R;)b2=a.ba(b2),a=a.R;return b2}var R={};function Ja(a){a=Ka(a);var b2=N(a);return S(a),b2}function La(a,b2){var c=R[a];return c===void 0&&L(b2+" has unknown type "+Ja(a)),c}function Ma(){}var Na=!1;function Oa(a){--a.count.value,a.count.value===0&&(a.T?a.U.W(a.T):a.P.N.W(a.O))}function Pa(a,b2,c){if(b2===c)return a;if(c.R===void 0)return null;return a=Pa(a,b2,c.R),a===null?null:c.na(a)}var Qa={};function Ra(a,b2){return b2=Ia(a,b2),Q[b2]}var Sa=void 0;function Ta(a){throw new Sa(a)}function Ua(a,b2){return b2.P&&b2.O||Ta("makeClassHandle requires ptr and ptrType"),!!b2.U!==!!b2.T&&Ta("Both smartPtrType and smartPtr must be specified"),b2.count={value:1},T(Object.create(a,{M:{value:b2}}))}function T(a){if(typeof FinalizationRegistry>"u")return T=(b2)=>b2,a;return Na=new FinalizationRegistry((b2)=>{Oa(b2.M)}),T=(b2)=>{var c=b2.M;return c.T&&Na.register(b2,{M:c},b2),b2},Ma=(b2)=>{Na.unregister(b2)},T(a)}var Va={};function Wa(a){for(;a.length;){var b2=a.pop();a.pop()(b2)}}function Xa(a){return this.fromWireType(D[a>>2])}var U={},Ya={};function V(a,b2,c){function d(k){k=c(k),k.length!==a.length&&Ta("Mismatched type converter count");for(var m=0;m<a.length;++m)W(a[m],k[m])}a.forEach(function(k){Ya[k]=b2});var e=Array(b2.length),f=[],g=0;b2.forEach((k,m)=>{R.hasOwnProperty(k)?e[m]=R[k]:(f.push(k),U.hasOwnProperty(k)||(U[k]=[]),U[k].push(()=>{e[m]=R[k],++g,g===f.length&&d(e)}))}),f.length===0&&d(e)}function Za(a){switch(a){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw TypeError("Unknown type size: "+a)}}function W(a,b2,c={}){if(!("argPackAdvance"in b2))throw TypeError("registerType registeredInstance requires argPackAdvance");var d=b2.name;if(a||L('type "'+d+'" must have a positive integer typeid pointer'),R.hasOwnProperty(a)){if(c.ua)return;L("Cannot register type '"+d+"' twice")}R[a]=b2,delete Ya[a],U.hasOwnProperty(a)&&(b2=U[a],delete U[a],b2.forEach((e)=>e()))}function $a(a){L(a.M.P.N.name+" instance already deleted")}function X(){}function ab(a,b2,c){if(a[b2].S===void 0){var d=a[b2];a[b2]=function(){return a[b2].S.hasOwnProperty(arguments.length)||L("Function '"+c+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+a[b2].S+")!"),a[b2].S[arguments.length].apply(this,arguments)},a[b2].S=[],a[b2].S[d.Z]=d}}function bb(a,b2){h.hasOwnProperty(a)?(L("Cannot register public name '"+a+"' twice"),ab(h,a,a),h.hasOwnProperty(void 0)&&L("Cannot register multiple overloads of a function with the same number of arguments (undefined)!"),h[a].S[void 0]=b2):h[a]=b2}function cb(a,b2,c,d,e,f,g,k){this.name=a,this.constructor=b2,this.X=c,this.W=d,this.R=e,this.pa=f,this.ba=g,this.na=k,this.ja=[]}function db(a,b2,c){for(;b2!==c;)b2.ba||L("Expected null or instance of "+c.name+", got an instance of "+b2.name),a=b2.ba(a),b2=b2.R;return a}function eb(a,b2){if(b2===null)return this.ea&&L("null is not a valid "+this.name),0;return b2.M||L('Cannot pass "'+fb(b2)+'" as a '+this.name),b2.M.O||L("Cannot pass deleted object as a pointer of type "+this.name),db(b2.M.O,b2.M.P.N,this.N)}function gb(a,b2){if(b2===null){if(this.ea&&L("null is not a valid "+this.name),this.da){var c=this.fa();return a!==null&&a.push(this.W,c),c}return 0}if(b2.M||L('Cannot pass "'+fb(b2)+'" as a '+this.name),b2.M.O||L("Cannot pass deleted object as a pointer of type "+this.name),!this.ca&&b2.M.P.ca&&L("Cannot convert argument of type "+(b2.M.U?b2.M.U.name:b2.M.P.name)+" to parameter type "+this.name),c=db(b2.M.O,b2.M.P.N,this.N),this.da)switch(b2.M.T===void 0&&L("Passing raw pointer to smart pointer is illegal"),this.Ba){case 0:b2.M.U===this?c=b2.M.T:L("Cannot convert argument of type "+(b2.M.U?b2.M.U.name:b2.M.P.name)+" to parameter type "+this.name);break;case 1:c=b2.M.T;break;case 2:if(b2.M.U===this)c=b2.M.T;else{var d=b2.clone();c=this.xa(c,Ea(function(){d.delete()})),a!==null&&a.push(this.W,c)}break;default:L("Unsupporting sharing policy")}return c}function hb(a,b2){if(b2===null)return this.ea&&L("null is not a valid "+this.name),0;return b2.M||L('Cannot pass "'+fb(b2)+'" as a '+this.name),b2.M.O||L("Cannot pass deleted object as a pointer of type "+this.name),b2.M.P.ca&&L("Cannot convert argument of type "+b2.M.P.name+" to parameter type "+this.name),db(b2.M.O,b2.M.P.N,this.N)}function Y(a,b2,c,d){this.name=a,this.N=b2,this.ea=c,this.ca=d,this.da=!1,this.W=this.xa=this.fa=this.ka=this.Ba=this.wa=void 0,b2.R!==void 0?this.toWireType=gb:(this.toWireType=d?eb:hb,this.V=null)}function ib(a,b2){h.hasOwnProperty(a)||Ta("Replacing nonexistant public symbol"),h[a]=b2,h[a].Z=void 0}function jb(a,b2){var c=[];return function(){if(c.length=0,Object.assign(c,arguments),a.includes("j")){var d=h["dynCall_"+a];d=c&&c.length?d.apply(null,[b2].concat(c)):d.call(null,b2)}else d=oa.get(b2).apply(null,c);return d}}function Z(a,b2){a=N(a);var c=a.includes("j")?jb(a,b2):oa.get(b2);return typeof c!="function"&&L("unknown function pointer with signature "+a+": "+b2),c}var mb=void 0;function nb(a,b2){function c(f){e[f]||R[f]||(Ya[f]?Ya[f].forEach(c):(d.push(f),e[f]=!0))}var d=[],e={};throw b2.forEach(c),new mb(a+": "+d.map(Ja).join([", "]))}function ob(a,b2,c,d,e){var f=b2.length;2>f&&L("argTypes array size mismatch! Must at least get return value and 'this' types!");var g=b2[1]!==null&&c!==null,k=!1;for(c=1;c<b2.length;++c)if(b2[c]!==null&&b2[c].V===void 0){k=!0;break}var m=b2[0].name!=="void",l=f-2,n=Array(l),p=[],r=[];return function(){if(arguments.length!==l&&L("function "+a+" called with "+arguments.length+" arguments, expected "+l+" args!"),r.length=0,p.length=g?2:1,p[0]=e,g){var u=b2[1].toWireType(r,this);p[1]=u}for(var t=0;t<l;++t)n[t]=b2[t+2].toWireType(r,arguments[t]),p.push(n[t]);if(t=d.apply(null,p),k)Wa(r);else for(var y=g?1:2;y<b2.length;y++){var B=y===1?u:n[y-2];b2[y].V!==null&&b2[y].V(B)}return u=m?b2[0].fromWireType(t):void 0,u}}function pb(a,b2){for(var c=[],d=0;d<a;d++)c.push(E[b2+4*d>>2]);return c}function qb(a){4<a&&--J[a].ga===0&&(J[a]=void 0,Ca.push(a))}function fb(a){if(a===null)return"null";var b2=typeof a;return b2==="object"||b2==="array"||b2==="function"?a.toString():""+a}function rb(a,b2){switch(b2){case 2:return function(c){return this.fromWireType(la[c>>2])};case 3:return function(c){return this.fromWireType(ma[c>>3])};default:throw TypeError("Unknown float type: "+a)}}function sb(a,b2,c){switch(b2){case 0:return c?function(d){return ja[d]}:function(d){return A[d]};case 1:return c?function(d){return C[d>>1]}:function(d){return ka[d>>1]};case 2:return c?function(d){return D[d>>2]}:function(d){return E[d>>2]};default:throw TypeError("Unknown integer type: "+a)}}function tb(a,b2){for(var c="",d=0;!(d>=b2/2);++d){var e=C[a+2*d>>1];if(e==0)break;c+=String.fromCharCode(e)}return c}function ub(a,b2,c){if(c===void 0&&(c=2147483647),2>c)return 0;c-=2;var d=b2;c=c<2*a.length?c/2:a.length;for(var e=0;e<c;++e)C[b2>>1]=a.charCodeAt(e),b2+=2;return C[b2>>1]=0,b2-d}function vb(a){return 2*a.length}function wb(a,b2){for(var c=0,d="";!(c>=b2/4);){var e=D[a+4*c>>2];if(e==0)break;++c,65536<=e?(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023)):d+=String.fromCharCode(e)}return d}function xb(a,b2,c){if(c===void 0&&(c=2147483647),4>c)return 0;var d=b2;c=d+c-4;for(var e=0;e<a.length;++e){var f=a.charCodeAt(e);if(55296<=f&&57343>=f){var g=a.charCodeAt(++e);f=65536+((f&1023)<<10)|g&1023}if(D[b2>>2]=f,b2+=4,b2+4>c)break}return D[b2>>2]=0,b2-d}function yb(a){for(var b2=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&++c,b2+=4}return b2}var zb={};function Ab(a){var b2=zb[a];return b2===void 0?N(a):b2}var Bb=[];function Cb(a){var b2=Bb.length;return Bb.push(a),b2}function Db(a,b2){for(var c=Array(a),d=0;d<a;++d)c[d]=La(E[b2+4*d>>2],"parameter "+d);return c}var Eb=[],Fb=[null,[],[]];K=h.BindingError=Da("BindingError"),h.count_emval_handles=function(){for(var a=0,b2=5;b2<J.length;++b2)J[b2]!==void 0&&++a;return a},h.get_first_emval=function(){for(var a=5;a<J.length;++a)if(J[a]!==void 0)return J[a];return null},Fa=h.PureVirtualError=Da("PureVirtualError");for(var Gb=Array(256),Hb=0;256>Hb;++Hb)Gb[Hb]=String.fromCharCode(Hb);Ga=Gb,h.getInheritedInstanceCount=function(){return Object.keys(Q).length},h.getLiveInheritedInstances=function(){var a=[],b2;for(b2 in Q)Q.hasOwnProperty(b2)&&a.push(Q[b2]);return a},h.flushPendingDeletes=Ha,h.setDelayFunction=function(a){P=a,O.length&&P&&P(Ha)},Sa=h.InternalError=Da("InternalError"),X.prototype.isAliasOf=function(a){if(!(this instanceof X&&a instanceof X))return!1;var b2=this.M.P.N,c=this.M.O,d=a.M.P.N;for(a=a.M.O;b2.R;)c=b2.ba(c),b2=b2.R;for(;d.R;)a=d.ba(a),d=d.R;return b2===d&&c===a},X.prototype.clone=function(){if(this.M.O||$a(this),this.M.aa)return this.M.count.value+=1,this;var a=T,b2=Object,c=b2.create,d=Object.getPrototypeOf(this),e=this.M;return a=a(c.call(b2,d,{M:{value:{count:e.count,$:e.$,aa:e.aa,O:e.O,P:e.P,T:e.T,U:e.U}}})),a.M.count.value+=1,a.M.$=!1,a},X.prototype.delete=function(){this.M.O||$a(this),this.M.$&&!this.M.aa&&L("Object already scheduled for deletion"),Ma(this),Oa(this.M),this.M.aa||(this.M.T=void 0,this.M.O=void 0)},X.prototype.isDeleted=function(){return!this.M.O},X.prototype.deleteLater=function(){return this.M.O||$a(this),this.M.$&&!this.M.aa&&L("Object already scheduled for deletion"),O.push(this),O.length===1&&P&&P(Ha),this.M.$=!0,this},Y.prototype.qa=function(a){return this.ka&&(a=this.ka(a)),a},Y.prototype.ha=function(a){this.W&&this.W(a)},Y.prototype.argPackAdvance=8,Y.prototype.readValueFromPointer=Xa,Y.prototype.deleteObject=function(a){if(a!==null)a.delete()},Y.prototype.fromWireType=function(a){function b2(){return this.da?Ua(this.N.X,{P:this.wa,O:c,U:this,T:a}):Ua(this.N.X,{P:this,O:a})}var c=this.qa(a);if(!c)return this.ha(a),null;var d=Ra(this.N,c);if(d!==void 0){if(d.M.count.value===0)return d.M.O=c,d.M.T=a,d.clone();return d=d.clone(),this.ha(a),d}if(d=this.N.pa(c),d=Qa[d],!d)return b2.call(this);d=this.ca?d.la:d.pointerType;var e=Pa(c,this.N,d.N);return e===null?b2.call(this):this.da?Ua(d.N.X,{P:d,O:e,U:this,T:a}):Ua(d.N.X,{P:d,O:e})},mb=h.UnboundTypeError=Da("UnboundTypeError");var xa=typeof atob=="function"?atob:function(a){var b2="",c=0;a=a.replace(/[^A-Za-z0-9\+\/=]/g,"");do{var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++)),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++)),f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++)),g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++));d=d<<2|e>>4,e=(e&15)<<4|f>>2;var k=(f&3)<<6|g;b2+=String.fromCharCode(d),f!==64&&(b2+=String.fromCharCode(e)),g!==64&&(b2+=String.fromCharCode(k))}while(c<a.length);return b2},Jb={l:function(a,b2,c,d){x("Assertion failed: "+(a?z(A,a):"")+", at: "+[b2?b2?z(A,b2):"":"unknown filename",c,d?d?z(A,d):"":"unknown function"])},q:function(a,b2,c){a=N(a),b2=La(b2,"wrapper"),c=M(c);var d=[].slice,e=b2.N,f=e.X,g=e.R.X,k=e.R.constructor;a=Ba(a,function(){e.R.ja.forEach(function(l){if(this[l]===g[l])throw new Fa("Pure virtual function "+l+" must be implemented in JavaScript")}.bind(this)),Object.defineProperty(this,"__parent",{value:f}),this.__construct.apply(this,d.call(arguments))}),f.__construct=function(){this===f&&L("Pass correct 'this' to __construct");var l=k.implement.apply(void 0,[this].concat(d.call(arguments)));Ma(l);var n=l.M;l.notifyOnDestruction(),n.aa=!0,Object.defineProperties(this,{M:{value:n}}),T(this),l=n.O,l=Ia(e,l),Q.hasOwnProperty(l)?L("Tried to register registered instance: "+l):Q[l]=this},f.__destruct=function(){this===f&&L("Pass correct 'this' to __destruct"),Ma(this);var l=this.M.O;l=Ia(e,l),Q.hasOwnProperty(l)?delete Q[l]:L("Tried to unregister unregistered instance: "+l)},a.prototype=Object.create(f);for(var m in c)a.prototype[m]=c[m];return Ea(a)},j:function(a){var b2=Va[a];delete Va[a];var{fa:c,W:d,ia:e}=b2,f=e.map((g)=>g.ta).concat(e.map((g)=>g.za));V([a],f,(g)=>{var k={};return e.forEach((m,l)=>{var n=g[l],p=m.ra,r=m.sa,u=g[l+e.length],t=m.ya,y=m.Aa;k[m.oa]={read:(B)=>n.fromWireType(p(r,B)),write:(B,ba)=>{var I=[];t(y,B,u.toWireType(I,ba)),Wa(I)}}}),[{name:b2.name,fromWireType:function(m){var l={},n;for(n in k)l[n]=k[n].read(m);return d(m),l},toWireType:function(m,l){for(var n in k)if(!(n in l))throw TypeError('Missing field: "'+n+'"');var p=c();for(n in k)k[n].write(p,l[n]);return m!==null&&m.push(d,p),p},argPackAdvance:8,readValueFromPointer:Xa,V:d}]})},v:function(){},B:function(a,b2,c,d,e){var f=Za(c);b2=N(b2),W(a,{name:b2,fromWireType:function(g){return!!g},toWireType:function(g,k){return k?d:e},argPackAdvance:8,readValueFromPointer:function(g){if(c===1)var k=ja;else if(c===2)k=C;else if(c===4)k=D;else throw TypeError("Unknown boolean type size: "+b2);return this.fromWireType(k[g>>f])},V:null})},f:function(a,b2,c,d,e,f,g,k,m,l,n,p,r){n=N(n),f=Z(e,f),k&&(k=Z(g,k)),l&&(l=Z(m,l)),r=Z(p,r);var u=Aa(n);bb(u,function(){nb("Cannot construct "+n+" due to unbound types",[d])}),V([a,b2,c],d?[d]:[],function(t){if(t=t[0],d)var y=t.N,B=y.X;else B=X.prototype;t=Ba(u,function(){if(Object.getPrototypeOf(this)!==ba)throw new K("Use 'new' to construct "+n);if(I.Y===void 0)throw new K(n+" has no accessible constructor");var kb=I.Y[arguments.length];if(kb===void 0)throw new K("Tried to invoke ctor of "+n+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(I.Y).toString()+") parameters instead!");return kb.apply(this,arguments)});var ba=Object.create(B,{constructor:{value:t}});t.prototype=ba;var I=new cb(n,t,ba,r,y,f,k,l);y=new Y(n,I,!0,!1),B=new Y(n+"*",I,!1,!1);var lb=new Y(n+" const*",I,!1,!0);return Qa[a]={pointerType:B,la:lb},ib(u,t),[y,B,lb]})},d:function(a,b2,c,d,e,f,g){var k=pb(c,d);b2=N(b2),f=Z(e,f),V([],[a],function(m){function l(){nb("Cannot call "+n+" due to unbound types",k)}m=m[0];var n=m.name+"."+b2;b2.startsWith("@@")&&(b2=Symbol[b2.substring(2)]);var p=m.N.constructor;return p[b2]===void 0?(l.Z=c-1,p[b2]=l):(ab(p,b2,n),p[b2].S[c-1]=l),V([],k,function(r){return r=ob(n,[r[0],null].concat(r.slice(1)),null,f,g),p[b2].S===void 0?(r.Z=c-1,p[b2]=r):p[b2].S[c-1]=r,[]}),[]})},p:function(a,b2,c,d,e,f){0<b2||x();var g=pb(b2,c);e=Z(d,e),V([],[a],function(k){k=k[0];var m="constructor "+k.name;if(k.N.Y===void 0&&(k.N.Y=[]),k.N.Y[b2-1]!==void 0)throw new K("Cannot register multiple constructors with identical number of parameters ("+(b2-1)+") for class '"+k.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return k.N.Y[b2-1]=()=>{nb("Cannot construct "+k.name+" due to unbound types",g)},V([],g,function(l){return l.splice(1,0,null),k.N.Y[b2-1]=ob(m,l,null,e,f),[]}),[]})},a:function(a,b2,c,d,e,f,g,k){var m=pb(c,d);b2=N(b2),f=Z(e,f),V([],[a],function(l){function n(){nb("Cannot call "+p+" due to unbound types",m)}l=l[0];var p=l.name+"."+b2;b2.startsWith("@@")&&(b2=Symbol[b2.substring(2)]),k&&l.N.ja.push(b2);var r=l.N.X,u=r[b2];return u===void 0||u.S===void 0&&u.className!==l.name&&u.Z===c-2?(n.Z=c-2,n.className=l.name,r[b2]=n):(ab(r,b2,p),r[b2].S[c-2]=n),V([],m,function(t){return t=ob(p,t,l,f,g),r[b2].S===void 0?(t.Z=c-2,r[b2]=t):r[b2].S[c-2]=t,[]}),[]})},A:function(a,b2){b2=N(b2),W(a,{name:b2,fromWireType:function(c){var d=M(c);return qb(c),d},toWireType:function(c,d){return Ea(d)},argPackAdvance:8,readValueFromPointer:Xa,V:null})},n:function(a,b2,c){c=Za(c),b2=N(b2),W(a,{name:b2,fromWireType:function(d){return d},toWireType:function(d,e){return e},argPackAdvance:8,readValueFromPointer:rb(b2,c),V:null})},e:function(a,b2,c,d,e){b2=N(b2),e===-1&&(e=4294967295),e=Za(c);var f=(k)=>k;if(d===0){var g=32-8*c;f=(k)=>k<<g>>>g}c=b2.includes("unsigned")?function(k,m){return m>>>0}:function(k,m){return m},W(a,{name:b2,fromWireType:f,toWireType:c,argPackAdvance:8,readValueFromPointer:sb(b2,e,d!==0),V:null})},b:function(a,b2,c){function d(f){f>>=2;var g=E;return new e(ia,g[f+1],g[f])}var e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][b2];c=N(c),W(a,{name:c,fromWireType:d,argPackAdvance:8,readValueFromPointer:d},{ua:!0})},o:function(a,b2){b2=N(b2);var c=b2==="std::string";W(a,{name:b2,fromWireType:function(d){var e=E[d>>2],f=d+4;if(c)for(var g=f,k=0;k<=e;++k){var m=f+k;if(k==e||A[m]==0){if(g=g?z(A,g,m-g):"",l===void 0)var l=g;else l+=String.fromCharCode(0),l+=g;g=m+1}}else{l=Array(e);for(k=0;k<e;++k)l[k]=String.fromCharCode(A[f+k]);l=l.join("")}return S(d),l},toWireType:function(d,e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var f,g=typeof e=="string";if(g||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||L("Cannot pass non-string to std::string"),c&&g){var k=0;for(f=0;f<e.length;++f){var m=e.charCodeAt(f);127>=m?k++:2047>=m?k+=2:55296<=m&&57343>=m?(k+=4,++f):k+=3}f=k}else f=e.length;if(k=Ib(4+f+1),m=k+4,E[k>>2]=f,c&&g){if(g=m,m=f+1,f=A,0<m){m=g+m-1;for(var l=0;l<e.length;++l){var n=e.charCodeAt(l);if(55296<=n&&57343>=n){var p=e.charCodeAt(++l);n=65536+((n&1023)<<10)|p&1023}if(127>=n){if(g>=m)break;f[g++]=n}else{if(2047>=n){if(g+1>=m)break;f[g++]=192|n>>6}else{if(65535>=n){if(g+2>=m)break;f[g++]=224|n>>12}else{if(g+3>=m)break;f[g++]=240|n>>18,f[g++]=128|n>>12&63}f[g++]=128|n>>6&63}f[g++]=128|n&63}}f[g]=0}}else if(g)for(g=0;g<f;++g)l=e.charCodeAt(g),255<l&&(S(m),L("String has UTF-16 code units that do not fit in 8 bits")),A[m+g]=l;else for(g=0;g<f;++g)A[m+g]=e[g];return d!==null&&d.push(S,k),k},argPackAdvance:8,readValueFromPointer:Xa,V:function(d){S(d)}})},i:function(a,b2,c){if(c=N(c),b2===2)var d=tb,e=ub,f=vb,g=()=>ka,k=1;else b2===4&&(d=wb,e=xb,f=yb,g=()=>E,k=2);W(a,{name:c,fromWireType:function(m){for(var l=E[m>>2],n=g(),p,r=m+4,u=0;u<=l;++u){var t=m+4+u*b2;if(u==l||n[t>>k]==0)r=d(r,t-r),p===void 0?p=r:(p+=String.fromCharCode(0),p+=r),r=t+b2}return S(m),p},toWireType:function(m,l){typeof l!="string"&&L("Cannot pass non-string to C++ string type "+c);var n=f(l),p=Ib(4+n+b2);return E[p>>2]=n>>k,e(l,p+4,n+b2),m!==null&&m.push(S,p),p},argPackAdvance:8,readValueFromPointer:Xa,V:function(m){S(m)}})},k:function(a,b2,c,d,e,f){Va[a]={name:N(b2),fa:Z(c,d),W:Z(e,f),ia:[]}},h:function(a,b2,c,d,e,f,g,k,m,l){Va[a].ia.push({oa:N(b2),ta:c,ra:Z(d,e),sa:f,za:g,ya:Z(k,m),Aa:l})},C:function(a,b2){b2=N(b2),W(a,{va:!0,name:b2,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},s:function(a,b2,c,d,e){a=Bb[a],b2=M(b2),c=Ab(c);var f=[];return E[d>>2]=Ea(f),a(b2,c,f,e)},t:function(a,b2,c,d){a=Bb[a],b2=M(b2),c=Ab(c),a(b2,c,null,d)},g:qb,m:function(a,b2){var c=Db(a,b2),d=c[0];b2=d.name+"_$"+c.slice(1).map(function(g){return g.name}).join("_")+"$";var e=Eb[b2];if(e!==void 0)return e;var f=Array(a-1);return e=Cb((g,k,m,l)=>{for(var n=0,p=0;p<a-1;++p)f[p]=c[p+1].readValueFromPointer(l+n),n+=c[p+1].argPackAdvance;g=g[k].apply(g,f);for(p=0;p<a-1;++p)c[p+1].ma&&c[p+1].ma(f[p]);if(!d.va)return d.toWireType(m,g)}),Eb[b2]=e},D:function(a){4<a&&(J[a].ga+=1)},r:function(a){var b2=M(a);Wa(b2),qb(a)},c:function(){x("")},x:function(a,b2,c){A.copyWithin(a,b2,b2+c)},w:function(a){var b2=A.length;if(a>>>=0,2147483648<a)return!1;for(var c=1;4>=c;c*=2){var d=b2*(1+0.2/c);d=Math.min(d,a+100663296);var e=Math;d=Math.max(a,d),e=e.min.call(e,2147483648,d+(65536-d%65536)%65536);a:{try{fa.grow(e-ia.byteLength+65535>>>16),na();var f=1;break a}catch(g){}f=void 0}if(f)return!0}return!1},z:function(){return 52},u:function(){return 70},y:function(a,b2,c,d){for(var e=0,f=0;f<c;f++){var g=E[b2>>2],k=E[b2+4>>2];b2+=8;for(var m=0;m<k;m++){var l=A[g+m],n=Fb[a];l===0||l===10?((a===1?ea:v)(z(n,0)),n.length=0):n.push(l)}e+=k}return E[d>>2]=e,0}};(function(){function a(e){h.asm=e.exports,fa=h.asm.E,na(),oa=h.asm.J,qa.unshift(h.asm.F),F--,h.monitorRunDependencies&&h.monitorRunDependencies(F),F==0&&(ta!==null&&(clearInterval(ta),ta=null),G&&(e=G,G=null,e()))}function b2(e){a(e.instance)}function c(e){return ya().then(function(f){return WebAssembly.instantiate(f,d)}).then(function(f){return f}).then(e,function(f){v("failed to asynchronously prepare wasm: "+f),x(f)})}var d={a:Jb};if(F++,h.monitorRunDependencies&&h.monitorRunDependencies(F),h.instantiateWasm)try{return h.instantiateWasm(d,a)}catch(e){v("Module.instantiateWasm callback failed with error: "+e),ca(e)}return function(){return w||typeof WebAssembly.instantiateStreaming!="function"||ua(H)||typeof fetch!="function"?c(b2):fetch(H,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,d).then(b2,function(f){return v("wasm streaming compile failed: "+f),v("falling back to ArrayBuffer instantiation"),c(b2)})})}().catch(ca),{}})(),h.___wasm_call_ctors=function(){return(h.___wasm_call_ctors=h.asm.F).apply(null,arguments)};var Ka=h.___getTypeName=function(){return(Ka=h.___getTypeName=h.asm.G).apply(null,arguments)};h.__embind_initialize_bindings=function(){return(h.__embind_initialize_bindings=h.asm.H).apply(null,arguments)};var Ib=h._malloc=function(){return(Ib=h._malloc=h.asm.I).apply(null,arguments)},S=h._free=function(){return(S=h._free=h.asm.K).apply(null,arguments)};h.dynCall_jiji=function(){return(h.dynCall_jiji=h.asm.L).apply(null,arguments)};var Kb;G=function Lb(){Kb||Mb(),Kb||(G=Lb)};function Mb(){function a(){if(!Kb&&(Kb=!0,h.calledRun=!0,!ha)){if(za(qa),aa(h),h.onRuntimeInitialized)h.onRuntimeInitialized();if(h.postRun)for(typeof h.postRun=="function"&&(h.postRun=[h.postRun]);h.postRun.length;){var b2=h.postRun.shift();ra.unshift(b2)}za(ra)}}if(!(0<F)){if(h.preRun)for(typeof h.preRun=="function"&&(h.preRun=[h.preRun]);h.preRun.length;)sa();za(pa),0<F||(h.setStatus?(h.setStatus("Running..."),setTimeout(function(){setTimeout(function(){h.setStatus("")},1),a()},1)):a())}}if(h.preInit)for(typeof h.preInit=="function"&&(h.preInit=[h.preInit]);0<h.preInit.length;)h.preInit.pop()();return Mb(),loadYoga2.ready}})(),yoga_wasm_base64_esm_default=loadYoga,Align=function(Align2){return Align2[Align2.Auto=0]="Auto",Align2[Align2.FlexStart=1]="FlexStart",Align2[Align2.Center=2]="Center",Align2[Align2.FlexEnd=3]="FlexEnd",Align2[Align2.Stretch=4]="Stretch",Align2[Align2.Baseline=5]="Baseline",Align2[Align2.SpaceBetween=6]="SpaceBetween",Align2[Align2.SpaceAround=7]="SpaceAround",Align2[Align2.SpaceEvenly=8]="SpaceEvenly",Align2}({}),BoxSizing=function(BoxSizing2){return BoxSizing2[BoxSizing2.BorderBox=0]="BorderBox",BoxSizing2[BoxSizing2.ContentBox=1]="ContentBox",BoxSizing2}({}),Dimension=function(Dimension2){return Dimension2[Dimension2.Width=0]="Width",Dimension2[Dimension2.Height=1]="Height",Dimension2}({}),Direction=function(Direction2){return Direction2[Direction2.Inherit=0]="Inherit",Direction2[Direction2.LTR=1]="LTR",Direction2[Direction2.RTL=2]="RTL",Direction2}({}),Display=function(Display2){return Display2[Display2.Flex=0]="Flex",Display2[Display2.None=1]="None",Display2[Display2.Contents=2]="Contents",Display2}({}),Edge=function(Edge2){return Edge2[Edge2.Left=0]="Left",Edge2[Edge2.Top=1]="Top",Edge2[Edge2.Right=2]="Right",Edge2[Edge2.Bottom=3]="Bottom",Edge2[Edge2.Start=4]="Start",Edge2[Edge2.End=5]="End",Edge2[Edge2.Horizontal=6]="Horizontal",Edge2[Edge2.Vertical=7]="Vertical",Edge2[Edge2.All=8]="All",Edge2}({}),Errata=function(Errata2){return Errata2[Errata2.None=0]="None",Errata2[Errata2.StretchFlexBasis=1]="StretchFlexBasis",Errata2[Errata2.AbsolutePositionWithoutInsetsExcludesPadding=2]="AbsolutePositionWithoutInsetsExcludesPadding",Errata2[Errata2.AbsolutePercentAgainstInnerSize=4]="AbsolutePercentAgainstInnerSize",Errata2[Errata2.All=2147483647]="All",Errata2[Errata2.Classic=2147483646]="Classic",Errata2}({}),ExperimentalFeature=function(ExperimentalFeature2){return ExperimentalFeature2[ExperimentalFeature2.WebFlexBasis=0]="WebFlexBasis",ExperimentalFeature2}({}),FlexDirection=function(FlexDirection2){return FlexDirection2[FlexDirection2.Column=0]="Column",FlexDirection2[FlexDirection2.ColumnReverse=1]="ColumnReverse",FlexDirection2[FlexDirection2.Row=2]="Row",FlexDirection2[FlexDirection2.RowReverse=3]="RowReverse",FlexDirection2}({}),Gutter=function(Gutter2){return Gutter2[Gutter2.Column=0]="Column",Gutter2[Gutter2.Row=1]="Row",Gutter2[Gutter2.All=2]="All",Gutter2}({}),Justify=function(Justify2){return Justify2[Justify2.FlexStart=0]="FlexStart",Justify2[Justify2.Center=1]="Center",Justify2[Justify2.FlexEnd=2]="FlexEnd",Justify2[Justify2.SpaceBetween=3]="SpaceBetween",Justify2[Justify2.SpaceAround=4]="SpaceAround",Justify2[Justify2.SpaceEvenly=5]="SpaceEvenly",Justify2}({}),LogLevel=function(LogLevel2){return LogLevel2[LogLevel2.Error=0]="Error",LogLevel2[LogLevel2.Warn=1]="Warn",LogLevel2[LogLevel2.Info=2]="Info",LogLevel2[LogLevel2.Debug=3]="Debug",LogLevel2[LogLevel2.Verbose=4]="Verbose",LogLevel2[LogLevel2.Fatal=5]="Fatal",LogLevel2}({}),MeasureMode=function(MeasureMode2){return MeasureMode2[MeasureMode2.Undefined=0]="Undefined",MeasureMode2[MeasureMode2.Exactly=1]="Exactly",MeasureMode2[MeasureMode2.AtMost=2]="AtMost",MeasureMode2}({}),NodeType=function(NodeType2){return NodeType2[NodeType2.Default=0]="Default",NodeType2[NodeType2.Text=1]="Text",NodeType2}({}),Overflow=function(Overflow2){return Overflow2[Overflow2.Visible=0]="Visible",Overflow2[Overflow2.Hidden=1]="Hidden",Overflow2[Overflow2.Scroll=2]="Scroll",Overflow2}({}),PositionType=function(PositionType2){return PositionType2[PositionType2.Static=0]="Static",PositionType2[PositionType2.Relative=1]="Relative",PositionType2[PositionType2.Absolute=2]="Absolute",PositionType2}({}),Unit=function(Unit2){return Unit2[Unit2.Undefined=0]="Undefined",Unit2[Unit2.Point=1]="Point",Unit2[Unit2.Percent=2]="Percent",Unit2[Unit2.Auto=3]="Auto",Unit2}({}),Wrap=function(Wrap2){return Wrap2[Wrap2.NoWrap=0]="NoWrap",Wrap2[Wrap2.Wrap=1]="Wrap",Wrap2[Wrap2.WrapReverse=2]="WrapReverse",Wrap2}({}),constants={ALIGN_AUTO:Align.Auto,ALIGN_FLEX_START:Align.FlexStart,ALIGN_CENTER:Align.Center,ALIGN_FLEX_END:Align.FlexEnd,ALIGN_STRETCH:Align.Stretch,ALIGN_BASELINE:Align.Baseline,ALIGN_SPACE_BETWEEN:Align.SpaceBetween,ALIGN_SPACE_AROUND:Align.SpaceAround,ALIGN_SPACE_EVENLY:Align.SpaceEvenly,BOX_SIZING_BORDER_BOX:BoxSizing.BorderBox,BOX_SIZING_CONTENT_BOX:BoxSizing.ContentBox,DIMENSION_WIDTH:Dimension.Width,DIMENSION_HEIGHT:Dimension.Height,DIRECTION_INHERIT:Direction.Inherit,DIRECTION_LTR:Direction.LTR,DIRECTION_RTL:Direction.RTL,DISPLAY_FLEX:Display.Flex,DISPLAY_NONE:Display.None,DISPLAY_CONTENTS:Display.Contents,EDGE_LEFT:Edge.Left,EDGE_TOP:Edge.Top,EDGE_RIGHT:Edge.Right,EDGE_BOTTOM:Edge.Bottom,EDGE_START:Edge.Start,EDGE_END:Edge.End,EDGE_HORIZONTAL:Edge.Horizontal,EDGE_VERTICAL:Edge.Vertical,EDGE_ALL:Edge.All,ERRATA_NONE:Errata.None,ERRATA_STRETCH_FLEX_BASIS:Errata.StretchFlexBasis,ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING:Errata.AbsolutePositionWithoutInsetsExcludesPadding,ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE:Errata.AbsolutePercentAgainstInnerSize,ERRATA_ALL:Errata.All,ERRATA_CLASSIC:Errata.Classic,EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS:ExperimentalFeature.WebFlexBasis,FLEX_DIRECTION_COLUMN:FlexDirection.Column,FLEX_DIRECTION_COLUMN_REVERSE:FlexDirection.ColumnReverse,FLEX_DIRECTION_ROW:FlexDirection.Row,FLEX_DIRECTION_ROW_REVERSE:FlexDirection.RowReverse,GUTTER_COLUMN:Gutter.Column,GUTTER_ROW:Gutter.Row,GUTTER_ALL:Gutter.All,JUSTIFY_FLEX_START:Justify.FlexStart,JUSTIFY_CENTER:Justify.Center,JUSTIFY_FLEX_END:Justify.FlexEnd,JUSTIFY_SPACE_BETWEEN:Justify.SpaceBetween,JUSTIFY_SPACE_AROUND:Justify.SpaceAround,JUSTIFY_SPACE_EVENLY:Justify.SpaceEvenly,LOG_LEVEL_ERROR:LogLevel.Error,LOG_LEVEL_WARN:LogLevel.Warn,LOG_LEVEL_INFO:LogLevel.Info,LOG_LEVEL_DEBUG:LogLevel.Debug,LOG_LEVEL_VERBOSE:LogLevel.Verbose,LOG_LEVEL_FATAL:LogLevel.Fatal,MEASURE_MODE_UNDEFINED:MeasureMode.Undefined,MEASURE_MODE_EXACTLY:MeasureMode.Exactly,MEASURE_MODE_AT_MOST:MeasureMode.AtMost,NODE_TYPE_DEFAULT:NodeType.Default,NODE_TYPE_TEXT:NodeType.Text,OVERFLOW_VISIBLE:Overflow.Visible,OVERFLOW_HIDDEN:Overflow.Hidden,OVERFLOW_SCROLL:Overflow.Scroll,POSITION_TYPE_STATIC:PositionType.Static,POSITION_TYPE_RELATIVE:PositionType.Relative,POSITION_TYPE_ABSOLUTE:PositionType.Absolute,UNIT_UNDEFINED:Unit.Undefined,UNIT_POINT:Unit.Point,UNIT_PERCENT:Unit.Percent,UNIT_AUTO:Unit.Auto,WRAP_NO_WRAP:Wrap.NoWrap,WRAP_WRAP:Wrap.Wrap,WRAP_WRAP_REVERSE:Wrap.WrapReverse},YGEnums_default=constants;Yoga=wrapAssembly(await yoga_wasm_base64_esm_default()),src_default2=Yoga,VALID_BORDER_STYLES=["single","double","rounded","heavy"];BorderChars={single:{topLeft:"\u250C",topRight:"\u2510",bottomLeft:"\u2514",bottomRight:"\u2518",horizontal:"\u2500",vertical:"\u2502",topT:"\u252C",bottomT:"\u2534",leftT:"\u251C",rightT:"\u2524",cross:"\u253C"},double:{topLeft:"\u2554",topRight:"\u2557",bottomLeft:"\u255A",bottomRight:"\u255D",horizontal:"\u2550",vertical:"\u2551",topT:"\u2566",bottomT:"\u2569",leftT:"\u2560",rightT:"\u2563",cross:"\u256C"},rounded:{topLeft:"\u256D",topRight:"\u256E",bottomLeft:"\u2570",bottomRight:"\u256F",horizontal:"\u2500",vertical:"\u2502",topT:"\u252C",bottomT:"\u2534",leftT:"\u251C",rightT:"\u2524",cross:"\u253C"},heavy:{topLeft:"\u250F",topRight:"\u2513",bottomLeft:"\u2517",bottomRight:"\u251B",horizontal:"\u2501",vertical:"\u2503",topT:"\u2533",bottomT:"\u253B",leftT:"\u2523",rightT:"\u252B",cross:"\u254B"}};BorderCharArrays={single:borderCharsToArray(BorderChars.single),double:borderCharsToArray(BorderChars.double),rounded:borderCharsToArray(BorderChars.rounded),heavy:borderCharsToArray(BorderChars.heavy)};KeyHandler=class KeyHandler extends EventEmitter2{processParsedKey(parsedKey){try{switch(parsedKey.eventType){case"press":this.emit("keypress",new KeyEvent(parsedKey));break;case"release":this.emit("keyrelease",new KeyEvent(parsedKey));break;default:this.emit("keypress",new KeyEvent(parsedKey));break}}catch(error2){return console.error("[KeyHandler] Error processing parsed key:",error2),!0}return!0}processPaste(bytes,metadata){try{this.emit("paste",new PasteEvent(bytes,metadata))}catch(error2){console.error("[KeyHandler] Error processing paste:",error2)}}};InternalKeyHandler=class InternalKeyHandler extends KeyHandler{renderableHandlers=new Map;emit(event,...args){return this.emitWithPriority(event,...args)}emitWithPriority(event,...args){let hasGlobalListeners=!1,globalListeners=this.listeners(event);if(globalListeners.length>0){hasGlobalListeners=!0;for(let listener of globalListeners){try{listener(...args)}catch(error2){console.error(`[KeyHandler] Error in global ${event} handler:`,error2)}if(event==="keypress"||event==="keyrelease"||event==="paste"){if(args[0].propagationStopped)return hasGlobalListeners}}}let renderableSet=this.renderableHandlers.get(event),renderableHandlers=renderableSet&&renderableSet.size>0?[...renderableSet]:[],hasRenderableListeners=!1;if(renderableSet&&renderableSet.size>0){if(hasRenderableListeners=!0,event==="keypress"||event==="keyrelease"||event==="paste"){let keyEvent=args[0];if(keyEvent.defaultPrevented)return hasGlobalListeners||hasRenderableListeners;if(keyEvent.propagationStopped)return hasGlobalListeners||hasRenderableListeners}for(let handler of renderableHandlers){try{handler(...args)}catch(error2){console.error(`[KeyHandler] Error in renderable ${event} handler:`,error2)}if(event==="keypress"||event==="keyrelease"||event==="paste"){if(args[0].propagationStopped)return hasGlobalListeners||hasRenderableListeners}}}return hasGlobalListeners||hasRenderableListeners}onInternal(event,handler){if(!this.renderableHandlers.has(event))this.renderableHandlers.set(event,new Set);this.renderableHandlers.get(event).add(handler)}offInternal(event,handler){let handlers2=this.renderableHandlers.get(event);if(handlers2)handlers2.delete(handler)}};DEFAULT_FOREGROUND_RGB=[255,255,255],DEFAULT_BACKGROUND_RGB=[0,0,0],ANSI16_RGB=[[0,0,0],[128,0,0],[0,128,0],[128,128,0],[0,0,128],[128,0,128],[0,128,128],[192,192,192],[128,128,128],[255,0,0],[0,255,0],[255,255,0],[0,0,255],[255,0,255],[0,255,255],[255,255,255]],ANSI_256_CUBE_LEVELS=[0,95,135,175,215,255];CSS_COLOR_NAMES={black:"#000000",white:"#FFFFFF",red:"#FF0000",green:"#008000",blue:"#0000FF",yellow:"#FFFF00",cyan:"#00FFFF",magenta:"#FF00FF",silver:"#C0C0C0",gray:"#808080",grey:"#808080",maroon:"#800000",olive:"#808000",lime:"#00FF00",aqua:"#00FFFF",teal:"#008080",navy:"#000080",fuchsia:"#FF00FF",purple:"#800080",orange:"#FFA500",brightblack:"#666666",brightred:"#FF6666",brightgreen:"#66FF66",brightblue:"#6666FF",brightyellow:"#FFFF66",brightcyan:"#66FFFF",brightmagenta:"#FF66FF",brightwhite:"#FFFFFF"};block_default={name:"block",version:"0.2.0",homepage:"https://github.com/dominikwilkowski/cfonts",colors:2,lines:6,buffer:["","","","","",""],letterspace:[" "," "," "," "," "," "],letterspace_size:1,chars:{A:[" <c1>\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2> ","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A\u2550\u255D \u255A\u2550\u255D</c2>"],B:["<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u2550\u255D </c2>"],C:[" <c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550\u2550\u255D</c2>","<c1>\u2588\u2588</c1><c2>\u2551 </c2>","<c1>\u2588\u2588</c1><c2>\u2551 </c2>","<c2>\u255A</c2><c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2> \u255A\u2550\u2550\u2550\u2550\u2550\u255D</c2>"],D:["<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u2550\u255D </c2>"],E:["<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550\u2550\u255D</c2>","<c1>\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u255D </c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D</c2>"],F:["<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550\u2550\u255D</c2>","<c1>\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u255D </c2>","<c1>\u2588\u2588</c1><c2>\u2551 </c2>","<c2>\u255A\u2550\u255D </c2>"],G:[" <c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550\u2550\u255D </c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A</c2><c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A\u2550\u2550\u2550\u2550\u2550\u255D </c2>"],H:["<c1>\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A\u2550\u255D \u255A\u2550\u255D</c2>"],I:["<c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A\u2550\u255D</c2>"],J:["<c1> \u2588\u2588</c1><c2>\u2557</c2>","<c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588 \u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A</c2><c1>\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A\u2550\u2550\u2550\u2550\u255D </c2>"],K:["<c1>\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2554\u255D</c2>","<c1>\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u255D \u255A\u2550\u255D</c2>"],L:["<c1>\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2551 </c2>","<c1>\u2588\u2588</c1><c2>\u2551 </c2>","<c1>\u2588\u2588</c1><c2>\u2551 </c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D</c2>"],M:["<c1>\u2588\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2554</c2><c1>\u2588\u2588\u2588\u2588</c1><c2>\u2554</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551\u255A</c2><c1>\u2588\u2588</c1><c2>\u2554\u255D</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551 \u255A\u2550\u255D</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A\u2550\u255D \u255A\u2550\u255D</c2>"],N:["<c1>\u2588\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2554</c2><c1>\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551\u255A</c2><c1>\u2588\u2588</c1><c2>\u2557</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551 \u255A</c2><c1>\u2588\u2588\u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D</c2>"],O:[" <c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A</c2><c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A\u2550\u2550\u2550\u2550\u2550\u255D </c2>"],P:["<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550\u255D </c2>","<c1>\u2588\u2588</c1><c2>\u2551 </c2>","<c2>\u255A\u2550\u255D </c2>"],Q:[" <c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1>\u2584\u2584 \u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A</c2><c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A\u2550\u2550</c2><c1>\u2580\u2580</c1><c2>\u2550\u255D </c2>"],R:["<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A\u2550\u255D \u255A\u2550\u255D</c2>"],S:["<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550\u2550\u255D</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D</c2>"],T:["<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u255D</c2>","<c1> \u2588\u2588</c1><c2>\u2551 </c2>","<c1> \u2588\u2588</c1><c2>\u2551 </c2>","<c1> \u2588\u2588</c1><c2>\u2551 </c2>","<c2> \u255A\u2550\u255D </c2>"],U:["<c1>\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A</c2><c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A\u2550\u2550\u2550\u2550\u2550\u255D </c2>"],V:["<c1>\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A</c2><c1>\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A</c2><c1>\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D </c2>","<c2> \u255A\u2550\u2550\u2550\u255D </c2>"],W:["<c1>\u2588\u2588</c1><c2>\u2557 </c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551 </c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1>\u2588\u2588\u2588</c1><c2>\u2557</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A</c2><c1>\u2588\u2588\u2588</c1><c2>\u2554</c2><c1>\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A\u2550\u2550\u255D\u255A\u2550\u2550\u255D </c2>"],X:["<c1>\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A</c2><c1>\u2588\u2588</c1><c2>\u2557</c2><c1>\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A</c2><c1>\u2588\u2588\u2588</c1><c2>\u2554\u255D </c2>"," <c1>\u2588\u2588</c1><c2>\u2554</c2><c1>\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u255D</c2><c1> \u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u255D \u255A\u2550\u255D</c2>"],Y:["<c1>\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A</c2><c1>\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A</c2><c1>\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D </c2>","<c2> \u255A</c2><c1>\u2588\u2588</c1><c2>\u2554\u255D </c2>","<c1> \u2588\u2588</c1><c2>\u2551 </c2>","<c2> \u255A\u2550\u255D </c2>"],Z:["<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550</c2><c1>\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c1> \u2588\u2588\u2588</c1><c2>\u2554\u255D </c2>"," <c1>\u2588\u2588\u2588</c1><c2>\u2554\u255D </c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D</c2>"],"0":[" <c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550</c2><c1>\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1>\u2588\u2588</c1><c2>\u2554</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A</c2><c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A\u2550\u2550\u2550\u2550\u2550\u255D </c2>"],"1":[" <c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>"," <c1>\u2588\u2588</c1><c2>\u2551</c2>"," <c1>\u2588\u2588</c1><c2>\u2551</c2>","<c2> \u255A\u2550\u255D</c2>"],"2":["<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c2>\u255A\u2550\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>"," <c1>\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550\u255D </c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D</c2>"],"3":["<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c2>\u255A\u2550\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>"," <c1>\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u2550\u255D </c2>"],"4":["<c1>\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1> \u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A\u2550\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1> \u2588\u2588</c1><c2>\u2551</c2>","<c2> \u255A\u2550\u255D</c2>"],"5":["<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550\u2550\u255D</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D</c2>"],"6":[" <c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550\u2550\u255D </c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A</c2><c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A\u2550\u2550\u2550\u2550\u2550\u255D </c2>"],"7":["<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1> \u2588\u2588</c1><c2>\u2554\u255D</c2>","<c1> \u2588\u2588</c1><c2>\u2554\u255D </c2>","<c1> \u2588\u2588</c1><c2>\u2551 </c2>","<c2> \u255A\u2550\u255D </c2>"],"8":[" <c1>\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A</c2><c1>\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A</c2><c1>\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A\u2550\u2550\u2550\u2550\u255D </c2>"],"9":[" <c1>\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A</c2><c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2551</c2>","<c2> \u255A\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>"," <c1>\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A\u2550\u2550\u2550\u2550\u255D </c2>"],"!":["<c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A\u2550\u255D</c2>","<c1>\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u255D</c2>"],"?":["<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c2>\u255A\u2550\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1> \u2584\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c1> \u2580\u2580</c1><c2>\u2550\u2550\u255D </c2>","<c1> \u2588\u2588</c1><c2>\u2557 </c2>","<c2> \u255A\u2550\u255D </c2>"],".":[" "," "," "," ","<c1>\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u255D</c2>"],"+":[" ","<c1> \u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2> \u255A</c2><c1>\u2588\u2588</c1><c2>\u2554\u2550\u255D</c2>","<c2> \u255A\u2550\u255D </c2>"," "],"-":[" "," ","<c1>\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u255D</c2>"," "," "],_:[" "," "," "," ","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D</c2>"],"=":[" ","<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u2550\u255D</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u2550\u255D</c2>"," "],"@":[" <c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1>\u2588\u2588</c1><c2>\u2557</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2551</c2><c1>\u2588\u2588</c1><c2>\u2551</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A</c2><c1>\u2588</c1><c2>\u2551</c2><c1>\u2588\u2588\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A\u255D\u255A\u2550\u2550\u2550\u255D </c2>"],"#":[" <c1>\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2557 </c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A</c2><c1>\u2588\u2588</c1><c2>\u2554\u2550</c2><c1>\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A</c2><c1>\u2588\u2588</c1><c2>\u2554\u2550</c2><c1>\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2> \u255A\u2550\u255D \u255A\u2550\u255D </c2>"],$:["<c1>\u2584\u2584\u2588\u2588\u2588\u2584\u2584</c1><c2>\xB7</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550\u2550\u2550\u2550\u255D</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u2550\u2550\u2550</c2><c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2551</c2>","<c2>\u255A\u2550</c2><c1>\u2580\u2580\u2580</c1><c2>\u2550\u2550\u255D</c2>"],"%":["<c1>\u2588\u2588</c1><c2>\u2557</c2><c1> \u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u255D</c2><c1>\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c1> \u2588\u2588</c1><c2>\u2554\u255D </c2>"," <c1>\u2588\u2588</c1><c2>\u2554\u255D </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u255D</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u255D \u255A\u2550\u255D</c2>"],"&":["<c1> \u2588\u2588</c1><c2>\u2557 </c2>","<c1> \u2588\u2588</c1><c2>\u2551 </c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u2550</c2><c1>\u2588\u2588</c1><c2>\u2554\u2550\u255D</c2>","<c1>\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2551 </c2>","<c2>\u255A\u2550\u2550\u2550\u2550\u2550\u255D </c2>"],"(":[" <c1>\u2588\u2588</c1><c2>\u2557</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c1>\u2588\u2588</c1><c2>\u2551 ","<c1>\u2588\u2588</c1><c2>\u2551 ","<c2>\u255A</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>","<c2> \u255A\u2550\u255D</c2>"],")":["<c1>\u2588\u2588</c1><c2>\u2557 </c2>","<c2>\u255A</c2><c1>\u2588\u2588</c1><c2>\u2557</c2>"," <c1>\u2588\u2588</c1><c2>\u2551</c2>"," <c1>\u2588\u2588</c1><c2>\u2551</c2>","<c1>\u2588\u2588</c1><c2>\u2554\u255D</c2>","<c2>\u255A\u2550\u255D </c2>"],"/":["<c1> \u2588\u2588</c1><c2>\u2557</c2>","<c1> \u2588\u2588</c1><c2>\u2554\u255D</c2>","<c1> \u2588\u2588</c1><c2>\u2554\u255D </c2>"," <c1>\u2588\u2588</c1><c2>\u2554\u255D </c2>","<c1>\u2588\u2588</c1><c2>\u2554\u255D </c2>","<c2>\u255A\u2550\u255D </c2>"],":":[" ","<c1>\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u255D</c2>","<c1>\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u255D</c2>"," "],";":[" "," ","<c1>\u2588\u2588</c1><c2>\u2557</c2>","<c2>\u255A\u2550\u255D</c2>","<c1>\u2584\u2588</c1><c2>\u2557</c2>","<c1>\u2580</c1><c2>\u2550\u255D</c2>"],",":[" "," "," "," ","<c1>\u2584\u2588</c1><c2>\u2557</c2>","<c1>\u2580</c1><c2>\u2550\u255D</c2>"],"'":["<c1>\u2588</c1><c2>\u2557</c2> ","<c2>\u255A\u255D</c2> "," "," "," "," "],'"':["<c1>\u2588</c1><c2>\u2557</c2><c1>\u2588</c1><c2>\u2557</c2> ","<c2>\u255A\u255D\u255A\u255D</c2> "," "," "," "," "]," ":[" "," "," "," "," "," "]}},shade_default={name:"shade",version:"0.2.0",homepage:"https://github.com/dominikwilkowski/cfonts",colors:2,lines:8,buffer:["","","","","","","",""],letterspace:["<c2>\u2591</c2>","<c2>\u2591</c2>","<c2>\u2591</c2>","<c2>\u2591</c2>","<c2>\u2591</c2>","<c2>\u2591</c2>","<c2>\u2591</c2>","<c2>\u2591</c2>"],letterspace_size:1,chars:{A:["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588 \u2588</c1>","<c1>\u2588\u2588\u2588\u2588</c1>","<c1>\u2588 \u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>"," <c2>\u2591\u2591</c2> ","<c2>\u2591\u2591\u2591\u2591</c2>"],B:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588 \u2588</c1>","<c1>\u2588\u2588\u2588</c1> ","<c1>\u2588 \u2588</c1>","<c1>\u2588\u2588\u2588</c1> "," <c2>\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],C:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>","<c1>\u2588</c1> ","<c1>\u2588</c1><c2>\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>"," ","<c2>\u2591\u2591\u2591\u2591</c2>"],D:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588 \u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588\u2588\u2588</c1> "," <c2>\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],E:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>","<c1>\u2588</c1> ","<c1>\u2588\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588</c1> <c2>\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>"," ","<c2>\u2591\u2591\u2591\u2591</c2>"],F:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>","<c1>\u2588</c1> ","<c1>\u2588\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588</c1> <c2>\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591\u2591</c2>"," <c2>\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],G:["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588\u2588</c1>","<c1>\u2588</c1> ","<c1>\u2588</c1><c2>\u2591</c2><c1>\u2588\u2588</c1>","<c1>\u2588</c1><c2>\u2591</c2> <c1>\u2588</c1>","<c1>\u2588\u2588\u2588</c1> "," <c2>\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],H:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588\u2588\u2588\u2588</c1>","<c1>\u2588 \u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>"," <c2>\u2591\u2591</c2> ","<c2>\u2591\u2591\u2591\u2591</c2>"],I:["<c2>\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588</c1>"," <c1>\u2588</c1> ","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c1>\u2588\u2588\u2588</c1>"," ","<c2>\u2591\u2591\u2591</c2>"],J:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588</c1><c2>\u2591</c2>"," <c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c1>\u2588</c1><c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c1>\u2588\u2588\u2588</c1><c2>\u2591</c2>"," <c2>\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],K:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588\u2588\u2588</c1> ","<c1>\u2588 \u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>"," <c2>\u2591\u2591</c2> ","<c2>\u2591\u2591\u2591\u2591</c2>"],L:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>"," ","<c2>\u2591\u2591\u2591\u2591</c2>"],M:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588\u2588\u2588\u2588</c1>","<c1>\u2588 \u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>"," <c2>\u2591\u2591</c2> ","<c2>\u2591\u2591\u2591\u2591</c2>"],N:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588\u2588</c1><c2>\u2591</c2><c1>\u2588</c1>","<c1>\u2588 \u2588\u2588</c1>","<c1>\u2588</c1><c2>\u2591</c2> <c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>"," <c2>\u2591\u2591</c2> ","<c2>\u2591\u2591\u2591\u2591</c2>"],O:["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588 \u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>"," <c1>\u2588\u2588</c1> ","<c2>\u2591 \u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],P:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588 \u2588</c1>","<c1>\u2588\u2588\u2588</c1> ","<c1>\u2588</c1> <c2>\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591\u2591</c2>"," <c2>\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],Q:["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588 \u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>"," <c1>\u2588\u2588\u2588</c1>","<c2>\u2591</c2> ","<c2>\u2591\u2591\u2591\u2591</c2>"],R:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588 \u2588</c1>","<c1>\u2588\u2588\u2588</c1> ","<c1>\u2588 \u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>"," <c2>\u2591\u2591</c2> ","<c2>\u2591\u2591\u2591\u2591</c2>"],S:["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588\u2588</c1>","<c1>\u2588</c1> "," <c1>\u2588\u2588</c1><c2>\u2591</c2>","<c2>\u2591</c2> <c1>\u2588</c1>","<c1>\u2588\u2588\u2588</c1> "," <c2>\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],T:["<c2>\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588</c1>"," <c1>\u2588</c1> ","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591 \u2591</c2>","<c2>\u2591\u2591\u2591</c2>"],U:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>"," <c1>\u2588\u2588</c1> ","<c2>\u2591 \u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],V:["<c2>\u2591\u2591\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591\u2591</c2><c1>\u2588</c1>"," <c1>\u2588</c1><c2>\u2591</c2><c1>\u2588</c1> ","<c2>\u2591</c2> <c1>\u2588</c1> <c2>\u2591</c2>","<c2>\u2591\u2591 \u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591\u2591</c2>"],W:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588\u2588\u2588\u2588</c1>","<c1>\u2588 \u2588</c1>"," <c2>\u2591\u2591</c2> ","<c2>\u2591\u2591\u2591\u2591</c2>"],X:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>"," <c1>\u2588\u2588</c1> ","<c1>\u2588 \u2588</c1>","<c1>\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588</c1>"," <c2>\u2591\u2591</c2> ","<c2>\u2591\u2591\u2591\u2591</c2>"],Y:["<c2>\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591</c2><c1>\u2588</c1>","<c1>\u2588\u2588\u2588</c1>"," <c1>\u2588</c1> ","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591 \u2591</c2>","<c2>\u2591\u2591\u2591</c2>"],Z:["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>"," <c1>\u2588</c1> ","<c2>\u2591</c2><c1>\u2588</c1> <c2>\u2591</c2>","<c1>\u2588</c1> <c2>\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>"," ","<c2>\u2591\u2591\u2591\u2591</c2>"],"0":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588 \u2588</c1>","<c1>\u2588</c1><c2>\u2591</c2><c1>\u258C\u2588</c1>","<c1>\u2588</c1><c2>\u2591</c2> <c1>\u2588</c1>"," <c1>\u2588\u2588</c1> ","<c2>\u2591 \u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],"1":["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588</c1><c2>\u2591\u2591</c2>"," <c1>\u2588</c1><c2>\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591\u2591</c2>","<c1>\u2588\u2588\u2588</c1><c2>\u2591</c2>"," <c2>\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],"2":["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2590\u2588\u2588</c1><c2>\u2591</c2>"," <c1>\u2588</c1>","<c2>\u2591\u2591</c2><c1>\u2588</c1> ","<c2>\u2591</c2><c1>\u2588</c1> <c2>\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>"," ","<c2>\u2591\u2591\u2591\u2591</c2>"],"3":["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>"," <c1>\u2588</c1>","<c2>\u2591\u2591</c2><c1>\u2588\u2588</c1>","<c2>\u2591\u2591</c2> <c1>\u2588</c1>","<c1>\u2588\u2588\u2588\u2588</c1>"," ","<c2>\u2591\u2591\u2591\u2591</c2>"],"4":["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>"," <c1>\u2588</c1>","<c2>\u2591\u2591\u2591</c2><c1>\u2588</c1>","<c2>\u2591\u2591\u2591</c2> ","<c2>\u2591\u2591\u2591\u2591</c2>"],"5":["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>","<c1>\u2588</c1> ","<c1>\u2588\u2588\u2588</c1><c2>\u2591</c2>"," <c1>\u2588</c1>","<c1>\u2588\u2588\u2588</c1> "," <c2>\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],"6":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588\u2588</c1>","<c1>\u2588</c1> ","<c1>\u2588\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588 \u2588</c1>"," <c1>\u2588\u2588</c1> ","<c2>\u2591 \u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],"7":["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>"," <c1>\u2588</c1>","<c1>\u2588\u2588\u2588\u2588</c1>"," <c1>\u2588</c1> ","<c1>\u2588</c1> <c2>\u2591\u2591</c2>"," <c2>\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],"8":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588 \u2588</c1>"," <c1>\u2588\u2588</c1> ","<c1>\u2588 \u2588</c1>"," <c1>\u2588\u2588</c1> ","<c2>\u2591 \u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],"9":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588 \u2588</c1>"," <c1>\u2588\u2588\u2588</c1>","<c2>\u2591</c2> <c1>\u2588</c1>","<c2>\u2591\u2591</c2><c1>\u2588</c1> ","<c2>\u2591\u2591 \u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],"!":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588</c1><c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588</c1><c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588</c1><c2>\u2591</c2>","<c2>\u2591 \u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588</c1><c2>\u2591</c2>","<c2>\u2591 \u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],"?":["<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2590\u2588\u2588</c1><c2>\u2591</c2>"," <c1>\u2588</c1>","<c2>\u2591\u2591</c2><c1>\u2588</c1> ","<c2>\u2591\u2591 \u2591</c2>","<c2>\u2591\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591\u2591 \u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],".":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591\u2591 \u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],"+":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588\u2588</c1>","<c2>\u2591</c2> <c1>\u2588</c1> ","<c2>\u2591\u2591 \u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],"-":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>"," ","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],_:["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>"," "],"=":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>"," ","<c1>\u2588\u2588\u2588\u2588</c1>"," ","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],"@":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588</c1><c2>\u2591</c2>","<c1>\u2588 \u2588</c1>","<c1>\u2588</c1><c2>\u2591</c2><c1>\u258C\u2588</c1>","<c1>\u2588</c1><c2>\u2591</c2><c1>\u2588</c1> "," <c1>\u2588\u2588\u2588</c1>"," ","<c2>\u2591\u2591\u2591\u2591</c2>"],"#":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591</c2>","<c1>\u2588\u2588\u2588\u2588</c1>"," <c1>\u258C\u2590</c1> ","<c1>\u2588\u2588\u2588\u2588</c1>"," <c1>\u258C\u2590</c1> ","<c2>\u2591 \u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],$:["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591</c2><c1>\u258C</c1><c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588\u2588\u2588</c1>","<c1>\u2588 \u2588</c1> "," <c1>\u2588\u2588</c1><c2>\u2591</c2>","<c2>\u2591\u2591</c2><c1>\u258C\u2588</c1>","<c1>\u2588\u2588\u2588</c1> "," <c2>\u2591</c2>"],"%":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1><c2>\u2591</c2><c1>\u2588</c1> "," <c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1> <c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2><c1>\u2588</c1>","<c1>\u2588</c1> <c2>\u2591</c2> "," <c2>\u2591\u2591\u2591</c2>"],"&":["<c2>\u2591\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591\u2591\u2591</c2>","<c1>\u2588\u2588\u2588\u2588\u2588</c1>","<c1>\u2588 \u2588</c1> ","<c1>\u2588\u2588\u2588\u2588</c1><c2>\u2591</c2>","<c2> </c2> ","<c2>\u2591\u2591\u2591\u2591\u2591</c2>"],"(":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1> <c2>\u2591</c2>","<c1>\u2588</c1> <c2>\u2591\u2591</c2>","<c1>\u2588</c1><c2>\u2591\u2591\u2591</c2>"," <c1>\u2588</c1><c2>\u2591\u2591</c2>","<c2>\u2591</c2> <c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591\u2591 \u2591</c2>"],")":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591\u2591</c2>","<c2>\u2591</c2> <c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591\u2591</c2> <c1>\u2588</c1>","<c2>\u2591\u2591\u2591</c2><c1>\u2588</c1>","<c2>\u2591\u2591</c2><c1>\u2588</c1> ","<c2>\u2591</c2><c1>\u2588</c1> <c2>\u2591</c2>","<c2>\u2591 \u2591\u2591</c2>"],"/":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591</c2><c1>\u2588</c1>","<c2>\u2591\u2591</c2><c1>\u2588</c1> ","<c2>\u2591\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1> <c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591\u2591</c2>","<c1>\u2588</c1> <c2>\u2591\u2591</c2>"," <c2>\u2591\u2591\u2591</c2>"],":":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591\u2591</c2>","<c2>\u2591 \u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591\u2591</c2>","<c2>\u2591 \u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],";":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591\u2591</c2>","<c2>\u2591 \u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591\u2591</c2>"],",":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591</c2><c1>\u2588</c1><c2>\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1> <c2>\u2591</c2>"],"'":["<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591\u2591</c2>","<c2>\u2591 \u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591</c2>"],'"':["<c2>\u2591\u2591\u2591\u2591\u2591\u2591</c2>","<c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2><c1>\u2588</c1><c2>\u2591\u2591</c2>","<c2>\u2591 \u2591 \u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591\u2591\u2591\u2591</c2>"]," ":["<c2>\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591</c2>","<c2>\u2591\u2591\u2591</c2>"]}},slick_default={name:"slick",version:"0.1.0",homepage:"https://github.com/dominikwilkowski/cfonts",colors:2,lines:6,buffer:["","","","","",""],letterspace:["<c2>\u2571</c2>","<c2>\u2571</c2>","<c2>\u2571</c2>","<c2>\u2571</c2>","<c2>\u2571</c2>","<c2>\u2571</c2>"],letterspace_size:1,chars:{A:["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2503\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2570\u256F</c1><c2>\u2571</c2><c1>\u2570\u256F</c1>"],B:["<c1>\u256D\u2501\u2501\u256E</c1><c2>\u2571</c2>","<c1>\u2503\u256D\u256E\u2503</c1><c2>\u2571</c2>","<c1>\u2503\u2570\u256F\u2570\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],C:["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2570\u256F</c1>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u256D\u256E</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],D:["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2570\u256E\u256D\u256E\u2503</c1>","<c2>\u2571</c2><c1>\u2503\u2503\u2503\u2503</c1>","<c2>\u2571</c2><c1>\u2503\u2503\u2503\u2503</c1>","<c1>\u256D\u256F\u2570\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],E:["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u2501\u256F</c1>","<c1>\u2503\u2570\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u2501\u256F</c1>","<c1>\u2503\u2570\u2501\u2501\u256E</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],F:["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u2501\u256F</c1>","<c1>\u2503\u2570\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u2501\u256F</c1>","<c1>\u2503\u2503</c1><c2>\u2571\u2571\u2571</c2>","<c1>\u2570\u256F</c1><c2>\u2571\u2571\u2571</c2>"],G:["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2570\u256F</c1>","<c1>\u2503\u2503\u256D\u2501\u256E</c1>","<c1>\u2503\u2570\u253B\u2501\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],H:["<c1>\u256D\u256E</c1><c2>\u2571</c2><c1>\u256D\u256E</c1>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2503\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2503\u2503</c1>","<c1>\u2570\u256F</c1><c2>\u2571</c2><c1>\u2570\u256F</c1>"],I:["<c1>\u256D\u2501\u2501\u256E</c1>","<c1>\u2570\u252B\u2523\u256F</c1>","<c2>\u2571</c2><c1>\u2503\u2503</c1><c2>\u2571</c2>","<c2>\u2571</c2><c1>\u2503\u2503</c1><c2>\u2571</c2>","<c1>\u256D\u252B\u2523\u256E</c1>","<c1>\u2570\u2501\u2501\u256F</c1>"],J:["<c2>\u2571\u2571</c2><c1>\u256D\u256E</c1>","<c2>\u2571\u2571</c2><c1>\u2503\u2503</c1>","<c2>\u2571\u2571</c2><c1>\u2503\u2503</c1>","<c1>\u256D\u256E\u2503\u2503</c1>","<c1>\u2503\u2570\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u256F</c1>"],K:["<c1>\u256D\u256E\u256D\u2501\u256E</c1>","<c1>\u2503\u2503\u2503\u256D\u256F</c1>","<c1>\u2503\u2570\u256F\u256F</c1><c2>\u2571</c2>","<c1>\u2503\u256D\u256E\u2503</c1><c2>\u2571</c2>","<c1>\u2503\u2503\u2503\u2570\u256E</c1>","<c1>\u2570\u256F\u2570\u2501\u256F</c1>"],L:["<c1>\u256D\u256E</c1><c2>\u2571\u2571\u2571</c2>","<c1>\u2503\u2503</c1><c2>\u2571\u2571\u2571</c2>","<c1>\u2503\u2503</c1><c2>\u2571\u2571\u2571</c2>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u256D\u256E</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],M:["<c1>\u256D\u2501\u256E\u256D\u2501\u256E</c1>","<c1>\u2503\u2503\u2570\u256F\u2503\u2503</c1>","<c1>\u2503\u256D\u256E\u256D\u256E\u2503</c1>","<c1>\u2503\u2503\u2503\u2503\u2503\u2503</c1>","<c1>\u2503\u2503\u2503\u2503\u2503\u2503</c1>","<c1>\u2570\u256F\u2570\u256F\u2570\u256F</c1>"],N:["<c1>\u256D\u2501\u256E</c1><c2>\u2571</c2><c1>\u256D\u256E</c1>","<c1>\u2503\u2503\u2570\u256E\u2503\u2503</c1>","<c1>\u2503\u256D\u256E\u2570\u256F\u2503</c1>","<c1>\u2503\u2503\u2570\u256E\u2503\u2503</c1>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2503\u2503\u2503</c1>","<c1>\u2570\u256F</c1><c2>\u2571</c2><c1>\u2570\u2501\u256F</c1>"],O:["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2503\u2503</c1>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2503\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],P:["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2503\u256D\u2501\u2501\u256F</c1>","<c1>\u2503\u2503</c1><c2>\u2571\u2571\u2571</c2>","<c1>\u2570\u256F</c1><c2>\u2571\u2571\u2571</c2>"],Q:["<c1>\u256D\u2501\u2501\u2501\u256E</c1><c2>\u2571</c2>","<c1>\u2503\u256D\u2501\u256E\u2503</c1><c2>\u2571</c2>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2503\u2503</c1><c2>\u2571</c2>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2503\u2503</c1><c2>\u2571</c2>","<c1>\u2503\u2570\u2501\u256F\u2503\u256E</c1>","<c1>\u2570\u2501\u2501\u2501\u2501\u256F</c1>"],R:["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2503\u256D\u256E\u256D\u256F</c1>","<c1>\u2503\u2503\u2503\u2570\u256E</c1>","<c1>\u2570\u256F\u2570\u2501\u256F</c1>"],S:["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2570\u2501\u2501\u256E</c1>","<c1>\u2570\u2501\u2501\u256E\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],T:["<c1>\u256D\u2501\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u256E\u256D\u256E\u2503</c1>","<c1>\u2570\u256F\u2503\u2503\u2570\u256F</c1>","<c2>\u2571\u2571</c2><c1>\u2503\u2503</c1><c2>\u2571\u2571</c2>","<c2>\u2571\u2571</c2><c1>\u2503\u2503</c1><c2>\u2571\u2571</c2>","<c2>\u2571\u2571</c2><c1>\u2570\u256F</c1><c2>\u2571\u2571</c2>"],U:["<c1>\u256D\u256E</c1><c2>\u2571</c2><c1>\u256D\u256E</c1>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2503\u2503</c1>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2503\u2503</c1>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2503\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],V:["<c1>\u256D\u256E</c1><c2>\u2571\u2571</c2><c1>\u256D\u256E</c1>","<c1>\u2503\u2570\u256E\u256D\u256F\u2503</c1>","<c1>\u2570\u256E\u2503\u2503\u256D\u256F</c1>","<c2>\u2571</c2><c1>\u2503\u2570\u256F\u2503</c1><c2>\u2571</c2>","<c2>\u2571</c2><c1>\u2570\u256E\u256D\u256F</c1><c2>\u2571</c2>","<c2>\u2571\u2571</c2><c1>\u2570\u256F</c1><c2>\u2571\u2571</c2>"],W:["<c1>\u256D\u256E\u256D\u256E\u256D\u256E</c1>","<c1>\u2503\u2503\u2503\u2503\u2503\u2503</c1>","<c1>\u2503\u2503\u2503\u2503\u2503\u2503</c1>","<c1>\u2503\u2570\u256F\u2570\u256F\u2503</c1>","<c1>\u2570\u256E\u256D\u256E\u256D\u256F</c1>","<c2>\u2571</c2><c1>\u2570\u256F\u2570\u256F</c1><c2>\u2571</c2>"],X:["<c1>\u256D\u2501\u256E\u256D\u2501\u256E</c1>","<c1>\u2570\u256E\u2570\u256F\u256D\u256F</c1>","<c2>\u2571</c2><c1>\u2570\u256E\u256D\u256F</c1><c2>\u2571</c2>","<c2>\u2571</c2><c1>\u256D\u256F\u2570\u256E</c1><c2>\u2571</c2>","<c1>\u256D\u256F\u256D\u256E\u2570\u256E</c1>","<c1>\u2570\u2501\u256F\u2570\u2501\u256F</c1>"],Y:["<c1>\u256D\u256E</c1><c2>\u2571\u2571</c2><c1>\u256D\u256E</c1>","<c1>\u2503\u2570\u256E\u256D\u256F\u2503</c1>","<c1>\u2570\u256E\u2570\u256F\u256D\u256F</c1>","<c2>\u2571</c2><c1>\u2570\u256E\u256D\u256F</c1><c2>\u2571</c2>","<c2>\u2571\u2571</c2><c1>\u2503\u2503</c1><c2>\u2571\u2571</c2>","<c2>\u2571\u2571</c2><c1>\u2570\u256F</c1><c2>\u2571\u2571</c2>"],Z:["<c1>\u256D\u2501\u2501\u2501\u2501\u256E</c1>","<c1>\u2570\u2501\u2501\u256E\u2501\u2503</c1>","<c2>\u2571\u2571</c2><c1>\u256D\u256F\u256D\u256F</c1>","<c2>\u2571</c2><c1>\u256D\u256F\u256D\u256F</c1><c2>\u2571</c2>","<c1>\u256D\u256F\u2501\u2570\u2501\u256E</c1>","<c1>\u2570\u2501\u2501\u2501\u2501\u256F</c1>"],"0":["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2503\u2503\u2503\u2503</c1>","<c1>\u2503\u2503\u2503\u2503\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],"1":["<c2>\u2571</c2><c1>\u256D\u256E</c1><c2>\u2571</c2>","<c1>\u256D\u256F\u2503</c1><c2>\u2571</c2>","<c1>\u2570\u256E\u2503</c1><c2>\u2571</c2>","<c2>\u2571</c2><c1>\u2503\u2503</c1><c2>\u2571</c2>","<c1>\u256D\u256F\u2570\u256E</c1>","<c1>\u2570\u2501\u2501\u256F</c1>"],"2":["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2570\u256F\u256D\u256F\u2503</c1>","<c1>\u256D\u2501\u256F\u256D\u256F</c1>","<c1>\u2503\u2570\u2501\u2501\u256E</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],"3":["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2570\u256F\u256D\u256F\u2503</c1>","<c1>\u256D\u256E\u2570\u256E\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],"4":["<c1>\u256D\u256E</c1><c2>\u2571</c2><c1>\u256D\u256E</c1>","<c1>\u2503\u2503</c1><c2>\u2571</c2><c1>\u2503\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u256E\u2503</c1>","<c2>\u2571\u2571\u2571</c2><c1>\u2503\u2503</c1>","<c2>\u2571\u2571\u2571</c2><c1>\u2570\u256F</c1>"],"5":["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u2501\u256F</c1>","<c1>\u2503\u2570\u2501\u2501\u256E</c1>","<c1>\u2570\u2501\u2501\u256E\u2503</c1>","<c1>\u256D\u2501\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],"6":["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u2501\u256F</c1>","<c1>\u2503\u2570\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],"7":["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2570\u256F\u256D\u256F\u2503</c1>","<c2>\u2571\u2571</c2><c1>\u2503\u256D\u256F</c1>","<c2>\u2571\u2571</c2><c1>\u2503\u2503</c1><c2>\u2571</c2>","<c2>\u2571\u2571</c2><c1>\u2570\u256F</c1><c2>\u2571</c2>"],"8":["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],"9":["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2503\u2570\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u256E\u2503</c1>","<c1>\u256D\u2501\u2501\u256F\u2503</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],"!":["<c1>\u256D\u256E</c1>","<c1>\u2503\u2503</c1>","<c1>\u2503\u2503</c1>","<c1>\u2570\u256F</c1>","<c1>\u256D\u256E</c1>","<c1>\u2570\u256F</c1>"],"?":["<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2503\u256D\u2501\u256E\u2503</c1>","<c1>\u2570\u256F\u256D\u256F\u2503</c1>","<c2>\u2571\u2571</c2><c1>\u2503\u256D\u256F</c1>","<c2>\u2571\u2571</c2><c1>\u256D\u256E</c1><c2>\u2571</c2>","<c2>\u2571\u2571</c2><c1>\u2570\u256F</c1><c2>\u2571</c2>"],".":["<c2>\u2571\u2571</c2>","<c2>\u2571\u2571</c2>","<c2>\u2571\u2571</c2>","<c2>\u2571\u2571</c2>","<c1>\u256D\u256E</c1>","<c1>\u2570\u256F</c1>"],"+":["<c2>\u2571\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571\u2571</c2>","<c2>\u2571</c2><c1>\u256D\u256E</c1><c2>\u2571</c2>","<c1>\u256D\u256F\u2570\u256E</c1>","<c1>\u2570\u256E\u256D\u256F</c1>","<c2>\u2571</c2><c1>\u2570\u256F</c1><c2>\u2571</c2>"],"-":["<c2>\u2571\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571\u2571</c2>","<c1>\u256D\u2501\u2501\u256E</c1>","<c1>\u2570\u2501\u2501\u256F</c1>","<c2>\u2571\u2571\u2571\u2571</c2>"],_:["<c2>\u2571\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571\u2571</c2>","<c1>\u256D\u2501\u2501\u256E</c1>","<c1>\u2570\u2501\u2501\u256F</c1>"],"=":["<c2>\u2571\u2571\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571\u2571\u2571</c2>","<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>","<c1>\u256D\u2501\u2501\u2501\u256E</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],"@":["<c1>\u256D\u2501\u2501\u2501\u2501\u256E</c1><c2>\u2571</c2>","<c1>\u2503\u256D\u2501\u2501\u256E\u2503</c1><c2>\u2571</c2>","<c1>\u2503\u2503\u256D\u2501\u2503\u2503</c1><c2>\u2571</c2>","<c1>\u2503\u2503\u2570\u256F\u2503\u2503</c1><c2>\u2571</c2>","<c1>\u2503\u2570\u2501\u2501\u256F\u2501\u256E</c1>","<c1>\u2570\u2501\u2501\u2501\u2501\u2501\u256F</c1>"],"#":["<c2>\u2571</c2><c1>\u256D\u2501\u2501\u256E</c1><c2>\u2571</c2>","<c1>\u256D\u256F\u256D\u256E\u2570\u256E</c1>","<c1>\u2570\u256E\u2503\u2503\u256D\u256F</c1>","<c1>\u256D\u256F\u2503\u2503\u2570\u256E</c1>","<c1>\u2570\u256E\u2570\u256F\u256D\u256F</c1>","<c2>\u2571</c2><c1>\u2570\u2501\u2501\u256F</c1><c2>\u2571</c2>"],$:["<c2>\u2571\u2571</c2><c1>\u256D\u256E</c1><c2>\u2571</c2>","<c1>\u256D\u2501\u256F\u2570\u256E</c1>","<c1>\u2503\u2570\u2501\u2501\u256E</c1>","<c1>\u2570\u2501\u2501\u256E\u2503</c1>","<c1>\u2570\u256E\u256D\u2501\u256F</c1>","<c2>\u2571</c2><c1>\u2570\u256F</c1><c2>\u2571\u2571</c2>"],"%":["<c1>\u256D\u256E</c1><c2>\u2571\u2571</c2><c1>\u256D\u2501\u256E</c1>","<c1>\u2570\u256F</c1><c2>\u2571</c2><c1>\u256D\u256F\u256D\u256F</c1>","<c2>\u2571\u2571</c2><c1>\u256D\u256F\u256D\u256F</c1><c2>\u2571</c2>","<c2>\u2571</c2><c1>\u256D\u256F\u256D\u256F</c1><c2>\u2571\u2571</c2>","<c1>\u256D\u256F\u256D\u256F</c1><c2>\u2571</c2><c1>\u256D\u256E</c1>","<c1>\u2570\u2501\u256F</c1><c2>\u2571\u2571</c2><c1>\u2570\u256F</c1>"],"&":["<c2>\u2571</c2><c1>\u256D\u2501\u2501\u256E</c1>","<c2>\u2571</c2><c1>\u2503\u256D\u2501\u256F</c1>","<c1>\u256D\u256F\u2570\u256E</c1><c2>\u2571</c2>","<c1>\u2503\u256D\u256E\u2503</c1><c2>\u2571</c2>","<c1>\u2503\u2570\u256F\u2503\u256E</c1>","<c1>\u2570\u2501\u2501\u2501\u256F</c1>"],"(":["<c2>\u2571\u2571</c2><c1>\u256D\u2501\u256E</c1>","<c2>\u2571</c2><c1>\u256D\u256F\u256D\u256F</c1>","<c1>\u256D\u256F\u256D\u256F</c1><c2>\u2571</c2>","<c1>\u2570\u256E\u2570\u256E</c1><c2>\u2571</c2>","<c2>\u2571</c2><c1>\u2570\u256E\u2570\u256E</c1>","<c2>\u2571\u2571</c2><c1>\u2570\u2501\u256F</c1>"],")":["<c1>\u256D\u2501\u256E</c1><c2>\u2571\u2571</c2>","<c1>\u2570\u256E\u2570\u256E</c1><c2>\u2571</c2>","<c2>\u2571</c2><c1>\u2570\u256E\u2570\u256E</c1>","<c2>\u2571</c2><c1>\u256D\u256F\u256D\u256F</c1>","<c1>\u256D\u256F\u256D\u256F</c1><c2>\u2571</c2>","<c1>\u2570\u2501\u256F</c1><c2>\u2571\u2571</c2>"],"/":["<c2>\u2571\u2571\u2571\u2571</c2><c1>\u256D\u2501\u256E</c1>","<c2>\u2571\u2571\u2571</c2><c1>\u256D\u256F\u256D\u256F</c1>","<c2>\u2571\u2571</c2><c1>\u256D\u256F\u256D\u256F</c1><c2>\u2571</c2>","<c2>\u2571</c2><c1>\u256D\u256F\u256D\u256F</c1><c2>\u2571\u2571</c2>","<c1>\u256D\u256F\u256D\u256F</c1><c2>\u2571\u2571\u2571</c2>","<c1>\u2570\u2501\u256F</c1><c2>\u2571\u2571\u2571\u2571</c2>"],":":["<c2>\u2571\u2571</c2>","<c1>\u256D\u256E</c1>","<c1>\u2570\u256F</c1>","<c1>\u256D\u256E</c1>","<c1>\u2570\u256F</c1>","<c2>\u2571\u2571</c2>"],";":["<c1>\u256D\u256E</c1>","<c1>\u2503\u2503</c1>","<c1>\u2570\u256F</c1>","<c1>\u256D\u256E</c1>","<c1>\u2570\u252B</c1>","<c2>\u2571</c2><c1>\u256F</c1>"],",":["<c2>\u2571\u2571</c2>","<c2>\u2571\u2571</c2>","<c2>\u2571\u2571</c2>","<c1>\u256D\u256E</c1>","<c1>\u2570\u252B</c1>","<c2>\u2571</c2><c1>\u256F</c1>"],"'":["<c1>\u256D\u256E</c1>","<c1>\u2570\u256F</c1>","<c2>\u2571\u2571</c2>","<c2>\u2571\u2571</c2>","<c2>\u2571\u2571</c2>","<c2>\u2571\u2571</c2>"],'"':["<c1>\u256D\u256E\u256D\u256E</c1>","<c1>\u2570\u256F\u2570\u256F</c1>","<c2>\u2571\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571\u2571</c2>"]," ":["<c2>\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571</c2>","<c2>\u2571\u2571\u2571</c2>"]}},tiny_default={name:"tiny",version:"0.2.0",homepage:"https://github.com/dominikwilkowski/cfonts",colors:1,lines:2,buffer:["",""],letterspace:[" "," "],letterspace_size:1,chars:{A:["\u2584\u2580\u2588","\u2588\u2580\u2588"],B:["\u2588\u2584\u2584","\u2588\u2584\u2588"],C:["\u2588\u2580\u2580","\u2588\u2584\u2584"],D:["\u2588\u2580\u2584","\u2588\u2584\u2580"],E:["\u2588\u2580\u2580","\u2588\u2588\u2584"],F:["\u2588\u2580\u2580","\u2588\u2580 "],G:["\u2588\u2580\u2580","\u2588\u2584\u2588"],H:["\u2588 \u2588","\u2588\u2580\u2588"],I:["\u2588","\u2588"],J:[" \u2588","\u2588\u2584\u2588"],K:["\u2588\u2584\u2580","\u2588 \u2588"],L:["\u2588 ","\u2588\u2584\u2584"],M:["\u2588\u2580\u2584\u2580\u2588","\u2588 \u2580 \u2588"],N:["\u2588\u2584 \u2588","\u2588 \u2580\u2588"],O:["\u2588\u2580\u2588","\u2588\u2584\u2588"],P:["\u2588\u2580\u2588","\u2588\u2580\u2580"],Q:["\u2588\u2580\u2588","\u2580\u2580\u2588"],R:["\u2588\u2580\u2588","\u2588\u2580\u2584"],S:["\u2588\u2580\u2580","\u2584\u2584\u2588"],T:["\u2580\u2588\u2580"," \u2588 "],U:["\u2588 \u2588","\u2588\u2584\u2588"],V:["\u2588 \u2588","\u2580\u2584\u2580"],W:["\u2588 \u2588 \u2588","\u2580\u2584\u2580\u2584\u2580"],X:["\u2580\u2584\u2580","\u2588 \u2588"],Y:["\u2588\u2584\u2588"," \u2588 "],Z:["\u2580\u2588","\u2588\u2584"],"0":["\u259E\u2588\u259A","\u259A\u2588\u259E"],"1":["\u2584\u2588"," \u2588"],"2":["\u2580\u2588","\u2588\u2584"],"3":["\u2580\u2580\u2588","\u2584\u2588\u2588"],"4":["\u2588 \u2588","\u2580\u2580\u2588"],"5":["\u2588\u2580","\u2584\u2588"],"6":["\u2588\u2584\u2584","\u2588\u2584\u2588"],"7":["\u2580\u2580\u2588"," \u2588"],"8":["\u2588\u2588\u2588","\u2588\u2584\u2588"],"9":["\u2588\u2580\u2588","\u2580\u2580\u2588"],"!":["\u2588","\u2584"],"?":["\u2580\u2588"," \u2584"],".":[" ","\u2584"],"+":["\u2584\u2588\u2584"," \u2580 "],"-":["\u2584\u2584"," "],_:[" ","\u2584\u2584"],"=":["\u2580\u2580","\u2580\u2580"],"@":["\u259B\u2588\u259C","\u2599\u259F\u2583"],"#":["\u259F\u2584\u2599","\u259C\u2580\u259B"],$:["\u2596\u2588\u2597","\u2598\u2588\u259D"],"%":["\u2580 \u2584\u2580","\u2584\u2580 \u2584"],"&":["\u2584\u2584\u2588","\u2588\u2584\u2588"],"(":["\u2584\u2580","\u2580\u2584"],")":["\u2580\u2584","\u2584\u2580"],"/":[" \u2584\u2580","\u2584\u2580 "],":":["\u2580","\u2584"],";":[" ","\u2584\u2580"],",":[" ","\u2588"],"'":["\u2580"," "],'"':["\u259B \u259C"," "]," ":[" "," "]}},huge_default={name:"huge",version:"0.2.0",homepage:"https://github.com/dominikwilkowski/cfonts",colors:2,lines:11,buffer:["","","","","","","","","","",""],letterspace:[" "," "," "," "," "," "," "," "," "," "," "],letterspace_size:1,chars:{A:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2580 \u2580</c1> "],B:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],C:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],D:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],E:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],F:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2580</c1> "],G:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],H:[" <c1>\u2584 \u2584</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2580 \u2580</c1> "],I:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],J:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],K:[" <c1>\u2584 \u2584</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2580 \u2580</c1> "],L:[" <c1>\u2584</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],M:[" <c1>\u2584\u2584 \u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2580 \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2580 \u2580</c1> "],N:[" <c1>\u2584\u2584 \u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580 \u2580\u2580</c1> "],O:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],P:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2580</c1> "],Q:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2580</c1> "],R:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2580 \u2580</c1> "],S:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],T:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2580</c1> "],U:[" <c1>\u2584 \u2584</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],V:[" <c1>\u2584 \u2584</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2580</c1> "],W:[" <c1>\u2584 \u2584</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2584 \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580 \u2580\u2580</c1> "],X:[" <c1>\u2584 \u2584</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2580 \u2580</c1> "],Y:[" <c1>\u2584 \u2584</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2580</c1> "],Z:[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],"0":[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> "," <c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],"1":[" <c1>\u2584\u2584\u2584\u2584</c1> "," <c1>\u2584\u2588</c1><c2>\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2580\u2580 \u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],"2":[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],"3":[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],"4":[" <c1>\u2584 \u2584</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2580</c1> "],"5":[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],"6":[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],"7":[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2580</c1> "],"8":[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],"9":[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],"!":[" <c1>\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580</c1> "," <c1>\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580</c1> "],"?":[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> "," <c1>\u2584\u2588</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u2588\u2584</c1> "," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580 \u2584\u2584\u2584\u2588</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2584\u2588</c1><c2>\u2591\u2591\u2591\u2591\u2591</c2><c1>\u2588</c1> "," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C\u2580\u2580\u2580\u2580</c1> "," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2580\u2580</c1> "," <c1>\u2584\u2584</c1> "," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2580\u2580</c1> "],".":[" "," "," "," "," "," "," "," "," <c1>\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580</c1> "],"+":[" "," "," <c1>\u2584\u2584</c1> "," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2584\u2584\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2588</c1><c2>\u2591\u2591</c2><c1>\u2588\u2580\u2580</c1> "," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2580\u2580</c1> "," "," "],"-":[" "," "," "," "," <c1>\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580</c1> "," "," "," "," "],_:[" "," "," "," "," "," "," "," <c1>\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580</c1> "," "],"=":[" "," "," <c1>\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580</c1> "," "," <c1>\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580</c1> "," "," "],"@":[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2584\u2584\u2584\u2584 \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2588</c1><c2>\u2591\u2591\u2591\u2591</c2><c1>\u2588 \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591</c2><c1>\u2588\u2588\u2588\u2588</c1><c2>\u2591</c2><c1>\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2588</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C\u2584\u2584\u2588\u2588\u2588\u2588\u2588\u2588\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580</c1> "],"#":[" <c1>\u2584 \u2584</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2584\u2588</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u2588\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2584\u2588</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u2588\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2580 \u2580</c1> "],$:[" <c1>\u2584</c1> "," <c1>\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580</c1> "," <c1>\u2580</c1> "],"%":[" <c1>\u2584</c1> "," <c1>\u2584 \u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2580 \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2584</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2580</c1> "," <c1>\u2580</c1> "],"&":[" <c1>\u2584\u2584\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2580\u2580\u2580\u2580\u2588</c1><c2>\u2591</c2><c1>\u258C \u2584</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C \u2590</c1><c2>\u2591</c2><c1>\u2588</c1><c2>\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2588\u2584\u2584\u2584\u2584\u2588</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2580\u2580\u2580\u2580\u2580\u2580 \u2580</c1> "],"(":[" <c1>\u2584\u2584\u2584\u2584\u2584</c1> "," <c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u2588\u2580\u2580\u2580</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u2588\u2584\u2584\u2584</c1> "," <c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580\u2580\u2580\u2580</c1> "],")":[" <c1>\u2584\u2584\u2584\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2580\u2580\u2580\u2588</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2584\u2584\u2584\u2588</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>","<c1>\u2590</c1><c2>\u2591\u2591\u2591\u2591\u2591</c2><c1>\u258C</c1> "," <c1>\u2580\u2580\u2580\u2580\u2580</c1> "],"/":[" <c1>\u2584</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1>"," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u258C</c1> "," <c1>\u2580</c1> "],":":[" "," "," <c1>\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580</c1> "," "," <c1>\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580</c1> "," "," "],";":[" "," "," <c1>\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u2580</c1> "," "," <c1>\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u258C</c1> "," <c1>\u2580</c1> "," "],",":[" "," "," "," "," "," "," "," <c1>\u2584\u2584</c1> ","<c1>\u2590</c1><c2>\u2591\u2591</c2><c1>\u258C</c1>"," <c1>\u2580\u258C</c1> "," <c1>\u2580</c1> "],"'":[" <c1>\u2584</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2590</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2590</c1>"," <c1>\u2580</c1> "," "," "," "," "," "," "," "],'"':[" <c1>\u2584 \u2584</c1> ","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2590\u2590</c1><c2>\u2591</c2><c1>\u2590</c1>","<c1>\u2590</c1><c2>\u2591</c2><c1>\u2590\u2590</c1><c2>\u2591</c2><c1>\u2590</c1>"," <c1>\u2580 \u2580</c1> "," "," "," "," "," "," "," "]," ":[" "," "," "," "," "," "," "," "," "," "," "]}},grid_default={name:"grid",version:"0.1.0",homepage:"https://github.com/dominikwilkowski/cfonts",colors:2,lines:6,buffer:["","","","","",""],letterspace:["<c2>\u254B</c2>","<c2>\u254B</c2>","<c2>\u254B</c2>","<c2>\u254B</c2>","<c2>\u254B</c2>","<c2>\u254B</c2>"],letterspace_size:1,chars:{A:["<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2513\u2503</c1>","<c1>\u2503\u250F\u2513\u2503</c1>","<c1>\u2517\u251B\u2517\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],B:["<c1>\u250F\u2513</c1><c2>\u254B\u254B</c2>","<c1>\u2503\u2517\u2501\u2513</c1>","<c1>\u2503\u250F\u2513\u2503</c1>","<c1>\u2503\u2517\u251B\u2503</c1>","<c1>\u2517\u2501\u2501\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],C:["<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2501\u251B</c1>","<c1>\u2503\u2517\u2501\u2513</c1>","<c1>\u2517\u2501\u2501\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],D:["<c2>\u254B\u254B</c2><c1>\u250F\u2513</c1>","<c1>\u250F\u2501\u251B\u2503</c1>","<c1>\u2503\u250F\u2513\u2503</c1>","<c1>\u2503\u2517\u251B\u2503</c1>","<c1>\u2517\u2501\u2501\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],E:["<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2501\u2513</c1>","<c1>\u2503\u2503\u2501\u252B</c1>","<c1>\u2503\u2503\u2501\u252B</c1>","<c1>\u2517\u2501\u2501\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],F:["<c2>\u254B</c2><c1>\u250F\u2501\u2513</c1>","<c1>\u250F\u251B\u2517\u2513</c1>","<c1>\u2517\u2513\u250F\u251B</c1>","<c2>\u254B</c2><c1>\u2503\u2503</c1><c2>\u254B</c2>","<c2>\u254B</c2><c1>\u2517\u251B</c1><c2>\u254B</c2>","<c2>\u254B\u254B\u254B\u254B</c2>"],G:["<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2513\u2503</c1>","<c1>\u2503\u2517\u251B\u2503</c1>","<c1>\u2517\u2501\u2513\u2503</c1>","<c1>\u2517\u2501\u2501\u251B</c1>"],H:["<c1>\u250F\u2513</c1><c2>\u254B\u254B</c2>","<c1>\u2503\u2517\u2501\u2513</c1>","<c1>\u2503\u250F\u2513\u2503</c1>","<c1>\u2503\u2503\u2503\u2503</c1>","<c1>\u2517\u251B\u2517\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],I:["<c1>\u250F\u2513</c1>","<c1>\u2517\u251B</c1>","<c1>\u250F\u2513</c1>","<c1>\u2503\u2503</c1>","<c1>\u2517\u251B</c1>","<c2>\u254B\u254B</c2>"],J:["<c2>\u254B</c2><c1>\u250F\u2513</c1>","<c2>\u254B</c2><c1>\u2517\u251B</c1>","<c2>\u254B</c2><c1>\u250F\u2513</c1>","<c2>\u254B</c2><c1>\u2503\u2503</c1>","<c1>\u250F\u251B\u2503</c1>","<c1>\u2517\u2501\u251B</c1>"],K:["<c1>\u250F\u2513</c1><c2>\u254B\u254B</c2>","<c1>\u2503\u2503\u250F\u2513</c1>","<c1>\u2503\u2517\u251B\u251B</c1>","<c1>\u2503\u250F\u2513\u2513</c1>","<c1>\u2517\u251B\u2517\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],L:["<c1>\u250F\u2513</c1><c2>\u254B</c2>","<c1>\u2503\u2503</c1><c2>\u254B</c2>","<c1>\u2503\u2503</c1><c2>\u254B</c2>","<c1>\u2503\u2517\u2513</c1>","<c1>\u2517\u2501\u251B</c1>","<c2>\u254B\u254B\u254B</c2>"],M:["<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2513\u250F\u2513</c1>","<c1>\u2503\u2517\u251B\u2503</c1>","<c1>\u2503\u2503\u2503\u2503</c1>","<c1>\u2517\u253B\u253B\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],N:["<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2513</c1><c2>\u254B</c2>","<c1>\u2503\u250F\u2513\u2513</c1>","<c1>\u2503\u2503\u2503\u2503</c1>","<c1>\u2517\u251B\u2517\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],O:["<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2513\u2503</c1>","<c1>\u2503\u2517\u251B\u2503</c1>","<c1>\u2517\u2501\u2501\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],P:["<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2513\u2503</c1>","<c1>\u2503\u2517\u251B\u2503</c1>","<c1>\u2503\u250F\u2501\u251B</c1>","<c1>\u2517\u251B</c1><c2>\u254B\u254B</c2>"],Q:["<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2513\u2503</c1>","<c1>\u2503\u2517\u251B\u2503</c1>","<c1>\u2517\u2501\u2513\u2503</c1>","<c2>\u254B\u254B</c2><c1>\u2517\u251B</c1>"],R:["<c2>\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2513</c1>","<c1>\u2503\u250F\u251B</c1>","<c1>\u2503\u2503</c1><c2>\u254B</c2>","<c1>\u2517\u251B</c1><c2>\u254B</c2>","<c2>\u254B\u254B\u254B</c2>"],S:["<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2501\u2513</c1>","<c1>\u2503\u2501\u2501\u252B</c1>","<c1>\u2523\u2501\u2501\u2503</c1>","<c1>\u2517\u2501\u2501\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],T:["<c2>\u254B</c2><c1>\u250F\u2513</c1><c2>\u254B</c2>","<c1>\u250F\u251B\u2517\u2513</c1>","<c1>\u2517\u2513\u250F\u251B</c1>","<c2>\u254B</c2><c1>\u2503\u2517\u2513</c1>","<c2>\u254B</c2><c1>\u2517\u2501\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],U:["<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2513\u250F\u2513</c1>","<c1>\u2503\u2503\u2503\u2503</c1>","<c1>\u2503\u2517\u251B\u2503</c1>","<c1>\u2517\u2501\u2501\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],V:["<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2513\u250F\u2513</c1>","<c1>\u2503\u2517\u251B\u2503</c1>","<c1>\u2517\u2513\u250F\u251B</c1>","<c2>\u254B</c2><c1>\u2517\u251B</c1><c2>\u254B</c2>","<c2>\u254B\u254B\u254B\u254B</c2>"],W:["<c2>\u254B\u254B\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2513\u250F\u2513\u250F\u2513</c1>","<c1>\u2503\u2517\u251B\u2517\u251B\u2503</c1>","<c1>\u2517\u2513\u250F\u2513\u250F\u251B</c1>","<c2>\u254B</c2><c1>\u2517\u251B\u2517\u251B</c1><c2>\u254B</c2>","<c2>\u254B\u254B\u254B\u254B\u254B\u254B</c2>"],X:["<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2513\u250F\u2513</c1>","<c1>\u2517\u254B\u254B\u251B</c1>","<c1>\u250F\u254B\u254B\u2513</c1>","<c1>\u2517\u251B\u2517\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>"],Y:["<c2>\u254B\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2513</c1><c2>\u254B</c2><c1>\u250F\u2513</c1>","<c1>\u2503\u2517\u2501\u251B\u2503</c1>","<c1>\u2517\u2501\u2513\u250F\u251B</c1>","<c1>\u2517\u2501\u2501\u251B</c1><c2>\u254B</c2>","<c2>\u254B\u254B\u254B\u254B\u254B</c2>"],Z:["<c2>\u254B\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2501\u2501\u2513</c1>","<c1>\u2523\u2501\u2501\u2503\u2503</c1>","<c1>\u2503\u2503\u2501\u2501\u252B</c1>","<c1>\u2517\u2501\u2501\u2501\u251B</c1>","<c2>\u254B\u254B\u254B\u254B\u254B</c2>"],"0":["<c1>\u250F\u2501\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2501\u2513\u2503</c1>","<c1>\u2503\u2503\u2503\u2503\u2503</c1>","<c1>\u2503\u2503\u2503\u2503\u2503</c1>","<c1>\u2503\u2517\u2501\u251B\u2503</c1>","<c1>\u2517\u2501\u2501\u2501\u251B</c1>"],"1":["<c2>\u254B</c2><c1>\u250F\u2513</c1><c2>\u254B</c2>","<c1>\u250F\u251B\u2503</c1><c2>\u254B</c2>","<c1>\u2517\u2513\u2503</c1><c2>\u254B</c2>","<c2>\u254B</c2><c1>\u2503\u2503</c1><c2>\u254B</c2>","<c1>\u250F\u251B\u2517\u2513</c1>","<c1>\u2517\u2501\u2501\u251B</c1>"],"2":["<c1>\u250F\u2501\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2501\u2513\u2503</c1>","<c1>\u2517\u251B\u250F\u251B\u2503</c1>","<c1>\u250F\u2501\u251B\u250F\u251B</c1>","<c1>\u2503\u2517\u2501\u253B\u2513</c1>","<c1>\u2517\u2501\u2501\u2501\u251B</c1>"],"3":["<c1>\u250F\u2501\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2501\u2513\u2503</c1>","<c1>\u2517\u251B\u250F\u251B\u2503</c1>","<c1>\u250F\u2513\u2517\u2513\u2503</c1>","<c1>\u2503\u2517\u2501\u251B\u2503</c1>","<c1>\u2517\u2501\u2501\u2501\u251B</c1>"],"4":["<c1>\u250F\u2513</c1><c2>\u254B</c2><c1>\u250F\u2513</c1>","<c1>\u2503\u2503</c1><c2>\u254B</c2><c1>\u2503\u2503</c1>","<c1>\u2503\u2517\u2501\u251B\u2503</c1>","<c1>\u2517\u2501\u2501\u2513\u2503</c1>","<c2>\u254B\u254B\u254B</c2><c1>\u2503\u2503</c1>","<c2>\u254B\u254B\u254B</c2><c1>\u2517\u251B</c1>"],"5":["<c1>\u250F\u2501\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2501\u2501\u251B</c1>","<c1>\u2503\u2517\u2501\u2501\u2513</c1>","<c1>\u2517\u2501\u2501\u2513\u2503</c1>","<c1>\u250F\u2501\u2501\u251B\u2503</c1>","<c1>\u2517\u2501\u2501\u2501\u251B</c1>"],"6":["<c1>\u250F\u2501\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2501\u2501\u251B</c1>","<c1>\u2503\u2517\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2501\u2513\u2503</c1>","<c1>\u2503\u2517\u2501\u251B\u2503</c1>","<c1>\u2517\u2501\u2501\u2501\u251B</c1>"],"7":["<c1>\u250F\u2501\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2501\u2513\u2503</c1>","<c1>\u2517\u251B\u250F\u251B\u2503</c1>","<c2>\u254B\u254B</c2><c1>\u2503\u250F\u251B</c1>","<c2>\u254B\u254B</c2><c1>\u2503\u2503</c1><c2>\u254B</c2>","<c2>\u254B\u254B</c2><c1>\u2517\u251B</c1><c2>\u254B</c2>"],"8":["<c1>\u250F\u2501\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2501\u2513\u2503</c1>","<c1>\u2503\u2517\u2501\u251B\u2503</c1>","<c1>\u2503\u250F\u2501\u2513\u2503</c1>","<c1>\u2503\u2517\u2501\u251B\u2503</c1>","<c1>\u2517\u2501\u2501\u2501\u251B</c1>"],"9":["<c1>\u250F\u2501\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2501\u2513\u2503</c1>","<c1>\u2503\u2517\u2501\u251B\u2503</c1>","<c1>\u2517\u2501\u2501\u2513\u2503</c1>","<c1>\u250F\u2501\u2501\u251B\u2503</c1>","<c1>\u2517\u2501\u2501\u2501\u251B</c1>"],"!":["<c1>\u250F\u2513</c1>","<c1>\u2503\u2503</c1>","<c1>\u2503\u2503</c1>","<c1>\u2517\u251B</c1>","<c1>\u250F\u2513</c1>","<c1>\u2517\u251B</c1>"],"?":["<c1>\u250F\u2501\u2501\u2501\u2513</c1>","<c1>\u2503\u250F\u2501\u2513\u2503</c1>","<c1>\u2517\u251B\u250F\u251B\u2503</c1>","<c2>\u254B\u254B</c2><c1>\u2503\u250F\u251B</c1>","<c2>\u254B\u254B</c2><c1>\u250F\u2513</c1><c2>\u254B</c2>","<c2>\u254B\u254B</c2><c1>\u2517\u251B</c1><c2>\u254B</c2>"],".":["<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>","<c1>\u250F\u2513</c1>","<c1>\u2517\u251B</c1>"],"+":["<c2>\u254B\u254B\u254B\u254B</c2>","<c2>\u254B</c2><c1>\u250F\u2513</c1><c2>\u254B</c2>","<c1>\u250F\u251B\u2517\u2513</c1>","<c1>\u2517\u2513\u250F\u251B</c1>","<c2>\u254B</c2><c1>\u2517\u251B</c1><c2>\u254B</c2>","<c2>\u254B\u254B\u254B\u254B</c2>"],"-":["<c2>\u254B\u254B\u254B\u254B</c2>","<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2501\u2513</c1>","<c1>\u2517\u2501\u2501\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>","<c2>\u254B\u254B\u254B\u254B</c2>"],_:["<c2>\u254B\u254B\u254B\u254B</c2>","<c2>\u254B\u254B\u254B\u254B</c2>","<c2>\u254B\u254B\u254B\u254B</c2>","<c2>\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2501\u2513</c1>","<c1>\u2517\u2501\u2501\u251B</c1>"],"=":["<c2>\u254B\u254B\u254B\u254B\u254B</c2>","<c1>\u250F\u2501\u2501\u2501\u2513</c1>","<c1>\u2517\u2501\u2501\u2501\u251B</c1>","<c1>\u250F\u2501\u2501\u2501\u2513</c1>","<c1>\u2517\u2501\u2501\u2501\u251B</c1>","<c2>\u254B\u254B\u254B\u254B\u254B</c2>"],"@":["<c1>\u250F\u2501\u2501\u2501\u2501\u2513</c1><c2>\u254B</c2>","<c1>\u2503\u250F\u2501\u2501\u2513\u2503</c1><c2>\u254B</c2>","<c1>\u2503\u2503\u250F\u2501\u2503\u2503</c1><c2>\u254B</c2>","<c1>\u2503\u2503\u2517\u251B\u2503\u2503</c1><c2>\u254B</c2>","<c1>\u2503\u2517\u2501\u2501\u251B\u2517\u2513</c1>","<c1>\u2517\u2501\u2501\u2501\u2501\u2501\u251B</c1>"],"#":["<c2>\u254B</c2><c1>\u250F\u2501\u2501\u2501\u2513</c1><c2>\u254B</c2>","<c1>\u250F\u251B\u250F\u2501\u2513\u2517\u2513</c1>","<c1>\u2517\u2513\u2503\u2503\u2503\u250F\u251B</c1>","<c1>\u250F\u251B\u2503\u2503\u2503\u2517\u2513</c1>","<c1>\u2517\u2513\u2517\u2501\u251B\u250F\u251B</c1>","<c2>\u254B</c2><c1>\u2517\u2501\u2501\u2501\u251B</c1><c2>\u254B</c2>"],$:["<c2>\u254B</c2><c1>\u250F\u2513</c1><c2>\u254B</c2>","<c1>\u250F\u251B\u2517\u2513</c1>","<c1>\u2503\u2501\u2501\u252B</c1>","<c1>\u2523\u2501\u2501\u2503</c1>","<c1>\u2517\u2513\u250F\u251B</c1>","<c2>\u254B</c2><c1>\u2517\u251B</c1><c2>\u254B</c2>"],"%":["<c1>\u250F\u2513</c1><c2>\u254B\u254B</c2><c1>\u250F\u2501\u2513</c1>","<c1>\u2517\u251B</c1><c2>\u254B</c2><c1>\u250F\u251B\u250F\u251B</c1>","<c2>\u254B\u254B</c2><c1>\u250F\u251B\u250F\u251B</c1><c2>\u254B</c2>","<c2>\u254B</c2><c1>\u250F\u251B\u250F\u251B</c1><c2>\u254B\u254B</c2>","<c1>\u250F\u251B\u250F\u251B</c1><c2>\u254B</c2><c1>\u250F\u2513</c1>","<c1>\u2517\u2501\u251B</c1><c2>\u254B\u254B</c2><c1>\u2517\u251B</c1>"],"&":["<c2>\u254B\u254B</c2><c1>\u250F\u2513</c1><c2>\u254B</c2>","<c2>\u254B\u254B</c2><c1>\u2503\u2503</c1><c2>\u254B</c2>","<c1>\u250F\u2501\u251B\u2517\u2513</c1>","<c1>\u2503\u250F\u2513\u250F\u251B</c1>","<c1>\u2503\u2517\u251B\u2503</c1><c2>\u254B</c2>","<c1>\u2517\u2501\u2501\u251B</c1><c2>\u254B</c2>"],"(":["<c2>\u254B\u254B</c2><c1>\u250F\u2501\u2513</c1>","<c2>\u254B</c2><c1>\u250F\u251B\u250F\u251B</c1>","<c1>\u250F\u251B\u250F\u251B</c1><c2>\u254B</c2>","<c1>\u2517\u2513\u2517\u2513</c1><c2>\u254B</c2>","<c2>\u254B</c2><c1>\u2517\u2513\u2517\u2513</c1>","<c2>\u254B\u254B</c2><c1>\u2517\u2501\u251B</c1>"],")":["<c1>\u250F\u2501\u2513</c1><c2>\u254B\u254B</c2>","<c1>\u2517\u2513\u2517\u2513</c1><c2>\u254B</c2>","<c2>\u254B</c2><c1>\u2517\u2513\u2517\u2513</c1>","<c2>\u254B</c2><c1>\u250F\u251B\u250F\u251B</c1>","<c1>\u250F\u251B\u250F\u251B</c1><c2>\u254B</c2>","<c1>\u2517\u2501\u251B</c1><c2>\u254B\u254B</c2>"],"/":["<c2>\u254B\u254B\u254B\u254B</c2><c1>\u250F\u2501\u2513</c1>","<c2>\u254B\u254B\u254B</c2><c1>\u250F\u251B\u250F\u251B</c1>","<c2>\u254B\u254B</c2><c1>\u250F\u251B\u250F\u251B</c1><c2>\u254B</c2>","<c2>\u254B</c2><c1>\u250F\u251B\u250F\u251B</c1><c2>\u254B\u254B</c2>","<c1>\u250F\u251B\u250F\u251B</c1><c2>\u254B\u254B\u254B</c2>","<c1>\u2517\u2501\u251B</c1><c2>\u254B\u254B\u254B\u254B</c2>"],":":["<c2>\u254B\u254B</c2>","<c1>\u250F\u2513</c1>","<c1>\u2517\u251B</c1>","<c1>\u250F\u2513</c1>","<c1>\u2517\u251B</c1>","<c2>\u254B\u254B</c2>"],";":["<c2>\u254B\u254B</c2>","<c1>\u250F\u2513</c1>","<c1>\u2517\u251B</c1>","<c2>\u254B\u254B</c2>","<c1>\u250F\u2513</c1>","<c1>\u2517\u252B</c1>"],",":["<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>","<c1>\u250F\u2513</c1>","<c1>\u2517\u252B</c1>"],"'":["<c1>\u250F\u2513</c1>","<c1>\u2517\u251B</c1>","<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>"],'"':["<c1>\u250F\u2513\u250F\u2513</c1>","<c1>\u2517\u251B\u2517\u251B</c1>","<c2>\u254B\u254B\u254B\u254B</c2>","<c2>\u254B\u254B\u254B\u254B</c2>","<c2>\u254B\u254B\u254B\u254B</c2>","<c2>\u254B\u254B\u254B\u254B</c2>"]," ":["<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>","<c2>\u254B\u254B</c2>"]}},pallet_default={name:"pallet",version:"0.1.0",homepage:"https://github.com/dominikwilkowski/cfonts",colors:2,lines:6,buffer:["","","","","",""],letterspace:["<c2>\u2500</c2>","<c2>\u2500</c2>","<c2>\u2500</c2>","<c2>\u2500</c2>","<c2>\u2500</c2>","<c2>\u2500</c2>"],letterspace_size:1,chars:{A:["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2551\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u255A\u255D</c1><c2>\u2500</c2><c1>\u255A\u255D</c1>"],B:["<c1>\u2554\u2550\u2550\u2557</c1><c2>\u2500</c2>","<c1>\u2551\u2554\u2557\u2551</c1><c2>\u2500</c2>","<c1>\u2551\u255A\u255D\u255A\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],C:["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u255A\u255D</c1>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2554\u2557</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],D:["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u255A\u2557\u2554\u2557\u2551</c1>","<c2>\u2500</c2><c1>\u2551\u2551\u2551\u2551</c1>","<c2>\u2500</c2><c1>\u2551\u2551\u2551\u2551</c1>","<c1>\u2554\u255D\u255A\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],E:["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2550\u255D</c1>","<c1>\u2551\u255A\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2550\u255D</c1>","<c1>\u2551\u255A\u2550\u2550\u2557</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],F:["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2550\u255D</c1>","<c1>\u2551\u255A\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2550\u255D</c1>","<c1>\u2551\u2551</c1><c2>\u2500\u2500\u2500</c2>","<c1>\u255A\u255D</c1><c2>\u2500\u2500\u2500</c2>"],G:["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u255A\u255D</c1>","<c1>\u2551\u2551\u2554\u2550\u2557</c1>","<c1>\u2551\u255A\u2569\u2550\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],H:["<c1>\u2554\u2557</c1><c2>\u2500</c2><c1>\u2554\u2557</c1>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2551\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2551\u2551</c1>","<c1>\u255A\u255D</c1><c2>\u2500</c2><c1>\u255A\u255D</c1>"],I:["<c1>\u2554\u2550\u2550\u2557</c1>","<c1>\u255A\u2563\u2560\u255D</c1>","<c2>\u2500</c2><c1>\u2551\u2551</c1><c2>\u2500</c2>","<c2>\u2500</c2><c1>\u2551\u2551</c1><c2>\u2500</c2>","<c1>\u2554\u2563\u2560\u2557</c1>","<c1>\u255A\u2550\u2550\u255D</c1>"],J:["<c2>\u2500\u2500</c2><c1>\u2554\u2557</c1>","<c2>\u2500\u2500</c2><c1>\u2551\u2551</c1>","<c2>\u2500\u2500</c2><c1>\u2551\u2551</c1>","<c1>\u2554\u2557\u2551\u2551</c1>","<c1>\u2551\u255A\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u255D</c1>"],K:["<c1>\u2554\u2557\u2554\u2550\u2557</c1>","<c1>\u2551\u2551\u2551\u2554\u255D</c1>","<c1>\u2551\u255A\u255D\u255D</c1><c2>\u2500</c2>","<c1>\u2551\u2554\u2557\u2551</c1><c2>\u2500</c2>","<c1>\u2551\u2551\u2551\u255A\u2557</c1>","<c1>\u255A\u255D\u255A\u2550\u255D</c1>"],L:["<c1>\u2554\u2557</c1><c2>\u2500\u2500\u2500</c2>","<c1>\u2551\u2551</c1><c2>\u2500\u2500\u2500</c2>","<c1>\u2551\u2551</c1><c2>\u2500\u2500\u2500</c2>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2554\u2557</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],M:["<c1>\u2554\u2550\u2557\u2554\u2550\u2557</c1>","<c1>\u2551\u2551\u255A\u255D\u2551\u2551</c1>","<c1>\u2551\u2554\u2557\u2554\u2557\u2551</c1>","<c1>\u2551\u2551\u2551\u2551\u2551\u2551</c1>","<c1>\u2551\u2551\u2551\u2551\u2551\u2551</c1>","<c1>\u255A\u255D\u255A\u255D\u255A\u255D</c1>"],N:["<c1>\u2554\u2550\u2557</c1><c2>\u2500</c2><c1>\u2554\u2557</c1>","<c1>\u2551\u2551\u255A\u2557\u2551\u2551</c1>","<c1>\u2551\u2554\u2557\u255A\u255D\u2551</c1>","<c1>\u2551\u2551\u255A\u2557\u2551\u2551</c1>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2551\u2551\u2551</c1>","<c1>\u255A\u255D</c1><c2>\u2500</c2><c1>\u255A\u2550\u255D</c1>"],O:["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2551\u2551</c1>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2551\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],P:["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u2551\u2554\u2550\u2550\u255D</c1>","<c1>\u2551\u2551</c1><c2>\u2500\u2500\u2500</c2>","<c1>\u255A\u255D</c1><c2>\u2500\u2500\u2500</c2>"],Q:["<c1>\u2554\u2550\u2550\u2550\u2557</c1><c2>\u2500</c2>","<c1>\u2551\u2554\u2550\u2557\u2551</c1><c2>\u2500</c2>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2551\u2551</c1><c2>\u2500</c2>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2551\u2551</c1><c2>\u2500</c2>","<c1>\u2551\u255A\u2550\u255D\u2560\u2557</c1>","<c1>\u255A\u2550\u2550\u2550\u2550\u255D</c1>"],R:["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u2551\u2554\u2557\u2554\u255D</c1>","<c1>\u2551\u2551\u2551\u255A\u2557</c1>","<c1>\u255A\u255D\u255A\u2550\u255D</c1>"],S:["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u255A\u2550\u2550\u2557</c1>","<c1>\u255A\u2550\u2550\u2557\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],T:["<c1>\u2554\u2550\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2557\u2554\u2557\u2551</c1>","<c1>\u255A\u255D\u2551\u2551\u255A\u255D</c1>","<c2>\u2500\u2500</c2><c1>\u2551\u2551</c1><c2>\u2500\u2500</c2>","<c2>\u2500\u2500</c2><c1>\u2551\u2551</c1><c2>\u2500\u2500</c2>","<c2>\u2500\u2500</c2><c1>\u255A\u255D</c1><c2>\u2500\u2500</c2>"],U:["<c1>\u2554\u2557</c1><c2>\u2500</c2><c1>\u2554\u2557</c1>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2551\u2551</c1>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2551\u2551</c1>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2551\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],V:["<c1>\u2554\u2557</c1><c2>\u2500\u2500</c2><c1>\u2554\u2557</c1>","<c1>\u2551\u255A\u2557\u2554\u255D\u2551</c1>","<c1>\u255A\u2557\u2551\u2551\u2554\u255D</c1>","<c2>\u2500</c2><c1>\u2551\u255A\u255D\u2551</c1><c2>\u2500</c2>","<c2>\u2500</c2><c1>\u255A\u2557\u2554\u255D</c1><c2>\u2500</c2>","<c2>\u2500\u2500</c2><c1>\u255A\u255D</c1><c2>\u2500\u2500</c2>"],W:["<c1>\u2554\u2557\u2554\u2557\u2554\u2557</c1>","<c1>\u2551\u2551\u2551\u2551\u2551\u2551</c1>","<c1>\u2551\u2551\u2551\u2551\u2551\u2551</c1>","<c1>\u2551\u255A\u255D\u255A\u255D\u2551</c1>","<c1>\u255A\u2557\u2554\u2557\u2554\u255D</c1>","<c2>\u2500</c2><c1>\u255A\u255D\u255A\u255D</c1><c2>\u2500</c2>"],X:["<c1>\u2554\u2550\u2557\u2554\u2550\u2557</c1>","<c1>\u255A\u2557\u255A\u255D\u2554\u255D</c1>","<c2>\u2500</c2><c1>\u255A\u2557\u2554\u255D</c1><c2>\u2500</c2>","<c2>\u2500</c2><c1>\u2554\u255D\u255A\u2557</c1><c2>\u2500</c2>","<c1>\u2554\u255D\u2554\u2557\u255A\u2557</c1>","<c1>\u255A\u2550\u255D\u255A\u2550\u255D</c1>"],Y:["<c1>\u2554\u2557</c1><c2>\u2500\u2500</c2><c1>\u2554\u2557</c1>","<c1>\u2551\u255A\u2557\u2554\u255D\u2551</c1>","<c1>\u255A\u2557\u255A\u255D\u2554\u255D</c1>","<c2>\u2500</c2><c1>\u255A\u2557\u2554\u255D</c1><c2>\u2500</c2>","<c2>\u2500\u2500</c2><c1>\u2551\u2551</c1><c2>\u2500\u2500</c2>","<c2>\u2500\u2500</c2><c1>\u255A\u255D</c1><c2>\u2500\u2500</c2>"],Z:["<c1>\u2554\u2550\u2550\u2550\u2550\u2557</c1>","<c1>\u255A\u2550\u2550\u2557\u2550\u2551</c1>","<c2>\u2500\u2500</c2><c1>\u2554\u255D\u2554\u255D</c1>","<c2>\u2500</c2><c1>\u2554\u255D\u2554\u255D</c1><c2>\u2500</c2>","<c1>\u2554\u255D\u2550\u255A\u2550\u2557</c1>","<c1>\u255A\u2550\u2550\u2550\u2550\u255D</c1>"],"0":["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u2551\u2551\u2551\u2551</c1>","<c1>\u2551\u2551\u2551\u2551\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],"1":["<c2>\u2500</c2><c1>\u2554\u2557</c1><c2>\u2500</c2>","<c1>\u2554\u255D\u2551</c1><c2>\u2500</c2>","<c1>\u255A\u2557\u2551</c1><c2>\u2500</c2>","<c2>\u2500</c2><c1>\u2551\u2551</c1><c2>\u2500</c2>","<c1>\u2554\u255D\u255A\u2557</c1>","<c1>\u255A\u2550\u2550\u255D</c1>"],"2":["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u255A\u255D\u2554\u255D\u2551</c1>","<c1>\u2554\u2550\u255D\u2554\u255D</c1>","<c1>\u2551\u2551\u255A\u2550\u2557</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],"3":["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u255A\u255D\u2554\u255D\u2551</c1>","<c1>\u2554\u2557\u255A\u2557\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],"4":["<c1>\u2554\u2557</c1><c2>\u2500</c2><c1>\u2554\u2557</c1>","<c1>\u2551\u2551</c1><c2>\u2500</c2><c1>\u2551\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2557\u2551</c1>","<c2>\u2500\u2500\u2500</c2><c1>\u2551\u2551</c1>","<c2>\u2500\u2500\u2500</c2><c1>\u255A\u255D</c1>"],"5":["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2550\u255D</c1>","<c1>\u2551\u255A\u2550\u2550\u2557</c1>","<c1>\u255A\u2550\u2550\u2557\u2551</c1>","<c1>\u2554\u2550\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],"6":["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2550\u255D</c1>","<c1>\u2551\u255A\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],"7":["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u255A\u255D\u2554\u255D\u2551</c1>","<c2>\u2500\u2500</c2><c1>\u2551\u2554\u255D</c1>","<c2>\u2500\u2500</c2><c1>\u2551\u2551</c1><c2>\u2500</c2>","<c2>\u2500\u2500</c2><c1>\u255A\u255D</c1><c2>\u2500</c2>"],"8":["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],"9":["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2557\u2551</c1>","<c1>\u2554\u2550\u2550\u255D\u2551</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>"],"!":["<c1>\u2554\u2557</c1>","<c1>\u2551\u2551</c1>","<c1>\u2551\u2551</c1>","<c1>\u255A\u255D</c1>","<c1>\u2554\u2557</c1>","<c1>\u255A\u255D</c1>"],"?":["<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u255A\u255D\u2554\u255D\u2551</c1>","<c2>\u2500\u2500</c2><c1>\u2551\u2554\u255D</c1>","<c2>\u2500\u2500</c2><c1>\u2554\u2557</c1><c2>\u2500</c2>","<c2>\u2500\u2500</c2><c1>\u255A\u255D</c1><c2>\u2500</c2>"],".":["<c2>\u2500\u2500</c2>","<c2>\u2500\u2500</c2>","<c2>\u2500\u2500</c2>","<c2>\u2500\u2500</c2>","<c1>\u2554\u2557</c1>","<c1>\u255A\u255D</c1>"],"+":["<c2>\u2500\u2500\u2500\u2500</c2>","<c2>\u2500\u2500\u2500\u2500</c2>","<c2>\u2500</c2><c1>\u2554\u2557</c1><c2>\u2500</c2>","<c1>\u2554\u255D\u255A\u2557</c1>","<c1>\u255A\u2557\u2554\u255D</c1>","<c2>\u2500</c2><c1>\u255A\u255D</c1><c2>\u2500</c2>"],"-":["<c2>\u2500\u2500\u2500\u2500</c2>","<c2>\u2500\u2500\u2500\u2500</c2>","<c1>\u2554\u2550\u2550\u2557</c1>","<c1>\u255A\u2550\u2550\u255D</c1>","<c2>\u2500\u2500\u2500\u2500</c2>","<c2>\u2500\u2500\u2500\u2500</c2>"],_:["<c2>\u2500\u2500\u2500\u2500</c2>","<c2>\u2500\u2500\u2500\u2500</c2>","<c2>\u2500\u2500\u2500\u2500</c2>","<c2>\u2500\u2500\u2500\u2500</c2>","<c1>\u2554\u2550\u2550\u2557</c1>","<c1>\u255A\u2550\u2550\u255D</c1>"],"=":["<c2>\u2500\u2500\u2500\u2500\u2500</c2>","<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>","<c1>\u2554\u2550\u2550\u2550\u2557</c1>","<c1>\u255A\u2550\u2550\u2550\u255D</c1>","<c2>\u2500\u2500\u2500\u2500\u2500</c2>"],"@":["<c1>\u2554\u2550\u2550\u2550\u2550\u2557</c1><c2>\u2500</c2>","<c1>\u2551\u2554\u2550\u2550\u2557\u2551</c1><c2>\u2500</c2>","<c1>\u2551\u2551\u2554\u2550\u2551\u2551</c1><c2>\u2500</c2>","<c1>\u2551\u2551\u255A\u255D\u2551\u2551</c1><c2>\u2500</c2>","<c1>\u2551\u255A\u2550\u2550\u255D\u2560\u2557</c1>","<c1>\u255A\u2550\u2550\u2550\u2550\u2550\u255D</c1>"],"#":["<c2>\u2500</c2><c1>\u2554\u2569\u2569\u2569\u2557</c1><c2>\u2500</c2>","<c1>\u2554\u255D\u2554\u2550\u2557\u255A\u2557</c1>","<c1>\u255A\u2557\u2560\u2550\u2563\u2554\u255D</c1>","<c1>\u2554\u255D\u2560\u2550\u2563\u255A\u2557</c1>","<c1>\u255A\u2557\u255A\u2550\u255D\u2554\u255D</c1>","<c2>\u2500</c2><c1>\u255A\u2566\u2566\u2566\u255D</c1><c2>\u2500</c2>"],$:["<c1>\u2554\u255D\u2569\u255A\u2557</c1>","<c1>\u2551\u2554\u2550\u2557\u2551</c1>","<c1>\u2551\u255A\u2550\u2550\u2557</c1>","<c1>\u255A\u2550\u2550\u2557\u2551</c1>","<c1>\u2551\u255A\u2550\u255D\u2551</c1>","<c1>\u255A\u2557\u2566\u2554\u255D</c1>"],"%":["<c1>\u2554\u2557</c1><c2>\u2500\u2500</c2><c1>\u2554\u2550\u2557</c1>","<c1>\u255A\u255D</c1><c2>\u2500</c2><c1>\u2554\u255D\u2554\u255D</c1>","<c2>\u2500\u2500</c2><c1>\u2554\u255D\u2554\u255D</c1><c2>\u2500</c2>","<c2>\u2500</c2><c1>\u2554\u255D\u2554\u255D</c1><c2>\u2500\u2500</c2>","<c1>\u2554\u255D\u2554\u255D</c1><c2>\u2500</c2><c1>\u2554\u2557</c1>","<c1>\u255A\u2550\u255D</c1><c2>\u2500\u2500</c2><c1>\u255A\u255D</c1>"],"&":["<c2>\u2500\u2500</c2><c1>\u2554\u2557</c1><c2>\u2500</c2>","<c2>\u2500\u2500</c2><c1>\u2551\u2551</c1><c2>\u2500</c2>","<c1>\u2554\u2550\u255D\u255A\u2557</c1>","<c1>\u2551\u2554\u2557\u2554\u255D</c1>","<c1>\u2551\u255A\u255D\u2551</c1><c2>\u2500</c2>","<c1>\u255A\u2550\u2550\u255D</c1><c2>\u2500</c2>"],"(":["<c2>\u2500\u2500</c2><c1>\u2554\u2550\u2557</c1>","<c2>\u2500</c2><c1>\u2554\u255D\u2554\u255D</c1>","<c1>\u2554\u255D\u2554\u255D</c1><c2>\u2500</c2>","<c1>\u255A\u2557\u255A\u2557</c1><c2>\u2500</c2>","<c2>\u2500</c2><c1>\u255A\u2557\u255A\u2557</c1>","<c2>\u2500\u2500</c2><c1>\u255A\u2550\u255D</c1>"],")":["<c1>\u2554\u2550\u2557</c1><c2>\u2500\u2500</c2>","<c1>\u255A\u2557\u255A\u2557</c1><c2>\u2500</c2>","<c2>\u2500</c2><c1>\u255A\u2557\u255A\u2557</c1>","<c2>\u2500</c2><c1>\u2554\u255D\u2554\u255D</c1>","<c1>\u2554\u255D\u2554\u255D</c1><c2>\u2500</c2>","<c1>\u255A\u2550\u255D</c1><c2>\u2500\u2500</c2>"],"/":["<c2>\u2500\u2500\u2500\u2500</c2><c1>\u2554\u2550\u2557</c1>","<c2>\u2500\u2500\u2500</c2><c1>\u2554\u255D\u2554\u255D</c1>","<c2>\u2500\u2500</c2><c1>\u2554\u255D\u2554\u255D</c1><c2>\u2500</c2>","<c2>\u2500</c2><c1>\u2554\u255D\u2554\u255D</c1><c2>\u2500\u2500</c2>","<c1>\u2554\u255D\u2554\u255D</c1><c2>\u2500\u2500\u2500</c2>","<c1>\u255A\u2550\u255D</c1><c2>\u2500\u2500\u2500\u2500</c2>"],":":["<c2>\u2500\u2500</c2>","<c1>\u2554\u2557</c1>","<c1>\u255A\u255D</c1>","<c1>\u2554\u2557</c1>","<c1>\u255A\u255D</c1>","<c2>\u2500\u2500</c2>"],";":["<c2>\u2500\u2500</c2>","<c2>\u2500\u2500</c2>","<c2>\u2500\u2500</c2>","<c1>\u2554\u2557</c1>","<c1>\u255A\u2563</c1>","<c2>\u2500</c2><c1>\u255D</c1>"],",":["<c1>\u2554\u2557</c1>","<c1>\u2551\u2551</c1>","<c1>\u255A\u255D</c1>","<c1>\u2554\u2557</c1>","<c1>\u255A\u2563</c1>","<c2>\u2500</c2><c1>\u255D</c1>"],"'":["<c1>\u2554\u2557</c1>","<c1>\u2551\u2551</c1>","<c1>\u255A\u255D</c1>","<c2>\u2500\u2500</c2>","<c2>\u2500\u2500</c2>","<c2>\u2500\u2500</c2>"],'"':["<c1>\u2554\u2557\u2554\u2557</c1>","<c1>\u2551\u2551\u2551\u2551</c1>","<c1>\u255A\u255D\u255A\u255D</c1>","<c2>\u2500\u2500\u2500\u2500</c2>","<c2>\u2500\u2500\u2500\u2500</c2>","<c2>\u2500\u2500\u2500\u2500</c2>"]," ":["<c2>\u2500\u2500\u2500</c2>","<c2>\u2500\u2500\u2500</c2>","<c2>\u2500\u2500\u2500</c2>","<c2>\u2500\u2500\u2500</c2>","<c2>\u2500\u2500\u2500</c2>","<c2>\u2500\u2500\u2500</c2>"]}},fonts={tiny:tiny_default,block:block_default,shade:shade_default,slick:slick_default,huge:huge_default,grid:grid_default,pallet:pallet_default},parsedFonts={};TextAttributes={NONE:0,BOLD:1,DIM:2,ITALIC:4,UNDERLINE:8,BLINK:16,INVERSE:32,HIDDEN:64,STRIKETHROUGH:128};((DebugOverlayCorner2)=>{DebugOverlayCorner2[DebugOverlayCorner2.topLeft=0]="topLeft",DebugOverlayCorner2[DebugOverlayCorner2.topRight=1]="topRight",DebugOverlayCorner2[DebugOverlayCorner2.bottomLeft=2]="bottomLeft",DebugOverlayCorner2[DebugOverlayCorner2.bottomRight=3]="bottomRight"})(DebugOverlayCorner||={});((TargetChannel2)=>{TargetChannel2[TargetChannel2.FG=1]="FG",TargetChannel2[TargetChannel2.BG=2]="BG",TargetChannel2[TargetChannel2.Both=3]="Both"})(TargetChannel||={});BrandedStyledText=Symbol.for("@opentui/core/StyledText");StyledText=class StyledText{[BrandedStyledText]=!0;chunks;constructor(chunks){this.chunks=chunks}};kittyKeyMap={27:"escape",9:"tab",13:"return",127:"backspace",57344:"escape",57345:"return",57346:"tab",57347:"backspace",57348:"insert",57349:"delete",57350:"left",57351:"right",57352:"up",57353:"down",57354:"pageup",57355:"pagedown",57356:"home",57357:"end",57358:"capslock",57359:"scrolllock",57360:"numlock",57361:"printscreen",57362:"pause",57363:"menu",57364:"f1",57365:"f2",57366:"f3",57367:"f4",57368:"f5",57369:"f6",57370:"f7",57371:"f8",57372:"f9",57373:"f10",57374:"f11",57375:"f12",57376:"f13",57377:"f14",57378:"f15",57379:"f16",57380:"f17",57381:"f18",57382:"f19",57383:"f20",57384:"f21",57385:"f22",57386:"f23",57387:"f24",57388:"f25",57389:"f26",57390:"f27",57391:"f28",57392:"f29",57393:"f30",57394:"f31",57395:"f32",57396:"f33",57397:"f34",57398:"f35",57399:"kp0",57400:"kp1",57401:"kp2",57402:"kp3",57403:"kp4",57404:"kp5",57405:"kp6",57406:"kp7",57407:"kp8",57408:"kp9",57409:"kpdecimal",57410:"kpdivide",57411:"kpmultiply",57412:"kpminus",57413:"kpplus",57414:"kpenter",57415:"kpequal",57416:"kpseparator",57417:"kpleft",57418:"kpright",57419:"kpup",57420:"kpdown",57421:"kppageup",57422:"kppagedown",57423:"kphome",57424:"kpend",57425:"kpinsert",57426:"kpdelete",57427:"clear",57428:"mediaplay",57429:"mediapause",57430:"mediaplaypause",57431:"mediareverse",57432:"mediastop",57433:"mediafastforward",57434:"mediarewind",57435:"medianext",57436:"mediaprev",57437:"mediarecord",57438:"volumedown",57439:"volumeup",57440:"mute",57441:"leftshift",57442:"leftctrl",57443:"leftalt",57444:"leftsuper",57445:"lefthyper",57446:"leftmeta",57447:"rightshift",57448:"rightctrl",57449:"rightalt",57450:"rightsuper",57451:"righthyper",57452:"rightmeta",57453:"iso_level3_shift",57454:"iso_level5_shift"};functionalKeyMap={A:"up",B:"down",C:"right",D:"left",H:"home",F:"end",E:"clear",P:"f1",Q:"f2",S:"f4"},tildeKeyMap={"1":"home","2":"insert","3":"delete","4":"end","5":"pageup","6":"pagedown","7":"home","8":"end","11":"f1","12":"f2","13":"f3","14":"f4","15":"f5","17":"f6","18":"f7","19":"f8","20":"f9","21":"f10","23":"f11","24":"f12","29":"menu","57427":"clear"};metaKeyCodeRe=/^(?:\x1b)([a-zA-Z0-9])$/,fnKeyRe=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,keyName={OP:"f1",OQ:"f2",OR:"f3",OS:"f4","[11~":"f1","[12~":"f2","[13~":"f3","[14~":"f4","[[A":"f1","[[B":"f2","[[C":"f3","[[D":"f4","[[E":"f5","[15~":"f5","[17~":"f6","[18~":"f7","[19~":"f8","[20~":"f9","[21~":"f10","[23~":"f11","[24~":"f12","[29~":"menu","[57427~":"clear","[A":"up","[B":"down","[C":"right","[D":"left","[E":"clear","[F":"end","[H":"home","[P":"f1","[Q":"f2","[S":"f4",OA:"up",OB:"down",OC:"right",OD:"left",OE:"clear",OF:"end",OH:"home","[1~":"home","[2~":"insert","[3~":"delete","[4~":"end","[5~":"pageup","[6~":"pagedown","[[5~":"pageup","[[6~":"pagedown","[7~":"home","[8~":"end","[a":"up","[b":"down","[c":"right","[d":"left","[e":"clear",f:"right",b:"left",p:"up",n:"down","[2$":"insert","[3$":"delete","[5$":"pageup","[6$":"pagedown","[7$":"home","[8$":"end",Oa:"up",Ob:"down",Oc:"right",Od:"left",Oe:"clear","[2^":"insert","[3^":"delete","[5^":"pageup","[6^":"pagedown","[7^":"home","[8^":"end","[Z":"tab"},nonAlphanumericKeys=[...Object.values(keyName),"backspace"],modifyOtherKeysRe=/^\x1b\[27;(\d+);(\d+)~$/;MouseParser=class MouseParser{mouseButtonsPressed=new Set;static SCROLL_DIRECTIONS={0:"up",1:"down",2:"left",3:"right"};reset(){this.mouseButtonsPressed.clear()}decodeInput(data){return(Buffer.isBuffer(data)?data:Buffer.from(data.buffer,data.byteOffset,data.byteLength)).toString("latin1")}parseMouseEvent(data){let str5=this.decodeInput(data);return this.parseMouseSequenceAt(str5,0)?.event??null}parseAllMouseEvents(data){let str5=this.decodeInput(data),events=[],offset=0;while(offset<str5.length){let parsed=this.parseMouseSequenceAt(str5,offset);if(!parsed)break;events.push(parsed.event),offset+=parsed.consumed}return events}parseMouseSequenceAt(str5,offset){if(!str5.startsWith("\x1B[",offset))return null;let introducer=str5[offset+2];if(introducer==="<")return this.parseSgrSequence(str5,offset);if(introducer==="M")return this.parseBasicSequence(str5,offset);return null}parseSgrSequence(str5,offset){let index=offset+3,values2=[0,0,0],part=0,hasDigit=!1;while(index<str5.length){let char=str5[index],charCode=str5.charCodeAt(index);if(charCode>=48&&charCode<=57){hasDigit=!0,values2[part]=values2[part]*10+(charCode-48),index++;continue}switch(char){case";":{if(!hasDigit||part>=2)return null;part++,hasDigit=!1,index++;break}case"M":case"m":{if(!hasDigit||part!==2)return null;return{event:this.decodeSgrEvent(values2[0],values2[1],values2[2],char),consumed:index-offset+1}}default:return null}}return null}parseBasicSequence(str5,offset){if(offset+6>str5.length)return null;let buttonByte=str5.charCodeAt(offset+3)-32,x=str5.charCodeAt(offset+4)-33,y=str5.charCodeAt(offset+5)-33;return{event:this.decodeBasicEvent(buttonByte,x,y),consumed:6}}decodeSgrEvent(rawButtonCode,wireX,wireY,pressRelease){let button=rawButtonCode&3,isScroll=(rawButtonCode&64)!==0,scrollDirection=!isScroll?void 0:MouseParser.SCROLL_DIRECTIONS[button],isMotion=(rawButtonCode&32)!==0,modifiers={shift:(rawButtonCode&4)!==0,alt:(rawButtonCode&8)!==0,ctrl:(rawButtonCode&16)!==0},type2,scrollInfo;if(isMotion){let isDragging=this.mouseButtonsPressed.size>0;if(button===3)type2="move";else if(isDragging)type2="drag";else type2="move"}else if(isScroll&&pressRelease==="M")type2="scroll",scrollInfo={direction:scrollDirection,delta:1};else if(type2=pressRelease==="M"?"down":"up",type2==="down"&&button!==3)this.mouseButtonsPressed.add(button);else if(type2==="up")this.mouseButtonsPressed.clear();return{type:type2,button:button===3?0:button,x:wireX-1,y:wireY-1,modifiers,scroll:scrollInfo}}decodeBasicEvent(buttonByte,x,y){let button=buttonByte&3,isScroll=(buttonByte&64)!==0,isMotion=(buttonByte&32)!==0,scrollDirection=!isScroll?void 0:MouseParser.SCROLL_DIRECTIONS[button],modifiers={shift:(buttonByte&4)!==0,alt:(buttonByte&8)!==0,ctrl:(buttonByte&16)!==0},type2,actualButton,scrollInfo;if(isMotion)type2="move",actualButton=button===3?-1:button;else if(isScroll)type2="scroll",actualButton=0,scrollInfo={direction:scrollDirection,delta:1};else type2=button===3?"up":"down",actualButton=button===3?0:button;return{type:type2,button:actualButton,x,y,modifiers,scroll:scrollInfo}}};singletonCacheSymbol=Symbol.for("@opentui/core/singleton");envRegistry=singleton("env-registry",()=>({}));envStore=singleton("env-store",()=>new EnvStore);env=new Proxy({},{get(target,prop){if(typeof prop!=="string")return;return envStore.get(prop)},has(target,prop){return envStore.has(prop)},ownKeys(){return Object.keys(envRegistry)},getOwnPropertyDescriptor(target,prop){if(envStore.has(prop))return{enumerable:!0,configurable:!0,get:()=>envStore.get(prop)};return}}),BRACKETED_PASTE_START=Buffer3.from("\x1B[200~"),BRACKETED_PASTE_END=Buffer3.from("\x1B[201~"),EMPTY_BYTES=new Uint8Array(0),KEY_DECODER=new TextDecoder,DEFAULT_PROTOCOL_CONTEXT={kittyKeyboardEnabled:!1,privateCapabilityRepliesActive:!1,pixelResolutionQueryActive:!1,explicitWidthCprActive:!1,startupCursorCprActive:!1},RXVT_DOLLAR_CSI_RE=/^\x1b\[\d+\$$/,SYSTEM_CLOCK=new SystemClock;registerEnvVar({name:"OTUI_TS_STYLE_WARN",default:!1,description:"Enable warnings for missing syntax styles"});TIMERS_MAP=new Map;registerEnvVar({name:"OTUI_TREE_SITTER_WORKER_PATH",description:"Path to the TreeSitter worker",type:"string",default:""});DEFAULT_PARSERS=getParsers();TreeSitterClient=class TreeSitterClient extends EventEmitter22{initialized=!1;worker;buffers=new Map;initializePromise;initializeResolvers;messageCallbacks=new Map;messageIdCounter=0;editQueues=new Map;debouncer;options;constructor(options){super();this.options=options,this.debouncer=createDebounce("tree-sitter-client"),this.startWorker()}emitError(error2,bufferId){if(this.listenerCount("error")>0)this.emit("error",error2,bufferId)}emitWarning(warning,bufferId){if(this.listenerCount("warning")>0)this.emit("warning",warning,bufferId)}startWorker(){if(this.worker)return;let worker_path;if(env.OTUI_TREE_SITTER_WORKER_PATH)worker_path=env.OTUI_TREE_SITTER_WORKER_PATH;else if(typeof OTUI_TREE_SITTER_WORKER_PATH<"u")worker_path=OTUI_TREE_SITTER_WORKER_PATH;else if(this.options.workerPath)worker_path=this.options.workerPath;else if(worker_path=new URL("./parser.worker.js",import.meta.url).href,!existsSync66(resolve22(import.meta.dirname,"parser.worker.js")))worker_path=new URL("./parser.worker.ts",import.meta.url).href;this.worker=new Worker(worker_path),this.worker.onmessage=this.handleWorkerMessage.bind(this),this.worker.onerror=(error2)=>{if(console.error("TreeSitter worker error:",error2.message),this.initializeResolvers)clearTimeout(this.initializeResolvers.timeoutId),this.initializeResolvers.reject(Error(`Worker error: ${error2.message}`)),this.initializeResolvers=void 0;this.emitError(`Worker error: ${error2.message}`)}}stopWorker(){if(!this.worker)return;this.worker.terminate(),this.worker=void 0}handleReset(){return this.buffers.clear(),this.stopWorker(),this.startWorker(),this.initializePromise=void 0,this.initializeResolvers=void 0,this.initialize()}async initialize(){if(this.initializePromise)return this.initializePromise;return this.initializePromise=new Promise((resolve32,reject)=>{let timeoutMs=this.options.initTimeout??1e4,timeoutId=setTimeout(()=>{let error2=Error("Worker initialization timed out");console.error("TreeSitter client:",error2.message),this.initializeResolvers=void 0,reject(error2)},timeoutMs);this.initializeResolvers={resolve:resolve32,reject,timeoutId},this.worker?.postMessage({type:"INIT",dataPath:this.options.dataPath})}),await this.initializePromise,await this.registerDefaultParsers(),this.initializePromise}async registerDefaultParsers(){for(let parser of DEFAULT_PARSERS)this.addFiletypeParser(parser)}resolvePath(path6){if(isUrl(path6))return path6;if(isBunfsPath(path6))return normalizeBunfsPath(parse2(path6).base);if(!isAbsolute4(path6))return resolve22(path6);return path6}addFiletypeParser(filetypeParser){let resolvedParser={...filetypeParser,aliases:filetypeParser.aliases?[...new Set(filetypeParser.aliases.filter((alias)=>alias!==filetypeParser.filetype))]:void 0,wasm:this.resolvePath(filetypeParser.wasm),queries:{highlights:filetypeParser.queries.highlights.map((path6)=>this.resolvePath(path6)),injections:filetypeParser.queries.injections?.map((path6)=>this.resolvePath(path6))}};this.worker?.postMessage({type:"ADD_FILETYPE_PARSER",filetypeParser:resolvedParser})}async getPerformance(){let messageId=`performance_${this.messageIdCounter++}`;return new Promise((resolve32)=>{this.messageCallbacks.set(messageId,resolve32),this.worker?.postMessage({type:"GET_PERFORMANCE",messageId})})}async highlightOnce(content,filetype){if(!this.initialized)try{await this.initialize()}catch(error2){return{error:"Could not highlight because of initialization error"}}let messageId=`oneshot_${this.messageIdCounter++}`;return new Promise((resolve32)=>{this.messageCallbacks.set(messageId,resolve32),this.worker?.postMessage({type:"ONESHOT_HIGHLIGHT",content,filetype,messageId})})}handleWorkerMessage(event){let{type:type2,bufferId,error:error2,highlights,warning,messageId,hasParser,performance:performance22,version}=event.data;if(type2==="HIGHLIGHT_RESPONSE"){let buffer2=this.buffers.get(bufferId);if(!buffer2||!buffer2.hasParser)return;if(buffer2.version!==version){this.resetBuffer(bufferId,buffer2.version,buffer2.content);return}this.emit("highlights:response",bufferId,version,highlights)}if(type2==="INIT_RESPONSE"){if(this.initializeResolvers){if(clearTimeout(this.initializeResolvers.timeoutId),error2)console.error("TreeSitter client initialization failed:",error2),this.initializeResolvers.reject(Error(error2));else this.initialized=!0,this.initializeResolvers.resolve();this.initializeResolvers=void 0;return}}if(type2==="PARSER_INIT_RESPONSE"){let callback=this.messageCallbacks.get(messageId);if(callback)this.messageCallbacks.delete(messageId),callback({hasParser,warning,error:error2});return}if(type2==="PRELOAD_PARSER_RESPONSE"){let callback=this.messageCallbacks.get(messageId);if(callback)this.messageCallbacks.delete(messageId),callback({hasParser});return}if(type2==="BUFFER_DISPOSED"){let callback=this.messageCallbacks.get(`dispose_${bufferId}`);if(callback)this.messageCallbacks.delete(`dispose_${bufferId}`),callback(!0);this.emit("buffer:disposed",bufferId);return}if(type2==="PERFORMANCE_RESPONSE"){let callback=this.messageCallbacks.get(messageId);if(callback)this.messageCallbacks.delete(messageId),callback(performance22);return}if(type2==="ONESHOT_HIGHLIGHT_RESPONSE"){let callback=this.messageCallbacks.get(messageId);if(callback)this.messageCallbacks.delete(messageId),callback({highlights,warning,error:error2});return}if(type2==="UPDATE_DATA_PATH_RESPONSE"){let callback=this.messageCallbacks.get(messageId);if(callback)this.messageCallbacks.delete(messageId),callback({error:error2});return}if(type2==="CLEAR_CACHE_RESPONSE"){let callback=this.messageCallbacks.get(messageId);if(callback)this.messageCallbacks.delete(messageId),callback({error:error2});return}if(warning){this.emitWarning(warning,bufferId);return}if(error2){this.emitError(error2,bufferId);return}if(type2==="WORKER_LOG"){let{logType,data}=event.data,message=data.join(" ");this.emit("worker:log",logType,message);return}}async preloadParser(filetype){let messageId=`has_parser_${this.messageIdCounter++}`;return(await new Promise((resolve32)=>{this.messageCallbacks.set(messageId,resolve32),this.worker?.postMessage({type:"PRELOAD_PARSER",filetype,messageId})})).hasParser}async createBuffer(id,content,filetype,version=1,autoInitialize=!0){if(!this.initialized){if(!autoInitialize)return this.emitError("Could not create buffer because client is not initialized"),!1;try{await this.initialize()}catch(error2){return this.emitError("Could not create buffer because of initialization error"),!1}}if(this.buffers.has(id))throw Error(`Buffer with id ${id} already exists`);this.buffers.set(id,{id,content,filetype,version,hasParser:!1});let messageId=`init_${this.messageIdCounter++}`,response=await new Promise((resolve32)=>{this.messageCallbacks.set(messageId,resolve32),this.worker?.postMessage({type:"INITIALIZE_PARSER",bufferId:id,version,content,filetype,messageId})});if(!response.hasParser){if(this.emit("buffer:initialized",id,!1),filetype!=="plaintext")this.emitWarning(response.warning||response.error||"Buffer has no parser",id);return!1}let bufferState={id,content,filetype,version,hasParser:!0};return this.buffers.set(id,bufferState),this.emit("buffer:initialized",id,!0),!0}async updateBuffer(id,edits,newContent,version){if(!this.initialized)return;let buffer2=this.buffers.get(id);if(!buffer2||!buffer2.hasParser)return;if(this.buffers.set(id,{...buffer2,content:newContent,version}),!this.editQueues.has(id))this.editQueues.set(id,new ProcessQueue((item)=>this.processEdit(id,item.edits,item.newContent,item.version,item.isReset)));this.editQueues.get(id).enqueue({edits,newContent,version})}async processEdit(bufferId,edits,newContent,version,isReset=!1){this.worker?.postMessage({type:isReset?"RESET_BUFFER":"HANDLE_EDITS",bufferId,version,content:newContent,edits})}async removeBuffer(bufferId){if(!this.initialized)return;if(this.buffers.delete(bufferId),this.editQueues.has(bufferId))this.editQueues.get(bufferId)?.clear(),this.editQueues.delete(bufferId);if(this.worker)await new Promise((resolve32)=>{let messageId=`dispose_${bufferId}`;this.messageCallbacks.set(messageId,resolve32);try{this.worker.postMessage({type:"DISPOSE_BUFFER",bufferId})}catch(error2){console.error("Error disposing buffer",error2),resolve32(!1)}setTimeout(()=>{if(this.messageCallbacks.has(messageId))this.messageCallbacks.delete(messageId),console.warn({bufferId},"Timed out waiting for buffer to be disposed"),resolve32(!1)},3000)});this.debouncer.clearDebounce(`reset-${bufferId}`)}async destroy(){if(this.initializeResolvers)clearTimeout(this.initializeResolvers.timeoutId),this.initializeResolvers.reject(Error("Client destroyed during initialization")),this.initializeResolvers=void 0;for(let[messageId,callback]of this.messageCallbacks.entries())if(typeof callback==="function")try{callback({error:"Client destroyed"})}catch(e){}this.messageCallbacks.clear(),clearDebounceScope("tree-sitter-client"),this.debouncer.clear(),this.editQueues.clear(),this.buffers.clear(),this.stopWorker(),this.initialized=!1,this.initializePromise=void 0}async resetBuffer(bufferId,version,content){if(!this.initialized)return;let buffer2=this.buffers.get(bufferId);if(!buffer2||!buffer2.hasParser){this.emitError("Cannot reset buffer with no parser",bufferId);return}this.buffers.set(bufferId,{...buffer2,content,version}),this.debouncer.debounce(`reset-${bufferId}`,10,()=>this.processEdit(bufferId,[],content,version,!0))}getBuffer(bufferId){return this.buffers.get(bufferId)}getAllBuffers(){return Array.from(this.buffers.values())}isInitialized(){return this.initialized}async setDataPath(dataPath){if(this.options.dataPath===dataPath)return;if(this.options.dataPath=dataPath,this.initialized&&this.worker){let messageId=`update_datapath_${this.messageIdCounter++}`;return new Promise((resolve32,reject)=>{this.messageCallbacks.set(messageId,(response)=>{if(response.error)reject(Error(response.error));else resolve32()}),this.worker.postMessage({type:"UPDATE_DATA_PATH",dataPath,messageId})})}}async clearCache(){if(!this.initialized||!this.worker)throw Error("Cannot clear cache: client is not initialized");let messageId=`clear_cache_${this.messageIdCounter++}`;return new Promise((resolve32,reject)=>{this.messageCallbacks.set(messageId,(response)=>{if(response.error)reject(Error(response.error));else resolve32()}),this.worker.postMessage({type:"CLEAR_CACHE",messageId})})}};registerEnvVar({name:"XDG_CONFIG_HOME",description:"Base directory for user-specific configuration files",type:"string",default:""});registerEnvVar({name:"XDG_DATA_HOME",description:"Base directory for user-specific data files",type:"string",default:""});DataPathsManager=class DataPathsManager extends EventEmitter3{_appName;_globalConfigPath;_globalConfigFile;_localConfigFile;_globalDataPath;constructor(){super();this._appName="opentui"}get appName(){return this._appName}set appName(value){if(!isValidDirectoryName(value))throw Error(`Invalid app name "${value}": must be a valid directory name`);if(this._appName!==value)this._appName=value,this._globalConfigPath=void 0,this._globalConfigFile=void 0,this._localConfigFile=void 0,this._globalDataPath=void 0,this.emit("paths:changed",this.toObject())}get globalConfigPath(){if(this._globalConfigPath===void 0){let homeDir=os3.homedir(),baseConfigDir=env.XDG_CONFIG_HOME||path3.join(homeDir,".config");this._globalConfigPath=path3.join(baseConfigDir,this._appName)}return this._globalConfigPath}get globalConfigFile(){if(this._globalConfigFile===void 0)this._globalConfigFile=path3.join(this.globalConfigPath,"init.ts");return this._globalConfigFile}get localConfigFile(){if(this._localConfigFile===void 0)this._localConfigFile=path3.join(process.cwd(),`.${this._appName}.ts`);return this._localConfigFile}get globalDataPath(){if(this._globalDataPath===void 0){let homeDir=os3.homedir(),baseDataDir=env.XDG_DATA_HOME||path3.join(homeDir,".local/share");this._globalDataPath=path3.join(baseDataDir,this._appName)}return this._globalDataPath}toObject(){return{globalConfigPath:this.globalConfigPath,globalConfigFile:this.globalConfigFile,localConfigFile:this.localConfigFile,globalDataPath:this.globalDataPath}}};extensionToFiletype=new Map([["astro","astro"],["bash","bash"],["c","c"],["cc","cpp"],["cjs","javascript"],["clj","clojure"],["cljs","clojure"],["cljc","clojure"],["cpp","cpp"],["cxx","cpp"],["cs","csharp"],["cts","typescript"],["ctsx","typescriptreact"],["dart","dart"],["diff","diff"],["edn","clojure"],["go","go"],["gemspec","ruby"],["groovy","groovy"],["h","c"],["handlebars","handlebars"],["hbs","handlebars"],["hpp","cpp"],["hxx","cpp"],["h++","cpp"],["hh","cpp"],["hrl","erlang"],["hs","haskell"],["htm","html"],["html","html"],["ini","ini"],["js","javascript"],["jsx","javascriptreact"],["jl","julia"],["json","json"],["ksh","bash"],["kt","kotlin"],["kts","kotlin"],["latex","latex"],["less","less"],["lua","lua"],["markdown","markdown"],["md","markdown"],["mdown","markdown"],["mkd","markdown"],["mjs","javascript"],["ml","ocaml"],["mli","ocaml"],["mts","typescript"],["mtsx","typescriptreact"],["patch","diff"],["php","php"],["pl","perl"],["pm","perl"],["ps1","powershell"],["psm1","powershell"],["py","python"],["pyi","python"],["r","r"],["rb","ruby"],["rake","ruby"],["rs","rust"],["ru","ruby"],["sass","sass"],["sc","scala"],["scala","scala"],["scss","scss"],["sh","bash"],["sql","sql"],["svelte","svelte"],["swift","swift"],["ts","typescript"],["tsx","typescriptreact"],["tex","latex"],["toml","toml"],["vue","vue"],["vim","vim"],["xml","xml"],["xsl","xsl"],["yaml","yaml"],["yml","yaml"],["zig","zig"],["zon","zig"],["zsh","bash"],["c++","cpp"],["erl","erlang"],["exs","elixir"],["ex","elixir"],["elm","elm"],["fsharp","fsharp"],["fs","fsharp"],["fsx","fsharp"],["fsscript","fsharp"],["fsi","fsharp"],["java","java"],["css","css"]]),basenameToFiletype=new Map([[".bash_aliases","bash"],[".bash_logout","bash"],[".bash_profile","bash"],[".bashrc","bash"],[".kshrc","bash"],[".profile","bash"],[".vimrc","vim"],[".zlogin","bash"],[".zlogout","bash"],[".zprofile","bash"],[".zshenv","bash"],[".zshrc","bash"],["appfile","ruby"],["berksfile","ruby"],["brewfile","ruby"],["cheffile","ruby"],["containerfile","dockerfile"],["dockerfile","dockerfile"],["fastfile","ruby"],["gemfile","ruby"],["gnumakefile","make"],["gvimrc","vim"],["guardfile","ruby"],["makefile","make"],["podfile","ruby"],["rakefile","ruby"],["thorfile","ruby"],["vagrantfile","ruby"]]);SYSTEM_CLOCK2=new SystemClock,OSC4_RESPONSE=/\x1b]4;(\d+);(?:(?:rgb:)([0-9a-fA-F]+)\/([0-9a-fA-F]+)\/([0-9a-fA-F]+)|#([0-9a-fA-F]{6}))(?:\x07|\x1b\\)/g,OSC_SPECIAL_RESPONSE=/\x1b](\d+);(?:(?:rgb:)([0-9a-fA-F]+)\/([0-9a-fA-F]+)\/([0-9a-fA-F]+)|#([0-9a-fA-F]{6}))(?:\x07|\x1b\\)/g;DEFAULT_FOREGROUND_FALLBACK=RGBA.fromInts(...DEFAULT_FOREGROUND_RGB),DEFAULT_BACKGROUND_FALLBACK=RGBA.fromInts(...DEFAULT_BACKGROUND_RGB);PASTE_TEXT_DECODER=new TextDecoder;URL_SCOPES=["markup.link.url","string.special.url"];pointerSize=process.arch==="x64"||process.arch==="arm64"?8:4,typeSizes={u8:1,bool_u8:1,bool_u32:4,u16:2,i16:2,u32:4,u64:8,f32:4,f64:8,pointer:pointerSize,i32:4},primitiveKeys=Object.keys(typeSizes);typeAlignments={...typeSizes},typeGetters={u8:(view,offset)=>view.getUint8(offset),bool_u8:(view,offset)=>Boolean(view.getUint8(offset)),bool_u32:(view,offset)=>Boolean(view.getUint32(offset,!0)),u16:(view,offset)=>view.getUint16(offset,!0),i16:(view,offset)=>view.getInt16(offset,!0),u32:(view,offset)=>view.getUint32(offset,!0),u64:(view,offset)=>view.getBigUint64(offset,!0),f32:(view,offset)=>view.getFloat32(offset,!0),f64:(view,offset)=>view.getFloat64(offset,!0),i32:(view,offset)=>view.getInt32(offset,!0),pointer:(view,offset)=>pointerSize===8?view.getBigUint64(offset,!0):BigInt(view.getUint32(offset,!0))};({pack:pointerPacker,unpack:pointerUnpacker}=primitivePackers("pointer"));encoder=new TextEncoder,decoder=new TextDecoder;StyledChunkStruct=defineStruct([["text","char*"],["text_len","u64",{lengthOf:"text"}],["fg","pointer",{optional:!0,packTransform:rgbaPackTransform,unpackTransform:rgbaUnpackTransform}],["bg","pointer",{optional:!0,packTransform:rgbaPackTransform,unpackTransform:rgbaUnpackTransform}],["fg_tag","u16",{default:COLOR_TAG_RGB}],["bg_tag","u16",{default:COLOR_TAG_RGB}],["attributes","u32",{default:0}],["link","char*",{default:""}],["link_len","u64",{lengthOf:"link"}]],{mapValue:(chunk)=>{let normalizedFg=normalizeColorValue(chunk.fg??null),normalizedBg=normalizeColorValue(chunk.bg??null);if(!chunk.link||typeof chunk.link==="string")return{...chunk,fg:normalizedFg?.rgba??null,bg:normalizedBg?.rgba??null,fg_tag:normalizedFg?.tag??COLOR_TAG_RGB,bg_tag:normalizedBg?.tag??COLOR_TAG_RGB};return{...chunk,fg:normalizedFg?.rgba??null,bg:normalizedBg?.rgba??null,fg_tag:normalizedFg?.tag??COLOR_TAG_RGB,bg_tag:normalizedBg?.tag??COLOR_TAG_RGB,link:chunk.link.url}}}),HighlightStruct=defineStruct([["start","u32"],["end","u32"],["styleId","u32"],["priority","u8",{default:0}],["hlRef","u16",{default:0}]]),LogicalCursorStruct=defineStruct([["row","u32"],["col","u32"],["offset","u32"]]),VisualCursorStruct=defineStruct([["visualRow","u32"],["visualCol","u32"],["logicalRow","u32"],["logicalCol","u32"],["offset","u32"]]),UnicodeMethodEnum=defineEnum({wcwidth:0,unicode:1},"u8"),TerminalCapabilitiesStruct=defineStruct([["kitty_keyboard","bool_u8"],["kitty_graphics","bool_u8"],["rgb","bool_u8"],["ansi256","bool_u8"],["unicode",UnicodeMethodEnum],["sgr_pixels","bool_u8"],["color_scheme_updates","bool_u8"],["explicit_width","bool_u8"],["scaled_text","bool_u8"],["sixel","bool_u8"],["focus_tracking","bool_u8"],["sync","bool_u8"],["bracketed_paste","bool_u8"],["hyperlinks","bool_u8"],["osc52","bool_u8"],["explicit_cursor_positioning","bool_u8"],["term_name","char*"],["term_name_len","u64",{lengthOf:"term_name"}],["term_version","char*"],["term_version_len","u64",{lengthOf:"term_version"}],["term_from_xtversion","bool_u8"]]),EncodedCharStruct=defineStruct([["width","u8"],["char","u32"]]),LineInfoStruct=defineStruct([["startCols",["u32"]],["startColsLen","u32",{lengthOf:"startCols"}],["widthCols",["u32"]],["widthColsLen","u32",{lengthOf:"widthCols"}],["sources",["u32"]],["sourcesLen","u32",{lengthOf:"sources"}],["wraps",["u32"]],["wrapsLen","u32",{lengthOf:"wraps"}],["widthColsMax","u32"]]),MeasureResultStruct=defineStruct([["lineCount","u32"],["widthColsMax","u32"]]),CursorStateStruct=defineStruct([["x","u32"],["y","u32"],["visible","bool_u8"],["style","u8"],["blinking","bool_u8"],["r","f32"],["g","f32"],["b","f32"],["a","f32"]]),CursorStyleOptionsStruct=defineStruct([["style","u8",{default:255}],["blinking","u8",{default:255}],["color","pointer",{optional:!0,packTransform:rgbaPackTransform,unpackTransform:rgbaUnpackTransform}],["cursor","u8",{default:255}]]),GridDrawOptionsStruct=defineStruct([["drawInner","bool_u8",{default:!0}],["drawOuter","bool_u8",{default:!0}]]),BuildOptionsStruct=defineStruct([["gpaSafeStats","bool_u8"],["gpaMemoryLimitTracking","bool_u8"]]),AllocatorStatsStruct=defineStruct([["totalRequestedBytes","u64"],["activeAllocations","u64"],["smallAllocations","u64"],["largeAllocations","u64"],["requestedBytesValid","bool_u8"]]),GrowthPolicyEnum=defineEnum({grow:0,block:1},"u8"),NativeSpanFeedOptionsStruct=defineStruct([["chunkSize","u32",{default:65536}],["initialChunks","u32",{default:2}],["maxBytes","u64",{default:0n}],["growthPolicy",GrowthPolicyEnum,{default:"grow"}],["autoCommitOnFull","bool_u8",{default:!0}],["spanQueueCapacity","u32",{default:0}]]),NativeSpanFeedStatsStruct=defineStruct([["bytesWritten","u64"],["spansCommitted","u64"],["chunks","u32"],["pendingSpans","u32"]]),SpanInfoStruct=defineStruct([["chunkPtr","pointer"],["offset","u32"],["len","u32"],["chunkIndex","u32"],["reserved","u32",{default:0}]],{reduceValue:(value)=>({chunkPtr:value.chunkPtr,offset:value.offset,len:value.len,chunkIndex:value.chunkIndex})}),ReserveInfoStruct=defineStruct([["ptr","pointer"],["len","u32"],["reserved","u32",{default:0}]],{reduceValue:(value)=>({ptr:value.ptr,len:value.len})}),module=await import(`@opentui/core-${process.platform}-${process.arch}/index.ts`),targetLibPath=module.default;if(isBunfsPath(targetLibPath))targetLibPath=targetLibPath.replace("../","");if(!existsSync210(targetLibPath))throw Error(`opentui is not supported on the current platform: ${process.platform}-${process.arch}`);registerEnvVar({name:"OTUI_DEBUG_FFI",description:"Enable debug logging for the FFI bindings.",type:"boolean",default:!1});registerEnvVar({name:"OTUI_TRACE_FFI",description:"Enable tracing for the FFI bindings.",type:"boolean",default:!1});registerEnvVar({name:"OPENTUI_FORCE_WCWIDTH",description:"Use wcwidth for character width calculations",type:"boolean",default:!1});registerEnvVar({name:"OPENTUI_FORCE_UNICODE",description:"Force Mode 2026 Unicode support in terminal capabilities",type:"boolean",default:!1});registerEnvVar({name:"OPENTUI_GRAPHICS",description:"Enable Kitty graphics protocol detection",type:"boolean",default:!0});registerEnvVar({name:"OPENTUI_FORCE_NOZWJ",description:"Use no_zwj width method (Unicode without ZWJ joining)",type:"boolean",default:!1});CURSOR_STYLE_TO_ID={block:0,line:1,underline:2,default:3},CURSOR_ID_TO_STYLE=["block","line","underline","default"],MOUSE_STYLE_TO_ID={default:0,pointer:1,text:2,crosshair:3,move:4,"not-allowed":5};((LogLevel3)=>{LogLevel3[LogLevel3.Error=0]="Error",LogLevel3[LogLevel3.Warn=1]="Warn",LogLevel3[LogLevel3.Info=2]="Info",LogLevel3[LogLevel3.Debug=3]="Debug"})(LogLevel2||={});try{opentuiLib=new FFIRenderLib(opentuiLibPath)}catch(error2){}BrandedRenderable=Symbol.for("@opentui/core/Renderable");((LayoutEvents2)=>{LayoutEvents2.LAYOUT_CHANGED="layout-changed",LayoutEvents2.ADDED="added",LayoutEvents2.REMOVED="removed",LayoutEvents2.RESIZED="resized"})(LayoutEvents||={});((RenderableEvents2)=>{RenderableEvents2.FOCUSED="focused",RenderableEvents2.BLURRED="blurred"})(RenderableEvents||={});BaseRenderable=class BaseRenderable extends EventEmitter5{[BrandedRenderable]=!0;static renderableNumber=1;_id;num;_dirty=!1;parent=null;_visible=!0;constructor(options){super();this.num=BaseRenderable.renderableNumber++,this._id=options.id??`renderable-${this.num}`}get id(){return this._id}set id(value){this._id=value}get isDirty(){return this._dirty}markClean(){this._dirty=!1}markDirty(){this._dirty=!0}destroy(){}destroyRecursively(){}get visible(){return this._visible}set visible(value){this._visible=value}};yogaConfig=src_default2.Config.create();yogaConfig.setUseWebDefaults(!1);yogaConfig.setPointScaleFactor(1);Renderable=class Renderable extends BaseRenderable{static renderablesByNumber=new Map;_isDestroyed=!1;_ctx;_translateX=0;_translateY=0;_x=0;_y=0;_screenX=0;_screenY=0;_width;_height;_widthValue=0;_heightValue=0;_zIndex;selectable=!1;buffered;frameBuffer=null;_focusable=!1;_focused=!1;_hasFocusedDescendant=!1;keypressHandler=null;pasteHandler=null;_live=!1;_liveCount=0;_sizeChangeListener=void 0;_mouseListener=null;_mouseListeners={};_pasteListener=void 0;_keyListeners={};yogaNode;_positionType="relative";_overflow="visible";_position={};_opacity=1;_flexShrink=1;renderableMapById=new Map;_childrenInLayoutOrder=[];_childrenInZIndexOrder=[];needsZIndexSort=!1;parent=null;childrenPrimarySortDirty=!0;childrenSortedByPrimaryAxis=[];_shouldUpdateBefore=new Set;_lastLayoutFrame=-1;onLifecyclePass=null;renderBefore;renderAfter;constructor(ctx,options){super(options);if(this._ctx=ctx,Renderable.renderablesByNumber.set(this.num,this),validateOptions(this.id,options),this.renderBefore=options.renderBefore,this.renderAfter=options.renderAfter,this._width=options.width??"auto",this._height=options.height??"auto",typeof this._width==="number")this._widthValue=this._width;if(typeof this._height==="number")this._heightValue=this._height;if(this._zIndex=options.zIndex??0,this._visible=options.visible!==!1,this.buffered=options.buffered??!1,this._live=options.live??!1,this._liveCount=this._live&&this._visible?1:0,this._opacity=options.opacity!==void 0?Math.max(0,Math.min(1,options.opacity)):1,this.yogaNode=src_default2.Node.create(yogaConfig),this.yogaNode.setDisplay(this._visible?Display.Flex:Display.None),this.setupYogaProperties(options),this.applyEventOptions(options),this.buffered)this.createFrameBuffer()}get id(){return this._id}set id(value){if(this.parent)this.parent.renderableMapById.delete(this.id),this.parent.renderableMapById.set(value,this);super.id=value}get focusable(){return this._focusable}set focusable(value){this._focusable=value}get ctx(){return this._ctx}get visible(){return this._visible}get primaryAxis(){let dir=this.yogaNode.getFlexDirection();return dir===2||dir===3?"row":"column"}set visible(value){if(this._visible===value)return;let wasVisible=this._visible;if(this._visible=value,this.yogaNode.setDisplay(value?Display.Flex:Display.None),this._live){if(!wasVisible&&value)this.propagateLiveCount(1);else if(wasVisible&&!value)this.propagateLiveCount(-1)}if(this._focused)this.blur();this.requestRender()}get opacity(){return this._opacity}set opacity(value){let clamped=Math.max(0,Math.min(1,value));if(this._opacity!==clamped)this._opacity=clamped,this.requestRender()}hasSelection(){return!1}onSelectionChanged(selection2){return!1}getSelectedText(){return""}shouldStartSelection(x,y){return!1}focus(){if(this._isDestroyed||this._focused||!this._focusable)return;this._ctx.focusRenderable(this),this._focused=!0,this.requestRender(),this.keypressHandler=(key)=>{if(this._isDestroyed)return;if(this._keyListeners.down?.(key),this._isDestroyed)return;if(!key.defaultPrevented&&this.handleKeyPress)this.handleKeyPress(key)},this.pasteHandler=(event)=>{if(this._isDestroyed)return;if(this._pasteListener?.call(this,event),this._isDestroyed)return;if(!event.defaultPrevented&&this.handlePaste)this.handlePaste(event)},this.ctx._internalKeyInput.onInternal("keypress",this.keypressHandler),this.ctx._internalKeyInput.onInternal("paste",this.pasteHandler),this.propagateFocusChange(!0),this.emit("focused")}propagateFocusChange(hasFocus){let parent=this.parent;while(parent){if(parent._hasFocusedDescendant!==hasFocus)parent._hasFocusedDescendant=hasFocus,parent.markDirty();parent=parent.parent}this.requestRender()}blur(){if(!this._focused||!this._focusable)return;if(this._ctx.blurRenderable(this),this._focused=!1,this.requestRender(),this.keypressHandler)this.ctx._internalKeyInput.offInternal("keypress",this.keypressHandler),this.keypressHandler=null;if(this.pasteHandler)this.ctx._internalKeyInput.offInternal("paste",this.pasteHandler),this.pasteHandler=null;this.propagateFocusChange(!1),this.emit("blurred")}get focused(){return this._focused}get hasFocusedDescendant(){return this._hasFocusedDescendant}get live(){return this._live}get liveCount(){return this._liveCount}set live(value){if(this._live===value)return;if(this._live=value,this._visible){let delta=value?1:-1;this.propagateLiveCount(delta)}}propagateLiveCount(delta){this._liveCount+=delta,this.parent?.propagateLiveCount(delta)}findDescendantById(id){for(let child of this._childrenInLayoutOrder){if(child.id===id)return child;if(isRenderable(child)){let found=child.findDescendantById(id);if(found)return found}}return}requestRender(){this.markDirty(),this._ctx.requestRender()}get translateX(){return this._translateX}set translateX(value){if(this._translateX===value)return;this._translateX=value;let parentScreenX=this.parent?this.parent._screenX:0;if(this._screenX=parentScreenX+this._x+this._translateX,this.parent)this.parent.childrenPrimarySortDirty=!0;this.requestRender()}get translateY(){return this._translateY}set translateY(value){if(this._translateY===value)return;this._translateY=value;let parentScreenY=this.parent?this.parent._screenY:0;if(this._screenY=parentScreenY+this._y+this._translateY,this.parent)this.parent.childrenPrimarySortDirty=!0;this.requestRender()}get screenX(){return(this.parent?this.parent._screenX:0)+this._x+this._translateX}get screenY(){return(this.parent?this.parent._screenY:0)+this._y+this._translateY}get x(){if(this.parent)return this.parent.x+this._x+this._translateX;return this._x+this._translateX}set x(value){this.left=value}get top(){return this._position.top}set top(value){if(isPositionType(value)||value===void 0)this.setPosition({top:value})}get right(){return this._position.right}set right(value){if(isPositionType(value)||value===void 0)this.setPosition({right:value})}get bottom(){return this._position.bottom}set bottom(value){if(isPositionType(value)||value===void 0)this.setPosition({bottom:value})}get left(){return this._position.left}set left(value){if(isPositionType(value)||value===void 0)this.setPosition({left:value})}get y(){if(this.parent)return this.parent.y+this._y+this._translateY;return this._y+this._translateY}set y(value){this.top=value}get width(){return this._widthValue}set width(value){if(!isDimensionType(value)||this._width===value)return;if(this._width=value,this.yogaNode.setWidth(value),typeof value==="number"&&this._flexShrink===1)this._flexShrink=0,this.yogaNode.setFlexShrink(0);this.requestRender()}get height(){return this._heightValue}set height(value){if(!isDimensionType(value)||this._height===value)return;if(this._height=value,this.yogaNode.setHeight(value),typeof value==="number"&&this._flexShrink===1)this._flexShrink=0,this.yogaNode.setFlexShrink(0);this.requestRender()}get zIndex(){return this._zIndex}set zIndex(value){if(this._zIndex!==value)this._zIndex=value,this.parent?.requestZIndexSort(),this.requestRender()}requestZIndexSort(){this.needsZIndexSort=!0}ensureZIndexSorted(){if(this.needsZIndexSort)this._childrenInZIndexOrder.sort((a,b2)=>a.zIndex>b2.zIndex?1:a.zIndex<b2.zIndex?-1:0),this.needsZIndexSort=!1}getChildrenSortedByPrimaryAxis(){if(!this.childrenPrimarySortDirty&&this.childrenSortedByPrimaryAxis.length===this._childrenInLayoutOrder.length)return this.childrenSortedByPrimaryAxis;let dir=this.yogaNode.getFlexDirection(),axis=dir===2||dir===3?"x":"y",sorted=[...this._childrenInLayoutOrder];return sorted.sort((a,b2)=>{let va=axis==="y"?a.screenY:a.screenX,vb=axis==="y"?b2.screenY:b2.screenX;return va-vb}),this.childrenSortedByPrimaryAxis=sorted,this.childrenPrimarySortDirty=!1,this.childrenSortedByPrimaryAxis}setupYogaProperties(options){let node=this.yogaNode;if(isFlexBasisType(options.flexBasis))node.setFlexBasis(options.flexBasis);if(isSizeType(options.minWidth))node.setMinWidth(options.minWidth);if(isSizeType(options.minHeight))node.setMinHeight(options.minHeight);if(options.flexGrow!==void 0)node.setFlexGrow(options.flexGrow);else node.setFlexGrow(0);if(options.flexShrink!==void 0)this._flexShrink=options.flexShrink,node.setFlexShrink(options.flexShrink);else{let hasExplicitWidth=typeof options.width==="number",hasExplicitHeight=typeof options.height==="number";this._flexShrink=hasExplicitWidth||hasExplicitHeight?0:1,node.setFlexShrink(this._flexShrink)}if(node.setFlexDirection(parseFlexDirection(options.flexDirection)),node.setFlexWrap(parseWrap(options.flexWrap)),node.setAlignItems(parseAlignItems(options.alignItems)),node.setJustifyContent(parseJustify(options.justifyContent)),node.setAlignSelf(parseAlign(options.alignSelf)),isDimensionType(options.width))this._width=options.width,this.yogaNode.setWidth(options.width);if(isDimensionType(options.height))this._height=options.height,this.yogaNode.setHeight(options.height);if(this._positionType=options.position==="absolute"?"absolute":"relative",this._positionType!=="relative")node.setPositionType(parsePositionType(this._positionType));if(this._overflow=options.overflow==="hidden"?"hidden":options.overflow==="scroll"?"scroll":"visible",this._overflow!=="visible")node.setOverflow(parseOverflow(this._overflow));if(options.top!==void 0||options.right!==void 0||options.bottom!==void 0||options.left!==void 0)this._position={top:options.top,right:options.right,bottom:options.bottom,left:options.left},this.updateYogaPosition(this._position);if(isSizeType(options.maxWidth))node.setMaxWidth(options.maxWidth);if(isSizeType(options.maxHeight))node.setMaxHeight(options.maxHeight);this.setupMarginAndPadding(options)}setupMarginAndPadding(options){let node=this.yogaNode;if(isMarginType(options.margin))node.setMargin(Edge.All,options.margin);if(isMarginType(options.marginX))node.setMargin(Edge.Horizontal,options.marginX);if(isMarginType(options.marginY))node.setMargin(Edge.Vertical,options.marginY);if(isMarginType(options.marginTop))node.setMargin(Edge.Top,options.marginTop);if(isMarginType(options.marginRight))node.setMargin(Edge.Right,options.marginRight);if(isMarginType(options.marginBottom))node.setMargin(Edge.Bottom,options.marginBottom);if(isMarginType(options.marginLeft))node.setMargin(Edge.Left,options.marginLeft);if(isPaddingType(options.padding))node.setPadding(Edge.All,options.padding);if(isPaddingType(options.paddingX))node.setPadding(Edge.Horizontal,options.paddingX);if(isPaddingType(options.paddingY))node.setPadding(Edge.Vertical,options.paddingY);if(isPaddingType(options.paddingTop))node.setPadding(Edge.Top,options.paddingTop);if(isPaddingType(options.paddingRight))node.setPadding(Edge.Right,options.paddingRight);if(isPaddingType(options.paddingBottom))node.setPadding(Edge.Bottom,options.paddingBottom);if(isPaddingType(options.paddingLeft))node.setPadding(Edge.Left,options.paddingLeft)}set position(positionType){if(!isPositionTypeType(positionType)||this._positionType===positionType)return;this._positionType=positionType,this.yogaNode.setPositionType(parsePositionType(positionType)),this.requestRender()}get overflow(){return this._overflow}set overflow(overflow){if(!isOverflowType(overflow)||this._overflow===overflow)return;this._overflow=overflow,this.yogaNode.setOverflow(parseOverflow(overflow)),this.requestRender()}setPosition(position){this._position={...this._position,...position},this.updateYogaPosition(position)}updateYogaPosition(position){let node=this.yogaNode,{top,right,bottom,left}=position;if(isPositionType(top))if(top==="auto")node.setPositionAuto(Edge.Top);else node.setPosition(Edge.Top,top);if(isPositionType(right))if(right==="auto")node.setPositionAuto(Edge.Right);else node.setPosition(Edge.Right,right);if(isPositionType(bottom))if(bottom==="auto")node.setPositionAuto(Edge.Bottom);else node.setPosition(Edge.Bottom,bottom);if(isPositionType(left))if(left==="auto")node.setPositionAuto(Edge.Left);else node.setPosition(Edge.Left,left);this.requestRender()}set flexGrow(grow){if(grow==null)this.yogaNode.setFlexGrow(0);else this.yogaNode.setFlexGrow(grow);this.requestRender()}set flexShrink(shrink){let value=shrink==null?1:shrink;this._flexShrink=value,this.yogaNode.setFlexShrink(value),this.requestRender()}set flexDirection(direction){this.yogaNode.setFlexDirection(parseFlexDirection(direction)),this.requestRender()}set flexWrap(wrap){this.yogaNode.setFlexWrap(parseWrap(wrap)),this.requestRender()}set alignItems(alignItems){this.yogaNode.setAlignItems(parseAlignItems(alignItems)),this.requestRender()}set justifyContent(justifyContent){this.yogaNode.setJustifyContent(parseJustify(justifyContent)),this.requestRender()}set alignSelf(alignSelf){this.yogaNode.setAlignSelf(parseAlign(alignSelf)),this.requestRender()}set flexBasis(basis){if(isFlexBasisType(basis))this.yogaNode.setFlexBasis(basis),this.requestRender()}set minWidth(minWidth){if(isSizeType(minWidth))this.yogaNode.setMinWidth(minWidth),this.requestRender()}set maxWidth(maxWidth){if(isSizeType(maxWidth))this.yogaNode.setMaxWidth(maxWidth),this.requestRender()}set minHeight(minHeight){if(isSizeType(minHeight))this.yogaNode.setMinHeight(minHeight),this.requestRender()}set maxHeight(maxHeight){if(isSizeType(maxHeight))this.yogaNode.setMaxHeight(maxHeight),this.requestRender()}set margin(margin){if(isMarginType(margin))this.yogaNode.setMargin(Edge.All,margin),this.requestRender()}set marginX(marginX){if(isMarginType(marginX))this.yogaNode.setMargin(Edge.Horizontal,marginX),this.requestRender()}set marginY(marginY){if(isMarginType(marginY))this.yogaNode.setMargin(Edge.Vertical,marginY),this.requestRender()}set marginTop(margin){if(isMarginType(margin))this.yogaNode.setMargin(Edge.Top,margin),this.requestRender()}set marginRight(margin){if(isMarginType(margin))this.yogaNode.setMargin(Edge.Right,margin),this.requestRender()}set marginBottom(margin){if(isMarginType(margin))this.yogaNode.setMargin(Edge.Bottom,margin),this.requestRender()}set marginLeft(margin){if(isMarginType(margin))this.yogaNode.setMargin(Edge.Left,margin),this.requestRender()}set padding(padding){if(isPaddingType(padding))this.yogaNode.setPadding(Edge.All,padding),this.requestRender()}set paddingX(paddingX){if(isPaddingType(paddingX))this.yogaNode.setPadding(Edge.Horizontal,paddingX),this.requestRender()}set paddingY(paddingY){if(isPaddingType(paddingY))this.yogaNode.setPadding(Edge.Vertical,paddingY),this.requestRender()}set paddingTop(padding){if(isPaddingType(padding))this.yogaNode.setPadding(Edge.Top,padding),this.requestRender()}set paddingRight(padding){if(isPaddingType(padding))this.yogaNode.setPadding(Edge.Right,padding),this.requestRender()}set paddingBottom(padding){if(isPaddingType(padding))this.yogaNode.setPadding(Edge.Bottom,padding),this.requestRender()}set paddingLeft(padding){if(isPaddingType(padding))this.yogaNode.setPadding(Edge.Left,padding),this.requestRender()}getLayoutNode(){return this.yogaNode}updateFromLayout(){let frameId=this._ctx.frameId;if(this._lastLayoutFrame===frameId)return;this._lastLayoutFrame=frameId;let layout=this.yogaNode.getComputedLayout(),oldX=this._x,oldY=this._y,oldWidth=this._widthValue,oldHeight=this._heightValue;this._x=layout.left,this._y=layout.top;let parentScreenX=this.parent?this.parent._screenX:0,parentScreenY=this.parent?this.parent._screenY:0;this._screenX=parentScreenX+this._x+this._translateX,this._screenY=parentScreenY+this._y+this._translateY;let newWidth=Math.max(layout.width,1),newHeight=Math.max(layout.height,1),sizeChanged=oldWidth!==newWidth||oldHeight!==newHeight;if(this._widthValue=newWidth,this._heightValue=newHeight,sizeChanged)this.onLayoutResize(newWidth,newHeight);if(oldX!==this._x||oldY!==this._y){if(this.parent)this.parent.childrenPrimarySortDirty=!0}}onLayoutResize(width,height2){if(this._visible)this.handleFrameBufferResize(width,height2),this.onResize(width,height2),this.requestRender()}handleFrameBufferResize(width,height2){if(!this.buffered)return;if(width<=0||height2<=0)return;if(this.frameBuffer)this.frameBuffer.resize(width,height2);else this.createFrameBuffer()}createFrameBuffer(){let w=this.width,h=this.height;if(w<=0||h<=0)return;try{let widthMethod=this._ctx.widthMethod;this.frameBuffer=OptimizedBuffer.create(w,h,widthMethod,{respectAlpha:!0,id:`framebuffer-${this.id}`})}catch(error2){console.error(`Failed to create frame buffer for ${this.id}:`,error2),this.frameBuffer=null}}onResize(width,height2){this.onSizeChange?.(),this.emit("resize")}replaceParent(obj){if(obj.parent)obj.parent.remove(obj.id);obj.parent=this}add(obj,index){if(!obj)return-1;let renderable=maybeMakeRenderable(this._ctx,obj);if(!renderable)return-1;if(renderable.isDestroyed)return console.warn(`Renderable with id ${renderable.id} was already destroyed, skipping add`),-1;let anchorRenderable=index!==void 0?this._childrenInLayoutOrder[index]:void 0;if(anchorRenderable)return this.insertBefore(renderable,anchorRenderable);if(renderable.parent===this)this.yogaNode.removeChild(renderable.getLayoutNode()),this._childrenInLayoutOrder.splice(this._childrenInLayoutOrder.indexOf(renderable),1);else{if(this.replaceParent(renderable),this.needsZIndexSort=!0,this.renderableMapById.set(renderable.id,renderable),this._childrenInZIndexOrder.push(renderable),typeof renderable.onLifecyclePass==="function")this._ctx.registerLifecyclePass(renderable);if(renderable._liveCount>0)this.propagateLiveCount(renderable._liveCount)}let childLayoutNode=renderable.getLayoutNode(),insertedIndex=this._childrenInLayoutOrder.length;return this._childrenInLayoutOrder.push(renderable),this.yogaNode.insertChild(childLayoutNode,insertedIndex),this.childrenPrimarySortDirty=!0,this._shouldUpdateBefore.add(renderable),this.requestRender(),insertedIndex}insertBefore(obj,anchor){if(!anchor)return this.add(obj);if(!obj)return-1;let renderable=maybeMakeRenderable(this._ctx,obj);if(!renderable)return-1;if(renderable.isDestroyed)return console.warn(`Renderable with id ${renderable.id} was already destroyed, skipping insertBefore`),-1;if(!isRenderable(anchor))throw Error("Anchor must be a Renderable");if(anchor.isDestroyed)return console.warn(`Anchor with id ${anchor.id} was already destroyed, skipping insertBefore`),-1;if(!this.renderableMapById.has(anchor.id))return console.warn(`Anchor with id ${anchor.id} does not exist within the parent ${this.id}, skipping insertBefore`),-1;if(renderable===anchor||renderable.id===anchor.id)return console.warn(`Anchor is the same as the node ${renderable.id} being inserted, skipping insertBefore`),-1;if(renderable.parent===this)this.yogaNode.removeChild(renderable.getLayoutNode()),this._childrenInLayoutOrder.splice(this._childrenInLayoutOrder.indexOf(renderable),1);else{if(this.replaceParent(renderable),this.needsZIndexSort=!0,this.renderableMapById.set(renderable.id,renderable),this._childrenInZIndexOrder.push(renderable),typeof renderable.onLifecyclePass==="function")this._ctx.registerLifecyclePass(renderable);if(renderable._liveCount>0)this.propagateLiveCount(renderable._liveCount)}this.childrenPrimarySortDirty=!0;let anchorIndex=this._childrenInLayoutOrder.indexOf(anchor),insertedIndex=Math.max(0,Math.min(anchorIndex,this._childrenInLayoutOrder.length));return this._childrenInLayoutOrder.splice(insertedIndex,0,renderable),this.yogaNode.insertChild(renderable.getLayoutNode(),insertedIndex),this._shouldUpdateBefore.add(renderable),this.requestRender(),insertedIndex}getRenderable(id){return this.renderableMapById.get(id)}remove(id){if(!id)return;if(this.renderableMapById.has(id)){let obj=this.renderableMapById.get(id);if(obj){if(obj._liveCount>0)this.propagateLiveCount(-obj._liveCount);let childLayoutNode=obj.getLayoutNode();this.yogaNode.removeChild(childLayoutNode),this.requestRender(),obj.onRemove(),obj.parent=null,this._ctx.unregisterLifecyclePass(obj),this.renderableMapById.delete(id);let index=this._childrenInLayoutOrder.findIndex((obj2)=>obj2.id===id);if(index!==-1)this._childrenInLayoutOrder.splice(index,1);let zIndexIndex=this._childrenInZIndexOrder.findIndex((obj2)=>obj2.id===id);if(zIndexIndex!==-1)this._childrenInZIndexOrder.splice(zIndexIndex,1);this.childrenPrimarySortDirty=!0}}}onRemove(){}getChildren(){return[...this._childrenInLayoutOrder]}getChildrenCount(){return this._childrenInLayoutOrder.length}updateLayout(deltaTime,renderList=[]){if(!this.visible)return;if(this.onUpdate(deltaTime),this._isDestroyed)return;if(this.updateFromLayout(),this._shouldUpdateBefore.size>0){for(let child of this._shouldUpdateBefore)if(!child.isDestroyed)child.updateFromLayout();this._shouldUpdateBefore.clear()}if(this._isDestroyed)return;let shouldPushOpacity=this._opacity<1;if(shouldPushOpacity)renderList.push({action:"pushOpacity",opacity:this._opacity});renderList.push({action:"render",renderable:this}),this.ensureZIndexSorted();let shouldPushScissor=this._overflow!=="visible"&&this.width>0&&this.height>0;if(shouldPushScissor){let scissorRect=this.getScissorRect();renderList.push({action:"pushScissorRect",x:scissorRect.x,y:scissorRect.y,width:scissorRect.width,height:scissorRect.height,screenX:this._screenX,screenY:this._screenY})}if(!this._hasVisibleChildFilter())for(let child of this._childrenInZIndexOrder)child.updateLayout(deltaTime,renderList);else{for(let child of this._childrenInZIndexOrder){if(child.isDestroyed)continue;child.updateFromLayout()}let visibleChildren=this._getVisibleChildren(),visibleChildSet=new Set(visibleChildren);for(let child of this._childrenInZIndexOrder){if(!visibleChildSet.has(child.num))continue;child.updateLayout(deltaTime,renderList)}}if(shouldPushScissor)renderList.push({action:"popScissorRect"});if(shouldPushOpacity)renderList.push({action:"popOpacity"})}render(buffer2,deltaTime){let renderBuffer=buffer2;if(this.buffered&&this.frameBuffer)renderBuffer=this.frameBuffer;if(this.renderBefore)this.renderBefore.call(this,renderBuffer,deltaTime);if(this.renderSelf(renderBuffer,deltaTime),this.renderAfter)this.renderAfter.call(this,renderBuffer,deltaTime);let screenX=this._screenX,screenY=this._screenY;if(this.markClean(),this._ctx.addToHitGrid(screenX,screenY,this.width,this.height,this.num),this.buffered&&this.frameBuffer)buffer2.drawFrameBuffer(screenX,screenY,this.frameBuffer)}_hasVisibleChildFilter(){return this._getVisibleChildren!==Renderable.prototype._getVisibleChildren}_getVisibleChildren(){return this._childrenInZIndexOrder.map((child)=>child.num)}onUpdate(deltaTime){}getScissorRect(){return{x:this.buffered?0:this._screenX,y:this.buffered?0:this._screenY,width:this.width,height:this.height}}renderSelf(buffer2,deltaTime){}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)return;if(this._isDestroyed=!0,this.parent)this.parent.remove(this.id);if(this.frameBuffer)this.frameBuffer.destroy(),this.frameBuffer=null;for(let child of this._childrenInLayoutOrder)this.remove(child.id);this._childrenInLayoutOrder=[],this.renderableMapById.clear(),Renderable.renderablesByNumber.delete(this.num),this.blur(),this.removeAllListeners(),this.destroySelf();try{this.yogaNode.free()}catch(e){}}destroyRecursively(){let children=[...this._childrenInLayoutOrder];for(let child of children)child.destroyRecursively();this.destroy()}destroySelf(){}processMouseEvent(event){if(this._mouseListener?.call(this,event),this._mouseListeners[event.type]?.call(this,event),this.onMouseEvent(event),this.parent&&!event.propagationStopped)this.parent.processMouseEvent(event)}onMouseEvent(event){}set onMouse(handler){if(handler)this._mouseListener=handler;else this._mouseListener=null}set onMouseDown(handler){if(handler)this._mouseListeners.down=handler;else delete this._mouseListeners.down}set onMouseUp(handler){if(handler)this._mouseListeners.up=handler;else delete this._mouseListeners.up}set onMouseMove(handler){if(handler)this._mouseListeners.move=handler;else delete this._mouseListeners.move}set onMouseDrag(handler){if(handler)this._mouseListeners.drag=handler;else delete this._mouseListeners.drag}set onMouseDragEnd(handler){if(handler)this._mouseListeners["drag-end"]=handler;else delete this._mouseListeners["drag-end"]}set onMouseDrop(handler){if(handler)this._mouseListeners.drop=handler;else delete this._mouseListeners.drop}set onMouseOver(handler){if(handler)this._mouseListeners.over=handler;else delete this._mouseListeners.over}set onMouseOut(handler){if(handler)this._mouseListeners.out=handler;else delete this._mouseListeners.out}set onMouseScroll(handler){if(handler)this._mouseListeners.scroll=handler;else delete this._mouseListeners.scroll}set onPaste(handler){this._pasteListener=handler}get onPaste(){return this._pasteListener}set onKeyDown(handler){if(handler)this._keyListeners.down=handler;else delete this._keyListeners.down}get onKeyDown(){return this._keyListeners.down}set onSizeChange(handler){this._sizeChangeListener=handler}get onSizeChange(){return this._sizeChangeListener}applyEventOptions(options){this.onMouse=options.onMouse,this.onMouseDown=options.onMouseDown,this.onMouseUp=options.onMouseUp,this.onMouseMove=options.onMouseMove,this.onMouseDrag=options.onMouseDrag,this.onMouseDragEnd=options.onMouseDragEnd,this.onMouseDrop=options.onMouseDrop,this.onMouseOver=options.onMouseOver,this.onMouseOut=options.onMouseOut,this.onMouseScroll=options.onMouseScroll,this.onPaste=options.onPaste,this.onKeyDown=options.onKeyDown,this.onSizeChange=options.onSizeChange}};RootRenderable=class RootRenderable extends Renderable{renderList=[];constructor(ctx){super(ctx,{id:"__root__",zIndex:0,visible:!0,width:ctx.width,height:ctx.height,enableLayout:!0});if(this.yogaNode)this.yogaNode.free();this.yogaNode=src_default2.Node.create(yogaConfig),this.yogaNode.setWidth(ctx.width),this.yogaNode.setHeight(ctx.height),this.yogaNode.setFlexDirection(FlexDirection.Column),this.calculateLayout()}render(buffer2,deltaTime){if(!this.visible)return;for(let renderable of this._ctx.getLifecyclePasses())renderable.onLifecyclePass?.call(renderable);if(this.yogaNode.isDirty())this.calculateLayout();this.renderList.length=0,this.updateLayout(deltaTime,this.renderList),this._ctx.clearHitGridScissorRects();for(let i2=1;i2<this.renderList.length;i2++){let command=this.renderList[i2];switch(command.action){case"render":if(!command.renderable.isDestroyed)command.renderable.render(buffer2,deltaTime);break;case"pushScissorRect":buffer2.pushScissorRect(command.x,command.y,command.width,command.height),this._ctx.pushHitGridScissorRect(command.screenX,command.screenY,command.width,command.height);break;case"popScissorRect":buffer2.popScissorRect(),this._ctx.popHitGridScissorRect();break;case"pushOpacity":buffer2.pushOpacity(command.opacity);break;case"popOpacity":buffer2.popOpacity();break}}}propagateLiveCount(delta){let oldCount=this._liveCount;if(this._liveCount+=delta,oldCount===0&&this._liveCount>0)this._ctx.requestLive();else if(oldCount>0&&this._liveCount===0)this._ctx.dropLive()}calculateLayout(){this.yogaNode.calculateLayout(this.width,this.height,Direction.LTR),this.emit("layout-changed")}resize(width,height2){this.width=width,this.height=height2,this.emit("resized",{width,height:height2})}};BrandedVNode=Symbol.for("@opentui/core/VNode");EditBuffer=class EditBuffer extends EventEmitter6{static registry=new Map;static nativeEventsSubscribed=!1;lib;bufferPtr;textBufferPtr;id;_destroyed=!1;_textBytes=[];_singleTextBytes=null;_singleTextMemId=null;_syntaxStyle;constructor(lib,ptr5){super();this.lib=lib,this.bufferPtr=ptr5,this.textBufferPtr=lib.editBufferGetTextBuffer(ptr5),this.id=lib.editBufferGetId(ptr5),EditBuffer.registry.set(this.id,this),EditBuffer.subscribeToNativeEvents(lib)}static create(widthMethod){let lib=resolveRenderLib(),ptr5=lib.createEditBuffer(widthMethod);return new EditBuffer(lib,ptr5)}static subscribeToNativeEvents(lib){if(EditBuffer.nativeEventsSubscribed)return;EditBuffer.nativeEventsSubscribed=!0,lib.onAnyNativeEvent((name,data)=>{let buffer2=new Uint16Array(data);if(name.startsWith("eb_")&&buffer2.length>=1){let id=buffer2[0],instance=EditBuffer.registry.get(id);if(instance){let eventName=name.slice(3),eventData=data.slice(2);instance.emit(eventName,eventData)}}})}guard(){if(this._destroyed)throw Error("EditBuffer is destroyed")}get ptr(){return this.guard(),this.bufferPtr}setText(text){this.guard();let textBytes=this.lib.encoder.encode(text);if(this._singleTextMemId!==null)this.lib.textBufferReplaceMemBuffer(this.textBufferPtr,this._singleTextMemId,textBytes,!1);else this._singleTextMemId=this.lib.textBufferRegisterMemBuffer(this.textBufferPtr,textBytes,!1);this._singleTextBytes=textBytes,this.lib.editBufferSetTextFromMem(this.bufferPtr,this._singleTextMemId)}setTextOwned(text){this.guard();let textBytes=this.lib.encoder.encode(text);this.lib.editBufferSetText(this.bufferPtr,textBytes)}replaceText(text){this.guard();let textBytes=this.lib.encoder.encode(text);this._textBytes.push(textBytes);let memId=this.lib.textBufferRegisterMemBuffer(this.textBufferPtr,textBytes,!1);this.lib.editBufferReplaceTextFromMem(this.bufferPtr,memId)}replaceTextOwned(text){this.guard();let textBytes=this.lib.encoder.encode(text);this.lib.editBufferReplaceText(this.bufferPtr,textBytes)}getLineCount(){return this.guard(),this.lib.textBufferGetLineCount(this.textBufferPtr)}getText(){this.guard();let maxSize=1048576,textBytes=this.lib.editBufferGetText(this.bufferPtr,maxSize);if(!textBytes)return"";return this.lib.decoder.decode(textBytes)}insertChar(char){this.guard(),this.lib.editBufferInsertChar(this.bufferPtr,char)}insertText(text){this.guard(),this.lib.editBufferInsertText(this.bufferPtr,text)}deleteChar(){this.guard(),this.lib.editBufferDeleteChar(this.bufferPtr)}deleteCharBackward(){this.guard(),this.lib.editBufferDeleteCharBackward(this.bufferPtr)}deleteRange(startLine,startCol,endLine,endCol){this.guard(),this.lib.editBufferDeleteRange(this.bufferPtr,startLine,startCol,endLine,endCol)}newLine(){this.guard(),this.lib.editBufferNewLine(this.bufferPtr)}deleteLine(){this.guard(),this.lib.editBufferDeleteLine(this.bufferPtr)}moveCursorLeft(){this.guard(),this.lib.editBufferMoveCursorLeft(this.bufferPtr)}moveCursorRight(){this.guard(),this.lib.editBufferMoveCursorRight(this.bufferPtr)}moveCursorUp(){this.guard(),this.lib.editBufferMoveCursorUp(this.bufferPtr)}moveCursorDown(){this.guard(),this.lib.editBufferMoveCursorDown(this.bufferPtr)}gotoLine(line){this.guard(),this.lib.editBufferGotoLine(this.bufferPtr,line)}setCursor(line,col){this.guard(),this.lib.editBufferSetCursor(this.bufferPtr,line,col)}setCursorToLineCol(line,col){this.guard(),this.lib.editBufferSetCursorToLineCol(this.bufferPtr,line,col)}setCursorByOffset(offset){this.guard(),this.lib.editBufferSetCursorByOffset(this.bufferPtr,offset)}getCursorPosition(){return this.guard(),this.lib.editBufferGetCursorPosition(this.bufferPtr)}getNextWordBoundary(){this.guard();let boundary=this.lib.editBufferGetNextWordBoundary(this.bufferPtr);return{row:boundary.row,col:boundary.col,offset:boundary.offset}}getPrevWordBoundary(){this.guard();let boundary=this.lib.editBufferGetPrevWordBoundary(this.bufferPtr);return{row:boundary.row,col:boundary.col,offset:boundary.offset}}getEOL(){this.guard();let boundary=this.lib.editBufferGetEOL(this.bufferPtr);return{row:boundary.row,col:boundary.col,offset:boundary.offset}}offsetToPosition(offset){this.guard();let result2=this.lib.editBufferOffsetToPosition(this.bufferPtr,offset);if(!result2)return null;return{row:result2.row,col:result2.col}}positionToOffset(row,col){return this.guard(),this.lib.editBufferPositionToOffset(this.bufferPtr,row,col)}getLineStartOffset(row){return this.guard(),this.lib.editBufferGetLineStartOffset(this.bufferPtr,row)}getTextRange(startOffset,endOffset){if(this.guard(),startOffset>=endOffset)return"";let maxSize=1048576,textBytes=this.lib.editBufferGetTextRange(this.bufferPtr,startOffset,endOffset,maxSize);if(!textBytes)return"";return this.lib.decoder.decode(textBytes)}getTextRangeByCoords(startRow,startCol,endRow,endCol){this.guard();let maxSize=1048576,textBytes=this.lib.editBufferGetTextRangeByCoords(this.bufferPtr,startRow,startCol,endRow,endCol,maxSize);if(!textBytes)return"";return this.lib.decoder.decode(textBytes)}debugLogRope(){this.guard(),this.lib.editBufferDebugLogRope(this.bufferPtr)}undo(){this.guard();let maxSize=256,metaBytes=this.lib.editBufferUndo(this.bufferPtr,maxSize);if(!metaBytes)return null;return this.lib.decoder.decode(metaBytes)}redo(){this.guard();let maxSize=256,metaBytes=this.lib.editBufferRedo(this.bufferPtr,maxSize);if(!metaBytes)return null;return this.lib.decoder.decode(metaBytes)}canUndo(){return this.guard(),this.lib.editBufferCanUndo(this.bufferPtr)}canRedo(){return this.guard(),this.lib.editBufferCanRedo(this.bufferPtr)}clearHistory(){this.guard(),this.lib.editBufferClearHistory(this.bufferPtr)}setDefaultFg(fg2){this.guard(),this.lib.textBufferSetDefaultFg(this.textBufferPtr,fg2)}setDefaultBg(bg2){this.guard(),this.lib.textBufferSetDefaultBg(this.textBufferPtr,bg2)}setDefaultAttributes(attributes){this.guard(),this.lib.textBufferSetDefaultAttributes(this.textBufferPtr,attributes)}resetDefaults(){this.guard(),this.lib.textBufferResetDefaults(this.textBufferPtr)}setSyntaxStyle(style){this.guard(),this._syntaxStyle=style??void 0,this.lib.textBufferSetSyntaxStyle(this.textBufferPtr,style?.ptr??null)}getSyntaxStyle(){return this.guard(),this._syntaxStyle??null}addHighlight(lineIdx,highlight){this.guard(),this.lib.textBufferAddHighlight(this.textBufferPtr,lineIdx,highlight)}addHighlightByCharRange(highlight){this.guard(),this.lib.textBufferAddHighlightByCharRange(this.textBufferPtr,highlight)}removeHighlightsByRef(hlRef){this.guard(),this.lib.textBufferRemoveHighlightsByRef(this.textBufferPtr,hlRef)}clearLineHighlights(lineIdx){this.guard(),this.lib.textBufferClearLineHighlights(this.textBufferPtr,lineIdx)}clearAllHighlights(){this.guard(),this.lib.textBufferClearAllHighlights(this.textBufferPtr)}getLineHighlights(lineIdx){return this.guard(),this.lib.textBufferGetLineHighlights(this.textBufferPtr,lineIdx)}clear(){this.guard(),this.lib.editBufferClear(this.bufferPtr)}destroy(){if(this._destroyed)return;this._destroyed=!0,EditBuffer.registry.delete(this.id),this.lib.destroyEditBuffer(this.bufferPtr)}};BoxRenderable=class BoxRenderable extends Renderable{_backgroundColor;_border;_borderStyle;_borderColor;_focusedBorderColor;_customBorderCharsObj;_customBorderChars;borderSides;shouldFill;_title;_titleAlignment;_bottomTitle;_bottomTitleAlignment;_defaultOptions={backgroundColor:"transparent",borderStyle:"single",border:!1,borderColor:"#FFFFFF",shouldFill:!0,titleAlignment:"left",bottomTitleAlignment:"left",focusedBorderColor:"#00AAFF"};constructor(ctx,options){super(ctx,options);if(options.focusable===!0)this._focusable=!0;if(this._backgroundColor=parseColor(options.backgroundColor||this._defaultOptions.backgroundColor),this._border=options.border??this._defaultOptions.border,!options.border&&(options.borderStyle||options.borderColor||options.focusedBorderColor||options.customBorderChars))this._border=!0;if(this._borderStyle=parseBorderStyle(options.borderStyle,this._defaultOptions.borderStyle),this._borderColor=parseColor(options.borderColor||this._defaultOptions.borderColor),this._focusedBorderColor=parseColor(options.focusedBorderColor||this._defaultOptions.focusedBorderColor),this._customBorderCharsObj=options.customBorderChars,this._customBorderChars=this._customBorderCharsObj?borderCharsToArray(this._customBorderCharsObj):void 0,this.borderSides=getBorderSides(this._border),this.shouldFill=options.shouldFill??this._defaultOptions.shouldFill,this._title=options.title,this._titleAlignment=options.titleAlignment||this._defaultOptions.titleAlignment,this._bottomTitle=options.bottomTitle,this._bottomTitleAlignment=options.bottomTitleAlignment||this._defaultOptions.bottomTitleAlignment,this.applyYogaBorders(),options.gap!==void 0||options.rowGap!==void 0||options.columnGap!==void 0)this.applyYogaGap(options)}initializeBorder(){if(this._border===!1)this._border=!0,this.borderSides=getBorderSides(this._border),this.applyYogaBorders()}get customBorderChars(){return this._customBorderCharsObj}set customBorderChars(value){this._customBorderCharsObj=value,this._customBorderChars=value?borderCharsToArray(value):void 0,this.requestRender()}get backgroundColor(){return this._backgroundColor}set backgroundColor(value){let newColor=parseColor(value??this._defaultOptions.backgroundColor);if(this._backgroundColor!==newColor)this._backgroundColor=newColor,this.requestRender()}get border(){return this._border}set border(value){if(this._border!==value)this._border=value,this.borderSides=getBorderSides(value),this.applyYogaBorders(),this.requestRender()}get borderStyle(){return this._borderStyle}set borderStyle(value){let _value=parseBorderStyle(value,this._defaultOptions.borderStyle);if(this._borderStyle!==_value||!this._border)this._borderStyle=_value,this._customBorderChars=void 0,this.initializeBorder(),this.requestRender()}get borderColor(){return this._borderColor}set borderColor(value){let newColor=parseColor(value??this._defaultOptions.borderColor);if(this._borderColor!==newColor)this._borderColor=newColor,this.initializeBorder(),this.requestRender()}get focusedBorderColor(){return this._focusedBorderColor}set focusedBorderColor(value){let newColor=parseColor(value??this._defaultOptions.focusedBorderColor);if(this._focusedBorderColor!==newColor){if(this._focusedBorderColor=newColor,this.initializeBorder(),this._focused)this.requestRender()}}get title(){return this._title}set title(value){if(this._title!==value)this._title=value,this.requestRender()}get titleAlignment(){return this._titleAlignment}set titleAlignment(value){if(this._titleAlignment!==value)this._titleAlignment=value,this.requestRender()}get bottomTitle(){return this._bottomTitle}set bottomTitle(value){if(this._bottomTitle!==value)this._bottomTitle=value,this.requestRender()}get bottomTitleAlignment(){return this._bottomTitleAlignment}set bottomTitleAlignment(value){if(this._bottomTitleAlignment!==value)this._bottomTitleAlignment=value,this.requestRender()}renderSelf(buffer2){let hasBorder=this.borderSides.top||this.borderSides.right||this.borderSides.bottom||this.borderSides.left,hasVisibleFill=this.shouldFill&&this._backgroundColor.a>0;if(!hasBorder&&!hasVisibleFill)return;let currentBorderColor=this._focusable&&(this._focused||this._hasFocusedDescendant)?this._focusedBorderColor:this._borderColor,screenX=this._screenX,screenY=this._screenY;buffer2.drawBox({x:screenX,y:screenY,width:this.width,height:this.height,borderStyle:this._borderStyle,customBorderChars:this._customBorderChars,border:this._border,borderColor:currentBorderColor,backgroundColor:this._backgroundColor,shouldFill:this.shouldFill,title:this._title,titleAlignment:this._titleAlignment,bottomTitle:this._bottomTitle,bottomTitleAlignment:this._bottomTitleAlignment})}getScissorRect(){let baseRect=super.getScissorRect();if(!this.borderSides.top&&!this.borderSides.right&&!this.borderSides.bottom&&!this.borderSides.left)return baseRect;let leftInset=this.borderSides.left?1:0,rightInset=this.borderSides.right?1:0,topInset=this.borderSides.top?1:0,bottomInset=this.borderSides.bottom?1:0;return{x:baseRect.x+leftInset,y:baseRect.y+topInset,width:Math.max(0,baseRect.width-leftInset-rightInset),height:Math.max(0,baseRect.height-topInset-bottomInset)}}applyYogaBorders(){let node=this.yogaNode;node.setBorder(Edge.Left,this.borderSides.left?1:0),node.setBorder(Edge.Right,this.borderSides.right?1:0),node.setBorder(Edge.Top,this.borderSides.top?1:0),node.setBorder(Edge.Bottom,this.borderSides.bottom?1:0),this.requestRender()}applyYogaGap(options){let node=this.yogaNode;if(isGapType(options.gap))node.setGap(Gutter.All,options.gap);if(isGapType(options.rowGap))node.setGap(Gutter.Row,options.rowGap);if(isGapType(options.columnGap))node.setGap(Gutter.Column,options.columnGap)}set gap(gap){if(isGapType(gap))this.yogaNode.setGap(Gutter.All,gap),this.requestRender()}set rowGap(rowGap){if(isGapType(rowGap))this.yogaNode.setGap(Gutter.Row,rowGap),this.requestRender()}set columnGap(columnGap){if(isGapType(columnGap))this.yogaNode.setGap(Gutter.Column,columnGap),this.requestRender()}};TextBufferRenderable=class TextBufferRenderable extends Renderable{selectable=!0;_defaultFg;_defaultBg;_defaultAttributes;_selectionBg;_selectionFg;_wrapMode="word";lastLocalSelection=null;_tabIndicator;_tabIndicatorColor;_scrollX=0;_scrollY=0;_truncate=!1;_firstLineOffset=0;textBuffer;textBufferView;_textBufferSyntaxStyle;_defaultOptions={fg:RGBA.fromValues(1,1,1,1),bg:RGBA.fromValues(0,0,0,0),selectionBg:void 0,selectionFg:void 0,selectable:!0,attributes:0,wrapMode:"word",tabIndicator:void 0,tabIndicatorColor:void 0,truncate:!1};constructor(ctx,options){super(ctx,options);if(this._defaultFg=parseColor(options.fg??this._defaultOptions.fg),this._defaultBg=parseColor(options.bg??this._defaultOptions.bg),this._defaultAttributes=options.attributes??this._defaultOptions.attributes,this._selectionBg=options.selectionBg?parseColor(options.selectionBg):this._defaultOptions.selectionBg,this._selectionFg=options.selectionFg?parseColor(options.selectionFg):this._defaultOptions.selectionFg,this.selectable=options.selectable??this._defaultOptions.selectable,this._wrapMode=options.wrapMode??this._defaultOptions.wrapMode,this._tabIndicator=options.tabIndicator??this._defaultOptions.tabIndicator,this._tabIndicatorColor=options.tabIndicatorColor?parseColor(options.tabIndicatorColor):this._defaultOptions.tabIndicatorColor,this._truncate=options.truncate??this._defaultOptions.truncate,this.textBuffer=TextBuffer.create(this._ctx.widthMethod),this.textBufferView=TextBufferView.create(this.textBuffer),this._firstLineOffset=ctx.claimFirstLineOffset?.(this)??0,this._textBufferSyntaxStyle=SyntaxStyle.create(),this.textBuffer.setSyntaxStyle(this._textBufferSyntaxStyle),this.textBufferView.setWrapMode(this._wrapMode),this.textBufferView.setFirstLineOffset(this._firstLineOffset),this.setupMeasureFunc(),this.textBuffer.setDefaultFg(this._defaultFg),this.textBuffer.setDefaultBg(this._defaultBg),this.textBuffer.setDefaultAttributes(this._defaultAttributes),this._tabIndicator!==void 0)this.textBufferView.setTabIndicator(this._tabIndicator);if(this._tabIndicatorColor!==void 0)this.textBufferView.setTabIndicatorColor(this._tabIndicatorColor);if(this._wrapMode!=="none"&&this.width>0)this.textBufferView.setWrapWidth(this.width);if(this.width>0&&this.height>0)this.textBufferView.setViewport(this._scrollX,this._scrollY,this.width,this.height);this.textBufferView.setTruncate(this._truncate),this.updateTextInfo()}onMouseEvent(event){if(event.type==="scroll")this.handleScroll(event)}handleScroll(event){if(!event.scroll)return;let{direction,delta}=event.scroll;if(direction==="up")this.scrollY-=delta;else if(direction==="down")this.scrollY+=delta;if(this._wrapMode==="none"){if(direction==="left")this.scrollX-=delta;else if(direction==="right")this.scrollX+=delta}}get lineInfo(){return this.textBufferView.logicalLineInfo}get lineCount(){return this.textBuffer.getLineCount()}get virtualLineCount(){return this.textBufferView.getVirtualLineCount()}get scrollY(){return this._scrollY}set scrollY(value){let maxScrollY=Math.max(0,this.scrollHeight-this.height),clamped=Math.max(0,Math.min(value,maxScrollY));if(this._scrollY!==clamped)this._scrollY=clamped,this.updateViewportOffset(),this.requestRender()}get scrollX(){return this._scrollX}set scrollX(value){let maxScrollX=Math.max(0,this.scrollWidth-this.width),clamped=Math.max(0,Math.min(value,maxScrollX));if(this._scrollX!==clamped)this._scrollX=clamped,this.updateViewportOffset(),this.requestRender()}get scrollWidth(){return this.lineInfo.lineWidthColsMax}get scrollHeight(){return this.lineInfo.lineStartCols.length}get maxScrollY(){return Math.max(0,this.scrollHeight-this.height)}get maxScrollX(){return Math.max(0,this.scrollWidth-this.width)}updateViewportOffset(){if(this.width>0&&this.height>0)this.textBufferView.setViewport(this._scrollX,this._scrollY,this.width,this.height)}get plainText(){return this.textBuffer.getPlainText()}get textLength(){return this.textBuffer.length}get fg(){return this._defaultFg}set fg(value){let newColor=parseColor(value??this._defaultOptions.fg);if(this._defaultFg!==newColor)this._defaultFg=newColor,this.textBuffer.setDefaultFg(this._defaultFg),this.onFgChanged(newColor),this.requestRender()}get selectionBg(){return this._selectionBg}set selectionBg(value){let newColor=value?parseColor(value):this._defaultOptions.selectionBg;if(this._selectionBg!==newColor){if(this._selectionBg=newColor,this.lastLocalSelection)this.updateLocalSelection(this.lastLocalSelection);this.requestRender()}}get selectionFg(){return this._selectionFg}set selectionFg(value){let newColor=value?parseColor(value):this._defaultOptions.selectionFg;if(this._selectionFg!==newColor){if(this._selectionFg=newColor,this.lastLocalSelection)this.updateLocalSelection(this.lastLocalSelection);this.requestRender()}}get bg(){return this._defaultBg}set bg(value){let newColor=parseColor(value??this._defaultOptions.bg);if(this._defaultBg!==newColor)this._defaultBg=newColor,this.textBuffer.setDefaultBg(this._defaultBg),this.onBgChanged(newColor),this.requestRender()}get attributes(){return this._defaultAttributes}set attributes(value){if(this._defaultAttributes!==value)this._defaultAttributes=value,this.textBuffer.setDefaultAttributes(this._defaultAttributes),this.onAttributesChanged(value),this.requestRender()}get wrapMode(){return this._wrapMode}set wrapMode(value){if(this._wrapMode!==value){if(this._wrapMode=value,this.textBufferView.setWrapMode(this._wrapMode),value!=="none"&&this.width>0)this.textBufferView.setWrapWidth(this.width);this.yogaNode.markDirty(),this.requestRender()}}get tabIndicator(){return this._tabIndicator}set tabIndicator(value){if(this._tabIndicator!==value){if(this._tabIndicator=value,value!==void 0)this.textBufferView.setTabIndicator(value);this.requestRender()}}get tabIndicatorColor(){return this._tabIndicatorColor}set tabIndicatorColor(value){let newColor=value?parseColor(value):void 0;if(this._tabIndicatorColor!==newColor){if(this._tabIndicatorColor=newColor,newColor!==void 0)this.textBufferView.setTabIndicatorColor(newColor);this.requestRender()}}get truncate(){return this._truncate}set truncate(value){if(this._truncate!==value)this._truncate=value,this.textBufferView.setTruncate(value),this.requestRender()}onResize(width,height2){this.textBufferView.setViewport(this._scrollX,this._scrollY,width,height2),this.yogaNode.markDirty(),this.requestRender(),this.emit("line-info-change")}refreshLocalSelection(){if(this.lastLocalSelection)return this.updateLocalSelection(this.lastLocalSelection);return!1}updateLocalSelection(localSelection){if(!localSelection?.isActive)return this.textBufferView.resetLocalSelection(),!0;return this.textBufferView.setLocalSelection(localSelection.anchorX,localSelection.anchorY,localSelection.focusX,localSelection.focusY,this._selectionBg,this._selectionFg)}updateTextInfo(){if(this.lastLocalSelection)this.updateLocalSelection(this.lastLocalSelection);this.yogaNode.markDirty(),this.requestRender(),this.emit("line-info-change")}setupMeasureFunc(){let measureFunc=(width,widthMode,height2,heightMode)=>{let effectiveWidth;if(widthMode===MeasureMode.Undefined||isNaN(width))effectiveWidth=0;else effectiveWidth=width;let effectiveHeight=isNaN(height2)?1:height2,measureResult=this.textBufferView.measureForDimensions(Math.floor(effectiveWidth),Math.floor(effectiveHeight)),measuredWidth=measureResult?Math.max(1,measureResult.widthColsMax):1,measuredHeight=measureResult?Math.max(1,measureResult.lineCount):1;if(widthMode===MeasureMode.AtMost&&this._positionType!=="absolute")return{width:Math.min(effectiveWidth,measuredWidth),height:Math.min(effectiveHeight,measuredHeight)};return{width:measuredWidth,height:measuredHeight}};this.yogaNode.setMeasureFunc(measureFunc)}shouldStartSelection(x,y){if(!this.selectable)return!1;let localX=x-this.x,localY=y-this.y;return localX>=0&&localX<this.width&&localY>=0&&localY<this.height}onSelectionChanged(selection2){let localSelection=convertGlobalToLocalSelection(selection2,this.x,this.y);this.lastLocalSelection=localSelection;let changed;if(!localSelection?.isActive)this.textBufferView.resetLocalSelection(),changed=!0;else if(selection2?.isStart)changed=this.textBufferView.setLocalSelection(localSelection.anchorX,localSelection.anchorY,localSelection.focusX,localSelection.focusY,this._selectionBg,this._selectionFg);else changed=this.textBufferView.updateLocalSelection(localSelection.anchorX,localSelection.anchorY,localSelection.focusX,localSelection.focusY,this._selectionBg,this._selectionFg);if(changed)this.requestRender();return this.hasSelection()}getSelectedText(){return this.textBufferView.getSelectedText()}hasSelection(){return this.textBufferView.hasSelection()}getSelection(){return this.textBufferView.getSelection()}render(buffer2,deltaTime){if(!this.visible)return;let screenX=this._screenX,screenY=this._screenY;if(this.markClean(),this._ctx.addToHitGrid(screenX,screenY,this.width,this.height,this.num),this.renderSelf(buffer2),this.buffered&&this.frameBuffer)buffer2.drawFrameBuffer(screenX,screenY,this.frameBuffer)}renderSelf(buffer2){if(this.textBuffer.ptr)buffer2.drawTextBuffer(this.textBufferView,this._screenX,this._screenY)}destroy(){if(this.isDestroyed)return;this.textBuffer.setSyntaxStyle(null),this._textBufferSyntaxStyle.destroy(),this.textBufferView.destroy(),this.textBuffer.destroy(),super.destroy()}onFgChanged(newColor){}onBgChanged(newColor){}onAttributesChanged(newAttributes){}};CodeRenderable=class CodeRenderable extends TextBufferRenderable{_content;_filetype;_syntaxStyle;_isHighlighting=!1;_treeSitterClient;_highlightsDirty=!1;_highlightSnapshotId=0;_conceal;_drawUnstyledText;_shouldRenderTextBuffer=!0;_streaming;_hadInitialContent=!1;_lastHighlights=[];_onHighlight;_onChunks;_highlightingPromise=Promise.resolve();_contentDefaultOptions={content:"",conceal:!0,drawUnstyledText:!0,streaming:!1};constructor(ctx,options){super(ctx,options);if(this._content=options.content??this._contentDefaultOptions.content,this._filetype=options.filetype,this._syntaxStyle=options.syntaxStyle,this._treeSitterClient=options.treeSitterClient??getTreeSitterClient(),this._conceal=options.conceal??this._contentDefaultOptions.conceal,this._drawUnstyledText=options.drawUnstyledText??this._contentDefaultOptions.drawUnstyledText,this._streaming=options.streaming??this._contentDefaultOptions.streaming,this._onHighlight=options.onHighlight,this._onChunks=options.onChunks,this._content.length>0)this.textBuffer.setText(this._content),this.updateTextInfo(),this._shouldRenderTextBuffer=this._drawUnstyledText||!this._filetype;this._highlightsDirty=this._content.length>0}get content(){return this._content}set content(value){if(this._content!==value){if(this._content=value,this._highlightsDirty=!0,this._highlightSnapshotId++,this._streaming&&!this._drawUnstyledText&&this._filetype){this.requestRender();return}this.textBuffer.setText(value),this.updateTextInfo()}}get filetype(){return this._filetype}set filetype(value){if(this._filetype!==value)this._filetype=value,this._highlightsDirty=!0}get syntaxStyle(){return this._syntaxStyle}set syntaxStyle(value){if(this._syntaxStyle!==value)this._syntaxStyle=value,this._highlightsDirty=!0}get conceal(){return this._conceal}set conceal(value){if(this._conceal!==value)this._conceal=value,this._highlightsDirty=!0}get drawUnstyledText(){return this._drawUnstyledText}set drawUnstyledText(value){if(this._drawUnstyledText!==value)this._drawUnstyledText=value,this._highlightsDirty=!0}get streaming(){return this._streaming}set streaming(value){if(this._streaming!==value)this._streaming=value,this._hadInitialContent=!1,this._lastHighlights=[],this._highlightsDirty=!0}get treeSitterClient(){return this._treeSitterClient}set treeSitterClient(value){if(this._treeSitterClient!==value)this._treeSitterClient=value,this._highlightsDirty=!0}get onHighlight(){return this._onHighlight}set onHighlight(value){if(this._onHighlight!==value)this._onHighlight=value,this._highlightsDirty=!0}get onChunks(){return this._onChunks}set onChunks(value){if(this._onChunks!==value)this._onChunks=value,this._highlightsDirty=!0}get isHighlighting(){return this._isHighlighting}get highlightingDone(){return this._highlightingPromise}async transformChunks(chunks,context){if(!this._onChunks)return chunks;return await this._onChunks(chunks,context)??chunks}ensureVisibleTextBeforeHighlight(){if(this.isDestroyed)return;let content=this._content;if(!this._filetype){this._shouldRenderTextBuffer=!0;return}let isInitialContent=this._streaming&&!this._hadInitialContent,shouldDrawUnstyledNow=this._streaming?isInitialContent&&this._drawUnstyledText:this._drawUnstyledText;if(this._streaming&&!isInitialContent)this._shouldRenderTextBuffer=!0;else if(shouldDrawUnstyledNow)this.textBuffer.setText(content),this._shouldRenderTextBuffer=!0;else this._shouldRenderTextBuffer=!1}async startHighlight(){let content=this._content,filetype=this._filetype,snapshotId=++this._highlightSnapshotId;if(!filetype)return;if(this._streaming&&!this._hadInitialContent)this._hadInitialContent=!0;this._isHighlighting=!0;try{let result2=await this._treeSitterClient.highlightOnce(content,filetype);if(snapshotId!==this._highlightSnapshotId)return;if(this.isDestroyed)return;let highlights=result2.highlights??[];if(this._onHighlight&&highlights.length>=0){let context={content,filetype,syntaxStyle:this._syntaxStyle},modified=await this._onHighlight(highlights,context);if(modified!==void 0)highlights=modified}if(snapshotId!==this._highlightSnapshotId)return;if(this.isDestroyed)return;if(highlights.length>0){if(this._streaming)this._lastHighlights=highlights}if(highlights.length>0||this._onChunks){let context={content,filetype,syntaxStyle:this._syntaxStyle,highlights},chunks=treeSitterToTextChunks(content,highlights,this._syntaxStyle,{enabled:this._conceal});if(chunks=await this.transformChunks(chunks,context),snapshotId!==this._highlightSnapshotId)return;if(this.isDestroyed)return;let styledText=new StyledText(chunks);this.textBuffer.setStyledText(styledText)}else this.textBuffer.setText(content);this._shouldRenderTextBuffer=!0,this._isHighlighting=!1,this._highlightsDirty=!1,this.updateTextInfo(),this.requestRender()}catch(error2){if(snapshotId!==this._highlightSnapshotId)return;if(console.warn("Code highlighting failed, falling back to plain text:",error2),this.isDestroyed)return;this.textBuffer.setText(content),this._shouldRenderTextBuffer=!0,this._isHighlighting=!1,this._highlightsDirty=!1,this.updateTextInfo(),this.requestRender()}}getLineHighlights(lineIdx){return this.textBuffer.getLineHighlights(lineIdx)}renderSelf(buffer2){if(this._highlightsDirty){if(this.isDestroyed)return;if(this._content.length===0)this._shouldRenderTextBuffer=!1,this._highlightsDirty=!1;else if(!this._filetype)this._shouldRenderTextBuffer=!0,this._highlightsDirty=!1;else this.ensureVisibleTextBeforeHighlight(),this._highlightsDirty=!1,this._highlightingPromise=this.startHighlight()}if(!this._shouldRenderTextBuffer)return;super.renderSelf(buffer2)}};BrandedTextNodeRenderable=Symbol.for("@opentui/core/TextNodeRenderable");TextNodeRenderable=class TextNodeRenderable extends BaseRenderable{[BrandedTextNodeRenderable]=!0;_fg;_bg;_attributes;_link;_children=[];parent=null;constructor(options){super(options);this._fg=options.fg?parseColor(options.fg):void 0,this._bg=options.bg?parseColor(options.bg):void 0,this._attributes=options.attributes??0,this._link=options.link}get children(){return this._children}set children(children){this._children=children,this.requestRender()}requestRender(){this.markDirty(),this.parent?.requestRender()}add(obj,index){if(typeof obj==="string"){if(index!==void 0)return this._children.splice(index,0,obj),this.requestRender(),index;let insertIndex=this._children.length;return this._children.push(obj),this.requestRender(),insertIndex}if(isTextNodeRenderable(obj)){if(index!==void 0)return this._children.splice(index,0,obj),obj.parent=this,this.requestRender(),index;let insertIndex=this._children.length;return this._children.push(obj),obj.parent=this,this.requestRender(),insertIndex}if(isStyledText(obj)){let textNodes=styledTextToTextNodes(obj);if(index!==void 0)return this._children.splice(index,0,...textNodes),textNodes.forEach((node)=>node.parent=this),this.requestRender(),index;let insertIndex=this._children.length;return this._children.push(...textNodes),textNodes.forEach((node)=>node.parent=this),this.requestRender(),insertIndex}throw Error("TextNodeRenderable only accepts strings, TextNodeRenderable instances, or StyledText instances")}replace(obj,index){if(this._children[index]=obj,typeof obj!=="string")obj.parent=this;this.requestRender()}insertBefore(child,anchorNode){if(!anchorNode||!isTextNodeRenderable(anchorNode))throw Error("Anchor must be a TextNodeRenderable");let anchorIndex=this._children.indexOf(anchorNode);if(anchorIndex===-1)throw Error("Anchor node not found in children");if(typeof child==="string")this._children.splice(anchorIndex,0,child);else if(isTextNodeRenderable(child))this._children.splice(anchorIndex,0,child),child.parent=this;else if(child instanceof StyledText){let textNodes=styledTextToTextNodes(child);this._children.splice(anchorIndex,0,...textNodes),textNodes.forEach((node)=>node.parent=this)}else throw Error("Child must be a string, TextNodeRenderable, or StyledText instance");return this.requestRender(),this}remove(id){let childIndex=this.getRenderableIndex(id);if(childIndex===-1)throw Error("Child not found in children");let child=this._children[childIndex];return this._children.splice(childIndex,1),child.parent=null,this.requestRender(),this}clear(){this._children=[],this.requestRender()}mergeStyles(parentStyle){return{fg:this._fg??parentStyle.fg,bg:this._bg??parentStyle.bg,attributes:this._attributes|parentStyle.attributes,link:this._link??parentStyle.link}}gatherWithInheritedStyle(parentStyle={fg:void 0,bg:void 0,attributes:0}){let currentStyle=this.mergeStyles(parentStyle),chunks=[];for(let child of this._children)if(typeof child==="string")chunks.push({__isChunk:!0,text:child,fg:currentStyle.fg,bg:currentStyle.bg,attributes:currentStyle.attributes,link:currentStyle.link});else{let childChunks=child.gatherWithInheritedStyle(currentStyle);chunks.push(...childChunks)}return this.markClean(),chunks}static fromString(text,options={}){let node=new TextNodeRenderable(options);return node.add(text),node}static fromNodes(nodes,options={}){let node=new TextNodeRenderable(options);for(let childNode of nodes)node.add(childNode);return node}toChunks(parentStyle={fg:void 0,bg:void 0,attributes:0}){return this.gatherWithInheritedStyle(parentStyle)}getChildren(){return this._children.filter((child)=>typeof child!=="string")}getChildrenCount(){return this._children.length}getRenderable(id){return this._children.find((child)=>typeof child!=="string"&&child.id===id)}getRenderableIndex(id){return this._children.findIndex((child)=>isTextNodeRenderable(child)&&child.id===id)}get fg(){return this._fg}set fg(fg2){if(!fg2){this._fg=void 0,this.requestRender();return}this._fg=parseColor(fg2),this.requestRender()}set bg(bg2){if(!bg2){this._bg=void 0,this.requestRender();return}this._bg=parseColor(bg2),this.requestRender()}get bg(){return this._bg}set attributes(attributes){this._attributes=attributes,this.requestRender()}get attributes(){return this._attributes}set link(link2){this._link=link2,this.requestRender()}get link(){return this._link}findDescendantById(id){return}};RootTextNodeRenderable=class RootTextNodeRenderable extends TextNodeRenderable{ctx;textParent;constructor(ctx,options,textParent){super(options);this.ctx=ctx,this.textParent=textParent}requestRender(){this.markDirty(),this.ctx.requestRender()}};TextRenderable=class TextRenderable extends TextBufferRenderable{_text;_hasManualStyledText=!1;rootTextNode;_contentDefaultOptions={content:""};constructor(ctx,options){super(ctx,options);let content=options.content??this._contentDefaultOptions.content,styledText=typeof content==="string"?stringToStyledText(content):content;this._text=styledText,this._hasManualStyledText=options.content!==void 0&&content!=="",this.rootTextNode=new RootTextNodeRenderable(ctx,{id:`${this.id}-root`,fg:this._defaultFg,bg:this._defaultBg,attributes:this._defaultAttributes},this),this.updateTextBuffer(styledText)}updateTextBuffer(styledText){this.textBuffer.setStyledText(styledText),this.clearChunks(styledText)}clearChunks(styledText){}get content(){return this._text}get chunks(){return this._text.chunks}get textNode(){return this.rootTextNode}set content(value){this._hasManualStyledText=!0;let styledText=typeof value==="string"?stringToStyledText(value):value;if(this._text!==styledText)this._text=styledText,this.updateTextBuffer(styledText),this.updateTextInfo()}updateTextFromNodes(){if(this.rootTextNode.isDirty&&!this._hasManualStyledText){let chunks=this.rootTextNode.gatherWithInheritedStyle({fg:this._defaultFg,bg:this._defaultBg,attributes:this._defaultAttributes,link:void 0});this.textBuffer.setStyledText(new StyledText(chunks)),this.refreshLocalSelection(),this.yogaNode.markDirty()}}add(obj,index){return this.rootTextNode.add(obj,index)}remove(id){this.rootTextNode.remove(id)}insertBefore(obj,anchor){return this.rootTextNode.insertBefore(obj,anchor),this.rootTextNode.children.indexOf(obj)}getTextChildren(){return this.rootTextNode.getChildren()}clear(){this.rootTextNode.clear();let emptyStyledText=stringToStyledText("");this._text=emptyStyledText,this.updateTextBuffer(emptyStyledText),this.updateTextInfo(),this.requestRender()}onLifecyclePass=()=>{this.updateTextFromNodes()};onFgChanged(newColor){this.rootTextNode.fg=newColor}onBgChanged(newColor){this.rootTextNode.bg=newColor}onAttributesChanged(newAttributes){this.rootTextNode.attributes=newAttributes}destroy(){this.rootTextNode.children.length=0,super.destroy()}};Capture=class Capture extends EventEmitter7{output=[];constructor(){super()}get size(){return this.output.length}write(stream,data){this.output.push({stream,output:data}),this.emit("write",stream,data)}claimOutput(){let output=this.output.map((o)=>o.output).join("");return this.clear(),output}clear(){this.output=[]}};CapturedWritableStream=class CapturedWritableStream extends Writable{stream;capture;isTTY=!0;columns=process.stdout.columns||80;rows=process.stdout.rows||24;constructor(stream,capture){super();this.stream=stream,this.capture=capture}_write(chunk,encoding,callback){let data=chunk.toString();this.capture.write(this.stream,data),callback()}getColorDepth(){return process.stdout.getColorDepth?.()||8}};defaultKeyAliases={enter:"return",esc:"escape",kp0:"0",kp1:"1",kp2:"2",kp3:"3",kp4:"4",kp5:"5",kp6:"6",kp7:"7",kp8:"8",kp9:"9",kpdecimal:".",kpdivide:"/",kpmultiply:"*",kpminus:"-",kpplus:"+",kpenter:"enter",kpequal:"=",kpseparator:",",kpleft:"left",kpright:"right",kpup:"up",kpdown:"down",kppageup:"pageup",kppagedown:"pagedown",kphome:"home",kpend:"end",kpinsert:"insert",kpdelete:"delete"};capture=singleton("ConsoleCapture",()=>new Capture);registerEnvVar({name:"OTUI_USE_CONSOLE",description:"Whether to use the console. Will not capture console output if set to false.",type:"boolean",default:!0});registerEnvVar({name:"SHOW_CONSOLE",description:"Show the console at startup if set to true.",type:"boolean",default:!1});TerminalConsoleCache=class TerminalConsoleCache extends EventEmitter8{_cachedLogs=[];MAX_CACHE_SIZE=1000;_collectCallerInfo=!1;_cachingEnabled=!0;_originalConsole=null;get cachedLogs(){return this._cachedLogs}constructor(){super()}activate(){if(!this._originalConsole)this._originalConsole=global.console;this.setupConsoleCapture(),this.overrideConsoleMethods()}setupConsoleCapture(){if(!env.OTUI_USE_CONSOLE)return;let mockStdout=new CapturedWritableStream("stdout",capture),mockStderr=new CapturedWritableStream("stderr",capture);global.console=new Console({stdout:mockStdout,stderr:mockStderr,colorMode:!0,inspectOptions:{compact:!1,breakLength:80,depth:2}})}overrideConsoleMethods(){console.log=(...args)=>{this.appendToConsole("LOG",...args)},console.info=(...args)=>{this.appendToConsole("INFO",...args)},console.warn=(...args)=>{this.appendToConsole("WARN",...args)},console.error=(...args)=>{this.appendToConsole("ERROR",...args)},console.debug=(...args)=>{this.appendToConsole("DEBUG",...args)}}setCollectCallerInfo(enabled){this._collectCallerInfo=enabled}clearConsole(){this._cachedLogs=[]}setCachingEnabled(enabled){this._cachingEnabled=enabled}deactivate(){this.restoreOriginalConsole()}restoreOriginalConsole(){if(this._originalConsole)global.console=this._originalConsole}addLogEntry(level,...args){let callerInfo=this._collectCallerInfo?getCallerInfo():null,logEntry=[new Date,level,args,callerInfo];if(this._cachingEnabled){if(this._cachedLogs.length>=this.MAX_CACHE_SIZE)this._cachedLogs.shift();this._cachedLogs.push(logEntry)}return logEntry}appendToConsole(level,...args){if(this._cachedLogs.length>=this.MAX_CACHE_SIZE)this._cachedLogs.shift();let entry2=this.addLogEntry(level,...args);this.emit("entry",entry2)}destroy(){this.deactivate()}};terminalConsoleCache=singleton("TerminalConsoleCache",()=>{let terminalConsoleCache2=new TerminalConsoleCache;return process.on("exit",()=>{terminalConsoleCache2.destroy()}),terminalConsoleCache2});((ConsolePosition2)=>{ConsolePosition2.TOP="top",ConsolePosition2.BOTTOM="bottom",ConsolePosition2.LEFT="left",ConsolePosition2.RIGHT="right"})(ConsolePosition||={});defaultConsoleKeybindings=[{name:"up",action:"scroll-up"},{name:"down",action:"scroll-down"},{name:"up",shift:!0,action:"scroll-to-top"},{name:"down",shift:!0,action:"scroll-to-bottom"},{name:"p",ctrl:!0,action:"position-previous"},{name:"o",ctrl:!0,action:"position-next"},{name:"+",action:"size-increase"},{name:"=",shift:!0,action:"size-increase"},{name:"-",action:"size-decrease"},{name:"s",ctrl:!0,action:"save-logs"},{name:"c",ctrl:!0,shift:!0,action:"copy-selection"}],DEFAULT_CONSOLE_OPTIONS={position:"bottom",sizePercent:30,zIndex:1/0,colorInfo:"#00FFFF",colorWarn:"#FFFF00",colorError:"#FF0000",colorDebug:"#808080",colorDefault:"#FFFFFF",backgroundColor:RGBA.fromValues(0.1,0.1,0.1,0.7),startInDebugMode:!1,title:"Console",titleBarColor:RGBA.fromValues(0.05,0.05,0.05,0.7),titleBarTextColor:"#FFFFFF",cursorColor:"#00A0FF",maxStoredLogs:2000,maxDisplayLines:3000,onCopySelection:void 0,keyBindings:void 0,keyAliasMap:void 0,selectionColor:RGBA.fromValues(0.3,0.5,0.8,0.5),copyButtonColor:"#00A0FF"};TerminalConsole=class TerminalConsole extends EventEmitter8{isVisible=!1;isFocused=!1;renderer;keyHandler;options;_debugModeEnabled=!1;frameBuffer=null;consoleX=0;consoleY=0;consoleWidth=0;consoleHeight=0;scrollTopIndex=0;isScrolledToBottom=!0;currentLineIndex=0;_displayLines=[];_allLogEntries=[];_needsFrameBufferUpdate=!1;_entryListener;_selectionStart=null;_selectionEnd=null;_isDragging=!1;_copyButtonBounds={x:0,y:0,width:0,height:0};_autoScrollInterval=null;clock;_keyBindingsMap;_keyAliasMap;_keyBindings;_mergedKeyBindings;_actionHandlers;markNeedsRerender(){this._needsFrameBufferUpdate=!0,this.renderer.requestRender()}getCopyButtonLabel(){let copyBindings=this._mergedKeyBindings.filter((b2)=>b2.action==="copy-selection"),copyBinding=copyBindings[copyBindings.length-1];if(copyBinding)return`[Copy (${keyBindingToString(copyBinding)})]`;return"[Copy]"}_rgbaInfo;_rgbaWarn;_rgbaError;_rgbaDebug;_rgbaDefault;backgroundColor;_rgbaTitleBar;_rgbaTitleBarText;_title;_rgbaCursor;_rgbaSelection;_rgbaCopyButton;_positions=["top","right","bottom","left"];constructor(renderer,options={}){super();if(this.renderer=renderer,this.clock=options.clock??new SystemClock,this.options={...DEFAULT_CONSOLE_OPTIONS,...options},this.keyHandler=this.handleKeyPress.bind(this),this._debugModeEnabled=this.options.startInDebugMode,terminalConsoleCache.setCollectCallerInfo(this._debugModeEnabled),this._rgbaInfo=parseColor(this.options.colorInfo),this._rgbaWarn=parseColor(this.options.colorWarn),this._rgbaError=parseColor(this.options.colorError),this._rgbaDebug=parseColor(this.options.colorDebug),this._rgbaDefault=parseColor(this.options.colorDefault),this.backgroundColor=parseColor(this.options.backgroundColor),this._rgbaTitleBar=parseColor(this.options.titleBarColor),this._rgbaTitleBarText=parseColor(this.options.titleBarTextColor||this.options.colorDefault),this._title=this.options.title,this._rgbaCursor=parseColor(this.options.cursorColor),this._rgbaSelection=parseColor(this.options.selectionColor),this._rgbaCopyButton=parseColor(this.options.copyButtonColor),this._keyAliasMap=mergeKeyAliases(defaultKeyAliases,options.keyAliasMap||{}),this._keyBindings=options.keyBindings||[],this._mergedKeyBindings=mergeKeyBindings(defaultConsoleKeybindings,this._keyBindings),this._keyBindingsMap=buildKeyBindingsMap(this._mergedKeyBindings,this._keyAliasMap),this._actionHandlers=this.buildActionHandlers(),this._updateConsoleDimensions(),this._scrollToBottom(!0),this._entryListener=(logEntry)=>{this._handleNewLog(logEntry)},terminalConsoleCache.on("entry",this._entryListener),env.SHOW_CONSOLE)this.show()}buildActionHandlers(){return new Map([["scroll-up",()=>this.scrollUp()],["scroll-down",()=>this.scrollDown()],["scroll-to-top",()=>this.scrollToTop()],["scroll-to-bottom",()=>this.scrollToBottomAction()],["position-previous",()=>this.positionPrevious()],["position-next",()=>this.positionNext()],["size-increase",()=>this.sizeIncrease()],["size-decrease",()=>this.sizeDecrease()],["save-logs",()=>this.saveLogsAction()],["copy-selection",()=>this.triggerCopyAction()]])}activate(){terminalConsoleCache.activate()}deactivate(){terminalConsoleCache.deactivate()}_handleNewLog(logEntry){if(!this.isVisible)return;if(this._allLogEntries.push(logEntry),this._allLogEntries.length>this.options.maxStoredLogs)this._allLogEntries.splice(0,this._allLogEntries.length-this.options.maxStoredLogs);let newDisplayLines=this._processLogEntry(logEntry);if(this._displayLines.push(...newDisplayLines),this._displayLines.length>this.options.maxDisplayLines){this._displayLines.splice(0,this._displayLines.length-this.options.maxDisplayLines);let linesRemoved=this._displayLines.length-this.options.maxDisplayLines;this.scrollTopIndex=Math.max(0,this.scrollTopIndex-linesRemoved)}if(this.isScrolledToBottom)this._scrollToBottom();this.markNeedsRerender()}_updateConsoleDimensions(termWidth,termHeight){let width=termWidth??this.renderer.width,height2=termHeight??this.renderer.height,sizePercent=this.options.sizePercent/100;switch(this.options.position){case"top":this.consoleX=0,this.consoleY=0,this.consoleWidth=width,this.consoleHeight=Math.max(1,Math.floor(height2*sizePercent));break;case"bottom":this.consoleHeight=Math.max(1,Math.floor(height2*sizePercent)),this.consoleWidth=width,this.consoleX=0,this.consoleY=height2-this.consoleHeight;break;case"left":this.consoleWidth=Math.max(1,Math.floor(width*sizePercent)),this.consoleHeight=height2,this.consoleX=0,this.consoleY=0;break;case"right":this.consoleWidth=Math.max(1,Math.floor(width*sizePercent)),this.consoleHeight=height2,this.consoleY=0,this.consoleX=width-this.consoleWidth;break}this.currentLineIndex=Math.max(0,Math.min(this.currentLineIndex,this.consoleHeight-1))}handleKeyPress(event){if(event.name==="escape"){this.blur();return}let action=getKeyBindingAction(this._keyBindingsMap,event);if(action){let handler=this._actionHandlers.get(action);if(handler){handler();return}}}scrollUp(){let logAreaHeight=Math.max(1,this.consoleHeight-1);if(this.currentLineIndex>0)this.currentLineIndex--,this.markNeedsRerender();else if(this.scrollTopIndex>0)this.scrollTopIndex--,this.isScrolledToBottom=!1,this.markNeedsRerender();return!0}scrollDown(){let displayLineCount=this._displayLines.length,logAreaHeight=Math.max(1,this.consoleHeight-1),maxScrollTop=Math.max(0,displayLineCount-logAreaHeight);if(this.currentLineIndex<logAreaHeight-1&&this.scrollTopIndex+this.currentLineIndex<displayLineCount-1)this.currentLineIndex++,this.markNeedsRerender();else if(this.scrollTopIndex<maxScrollTop)this.scrollTopIndex++,this.isScrolledToBottom=this.scrollTopIndex===maxScrollTop,this.markNeedsRerender();return!0}scrollToTop(){if(this.scrollTopIndex>0||this.currentLineIndex>0)this.scrollTopIndex=0,this.currentLineIndex=0,this.isScrolledToBottom=this._displayLines.length<=Math.max(1,this.consoleHeight-1),this.markNeedsRerender();return!0}scrollToBottomAction(){let logAreaHeightForScroll=Math.max(1,this.consoleHeight-1),maxScrollPossible=Math.max(0,this._displayLines.length-logAreaHeightForScroll);if(this.scrollTopIndex<maxScrollPossible||!this.isScrolledToBottom)this._scrollToBottom(!0),this.markNeedsRerender();return!0}positionPrevious(){let prevIndex=(this._positions.indexOf(this.options.position)-1+this._positions.length)%this._positions.length;return this.options.position=this._positions[prevIndex],this.resize(this.renderer.width,this.renderer.height),!0}positionNext(){let nextIndex=(this._positions.indexOf(this.options.position)+1)%this._positions.length;return this.options.position=this._positions[nextIndex],this.resize(this.renderer.width,this.renderer.height),!0}sizeIncrease(){return this.options.sizePercent=Math.min(100,this.options.sizePercent+5),this.resize(this.renderer.width,this.renderer.height),!0}sizeDecrease(){return this.options.sizePercent=Math.max(10,this.options.sizePercent-5),this.resize(this.renderer.width,this.renderer.height),!0}saveLogsAction(){return this.saveLogsToFile(),!0}triggerCopyAction(){return this.triggerCopy(),!0}attachStdin(){if(this.isFocused)return;this.renderer.keyInput.on("keypress",this.keyHandler),this.isFocused=!0}detachStdin(){if(!this.isFocused)return;this.renderer.keyInput.off("keypress",this.keyHandler),this.isFocused=!1}formatTimestamp(date){return new Intl.DateTimeFormat("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(date)}formatArguments(args){return args.map((arg)=>{if(arg instanceof Error){let errorProps=arg;return`Error: ${errorProps.message}
3077
3077
  `+(errorProps.stack?`${errorProps.stack}
3078
3078
  `:"")}if(typeof arg==="object"&&arg!==null)try{return util22.inspect(arg,{depth:2})}catch(e){return String(arg)}try{return util22.inspect(arg,{depth:2})}catch(e){return String(arg)}}).join(" ")}resize(width,height2){if(this._updateConsoleDimensions(width,height2),this.frameBuffer){this.frameBuffer.resize(this.consoleWidth,this.consoleHeight);let displayLineCount=this._displayLines.length,logAreaHeight=Math.max(1,this.consoleHeight-1),maxScrollTop=Math.max(0,displayLineCount-logAreaHeight);this.scrollTopIndex=Math.min(this.scrollTopIndex,maxScrollTop),this.isScrolledToBottom=this.scrollTopIndex===maxScrollTop;let visibleLineCount=Math.min(logAreaHeight,displayLineCount-this.scrollTopIndex);if(this.currentLineIndex=Math.max(0,Math.min(this.currentLineIndex,visibleLineCount-1)),this.isVisible)this.markNeedsRerender()}}clear(){terminalConsoleCache.clearConsole(),this._allLogEntries=[],this._displayLines=[],this.markNeedsRerender()}toggle(){if(this.isVisible)if(this.isFocused)this.hide();else this.focus();else this.show();if(!this.renderer.isRunning)this.renderer.requestRender()}focus(){this.attachStdin(),this._scrollToBottom(!0),this.markNeedsRerender()}blur(){this.detachStdin(),this.markNeedsRerender()}show(){if(!this.isVisible){if(this.isVisible=!0,this._processCachedLogs(),terminalConsoleCache.setCachingEnabled(!1),!this.frameBuffer)this.frameBuffer=OptimizedBuffer.create(this.consoleWidth,this.consoleHeight,this.renderer.widthMethod,{respectAlpha:this.backgroundColor.a<1,id:"console framebuffer"});let logCount=terminalConsoleCache.cachedLogs.length,visibleLogLines=Math.min(this.consoleHeight,logCount);this.currentLineIndex=Math.max(0,visibleLogLines-1),this.scrollTopIndex=0,this._scrollToBottom(!0),this.focus(),this.markNeedsRerender()}}hide(){if(this.isVisible)this.isVisible=!1,this.blur(),terminalConsoleCache.setCachingEnabled(!0)}destroy(){this.stopAutoScroll(),this.hide(),this.deactivate(),terminalConsoleCache.off("entry",this._entryListener)}getCachedLogs(){return terminalConsoleCache.cachedLogs.map((logEntry)=>logEntry[0].toISOString()+" "+logEntry.slice(1).join(" ")).join(`
3079
3079
  `)}updateFrameBuffer(){if(!this.frameBuffer)return;this.frameBuffer.clear(this.backgroundColor);let displayLines=this._displayLines,displayLineCount=displayLines.length,logAreaHeight=Math.max(1,this.consoleHeight-1);this.frameBuffer.fillRect(0,0,this.consoleWidth,1,this._rgbaTitleBar);let dynamicTitle=`${this._title}${this.isFocused?" (Focused)":""}`,titleX=Math.max(0,Math.floor((this.consoleWidth-dynamicTitle.length)/2));this.frameBuffer.drawText(dynamicTitle,titleX,0,this._rgbaTitleBarText,this._rgbaTitleBar);let copyLabel=this.getCopyButtonLabel(),copyButtonX=this.consoleWidth-copyLabel.length-1;if(copyButtonX>=0){let copyButtonEnabled=this.hasSelection(),disabledColor=RGBA.fromInts(100,100,100,255),copyColor=copyButtonEnabled?this._rgbaCopyButton:disabledColor;this.frameBuffer.drawText(copyLabel,copyButtonX,0,copyColor,this._rgbaTitleBar),this._copyButtonBounds={x:copyButtonX,y:0,width:copyLabel.length,height:1}}else this._copyButtonBounds={x:-1,y:-1,width:0,height:0};let startIndex=this.scrollTopIndex,endIndex=Math.min(startIndex+logAreaHeight,displayLineCount),visibleDisplayLines=displayLines.slice(startIndex,endIndex),lineY=1;for(let i2=0;i2<visibleDisplayLines.length;i2++){if(lineY>=this.consoleHeight)break;let displayLine=visibleDisplayLines[i2],absoluteLineIndex=startIndex+i2,levelColor=this._rgbaDefault;switch(displayLine.level){case"INFO":levelColor=this._rgbaInfo;break;case"WARN":levelColor=this._rgbaWarn;break;case"ERROR":levelColor=this._rgbaError;break;case"DEBUG":levelColor=this._rgbaDebug;break}let linePrefix=displayLine.indent?" ".repeat(INDENT_WIDTH):"",textToDraw=displayLine.text,textAvailableWidth=this.consoleWidth-1-(displayLine.indent?INDENT_WIDTH:0);if(this.isFocused&&lineY-1===this.currentLineIndex)this.frameBuffer.drawText(">",0,lineY,this._rgbaCursor,this.backgroundColor);else this.frameBuffer.drawText(" ",0,lineY,this._rgbaDefault,this.backgroundColor);let fullText=`${linePrefix}${textToDraw.substring(0,textAvailableWidth)}`,selectionRange=this.getLineSelectionRange(absoluteLineIndex);if(selectionRange){let adjustedStart=Math.max(0,selectionRange.start),adjustedEnd=Math.min(fullText.length,selectionRange.end);if(adjustedStart>0)this.frameBuffer.drawText(fullText.substring(0,adjustedStart),1,lineY,levelColor);if(adjustedStart<adjustedEnd)this.frameBuffer.fillRect(1+adjustedStart,lineY,adjustedEnd-adjustedStart,1,this._rgbaSelection),this.frameBuffer.drawText(fullText.substring(adjustedStart,adjustedEnd),1+adjustedStart,lineY,levelColor,this._rgbaSelection);if(adjustedEnd<fullText.length)this.frameBuffer.drawText(fullText.substring(adjustedEnd),1+adjustedEnd,lineY,levelColor)}else this.frameBuffer.drawText(fullText,1,lineY,levelColor);lineY++}}renderToBuffer(buffer2){if(!this.isVisible||!this.frameBuffer)return;if(this._needsFrameBufferUpdate)this.updateFrameBuffer(),this._needsFrameBufferUpdate=!1;buffer2.drawFrameBuffer(this.consoleX,this.consoleY,this.frameBuffer)}setDebugMode(enabled){if(this._debugModeEnabled=enabled,terminalConsoleCache.setCollectCallerInfo(enabled),this.isVisible)this.markNeedsRerender()}toggleDebugMode(){this.setDebugMode(!this._debugModeEnabled)}set keyBindings(bindings){this._keyBindings=bindings,this._mergedKeyBindings=mergeKeyBindings(defaultConsoleKeybindings,bindings),this._keyBindingsMap=buildKeyBindingsMap(this._mergedKeyBindings,this._keyAliasMap),this.markNeedsRerender()}set keyAliasMap(aliases){this._keyAliasMap=mergeKeyAliases(defaultKeyAliases,aliases),this._mergedKeyBindings=mergeKeyBindings(defaultConsoleKeybindings,this._keyBindings),this._keyBindingsMap=buildKeyBindingsMap(this._mergedKeyBindings,this._keyAliasMap),this.markNeedsRerender()}set onCopySelection(callback){this.options.onCopySelection=callback}get onCopySelection(){return this.options.onCopySelection}_scrollToBottom(forceCursorToLastLine=!1){let displayLineCount=this._displayLines.length,logAreaHeight=Math.max(1,this.consoleHeight-1),maxScrollTop=Math.max(0,displayLineCount-logAreaHeight);this.scrollTopIndex=maxScrollTop,this.isScrolledToBottom=!0;let visibleLineCount=Math.min(logAreaHeight,displayLineCount-this.scrollTopIndex);if(forceCursorToLastLine||this.currentLineIndex>=visibleLineCount)this.currentLineIndex=Math.max(0,visibleLineCount-1)}_processLogEntry(logEntry){let[date,level,args,callerInfo]=logEntry,displayLines=[],timestamp2=this.formatTimestamp(date),callerSource=callerInfo?`${callerInfo.fileName}:${callerInfo.lineNumber}`:"unknown",prefix=`[${timestamp2}] [${level}]`+(this._debugModeEnabled?` [${callerSource}]`:"")+" ",initialLines=this.formatArguments(args).split(`
@@ -3466,14 +3466,14 @@ $ bun add react-devtools-core@7 -d
3466
3466
  AND a.ended_at IS NULL
3467
3467
  ORDER BY a.started_at DESC
3468
3468
  `).map(mapAssignment)}function mapExecutor(row){let meta=row.metadata;return{id:String(row.id),agentId:String(row.agent_id),agentName:row.agent_name?String(row.agent_name):null,provider:String(row.provider),transport:String(row.transport),pid:row.pid!=null?Number(row.pid):null,tmuxSession:row.tmux_session?String(row.tmux_session):null,tmuxPaneId:row.tmux_pane_id?String(row.tmux_pane_id):null,state:String(row.state),metadata:typeof meta==="string"?JSON.parse(meta):meta??{},startedAt:row.started_at instanceof Date?row.started_at.toISOString():String(row.started_at),role:row.role?String(row.role):null,team:row.team?String(row.team):null}}function mapAssignment(row){return{id:String(row.id),executorId:String(row.executor_id),taskId:row.task_id?String(row.task_id):null,taskTitle:row.task_title?String(row.task_title):null,wishSlug:row.wish_slug?String(row.wish_slug):null,groupNumber:row.group_number!=null?Number(row.group_number):null,startedAt:row.started_at instanceof Date?row.started_at.toISOString():String(row.started_at)}}async function loadAgentWorkStates(){let{listAgents:listAgents2}=await Promise.resolve().then(() => (init_agent_registry(),exports_agent_registry)),{shouldResume:shouldResume2,BOOT_PASS_CONCURRENCY_CAP:BOOT_PASS_CONCURRENCY_CAP2}=await Promise.resolve().then(() => (init_should_resume(),exports_should_resume)),agents=await listAgents2({includeArchived:!1});if(agents.length===0)return new Map;let out=new Map,cursor=0,cap=Math.min(BOOT_PASS_CONCURRENCY_CAP2,Math.max(1,agents.length)),workers=Array.from({length:cap},async()=>{while(cursor<agents.length){let i2=cursor++;if(i2>=agents.length)return;let a=agents[i2];try{let decision=await shouldResume2(a.id),work=reasonToWorkState(decision.reason);if(!work)continue;let name=a.customName??a.role??a.id;out.set(name,work)}catch{}}});return await Promise.all(workers),out}function reasonToWorkState(reason){if(reason==="ok")return"in_flight";if(reason==="auto_resume_disabled")return"paused";if(reason==="assignment_closed")return"done";if(reason==="no_session_id")return"stuck";return}import{execSync as execSync17}from"child_process";function execQuiet(cmd){try{return execSync17(cmd,{encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim()}catch{return""}}function parsePaneLine(parts){let[sessionName,winIdxStr,winName,winActive,winPanes,paneIdxStr,paneId,panePidStr,paneCmd,paneTitle,paneSize,sessAttached,sessWindows,sessCreated,paneDead]=parts;return{sessionName,winIdxStr,session:{name:sessionName,attached:sessAttached==="1",windowCount:Number.parseInt(sessWindows,10)||0,created:Number.parseInt(sessCreated,10)||0},window:{sessionName,index:Number.parseInt(winIdxStr,10)||0,name:winName,active:winActive==="1",paneCount:Number.parseInt(winPanes,10)||0},pane:{sessionName,windowIndex:Number.parseInt(winIdxStr,10)||0,paneIndex:Number.parseInt(paneIdxStr,10)||0,paneId,pid:Number.parseInt(panePidStr,10)||0,command:paneCmd,title:paneTitle,size:paneSize,isDead:paneDead==="1"}}}function getTmuxInventory(){let paneOutput=execQuiet(`${tmuxBin()} -L genie list-panes -a -F '#{session_name}|#{window_index}|#{window_name}|#{window_active}|#{window_panes}|#{pane_index}|#{pane_id}|#{pane_pid}|#{pane_current_command}|#{pane_title}|#{pane_width}x#{pane_height}|#{session_attached}|#{session_windows}|#{session_created}|#{pane_dead}'`);if(!paneOutput)return[];let sessionMap=new Map,windowMap=new Map;for(let line of paneOutput.split(`
3469
- `)){if(!line)continue;let parts=line.split("|");if(parts.length<15)continue;let parsed=parsePaneLine(parts);if(!sessionMap.has(parsed.sessionName))sessionMap.set(parsed.sessionName,{...parsed.session,windows:[]});let winKey=`${parsed.sessionName}:${parsed.winIdxStr}`;if(!windowMap.has(winKey)){let win={...parsed.window,panes:[]};windowMap.set(winKey,win),sessionMap.get(parsed.sessionName)?.windows.push(win)}windowMap.get(winKey)?.panes.push(parsed.pane)}return Array.from(sessionMap.values()).sort((a,b3)=>a.name.localeCompare(b3.name))}function isPidAlive3(pid){try{return process.kill(pid,0),!0}catch{return!1}}function allClaudePanes(sessions2){return sessions2.flatMap((s2)=>s2.windows.flatMap((w2)=>w2.panes)).filter((p)=>p.command==="claude"||p.title.includes("claude"))}function detectGaps(executors,sessions2){let deadPidExecutors=executors.filter((e)=>e.pid!=null&&!isPidAlive3(e.pid)),executorPaneIds=new Set(executors.map((e)=>e.tmuxPaneId).filter(Boolean)),claudePanes=allClaudePanes(sessions2),orphanPanes=claudePanes.filter((p)=>!executorPaneIds.has(p.paneId)),linkedCount=executors.filter((e)=>e.tmuxPaneId&&!deadPidExecutors.some((d2)=>d2.id===e.id)).length,deadPaneCount=sessions2.flatMap((s2)=>s2.windows.flatMap((w2)=>w2.panes)).filter((p)=>p.isDead).length;return{deadPidExecutors,orphanPanes,linkedCount,totalExecutors:executors.length,totalClaudePanes:claudePanes.length,deadPaneCount}}async function collectDiagnostics(){let{loadExecutors:loadExecutors2,loadAssignments:loadAssignments2,loadAgentWorkStates:loadAgentWorkStates2}=await Promise.resolve().then(() => exports_db2),sessions2=getTmuxInventory(),executors=await loadExecutors2(),executorIds=executors.map((e)=>e.id),assignments=await loadAssignments2(executorIds),workStates=new Map,alertCount=0;try{workStates=await loadAgentWorkStates2()}catch{}try{let{listActiveDerivedSignals:listActiveDerivedSignals2}=await Promise.resolve().then(() => (init_derived_signals(),exports_derived_signals));alertCount=(await listActiveDerivedSignals2()).length}catch{}let gaps=detectGaps(executors,sessions2);if(gaps.deadPidExecutors.length>0){let{terminateExecutor:terminateExecutor2}=await Promise.resolve().then(() => (init_executor_registry(),exports_executor_registry)),{getConnection:getConnection2}=await Promise.resolve().then(() => (init_db(),exports_db)),sql=await getConnection2();await Promise.allSettled(gaps.deadPidExecutors.map(async(exec3)=>{if(await terminateExecutor2(exec3.id),exec3.agentId)await sql`UPDATE agents SET current_executor_id = NULL WHERE current_executor_id = ${exec3.id}`}))}return{sessions:sessions2,executors,assignments,gaps,workStates,alertCount,timestamp:Date.now()}}var init_diagnostics=__esm(()=>{init_ensure_tmux()});import{existsSync as existsSync66,readFileSync as readFileSync40,unlinkSync as unlinkSync13}from"fs";import{homedir as homedir44}from"os";import{join as join82}from"path";function getInitialAgentFilePath(){let genieHome6=process.env.GENIE_HOME??join82(homedir44(),".genie");return join82(genieHome6,"tui-initial-agent")}function consumeInitialAgentSignal(){let filePath=getInitialAgentFilePath();if(!existsSync66(filePath))return;try{let agent=readFileSync40(filePath,"utf-8").trim();return unlinkSync13(filePath),agent||void 0}catch{return}}var init_initial_agent=()=>{};function toSessionName(agentName){return agentName.replace(/\//g,"-")}function buildSessionTree(snapshot){let executorByPaneId=new Map;for(let exec3 of snapshot.executors)if(exec3.tmuxPaneId)executorByPaneId.set(exec3.tmuxPaneId,exec3);return snapshot.sessions.filter((s2)=>s2.name!=="genie-tui").map((session)=>sessionToNode(session,executorByPaneId))}function buildWorkspaceTree(input){let{agentNames,sessions:sessions2,executors}=input,workStates=input.workStates??new Map,sessionByName=new Map;for(let s2 of sessions2)if(s2.name!=="genie-tui")sessionByName.set(s2.name,s2);let executorByPaneId=new Map;for(let exec3 of executors)if(exec3.tmuxPaneId)executorByPaneId.set(exec3.tmuxPaneId,exec3);let executorsByAgent=new Map;for(let exec3 of executors){let name=exec3.agentName??exec3.metadata?.agentName;if(typeof name==="string"){let list2=executorsByAgent.get(name)??[];list2.push(exec3),executorsByAgent.set(name,list2)}}let{topLevel,subsByParent}=groupAgentNames(agentNames),nodes=topLevel.map((name)=>{let node=buildAgentNode(name,sessionByName.get(toSessionName(name)),executorsByAgent.get(name)??[],executorByPaneId,workStates.get(name),"canonical");return appendSubAgentNodes(node,subsByParent.get(name),sessionByName,executorsByAgent,executorByPaneId,workStates),node}),claimedSessions=new Set(agentNames.map(toSessionName));for(let[name,session]of sessionByName)if(!claimedSessions.has(name))nodes.push(sessionToNode(session,executorByPaneId));return nodes}function resolvePreferredWindowIndex(session,agentName){let windows=[...session.windows].sort((a,b3)=>a.index-b3.index),hasClaudePane=(window2)=>window2.panes.some((pane)=>!pane.isDead&&(pane.command==="claude"||pane.title.includes("claude")));return(windows.find((window2)=>window2.active&&hasClaudePane(window2))??(agentName?windows.find((window2)=>window2.name===agentName):void 0)??windows.find((window2)=>hasClaudePane(window2))??windows.find((window2)=>window2.active&&window2.index!==0)??windows.find((window2)=>window2.index!==0))?.index}function hasLiveClaudeWindow(session){return session.windows.some((window2)=>window2.panes.some((pane)=>!pane.isDead&&(pane.command==="claude"||pane.title.includes("claude"))))}function groupAgentNames(names){let topLevel=[],subsByParent=new Map;for(let name of names){let slashIdx=name.indexOf("/");if(slashIdx===-1)topLevel.push(name);else{let parent=name.slice(0,slashIdx),subs=subsByParent.get(parent)??[];subs.push(name),subsByParent.set(parent,subs)}}return{topLevel,subsByParent}}function appendSubAgentNodes(parent,subs,sessionByName,executorsByAgent,executorByPaneId,workStates){if(!subs)return;for(let subName of subs){let subLabel=subName.slice(subName.indexOf("/")+1),subNode=buildAgentNode(subName,sessionByName.get(toSessionName(subName)),executorsByAgent.get(subName)??[],executorByPaneId,workStates.get(subName),"subagent");subNode.label=subLabel,subNode.depth=1,parent.children.push(subNode)}}function countClaudePanes(session){return session.windows.reduce((sum,w2)=>sum+w2.panes.filter((p)=>p.command==="claude"||p.title.includes("claude")).length,0)}function buildAgentNode(name,session,agentExecutors,executorByPaneId,workState,kind){let wsState=deriveWsAgentState(session,agentExecutors),attachWindowIndex=session?resolvePreferredWindowIndex(session,name):void 0,children=[];if(session)for(let win of session.windows){if(win.index===0)continue;children.push(windowToNode(session.name,win,executorByPaneId))}let node={id:`agent:${name}`,type:"agent",label:name,depth:0,expanded:children.length>0,children,data:{sessionName:toSessionName(name),windowCount:session?session.windows.length:0,attachWindowIndex,provider:agentExecutors[0]?.provider??null},activePanes:session?countClaudePanes(session):0,agentState:agentExecutors.length>0?deriveExecutorState(agentExecutors):void 0,wsAgentState:wsState,kind};if(workState)node.workState=workState;return node}function deriveWsAgentState(session,agentExecutors){if(!session)return"stopped";if(hasLiveClaudeWindow(session))return"running";for(let exec3 of agentExecutors){if(exec3.state==="error"||exec3.state==="terminated")return"error";if(exec3.state==="spawning")return"spawning"}if(agentExecutors.length===0)return"stopped";return"running"}function deriveExecutorState(execs){for(let e of execs)if(e.state==="working")return"working";for(let e of execs)if(e.state==="permission")return"permission";for(let e of execs)if(e.state==="error"||e.state==="terminated")return"error";return"idle"}function sessionToNode(session,executorMap){let claudePanes=session.windows.reduce((sum,w2)=>sum+w2.panes.filter((p)=>p.command==="claude"||p.title.includes("claude")).length,0);return{id:`session:${session.name}`,type:"session",label:session.name,depth:0,expanded:!0,children:session.windows.map((w2)=>windowToNode(session.name,w2,executorMap)),data:{attached:session.attached,windowCount:session.windowCount},activePanes:claudePanes,agentState:void 0,wsAgentState:void 0}}function windowToNode(sessionName,window2,executorMap){let activePanes=window2.panes.filter((p)=>!p.isDead&&(p.command==="claude"||p.title.includes("claude"))).length;return{id:`window:${sessionName}:${window2.index}`,type:"window",label:window2.name,depth:1,expanded:!0,children:window2.panes.map((p)=>paneToNode(sessionName,window2.index,p,executorMap)),data:{active:window2.active,paneCount:window2.paneCount},activePanes,agentState:void 0,wsAgentState:void 0}}function paneToNode(sessionName,windowIndex,pane,executorMap){let executor=executorMap.get(pane.paneId),isClaude=pane.command==="claude"||pane.title.includes("claude");return{id:`pane:${pane.paneId}`,type:"pane",label:derivePaneLabel(pane,executor,isClaude),depth:2,expanded:!1,children:[],data:{command:pane.command,isDead:pane.isDead,pid:pane.pid,size:pane.size,paneId:pane.paneId,sessionName,windowIndex},activePanes:0,agentState:derivePaneState(pane,executor),wsAgentState:void 0}}function derivePaneLabel(pane,executor,isClaude){if(executor?.agentName&&executor?.team)return`${executor.team}/${executor.agentName}`;if(executor?.agentName)return executor.agentName;if(pane.title&&pane.title!==pane.command&&!isDefaultPaneTitle(pane.title))return pane.title;if(isClaude)return"claude";return pane.command}function isDefaultPaneTitle(title){let hostname2=__require("os").hostname();return title===hostname2||title.startsWith(`${hostname2}.`)||title.startsWith("\u2733")}function derivePaneState(pane,executor){if(pane.isDead)return"error";if(!executor)return;let s2=executor.state;if(s2==="working")return"working";if(s2==="idle"||s2==="spawning")return"idle";if(s2==="permission")return"permission";if(s2==="error"||s2==="terminated")return"error";return}function getSessionTarget(node){if(node.type==="agent"){let sessionName=node.data.sessionName,attachWindowIndex=node.data.attachWindowIndex;if(typeof attachWindowIndex==="number")return{sessionName,windowIndex:attachWindowIndex};let firstWindowChild=node.children.find((child)=>child.type==="window");if(firstWindowChild){let parts=firstWindowChild.id.split(":");return{sessionName,windowIndex:Number(parts[2])}}return{sessionName}}if(node.type==="session")return{sessionName:node.label};if(node.type==="window"){let parts=node.id.split(":");return{sessionName:parts[1],windowIndex:Number(parts[2])}}if(node.type==="pane"){let data=node.data;return{sessionName:data.sessionName,windowIndex:data.windowIndex}}return null}var icons;var init_theme2=__esm(()=>{init_genie_tokens();init_genie_tokens();icons={org:"\u25C6",project:"\u25B8",projectOpen:"\u25BE",board:"\u2261",boardOpen:"\u2261",column:"\u2502",task:"\u25CB",taskActive:"\u25CF",taskDone:"\u2713",agent:"\u25B6",collapsed:"\u25B8",expanded:"\u25BE"}});function flattenTree(nodes){let result2=[];function walk(node,depth){if(result2.push({node,depth,visible:!0}),node.expanded)for(let child of node.children)walk(child,depth+1)}for(let node of nodes)walk(node,0);return result2}function toggleNode(nodes,id){return nodes.map((node)=>{if(node.id===id)return{...node,expanded:!node.expanded};return{...node,children:toggleNode(node.children,id)}})}var import_jsx_dev_runtime2;var init_jsx_dev_runtime=__esm(()=>{import_jsx_dev_runtime2=__toESM(require_react_jsx_dev_runtime_development(),1)});function CliPreviewLine({intent,hint=DEFAULT_HINT}){let cli=null,errorMessage=null;try{cli=buildSpawnInvocation(intent).cli}catch(err){errorMessage=err instanceof Error?err.message:String(err)}if(errorMessage!==null)return import_jsx_dev_runtime2.jsxDEV("box",{flexDirection:"column",paddingX:1,children:[import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.error,children:`\u26A0 ${errorMessage}`},void 0,!1,void 0,this)},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:hint},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return import_jsx_dev_runtime2.jsxDEV("box",{flexDirection:"column",paddingX:1,children:[import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.accent,children:"\u25B6 "},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.text,children:cli},void 0,!1,void 0,this)]},void 0,!0,void 0,this),import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:hint},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var DEFAULT_HINT="Enter to run \xB7 Esc to cancel";var init_CliPreviewLine=__esm(()=>{init_spawn_invocation();init_theme2();init_jsx_dev_runtime()});async function defaultLoadAgents(){let{spawn:spawn5}=await import("child_process"),bunPath=process.execPath||"bun",genieBin=process.argv[1],[command,args]=genieBin&&genieBin!=="genie"?[bunPath,[genieBin,"dir","ls","--json"]]:["genie",["dir","ls","--json"]],stdout=await new Promise((resolve20,reject)=>{let child=spawn5(command,args,{stdio:["ignore","pipe","ignore"]}),chunks=[];child.stdout.on("data",(c)=>chunks.push(c)),child.on("error",reject),child.on("close",()=>resolve20(Buffer.concat(chunks).toString("utf-8")))});return JSON.parse(stdout).map((e)=>typeof e?.name==="string"?{name:e.name}:null).filter((e)=>e!==null)}function buildIntent(agentName,target){let intent={kind:"spawn-agent",name:agentName,session:target.session};if(target.window!==void 0&&target.window.length>0)intent.window=target.window;else intent.newWindow=!0;return intent}function applyFilter2(agents,filter){if(filter.length===0)return agents;let needle=filter.toLowerCase();return agents.filter((a)=>a.name.toLowerCase().includes(needle))}function handleControlKey(key,deps){if(key.name==="escape")return deps.onCancel(),!0;if(key.name==="up"&&deps.filteredLength>0)return deps.setSelectedIndex((prev)=>prev<=0?deps.filteredLength-1:prev-1),!0;if(key.name==="down"&&deps.filteredLength>0)return deps.setSelectedIndex((prev)=>prev>=deps.filteredLength-1?0:prev+1),!0;if((key.name==="return"||key.name==="enter")&&deps.highlighted)return deps.onConfirm(buildIntent(deps.highlighted.name,deps.target)),!0;if(key.name==="backspace")return deps.setFilter((prev)=>prev.slice(0,-1)),!0;if(key.name==="up"||key.name==="down"||key.name==="return"||key.name==="enter")return!0;return!1}function appendCharIfPrintable(key,setFilter){let ch=key.sequence??key.name;if(typeof ch==="string"&&ch.length===1&&ch>=" "&&ch!=="\x7F")setFilter((prev)=>prev+ch)}function AgentPicker({target,onConfirm,onCancel,loadAgents=defaultLoadAgents}){let[agents,setAgents]=import_react14.useState(null),[loadError,setLoadError]=import_react14.useState(null),[filter,setFilter]=import_react14.useState(""),[selectedIndex,setSelectedIndex]=import_react14.useState(0);import_react14.useEffect(()=>{let active=!0;return loadAgents().then((list2)=>{if(!active)return;setAgents(list2)}).catch((err)=>{if(!active)return;setLoadError(err instanceof Error?err.message:String(err)),setAgents([])}),()=>{active=!1}},[loadAgents]);let filtered=import_react14.useMemo(()=>agents?applyFilter2(agents,filter):[],[agents,filter]);import_react14.useEffect(()=>{if(filtered.length===0){if(selectedIndex!==0)setSelectedIndex(0);return}if(selectedIndex>=filtered.length)setSelectedIndex(filtered.length-1)},[filtered.length,selectedIndex]);let highlighted=filtered[selectedIndex],previewIntent=highlighted?buildIntent(highlighted.name,target):null,handleKey=import_react14.useCallback((key)=>{if(handleControlKey(key,{onCancel,onConfirm,target,highlighted,filteredLength:filtered.length,setSelectedIndex,setFilter}))return;if(key.ctrl||key.meta)return;appendCharIfPrintable(key,setFilter)},[filtered.length,highlighted,onCancel,onConfirm,target]);useKeyboard(handleKey);let targetLabel=target.window?target.window:target.session,modeHint=target.window?"in window":"new window in session",statusText=agents===null?"Loading agents\u2026":loadError!==null?`Load failed: ${loadError}`:null;return import_jsx_dev_runtime2.jsxDEV("box",{position:"absolute",width:"100%",height:"100%",justifyContent:"center",alignItems:"center",backgroundColor:palette.bgOverlay,children:import_jsx_dev_runtime2.jsxDEV("box",{border:!0,borderStyle:"rounded",borderColor:palette.borderActive,backgroundColor:palette.bgRaised,width:"100%",flexDirection:"column",paddingX:1,paddingY:1,gap:1,children:[import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.accent,children:"Spawn here"},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:` \u2014 ${modeHint} `},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.text,children:targetLabel},void 0,!1,void 0,this)]},void 0,!0,void 0,this),import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:"Filter: "},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.text,children:filter.length>0?filter:" "},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:filter.length>0?"":"(type to narrow)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),statusText!==null?import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:loadError!==null?palette.error:palette.textDim,children:statusText},void 0,!1,void 0,this)},void 0,!1,void 0,this):filtered.length===0?import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:"No agents registered"},void 0,!1,void 0,this)},void 0,!1,void 0,this):import_jsx_dev_runtime2.jsxDEV("box",{flexDirection:"column",children:filtered.map((agent,i2)=>import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:i2===selectedIndex?palette.accent:palette.textDim,children:i2===selectedIndex?"\u25B8 ":" "},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:i2===selectedIndex?palette.accentBright:palette.textDim,children:agent.name},void 0,!1,void 0,this)]},agent.name,!0,void 0,this))},void 0,!1,void 0,this),previewIntent!==null?import_jsx_dev_runtime2.jsxDEV(CliPreviewLine,{intent:previewIntent},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var import_react14;var init_AgentPicker=__esm(async()=>{init_theme2();init_CliPreviewLine();init_jsx_dev_runtime();await init_react();import_react14=__toESM(require_react_development(),1)});function ContextMenu({items,onAction,onClose,positionY=0}){let[selectedIndex,setSelectedIndex]=import_react16.useState(0),[inputMode,setInputMode]=import_react16.useState(!1),inputRef=import_react16.useRef(""),selectOptions=items.map((item)=>({name:`${item.label}${item.shortcut?` ${item.shortcut}`:""}`,description:"",value:item.action}));useKeyboard(import_react16.useCallback((key)=>{if(inputMode)return;if(key.name==="escape"){onClose();return}for(let item of items)if(item.shortcut&&key.name===item.shortcut.toLowerCase()){if(item.needsInput)setInputMode(!0),inputRef.current="",setSelectedIndex(items.indexOf(item));else onAction(item.action);return}},[inputMode,items,onAction,onClose]));let handleSelect=import_react16.useCallback((_index,option)=>{let value=option?.value;if(!value)return;if(items.find((i2)=>i2.action===value)?.needsInput){setInputMode(!0),inputRef.current="";return}onAction(value)},[items,onAction]),handleInputChange=import_react16.useCallback((v2)=>{inputRef.current=v2},[]),handleInputSubmit=import_react16.useCallback(()=>{let item=items[selectedIndex],value=inputRef.current.trim();if(item&&value)onAction(item.action,value);setInputMode(!1),inputRef.current=""},[items,selectedIndex,onAction]);if(items.length===0)return onClose(),null;return import_jsx_dev_runtime2.jsxDEV("box",{position:"absolute",width:"100%",height:"100%",onMouseDown:()=>onClose(),children:[positionY>0?import_jsx_dev_runtime2.jsxDEV("box",{height:positionY},void 0,!1,void 0,this):null,import_jsx_dev_runtime2.jsxDEV("box",{border:!0,borderStyle:"rounded",borderColor:palette.borderActive,backgroundColor:palette.bgRaised,width:"100%",height:inputMode?items.length+5:items.length+2,flexDirection:"column",onMouseDown:(e)=>e.stopPropagation?.(),children:[import_jsx_dev_runtime2.jsxDEV("select",{options:selectOptions,selectedIndex,onSelect:handleSelect,onChange:(index)=>setSelectedIndex(index),focused:!inputMode,height:items.length,showDescription:!1,selectedBackgroundColor:palette.accentDim,selectedTextColor:palette.accentBright},void 0,!1,void 0,this),inputMode?import_jsx_dev_runtime2.jsxDEV("box",{paddingX:1,height:3,flexDirection:"column",children:[import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:[items[selectedIndex]?.label??"Input",":"]},void 0,!0,void 0,this)},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("input",{onChange:handleInputChange,onSubmit:handleInputSubmit,placeholder:"Type and press Enter...",focused:!0,width:28,backgroundColor:palette.bg,textColor:palette.text,placeholderColor:palette.textMuted},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var import_react16;var init_ContextMenu=__esm(async()=>{init_theme2();init_jsx_dev_runtime();await init_react();import_react16=__toESM(require_react_development(),1)});function buildRows(sessions2){let rows=[];for(let session of sessions2){if(session.name===TUI_SESSION2)continue;rows.push({kind:"session",sessionName:session.name,label:`${session.name} (new window)`});for(let win of session.windows){let windowLabel=win.name?` ${win.name}`:"";rows.push({kind:"window",sessionName:session.name,windowIndex:win.index,label:` ${session.name}:${win.index}${windowLabel}`})}}return rows}function pickFromRow(row){if(row.kind==="session")return{kind:"session",sessionName:row.sessionName};return{kind:"window",sessionName:row.sessionName,windowIndex:row.windowIndex}}function picksEqual(a,b3){if(a.kind==="session"&&b3.kind==="session")return a.sessionName===b3.sessionName;if(a.kind==="window"&&b3.kind==="window")return a.sessionName===b3.sessionName&&a.windowIndex===b3.windowIndex;return!1}function pickExists(pick,sessions2){let session=sessions2.find((s2)=>s2.name===pick.sessionName);if(!session)return!1;if(pick.kind==="session")return!0;return session.windows.some((w2)=>w2.index===pick.windowIndex)}function pickToIntent(agentName,pick){if(!pick)return{kind:"spawn-agent",name:agentName};if(pick.kind==="session")return{kind:"spawn-agent",name:agentName,session:pick.sessionName,newWindow:!0};return{kind:"spawn-agent",name:agentName,window:`${pick.sessionName}:${pick.windowIndex}`}}function pickLabel(pick){if(pick.kind==="session")return pick.sessionName;return`${pick.sessionName}:${pick.windowIndex}`}function SpawnTargetPicker({agentName,sessions:sessions2,onConfirm,onCancel}){let rows=import_react18.useMemo(()=>buildRows(sessions2),[sessions2]),[pick,setPick]=import_react18.useState(()=>rows[0]?pickFromRow(rows[0]):null),[staleError,setStaleError]=import_react18.useState(null);if(pick===null&&rows[0])setPick(pickFromRow(rows[0]));let selectedIndex=import_react18.useMemo(()=>{if(!pick)return-1;return rows.findIndex((r)=>picksEqual(pick,r))},[pick,rows]),movePick=import_react18.useCallback((delta)=>{if(rows.length===0)return;let next=((selectedIndex<0?0:selectedIndex)+delta+rows.length)%rows.length;setPick(pickFromRow(rows[next])),setStaleError(null)},[rows,selectedIndex]),handleEnter=import_react18.useCallback(()=>{if(!pick)return;if(!pickExists(pick,sessions2)){setStaleError(`Target "${pickLabel(pick)}" no longer exists \u2014 pick another.`);return}onConfirm(pickToIntent(agentName,pick))},[pick,sessions2,agentName,onConfirm]);useKeyboard(import_react18.useCallback((key)=>{let n=key.name;if(n==="escape"){onCancel();return}if(n==="enter"||n==="return"){handleEnter();return}if(n==="up"||n==="k")movePick(-1);else if(n==="down"||n==="j")movePick(1)},[onCancel,handleEnter,movePick]));let intent=import_react18.useMemo(()=>pickToIntent(agentName,pick),[agentName,pick]);return import_jsx_dev_runtime2.jsxDEV("box",{position:"absolute",width:"100%",height:"100%",justifyContent:"center",alignItems:"center",backgroundColor:palette.bgOverlay,children:import_jsx_dev_runtime2.jsxDEV("box",{border:!0,borderStyle:"rounded",borderColor:palette.borderActive,backgroundColor:palette.bgRaised,paddingX:2,paddingY:1,flexDirection:"column",width:"100%",gap:1,children:[import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.accent,children:`Spawn "${agentName}" into\u2026`},void 0,!1,void 0,this)},void 0,!1,void 0,this),rows.length===0?import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:"No tmux sessions available. Press Esc to cancel."},void 0,!1,void 0,this)},void 0,!1,void 0,this):import_jsx_dev_runtime2.jsxDEV("box",{flexDirection:"column",children:rows.map((row,i2)=>import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:i2===selectedIndex?palette.accent:palette.text,children:[i2===selectedIndex?"> ":" ",row.label]},void 0,!0,void 0,this)},`${row.kind}:${row.sessionName}:${row.kind==="window"?row.windowIndex:""}`,!1,void 0,this))},void 0,!1,void 0,this),staleError?import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.error,children:`\u26A0 ${staleError}`},void 0,!1,void 0,this)},void 0,!1,void 0,this):null,import_jsx_dev_runtime2.jsxDEV(CliPreviewLine,{intent},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var import_react18,TUI_SESSION2="genie-tui";var init_SpawnTargetPicker=__esm(async()=>{init_theme2();init_CliPreviewLine();init_jsx_dev_runtime();await init_react();import_react18=__toESM(require_react_development(),1)});var require_package=__commonJS((exports,module2)=>{module2.exports={name:"systeminformation",version:"5.31.5",description:"Advanced, lightweight system and OS information library",license:"MIT",author:"Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",homepage:"https://systeminformation.io",main:"./lib/index.js",type:"commonjs",bin:{systeminformation:"lib/cli.js"},types:"./lib/index.d.ts",scripts:{test:"node ./test/test.js",testDeno:"deno run -A ./test/test.js"},files:["lib/"],keywords:["system information","sysinfo","monitor","monitoring","os","linux","osx","windows","freebsd","openbsd","netbsd","cpu","cpuload","physical cores","logical cores","processor","cores","threads","socket type","memory","file system","fsstats","diskio","block devices","netstats","network","network interfaces","network connections","network stats","iface","printer","processes","users","internet","battery","docker","docker stats","docker processes","graphics","graphic card","graphic controller","gpu","display","smart","disk layout","usb","audio","bluetooth","wifi","wifinetworks","virtual box","virtualbox","vm","backend","hardware","BIOS","chassis"],repository:{type:"git",url:"git+https://github.com/sebhildebrandt/systeminformation.git"},funding:{type:"Buy me a coffee",url:"https://www.buymeacoffee.com/systeminfo"},os:["darwin","linux","win32","freebsd","openbsd","netbsd","sunos","android"],engines:{node:">=8.0.0"}}});var require_util3=__commonJS((exports)=>{var os4=__require("os"),fs3=__require("fs"),path6=__require("path"),spawn5=__require("child_process").spawn,exec3=__require("child_process").exec,execSync18=__require("child_process").execSync,util4=__require("util"),_platform=process.platform,_linux=_platform==="linux"||_platform==="android",_darwin=_platform==="darwin",_windows=_platform==="win32",_freebsd=_platform==="freebsd",_openbsd=_platform==="openbsd",_netbsd=_platform==="netbsd",_cores=0,codepage="",_smartMonToolsInstalled=null,_rpi_cpuinfo=null,WINDIR=process.env.WINDIR||"C:\\Windows",_psChild,_psResult="",_psCmds=[],_psPersistent=!1,_powerShell="",_psToUTF8="$OutputEncoding = [System.Console]::OutputEncoding = [System.Console]::InputEncoding = [System.Text.Encoding]::UTF8 ; ",_psCmdStart="--###START###--",_psError="--ERROR--",_psCmdSeperator="--###ENDCMD###--",_psIdSeperator="--##ID##--",execOptsWin={windowsHide:!0,maxBuffer:104857600,encoding:"UTF-8",env:Object.assign({},process.env,{LANG:"en_US.UTF-8"})},execOptsLinux={maxBuffer:104857600,encoding:"UTF-8",stdio:["pipe","pipe","ignore"]};function toInt(value){let result2=parseInt(value,10);if(isNaN(result2))result2=0;return result2}function splitByNumber(str5){let numberStarted=!1,num="",cpart="";for(let c of str5)if(c>="0"&&c<="9"||numberStarted)numberStarted=!0,num+=c;else cpart+=c;return[cpart,num]}var stringObj=new String,stringReplace=new String().replace,stringToLower=new String().toLowerCase,stringToString=new String().toString,stringSubstr=new String().substr,stringSubstring=new String().substring,stringTrim=new String().trim,stringStartWith=new String().startsWith,mathMin=Math.min;function isFunction(functionToCheck){return functionToCheck&&{}.toString.call(functionToCheck)==="[object Function]"}function unique(obj){let uniques=[],stringify2={};for(let i2=0;i2<obj.length;i2++){let keys=Object.keys(obj[i2]);keys.sort((a,b3)=>{return a-b3});let str5="";for(let j2=0;j2<keys.length;j2++)str5+=JSON.stringify(keys[j2]),str5+=JSON.stringify(obj[i2][keys[j2]]);if(!{}.hasOwnProperty.call(stringify2,str5))uniques.push(obj[i2]),stringify2[str5]=!0}return uniques}function sortByKey(array,keys){return array.sort((a,b3)=>{let x2="",y2="";return keys.forEach((key)=>{x2=x2+a[key],y2=y2+b3[key]}),x2<y2?-1:x2>y2?1:0})}function cores(){if(_cores===0)_cores=os4.cpus().length;return _cores}function getValue(lines,property,separator,trimmed,lineMatch){separator=separator||":",property=property.toLowerCase(),trimmed=trimmed||!1,lineMatch=lineMatch||!1;let result2="";return lines.some((line)=>{let lineLower=line.toLowerCase().replace(/\t/g,"");if(trimmed)lineLower=lineLower.trim();if(lineLower.startsWith(property)&&(lineMatch?lineLower.match(property+separator)||lineLower.match(property+" "+separator):!0)){let parts=trimmed?line.trim().split(separator):line.split(separator);if(parts.length>=2)return parts.shift(),result2=parts.join(separator).trim(),!0}return!1}),result2}function decodeEscapeSequence(str5,base){return base=base||16,str5.replace(/\\x([0-9A-Fa-f]{2})/g,function(){return String.fromCharCode(parseInt(arguments[1],base))})}function detectSplit(str5){let seperator="",part=0;return str5.split("").forEach((element)=>{if(element>="0"&&element<="9"){if(part===1)part++}else{if(part===0)part++;if(part===1)seperator+=element}}),seperator}function parseTime(t2,pmDesignator){pmDesignator=pmDesignator||"",t2=t2.toUpperCase();let hour=0,min=0,splitter=detectSplit(t2),parts=t2.split(splitter);if(parts.length>=2){if(parts[2])parts[1]+=parts[2];let isPM=parts[1]&&parts[1].toLowerCase().indexOf("pm")>-1||parts[1].toLowerCase().indexOf("p.m.")>-1||parts[1].toLowerCase().indexOf("p. m.")>-1||parts[1].toLowerCase().indexOf("n")>-1||parts[1].toLowerCase().indexOf("ch")>-1||parts[1].toLowerCase().indexOf("\xF6s")>-1||pmDesignator&&parts[1].toLowerCase().indexOf(pmDesignator)>-1;return hour=parseInt(parts[0],10),min=parseInt(parts[1],10),hour=isPM&&hour<12?hour+12:hour,("0"+hour).substr(-2)+":"+("0"+min).substr(-2)}}function parseDateTime(dt,culture){let result2={date:"",time:""};culture=culture||{};let dateFormat=(culture.dateFormat||"").toLowerCase(),pmDesignator=culture.pmDesignator||"",parts=dt.split(" ");if(parts[0]){if(parts[0].indexOf("/")>=0){let dtparts=parts[0].split("/");if(dtparts.length===3)if(dtparts[0].length===4)result2.date=dtparts[0]+"-"+("0"+dtparts[1]).substr(-2)+"-"+("0"+dtparts[2]).substr(-2);else if(dtparts[2].length===2)if(dateFormat.indexOf("/d/")>-1||dateFormat.indexOf("/dd/")>-1)result2.date="20"+dtparts[2]+"-"+("0"+dtparts[1]).substr(-2)+"-"+("0"+dtparts[0]).substr(-2);else result2.date="20"+dtparts[2]+"-"+("0"+dtparts[1]).substr(-2)+"-"+("0"+dtparts[0]).substr(-2);else if((dt.toLowerCase().indexOf("pm")>-1||dt.toLowerCase().indexOf("p.m.")>-1||dt.toLowerCase().indexOf("p. m.")>-1||dt.toLowerCase().indexOf("am")>-1||dt.toLowerCase().indexOf("a.m.")>-1||dt.toLowerCase().indexOf("a. m.")>-1||dateFormat.indexOf("/d/")>-1||dateFormat.indexOf("/dd/")>-1)&&dateFormat.indexOf("dd/")!==0)result2.date=dtparts[2]+"-"+("0"+dtparts[0]).substr(-2)+"-"+("0"+dtparts[1]).substr(-2);else result2.date=dtparts[2]+"-"+("0"+dtparts[1]).substr(-2)+"-"+("0"+dtparts[0]).substr(-2)}if(parts[0].indexOf(".")>=0){let dtparts=parts[0].split(".");if(dtparts.length===3)if(dateFormat.indexOf(".d.")>-1||dateFormat.indexOf(".dd.")>-1)result2.date=dtparts[2]+"-"+("0"+dtparts[0]).substr(-2)+"-"+("0"+dtparts[1]).substr(-2);else result2.date=dtparts[2]+"-"+("0"+dtparts[1]).substr(-2)+"-"+("0"+dtparts[0]).substr(-2)}if(parts[0].indexOf("-")>=0){let dtparts=parts[0].split("-");if(dtparts.length===3)result2.date=dtparts[0]+"-"+("0"+dtparts[1]).substr(-2)+"-"+("0"+dtparts[2]).substr(-2)}}if(parts[1]){parts.shift();let time=parts.join(" ");result2.time=parseTime(time,pmDesignator)}return result2}function parseHead(head,rights){let space=rights>0,count=1,from=0,to=0,result2=[];for(let i2=0;i2<head.length;i2++)if(count<=rights){if(/\s/.test(head[i2])&&!space)to=i2-1,result2.push({from,to:to+1,cap:head.substring(from,to+1)}),from=to+2,count++;space=head[i2]===" "}else{if(!/\s/.test(head[i2])&&space){if(to=i2-1,from<to)result2.push({from,to,cap:head.substring(from,to)});from=to+1,count++}space=head[i2]===" "}to=5000,result2.push({from,to,cap:head.substring(from,to)});let len=result2.length;for(let i2=0;i2<len;i2++)if(result2[i2].cap.replace(/\s/g,"").length===0){if(i2+1<len)result2[i2].to=result2[i2+1].to,result2[i2].cap=result2[i2].cap+result2[i2+1].cap,result2.splice(i2+1,1),len=len-1}return result2}function findObjectByKey(array,key,value){for(let i2=0;i2<array.length;i2++)if(array[i2][key]===value)return i2;return-1}function getPowershell(){if(_powerShell="powershell.exe",_windows){let defaultPath=`${WINDIR}\\system32\\WindowsPowerShell\\v1.0\\powershell.exe`;if(fs3.existsSync(defaultPath))_powerShell=defaultPath}}function getVboxmanage(){return _windows?`"${process.env.VBOX_INSTALL_PATH||process.env.VBOX_MSI_INSTALL_PATH}\\VBoxManage.exe"`:"vboxmanage"}function powerShellProceedResults(data){let id="",parts,res="";if(data.indexOf(_psCmdStart)>=0){parts=data.split(_psCmdStart);let parts2=parts[1].split(_psIdSeperator);if(id=parts2[0],parts2.length>1)data=parts2.slice(1).join(_psIdSeperator)}if(data.indexOf(_psCmdSeperator)>=0)parts=data.split(_psCmdSeperator),res=parts[0];let remove=-1;for(let i2=0;i2<_psCmds.length;i2++)if(_psCmds[i2].id===id)remove=i2,_psCmds[i2].callback(res);if(remove>=0)_psCmds.splice(remove,1)}function powerShellStart(){if(!_psChild){if(_psChild=spawn5(_powerShell,["-NoProfile","-NoLogo","-InputFormat","Text","-NoExit","-Command","-"],{stdio:"pipe",windowsHide:!0,maxBuffer:104857600,encoding:"UTF-8",env:Object.assign({},process.env,{LANG:"en_US.UTF-8"})}),_psChild&&_psChild.pid)_psPersistent=!0,_psChild.stdout.on("data",(data)=>{if(_psResult=_psResult+data.toString("utf8"),data.indexOf(_psCmdSeperator)>=0)powerShellProceedResults(_psResult),_psResult=""}),_psChild.stderr.on("data",()=>{powerShellProceedResults(_psResult+_psError)}),_psChild.on("error",()=>{powerShellProceedResults(_psResult+_psError)}),_psChild.on("close",()=>{if(_psChild)_psChild.kill()})}}function powerShellRelease(){try{if(_psChild)_psChild.stdin.write("exit"+os4.EOL),_psChild.stdin.end()}catch{if(_psChild)_psChild.kill()}_psPersistent=!1,_psChild=null}function powerShell(cmd){if(_psPersistent){let id=Math.random().toString(36).substring(2,12);return new Promise((resolve20)=>{process.nextTick(()=>{function callback(data){resolve20(data)}_psCmds.push({id,cmd,callback,start:new Date});try{if(_psChild&&_psChild.pid)_psChild.stdin.write(_psToUTF8+"echo "+_psCmdStart+id+_psIdSeperator+"; "+os4.EOL+cmd+os4.EOL+"echo "+_psCmdSeperator+os4.EOL)}catch{resolve20("")}})})}else{let result2="";return new Promise((resolve20)=>{process.nextTick(()=>{try{let osVersion=os4.release().split(".").map(Number),spanOptions=osVersion[0]<10?["-NoProfile","-NoLogo","-InputFormat","Text","-NoExit","-ExecutionPolicy","Unrestricted","-Command","-"]:["-NoProfile","-NoLogo","-InputFormat","Text","-ExecutionPolicy","Unrestricted","-Command",_psToUTF8+cmd],child=spawn5(_powerShell,spanOptions,{stdio:"pipe",windowsHide:!0,maxBuffer:104857600,encoding:"UTF-8",env:Object.assign({},process.env,{LANG:"en_US.UTF-8"})});if(child&&!child.pid)child.on("error",()=>{resolve20(result2)});if(child&&child.pid){if(child.stdout.on("data",(data)=>{result2=result2+data.toString("utf8")}),child.stderr.on("data",()=>{child.kill(),resolve20(result2)}),child.on("close",()=>{child.kill(),resolve20(result2)}),child.on("error",()=>{child.kill(),resolve20(result2)}),osVersion[0]<10)try{child.stdin.write(_psToUTF8+cmd+os4.EOL),child.stdin.write("exit"+os4.EOL),child.stdin.end()}catch{child.kill(),resolve20(result2)}}else resolve20(result2)}catch{resolve20(result2)}})})}}function execSafe(cmd,args,options){let result2="";return options=options||{},new Promise((resolve20)=>{process.nextTick(()=>{try{let child=spawn5(cmd,args,options);if(child&&!child.pid)child.on("error",()=>{resolve20(result2)});if(child&&child.pid)child.stdout.on("data",(data)=>{result2+=data.toString()}),child.on("close",()=>{child.kill(),resolve20(result2)}),child.on("error",()=>{child.kill(),resolve20(result2)});else resolve20(result2)}catch{resolve20(result2)}})})}function getCodepage(){if(_windows){if(!codepage)try{let parts=execSync18("chcp",execOptsWin).toString().split(`\r
3469
+ `)){if(!line)continue;let parts=line.split("|");if(parts.length<15)continue;let parsed=parsePaneLine(parts);if(!sessionMap.has(parsed.sessionName))sessionMap.set(parsed.sessionName,{...parsed.session,windows:[]});let winKey=`${parsed.sessionName}:${parsed.winIdxStr}`;if(!windowMap.has(winKey)){let win={...parsed.window,panes:[]};windowMap.set(winKey,win),sessionMap.get(parsed.sessionName)?.windows.push(win)}windowMap.get(winKey)?.panes.push(parsed.pane)}return Array.from(sessionMap.values()).sort((a,b3)=>a.name.localeCompare(b3.name))}function isPidAlive3(pid){try{return process.kill(pid,0),!0}catch{return!1}}function allClaudePanes(sessions2){return sessions2.flatMap((s2)=>s2.windows.flatMap((w2)=>w2.panes)).filter((p)=>p.command==="claude"||p.title.includes("claude"))}function detectGaps(executors,sessions2){let deadPidExecutors=executors.filter((e)=>e.pid!=null&&!isPidAlive3(e.pid)),executorPaneIds=new Set(executors.map((e)=>e.tmuxPaneId).filter(Boolean)),claudePanes=allClaudePanes(sessions2),orphanPanes=claudePanes.filter((p)=>!executorPaneIds.has(p.paneId)),linkedCount=executors.filter((e)=>e.tmuxPaneId&&!deadPidExecutors.some((d2)=>d2.id===e.id)).length,deadPaneCount=sessions2.flatMap((s2)=>s2.windows.flatMap((w2)=>w2.panes)).filter((p)=>p.isDead).length;return{deadPidExecutors,orphanPanes,linkedCount,totalExecutors:executors.length,totalClaudePanes:claudePanes.length,deadPaneCount}}async function collectDiagnostics(){let{loadExecutors:loadExecutors2,loadAssignments:loadAssignments2,loadAgentWorkStates:loadAgentWorkStates2}=await Promise.resolve().then(() => exports_db2),sessions2=getTmuxInventory(),executors=await loadExecutors2(),executorIds=executors.map((e)=>e.id),assignments=await loadAssignments2(executorIds),workStates=new Map,alertCount=0;try{workStates=await loadAgentWorkStates2()}catch{}try{let{listActiveDerivedSignals:listActiveDerivedSignals2}=await Promise.resolve().then(() => (init_derived_signals(),exports_derived_signals));alertCount=(await listActiveDerivedSignals2()).length}catch{}let gaps=detectGaps(executors,sessions2);if(gaps.deadPidExecutors.length>0){let{terminateExecutor:terminateExecutor2}=await Promise.resolve().then(() => (init_executor_registry(),exports_executor_registry)),{getConnection:getConnection2}=await Promise.resolve().then(() => (init_db(),exports_db)),sql=await getConnection2();await Promise.allSettled(gaps.deadPidExecutors.map(async(exec3)=>{if(await terminateExecutor2(exec3.id),exec3.agentId)await sql`UPDATE agents SET current_executor_id = NULL WHERE current_executor_id = ${exec3.id}`}))}return{sessions:sessions2,executors,assignments,gaps,workStates,alertCount,timestamp:Date.now()}}var init_diagnostics=__esm(()=>{init_ensure_tmux()});import{existsSync as existsSync67,readFileSync as readFileSync41,unlinkSync as unlinkSync13}from"fs";import{homedir as homedir44}from"os";import{join as join83}from"path";function getInitialAgentFilePath(){let genieHome6=process.env.GENIE_HOME??join83(homedir44(),".genie");return join83(genieHome6,"tui-initial-agent")}function consumeInitialAgentSignal(){let filePath=getInitialAgentFilePath();if(!existsSync67(filePath))return;try{let agent=readFileSync41(filePath,"utf-8").trim();return unlinkSync13(filePath),agent||void 0}catch{return}}var init_initial_agent=()=>{};function toSessionName(agentName){return agentName.replace(/\//g,"-")}function buildSessionTree(snapshot){let executorByPaneId=new Map;for(let exec3 of snapshot.executors)if(exec3.tmuxPaneId)executorByPaneId.set(exec3.tmuxPaneId,exec3);return snapshot.sessions.filter((s2)=>s2.name!=="genie-tui").map((session)=>sessionToNode(session,executorByPaneId))}function buildWorkspaceTree(input){let{agentNames,sessions:sessions2,executors}=input,workStates=input.workStates??new Map,sessionByName=new Map;for(let s2 of sessions2)if(s2.name!=="genie-tui")sessionByName.set(s2.name,s2);let executorByPaneId=new Map;for(let exec3 of executors)if(exec3.tmuxPaneId)executorByPaneId.set(exec3.tmuxPaneId,exec3);let executorsByAgent=new Map;for(let exec3 of executors){let name=exec3.agentName??exec3.metadata?.agentName;if(typeof name==="string"){let list2=executorsByAgent.get(name)??[];list2.push(exec3),executorsByAgent.set(name,list2)}}let{topLevel,subsByParent}=groupAgentNames(agentNames),nodes=topLevel.map((name)=>{let node=buildAgentNode(name,sessionByName.get(toSessionName(name)),executorsByAgent.get(name)??[],executorByPaneId,workStates.get(name),"canonical");return appendSubAgentNodes(node,subsByParent.get(name),sessionByName,executorsByAgent,executorByPaneId,workStates),node}),claimedSessions=new Set(agentNames.map(toSessionName));for(let[name,session]of sessionByName)if(!claimedSessions.has(name))nodes.push(sessionToNode(session,executorByPaneId));return nodes}function resolvePreferredWindowIndex(session,agentName){let windows=[...session.windows].sort((a,b3)=>a.index-b3.index),hasClaudePane=(window2)=>window2.panes.some((pane)=>!pane.isDead&&(pane.command==="claude"||pane.title.includes("claude")));return(windows.find((window2)=>window2.active&&hasClaudePane(window2))??(agentName?windows.find((window2)=>window2.name===agentName):void 0)??windows.find((window2)=>hasClaudePane(window2))??windows.find((window2)=>window2.active&&window2.index!==0)??windows.find((window2)=>window2.index!==0))?.index}function hasLiveClaudeWindow(session){return session.windows.some((window2)=>window2.panes.some((pane)=>!pane.isDead&&(pane.command==="claude"||pane.title.includes("claude"))))}function groupAgentNames(names){let topLevel=[],subsByParent=new Map;for(let name of names){let slashIdx=name.indexOf("/");if(slashIdx===-1)topLevel.push(name);else{let parent=name.slice(0,slashIdx),subs=subsByParent.get(parent)??[];subs.push(name),subsByParent.set(parent,subs)}}return{topLevel,subsByParent}}function appendSubAgentNodes(parent,subs,sessionByName,executorsByAgent,executorByPaneId,workStates){if(!subs)return;for(let subName of subs){let subLabel=subName.slice(subName.indexOf("/")+1),subNode=buildAgentNode(subName,sessionByName.get(toSessionName(subName)),executorsByAgent.get(subName)??[],executorByPaneId,workStates.get(subName),"subagent");subNode.label=subLabel,subNode.depth=1,parent.children.push(subNode)}}function countClaudePanes(session){return session.windows.reduce((sum,w2)=>sum+w2.panes.filter((p)=>p.command==="claude"||p.title.includes("claude")).length,0)}function buildAgentNode(name,session,agentExecutors,executorByPaneId,workState,kind){let wsState=deriveWsAgentState(session,agentExecutors),attachWindowIndex=session?resolvePreferredWindowIndex(session,name):void 0,children=[];if(session)for(let win of session.windows){if(win.index===0)continue;children.push(windowToNode(session.name,win,executorByPaneId))}let node={id:`agent:${name}`,type:"agent",label:name,depth:0,expanded:children.length>0,children,data:{sessionName:toSessionName(name),windowCount:session?session.windows.length:0,attachWindowIndex,provider:agentExecutors[0]?.provider??null},activePanes:session?countClaudePanes(session):0,agentState:agentExecutors.length>0?deriveExecutorState(agentExecutors):void 0,wsAgentState:wsState,kind};if(workState)node.workState=workState;return node}function deriveWsAgentState(session,agentExecutors){if(!session)return"stopped";if(hasLiveClaudeWindow(session))return"running";for(let exec3 of agentExecutors){if(exec3.state==="error"||exec3.state==="terminated")return"error";if(exec3.state==="spawning")return"spawning"}if(agentExecutors.length===0)return"stopped";return"running"}function deriveExecutorState(execs){for(let e of execs)if(e.state==="working")return"working";for(let e of execs)if(e.state==="permission")return"permission";for(let e of execs)if(e.state==="error"||e.state==="terminated")return"error";return"idle"}function sessionToNode(session,executorMap){let claudePanes=session.windows.reduce((sum,w2)=>sum+w2.panes.filter((p)=>p.command==="claude"||p.title.includes("claude")).length,0);return{id:`session:${session.name}`,type:"session",label:session.name,depth:0,expanded:!0,children:session.windows.map((w2)=>windowToNode(session.name,w2,executorMap)),data:{attached:session.attached,windowCount:session.windowCount},activePanes:claudePanes,agentState:void 0,wsAgentState:void 0}}function windowToNode(sessionName,window2,executorMap){let activePanes=window2.panes.filter((p)=>!p.isDead&&(p.command==="claude"||p.title.includes("claude"))).length;return{id:`window:${sessionName}:${window2.index}`,type:"window",label:window2.name,depth:1,expanded:!0,children:window2.panes.map((p)=>paneToNode(sessionName,window2.index,p,executorMap)),data:{active:window2.active,paneCount:window2.paneCount},activePanes,agentState:void 0,wsAgentState:void 0}}function paneToNode(sessionName,windowIndex,pane,executorMap){let executor=executorMap.get(pane.paneId),isClaude=pane.command==="claude"||pane.title.includes("claude");return{id:`pane:${pane.paneId}`,type:"pane",label:derivePaneLabel(pane,executor,isClaude),depth:2,expanded:!1,children:[],data:{command:pane.command,isDead:pane.isDead,pid:pane.pid,size:pane.size,paneId:pane.paneId,sessionName,windowIndex},activePanes:0,agentState:derivePaneState(pane,executor),wsAgentState:void 0}}function derivePaneLabel(pane,executor,isClaude){if(executor?.agentName&&executor?.team)return`${executor.team}/${executor.agentName}`;if(executor?.agentName)return executor.agentName;if(pane.title&&pane.title!==pane.command&&!isDefaultPaneTitle(pane.title))return pane.title;if(isClaude)return"claude";return pane.command}function isDefaultPaneTitle(title){let hostname2=__require("os").hostname();return title===hostname2||title.startsWith(`${hostname2}.`)||title.startsWith("\u2733")}function derivePaneState(pane,executor){if(pane.isDead)return"error";if(!executor)return;let s2=executor.state;if(s2==="working")return"working";if(s2==="idle"||s2==="spawning")return"idle";if(s2==="permission")return"permission";if(s2==="error"||s2==="terminated")return"error";return}function getSessionTarget(node){if(node.type==="agent"){let sessionName=node.data.sessionName,attachWindowIndex=node.data.attachWindowIndex;if(typeof attachWindowIndex==="number")return{sessionName,windowIndex:attachWindowIndex};let firstWindowChild=node.children.find((child)=>child.type==="window");if(firstWindowChild){let parts=firstWindowChild.id.split(":");return{sessionName,windowIndex:Number(parts[2])}}return{sessionName}}if(node.type==="session")return{sessionName:node.label};if(node.type==="window"){let parts=node.id.split(":");return{sessionName:parts[1],windowIndex:Number(parts[2])}}if(node.type==="pane"){let data=node.data;return{sessionName:data.sessionName,windowIndex:data.windowIndex}}return null}var icons;var init_theme2=__esm(()=>{init_genie_tokens();init_genie_tokens();icons={org:"\u25C6",project:"\u25B8",projectOpen:"\u25BE",board:"\u2261",boardOpen:"\u2261",column:"\u2502",task:"\u25CB",taskActive:"\u25CF",taskDone:"\u2713",agent:"\u25B6",collapsed:"\u25B8",expanded:"\u25BE"}});function flattenTree(nodes){let result2=[];function walk(node,depth){if(result2.push({node,depth,visible:!0}),node.expanded)for(let child of node.children)walk(child,depth+1)}for(let node of nodes)walk(node,0);return result2}function toggleNode(nodes,id){return nodes.map((node)=>{if(node.id===id)return{...node,expanded:!node.expanded};return{...node,children:toggleNode(node.children,id)}})}var import_jsx_dev_runtime2;var init_jsx_dev_runtime=__esm(()=>{import_jsx_dev_runtime2=__toESM(require_react_jsx_dev_runtime_development(),1)});function CliPreviewLine({intent,hint=DEFAULT_HINT}){let cli=null,errorMessage=null;try{cli=buildSpawnInvocation(intent).cli}catch(err){errorMessage=err instanceof Error?err.message:String(err)}if(errorMessage!==null)return import_jsx_dev_runtime2.jsxDEV("box",{flexDirection:"column",paddingX:1,children:[import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.error,children:`\u26A0 ${errorMessage}`},void 0,!1,void 0,this)},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:hint},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return import_jsx_dev_runtime2.jsxDEV("box",{flexDirection:"column",paddingX:1,children:[import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.accent,children:"\u25B6 "},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.text,children:cli},void 0,!1,void 0,this)]},void 0,!0,void 0,this),import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:hint},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var DEFAULT_HINT="Enter to run \xB7 Esc to cancel";var init_CliPreviewLine=__esm(()=>{init_spawn_invocation();init_theme2();init_jsx_dev_runtime()});async function defaultLoadAgents(){let{spawn:spawn5}=await import("child_process"),bunPath=process.execPath||"bun",genieBin=process.argv[1],[command,args]=genieBin&&genieBin!=="genie"?[bunPath,[genieBin,"dir","ls","--json"]]:["genie",["dir","ls","--json"]],stdout=await new Promise((resolve20,reject)=>{let child=spawn5(command,args,{stdio:["ignore","pipe","ignore"]}),chunks=[];child.stdout.on("data",(c)=>chunks.push(c)),child.on("error",reject),child.on("close",()=>resolve20(Buffer.concat(chunks).toString("utf-8")))});return JSON.parse(stdout).map((e)=>typeof e?.name==="string"?{name:e.name}:null).filter((e)=>e!==null)}function buildIntent(agentName,target){let intent={kind:"spawn-agent",name:agentName,session:target.session};if(target.window!==void 0&&target.window.length>0)intent.window=target.window;else intent.newWindow=!0;return intent}function applyFilter2(agents,filter){if(filter.length===0)return agents;let needle=filter.toLowerCase();return agents.filter((a)=>a.name.toLowerCase().includes(needle))}function handleControlKey(key,deps){if(key.name==="escape")return deps.onCancel(),!0;if(key.name==="up"&&deps.filteredLength>0)return deps.setSelectedIndex((prev)=>prev<=0?deps.filteredLength-1:prev-1),!0;if(key.name==="down"&&deps.filteredLength>0)return deps.setSelectedIndex((prev)=>prev>=deps.filteredLength-1?0:prev+1),!0;if((key.name==="return"||key.name==="enter")&&deps.highlighted)return deps.onConfirm(buildIntent(deps.highlighted.name,deps.target)),!0;if(key.name==="backspace")return deps.setFilter((prev)=>prev.slice(0,-1)),!0;if(key.name==="up"||key.name==="down"||key.name==="return"||key.name==="enter")return!0;return!1}function appendCharIfPrintable(key,setFilter){let ch=key.sequence??key.name;if(typeof ch==="string"&&ch.length===1&&ch>=" "&&ch!=="\x7F")setFilter((prev)=>prev+ch)}function AgentPicker({target,onConfirm,onCancel,loadAgents=defaultLoadAgents}){let[agents,setAgents]=import_react14.useState(null),[loadError,setLoadError]=import_react14.useState(null),[filter,setFilter]=import_react14.useState(""),[selectedIndex,setSelectedIndex]=import_react14.useState(0);import_react14.useEffect(()=>{let active=!0;return loadAgents().then((list2)=>{if(!active)return;setAgents(list2)}).catch((err)=>{if(!active)return;setLoadError(err instanceof Error?err.message:String(err)),setAgents([])}),()=>{active=!1}},[loadAgents]);let filtered=import_react14.useMemo(()=>agents?applyFilter2(agents,filter):[],[agents,filter]);import_react14.useEffect(()=>{if(filtered.length===0){if(selectedIndex!==0)setSelectedIndex(0);return}if(selectedIndex>=filtered.length)setSelectedIndex(filtered.length-1)},[filtered.length,selectedIndex]);let highlighted=filtered[selectedIndex],previewIntent=highlighted?buildIntent(highlighted.name,target):null,handleKey=import_react14.useCallback((key)=>{if(handleControlKey(key,{onCancel,onConfirm,target,highlighted,filteredLength:filtered.length,setSelectedIndex,setFilter}))return;if(key.ctrl||key.meta)return;appendCharIfPrintable(key,setFilter)},[filtered.length,highlighted,onCancel,onConfirm,target]);useKeyboard(handleKey);let targetLabel=target.window?target.window:target.session,modeHint=target.window?"in window":"new window in session",statusText=agents===null?"Loading agents\u2026":loadError!==null?`Load failed: ${loadError}`:null;return import_jsx_dev_runtime2.jsxDEV("box",{position:"absolute",width:"100%",height:"100%",justifyContent:"center",alignItems:"center",backgroundColor:palette.bgOverlay,children:import_jsx_dev_runtime2.jsxDEV("box",{border:!0,borderStyle:"rounded",borderColor:palette.borderActive,backgroundColor:palette.bgRaised,width:"100%",flexDirection:"column",paddingX:1,paddingY:1,gap:1,children:[import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.accent,children:"Spawn here"},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:` \u2014 ${modeHint} `},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.text,children:targetLabel},void 0,!1,void 0,this)]},void 0,!0,void 0,this),import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:"Filter: "},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.text,children:filter.length>0?filter:" "},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:filter.length>0?"":"(type to narrow)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),statusText!==null?import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:loadError!==null?palette.error:palette.textDim,children:statusText},void 0,!1,void 0,this)},void 0,!1,void 0,this):filtered.length===0?import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:"No agents registered"},void 0,!1,void 0,this)},void 0,!1,void 0,this):import_jsx_dev_runtime2.jsxDEV("box",{flexDirection:"column",children:filtered.map((agent,i2)=>import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:i2===selectedIndex?palette.accent:palette.textDim,children:i2===selectedIndex?"\u25B8 ":" "},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:i2===selectedIndex?palette.accentBright:palette.textDim,children:agent.name},void 0,!1,void 0,this)]},agent.name,!0,void 0,this))},void 0,!1,void 0,this),previewIntent!==null?import_jsx_dev_runtime2.jsxDEV(CliPreviewLine,{intent:previewIntent},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var import_react14;var init_AgentPicker=__esm(async()=>{init_theme2();init_CliPreviewLine();init_jsx_dev_runtime();await init_react();import_react14=__toESM(require_react_development(),1)});function ContextMenu({items,onAction,onClose,positionY=0}){let[selectedIndex,setSelectedIndex]=import_react16.useState(0),[inputMode,setInputMode]=import_react16.useState(!1),inputRef=import_react16.useRef(""),selectOptions=items.map((item)=>({name:`${item.label}${item.shortcut?` ${item.shortcut}`:""}`,description:"",value:item.action}));useKeyboard(import_react16.useCallback((key)=>{if(inputMode)return;if(key.name==="escape"){onClose();return}for(let item of items)if(item.shortcut&&key.name===item.shortcut.toLowerCase()){if(item.needsInput)setInputMode(!0),inputRef.current="",setSelectedIndex(items.indexOf(item));else onAction(item.action);return}},[inputMode,items,onAction,onClose]));let handleSelect=import_react16.useCallback((_index,option)=>{let value=option?.value;if(!value)return;if(items.find((i2)=>i2.action===value)?.needsInput){setInputMode(!0),inputRef.current="";return}onAction(value)},[items,onAction]),handleInputChange=import_react16.useCallback((v2)=>{inputRef.current=v2},[]),handleInputSubmit=import_react16.useCallback(()=>{let item=items[selectedIndex],value=inputRef.current.trim();if(item&&value)onAction(item.action,value);setInputMode(!1),inputRef.current=""},[items,selectedIndex,onAction]);if(items.length===0)return onClose(),null;return import_jsx_dev_runtime2.jsxDEV("box",{position:"absolute",width:"100%",height:"100%",onMouseDown:()=>onClose(),children:[positionY>0?import_jsx_dev_runtime2.jsxDEV("box",{height:positionY},void 0,!1,void 0,this):null,import_jsx_dev_runtime2.jsxDEV("box",{border:!0,borderStyle:"rounded",borderColor:palette.borderActive,backgroundColor:palette.bgRaised,width:"100%",height:inputMode?items.length+5:items.length+2,flexDirection:"column",onMouseDown:(e)=>e.stopPropagation?.(),children:[import_jsx_dev_runtime2.jsxDEV("select",{options:selectOptions,selectedIndex,onSelect:handleSelect,onChange:(index)=>setSelectedIndex(index),focused:!inputMode,height:items.length,showDescription:!1,selectedBackgroundColor:palette.accentDim,selectedTextColor:palette.accentBright},void 0,!1,void 0,this),inputMode?import_jsx_dev_runtime2.jsxDEV("box",{paddingX:1,height:3,flexDirection:"column",children:[import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:[items[selectedIndex]?.label??"Input",":"]},void 0,!0,void 0,this)},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("input",{onChange:handleInputChange,onSubmit:handleInputSubmit,placeholder:"Type and press Enter...",focused:!0,width:28,backgroundColor:palette.bg,textColor:palette.text,placeholderColor:palette.textMuted},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var import_react16;var init_ContextMenu=__esm(async()=>{init_theme2();init_jsx_dev_runtime();await init_react();import_react16=__toESM(require_react_development(),1)});function buildRows(sessions2){let rows=[];for(let session of sessions2){if(session.name===TUI_SESSION2)continue;rows.push({kind:"session",sessionName:session.name,label:`${session.name} (new window)`});for(let win of session.windows){let windowLabel=win.name?` ${win.name}`:"";rows.push({kind:"window",sessionName:session.name,windowIndex:win.index,label:` ${session.name}:${win.index}${windowLabel}`})}}return rows}function pickFromRow(row){if(row.kind==="session")return{kind:"session",sessionName:row.sessionName};return{kind:"window",sessionName:row.sessionName,windowIndex:row.windowIndex}}function picksEqual(a,b3){if(a.kind==="session"&&b3.kind==="session")return a.sessionName===b3.sessionName;if(a.kind==="window"&&b3.kind==="window")return a.sessionName===b3.sessionName&&a.windowIndex===b3.windowIndex;return!1}function pickExists(pick,sessions2){let session=sessions2.find((s2)=>s2.name===pick.sessionName);if(!session)return!1;if(pick.kind==="session")return!0;return session.windows.some((w2)=>w2.index===pick.windowIndex)}function pickToIntent(agentName,pick){if(!pick)return{kind:"spawn-agent",name:agentName};if(pick.kind==="session")return{kind:"spawn-agent",name:agentName,session:pick.sessionName,newWindow:!0};return{kind:"spawn-agent",name:agentName,window:`${pick.sessionName}:${pick.windowIndex}`}}function pickLabel(pick){if(pick.kind==="session")return pick.sessionName;return`${pick.sessionName}:${pick.windowIndex}`}function SpawnTargetPicker({agentName,sessions:sessions2,onConfirm,onCancel}){let rows=import_react18.useMemo(()=>buildRows(sessions2),[sessions2]),[pick,setPick]=import_react18.useState(()=>rows[0]?pickFromRow(rows[0]):null),[staleError,setStaleError]=import_react18.useState(null);if(pick===null&&rows[0])setPick(pickFromRow(rows[0]));let selectedIndex=import_react18.useMemo(()=>{if(!pick)return-1;return rows.findIndex((r)=>picksEqual(pick,r))},[pick,rows]),movePick=import_react18.useCallback((delta)=>{if(rows.length===0)return;let next=((selectedIndex<0?0:selectedIndex)+delta+rows.length)%rows.length;setPick(pickFromRow(rows[next])),setStaleError(null)},[rows,selectedIndex]),handleEnter=import_react18.useCallback(()=>{if(!pick)return;if(!pickExists(pick,sessions2)){setStaleError(`Target "${pickLabel(pick)}" no longer exists \u2014 pick another.`);return}onConfirm(pickToIntent(agentName,pick))},[pick,sessions2,agentName,onConfirm]);useKeyboard(import_react18.useCallback((key)=>{let n=key.name;if(n==="escape"){onCancel();return}if(n==="enter"||n==="return"){handleEnter();return}if(n==="up"||n==="k")movePick(-1);else if(n==="down"||n==="j")movePick(1)},[onCancel,handleEnter,movePick]));let intent=import_react18.useMemo(()=>pickToIntent(agentName,pick),[agentName,pick]);return import_jsx_dev_runtime2.jsxDEV("box",{position:"absolute",width:"100%",height:"100%",justifyContent:"center",alignItems:"center",backgroundColor:palette.bgOverlay,children:import_jsx_dev_runtime2.jsxDEV("box",{border:!0,borderStyle:"rounded",borderColor:palette.borderActive,backgroundColor:palette.bgRaised,paddingX:2,paddingY:1,flexDirection:"column",width:"100%",gap:1,children:[import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.accent,children:`Spawn "${agentName}" into\u2026`},void 0,!1,void 0,this)},void 0,!1,void 0,this),rows.length===0?import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:"No tmux sessions available. Press Esc to cancel."},void 0,!1,void 0,this)},void 0,!1,void 0,this):import_jsx_dev_runtime2.jsxDEV("box",{flexDirection:"column",children:rows.map((row,i2)=>import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:i2===selectedIndex?palette.accent:palette.text,children:[i2===selectedIndex?"> ":" ",row.label]},void 0,!0,void 0,this)},`${row.kind}:${row.sessionName}:${row.kind==="window"?row.windowIndex:""}`,!1,void 0,this))},void 0,!1,void 0,this),staleError?import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.error,children:`\u26A0 ${staleError}`},void 0,!1,void 0,this)},void 0,!1,void 0,this):null,import_jsx_dev_runtime2.jsxDEV(CliPreviewLine,{intent},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var import_react18,TUI_SESSION2="genie-tui";var init_SpawnTargetPicker=__esm(async()=>{init_theme2();init_CliPreviewLine();init_jsx_dev_runtime();await init_react();import_react18=__toESM(require_react_development(),1)});var require_package=__commonJS((exports,module2)=>{module2.exports={name:"systeminformation",version:"5.31.5",description:"Advanced, lightweight system and OS information library",license:"MIT",author:"Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",homepage:"https://systeminformation.io",main:"./lib/index.js",type:"commonjs",bin:{systeminformation:"lib/cli.js"},types:"./lib/index.d.ts",scripts:{test:"node ./test/test.js",testDeno:"deno run -A ./test/test.js"},files:["lib/"],keywords:["system information","sysinfo","monitor","monitoring","os","linux","osx","windows","freebsd","openbsd","netbsd","cpu","cpuload","physical cores","logical cores","processor","cores","threads","socket type","memory","file system","fsstats","diskio","block devices","netstats","network","network interfaces","network connections","network stats","iface","printer","processes","users","internet","battery","docker","docker stats","docker processes","graphics","graphic card","graphic controller","gpu","display","smart","disk layout","usb","audio","bluetooth","wifi","wifinetworks","virtual box","virtualbox","vm","backend","hardware","BIOS","chassis"],repository:{type:"git",url:"git+https://github.com/sebhildebrandt/systeminformation.git"},funding:{type:"Buy me a coffee",url:"https://www.buymeacoffee.com/systeminfo"},os:["darwin","linux","win32","freebsd","openbsd","netbsd","sunos","android"],engines:{node:">=8.0.0"}}});var require_util3=__commonJS((exports)=>{var os4=__require("os"),fs3=__require("fs"),path6=__require("path"),spawn5=__require("child_process").spawn,exec3=__require("child_process").exec,execSync18=__require("child_process").execSync,util4=__require("util"),_platform=process.platform,_linux=_platform==="linux"||_platform==="android",_darwin=_platform==="darwin",_windows=_platform==="win32",_freebsd=_platform==="freebsd",_openbsd=_platform==="openbsd",_netbsd=_platform==="netbsd",_cores=0,codepage="",_smartMonToolsInstalled=null,_rpi_cpuinfo=null,WINDIR=process.env.WINDIR||"C:\\Windows",_psChild,_psResult="",_psCmds=[],_psPersistent=!1,_powerShell="",_psToUTF8="$OutputEncoding = [System.Console]::OutputEncoding = [System.Console]::InputEncoding = [System.Text.Encoding]::UTF8 ; ",_psCmdStart="--###START###--",_psError="--ERROR--",_psCmdSeperator="--###ENDCMD###--",_psIdSeperator="--##ID##--",execOptsWin={windowsHide:!0,maxBuffer:104857600,encoding:"UTF-8",env:Object.assign({},process.env,{LANG:"en_US.UTF-8"})},execOptsLinux={maxBuffer:104857600,encoding:"UTF-8",stdio:["pipe","pipe","ignore"]};function toInt(value){let result2=parseInt(value,10);if(isNaN(result2))result2=0;return result2}function splitByNumber(str5){let numberStarted=!1,num="",cpart="";for(let c of str5)if(c>="0"&&c<="9"||numberStarted)numberStarted=!0,num+=c;else cpart+=c;return[cpart,num]}var stringObj=new String,stringReplace=new String().replace,stringToLower=new String().toLowerCase,stringToString=new String().toString,stringSubstr=new String().substr,stringSubstring=new String().substring,stringTrim=new String().trim,stringStartWith=new String().startsWith,mathMin=Math.min;function isFunction(functionToCheck){return functionToCheck&&{}.toString.call(functionToCheck)==="[object Function]"}function unique(obj){let uniques=[],stringify2={};for(let i2=0;i2<obj.length;i2++){let keys=Object.keys(obj[i2]);keys.sort((a,b3)=>{return a-b3});let str5="";for(let j2=0;j2<keys.length;j2++)str5+=JSON.stringify(keys[j2]),str5+=JSON.stringify(obj[i2][keys[j2]]);if(!{}.hasOwnProperty.call(stringify2,str5))uniques.push(obj[i2]),stringify2[str5]=!0}return uniques}function sortByKey(array,keys){return array.sort((a,b3)=>{let x2="",y2="";return keys.forEach((key)=>{x2=x2+a[key],y2=y2+b3[key]}),x2<y2?-1:x2>y2?1:0})}function cores(){if(_cores===0)_cores=os4.cpus().length;return _cores}function getValue(lines,property,separator,trimmed,lineMatch){separator=separator||":",property=property.toLowerCase(),trimmed=trimmed||!1,lineMatch=lineMatch||!1;let result2="";return lines.some((line)=>{let lineLower=line.toLowerCase().replace(/\t/g,"");if(trimmed)lineLower=lineLower.trim();if(lineLower.startsWith(property)&&(lineMatch?lineLower.match(property+separator)||lineLower.match(property+" "+separator):!0)){let parts=trimmed?line.trim().split(separator):line.split(separator);if(parts.length>=2)return parts.shift(),result2=parts.join(separator).trim(),!0}return!1}),result2}function decodeEscapeSequence(str5,base){return base=base||16,str5.replace(/\\x([0-9A-Fa-f]{2})/g,function(){return String.fromCharCode(parseInt(arguments[1],base))})}function detectSplit(str5){let seperator="",part=0;return str5.split("").forEach((element)=>{if(element>="0"&&element<="9"){if(part===1)part++}else{if(part===0)part++;if(part===1)seperator+=element}}),seperator}function parseTime(t2,pmDesignator){pmDesignator=pmDesignator||"",t2=t2.toUpperCase();let hour=0,min=0,splitter=detectSplit(t2),parts=t2.split(splitter);if(parts.length>=2){if(parts[2])parts[1]+=parts[2];let isPM=parts[1]&&parts[1].toLowerCase().indexOf("pm")>-1||parts[1].toLowerCase().indexOf("p.m.")>-1||parts[1].toLowerCase().indexOf("p. m.")>-1||parts[1].toLowerCase().indexOf("n")>-1||parts[1].toLowerCase().indexOf("ch")>-1||parts[1].toLowerCase().indexOf("\xF6s")>-1||pmDesignator&&parts[1].toLowerCase().indexOf(pmDesignator)>-1;return hour=parseInt(parts[0],10),min=parseInt(parts[1],10),hour=isPM&&hour<12?hour+12:hour,("0"+hour).substr(-2)+":"+("0"+min).substr(-2)}}function parseDateTime(dt,culture){let result2={date:"",time:""};culture=culture||{};let dateFormat=(culture.dateFormat||"").toLowerCase(),pmDesignator=culture.pmDesignator||"",parts=dt.split(" ");if(parts[0]){if(parts[0].indexOf("/")>=0){let dtparts=parts[0].split("/");if(dtparts.length===3)if(dtparts[0].length===4)result2.date=dtparts[0]+"-"+("0"+dtparts[1]).substr(-2)+"-"+("0"+dtparts[2]).substr(-2);else if(dtparts[2].length===2)if(dateFormat.indexOf("/d/")>-1||dateFormat.indexOf("/dd/")>-1)result2.date="20"+dtparts[2]+"-"+("0"+dtparts[1]).substr(-2)+"-"+("0"+dtparts[0]).substr(-2);else result2.date="20"+dtparts[2]+"-"+("0"+dtparts[1]).substr(-2)+"-"+("0"+dtparts[0]).substr(-2);else if((dt.toLowerCase().indexOf("pm")>-1||dt.toLowerCase().indexOf("p.m.")>-1||dt.toLowerCase().indexOf("p. m.")>-1||dt.toLowerCase().indexOf("am")>-1||dt.toLowerCase().indexOf("a.m.")>-1||dt.toLowerCase().indexOf("a. m.")>-1||dateFormat.indexOf("/d/")>-1||dateFormat.indexOf("/dd/")>-1)&&dateFormat.indexOf("dd/")!==0)result2.date=dtparts[2]+"-"+("0"+dtparts[0]).substr(-2)+"-"+("0"+dtparts[1]).substr(-2);else result2.date=dtparts[2]+"-"+("0"+dtparts[1]).substr(-2)+"-"+("0"+dtparts[0]).substr(-2)}if(parts[0].indexOf(".")>=0){let dtparts=parts[0].split(".");if(dtparts.length===3)if(dateFormat.indexOf(".d.")>-1||dateFormat.indexOf(".dd.")>-1)result2.date=dtparts[2]+"-"+("0"+dtparts[0]).substr(-2)+"-"+("0"+dtparts[1]).substr(-2);else result2.date=dtparts[2]+"-"+("0"+dtparts[1]).substr(-2)+"-"+("0"+dtparts[0]).substr(-2)}if(parts[0].indexOf("-")>=0){let dtparts=parts[0].split("-");if(dtparts.length===3)result2.date=dtparts[0]+"-"+("0"+dtparts[1]).substr(-2)+"-"+("0"+dtparts[2]).substr(-2)}}if(parts[1]){parts.shift();let time=parts.join(" ");result2.time=parseTime(time,pmDesignator)}return result2}function parseHead(head,rights){let space=rights>0,count=1,from=0,to=0,result2=[];for(let i2=0;i2<head.length;i2++)if(count<=rights){if(/\s/.test(head[i2])&&!space)to=i2-1,result2.push({from,to:to+1,cap:head.substring(from,to+1)}),from=to+2,count++;space=head[i2]===" "}else{if(!/\s/.test(head[i2])&&space){if(to=i2-1,from<to)result2.push({from,to,cap:head.substring(from,to)});from=to+1,count++}space=head[i2]===" "}to=5000,result2.push({from,to,cap:head.substring(from,to)});let len=result2.length;for(let i2=0;i2<len;i2++)if(result2[i2].cap.replace(/\s/g,"").length===0){if(i2+1<len)result2[i2].to=result2[i2+1].to,result2[i2].cap=result2[i2].cap+result2[i2+1].cap,result2.splice(i2+1,1),len=len-1}return result2}function findObjectByKey(array,key,value){for(let i2=0;i2<array.length;i2++)if(array[i2][key]===value)return i2;return-1}function getPowershell(){if(_powerShell="powershell.exe",_windows){let defaultPath=`${WINDIR}\\system32\\WindowsPowerShell\\v1.0\\powershell.exe`;if(fs3.existsSync(defaultPath))_powerShell=defaultPath}}function getVboxmanage(){return _windows?`"${process.env.VBOX_INSTALL_PATH||process.env.VBOX_MSI_INSTALL_PATH}\\VBoxManage.exe"`:"vboxmanage"}function powerShellProceedResults(data){let id="",parts,res="";if(data.indexOf(_psCmdStart)>=0){parts=data.split(_psCmdStart);let parts2=parts[1].split(_psIdSeperator);if(id=parts2[0],parts2.length>1)data=parts2.slice(1).join(_psIdSeperator)}if(data.indexOf(_psCmdSeperator)>=0)parts=data.split(_psCmdSeperator),res=parts[0];let remove=-1;for(let i2=0;i2<_psCmds.length;i2++)if(_psCmds[i2].id===id)remove=i2,_psCmds[i2].callback(res);if(remove>=0)_psCmds.splice(remove,1)}function powerShellStart(){if(!_psChild){if(_psChild=spawn5(_powerShell,["-NoProfile","-NoLogo","-InputFormat","Text","-NoExit","-Command","-"],{stdio:"pipe",windowsHide:!0,maxBuffer:104857600,encoding:"UTF-8",env:Object.assign({},process.env,{LANG:"en_US.UTF-8"})}),_psChild&&_psChild.pid)_psPersistent=!0,_psChild.stdout.on("data",(data)=>{if(_psResult=_psResult+data.toString("utf8"),data.indexOf(_psCmdSeperator)>=0)powerShellProceedResults(_psResult),_psResult=""}),_psChild.stderr.on("data",()=>{powerShellProceedResults(_psResult+_psError)}),_psChild.on("error",()=>{powerShellProceedResults(_psResult+_psError)}),_psChild.on("close",()=>{if(_psChild)_psChild.kill()})}}function powerShellRelease(){try{if(_psChild)_psChild.stdin.write("exit"+os4.EOL),_psChild.stdin.end()}catch{if(_psChild)_psChild.kill()}_psPersistent=!1,_psChild=null}function powerShell(cmd){if(_psPersistent){let id=Math.random().toString(36).substring(2,12);return new Promise((resolve20)=>{process.nextTick(()=>{function callback(data){resolve20(data)}_psCmds.push({id,cmd,callback,start:new Date});try{if(_psChild&&_psChild.pid)_psChild.stdin.write(_psToUTF8+"echo "+_psCmdStart+id+_psIdSeperator+"; "+os4.EOL+cmd+os4.EOL+"echo "+_psCmdSeperator+os4.EOL)}catch{resolve20("")}})})}else{let result2="";return new Promise((resolve20)=>{process.nextTick(()=>{try{let osVersion=os4.release().split(".").map(Number),spanOptions=osVersion[0]<10?["-NoProfile","-NoLogo","-InputFormat","Text","-NoExit","-ExecutionPolicy","Unrestricted","-Command","-"]:["-NoProfile","-NoLogo","-InputFormat","Text","-ExecutionPolicy","Unrestricted","-Command",_psToUTF8+cmd],child=spawn5(_powerShell,spanOptions,{stdio:"pipe",windowsHide:!0,maxBuffer:104857600,encoding:"UTF-8",env:Object.assign({},process.env,{LANG:"en_US.UTF-8"})});if(child&&!child.pid)child.on("error",()=>{resolve20(result2)});if(child&&child.pid){if(child.stdout.on("data",(data)=>{result2=result2+data.toString("utf8")}),child.stderr.on("data",()=>{child.kill(),resolve20(result2)}),child.on("close",()=>{child.kill(),resolve20(result2)}),child.on("error",()=>{child.kill(),resolve20(result2)}),osVersion[0]<10)try{child.stdin.write(_psToUTF8+cmd+os4.EOL),child.stdin.write("exit"+os4.EOL),child.stdin.end()}catch{child.kill(),resolve20(result2)}}else resolve20(result2)}catch{resolve20(result2)}})})}}function execSafe(cmd,args,options){let result2="";return options=options||{},new Promise((resolve20)=>{process.nextTick(()=>{try{let child=spawn5(cmd,args,options);if(child&&!child.pid)child.on("error",()=>{resolve20(result2)});if(child&&child.pid)child.stdout.on("data",(data)=>{result2+=data.toString()}),child.on("close",()=>{child.kill(),resolve20(result2)}),child.on("error",()=>{child.kill(),resolve20(result2)});else resolve20(result2)}catch{resolve20(result2)}})})}function getCodepage(){if(_windows){if(!codepage)try{let parts=execSync18("chcp",execOptsWin).toString().split(`\r
3470
3470
  `)[0].split(":");codepage=parts.length>1?parts[1].replace(".","").trim():""}catch{codepage="437"}return codepage}if(_linux||_darwin||_freebsd||_openbsd||_netbsd){if(!codepage)try{let parts=execSync18("echo $LANG",execOptsLinux).toString().split(`\r
3471
3471
  `)[0].split(".");if(codepage=parts.length>1?parts[1].trim():"",!codepage)codepage="UTF-8"}catch{codepage="UTF-8"}return codepage}}function smartMonToolsInstalled(){if(_smartMonToolsInstalled!==null)return _smartMonToolsInstalled;if(_smartMonToolsInstalled=!1,_windows)try{let pathArray=execSync18("WHERE smartctl 2>nul",execOptsWin).toString().split(`\r
3472
3472
  `);if(pathArray&&pathArray.length)_smartMonToolsInstalled=pathArray[0].indexOf(":\\")>=0;else _smartMonToolsInstalled=!1}catch{_smartMonToolsInstalled=!1}if(_linux||_darwin||_freebsd||_openbsd||_netbsd)try{_smartMonToolsInstalled=execSync18("which smartctl 2>/dev/null",execOptsLinux).toString().split(`\r
3473
3473
  `).length>0}catch{util4.noop()}return _smartMonToolsInstalled}function isRaspberry(cpuinfo){let PI_MODEL_NO=["BCM2708","BCM2709","BCM2710","BCM2711","BCM2712","BCM2835","BCM2836","BCM2837","BCM2837B0"];if(_rpi_cpuinfo!==null)cpuinfo=_rpi_cpuinfo;else if(cpuinfo===void 0)try{cpuinfo=fs3.readFileSync("/proc/cpuinfo",{encoding:"utf8"}).toString().split(`
3474
3474
  `),_rpi_cpuinfo=cpuinfo}catch{return!1}let hardware=getValue(cpuinfo,"hardware"),model=getValue(cpuinfo,"model");return hardware&&PI_MODEL_NO.indexOf(hardware)>-1||model&&model.indexOf("Raspberry Pi")>-1}function isRaspbian(){let osrelease=[];try{osrelease=fs3.readFileSync("/etc/os-release",{encoding:"utf8"}).toString().split(`
3475
3475
  `)}catch{return!1}let id=getValue(osrelease,"id","=");return id&&id.indexOf("raspbian")>-1}function execWin(cmd,opts,callback){if(!callback)callback=opts,opts=execOptsWin;let newCmd="chcp 65001 > nul && cmd /C "+cmd+" && chcp "+codepage+" > nul";exec3(newCmd,opts,(error2,stdout)=>{callback(error2,stdout)})}function darwinXcodeExists(){let cmdLineToolsExists=fs3.existsSync("/Library/Developer/CommandLineTools/usr/bin/"),xcodeAppExists=fs3.existsSync("/Applications/Xcode.app/Contents/Developer/Tools"),xcodeExists=fs3.existsSync("/Library/Developer/Xcode/");return cmdLineToolsExists||xcodeExists||xcodeAppExists}function nanoSeconds(){let time=process.hrtime();if(!Array.isArray(time)||time.length!==2)return 0;return+time[0]*1e9+ +time[1]}function countUniqueLines(lines,startingWith){startingWith=startingWith||"";let uniqueLines=[];return lines.forEach((line)=>{if(line.startsWith(startingWith)){if(uniqueLines.indexOf(line)===-1)uniqueLines.push(line)}}),uniqueLines.length}function countLines(lines,startingWith){startingWith=startingWith||"";let uniqueLines=[];return lines.forEach((line)=>{if(line.startsWith(startingWith))uniqueLines.push(line)}),uniqueLines.length}function sanitizeShellString(str5,strict){if(typeof strict>"u")strict=!1;let s2=str5||"",result2="",l=mathMin(s2.length,2000);for(let i2=0;i2<=l;i2++)if(!(s2[i2]===void 0||s2[i2]===">"||s2[i2]==="<"||s2[i2]==="*"||s2[i2]==="?"||s2[i2]==="["||s2[i2]==="]"||s2[i2]==="|"||s2[i2]==="\u02DA"||s2[i2]==="$"||s2[i2]===";"||s2[i2]==="&"||s2[i2]==="]"||s2[i2]==="#"||s2[i2]==="\\"||s2[i2]==="\t"||s2[i2]===`
3476
- `||s2[i2]==="\r"||s2[i2]==="'"||s2[i2]==="`"||s2[i2]==='"'||s2[i2].length>1||strict&&s2[i2]==="("||strict&&s2[i2]===")"||strict&&s2[i2]==="@"||strict&&s2[i2]===" "||strict&&s2[i2]==="{"||strict&&s2[i2]===";"||strict&&s2[i2]==="}"))result2=result2+s2[i2];return result2}function isPrototypePolluted(){let notPolluted=!0,st="";try{st.__proto__.replace=stringReplace,st.__proto__.toLowerCase=stringToLower,st.__proto__.toString=stringToString,st.__proto__.substr=stringSubstr,st.__proto__.substring=stringSubstring,st.__proto__.trim=stringTrim,st.__proto__.startsWith=stringStartWith}catch(e){Object.setPrototypeOf(st,stringObj)}notPolluted=notPolluted||!1;let ms=Date.now();if(typeof ms==="number"&&ms>1600000000000){let l=ms%100+15;for(let i2=0;i2<l;i2++){let r=Math.random()*61.99999999+1,rs=parseInt(Math.floor(r).toString(),10),rs2=parseInt(r.toString().split(".")[0],10),q2=Math.random()*61.99999999+1,qs=parseInt(Math.floor(q2).toString(),10),qs2=parseInt(q2.toString().split(".")[0],10);notPolluted=notPolluted&&r!==q2,notPolluted=notPolluted&&rs===rs2&&qs===qs2,st+="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[rs-1]}notPolluted=notPolluted&&st.length===l;let p=Math.random()*l*0.9999999999,stm=st.substr(0,p)+" "+st.substr(p,2000);try{stm.__proto__.replace=stringReplace}catch(e){Object.setPrototypeOf(stm,stringObj)}let sto=stm.replace(/ /g,"");notPolluted=notPolluted&&st===sto,p=Math.random()*l*0.9999999999,stm=st.substr(0,p)+"{"+st.substr(p,2000),sto=stm.replace(/{/g,""),notPolluted=notPolluted&&st===sto,p=Math.random()*l*0.9999999999,stm=st.substr(0,p)+"*"+st.substr(p,2000),sto=stm.replace(/\*/g,""),notPolluted=notPolluted&&st===sto,p=Math.random()*l*0.9999999999,stm=st.substr(0,p)+"$"+st.substr(p,2000),sto=stm.replace(/\$/g,""),notPolluted=notPolluted&&st===sto;let stl=st.toLowerCase();notPolluted=notPolluted&&stl.length===l&&stl[l-1]&&!stl[l];for(let i2=0;i2<l;i2++){let s1=st[i2];try{s1.__proto__.toLowerCase=stringToLower}catch{Object.setPrototypeOf(st,stringObj)}let s22=stl?stl[i2]:"",s1l=s1.toLowerCase();notPolluted=notPolluted&&s1l[0]===s22&&s1l[0]&&!s1l[1]}}return!notPolluted}function hex2bin(hex){return("00000000"+parseInt(hex,16).toString(2)).substr(-8)}function getFilesInPath(source){let{lstatSync:lstatSync3,readdirSync:readdirSync14}=fs3,join83=path6.join;function isDirectory2(source2){return lstatSync3(source2).isDirectory()}function isFile2(source2){return lstatSync3(source2).isFile()}function getDirectories(source2){return readdirSync14(source2).map((name)=>{return join83(source2,name)}).filter(isDirectory2)}function getFiles(source2){return readdirSync14(source2).map((name)=>{return join83(source2,name)}).filter(isFile2)}function getFilesRecursively(source2){try{return getDirectories(source2).map((dir)=>{return getFilesRecursively(dir)}).reduce((a,b3)=>{return a.concat(b3)},[]).concat(getFiles(source2))}catch{return[]}}if(fs3.existsSync(source))return getFilesRecursively(source);else return[]}function decodePiCpuinfo(lines){if(_rpi_cpuinfo===null)_rpi_cpuinfo=lines;else if(lines===void 0)lines=_rpi_cpuinfo;let oldRevisionCodes={"0002":{type:"B",revision:"1.0",memory:256,manufacturer:"Egoman",processor:"BCM2835"},"0003":{type:"B",revision:"1.0",memory:256,manufacturer:"Egoman",processor:"BCM2835"},"0004":{type:"B",revision:"2.0",memory:256,manufacturer:"Sony UK",processor:"BCM2835"},"0005":{type:"B",revision:"2.0",memory:256,manufacturer:"Qisda",processor:"BCM2835"},"0006":{type:"B",revision:"2.0",memory:256,manufacturer:"Egoman",processor:"BCM2835"},"0007":{type:"A",revision:"2.0",memory:256,manufacturer:"Egoman",processor:"BCM2835"},"0008":{type:"A",revision:"2.0",memory:256,manufacturer:"Sony UK",processor:"BCM2835"},"0009":{type:"A",revision:"2.0",memory:256,manufacturer:"Qisda",processor:"BCM2835"},"000d":{type:"B",revision:"2.0",memory:512,manufacturer:"Egoman",processor:"BCM2835"},"000e":{type:"B",revision:"2.0",memory:512,manufacturer:"Sony UK",processor:"BCM2835"},"000f":{type:"B",revision:"2.0",memory:512,manufacturer:"Egoman",processor:"BCM2835"},"0010":{type:"B+",revision:"1.2",memory:512,manufacturer:"Sony UK",processor:"BCM2835"},"0011":{type:"CM1",revision:"1.0",memory:512,manufacturer:"Sony UK",processor:"BCM2835"},"0012":{type:"A+",revision:"1.1",memory:256,manufacturer:"Sony UK",processor:"BCM2835"},"0013":{type:"B+",revision:"1.2",memory:512,manufacturer:"Embest",processor:"BCM2835"},"0014":{type:"CM1",revision:"1.0",memory:512,manufacturer:"Embest",processor:"BCM2835"},"0015":{type:"A+",revision:"1.1",memory:256,manufacturer:"512MB\tEmbest",processor:"BCM2835"}},processorList=["BCM2835","BCM2836","BCM2837","BCM2711","BCM2712"],manufacturerList=["Sony UK","Egoman","Embest","Sony Japan","Embest","Stadium"],typeList={"00":"A","01":"B","02":"A+","03":"B+","04":"2B","05":"Alpha (early prototype)","06":"CM1","08":"3B","09":"Zero","0a":"CM3","0c":"Zero W","0d":"3B+","0e":"3A+","0f":"Internal use only",10:"CM3+",11:"4B",12:"Zero 2 W",13:"400",14:"CM4",15:"CM4S",16:"Internal use only",17:"5",18:"CM5",19:"500/500+","1a":"CM5 Lite"},revisionCode=getValue(lines,"revision",":",!0),model=getValue(lines,"model:",":",!0),serial=getValue(lines,"serial",":",!0),result2={};if({}.hasOwnProperty.call(oldRevisionCodes,revisionCode))result2={model,serial,revisionCode,memory:oldRevisionCodes[revisionCode].memory,manufacturer:oldRevisionCodes[revisionCode].manufacturer,processor:oldRevisionCodes[revisionCode].processor,type:oldRevisionCodes[revisionCode].type,revision:oldRevisionCodes[revisionCode].revision};else{let revision=("00000000"+getValue(lines,"revision",":",!0).toLowerCase()).substr(-8),memSizeCode=parseInt(hex2bin(revision.substr(2,1)).substr(5,3),2)||0,manufacturer=manufacturerList[parseInt(revision.substr(3,1),10)],processor=processorList[parseInt(revision.substr(4,1),10)],typeCode=revision.substr(5,2);result2={model,serial,revisionCode,memory:256*Math.pow(2,memSizeCode),manufacturer,processor,type:{}.hasOwnProperty.call(typeList,typeCode)?typeList[typeCode]:"",revision:"1."+revision.substr(7,1)}}return result2}function getRpiGpu(cpuinfo){if(_rpi_cpuinfo===null&&cpuinfo!==void 0)_rpi_cpuinfo=cpuinfo;else if(cpuinfo===void 0&&_rpi_cpuinfo!==null)cpuinfo=_rpi_cpuinfo;else try{cpuinfo=fs3.readFileSync("/proc/cpuinfo",{encoding:"utf8"}).toString().split(`
3476
+ `||s2[i2]==="\r"||s2[i2]==="'"||s2[i2]==="`"||s2[i2]==='"'||s2[i2].length>1||strict&&s2[i2]==="("||strict&&s2[i2]===")"||strict&&s2[i2]==="@"||strict&&s2[i2]===" "||strict&&s2[i2]==="{"||strict&&s2[i2]===";"||strict&&s2[i2]==="}"))result2=result2+s2[i2];return result2}function isPrototypePolluted(){let notPolluted=!0,st="";try{st.__proto__.replace=stringReplace,st.__proto__.toLowerCase=stringToLower,st.__proto__.toString=stringToString,st.__proto__.substr=stringSubstr,st.__proto__.substring=stringSubstring,st.__proto__.trim=stringTrim,st.__proto__.startsWith=stringStartWith}catch(e){Object.setPrototypeOf(st,stringObj)}notPolluted=notPolluted||!1;let ms=Date.now();if(typeof ms==="number"&&ms>1600000000000){let l=ms%100+15;for(let i2=0;i2<l;i2++){let r=Math.random()*61.99999999+1,rs=parseInt(Math.floor(r).toString(),10),rs2=parseInt(r.toString().split(".")[0],10),q2=Math.random()*61.99999999+1,qs=parseInt(Math.floor(q2).toString(),10),qs2=parseInt(q2.toString().split(".")[0],10);notPolluted=notPolluted&&r!==q2,notPolluted=notPolluted&&rs===rs2&&qs===qs2,st+="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[rs-1]}notPolluted=notPolluted&&st.length===l;let p=Math.random()*l*0.9999999999,stm=st.substr(0,p)+" "+st.substr(p,2000);try{stm.__proto__.replace=stringReplace}catch(e){Object.setPrototypeOf(stm,stringObj)}let sto=stm.replace(/ /g,"");notPolluted=notPolluted&&st===sto,p=Math.random()*l*0.9999999999,stm=st.substr(0,p)+"{"+st.substr(p,2000),sto=stm.replace(/{/g,""),notPolluted=notPolluted&&st===sto,p=Math.random()*l*0.9999999999,stm=st.substr(0,p)+"*"+st.substr(p,2000),sto=stm.replace(/\*/g,""),notPolluted=notPolluted&&st===sto,p=Math.random()*l*0.9999999999,stm=st.substr(0,p)+"$"+st.substr(p,2000),sto=stm.replace(/\$/g,""),notPolluted=notPolluted&&st===sto;let stl=st.toLowerCase();notPolluted=notPolluted&&stl.length===l&&stl[l-1]&&!stl[l];for(let i2=0;i2<l;i2++){let s1=st[i2];try{s1.__proto__.toLowerCase=stringToLower}catch{Object.setPrototypeOf(st,stringObj)}let s22=stl?stl[i2]:"",s1l=s1.toLowerCase();notPolluted=notPolluted&&s1l[0]===s22&&s1l[0]&&!s1l[1]}}return!notPolluted}function hex2bin(hex){return("00000000"+parseInt(hex,16).toString(2)).substr(-8)}function getFilesInPath(source){let{lstatSync:lstatSync3,readdirSync:readdirSync14}=fs3,join84=path6.join;function isDirectory2(source2){return lstatSync3(source2).isDirectory()}function isFile2(source2){return lstatSync3(source2).isFile()}function getDirectories(source2){return readdirSync14(source2).map((name)=>{return join84(source2,name)}).filter(isDirectory2)}function getFiles(source2){return readdirSync14(source2).map((name)=>{return join84(source2,name)}).filter(isFile2)}function getFilesRecursively(source2){try{return getDirectories(source2).map((dir)=>{return getFilesRecursively(dir)}).reduce((a,b3)=>{return a.concat(b3)},[]).concat(getFiles(source2))}catch{return[]}}if(fs3.existsSync(source))return getFilesRecursively(source);else return[]}function decodePiCpuinfo(lines){if(_rpi_cpuinfo===null)_rpi_cpuinfo=lines;else if(lines===void 0)lines=_rpi_cpuinfo;let oldRevisionCodes={"0002":{type:"B",revision:"1.0",memory:256,manufacturer:"Egoman",processor:"BCM2835"},"0003":{type:"B",revision:"1.0",memory:256,manufacturer:"Egoman",processor:"BCM2835"},"0004":{type:"B",revision:"2.0",memory:256,manufacturer:"Sony UK",processor:"BCM2835"},"0005":{type:"B",revision:"2.0",memory:256,manufacturer:"Qisda",processor:"BCM2835"},"0006":{type:"B",revision:"2.0",memory:256,manufacturer:"Egoman",processor:"BCM2835"},"0007":{type:"A",revision:"2.0",memory:256,manufacturer:"Egoman",processor:"BCM2835"},"0008":{type:"A",revision:"2.0",memory:256,manufacturer:"Sony UK",processor:"BCM2835"},"0009":{type:"A",revision:"2.0",memory:256,manufacturer:"Qisda",processor:"BCM2835"},"000d":{type:"B",revision:"2.0",memory:512,manufacturer:"Egoman",processor:"BCM2835"},"000e":{type:"B",revision:"2.0",memory:512,manufacturer:"Sony UK",processor:"BCM2835"},"000f":{type:"B",revision:"2.0",memory:512,manufacturer:"Egoman",processor:"BCM2835"},"0010":{type:"B+",revision:"1.2",memory:512,manufacturer:"Sony UK",processor:"BCM2835"},"0011":{type:"CM1",revision:"1.0",memory:512,manufacturer:"Sony UK",processor:"BCM2835"},"0012":{type:"A+",revision:"1.1",memory:256,manufacturer:"Sony UK",processor:"BCM2835"},"0013":{type:"B+",revision:"1.2",memory:512,manufacturer:"Embest",processor:"BCM2835"},"0014":{type:"CM1",revision:"1.0",memory:512,manufacturer:"Embest",processor:"BCM2835"},"0015":{type:"A+",revision:"1.1",memory:256,manufacturer:"512MB\tEmbest",processor:"BCM2835"}},processorList=["BCM2835","BCM2836","BCM2837","BCM2711","BCM2712"],manufacturerList=["Sony UK","Egoman","Embest","Sony Japan","Embest","Stadium"],typeList={"00":"A","01":"B","02":"A+","03":"B+","04":"2B","05":"Alpha (early prototype)","06":"CM1","08":"3B","09":"Zero","0a":"CM3","0c":"Zero W","0d":"3B+","0e":"3A+","0f":"Internal use only",10:"CM3+",11:"4B",12:"Zero 2 W",13:"400",14:"CM4",15:"CM4S",16:"Internal use only",17:"5",18:"CM5",19:"500/500+","1a":"CM5 Lite"},revisionCode=getValue(lines,"revision",":",!0),model=getValue(lines,"model:",":",!0),serial=getValue(lines,"serial",":",!0),result2={};if({}.hasOwnProperty.call(oldRevisionCodes,revisionCode))result2={model,serial,revisionCode,memory:oldRevisionCodes[revisionCode].memory,manufacturer:oldRevisionCodes[revisionCode].manufacturer,processor:oldRevisionCodes[revisionCode].processor,type:oldRevisionCodes[revisionCode].type,revision:oldRevisionCodes[revisionCode].revision};else{let revision=("00000000"+getValue(lines,"revision",":",!0).toLowerCase()).substr(-8),memSizeCode=parseInt(hex2bin(revision.substr(2,1)).substr(5,3),2)||0,manufacturer=manufacturerList[parseInt(revision.substr(3,1),10)],processor=processorList[parseInt(revision.substr(4,1),10)],typeCode=revision.substr(5,2);result2={model,serial,revisionCode,memory:256*Math.pow(2,memSizeCode),manufacturer,processor,type:{}.hasOwnProperty.call(typeList,typeCode)?typeList[typeCode]:"",revision:"1."+revision.substr(7,1)}}return result2}function getRpiGpu(cpuinfo){if(_rpi_cpuinfo===null&&cpuinfo!==void 0)_rpi_cpuinfo=cpuinfo;else if(cpuinfo===void 0&&_rpi_cpuinfo!==null)cpuinfo=_rpi_cpuinfo;else try{cpuinfo=fs3.readFileSync("/proc/cpuinfo",{encoding:"utf8"}).toString().split(`
3477
3477
  `),_rpi_cpuinfo=cpuinfo}catch{return!1}let rpi=decodePiCpuinfo(cpuinfo);if(rpi.type==="4B"||rpi.type==="CM4"||rpi.type==="CM4S"||rpi.type==="400")return"VideoCore VI";if(rpi.type==="5"||rpi.type==="500")return"VideoCore VII";return"VideoCore IV"}function promiseAll(promises){let resolvingPromises=promises.map((promise)=>new Promise((resolve20)=>{let payload=[,,];promise.then((result2)=>{payload[0]=result2}).catch((error2)=>{payload[1]=error2}).then(()=>{resolve20(payload)})})),errors3=[],results=[];return Promise.all(resolvingPromises).then((items)=>{return items.forEach((payload)=>{if(payload[1])errors3.push(payload[1]),results.push(null);else errors3.push(null),results.push(payload[0])}),{errors:errors3,results}})}function promisify3(nodeStyleFunction){return()=>{let args=Array.prototype.slice.call(arguments);return new Promise((resolve20,reject)=>{args.push((err,data)=>{if(err)reject(err);else resolve20(data)}),nodeStyleFunction.apply(null,args)})}}function promisifySave(nodeStyleFunction){return()=>{let args=Array.prototype.slice.call(arguments);return new Promise((resolve20)=>{args.push((err,data)=>{resolve20(data)}),nodeStyleFunction.apply(null,args)})}}function linuxVersion(){let result2="";if(_linux)try{result2=execSync18("uname -v",execOptsLinux).toString()}catch{result2=""}return result2}function plistParser(xmlStr){let tags=["array","dict","key","string","integer","date","real","data","boolean","arrayEmpty"],startStr="<plist version",pos=xmlStr.indexOf("<plist version"),len=xmlStr.length;while(xmlStr[pos]!==">"&&pos<len)pos++;let depth=0,inTagStart=!1,inTagContent=!1,inTagEnd=!1,metaData=[{tagStart:"",tagEnd:"",tagContent:"",key:"",data:null}],c="",cn=xmlStr[pos];while(pos<len){if(c=cn,pos+1<len)cn=xmlStr[pos+1];if(c==="<"){if(inTagContent=!1,cn==="/")inTagEnd=!0;else if(metaData[depth].tagStart){if(metaData[depth].tagContent="",!metaData[depth].data)metaData[depth].data=metaData[depth].tagStart==="array"?[]:{};depth++,metaData.push({tagStart:"",tagEnd:"",tagContent:"",key:null,data:null}),inTagStart=!0,inTagContent=!1}else if(!inTagStart)inTagStart=!0}else if(c===">"){if(metaData[depth].tagStart==="true/")inTagStart=!1,inTagEnd=!0,metaData[depth].tagStart="",metaData[depth].tagEnd="/boolean",metaData[depth].data=!0;if(metaData[depth].tagStart==="false/")inTagStart=!1,inTagEnd=!0,metaData[depth].tagStart="",metaData[depth].tagEnd="/boolean",metaData[depth].data=!1;if(metaData[depth].tagStart==="array/")inTagStart=!1,inTagEnd=!0,metaData[depth].tagStart="",metaData[depth].tagEnd="/arrayEmpty",metaData[depth].data=[];if(inTagContent)inTagContent=!1;if(inTagStart){if(inTagStart=!1,inTagContent=!0,metaData[depth].tagStart==="array")metaData[depth].data=[];if(metaData[depth].tagStart==="dict")metaData[depth].data={}}if(inTagEnd){if(inTagEnd=!1,metaData[depth].tagEnd&&tags.indexOf(metaData[depth].tagEnd.substr(1))>=0)if(metaData[depth].tagEnd==="/dict"||metaData[depth].tagEnd==="/array"){if(depth>1&&metaData[depth-2].tagStart==="array")metaData[depth-2].data.push(metaData[depth-1].data);if(depth>1&&metaData[depth-2].tagStart==="dict")metaData[depth-2].data[metaData[depth-1].key]=metaData[depth-1].data;depth--,metaData.pop(),metaData[depth].tagContent="",metaData[depth].tagStart="",metaData[depth].tagEnd=""}else{if(metaData[depth].tagEnd==="/key"&&metaData[depth].tagContent)metaData[depth].key=metaData[depth].tagContent;else{if(metaData[depth].tagEnd==="/real"&&metaData[depth].tagContent)metaData[depth].data=parseFloat(metaData[depth].tagContent)||0;if(metaData[depth].tagEnd==="/integer"&&metaData[depth].tagContent)metaData[depth].data=parseInt(metaData[depth].tagContent)||0;if(metaData[depth].tagEnd==="/string"&&metaData[depth].tagContent)metaData[depth].data=metaData[depth].tagContent||"";if(metaData[depth].tagEnd==="/boolean")metaData[depth].data=metaData[depth].tagContent||!1;if(metaData[depth].tagEnd==="/arrayEmpty")metaData[depth].data=metaData[depth].tagContent||[];if(depth>0&&metaData[depth-1].tagStart==="array")metaData[depth-1].data.push(metaData[depth].data);if(depth>0&&metaData[depth-1].tagStart==="dict")metaData[depth-1].data[metaData[depth].key]=metaData[depth].data}metaData[depth].tagContent="",metaData[depth].tagStart="",metaData[depth].tagEnd=""}metaData[depth].tagEnd="",inTagStart=!1,inTagContent=!1}}else{if(inTagStart)metaData[depth].tagStart+=c;if(inTagEnd)metaData[depth].tagEnd+=c;if(inTagContent)metaData[depth].tagContent+=c}pos++}return metaData[0].data}function strIsNumeric(str5){return typeof str5==="string"&&!isNaN(str5)&&!isNaN(parseFloat(str5))}function plistReader(output){let lines=output.split(`
3478
3478
  `);for(let i2=0;i2<lines.length;i2++){if(lines[i2].indexOf(" = ")>=0){let lineParts=lines[i2].split(" = ");if(lineParts[0]=lineParts[0].trim(),!lineParts[0].startsWith('"'))lineParts[0]='"'+lineParts[0]+'"';if(lineParts[1]=lineParts[1].trim(),lineParts[1].indexOf('"')===-1&&lineParts[1].endsWith(";")){let valueString=lineParts[1].substring(0,lineParts[1].length-1);if(!strIsNumeric(valueString))lineParts[1]=`"${valueString}";`}if(lineParts[1].indexOf('"')>=0&&lineParts[1].endsWith(";")){let valueString=lineParts[1].substring(0,lineParts[1].length-1).replace(/"/g,"");if(strIsNumeric(valueString))lineParts[1]=`${valueString};`}lines[i2]=lineParts.join(" : ")}if(lines[i2]=lines[i2].replace(/\(/g,"[").replace(/\)/g,"]").replace(/;/g,",").trim(),lines[i2].startsWith("}")&&lines[i2-1]&&lines[i2-1].endsWith(","))lines[i2-1]=lines[i2-1].substring(0,lines[i2-1].length-1)}output=lines.join("");let obj={};try{obj=JSON.parse(output)}catch(e){noop4()}return obj}function semverCompare(v1,v2){let res=0,parts1=v1.split("."),parts2=v2.split(".");if(parts1[0]<parts2[0])res=1;else if(parts1[0]>parts2[0])res=-1;else if(parts1[0]===parts2[0]&&parts1.length>=2&&parts2.length>=2){if(parts1[1]<parts2[1])res=1;else if(parts1[1]>parts2[1])res=-1;else if(parts1[1]===parts2[1]){if(parts1.length>=3&&parts2.length>=3){if(parts1[2]<parts2[2])res=1;else if(parts1[2]>parts2[2])res=-1}else if(parts2.length>=3)res=1}}return res}function getAppleModel(key){let list2=[{key:"Mac17,7",name:"MacBook Pro",size:"16-inch",processor:"M5 Max",year:"2026",additional:""},{key:"Mac17,6",name:"MacBook Pro",size:"14-inch",processor:"M5 Max",year:"2026",additional:""},{key:"Mac17,5",name:"MacBook Pro",size:"16-inch",processor:"M5 Pro",year:"2026",additional:""},{key:"Mac17,4",name:"MacBook Pro",size:"14-inch",processor:"M5 Pro",year:"2026",additional:""},{key:"Mac17,1",name:"MacBook Neo",size:"14-inch",processor:"A18 Pro",year:"2026",additional:""},{key:"Mac17,3",name:"MacBook Pro",size:"16-inch",processor:"M5",year:"2025",additional:""},{key:"Mac17,2",name:"MacBook Pro",size:"14-inch",processor:"M5",year:"2025",additional:""},{key:"Mac16,13",name:"MacBook Air",size:"15-inch",processor:"M4",year:"2025",additional:""},{key:"Mac16,12",name:"MacBook Air",size:"13-inch",processor:"M4",year:"2025",additional:""},{key:"Mac15,13",name:"MacBook Air",size:"15-inch",processor:"M3",year:"2024",additional:""},{key:"Mac15,12",name:"MacBook Air",size:"13-inch",processor:"M3",year:"2024",additional:""},{key:"Mac14,15",name:"MacBook Air",size:"15-inch",processor:"M2",year:"2024",additional:""},{key:"Mac14,2",name:"MacBook Air",size:"13-inch",processor:"M2",year:"2022",additional:""},{key:"MacBookAir10,1",name:"MacBook Air",size:"13-inch",processor:"M1",year:"2020",additional:""},{key:"MacBookAir9,1",name:"MacBook Air",size:"13-inch",processor:"",year:"2020",additional:""},{key:"MacBookAir8,2",name:"MacBook Air",size:"13-inch",processor:"",year:"2019",additional:""},{key:"MacBookAir8,1",name:"MacBook Air",size:"13-inch",processor:"",year:"2018",additional:""},{key:"MacBookAir7,2",name:"MacBook Air",size:"13-inch",processor:"",year:"2017",additional:""},{key:"MacBookAir7,2",name:"MacBook Air",size:"13-inch",processor:"",year:"Early 2015",additional:""},{key:"MacBookAir7,1",name:"MacBook Air",size:"11-inch",processor:"",year:"Early 2015",additional:""},{key:"MacBookAir6,2",name:"MacBook Air",size:"13-inch",processor:"",year:"Early 2014",additional:""},{key:"MacBookAir6,1",name:"MacBook Air",size:"11-inch",processor:"",year:"Early 2014",additional:""},{key:"MacBookAir6,2",name:"MacBook Air",size:"13-inch",processor:"",year:"Mid 2013",additional:""},{key:"MacBookAir6,1",name:"MacBook Air",size:"11-inch",processor:"",year:"Mid 2013",additional:""},{key:"MacBookAir5,2",name:"MacBook Air",size:"13-inch",processor:"",year:"Mid 2012",additional:""},{key:"MacBookAir5,1",name:"MacBook Air",size:"11-inch",processor:"",year:"Mid 2012",additional:""},{key:"MacBookAir4,2",name:"MacBook Air",size:"13-inch",processor:"",year:"Mid 2011",additional:""},{key:"MacBookAir4,1",name:"MacBook Air",size:"11-inch",processor:"",year:"Mid 2011",additional:""},{key:"MacBookAir3,2",name:"MacBook Air",size:"13-inch",processor:"",year:"Late 2010",additional:""},{key:"MacBookAir3,1",name:"MacBook Air",size:"11-inch",processor:"",year:"Late 2010",additional:""},{key:"MacBookAir2,1",name:"MacBook Air",size:"13-inch",processor:"",year:"Mid 2009",additional:""},{key:"Mac16,1",name:"MacBook Pro",size:"14-inch",processor:"M4",year:"2024",additional:""},{key:"Mac16,6",name:"MacBook Pro",size:"14-inch",processor:"M4 Pro",year:"2024",additional:""},{key:"Mac16,8",name:"MacBook Pro",size:"14-inch",processor:"M4 Max",year:"2024",additional:""},{key:"Mac16,5",name:"MacBook Pro",size:"16-inch",processor:"M4 Pro",year:"2024",additional:""},{key:"Mac16,6",name:"MacBook Pro",size:"16-inch",processor:"M4 Max",year:"2024",additional:""},{key:"Mac15,3",name:"MacBook Pro",size:"14-inch",processor:"M3",year:"Nov 2023",additional:""},{key:"Mac15,6",name:"MacBook Pro",size:"14-inch",processor:"M3 Pro",year:"Nov 2023",additional:""},{key:"Mac15,8",name:"MacBook Pro",size:"14-inch",processor:"M3 Pro",year:"Nov 2023",additional:""},{key:"Mac15,10",name:"MacBook Pro",size:"14-inch",processor:"M3 Max",year:"Nov 2023",additional:""},{key:"Mac15,7",name:"MacBook Pro",size:"16-inch",processor:"M3 Pro",year:"Nov 2023",additional:""},{key:"Mac15,9",name:"MacBook Pro",size:"16-inch",processor:"M3 Pro",year:"Nov 2023",additional:""},{key:"Mac15,11",name:"MacBook Pro",size:"16-inch",processor:"M3 Max",year:"Nov 2023",additional:""},{key:"Mac14,5",name:"MacBook Pro",size:"14-inch",processor:"M2 Max",year:"2023",additional:""},{key:"Mac14,9",name:"MacBook Pro",size:"14-inch",processor:"M2 Max",year:"2023",additional:""},{key:"Mac14,6",name:"MacBook Pro",size:"16-inch",processor:"M2 Max",year:"2023",additional:""},{key:"Mac14,10",name:"MacBook Pro",size:"16-inch",processor:"M2 Max",year:"2023",additional:""},{key:"Mac14,7",name:"MacBook Pro",size:"13-inch",processor:"M2",year:"2022",additional:""},{key:"MacBookPro18,3",name:"MacBook Pro",size:"14-inch",processor:"M1 Pro",year:"2021",additional:""},{key:"MacBookPro18,4",name:"MacBook Pro",size:"14-inch",processor:"M1 Max",year:"2021",additional:""},{key:"MacBookPro18,1",name:"MacBook Pro",size:"16-inch",processor:"M1 Pro",year:"2021",additional:""},{key:"MacBookPro18,2",name:"MacBook Pro",size:"16-inch",processor:"M1 Max",year:"2021",additional:""},{key:"MacBookPro17,1",name:"MacBook Pro",size:"13-inch",processor:"M1",year:"2020",additional:""},{key:"MacBookPro16,3",name:"MacBook Pro",size:"13-inch",processor:"",year:"2020",additional:"Two Thunderbolt 3 ports"},{key:"MacBookPro16,2",name:"MacBook Pro",size:"13-inch",processor:"",year:"2020",additional:"Four Thunderbolt 3 ports"},{key:"MacBookPro16,1",name:"MacBook Pro",size:"16-inch",processor:"",year:"2019",additional:""},{key:"MacBookPro16,4",name:"MacBook Pro",size:"16-inch",processor:"",year:"2019",additional:""},{key:"MacBookPro15,3",name:"MacBook Pro",size:"15-inch",processor:"",year:"2019",additional:""},{key:"MacBookPro15,2",name:"MacBook Pro",size:"13-inch",processor:"",year:"2019",additional:""},{key:"MacBookPro15,1",name:"MacBook Pro",size:"15-inch",processor:"",year:"2019",additional:""},{key:"MacBookPro15,4",name:"MacBook Pro",size:"13-inch",processor:"",year:"2019",additional:"Two Thunderbolt 3 ports"},{key:"MacBookPro15,1",name:"MacBook Pro",size:"15-inch",processor:"",year:"2018",additional:""},{key:"MacBookPro15,2",name:"MacBook Pro",size:"13-inch",processor:"",year:"2018",additional:"Four Thunderbolt 3 ports"},{key:"MacBookPro14,1",name:"MacBook Pro",size:"13-inch",processor:"",year:"2017",additional:"Two Thunderbolt 3 ports"},{key:"MacBookPro14,2",name:"MacBook Pro",size:"13-inch",processor:"",year:"2017",additional:"Four Thunderbolt 3 ports"},{key:"MacBookPro14,3",name:"MacBook Pro",size:"15-inch",processor:"",year:"2017",additional:""},{key:"MacBookPro13,1",name:"MacBook Pro",size:"13-inch",processor:"",year:"2016",additional:"Two Thunderbolt 3 ports"},{key:"MacBookPro13,2",name:"MacBook Pro",size:"13-inch",processor:"",year:"2016",additional:"Four Thunderbolt 3 ports"},{key:"MacBookPro13,3",name:"MacBook Pro",size:"15-inch",processor:"",year:"2016",additional:""},{key:"MacBookPro11,4",name:"MacBook Pro",size:"15-inch",processor:"",year:"Mid 2015",additional:""},{key:"MacBookPro11,5",name:"MacBook Pro",size:"15-inch",processor:"",year:"Mid 2015",additional:""},{key:"MacBookPro12,1",name:"MacBook Pro",size:"13-inch",processor:"",year:"Early 2015",additional:""},{key:"MacBookPro11,2",name:"MacBook Pro",size:"15-inch",processor:"",year:"Late 2013",additional:""},{key:"MacBookPro11,3",name:"MacBook Pro",size:"15-inch",processor:"",year:"Late 2013",additional:""},{key:"MacBookPro11,1",name:"MacBook Pro",size:"13-inch",processor:"",year:"Late 2013",additional:""},{key:"MacBookPro10,1",name:"MacBook Pro",size:"15-inch",processor:"",year:"Mid 2012",additional:""},{key:"MacBookPro10,2",name:"MacBook Pro",size:"13-inch",processor:"",year:"Late 2012",additional:""},{key:"MacBookPro9,1",name:"MacBook Pro",size:"15-inch",processor:"",year:"Mid 2012",additional:""},{key:"MacBookPro9,2",name:"MacBook Pro",size:"13-inch",processor:"",year:"Mid 2012",additional:""},{key:"MacBookPro8,3",name:"MacBook Pro",size:"17-inch",processor:"",year:"Early 2011",additional:""},{key:"MacBookPro8,2",name:"MacBook Pro",size:"15-inch",processor:"",year:"Early 2011",additional:""},{key:"MacBookPro8,1",name:"MacBook Pro",size:"13-inch",processor:"",year:"Early 2011",additional:""},{key:"MacBookPro6,1",name:"MacBook Pro",size:"17-inch",processor:"",year:"Mid 2010",additional:""},{key:"MacBookPro6,2",name:"MacBook Pro",size:"15-inch",processor:"",year:"Mid 2010",additional:""},{key:"MacBookPro7,1",name:"MacBook Pro",size:"13-inch",processor:"",year:"Mid 2010",additional:""},{key:"MacBookPro5,2",name:"MacBook Pro",size:"17-inch",processor:"",year:"Early 2009",additional:""},{key:"MacBookPro5,3",name:"MacBook Pro",size:"15-inch",processor:"",year:"Mid 2009",additional:""},{key:"MacBookPro5,5",name:"MacBook Pro",size:"13-inch",processor:"",year:"Mid 2009",additional:""},{key:"MacBookPro5,1",name:"MacBook Pro",size:"15-inch",processor:"",year:"Late 2008",additional:""},{key:"MacBookPro4,1",name:"MacBook Pro",size:"15-inch",processor:"",year:"Early 2008",additional:""},{key:"MacBook10,1",name:"MacBook",size:"12-inch",processor:"",year:"2017",additional:""},{key:"MacBook9,1",name:"MacBook",size:"12-inch",processor:"",year:"Early 2016",additional:""},{key:"MacBook8,1",name:"MacBook",size:"12-inch",processor:"",year:"Early 2015",additional:""},{key:"MacBook7,1",name:"MacBook",size:"13-inch",processor:"",year:"Mid 2010",additional:""},{key:"MacBook6,1",name:"MacBook",size:"13-inch",processor:"",year:"Late 2009",additional:""},{key:"MacBook5,2",name:"MacBook",size:"13-inch",processor:"",year:"Early 2009",additional:""},{key:"Mac14,13",name:"Mac Studio",size:"",processor:"M2 Max",year:"2023",additional:""},{key:"Mac14,14",name:"Mac Studio",size:"",processor:"M2 Ultra",year:"2023",additional:""},{key:"Mac15,14",name:"Mac Studio",size:"",processor:"M3 Ultra",year:"2025",additional:""},{key:"Mac16,9",name:"Mac Studio",size:"",processor:"M4 Max",year:"2025",additional:""},{key:"Mac13,1",name:"Mac Studio",size:"",processor:"M1 Max",year:"2022",additional:""},{key:"Mac13,2",name:"Mac Studio",size:"",processor:"M1 Ultra",year:"2022",additional:""},{key:"Mac16,11",name:"Mac mini",size:"",processor:"M4 Pro",year:"2024",additional:""},{key:"Mac16,10",name:"Mac mini",size:"",processor:"M4",year:"2024",additional:""},{key:"Mac14,3",name:"Mac mini",size:"",processor:"M2",year:"2023",additional:""},{key:"Mac14,12",name:"Mac mini",size:"",processor:"M2 Pro",year:"2023",additional:""},{key:"Macmini9,1",name:"Mac mini",size:"",processor:"M1",year:"2020",additional:""},{key:"Macmini8,1",name:"Mac mini",size:"",processor:"",year:"Late 2018",additional:""},{key:"Macmini7,1",name:"Mac mini",size:"",processor:"",year:"Late 2014",additional:""},{key:"Macmini6,1",name:"Mac mini",size:"",processor:"",year:"Late 2012",additional:""},{key:"Macmini6,2",name:"Mac mini",size:"",processor:"",year:"Late 2012",additional:""},{key:"Macmini5,1",name:"Mac mini",size:"",processor:"",year:"Mid 2011",additional:""},{key:"Macmini5,2",name:"Mac mini",size:"",processor:"",year:"Mid 2011",additional:""},{key:"Macmini4,1",name:"Mac mini",size:"",processor:"",year:"Mid 2010",additional:""},{key:"Macmini3,1",name:"Mac mini",size:"",processor:"",year:"Early 2009",additional:""},{key:"Mac16,3",name:"iMac",size:"24-inch",processor:"M4",year:"2024",additional:"Four ports"},{key:"Mac16,2",name:"iMac",size:"24-inch",processor:"M4",year:"2024",additional:"Two ports"},{key:"Mac15,5",name:"iMac",size:"24-inch",processor:"M3",year:"2023",additional:"Four ports"},{key:"Mac15,4",name:"iMac",size:"24-inch",processor:"M3",year:"2023",additional:"Two ports"},{key:"iMac21,1",name:"iMac",size:"24-inch",processor:"M1",year:"2021",additional:""},{key:"iMac21,2",name:"iMac",size:"24-inch",processor:"M1",year:"2021",additional:""},{key:"iMac20,1",name:"iMac",size:"27-inch",processor:"",year:"2020",additional:"Retina 5K"},{key:"iMac20,2",name:"iMac",size:"27-inch",processor:"",year:"2020",additional:"Retina 5K"},{key:"iMac19,1",name:"iMac",size:"27-inch",processor:"",year:"2019",additional:"Retina 5K"},{key:"iMac19,2",name:"iMac",size:"21.5-inch",processor:"",year:"2019",additional:"Retina 4K"},{key:"iMacPro1,1",name:"iMac Pro",size:"",processor:"",year:"2017",additional:""},{key:"iMac18,3",name:"iMac",size:"27-inch",processor:"",year:"2017",additional:"Retina 5K"},{key:"iMac18,2",name:"iMac",size:"21.5-inch",processor:"",year:"2017",additional:"Retina 4K"},{key:"iMac18,1",name:"iMac",size:"21.5-inch",processor:"",year:"2017",additional:""},{key:"iMac17,1",name:"iMac",size:"27-inch",processor:"",year:"Late 2015",additional:"Retina 5K"},{key:"iMac16,2",name:"iMac",size:"21.5-inch",processor:"",year:"Late 2015",additional:"Retina 4K"},{key:"iMac16,1",name:"iMac",size:"21.5-inch",processor:"",year:"Late 2015",additional:""},{key:"iMac15,1",name:"iMac",size:"27-inch",processor:"",year:"Late 2014",additional:"Retina 5K"},{key:"iMac14,4",name:"iMac",size:"21.5-inch",processor:"",year:"Mid 2014",additional:""},{key:"iMac14,2",name:"iMac",size:"27-inch",processor:"",year:"Late 2013",additional:""},{key:"iMac14,1",name:"iMac",size:"21.5-inch",processor:"",year:"Late 2013",additional:""},{key:"iMac13,2",name:"iMac",size:"27-inch",processor:"",year:"Late 2012",additional:""},{key:"iMac13,1",name:"iMac",size:"21.5-inch",processor:"",year:"Late 2012",additional:""},{key:"iMac12,2",name:"iMac",size:"27-inch",processor:"",year:"Mid 2011",additional:""},{key:"iMac12,1",name:"iMac",size:"21.5-inch",processor:"",year:"Mid 2011",additional:""},{key:"iMac11,3",name:"iMac",size:"27-inch",processor:"",year:"Mid 2010",additional:""},{key:"iMac11,2",name:"iMac",size:"21.5-inch",processor:"",year:"Mid 2010",additional:""},{key:"iMac10,1",name:"iMac",size:"21.5-inch",processor:"",year:"Late 2009",additional:""},{key:"iMac9,1",name:"iMac",size:"20-inch",processor:"",year:"Early 2009",additional:""},{key:"Mac14,8",name:"Mac Pro",size:"",processor:"",year:"2023",additional:""},{key:"Mac14,8",name:"Mac Pro",size:"",processor:"",year:"2023",additional:"Rack"},{key:"MacPro7,1",name:"Mac Pro",size:"",processor:"",year:"2019",additional:""},{key:"MacPro7,1",name:"Mac Pro",size:"",processor:"",year:"2019",additional:"Rack"},{key:"MacPro6,1",name:"Mac Pro",size:"",processor:"",year:"Late 2013",additional:""},{key:"MacPro5,1",name:"Mac Pro",size:"",processor:"",year:"Mid 2012",additional:""},{key:"MacPro5,1",name:"Mac Pro Server",size:"",processor:"",year:"Mid 2012",additional:"Server"},{key:"MacPro5,1",name:"Mac Pro",size:"",processor:"",year:"Mid 2010",additional:""},{key:"MacPro5,1",name:"Mac Pro Server",size:"",processor:"",year:"Mid 2010",additional:"Server"},{key:"MacPro4,1",name:"Mac Pro",size:"",processor:"",year:"Early 2009",additional:""}].filter((model)=>model.key===key);if(list2.length===0)return{key,model:"Apple",version:"Unknown"};let features=[];if(list2[0].size)features.push(list2[0].size);if(list2[0].processor)features.push(list2[0].processor);if(list2[0].year)features.push(list2[0].year);if(list2[0].additional)features.push(list2[0].additional);return{key,model:list2[0].name,version:list2[0].name+" ("+features.join(", ")+")"}}function checkWebsite(url,timeout=5000){let http=url.startsWith("https:")||url.indexOf(":443/")>0||url.indexOf(":8443/")>0?__require("https"):__require("http"),t2=Date.now();return new Promise((resolve20)=>{let request=http.get(url,(res)=>{res.on("data",()=>{}),res.on("end",()=>{resolve20({url,statusCode:res.statusCode,message:res.statusMessage,time:Date.now()-t2})})}).on("error",(e)=>{resolve20({url,statusCode:404,message:e.message,time:Date.now()-t2})}).setTimeout(timeout,()=>{request.destroy(),resolve20({url,statusCode:408,message:"Request Timeout",time:Date.now()-t2})})})}function cleanString(str5){return str5.replace(/To Be Filled By O.E.M./g,"")}function noop4(){}exports.toInt=toInt;exports.splitByNumber=splitByNumber;exports.execOptsWin=execOptsWin;exports.execOptsLinux=execOptsLinux;exports.getCodepage=getCodepage;exports.execWin=execWin;exports.isFunction=isFunction;exports.unique=unique;exports.sortByKey=sortByKey;exports.cores=cores;exports.getValue=getValue;exports.decodeEscapeSequence=decodeEscapeSequence;exports.parseDateTime=parseDateTime;exports.parseHead=parseHead;exports.findObjectByKey=findObjectByKey;exports.darwinXcodeExists=darwinXcodeExists;exports.getVboxmanage=getVboxmanage;exports.powerShell=powerShell;exports.powerShellStart=powerShellStart;exports.powerShellRelease=powerShellRelease;exports.execSafe=execSafe;exports.nanoSeconds=nanoSeconds;exports.countUniqueLines=countUniqueLines;exports.countLines=countLines;exports.noop=noop4;exports.isRaspberry=isRaspberry;exports.isRaspbian=isRaspbian;exports.sanitizeShellString=sanitizeShellString;exports.isPrototypePolluted=isPrototypePolluted;exports.decodePiCpuinfo=decodePiCpuinfo;exports.getRpiGpu=getRpiGpu;exports.promiseAll=promiseAll;exports.promisify=promisify3;exports.promisifySave=promisifySave;exports.smartMonToolsInstalled=smartMonToolsInstalled;exports.linuxVersion=linuxVersion;exports.plistParser=plistParser;exports.plistReader=plistReader;exports.stringObj=stringObj;exports.stringReplace=stringReplace;exports.stringToLower=stringToLower;exports.stringToString=stringToString;exports.stringSubstr=stringSubstr;exports.stringSubstring=stringSubstring;exports.stringTrim=stringTrim;exports.stringStartWith=stringStartWith;exports.mathMin=mathMin;exports.WINDIR=WINDIR;exports.getFilesInPath=getFilesInPath;exports.semverCompare=semverCompare;exports.getAppleModel=getAppleModel;exports.checkWebsite=checkWebsite;exports.cleanString=cleanString;exports.getPowershell=getPowershell});var require_osinfo=__commonJS((exports)=>{var os4=__require("os"),fs3=__require("fs"),util4=require_util3(),exec3=__require("child_process").exec,execSync18=__require("child_process").execSync,_platform=process.platform,_linux=_platform==="linux"||_platform==="android",_darwin=_platform==="darwin",_windows=_platform==="win32",_freebsd=_platform==="freebsd",_openbsd=_platform==="openbsd",_netbsd=_platform==="netbsd",_sunos=_platform==="sunos";function time(){let t2=new Date().toString().split(" "),timezoneName="";try{timezoneName=Intl.DateTimeFormat().resolvedOptions().timeZone}catch{timezoneName=t2.length>=7?t2.slice(6).join(" ").replace(/\(/g,"").replace(/\)/g,""):""}let result2={current:Date.now(),uptime:os4.uptime(),timezone:t2.length>=7?t2[5]:"",timezoneName};if(_darwin||_linux)try{let lines=execSync18("date +%Z && date +%z && ls -l /etc/localtime 2>/dev/null",util4.execOptsLinux).toString().split(os4.EOL);if(lines.length>3&&!lines[0])lines.shift();let timezone=lines[0]||"";if(timezone.startsWith("+")||timezone.startsWith("-"))timezone="GMT";return{current:Date.now(),uptime:os4.uptime(),timezone:lines[1]?timezone+lines[1]:timezone,timezoneName:lines[2]&&lines[2].indexOf("/zoneinfo/")>0?lines[2].split("/zoneinfo/")[1]||"":""}}catch{util4.noop()}return result2}exports.time=time;function getLogoFile(distro){distro=distro||"",distro=distro.toLowerCase();let result2=_platform;if(_windows)result2="windows";else if(distro.indexOf("mac os")!==-1||distro.indexOf("macos")!==-1)result2="apple";else if(distro.indexOf("arch")!==-1)result2="arch";else if(distro.indexOf("cachy")!==-1)result2="cachy";else if(distro.indexOf("centos")!==-1)result2="centos";else if(distro.indexOf("coreos")!==-1)result2="coreos";else if(distro.indexOf("debian")!==-1)result2="debian";else if(distro.indexOf("deepin")!==-1)result2="deepin";else if(distro.indexOf("elementary")!==-1)result2="elementary";else if(distro.indexOf("endeavour")!==-1)result2="endeavour";else if(distro.indexOf("fedora")!==-1)result2="fedora";else if(distro.indexOf("gentoo")!==-1)result2="gentoo";else if(distro.indexOf("mageia")!==-1)result2="mageia";else if(distro.indexOf("mandriva")!==-1)result2="mandriva";else if(distro.indexOf("manjaro")!==-1)result2="manjaro";else if(distro.indexOf("mint")!==-1)result2="mint";else if(distro.indexOf("mx")!==-1)result2="mx";else if(distro.indexOf("openbsd")!==-1)result2="openbsd";else if(distro.indexOf("freebsd")!==-1)result2="freebsd";else if(distro.indexOf("opensuse")!==-1)result2="opensuse";else if(distro.indexOf("pclinuxos")!==-1)result2="pclinuxos";else if(distro.indexOf("puppy")!==-1)result2="puppy";else if(distro.indexOf("popos")!==-1)result2="popos";else if(distro.indexOf("raspbian")!==-1)result2="raspbian";else if(distro.indexOf("reactos")!==-1)result2="reactos";else if(distro.indexOf("redhat")!==-1)result2="redhat";else if(distro.indexOf("slackware")!==-1)result2="slackware";else if(distro.indexOf("sugar")!==-1)result2="sugar";else if(distro.indexOf("steam")!==-1)result2="steam";else if(distro.indexOf("suse")!==-1)result2="suse";else if(distro.indexOf("mate")!==-1)result2="ubuntu-mate";else if(distro.indexOf("lubuntu")!==-1)result2="lubuntu";else if(distro.indexOf("xubuntu")!==-1)result2="xubuntu";else if(distro.indexOf("ubuntu")!==-1)result2="ubuntu";else if(distro.indexOf("solaris")!==-1)result2="solaris";else if(distro.indexOf("tails")!==-1)result2="tails";else if(distro.indexOf("feren")!==-1)result2="ferenos";else if(distro.indexOf("robolinux")!==-1)result2="robolinux";else if(_linux&&distro)result2=distro.toLowerCase().trim().replace(/\s+/g,"-");return result2}var WINDOWS_RELEASES=[[26200,"25H2"],[26100,"24H2"],[22631,"23H2"],[22621,"22H2"],[19045,"22H2"],[22000,"21H2"],[19044,"21H2"],[19043,"21H1"],[19042,"20H2"],[19041,"2004"],[18363,"1909"],[18362,"1903"],[17763,"1809"],[17134,"1803"]];function getWindowsRelease(build){for(let[minBuild,label]of WINDOWS_RELEASES)if(build>=minBuild)return label;return""}function getFQDN(){let fqdn=os4.hostname;if(_linux||_darwin)try{fqdn=execSync18("hostname -f 2>/dev/null",util4.execOptsLinux).toString().split(os4.EOL)[0]}catch{util4.noop()}if(_freebsd||_openbsd||_netbsd)try{fqdn=execSync18("hostname 2>/dev/null").toString().split(os4.EOL)[0]}catch{util4.noop()}if(_windows)try{fqdn=execSync18("echo %COMPUTERNAME%.%USERDNSDOMAIN%",util4.execOptsWin).toString().replace(".%USERDNSDOMAIN%","").split(os4.EOL)[0]}catch{util4.noop()}return fqdn}function osInfo(callback){return new Promise((resolve20)=>{process.nextTick(()=>{let result2={platform:_platform==="win32"?"Windows":_platform,distro:"unknown",release:"unknown",codename:"",kernel:os4.release(),arch:os4.arch(),hostname:os4.hostname(),fqdn:getFQDN(),codepage:"",logofile:"",serial:"",build:"",servicepack:"",uefi:!1};if(_linux)exec3("cat /etc/*-release; cat /usr/lib/os-release; cat /etc/openwrt_release",(error2,stdout)=>{let release={};stdout.toString().split(`
3479
3479
  `).forEach((line)=>{if(line.indexOf("=")!==-1)release[line.split("=")[0].trim().toUpperCase()]=line.split("=")[1].trim()}),result2.distro=(release.DISTRIB_ID||release.NAME||"unknown").replace(/"/g,""),result2.logofile=getLogoFile(result2.distro);let releaseVersion=(release.VERSION||"").replace(/"/g,""),codename=(release.DISTRIB_CODENAME||release.VERSION_CODENAME||"").replace(/"/g,""),prettyName=(release.PRETTY_NAME||"").replace(/"/g,"");if(prettyName.indexOf(result2.distro+" ")===0)releaseVersion=prettyName.replace(result2.distro+" ","").trim();if(releaseVersion.indexOf("(")>=0)codename=releaseVersion.split("(")[1].replace(/[()]/g,"").trim(),releaseVersion=releaseVersion.split("(")[0].trim();result2.release=(releaseVersion||release.DISTRIB_RELEASE||release.VERSION_ID||"unknown").replace(/"/g,""),result2.codename=codename,result2.codepage=util4.getCodepage(),result2.build=(release.BUILD_ID||"").replace(/"/g,"").trim(),isUefiLinux().then((uefi)=>{result2.uefi=uefi,uuid().then((data)=>{if(result2.serial=data.os,callback)callback(result2);resolve20(result2)})})});if(_freebsd||_openbsd||_netbsd)exec3("sysctl kern.ostype kern.osrelease kern.osrevision kern.hostuuid machdep.bootmethod kern.geom.confxml",(error2,stdout)=>{let lines=stdout.toString().split(`
@@ -3851,10 +3851,10 @@ Bus `);for(let i2=1;i2<parts.length;i2++){let usb2=parseLinuxUsb(parts[i2]);resu
3851
3851
  `);if(util4.getValue(lines,"class",":",!0).toLowerCase().indexOf("audio")>=0){let audio2=parseLinuxAudioPciMM(lines,audioPCI);result2.push(audio2)}})}if(callback)callback(result2);resolve20(result2)});if(_darwin)exec3("system_profiler SPAudioDataType -json",(error2,stdout)=>{if(!error2)try{let outObj=JSON.parse(stdout.toString());if(outObj.SPAudioDataType&&outObj.SPAudioDataType.length&&outObj.SPAudioDataType[0]&&outObj.SPAudioDataType[0]._items&&outObj.SPAudioDataType[0]._items.length)for(let i2=0;i2<outObj.SPAudioDataType[0]._items.length;i2++){let audio2=parseDarwinAudio(outObj.SPAudioDataType[0]._items[i2],i2);result2.push(audio2)}}catch{util4.noop()}if(callback)callback(result2);resolve20(result2)});if(_windows)util4.powerShell("Get-CimInstance Win32_SoundDevice | select DeviceID,StatusInfo,Name,Manufacturer | fl").then((stdout,error2)=>{if(!error2)stdout.toString().split(/\n\s*\n/).forEach((element)=>{let lines=element.split(`
3852
3852
  `);if(util4.getValue(lines,"name",":"))result2.push(parseWindowsAudio(lines))});if(callback)callback(result2);resolve20(result2)});if(_sunos)resolve20(null)})})}exports.audio=audio});var require_bluetoothVendors=__commonJS((exports,module2)=>{module2.exports={0:"Ericsson Technology Licensing",1:"Nokia Mobile Phones",2:"Intel Corp.",3:"IBM Corp.",4:"Toshiba Corp.",5:"3Com",6:"Microsoft",7:"Lucent",8:"Motorola",9:"Infineon Technologies AG",10:"Cambridge Silicon Radio",11:"Silicon Wave",12:"Digianswer A/S",13:"Texas Instruments Inc.",14:"Ceva, Inc. (formerly Parthus Technologies, Inc.)",15:"Broadcom Corporation",16:"Mitel Semiconductor",17:"Widcomm, Inc",18:"Zeevo, Inc.",19:"Atmel Corporation",20:"Mitsubishi Electric Corporation",21:"RTX Telecom A/S",22:"KC Technology Inc.",23:"NewLogic",24:"Transilica, Inc.",25:"Rohde & Schwarz GmbH & Co. KG",26:"TTPCom Limited",27:"Signia Technologies, Inc.",28:"Conexant Systems Inc.",29:"Qualcomm",30:"Inventel",31:"AVM Berlin",32:"BandSpeed, Inc.",33:"Mansella Ltd",34:"NEC Corporation",35:"WavePlus Technology Co., Ltd.",36:"Alcatel",37:"NXP Semiconductors (formerly Philips Semiconductors)",38:"C Technologies",39:"Open Interface",40:"R F Micro Devices",41:"Hitachi Ltd",42:"Symbol Technologies, Inc.",43:"Tenovis",44:"Macronix International Co. Ltd.",45:"GCT Semiconductor",46:"Norwood Systems",47:"MewTel Technology Inc.",48:"ST Microelectronics",49:"Synopsis",50:"Red-M (Communications) Ltd",51:"Commil Ltd",52:"Computer Access Technology Corporation (CATC)",53:"Eclipse (HQ Espana) S.L.",54:"Renesas Electronics Corporation",55:"Mobilian Corporation",56:"Terax",57:"Integrated System Solution Corp.",58:"Matsushita Electric Industrial Co., Ltd.",59:"Gennum Corporation",60:"BlackBerry Limited (formerly Research In Motion)",61:"IPextreme, Inc.",62:"Systems and Chips, Inc.",63:"Bluetooth SIG, Inc.",64:"Seiko Epson Corporation",65:"Integrated Silicon Solution Taiwan, Inc.",66:"CONWISE Technology Corporation Ltd",67:"PARROT SA",68:"Socket Mobile",69:"Atheros Communications, Inc.",70:"MediaTek, Inc.",71:"Bluegiga",72:"Marvell Technology Group Ltd.",73:"3DSP Corporation",74:"Accel Semiconductor Ltd.",75:"Continental Automotive Systems",76:"Apple, Inc.",77:"Staccato Communications, Inc.",78:"Avago Technologies",79:"APT Licensing Ltd.",80:"SiRF Technology",81:"Tzero Technologies, Inc.",82:"J&M Corporation",83:"Free2move AB",84:"3DiJoy Corporation",85:"Plantronics, Inc.",86:"Sony Ericsson Mobile Communications",87:"Harman International Industries, Inc.",88:"Vizio, Inc.",89:"Nordic Semiconductor ASA",90:"EM Microelectronic-Marin SA",91:"Ralink Technology Corporation",92:"Belkin International, Inc.",93:"Realtek Semiconductor Corporation",94:"Stonestreet One, LLC",95:"Wicentric, Inc.",96:"RivieraWaves S.A.S",97:"RDA Microelectronics",98:"Gibson Guitars",99:"MiCommand Inc.",100:"Band XI International, LLC",101:"Hewlett-Packard Company",102:"9Solutions Oy",103:"GN Netcom A/S",104:"General Motors",105:"A&D Engineering, Inc.",106:"MindTree Ltd.",107:"Polar Electro OY",108:"Beautiful Enterprise Co., Ltd.",109:"BriarTek, Inc.",110:"Summit Data Communications, Inc.",111:"Sound ID",112:"Monster, LLC",113:"connectBlue AB",114:"ShangHai Super Smart Electronics Co. Ltd.",115:"Group Sense Ltd.",116:"Zomm, LLC",117:"Samsung Electronics Co. Ltd.",118:"Creative Technology Ltd.",119:"Laird Technologies",120:"Nike, Inc.",121:"lesswire AG",122:"MStar Semiconductor, Inc.",123:"Hanlynn Technologies",124:"A & R Cambridge",125:"Seers Technology Co. Ltd",126:"Sports Tracking Technologies Ltd.",127:"Autonet Mobile",128:"DeLorme Publishing Company, Inc.",129:"WuXi Vimicro",130:"Sennheiser Communications A/S",131:"TimeKeeping Systems, Inc.",132:"Ludus Helsinki Ltd.",133:"BlueRadios, Inc.",134:"equinox AG",135:"Garmin International, Inc.",136:"Ecotest",137:"GN ReSound A/S",138:"Jawbone",139:"Topcorn Positioning Systems, LLC",140:"Gimbal Inc. (formerly Qualcomm Labs, Inc. and Qualcomm Retail Solutions, Inc.)",141:"Zscan Software",142:"Quintic Corp.",143:"Stollman E+V GmbH",144:"Funai Electric Co., Ltd.",145:"Advanced PANMOBIL Systems GmbH & Co. KG",146:"ThinkOptics, Inc.",147:"Universal Electronics, Inc.",148:"Airoha Technology Corp.",149:"NEC Lighting, Ltd.",150:"ODM Technology, Inc.",151:"ConnecteDevice Ltd.",152:"zer01.tv GmbH",153:"i.Tech Dynamic Global Distribution Ltd.",154:"Alpwise",155:"Jiangsu Toppower Automotive Electronics Co., Ltd.",156:"Colorfy, Inc.",157:"Geoforce Inc.",158:"Bose Corporation",159:"Suunto Oy",160:"Kensington Computer Products Group",161:"SR-Medizinelektronik",162:"Vertu Corporation Limited",163:"Meta Watch Ltd.",164:"LINAK A/S",165:"OTL Dynamics LLC",166:"Panda Ocean Inc.",167:"Visteon Corporation",168:"ARP Devices Limited",169:"Magneti Marelli S.p.A",170:"CAEN RFID srl",171:"Ingenieur-Systemgruppe Zahn GmbH",172:"Green Throttle Games",173:"Peter Systemtechnik GmbH",174:"Omegawave Oy",175:"Cinetix",176:"Passif Semiconductor Corp",177:"Saris Cycling Group, Inc",178:"Bekey A/S",179:"Clarinox Technologies Pty. Ltd.",180:"BDE Technology Co., Ltd.",181:"Swirl Networks",182:"Meso international",183:"TreLab Ltd",184:"Qualcomm Innovation Center, Inc. (QuIC)",185:"Johnson Controls, Inc.",186:"Starkey Laboratories Inc.",187:"S-Power Electronics Limited",188:"Ace Sensor Inc",189:"Aplix Corporation",190:"AAMP of America",191:"Stalmart Technology Limited",192:"AMICCOM Electronics Corporation",193:"Shenzhen Excelsecu Data Technology Co.,Ltd",194:"Geneq Inc.",195:"adidas AG",196:"LG Electronics",197:"Onset Computer Corporation",198:"Selfly BV",199:"Quuppa Oy.",200:"GeLo Inc",201:"Evluma",202:"MC10",203:"Binauric SE",204:"Beats Electronics",205:"Microchip Technology Inc.",206:"Elgato Systems GmbH",207:"ARCHOS SA",208:"Dexcom, Inc.",209:"Polar Electro Europe B.V.",210:"Dialog Semiconductor B.V.",211:"Taixingbang\xA0Technology (HK) Co,. LTD.",212:"Kawantech",213:"Austco Communication Systems",214:"Timex Group USA, Inc.",215:"Qualcomm Technologies, Inc.",216:"Qualcomm Connected Experiences, Inc.",217:"Voyetra Turtle Beach",218:"txtr GmbH",219:"Biosentronics",220:"Procter & Gamble",221:"Hosiden Corporation",222:"Muzik LLC",223:"Misfit Wearables Corp",224:"Google",225:"Danlers Ltd",226:"Semilink Inc",227:"inMusic Brands, Inc",228:"L.S. Research Inc.",229:"Eden Software Consultants Ltd.",230:"Freshtemp",231:"KS Technologies",232:"ACTS Technologies",233:"Vtrack Systems",234:"Nielsen-Kellerman Company",235:"Server Technology, Inc.",236:"BioResearch Associates",237:"Jolly Logic, LLC",238:"Above Average Outcomes, Inc.",239:"Bitsplitters GmbH",240:"PayPal, Inc.",241:"Witron Technology Limited",242:"Aether Things\xA0Inc. (formerly Morse Project Inc.)",243:"Kent Displays Inc.",244:"Nautilus Inc.",245:"Smartifier Oy",246:"Elcometer Limited",247:"VSN Technologies Inc.",248:"AceUni Corp., Ltd.",249:"StickNFind",250:"Crystal Code AB",251:"KOUKAAM a.s.",252:"Delphi Corporation",253:"ValenceTech Limited",254:"Reserved",255:"Typo Products, LLC",256:"TomTom International BV",257:"Fugoo, Inc",258:"Keiser Corporation",259:"Bang & Olufsen A/S",260:"PLUS Locations Systems Pty Ltd",261:"Ubiquitous Computing Technology Corporation",262:"Innovative Yachtter Solutions",263:"William Demant Holding A/S",264:"Chicony Electronics Co., Ltd.",265:"Atus BV",266:"Codegate Ltd.",267:"ERi, Inc.",268:"Transducers Direct, LLC",269:"Fujitsu Ten Limited",270:"Audi AG",271:"HiSilicon Technologies Co., Ltd.",272:"Nippon Seiki Co., Ltd.",273:"Steelseries ApS",274:"vyzybl Inc.",275:"Openbrain Technologies, Co., Ltd.",276:"Xensr",277:"e.solutions",278:"1OAK Technologies",279:"Wimoto Technologies Inc",280:"Radius Networks, Inc.",281:"Wize Technology Co., Ltd.",282:"Qualcomm Labs, Inc.",283:"Aruba Networks",284:"Baidu",285:"Arendi AG",286:"Skoda Auto a.s.",287:"Volkswagon AG",288:"Porsche AG",289:"Sino Wealth Electronic Ltd.",290:"AirTurn, Inc.",291:"Kinsa, Inc.",292:"HID Global",293:"SEAT es",294:"Promethean Ltd.",295:"Salutica Allied Solutions",296:"GPSI Group Pty Ltd",297:"Nimble Devices Oy",298:"Changzhou Yongse Infotech Co., Ltd",299:"SportIQ",300:"TEMEC Instruments B.V.",301:"Sony Corporation",302:"ASSA ABLOY",303:"Clarion Co., Ltd.",304:"Warehouse Innovations",305:"Cypress Semiconductor Corporation",306:"MADS Inc",307:"Blue Maestro Limited",308:"Resolution Products, Inc.",309:"Airewear LLC",310:"Seed Labs, Inc. (formerly ETC sp. z.o.o.)",311:"Prestigio Plaza Ltd.",312:"NTEO Inc.",313:"Focus Systems Corporation",314:"Tencent Holdings Limited",315:"Allegion",316:"Murata Manufacuring Co., Ltd.",318:"Nod, Inc.",319:"B&B Manufacturing Company",320:"Alpine\xA0Electronics\xA0(China)\xA0Co.,\xA0Ltd",321:"FedEx Services",322:"Grape Systems Inc.",323:"Bkon Connect",324:"Lintech GmbH",325:"Novatel Wireless",326:"Ciright",327:"Mighty Cast, Inc.",328:"Ambimat Electronics",329:"Perytons Ltd.",330:"Tivoli Audio, LLC",331:"Master Lock",332:"Mesh-Net Ltd",333:"Huizhou Desay SV Automotive CO., LTD.",334:"Tangerine, Inc.",335:"B&W Group Ltd.",336:"Pioneer Corporation",337:"OnBeep",338:"Vernier Software & Technology",339:"ROL Ergo",340:"Pebble Technology",341:"NETATMO",342:"Accumulate AB",343:"Anhui Huami Information Technology Co., Ltd.",344:"Inmite s.r.o.",345:"ChefSteps, Inc.",346:"micas AG",347:"Biomedical Research Ltd.",348:"Pitius Tec S.L.",349:"Estimote, Inc.",350:"Unikey Technologies, Inc.",351:"Timer Cap Co.",352:"AwoX",353:"yikes",354:"MADSGlobal NZ Ltd.",355:"PCH International",356:"Qingdao Yeelink Information Technology Co., Ltd.",357:"Milwaukee Tool (formerly Milwaukee Electric Tools)",358:"MISHIK Pte Ltd",359:"Bayer HealthCare",360:"Spicebox LLC",361:"emberlight",362:"Cooper-Atkins Corporation",363:"Qblinks",364:"MYSPHERA",365:"LifeScan Inc",366:"Volantic AB",367:"Podo Labs, Inc",368:"Roche Diabetes Care AG",369:"Amazon Fulfillment Service",370:"Connovate Technology Private Limited",371:"Kocomojo, LLC",372:"Everykey LLC",373:"Dynamic Controls",374:"SentriLock",375:"I-SYST inc.",376:"CASIO COMPUTER CO., LTD.",377:"LAPIS Semiconductor Co., Ltd.",378:"Telemonitor, Inc.",379:"taskit GmbH",380:"Daimler AG",381:"BatAndCat",382:"BluDotz Ltd",383:"XTel ApS",384:"Gigaset Communications GmbH",385:"Gecko Health Innovations, Inc.",386:"HOP Ubiquitous",387:"To Be Assigned",388:"Nectar",389:"bel\u2019apps LLC",390:"CORE Lighting Ltd",391:"Seraphim Sense Ltd",392:"Unico RBC",393:"Physical Enterprises Inc.",394:"Able Trend Technology Limited",395:"Konica Minolta, Inc.",396:"Wilo SE",397:"Extron Design Services",398:"Fitbit, Inc.",399:"Fireflies Systems",400:"Intelletto Technologies Inc.",401:"FDK CORPORATION",402:"Cloudleaf, Inc",403:"Maveric Automation LLC",404:"Acoustic Stream Corporation",405:"Zuli",406:"Paxton Access Ltd",407:"WiSilica Inc",408:"Vengit Limited",409:"SALTO SYSTEMS S.L.",410:"TRON Forum (formerly T-Engine Forum)",411:"CUBETECH s.r.o.",412:"Cokiya Incorporated",413:"CVS Health",414:"Ceruus",415:"Strainstall Ltd",416:"Channel Enterprises (HK) Ltd.",417:"FIAMM",418:"GIGALANE.CO.,LTD",419:"EROAD",420:"Mine Safety Appliances",421:"Icon Health and Fitness",422:"Asandoo GmbH",423:"ENERGOUS CORPORATION",424:"Taobao",425:"Canon Inc.",426:"Geophysical Technology Inc.",427:"Facebook, Inc.",428:"Nipro Diagnostics, Inc.",429:"FlightSafety International",430:"Earlens Corporation",431:"Sunrise Micro Devices, Inc.",432:"Star Micronics Co., Ltd.",433:"Netizens Sp. z o.o.",434:"Nymi Inc.",435:"Nytec, Inc.",436:"Trineo Sp. z o.o.",437:"Nest Labs Inc.",438:"LM Technologies Ltd",439:"General Electric Company",440:"i+D3 S.L.",441:"HANA Micron",442:"Stages Cycling LLC",443:"Cochlear Bone Anchored Solutions AB",444:"SenionLab AB",445:"Syszone Co., Ltd",446:"Pulsate Mobile Ltd.",447:"Hong Kong HunterSun Electronic Limited",448:"pironex GmbH",449:"BRADATECH Corp.",450:"Transenergooil AG",451:"Bunch",452:"DME Microelectronics",453:"Bitcraze AB",454:"HASWARE Inc.",455:"Abiogenix Inc.",456:"Poly-Control ApS",457:"Avi-on",458:"Laerdal Medical AS",459:"Fetch My Pet",460:"Sam Labs Ltd.",461:"Chengdu Synwing Technology Ltd",462:"HOUWA SYSTEM DESIGN, k.k.",463:"BSH",464:"Primus Inter Pares Ltd",465:"August",466:"Gill Electronics",467:"Sky Wave Design",468:"Newlab S.r.l.",469:"ELAD srl",470:"G-wearables inc.",471:"Squadrone Systems Inc.",472:"Code Corporation",473:"Savant Systems LLC",474:"Logitech International SA",475:"Innblue Consulting",476:"iParking Ltd.",477:"Koninklijke Philips Electronics N.V.",478:"Minelab Electronics Pty Limited",479:"Bison Group Ltd.",480:"Widex A/S",481:"Jolla Ltd",482:"Lectronix, Inc.",483:"Caterpillar Inc",484:"Freedom Innovations",485:"Dynamic Devices Ltd",486:"Technology Solutions (UK) Ltd",487:"IPS Group Inc.",488:"STIR",489:"Sano, Inc",490:"Advanced Application Design, Inc.",491:"AutoMap LLC",492:"Spreadtrum Communications Shanghai Ltd",493:"CuteCircuit LTD",494:"Valeo Service",495:"Fullpower Technologies, Inc.",496:"KloudNation",497:"Zebra Technologies Corporation",498:"Itron, Inc.",499:"The University of Tokyo",500:"UTC Fire and Security",501:"Cool Webthings Limited",502:"DJO Global",503:"Gelliner Limited",504:"Anyka (Guangzhou) Microelectronics Technology Co, LTD",505:"Medtronic, Inc.",506:"Gozio, Inc.",507:"Form Lifting, LLC",508:"Wahoo Fitness, LLC",509:"Kontakt Micro-Location Sp. z o.o.",510:"Radio System Corporation",511:"Freescale Semiconductor, Inc.",512:"Verifone Systems PTe Ltd. Taiwan Branch",513:"AR Timing",514:"Rigado LLC",515:"Kemppi Oy",516:"Tapcentive Inc.",517:"Smartbotics Inc.",518:"Otter Products, LLC",519:"STEMP Inc.",520:"LumiGeek LLC",521:"InvisionHeart Inc.",522:"Macnica Inc. ",523:"Jaguar Land Rover Limited",524:"CoroWare Technologies, Inc",525:"Simplo Technology Co., LTD",526:"Omron Healthcare Co., LTD",527:"Comodule GMBH",528:"ikeGPS",529:"Telink Semiconductor Co. Ltd",530:"Interplan Co., Ltd",531:"Wyler AG",532:"IK Multimedia Production srl",533:"Lukoton Experience Oy",534:"MTI Ltd",535:"Tech4home, Lda",536:"Hiotech AB",537:"DOTT Limited",538:"Blue Speck Labs, LLC",539:"Cisco Systems, Inc",540:"Mobicomm Inc",541:"Edamic",542:"Goodnet, Ltd",543:"Luster Leaf Products Inc",544:"Manus Machina BV",545:"Mobiquity Networks Inc",546:"Praxis Dynamics",547:"Philip Morris Products S.A.",548:"Comarch SA",549:"Nestl Nespresso S.A.",550:"Merlinia A/S",551:"LifeBEAM Technologies",552:"Twocanoes Labs, LLC",553:"Muoverti Limited",554:"Stamer Musikanlagen GMBH",555:"Tesla Motors",556:"Pharynks Corporation",557:"Lupine",558:"Siemens AG",559:"Huami (Shanghai) Culture Communication CO., LTD",560:"Foster Electric Company, Ltd",561:"ETA SA",562:"x-Senso Solutions Kft",563:"Shenzhen SuLong Communication Ltd",564:"FengFan (BeiJing) Technology Co, Ltd",565:"Qrio Inc",566:"Pitpatpet Ltd",567:"MSHeli s.r.l.",568:"Trakm8 Ltd",569:"JIN CO, Ltd",570:"Alatech Tehnology",571:"Beijing CarePulse Electronic Technology Co, Ltd",572:"Awarepoint",573:"ViCentra B.V.",574:"Raven Industries",575:"WaveWare Technologies Inc.",576:"Argenox Technologies",577:"Bragi GmbH",578:"16Lab Inc",579:"Masimo Corp",580:"Iotera Inc",581:"Endress+Hauser",582:"ACKme Networks, Inc.",583:"FiftyThree Inc.",584:"Parker Hannifin Corp",585:"Transcranial Ltd",586:"Uwatec AG",587:"Orlan LLC",588:"Blue Clover Devices",589:"M-Way Solutions GmbH",590:"Microtronics Engineering GmbH",591:"Schneider Schreibgerte GmbH",592:"Sapphire Circuits LLC",593:"Lumo Bodytech Inc.",594:"UKC Technosolution",595:"Xicato Inc.",596:"Playbrush",597:"Dai Nippon Printing Co., Ltd.",598:"G24 Power Limited",599:"AdBabble Local Commerce Inc.",600:"Devialet SA",601:"ALTYOR",602:"University of Applied Sciences Valais/Haute Ecole Valaisanne",603:"Five Interactive, LLC dba Zendo",604:"NetEaseHangzhouNetwork co.Ltd.",605:"Lexmark International Inc.",606:"Fluke Corporation",607:"Yardarm Technologies",608:"SensaRx",609:"SECVRE GmbH",610:"Glacial Ridge Technologies",611:"Identiv, Inc.",612:"DDS, Inc.",613:"SMK Corporation",614:"Schawbel Technologies LLC",615:"XMI Systems SA",616:"Cerevo",617:"Torrox GmbH & Co KG",618:"Gemalto",619:"DEKA Research & Development Corp.",620:"Domster Tadeusz Szydlowski",621:"Technogym SPA",622:"FLEURBAEY BVBA",623:"Aptcode Solutions",624:"LSI ADL Technology",625:"Animas Corp",626:"Alps Electric Co., Ltd.",627:"OCEASOFT",628:"Motsai Research",629:"Geotab",630:"E.G.O. Elektro-Gertebau GmbH",631:"bewhere inc",632:"Johnson Outdoors Inc",633:"steute Schaltgerate GmbH & Co. KG",634:"Ekomini inc.",635:"DEFA AS",636:"Aseptika Ltd",637:"HUAWEI Technologies Co., Ltd. ( )",638:"HabitAware, LLC",639:"ruwido austria gmbh",640:"ITEC corporation",641:"StoneL",642:"Sonova AG",643:"Maven Machines, Inc.",644:"Synapse Electronics",645:"Standard Innovation Inc.",646:"RF Code, Inc.",647:"Wally Ventures S.L.",648:"Willowbank Electronics Ltd",649:"SK Telecom",650:"Jetro AS",651:"Code Gears LTD",652:"NANOLINK APS",653:"IF, LLC",654:"RF Digital Corp",655:"Church & Dwight Co., Inc",656:"Multibit Oy",657:"CliniCloud Inc",658:"SwiftSensors",659:"Blue Bite",660:"ELIAS GmbH",661:"Sivantos GmbH",662:"Petzl",663:"storm power ltd",664:"EISST Ltd",665:"Inexess Technology Simma KG",666:"Currant, Inc.",667:"C2 Development, Inc.",668:"Blue Sky Scientific, LLC",669:"ALOTTAZS LABS, LLC",670:"Kupson spol. s r.o.",671:"Areus Engineering GmbH",672:"Impossible Camera GmbH",673:"InventureTrack Systems",674:"LockedUp",675:"Itude",676:"Pacific Lock Company",677:"Tendyron Corporation ( )",678:"Robert Bosch GmbH",679:"Illuxtron international B.V.",680:"miSport Ltd.",681:"Chargelib",682:"Doppler Lab",683:"BBPOS Limited",684:"RTB Elektronik GmbH & Co. KG",685:"Rx Networks, Inc.",686:"WeatherFlow, Inc.",687:"Technicolor USA Inc.",688:"Bestechnic(Shanghai),Ltd",689:"Raden Inc",690:"JouZen Oy",691:"CLABER S.P.A.",692:"Hyginex, Inc.",693:"HANSHIN ELECTRIC RAILWAY CO.,LTD.",694:"Schneider Electric",695:"Oort Technologies LLC",696:"Chrono Therapeutics",697:"Rinnai Corporation",698:"Swissprime Technologies AG",699:"Koha.,Co.Ltd",700:"Genevac Ltd",701:"Chemtronics",702:"Seguro Technology Sp. z o.o.",703:"Redbird Flight Simulations",704:"Dash Robotics",705:"LINE Corporation",706:"Guillemot Corporation",707:"Techtronic Power Tools Technology Limited",708:"Wilson Sporting Goods",709:"Lenovo (Singapore) Pte Ltd. ( )",710:"Ayatan Sensors",711:"Electronics Tomorrow Limited",712:"VASCO Data Security International, Inc.",713:"PayRange Inc.",714:"ABOV Semiconductor",715:"AINA-Wireless Inc.",716:"Eijkelkamp Soil & Water",717:"BMA ergonomics b.v.",718:"Teva Branded Pharmaceutical Products R&D, Inc.",719:"Anima",720:"3M",721:"Empatica Srl",722:"Afero, Inc.",723:"Powercast Corporation",724:"Secuyou ApS",725:"OMRON Corporation",726:"Send Solutions",727:"NIPPON SYSTEMWARE CO.,LTD.",728:"Neosfar",729:"Fliegl Agrartechnik GmbH",730:"Gilvader",731:"Digi International Inc (R)",732:"DeWalch Technologies, Inc.",733:"Flint Rehabilitation Devices, LLC",734:"Samsung SDS Co., Ltd.",735:"Blur Product Development",736:"University of Michigan",737:"Victron Energy BV",738:"NTT docomo",739:"Carmanah Technologies Corp.",740:"Bytestorm Ltd.",741:"Espressif Incorporated ( () )",742:"Unwire",743:"Connected Yard, Inc.",744:"American Music Environments",745:"Sensogram Technologies, Inc.",746:"Fujitsu Limited",747:"Ardic Technology",748:"Delta Systems, Inc",749:"HTC Corporation",750:"Citizen Holdings Co., Ltd.",751:"SMART-INNOVATION.inc",752:"Blackrat Software",753:"The Idea Cave, LLC",754:"GoPro, Inc.",755:"AuthAir, Inc",756:"Vensi, Inc.",757:"Indagem Tech LLC",758:"Intemo Technologies",759:"DreamVisions co., Ltd.",760:"Runteq Oy Ltd",761:"IMAGINATION TECHNOLOGIES LTD",762:"CoSTAR TEchnologies",763:"Clarius Mobile Health Corp.",764:"Shanghai Frequen Microelectronics Co., Ltd.",765:"Uwanna, Inc.",766:"Lierda Science & Technology Group Co., Ltd.",767:"Silicon Laboratories",768:"World Moto Inc.",769:"Giatec Scientific Inc.",770:"Loop Devices, Inc",771:"IACA electronique",772:"Martians Inc",773:"Swipp ApS",774:"Life Laboratory Inc.",775:"FUJI INDUSTRIAL CO.,LTD.",776:"Surefire, LLC",777:"Dolby Labs",778:"Ellisys",779:"Magnitude Lighting Converters",780:"Hilti AG",781:"Devdata S.r.l.",782:"Deviceworx",783:"Shortcut Labs",784:"SGL Italia S.r.l.",785:"PEEQ DATA",786:"Ducere Technologies Pvt Ltd",787:"DiveNav, Inc.",788:"RIIG AI Sp. z o.o.",789:"Thermo Fisher Scientific",790:"AG Measurematics Pvt. Ltd.",791:"CHUO Electronics CO., LTD.",792:"Aspenta International",793:"Eugster Frismag AG",794:"Amber wireless GmbH",795:"HQ Inc",796:"Lab Sensor Solutions",797:"Enterlab ApS",798:"Eyefi, Inc.",799:"MetaSystem S.p.A.",800:"SONO ELECTRONICS. CO., LTD",801:"Jewelbots",802:"Compumedics Limited",803:"Rotor Bike Components",804:"Astro, Inc.",805:"Amotus Solutions",806:"Healthwear Technologies (Changzhou)Ltd",807:"Essex Electronics",808:"Grundfos A/S",809:"Eargo, Inc.",810:"Electronic Design Lab",811:"ESYLUX",812:"NIPPON SMT.CO.,Ltd",813:"BM innovations GmbH",814:"indoormap",815:"OttoQ Inc",816:"North Pole Engineering",817:"3flares Technologies Inc.",818:"Electrocompaniet A.S.",819:"Mul-T-Lock",820:"Corentium AS",821:"Enlighted Inc",822:"GISTIC",823:"AJP2 Holdings, LLC",824:"COBI GmbH",825:"Blue Sky Scientific, LLC",826:"Appception, Inc.",827:"Courtney Thorne Limited",828:"Virtuosys",829:"TPV Technology Limited",830:"Monitra SA",831:"Automation Components, Inc.",832:"Letsense s.r.l.",833:"Etesian Technologies LLC",834:"GERTEC BRASIL LTDA.",835:"Drekker Development Pty. Ltd.",836:"Whirl Inc",837:"Locus Positioning",838:"Acuity Brands Lighting, Inc",839:"Prevent Biometrics",840:"Arioneo",841:"VersaMe",842:"Vaddio",843:"Libratone A/S",844:"HM Electronics, Inc.",845:"TASER International, Inc.",846:"SafeTrust Inc.",847:"Heartland Payment Systems",848:"Bitstrata Systems Inc.",849:"Pieps GmbH",850:"iRiding(Xiamen)Technology Co.,Ltd.",851:"Alpha Audiotronics, Inc.",852:"TOPPAN FORMS CO.,LTD.",853:"Sigma Designs, Inc.",854:"Spectrum Brands, Inc.",855:"Polymap Wireless",856:"MagniWare Ltd.",857:"Novotec Medical GmbH",858:"Medicom Innovation Partner a/s",859:"Matrix Inc.",860:"Eaton Corporation",861:"KYS",862:"Naya Health, Inc.",863:"Acromag",864:"Insulet Corporation",865:"Wellinks Inc.",866:"ON Semiconductor",867:"FREELAP SA",868:"Favero Electronics Srl",869:"BioMech Sensor LLC",870:"BOLTT Sports technologies Private limited",871:"Saphe International",872:"Metormote AB",873:"littleBits",874:"SetPoint Medical",875:"BRControls Products BV",876:"Zipcar",877:"AirBolt Pty Ltd",878:"KeepTruckin Inc",879:"Motiv, Inc.",880:"Wazombi Labs O",881:"ORBCOMM",882:"Nixie Labs, Inc.",883:"AppNearMe Ltd",884:"Holman Industries",885:"Expain AS",886:"Electronic Temperature Instruments Ltd",887:"Plejd AB",888:"Propeller Health",889:"Shenzhen iMCO Electronic Technology Co.,Ltd",890:"Algoria",891:"Apption Labs Inc.",892:"Cronologics Corporation",893:"MICRODIA Ltd.",894:"lulabytes S.L.",895:"Nestec S.A.",896:"LLC MEGA - F service",897:"Sharp Corporation",898:"Precision Outcomes Ltd",899:"Kronos Incorporated",900:"OCOSMOS Co., Ltd.",901:"Embedded Electronic Solutions Ltd. dba e2Solutions",902:"Aterica Inc.",903:"BluStor PMC, Inc.",904:"Kapsch TrafficCom AB",905:"ActiveBlu Corporation",906:"Kohler Mira Limited",907:"Noke",908:"Appion Inc.",909:"Resmed Ltd",910:"Crownstone B.V.",911:"Xiaomi Inc.",912:"INFOTECH s.r.o.",913:"Thingsquare AB",914:"T&D",915:"LAVAZZA S.p.A.",916:"Netclearance Systems, Inc.",917:"SDATAWAY",918:"BLOKS GmbH",919:"LEGO System A/S",920:"Thetatronics Ltd",921:"Nikon Corporation",922:"NeST",923:"South Silicon Valley Microelectronics",924:"ALE International",925:"CareView Communications, Inc.",926:"SchoolBoard Limited",927:"Molex Corporation",928:"IVT Wireless Limited",929:"Alpine Labs LLC",930:"Candura Instruments",931:"SmartMovt Technology Co., Ltd",932:"Token Zero Ltd",933:"ACE CAD Enterprise Co., Ltd. (ACECAD)",934:"Medela, Inc",935:"AeroScout",936:"Esrille Inc.",937:"THINKERLY SRL",938:"Exon Sp. z o.o.",939:"Meizu Technology Co., Ltd.",940:"Smablo LTD",941:"XiQ",942:"Allswell Inc.",943:"Comm-N-Sense Corp DBA Verigo",944:"VIBRADORM GmbH",945:"Otodata Wireless Network Inc.",946:"Propagation Systems Limited",947:"Midwest Instruments & Controls",948:"Alpha Nodus, inc.",949:"petPOMM, Inc",950:"Mattel",951:"Airbly Inc.",952:"A-Safe Limited",953:"FREDERIQUE CONSTANT SA",954:"Maxscend Microelectronics Company Limited",955:"Abbott Diabetes Care",956:"ASB Bank Ltd",957:"amadas",958:"Applied Science, Inc.",959:"iLumi Solutions Inc.",960:"Arch Systems Inc.",961:"Ember Technologies, Inc.",962:"Snapchat Inc",963:"Casambi Technologies Oy",964:"Pico Technology Inc.",965:"St. Jude Medical, Inc.",966:"Intricon",967:"Structural Health Systems, Inc.",968:"Avvel International",969:"Gallagher Group",970:"In2things Automation Pvt. Ltd.",971:"SYSDEV Srl",972:"Vonkil Technologies Ltd",973:"Wynd Technologies, Inc.",974:"CONTRINEX S.A.",975:"MIRA, Inc.",976:"Watteam Ltd",977:"Density Inc.",978:"IOT Pot India Private Limited",979:"Sigma Connectivity AB",980:"PEG PEREGO SPA",981:"Wyzelink Systems Inc.",982:"Yota Devices LTD",983:"FINSECUR",984:"Zen-Me Labs Ltd",985:"3IWare Co., Ltd.",986:"EnOcean GmbH",987:"Instabeat, Inc",988:"Nima Labs",989:"Andreas Stihl AG & Co. KG",990:"Nathan Rhoades LLC",991:"Grob Technologies, LLC",992:"Actions (Zhuhai) Technology Co., Limited",993:"SPD Development Company Ltd",994:"Sensoan Oy",995:"Qualcomm Life Inc",996:"Chip-ing AG",997:"ffly4u",998:"IoT Instruments Oy",999:"TRUE Fitness Technology",1000:"Reiner Kartengeraete GmbH & Co. KG.",1001:"SHENZHEN LEMONJOY TECHNOLOGY CO., LTD.",1002:"Hello Inc.",1003:"Evollve Inc.",1004:"Jigowatts Inc.",1005:"BASIC MICRO.COM,INC.",1006:"CUBE TECHNOLOGIES",1007:"foolography GmbH",1008:"CLINK",1009:"Hestan Smart Cooking Inc.",1010:"WindowMaster A/S",1011:"Flowscape AB",1012:"PAL Technologies Ltd",1013:"WHERE, Inc.",1014:"Iton Technology Corp.",1015:"Owl Labs Inc.",1016:"Rockford Corp.",1017:"Becon Technologies Co.,Ltd.",1018:"Vyassoft Technologies Inc",1019:"Nox Medical",1020:"Kimberly-Clark",1021:"Trimble Navigation Ltd.",1022:"Littelfuse",1023:"Withings",1024:"i-developer IT Beratung UG",1026:"Sears Holdings Corporation",1027:"Gantner Electronic GmbH",1028:"Authomate Inc",1029:"Vertex International, Inc.",1030:"Airtago",1031:"Swiss Audio SA",1032:"ToGetHome Inc.",1033:"AXIS",1034:"Openmatics",1035:"Jana Care Inc.",1036:"Senix Corporation",1037:"NorthStar Battery Company, LLC",1038:"SKF (U.K.) Limited",1039:"CO-AX Technology, Inc.",1040:"Fender Musical Instruments",1041:"Luidia Inc",1042:"SEFAM",1043:"Wireless Cables Inc",1044:"Lightning Protection International Pty Ltd",1045:"Uber Technologies Inc",1046:"SODA GmbH",1047:"Fatigue Science",1048:"Alpine Electronics Inc.",1049:"Novalogy LTD",1050:"Friday Labs Limited",1051:"OrthoAccel Technologies",1052:"WaterGuru, Inc.",1053:"Benning Elektrotechnik und Elektronik GmbH & Co. KG",1054:"Dell Computer Corporation",1055:"Kopin Corporation",1056:"TecBakery GmbH",1057:"Backbone Labs, Inc.",1058:"DELSEY SA",1059:"Chargifi Limited",1060:"Trainesense Ltd.",1061:"Unify Software and Solutions GmbH & Co. KG",1062:"Husqvarna AB",1063:"Focus fleet and fuel management inc",1064:"SmallLoop, LLC",1065:"Prolon Inc.",1066:"BD Medical",1067:"iMicroMed Incorporated",1068:"Ticto N.V.",1069:"Meshtech AS",1070:"MemCachier Inc.",1071:"Danfoss A/S",1072:"SnapStyk Inc.",1073:"Amyway Corporation",1074:"Silk Labs, Inc.",1075:"Pillsy Inc.",1076:"Hatch Baby, Inc.",1077:"Blocks Wearables Ltd.",1078:"Drayson Technologies (Europe) Limited",1079:"eBest IOT Inc.",1080:"Helvar Ltd",1081:"Radiance Technologies",1082:"Nuheara Limited",1083:"Appside co., ltd.",1084:"DeLaval",1085:"Coiler Corporation",1086:"Thermomedics, Inc.",1087:"Tentacle Sync GmbH",1088:"Valencell, Inc.",1089:"iProtoXi Oy",1090:"SECOM CO., LTD.",1091:"Tucker International LLC",1092:"Metanate Limited",1093:"Kobian Canada Inc.",1094:"NETGEAR, Inc.",1095:"Fabtronics Australia Pty Ltd",1096:"Grand Centrix GmbH",1097:"1UP USA.com llc",1098:"SHIMANO INC.",1099:"Nain Inc.",1100:"LifeStyle Lock, LLC",1101:"VEGA Grieshaber KG",1102:"Xtrava Inc.",1103:"TTS Tooltechnic Systems AG & Co. KG",1104:"Teenage Engineering AB",1105:"Tunstall Nordic AB",1106:"Svep Design Center AB",1107:"GreenPeak Technologies BV",1108:"Sphinx Electronics GmbH & Co KG",1109:"Atomation",1110:"Nemik Consulting Inc",1111:"RF INNOVATION",1112:"Mini Solution Co., Ltd.",1113:"Lumenetix, Inc",1114:"2048450 Ontario Inc",1115:"SPACEEK LTD",1116:"Delta T Corporation",1117:"Boston Scientific Corporation",1118:"Nuviz, Inc.",1119:"Real Time Automation, Inc.",1120:"Kolibree",1121:"vhf elektronik GmbH",1122:"Bonsai Systems GmbH",1123:"Fathom Systems Inc.",1124:"Bellman & Symfon",1125:"International Forte Group LLC",1126:"CycleLabs Solutions inc.",1127:"Codenex Oy",1128:"Kynesim Ltd",1129:"Palago AB",1130:"INSIGMA INC.",1131:"PMD Solutions",1132:"Qingdao Realtime Technology Co., Ltd.",1133:"BEGA Gantenbrink-Leuchten KG",1134:"Pambor Ltd.",65535:"SPECIAL USE/DEFAULT"}});var require_bluetooth=__commonJS((exports)=>{var exec3=__require("child_process").exec,execSync18=__require("child_process").execSync,path6=__require("path"),util4=require_util3(),bluetoothVendors=require_bluetoothVendors(),fs3=__require("fs"),_platform=process.platform,_linux=_platform==="linux"||_platform==="android",_darwin=_platform==="darwin",_windows=_platform==="win32",_freebsd=_platform==="freebsd",_openbsd=_platform==="openbsd",_netbsd=_platform==="netbsd",_sunos=_platform==="sunos";function parseBluetoothType(str5){let result2="";if(str5.indexOf("keyboard")>=0)result2="Keyboard";if(str5.indexOf("mouse")>=0)result2="Mouse";if(str5.indexOf("trackpad")>=0)result2="Trackpad";if(str5.indexOf("audio")>=0)result2="Audio";if(str5.indexOf("sound")>=0)result2="Audio";if(str5.indexOf("microph")>=0)result2="Microphone";if(str5.indexOf("speaker")>=0)result2="Speaker";if(str5.indexOf("headset")>=0)result2="Headset";if(str5.indexOf("phone")>=0)result2="Phone";if(str5.indexOf("macbook")>=0)result2="Computer";if(str5.indexOf("imac")>=0)result2="Computer";if(str5.indexOf("ipad")>=0)result2="Tablet";if(str5.indexOf("watch")>=0)result2="Watch";if(str5.indexOf("headphone")>=0)result2="Headset";return result2}function parseBluetoothManufacturer(str5){let result2=str5.split(" ")[0];if(str5=str5.toLowerCase(),str5.indexOf("apple")>=0)result2="Apple";if(str5.indexOf("ipad")>=0)result2="Apple";if(str5.indexOf("imac")>=0)result2="Apple";if(str5.indexOf("iphone")>=0)result2="Apple";if(str5.indexOf("magic mouse")>=0)result2="Apple";if(str5.indexOf("magic track")>=0)result2="Apple";if(str5.indexOf("macbook")>=0)result2="Apple";return result2}function parseBluetoothVendor(str5){let id=parseInt(str5);if(!isNaN(id))return bluetoothVendors[id]}function parseLinuxBluetoothInfo(lines,macAddr1,macAddr2){let result2={};return result2.device=null,result2.name=util4.getValue(lines,"name","="),result2.manufacturer=null,result2.macDevice=macAddr1,result2.macHost=macAddr2,result2.batteryPercent=null,result2.type=parseBluetoothType(result2.name.toLowerCase()),result2.connected=!1,result2}function parseDarwinBluetoothDevices(bluetoothObject,macAddr2){let result2={},typeStr=((bluetoothObject.device_minorClassOfDevice_string||bluetoothObject.device_majorClassOfDevice_string||bluetoothObject.device_minorType||"")+(bluetoothObject.device_name||"")).toLowerCase();return result2.device=bluetoothObject.device_services||"",result2.name=bluetoothObject.device_name||"",result2.manufacturer=bluetoothObject.device_manufacturer||parseBluetoothVendor(bluetoothObject.device_vendorID)||parseBluetoothManufacturer(bluetoothObject.device_name||"")||"",result2.macDevice=(bluetoothObject.device_addr||bluetoothObject.device_address||"").toLowerCase().replace(/-/g,":"),result2.macHost=macAddr2,result2.batteryPercent=bluetoothObject.device_batteryPercent||null,result2.type=parseBluetoothType(typeStr),result2.connected=bluetoothObject.device_isconnected==="attrib_Yes"||!1,result2}function parseWindowsBluetooth(lines){let result2={};return result2.device=null,result2.name=util4.getValue(lines,"name",":"),result2.manufacturer=util4.getValue(lines,"manufacturer",":"),result2.macDevice=null,result2.macHost=null,result2.batteryPercent=null,result2.type=parseBluetoothType(result2.name.toLowerCase()),result2.connected=null,result2}function bluetoothDevices(callback){return new Promise((resolve20)=>{process.nextTick(()=>{let result2=[];if(_linux){util4.getFilesInPath("/var/lib/bluetooth/").forEach((element)=>{let filename=path6.basename(element),pathParts=element.split("/"),macAddr1=pathParts.length>=6?pathParts[pathParts.length-2]:null,macAddr2=pathParts.length>=7?pathParts[pathParts.length-3]:null;if(filename==="info"){let infoFile=fs3.readFileSync(element,{encoding:"utf8"}).split(`
3853
3853
  `);result2.push(parseLinuxBluetoothInfo(infoFile,macAddr1,macAddr2))}});try{let hdicon=execSync18("hcitool con",util4.execOptsLinux).toString().toLowerCase();for(let i2=0;i2<result2.length;i2++)if(result2[i2].macDevice&&result2[i2].macDevice.length>10&&hdicon.indexOf(result2[i2].macDevice.toLowerCase())>=0)result2[i2].connected=!0}catch{util4.noop()}if(callback)callback(result2);resolve20(result2)}if(_darwin)exec3("system_profiler SPBluetoothDataType -json",(error2,stdout)=>{if(!error2)try{let outObj=JSON.parse(stdout.toString());if(outObj.SPBluetoothDataType&&outObj.SPBluetoothDataType.length&&outObj.SPBluetoothDataType[0]&&outObj.SPBluetoothDataType[0].device_title&&outObj.SPBluetoothDataType[0].device_title.length){let macAddr2=null;if(outObj.SPBluetoothDataType[0].local_device_title&&outObj.SPBluetoothDataType[0].local_device_title.general_address)macAddr2=outObj.SPBluetoothDataType[0].local_device_title.general_address.toLowerCase().replace(/-/g,":");outObj.SPBluetoothDataType[0].device_title.forEach((element)=>{let obj=element,objKey=Object.keys(obj);if(objKey&&objKey.length===1){let innerObject=obj[objKey[0]];innerObject.device_name=objKey[0];let bluetoothDevice=parseDarwinBluetoothDevices(innerObject,macAddr2);result2.push(bluetoothDevice)}})}if(outObj.SPBluetoothDataType&&outObj.SPBluetoothDataType.length&&outObj.SPBluetoothDataType[0]&&outObj.SPBluetoothDataType[0].device_connected&&outObj.SPBluetoothDataType[0].device_connected.length){let macAddr2=outObj.SPBluetoothDataType[0].controller_properties&&outObj.SPBluetoothDataType[0].controller_properties.controller_address?outObj.SPBluetoothDataType[0].controller_properties.controller_address.toLowerCase().replace(/-/g,":"):null;outObj.SPBluetoothDataType[0].device_connected.forEach((element)=>{let obj=element,objKey=Object.keys(obj);if(objKey&&objKey.length===1){let innerObject=obj[objKey[0]];innerObject.device_name=objKey[0],innerObject.device_isconnected="attrib_Yes";let bluetoothDevice=parseDarwinBluetoothDevices(innerObject,macAddr2);result2.push(bluetoothDevice)}})}if(outObj.SPBluetoothDataType&&outObj.SPBluetoothDataType.length&&outObj.SPBluetoothDataType[0]&&outObj.SPBluetoothDataType[0].device_not_connected&&outObj.SPBluetoothDataType[0].device_not_connected.length){let macAddr2=outObj.SPBluetoothDataType[0].controller_properties&&outObj.SPBluetoothDataType[0].controller_properties.controller_address?outObj.SPBluetoothDataType[0].controller_properties.controller_address.toLowerCase().replace(/-/g,":"):null;outObj.SPBluetoothDataType[0].device_not_connected.forEach((element)=>{let obj=element,objKey=Object.keys(obj);if(objKey&&objKey.length===1){let innerObject=obj[objKey[0]];innerObject.device_name=objKey[0],innerObject.device_isconnected="attrib_No";let bluetoothDevice=parseDarwinBluetoothDevices(innerObject,macAddr2);result2.push(bluetoothDevice)}})}}catch{util4.noop()}if(callback)callback(result2);resolve20(result2)});if(_windows)util4.powerShell("Get-CimInstance Win32_PNPEntity | select PNPClass, Name, Manufacturer, Status, Service, ConfigManagerErrorCode, Present | fl").then((stdout,error2)=>{if(!error2)stdout.toString().split(/\n\s*\n/).forEach((part)=>{let lines=part.split(`
3854
- `),service=util4.getValue(lines,"Service",":"),errorCode=util4.getValue(lines,"ConfigManagerErrorCode",":");if(util4.getValue(lines,"PNPClass",":").toLowerCase()==="bluetooth"&&errorCode==="0"&&service==="")result2.push(parseWindowsBluetooth(lines))});if(callback)callback(result2);resolve20(result2)});if(_freebsd||_netbsd||_openbsd||_sunos)resolve20(null)})})}exports.bluetoothDevices=bluetoothDevices});var require_lib5=__commonJS((exports)=>{var lib_version=require_package().version,util4=require_util3(),system=require_system(),osInfo=require_osinfo(),cpu=require_cpu(),memory=require_memory(),battery=require_battery(),graphics=require_graphics(),filesystem=require_filesystem(),network=require_network(),wifi=require_wifi(),processes=require_processes(),users=require_users(),internet=require_internet(),docker=require_docker(),vbox=require_virtualbox(),printer=require_printer(),usb=require_usb(),audio=require_audio(),bluetooth=require_bluetooth(),_platform=process.platform,_windows=_platform==="win32",_freebsd=_platform==="freebsd",_openbsd=_platform==="openbsd",_netbsd=_platform==="netbsd",_sunos=_platform==="sunos";if(_windows)util4.getCodepage(),util4.getPowershell();function version(){return lib_version}function getStaticData(callback){return new Promise((resolve20)=>{process.nextTick(()=>{let data={};data.version=version(),Promise.all([system.system(),system.bios(),system.baseboard(),system.chassis(),osInfo.osInfo(),osInfo.uuid(),osInfo.versions(),cpu.cpu(),cpu.cpuFlags(),graphics.graphics(),network.networkInterfaces(),memory.memLayout(),filesystem.diskLayout(),audio.audio(),bluetooth.bluetoothDevices(),usb.usb(),printer.printer()]).then((res)=>{if(data.system=res[0],data.bios=res[1],data.baseboard=res[2],data.chassis=res[3],data.os=res[4],data.uuid=res[5],data.versions=res[6],data.cpu=res[7],data.cpu.flags=res[8],data.graphics=res[9],data.net=res[10],data.memLayout=res[11],data.diskLayout=res[12],data.audio=res[13],data.bluetooth=res[14],data.usb=res[15],data.printer=res[16],callback)callback(data);resolve20(data)})})})}function getDynamicData(srv,iface,callback){if(util4.isFunction(iface))callback=iface,iface="";if(util4.isFunction(srv))callback=srv,srv="";return new Promise((resolve20)=>{process.nextTick(()=>{iface=iface||network.getDefaultNetworkInterface(),srv=srv||"";let functionProcessed=(()=>{let totalFunctions=15;if(_windows)totalFunctions=13;if(_freebsd||_openbsd||_netbsd)totalFunctions=11;if(_sunos)totalFunctions=6;return function(){if(--totalFunctions===0){if(callback)callback(data);resolve20(data)}}})(),data={};if(data.time=osInfo.time(),data.node=process.versions.node,data.v8=process.versions.v8,cpu.cpuCurrentSpeed().then((res)=>{data.cpuCurrentSpeed=res,functionProcessed()}),users.users().then((res)=>{data.users=res,functionProcessed()}),processes.processes().then((res)=>{data.processes=res,functionProcessed()}),cpu.currentLoad().then((res)=>{data.currentLoad=res,functionProcessed()}),!_sunos)cpu.cpuTemperature().then((res)=>{data.temp=res,functionProcessed()});if(!_openbsd&&!_freebsd&&!_netbsd&&!_sunos)network.networkStats(iface).then((res)=>{data.networkStats=res,functionProcessed()});if(!_sunos)network.networkConnections().then((res)=>{data.networkConnections=res,functionProcessed()});if(memory.mem().then((res)=>{data.mem=res,functionProcessed()}),!_sunos)battery().then((res)=>{data.battery=res,functionProcessed()});if(!_sunos)processes.services(srv).then((res)=>{data.services=res,functionProcessed()});if(!_sunos)filesystem.fsSize().then((res)=>{data.fsSize=res,functionProcessed()});if(!_windows&&!_openbsd&&!_freebsd&&!_netbsd&&!_sunos)filesystem.fsStats().then((res)=>{data.fsStats=res,functionProcessed()});if(!_windows&&!_openbsd&&!_freebsd&&!_netbsd&&!_sunos)filesystem.disksIO().then((res)=>{data.disksIO=res,functionProcessed()});if(!_openbsd&&!_freebsd&&!_netbsd&&!_sunos)wifi.wifiNetworks().then((res)=>{data.wifiNetworks=res,functionProcessed()});internet.inetLatency().then((res)=>{data.inetLatency=res,functionProcessed()})})})}function getAllData(srv,iface,callback){return new Promise((resolve20)=>{process.nextTick(()=>{let data={};if(iface&&util4.isFunction(iface)&&!callback)callback=iface,iface="";if(srv&&util4.isFunction(srv)&&!iface&&!callback)callback=srv,srv="",iface="";getStaticData().then((res)=>{data=res,getDynamicData(srv,iface).then((res2)=>{for(let key in res2)if({}.hasOwnProperty.call(res2,key))data[key]=res2[key];if(callback)callback(data);resolve20(data)})})})})}function get3(valueObject,callback){return new Promise((resolve20)=>{process.nextTick(()=>{let allPromises=Object.keys(valueObject).filter((func)=>({}).hasOwnProperty.call(exports,func)).map((func)=>{let params=valueObject[func].substring(valueObject[func].lastIndexOf("(")+1,valueObject[func].lastIndexOf(")")),funcWithoutParams=func.indexOf(")")>=0?func.split(")")[1].trim():func;if(funcWithoutParams=func.indexOf("|")>=0?func.split("|")[0].trim():funcWithoutParams,params)return exports[funcWithoutParams](params);else return exports[funcWithoutParams]("")});Promise.all(allPromises).then((data)=>{let result2={},i2=0;for(let key in valueObject)if({}.hasOwnProperty.call(valueObject,key)&&{}.hasOwnProperty.call(exports,key)&&data.length>i2){if(valueObject[key]==="*"||valueObject[key]==="all")result2[key]=data[i2];else{let keys=valueObject[key],filter="",filterParts=[];if(keys.indexOf(")")>=0)keys=keys.split(")")[1].trim();if(keys.indexOf("|")>=0)filter=keys.split("|")[1].trim(),filterParts=filter.split(":"),keys=keys.split("|")[0].trim();if(keys=keys.replace(/,/g," ").replace(/ +/g," ").split(" "),data[i2])if(Array.isArray(data[i2])){let partialArray=[];data[i2].forEach((element)=>{let partialRes={};if(keys.length===1&&(keys[0]==="*"||keys[0]==="all"))partialRes=element;else keys.forEach((k2)=>{if({}.hasOwnProperty.call(element,k2))partialRes[k2]=element[k2]});if(filter&&filterParts.length===2){if({}.hasOwnProperty.call(partialRes,filterParts[0].trim())){let val=partialRes[filterParts[0].trim()];if(typeof val==="number"){if(val===parseFloat(filterParts[1].trim()))partialArray.push(partialRes)}else if(typeof val==="string"){if(val.toLowerCase()===filterParts[1].trim().toLowerCase())partialArray.push(partialRes)}}}else partialArray.push(partialRes)}),result2[key]=partialArray}else{let partialRes={};keys.forEach((k2)=>{if({}.hasOwnProperty.call(data[i2],k2))partialRes[k2]=data[i2][k2]}),result2[key]=partialRes}else result2[key]={}}i2++}if(callback)callback(result2);resolve20(result2)})})})}function observe(valueObject,interval,callback){let _data=null;return setInterval(()=>{get3(valueObject).then((data)=>{if(JSON.stringify(_data)!==JSON.stringify(data))_data=Object.assign({},data),callback(data)})},interval)}exports.version=version;exports.system=system.system;exports.bios=system.bios;exports.baseboard=system.baseboard;exports.chassis=system.chassis;exports.time=osInfo.time;exports.osInfo=osInfo.osInfo;exports.versions=osInfo.versions;exports.shell=osInfo.shell;exports.uuid=osInfo.uuid;exports.cpu=cpu.cpu;exports.cpuFlags=cpu.cpuFlags;exports.cpuCache=cpu.cpuCache;exports.cpuCurrentSpeed=cpu.cpuCurrentSpeed;exports.cpuTemperature=cpu.cpuTemperature;exports.currentLoad=cpu.currentLoad;exports.fullLoad=cpu.fullLoad;exports.mem=memory.mem;exports.memLayout=memory.memLayout;exports.battery=battery;exports.graphics=graphics.graphics;exports.fsSize=filesystem.fsSize;exports.fsOpenFiles=filesystem.fsOpenFiles;exports.blockDevices=filesystem.blockDevices;exports.fsStats=filesystem.fsStats;exports.disksIO=filesystem.disksIO;exports.diskLayout=filesystem.diskLayout;exports.networkInterfaceDefault=network.networkInterfaceDefault;exports.networkGatewayDefault=network.networkGatewayDefault;exports.networkInterfaces=network.networkInterfaces;exports.networkStats=network.networkStats;exports.networkConnections=network.networkConnections;exports.wifiNetworks=wifi.wifiNetworks;exports.wifiInterfaces=wifi.wifiInterfaces;exports.wifiConnections=wifi.wifiConnections;exports.services=processes.services;exports.processes=processes.processes;exports.processLoad=processes.processLoad;exports.users=users.users;exports.inetChecksite=internet.inetChecksite;exports.inetLatency=internet.inetLatency;exports.dockerInfo=docker.dockerInfo;exports.dockerImages=docker.dockerImages;exports.dockerContainers=docker.dockerContainers;exports.dockerContainerStats=docker.dockerContainerStats;exports.dockerContainerProcesses=docker.dockerContainerProcesses;exports.dockerVolumes=docker.dockerVolumes;exports.dockerAll=docker.dockerAll;exports.vboxInfo=vbox.vboxInfo;exports.printer=printer.printer;exports.usb=usb.usb;exports.audio=audio.audio;exports.bluetoothDevices=bluetooth.bluetoothDevices;exports.getStaticData=getStaticData;exports.getDynamicData=getDynamicData;exports.getAllData=getAllData;exports.get=get3;exports.observe=observe;exports.powerShellStart=util4.powerShellStart;exports.powerShellRelease=util4.powerShellRelease});import os4 from"os";function toGB(bytes){return Math.round(bytes/1073741824*10)/10}function bar(percent,width){let p=Math.max(0,Math.min(100,percent)),filled=Math.round(p/100*width);return`[${"=".repeat(filled)}${"-".repeat(width-filled)}]`}function pickColor(percent){if(percent>90)return palette.error;if(percent>70)return palette.warning;return palette.accent}function SystemStatsView({stats:stats2}){if(!stats2)return import_jsx_dev_runtime2.jsxDEV("box",{flexDirection:"column",paddingX:1,backgroundColor:palette.bgRaised,children:import_jsx_dev_runtime2.jsxDEV("box",{height:1,width:"100%",children:import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.accent,children:"genie"},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:` v${VERSION}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this);let{cpu,ram,swap,load:load3}=stats2,hotStr=cpu.hotCores.map((c)=>`#${c.id} ${c.load}%`).join(" ");return import_jsx_dev_runtime2.jsxDEV("box",{flexDirection:"column",paddingX:1,backgroundColor:palette.bgRaised,children:[import_jsx_dev_runtime2.jsxDEV("box",{height:1,width:"100%",children:import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.accent,children:"genie"},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:` v${VERSION}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("box",{height:1,width:"100%",children:import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:"CPU "},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:pickColor(cpu.combined),children:`${String(cpu.combined).padStart(3)}% ${bar(cpu.combined,8)}`},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:` ${cpu.coreCount}c`},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("box",{height:1,width:"100%",children:import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:" hot "},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.warning,children:hotStr},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("box",{height:1,width:"100%",children:import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:"RAM "},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:pickColor(ram.percent),children:`${ram.usedGB}/${ram.totalGB}G ${bar(ram.percent,8)}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),swap.totalGB>0?import_jsx_dev_runtime2.jsxDEV("box",{height:1,width:"100%",children:import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:"SWP "},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:pickColor(swap.percent),children:`${swap.usedGB}/${swap.totalGB}G ${bar(swap.percent,8)}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this):null,import_jsx_dev_runtime2.jsxDEV("box",{height:1,width:"100%",children:import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:"Load "},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:pickColor(load3.percent),children:`${load3.percent}%`},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:` (${load3.busy}/${load3.total} busy)`},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function SystemStats(){let[stats2,setStats]=import_react19.useState(null),mountedRef=import_react19.useRef(!0);return import_react19.useEffect(()=>{mountedRef.current=!0;async function refresh(){try{let[cpu,mem]=await Promise.all([import_systeminformation.default.currentLoad(),import_systeminformation.default.mem()]);if(!mountedRef.current)return;let coreCount=os4.cpus().length,avg1=os4.loadavg()[0],sorted=cpu.cpus.map((c,i2)=>({id:i2,load:Math.round(c.load)})).sort((a,b3)=>b3.load-a.load);setStats({cpu:{combined:Math.round(cpu.currentLoad),hotCores:sorted.slice(0,3),coreCount},ram:{usedGB:toGB(mem.active),totalGB:toGB(mem.total),percent:mem.total>0?Math.round(mem.active/mem.total*100):0},swap:{usedGB:toGB(mem.swapused),totalGB:toGB(mem.swaptotal),percent:mem.swaptotal>0?Math.round(mem.swapused/mem.swaptotal*100):0},load:{percent:coreCount>0?Math.round(avg1/coreCount*100):0,busy:Math.round(avg1*10)/10,total:coreCount}})}catch{}}refresh();let timer2=setInterval(refresh,3000);return()=>{mountedRef.current=!1,clearInterval(timer2)}},[]),import_jsx_dev_runtime2.jsxDEV(SystemStatsView,{stats:stats2},void 0,!1,void 0,this)}var import_react19,import_systeminformation;var init_SystemStats=__esm(()=>{init_version();init_theme2();init_jsx_dev_runtime();import_react19=__toESM(require_react_development(),1),import_systeminformation=__toESM(require_lib5(),1)});function validateName(name){if(name.length===0)return null;try{return validateBranchName(name),null}catch(err){return err instanceof Error?err.message:String(err)}}function TeamCreate({availableAgents,workspaceRoot,onConfirm,onCancel}){let[step,setStep]=import_react21.useState("name"),[teamName,setTeamName]=import_react21.useState(""),[selected,setSelected]=import_react21.useState(()=>new Set),[memberCursor,setMemberCursor]=import_react21.useState(0),nameError=import_react21.useMemo(()=>validateName(teamName),[teamName]),nameValid=teamName.length>0&&nameError===null,intent=import_react21.useMemo(()=>({kind:"create-team",name:teamName.length>0?teamName:"TEAM_NAME",repo:workspaceRoot}),[teamName,workspaceRoot]),handleNameChange=import_react21.useCallback((value)=>{setTeamName(value)},[]),advanceFromName=import_react21.useCallback(()=>{if(!nameValid)return;setStep("members")},[nameValid]),toggleMember=import_react21.useCallback((name)=>{setSelected((prev)=>{let next=new Set(prev);if(next.has(name))next.delete(name);else next.add(name);return next})},[]),confirmMembers=import_react21.useCallback(()=>{onConfirm({teamName,members:Array.from(selected)})},[onConfirm,teamName,selected]);return useKeyboard((key)=>{if(step==="name"){handleNameStepKey(key,{onCancel,nameValid,advanceFromName});return}handleMembersStepKey(key,{availableAgents,memberCursor,setStep,setMemberCursor,toggleMember,confirmMembers})}),import_jsx_dev_runtime2.jsxDEV("box",{position:"absolute",width:"100%",height:"100%",justifyContent:"center",alignItems:"center",backgroundColor:palette.bgOverlay,children:import_jsx_dev_runtime2.jsxDEV("box",{border:!0,borderColor:palette.borderActive,backgroundColor:palette.bgRaised,paddingX:3,paddingY:1,flexDirection:"column",width:"100%",gap:1,children:[import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.accent,children:"New team"},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:step==="name"?" \u2014 step 1 of 2":" \u2014 step 2 of 2"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),step==="name"?import_jsx_dev_runtime2.jsxDEV(NameStep,{value:teamName,onChange:handleNameChange,onSubmit:advanceFromName,errorMessage:nameError},void 0,!1,void 0,this):import_jsx_dev_runtime2.jsxDEV(MembersStep,{agents:availableAgents,selected,cursor:memberCursor},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV(CliPreviewLine,{intent,hint:step==="name"?"Enter: next \xB7 Esc: cancel":"Space: toggle \xB7 Enter: create \xB7 Esc: back"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function NameStep({value,onChange,onSubmit,errorMessage}){return import_jsx_dev_runtime2.jsxDEV("box",{flexDirection:"column",gap:1,children:[import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:"Team name (git-branch-safe):"},void 0,!1,void 0,this)},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("input",{value,onInput:onChange,onChange,onSubmit,focused:!0,placeholder:"feat/auth-bug",backgroundColor:palette.bg,textColor:palette.text,placeholderColor:palette.textMuted},void 0,!1,void 0,this),errorMessage!==null?import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.error,children:`\u26A0 ${errorMessage}`},void 0,!1,void 0,this)},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function MembersStep({agents,selected,cursor}){if(agents.length===0)return import_jsx_dev_runtime2.jsxDEV("box",{flexDirection:"column",children:[import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:"No agents registered"},void 0,!1,void 0,this)},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:"Members can be hired later via `genie team hire`."},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return import_jsx_dev_runtime2.jsxDEV("box",{flexDirection:"column",children:[import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:"Select members (space to toggle):"},void 0,!1,void 0,this)},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("box",{flexDirection:"column",children:agents.map((name,idx)=>{let isSelected=selected.has(name),isCursor=idx===cursor,tick=isSelected?"[x]":"[ ]",prefix=isCursor?"\u25B6 ":" ";return import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:isCursor?palette.accent:palette.textMuted,children:prefix},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:isSelected?palette.success:palette.textDim,children:tick},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.text,children:` ${name}`},void 0,!1,void 0,this)]},name,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function isEnter(key){return key.name==="enter"||key.name==="return"}function handleNameStepKey(key,opts){if(key.name==="escape"){opts.onCancel();return}if(isEnter(key)&&opts.nameValid)opts.advanceFromName()}function handleMembersStepKey(key,opts){if(key.name==="escape"){opts.setStep("name");return}if(opts.availableAgents.length===0){if(isEnter(key))opts.confirmMembers();return}if(key.name==="up"||key.name==="k"){opts.setMemberCursor((prev)=>prev<=0?opts.availableAgents.length-1:prev-1);return}if(key.name==="down"||key.name==="j"){opts.setMemberCursor((prev)=>prev>=opts.availableAgents.length-1?0:prev+1);return}if(key.name==="space"){let name=opts.availableAgents[opts.memberCursor];if(name)opts.toggleMember(name);return}if(isEnter(key))opts.confirmMembers()}var import_react21;var init_TeamCreate=__esm(async()=>{init_team_manager();init_theme2();init_CliPreviewLine();init_jsx_dev_runtime();await init_react();import_react21=__toESM(require_react_development(),1)});function getNodeIcon(node){if(node.type==="agent")return getAgentIcon(node);switch(node.type){case"session":return node.data.attached?"\u25B6":"\u25B8";case"window":return node.data.active?"\u25A0":"\u25A1";case"pane":return getPaneIcon(node);default:return" "}}function getAgentIcon(node){switch(node.workState){case"in_flight":return"\u25C6";case"paused":return"\u25D0";case"done":return"\u2714";case"stuck":return"\u2718";default:break}switch(node.wsAgentState){case"running":return"\u25CF";case"stopped":return"\u25CC";case"error":return"\u2298";case"spawning":return"\u231B";default:return"\u25CC"}}function getPaneIcon(node){if(node.data.isDead)return"\u2718";if(node.agentState==="working")return"\u25CF";if(node.agentState==="idle")return"\u25CB";if(node.agentState==="permission")return"\u26A0";if(node.agentState==="error")return"\u2718";if(node.data.command==="claude")return"\u25C6";return"\u25CB"}function getNodeColor(node){if(node.type==="agent")return getAgentColor(node);switch(node.type){case"session":return node.data.attached?palette.success:palette.textDim;case"window":return node.data.active?palette.info:palette.text;case"pane":return getPaneColor(node);default:return palette.text}}function getAgentColor(node){switch(node.workState){case"in_flight":return palette.accentBright;case"paused":return palette.textDim;case"done":return palette.info;case"stuck":return palette.error;default:break}switch(node.wsAgentState){case"running":return palette.success;case"stopped":return palette.text;case"error":return palette.error;case"spawning":return palette.warning;default:return palette.textDim}}function getPaneColor(node){if(node.data.isDead)return palette.error;if(node.agentState==="working")return palette.info;if(node.agentState==="permission")return palette.warning;if(node.agentState==="error")return palette.error;if(node.agentState==="idle")return palette.textDim;if(node.data.command==="claude")return palette.info;return palette.textDim}function getAgentSuffix(node){if(node.workState==="stuck")return" [stuck \u2014 press R to retry]";if(node.workState==="paused")return" [paused \u2014 auto-resume off]";if(node.workState==="done")return" [done]";if(node.wsAgentState==="spawning"&&node.activePanes===0)return" [stuck \u2014 press R to retry]";if(node.wsAgentState==="stopped")return" [Enter to start]";let wc=node.data.windowCount;if(wc>1)return` (${wc} windows)`;if(wc===1)return" (1 window)";return""}function getNodeSuffix(node){if(node.type==="agent")return getAgentSuffix(node);if(node.type==="session"||node.type==="pane"){let count=node.activePanes;if(count>0)return` ${icons.agent}${count}`}return""}function getStateColor(state){switch(state){case"working":return palette.info;case"idle":return palette.textDim;case"permission":return palette.warning;case"error":return palette.error;default:return palette.textMuted}}var import_react22,TreeNodeRow;var init_TreeNode=__esm(()=>{init_theme2();init_jsx_dev_runtime();import_react22=__toESM(require_react_development(),1),TreeNodeRow=import_react22.memo(function({node,selected,onSelect,onToggle,onContextMenu}){let indent2=" ".repeat(node.depth),hasChildren=node.children.length>0,expandIcon=hasChildren?node.expanded?icons.expanded:icons.collapsed:" ",icon=getNodeIcon(node),color2=getNodeColor(node),suffix=getNodeSuffix(node),labelColor=selected?palette.accentBright:node.type==="agent"&&node.kind==="subagent"?palette.textDim:palette.text;return import_jsx_dev_runtime2.jsxDEV("box",{height:1,width:"100%",backgroundColor:selected?palette.accentDim:void 0,onMouseDown:(event)=>{if(event.button===2&&onContextMenu){onSelect(node.id),onContextMenu(node.id);return}if(onSelect(node.id),hasChildren)onToggle(node.id)},children:import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:[indent2,expandIcon," "]},void 0,!0,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:color2,children:[icon," "]},void 0,!0,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:labelColor,children:node.label},void 0,!1,void 0,this),suffix?import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:suffix},void 0,!1,void 0,this):null,node.agentState?import_jsx_dev_runtime2.jsxDEV("span",{fg:getStateColor(node.agentState),children:[" ",node.agentState]},void 0,!0,void 0,this):null,process.env.GENIE_TUI_DEBUG==="1"?import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:` [${node.type}]`},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)},void 0,!1,void 0,this)})});function useDiagnosticsRefresh(setDiagnostics,setRequestedInitialAgent){import_react24.useEffect(()=>{let active=!0;async function refresh(){try{let snap=await collectDiagnostics();if(!active)return;setDiagnostics(snap);let signaledAgent=consumeInitialAgentSignal();if(signaledAgent)setRequestedInitialAgent(signaledAgent)}catch(err){console.error("TUI: diagnostics failed:",err)}}refresh();let timer2=setInterval(refresh,2000);return()=>{active=!1,clearInterval(timer2)}},[setDiagnostics,setRequestedInitialAgent])}function useSessionTreeBuilder(diagnostics,workspaceRoot,setSessionTree){import_react24.useEffect(()=>{if(!diagnostics)return;let newTree;if(workspaceRoot){let agentNames=scanAgents(workspaceRoot);newTree=buildWorkspaceTree({agentNames,sessions:diagnostics.sessions,executors:diagnostics.executors,workStates:diagnostics.workStates})}else newTree=buildSessionTree(diagnostics);setSessionTree((prev)=>mergeExpandedState(prev,newTree))},[diagnostics,workspaceRoot,setSessionTree])}function useStableSelection(flatNodes,selectedIndex,setSelectedIndex,selectedNodeId){import_react24.useEffect(()=>{let node=flatNodes[selectedIndex]?.node;if(node)selectedNodeId.current=node.id},[selectedIndex,flatNodes,selectedNodeId]),import_react24.useLayoutEffect(()=>{if(flatNodes.length===0)return;if(selectedIndex>=flatNodes.length){setSelectedIndex(flatNodes.length-1);return}if(!selectedNodeId.current)return;let currentAtIndex=flatNodes[selectedIndex]?.node;if(currentAtIndex&&currentAtIndex.id===selectedNodeId.current)return;let restored=flatNodes.findIndex((n)=>n.node.id===selectedNodeId.current);if(restored>=0)setSelectedIndex(restored)},[flatNodes])}function useInitialAgentSelection(requestedInitialAgent,flatNodes,setSelectedIndex,setRequestedInitialAgent,onTmuxSessionSelect){import_react24.useEffect(()=>{if(!requestedInitialAgent||flatNodes.length===0)return;let idx=flatNodes.findIndex((n)=>n.node.id===`agent:${requestedInitialAgent}`);if(idx<0)return;setSelectedIndex(idx);let node=flatNodes[idx].node;if(node.type==="agent"&&node.wsAgentState!=="running"&&node.wsAgentState!=="spawning")spawnAgent(agentNameFromNode(node),onTmuxSessionSelect);setRequestedInitialAgent(void 0)},[requestedInitialAgent,flatNodes,onTmuxSessionSelect,setSelectedIndex,setRequestedInitialAgent])}function useAutoAttach(flatNodes,selectedIndex,lastTarget,onTmuxSessionSelect){import_react24.useEffect(()=>{let current=flatNodes[selectedIndex]?.node;if(!current)return;let target=getSessionTarget(current);if(!target)return;if(current.type==="agent"&&current.wsAgentState!=="running")return;let key=`${target.sessionName}:${target.windowIndex??""}`;if(key===lastTarget.current)return;lastTarget.current=key,onTmuxSessionSelect(target.sessionName,target.windowIndex)},[selectedIndex,flatNodes,onTmuxSessionSelect,lastTarget])}function useNavKeyboard(opts){useKeyboard((key)=>{if(opts.keyboardDisabled)return;if(opts.spawnIntoAgent!==null||opts.spawnPickerTarget!==null)return;if(tryOpenTeamCreate(key,{workspaceRoot:opts.workspaceRoot,showTeamCreate:opts.showTeamCreate,contextMenuNodeId:opts.contextMenuNodeId,handleOpenTeamCreate:opts.handleOpenTeamCreate}))return;if(opts.showTeamCreate)return;handleKeyboardInput(key,opts)})}function renderAlertBadge(alertCount){if(alertCount<=0)return null;return import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.error,children:[" ","\u25CF ",alertCount," alert",alertCount===1?"":"s"]},void 0,!0,void 0,this)}function countAgents(nodes,predicate){let count=0;for(let n of nodes){if(n.type==="agent"&&predicate(n))count++;if(n.children.length>0)count+=countAgents(n.children,predicate)}return count}function computeNavCounts(workspaceRoot,sessionTree,diagnostics){if(workspaceRoot){let agentCount=countAgents(sessionTree,()=>!0);if(agentCount>0)return{agentCount,runningCount:countAgents(sessionTree,(n)=>n.wsAgentState==="running")}}let paneSum=diagnostics?.sessions.reduce((sum,s2)=>sum+s2.windows.reduce((ws,w2)=>ws+w2.panes.length,0),0)??0;return{agentCount:diagnostics?.sessions.length??0,runningCount:paneSum}}function Nav({onTmuxSessionSelect,onNewAgentWindow,workspaceRoot,initialAgent,keyboardDisabled=!1}){let[diagnostics,setDiagnostics]=import_react24.useState(null),[sessionTree,setSessionTree]=import_react24.useState([]),[selectedIndex,setSelectedIndex]=import_react24.useState(0),[requestedInitialAgent,setRequestedInitialAgent]=import_react24.useState(initialAgent),[contextMenuNodeId,setContextMenuNodeId]=import_react24.useState(null),[spawnIntoAgent,setSpawnIntoAgent]=import_react24.useState(null),[spawnPickerTarget,setSpawnPickerTarget]=import_react24.useState(null),lastTarget=import_react24.useRef(null),selectedNodeId=import_react24.useRef(null);useDiagnosticsRefresh(setDiagnostics,setRequestedInitialAgent),useSessionTreeBuilder(diagnostics,workspaceRoot,setSessionTree);let flatNodes=import_react24.useMemo(()=>flattenTree(sessionTree),[sessionTree]);useStableSelection(flatNodes,selectedIndex,setSelectedIndex,selectedNodeId),useInitialAgentSelection(requestedInitialAgent,flatNodes,setSelectedIndex,setRequestedInitialAgent,onTmuxSessionSelect),useAutoAttach(flatNodes,selectedIndex,lastTarget,onTmuxSessionSelect);let handleSelect=import_react24.useCallback((id)=>{let idx=flatNodes.findIndex((n)=>n.node.id===id);if(idx>=0)setSelectedIndex(idx)},[flatNodes]),handleToggle=import_react24.useCallback((id)=>{setSessionTree((prev)=>toggleNode(prev,id))},[]),handleVerticalNav=import_react24.useCallback((keyName2)=>{let rowCount=flatNodes.length;if(rowCount===0)return;if(keyName2==="up"||keyName2==="k")setSelectedIndex((prev)=>prev===0?rowCount-1:prev-1);else if(keyName2==="down"||keyName2==="j")setSelectedIndex((prev)=>prev>=rowCount-1?0:prev+1)},[flatNodes.length]),handleExpandCollapse=import_react24.useCallback((keyName2)=>{let node=flatNodes[selectedIndex]?.node;if(!node)return;if((keyName2==="right"||keyName2==="l")&&node.children.length>0&&!node.expanded)handleToggle(node.id);else if((keyName2==="left"||keyName2==="h")&&node.expanded)handleToggle(node.id)},[flatNodes,selectedIndex,handleToggle]),handleEnter=import_react24.useCallback(()=>{let node=flatNodes[selectedIndex]?.node;if(!node)return;if(node.type==="agent"){handleEnterAgent(node,onTmuxSessionSelect);return}if(node.children.length>0)handleToggle(node.id);let target=getSessionTarget(node);if(target)onTmuxSessionSelect(target.sessionName,target.windowIndex)},[flatNodes,selectedIndex,handleToggle,onTmuxSessionSelect]),handleRetry=import_react24.useCallback(()=>{let node=flatNodes[selectedIndex]?.node;if(!node||node.type!=="agent")return;if(node.wsAgentState!=="spawning"&&node.wsAgentState!=="error")return;(async()=>{try{let{reconcileStaleSpawns:reconcileStaleSpawns2}=await Promise.resolve().then(() => (init_agent_registry(),exports_agent_registry));await reconcileStaleSpawns2()}catch{}spawnAgent(agentNameFromNode(node),onTmuxSessionSelect)})()},[flatNodes,selectedIndex,onTmuxSessionSelect]),handleContextMenu=import_react24.useCallback((nodeId)=>{let flat=flatNodes.find((n)=>n.node.id===nodeId);if(flat&&buildMenuItems(flat.node).length>0)setContextMenuNodeId(nodeId)},[flatNodes]),handleContextMenuAction=import_react24.useCallback((action,payload)=>{let node=flatNodes.find((n)=>n.node.id===contextMenuNodeId)?.node;if(!node)return;if(setContextMenuNodeId(null),action==="spawn-here"){let target=resolveSpawnHereTarget(node);if(target)setSpawnPickerTarget(target);return}dispatchContextMenuAction(action,node,payload,{sessionTree,onTmuxSessionSelect,onNewAgentWindow,openSpawnInto:setSpawnIntoAgent})},[flatNodes,contextMenuNodeId,sessionTree,onTmuxSessionSelect,onNewAgentWindow]),handleSpawnIntoConfirm=import_react24.useCallback((intent)=>{executeSpawnIntent(intent),setSpawnIntoAgent(null)},[]),handleSpawnIntoCancel=import_react24.useCallback(()=>{setSpawnIntoAgent(null)},[]),handleSpawnPickerConfirm=import_react24.useCallback((intent)=>{setSpawnPickerTarget(null),executeSpawnIntent(intent)},[]),handleSpawnPickerCancel=import_react24.useCallback(()=>{setSpawnPickerTarget(null)},[]),_menuDisabled=keyboardDisabled||contextMenuNodeId!==null,{showTeamCreate,handleOpenTeamCreate,handleTeamCreateConfirm,handleTeamCreateCancel}=useTeamCreateControls({workspaceRoot,diagnostics,onTmuxSessionSelect});useNavKeyboard({keyboardDisabled,spawnIntoAgent,spawnPickerTarget,workspaceRoot,showTeamCreate,contextMenuNodeId,handleOpenTeamCreate,flatNodes,selectedIndex,setContextMenuNodeId,handleVerticalNav,handleExpandCollapse,handleEnter,handleRetry,onNewAgentWindow});let{agentCount,runningCount}=computeNavCounts(workspaceRoot,sessionTree,diagnostics),headerLabel=workspaceRoot?"Agents":"Sessions",alertCount=diagnostics?.alertCount??0;return import_jsx_dev_runtime2.jsxDEV("box",{flexDirection:"column",width:"100%",height:"100%",backgroundColor:palette.bg,children:[import_jsx_dev_runtime2.jsxDEV("box",{height:1,paddingX:1,backgroundColor:palette.bgRaised,children:import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.accent,children:headerLabel},void 0,!1,void 0,this),diagnostics?import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:[" ",workspaceRoot?`${runningCount}/${agentCount}`:`${agentCount}s ${runningCount}p`]},void 0,!0,void 0,this):null,renderAlertBadge(alertCount)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),diagnostics?import_jsx_dev_runtime2.jsxDEV("scrollbox",{focused:!0,height:"100%",style:{scrollbarOptions:{showArrows:!1,trackOptions:{foregroundColor:palette.scrollThumb,backgroundColor:palette.scrollTrack}}},children:flatNodes.map((flat,i2)=>import_jsx_dev_runtime2.jsxDEV(TreeNodeRow,{node:flat.node,selected:i2===selectedIndex,onSelect:handleSelect,onToggle:handleToggle,onContextMenu:handleContextMenu},flat.node.id,!1,void 0,this))},void 0,!1,void 0,this):import_jsx_dev_runtime2.jsxDEV("box",{flexGrow:1,justifyContent:"center",alignItems:"center",children:import_jsx_dev_runtime2.jsxDEV("text",{fg:palette.textDim,children:"Collecting..."},void 0,!1,void 0,this)},void 0,!1,void 0,this),contextMenuNodeId?import_jsx_dev_runtime2.jsxDEV(ContextMenu,{items:buildMenuItems(flatNodes.find((n)=>n.node.id===contextMenuNodeId)?.node??{}),onAction:handleContextMenuAction,onClose:()=>setContextMenuNodeId(null),positionY:flatNodes.findIndex((n)=>n.node.id===contextMenuNodeId)+1},void 0,!1,void 0,this):null,spawnIntoAgent!==null?import_jsx_dev_runtime2.jsxDEV(SpawnTargetPicker,{agentName:spawnIntoAgent,sessions:diagnostics?.sessions??[],onConfirm:handleSpawnIntoConfirm,onCancel:handleSpawnIntoCancel},void 0,!1,void 0,this):null,spawnPickerTarget!==null?import_jsx_dev_runtime2.jsxDEV(AgentPicker,{target:spawnPickerTarget,onConfirm:handleSpawnPickerConfirm,onCancel:handleSpawnPickerCancel},void 0,!1,void 0,this):null,showTeamCreate?import_jsx_dev_runtime2.jsxDEV(TeamCreate,{availableAgents:workspaceRoot?scanAgents(workspaceRoot):[],workspaceRoot,onConfirm:handleTeamCreateConfirm,onCancel:handleTeamCreateCancel},void 0,!1,void 0,this):null,import_jsx_dev_runtime2.jsxDEV(SystemStats,{},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("box",{height:1,paddingX:1,backgroundColor:palette.bgRaised,children:import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:buildFooterHint(workspaceRoot)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function useTeamCreateControls(opts){let{workspaceRoot,diagnostics,onTmuxSessionSelect}=opts,[showTeamCreate,setShowTeamCreate]=import_react24.useState(!1),pendingTeamNameRef=import_react24.useRef(null),handleOpenTeamCreate=import_react24.useCallback(()=>{if(!workspaceRoot)return;setShowTeamCreate(!0)},[workspaceRoot]),handleTeamCreateConfirm=import_react24.useCallback((result2)=>{setShowTeamCreate(!1),runTeamCreation(result2,workspaceRoot),pendingTeamNameRef.current=result2.teamName},[workspaceRoot]),handleTeamCreateCancel=import_react24.useCallback(()=>{setShowTeamCreate(!1)},[]);return import_react24.useEffect(()=>{let pending=pendingTeamNameRef.current;if(!pending||!diagnostics)return;let session=diagnostics.sessions.find((s2)=>s2.name===pending);if(!session)return;pendingTeamNameRef.current=null,onTmuxSessionSelect(session.name,resolvePreferredWindowIndex(session,pending))},[diagnostics,onTmuxSessionSelect]),{showTeamCreate,handleOpenTeamCreate,handleTeamCreateConfirm,handleTeamCreateCancel}}function handleEnterAgent(node,onTmuxSessionSelect,spawn5=spawnAgent){if(node.wsAgentState!=="running"&&node.wsAgentState!=="spawning")spawn5(agentNameFromNode(node),onTmuxSessionSelect);else if(node.wsAgentState==="running"){let target=getSessionTarget(node);if(target)onTmuxSessionSelect(target.sessionName,target.windowIndex)}}function dispatchContextMenuAction(action,node,payload,deps){let name=node.label;if(action==="spawn-into"&&node.type==="agent"&&deps.openSpawnInto){deps.openSpawnInto(agentNameFromNode(node));return}if(handleAttachAction(action,node,deps.onTmuxSessionSelect))return;if(handleRetryAction(action,name,deps.onTmuxSessionSelect))return;if(handleGenieAction(action,name,payload))return;let tmuxServer=process.env.GENIE_TMUX_SERVER||"genie";if(handleRenameAction(action,node,tmuxServer,payload))return;if(handleAgentWindowActions(action,node,name,tmuxServer,deps.onNewAgentWindow))return;if(handleSessionNodeActions(action,node,tmuxServer,payload))return;if(handleWindowNodeActions(action,node,deps.sessionTree,tmuxServer,payload))return;handlePaneNodeActions(action,node,deps.sessionTree,tmuxServer,deps.onNewAgentWindow)}function handleAttachAction(action,node,onTmuxSessionSelect){if(action!=="attach")return!1;let target=getSessionTarget(node);if(target)onTmuxSessionSelect(target.sessionName,target.windowIndex);return!0}function handleRetryAction(action,name,onTmuxSessionSelect){if(action!=="retry")return!1;return(async()=>{try{let{reconcileStaleSpawns:reconcileStaleSpawns2}=await Promise.resolve().then(() => (init_agent_registry(),exports_agent_registry));await reconcileStaleSpawns2()}catch{}spawnAgent(name,onTmuxSessionSelect)})(),!0}function handleGenieAction(action,name,payload){if(action==="send"&&payload)return executeGenie(["agent","send",payload,"--to",name]),!0;if(action==="answer-text"&&payload)return executeGenie(["agent","answer",name,`text:${payload}`]),!0;let genieArgs={spawn:["spawn",name],"spawn-plan":["spawn",name,"--plan-mode"],stop:["agent","stop",name],kill:["agent","kill",name],log:["agent","log",name],show:["agent","show",name],read:["read",name],"answer-yes":["agent","answer",name,"yes"],"answer-no":["agent","answer",name,"no"]}[action];if(genieArgs)return executeGenie(genieArgs),!0;return!1}function handleRenameAction(action,node,tmuxServer,payload){if(action==="rename-session"&&payload){let sess=node.type==="agent"?node.data.sessionName||node.label:node.id.split(":").slice(1).join(":");return executeTmux3(["-L",tmuxServer,"rename-session","-t",sess,payload]),!0}if(action==="rename-window"&&payload){let idParts=node.id.split(":"),windowTarget=`${idParts[1]}:${idParts[2]}`;return executeTmux3(["-L",tmuxServer,"rename-window","-t",windowTarget,payload]),!0}if(action==="rename-pane"&&payload&&node.type==="pane"){let paneId=node.data.paneId;return executeTmux3(["-L",tmuxServer,"select-pane","-t",`${paneId}`,"-T",payload]),!0}return!1}function handleAgentWindowActions(action,node,name,tmuxServer,onNewAgentWindow){if(action==="agent-new-window"&&node.type==="agent"){if(onNewAgentWindow)onNewAgentWindow(agentNameFromNode(node));return!0}if(action==="new-empty-window"&&node.type==="agent"){let sessionName=node.data.sessionName||name;return executeTmux3(["-L",tmuxServer,"new-window","-a","-t",sessionName]),!0}return!1}function handleSessionNodeActions(action,node,tmuxServer,payload){if(node.type!=="session")return!1;let sess=node.id.split(":").slice(1).join(":");if(action==="kill-session")return executeTmux3(["-L",tmuxServer,"kill-session","-t",sess]),!0;if(action==="new-window")return executeTmux3(["-L",tmuxServer,"new-window","-a","-t",sess]),!0;if(action==="clone-session")return executeTmux3(["-L",tmuxServer,"new-session","-d","-s",`${sess}-clone`,"-t",sess]),!0;if(action==="spawn-in-session"&&payload)return executeGenie(["spawn",payload,"--session",sess]),!0;return!1}function handleWindowNodeActions(action,node,sessionTree,tmuxServer,payload){if(node.type!=="window")return!1;let idParts=node.id.split(":"),windowTarget=`${idParts[1]}:${idParts[2]}`;if(action==="kill-window")return executeTmux3(["-L",tmuxServer,"kill-window","-t",windowTarget]),!0;if(action==="window-new-agent"){let parentAgent=findParentAgent(sessionTree,node.id);if(parentAgent){let agentFullName=agentNameFromNode(parentAgent),suffix=Date.now()%1e4,role=`${agentFullName}-${suffix}`;executeGenie(["spawn",agentFullName,"--role",role,"--window",windowTarget])}return!0}if(action==="split-pane")return executeTmux3(["-L",tmuxServer,"split-window","-t",windowTarget]),!0;if(action==="spawn-in-window"&&payload)return executeGenie(["spawn",payload,"--session",idParts[1]]),!0;return!1}function handlePaneNodeActions(action,node,sessionTree,tmuxServer,onNewAgentWindow){if(node.type!=="pane")return!1;let paneId=node.data.paneId;if(action==="clone-agent"){let parentAgent=findParentAgent(sessionTree,node.id);if(parentAgent&&onNewAgentWindow)onNewAgentWindow(agentNameFromNode(parentAgent));return!0}if(action==="kill-pane")return executeTmux3(["-L",tmuxServer,"kill-pane","-t",`${paneId}`]),!0;if(action==="split-h")return executeTmux3(["-L",tmuxServer,"split-window","-h","-t",`${paneId}`]),!0;if(action==="split-v")return executeTmux3(["-L",tmuxServer,"split-window","-v","-t",`${paneId}`]),!0;return!1}function buildFooterHint(workspaceRoot){return`\u2191\u2193:nav \u2190\u2192:expand Enter:${workspaceRoot?"spawn/attach":"attach"} ^T:new${workspaceRoot?" ^N:team":""} R:retry .:menu`}function tryOpenTeamCreate(key,opts){if(!key.ctrl||key.name!=="n")return!1;if(!opts.workspaceRoot||opts.showTeamCreate||opts.contextMenuNodeId)return!1;return opts.handleOpenTeamCreate(),!0}function tryOpenContextMenu(flatNodes,selectedIndex,setContextMenuNodeId){let node=flatNodes[selectedIndex]?.node;if(node&&buildMenuItems(node).length>0)return setContextMenuNodeId(node.id),!0;return!1}function dispatchNavKey(key,handlers2,agentAction){let n=key.name;if(n==="up"||n==="k"||n==="down"||n==="j")handlers2.handleVerticalNav(n);else if(n==="right"||n==="l"||n==="left"||n==="h")handlers2.handleExpandCollapse(n);else if(n==="enter"||n==="return")handlers2.handleEnter();else if(n==="r")handlers2.handleRetry();else if(key.ctrl&&n==="t")agentAction()}function handleKeyboardInput(key,opts){if(key.name==="."&&!opts.contextMenuNodeId){if(tryOpenContextMenu(opts.flatNodes,opts.selectedIndex,opts.setContextMenuNodeId))return}if(opts.contextMenuNodeId)return;dispatchNavKey(key,opts,()=>{let node=opts.flatNodes[opts.selectedIndex]?.node;if(node?.type==="agent"&&node.wsAgentState==="running"&&opts.onNewAgentWindow)opts.onNewAgentWindow(agentNameFromNode(node))})}function agentNameFromNode(node){return node.id.replace(/^agent:/,"")}function spawnAgent(name,onTmuxSessionSelect){try{let{spawn:spawn5}=__require("child_process"),{join:join83,resolve:resolve20}=__require("path"),{existsSync:existsSync67,mkdirSync:mkdirSync28,openSync:openSync6}=__require("fs"),{homedir:homedir45}=__require("os"),bunPath=process.execPath||"bun",genieBin=process.argv[1],wsRoot=process.env.GENIE_TUI_WORKSPACE,sessionName=name.replace(/\//g,"-"),cwd;if(wsRoot){let parentName=name.includes("/")?name.slice(0,name.indexOf("/")):name,agentDir=resolve20(join83(wsRoot,"agents",parentName));if(existsSync67(agentDir))cwd=agentDir}let{GENIE_TUI_PANE:_a,GENIE_TUI_RIGHT:_b,GENIE_TUI_WORKSPACE:_c,GENIE_IS_DAEMON:_d,...cleanEnv}=process.env,logDir=join83(homedir45(),".genie","logs","tui-spawn");try{mkdirSync28(logDir,{recursive:!0})}catch{}let logPath=join83(logDir,`${sessionName}-${Date.now()}.log`),logFd;try{logFd=openSync6(logPath,"a")}catch{logFd=void 0}let spawnOpts=logFd!==void 0?{detached:!0,stdio:["ignore",logFd,logFd],cwd,env:cleanEnv}:{detached:!0,stdio:"ignore",cwd,env:cleanEnv},child=genieBin&&genieBin!=="genie"?spawn5(bunPath,[genieBin,"spawn",name,"--session",sessionName,"--new-window"],spawnOpts):spawn5("genie",["spawn",name,"--session",sessionName,"--new-window"],spawnOpts);if(child.on("exit",(code)=>{if(code&&code!==0)console.error(`TUI: spawn "${name}" exited ${code}. See ${logPath}`)}),child.on("error",(err)=>{console.error(`TUI: spawn "${name}" error: ${err.message}. See ${logPath}`)}),child.unref(),onTmuxSessionSelect)attachSpawnedAgentWhenReady(sessionName,onTmuxSessionSelect)}catch(err){console.error(`TUI: spawn failed for ${name}:`,err instanceof Error?err.message:err)}}function attachSpawnedAgentWhenReady(sessionName,onTmuxSessionSelect,attempt=0){(async()=>{try{let session=(await collectDiagnostics()).sessions.find((candidate)=>candidate.name===sessionName);if(session){let windowIndex=resolvePreferredWindowIndex(session,sessionName);if(windowIndex!==void 0){onTmuxSessionSelect(sessionName,windowIndex);return}}}catch{}if(attempt>=40){onTmuxSessionSelect(sessionName);return}setTimeout(()=>{attachSpawnedAgentWhenReady(sessionName,onTmuxSessionSelect,attempt+1)},250)})()}function executeTmux3(args){try{let{spawn:spawn5}=__require("child_process");spawn5("tmux",args,{detached:!0,stdio:"ignore"}).unref()}catch{}}function executeGenie(args){try{let{spawn:spawn5}=__require("child_process"),bunPath=process.execPath||"bun",genieBin=process.argv[1];(genieBin&&genieBin!=="genie"?spawn5(bunPath,[genieBin,...args],{detached:!0,stdio:"ignore"}):spawn5("genie",args,{detached:!0,stdio:"ignore"})).unref()}catch{}}function executeGenieAwaited(args){return new Promise((resolve20,reject)=>{try{let{spawn:spawn5}=__require("child_process"),bunPath=process.execPath||"bun",genieBin=process.argv[1],child=genieBin&&genieBin!=="genie"?spawn5(bunPath,[genieBin,...args],{stdio:"ignore"}):spawn5("genie",args,{stdio:"ignore"});child.on("exit",(code)=>resolve20(code)),child.on("error",reject)}catch(err){reject(err instanceof Error?err:Error(String(err)))}})}function resolveSpawnHereTarget(node){if(node.type==="session"){let sess=node.id.split(":").slice(1).join(":");if(sess.length===0)return null;return{session:sess}}if(node.type==="window"){let idParts=node.id.split(":");if(idParts.length<3)return null;return{session:idParts[1],window:`${idParts[1]}:${idParts[2]}`}}return null}function executeSpawnIntent(intent){try{let{argv}=buildSpawnInvocation(intent);executeGenie(argv)}catch(err){console.error("TUI: spawn-intent execution failed:",err instanceof Error?err.message:err)}}async function runTeamCreation(result2,workspaceRoot){let argv;try{({argv}=buildSpawnInvocation({kind:"create-team",name:result2.teamName,repo:workspaceRoot}))}catch(err){console.error("TUI: team create intent build failed:",err instanceof Error?err.message:err);return}let createExit=null;try{createExit=await executeGenieAwaited(argv)}catch(err){console.error("TUI: team create spawn failed:",err instanceof Error?err.message:err);return}if(createExit!==0){console.error(`TUI: team create exited ${createExit} \u2014 skipping member hires for "${result2.teamName}"`);return}for(let member of result2.members)try{let code=await executeGenieAwaited(["team","hire",member,"--team",result2.teamName]);if(code!==0)console.error(`TUI: team hire "${member}" exited ${code} \u2014 continuing with remaining members`)}catch(err){console.error(`TUI: team hire "${member}" failed:`,err instanceof Error?err.message:err)}}function findParentAgent(tree,targetId){for(let node of tree){if(node.type==="agent"&&containsNode(node,targetId))return node;let found=findParentAgent(node.children,targetId);if(found)return found}return null}function containsNode(node,targetId){if(node.id===targetId)return!0;return node.children.some((c)=>containsNode(c,targetId))}function mergeExpandedState(oldTree,newTree){if(oldTree.length===0)return newTree;let oldState=new Map;function collect(nodes){for(let n of nodes)oldState.set(n.id,{expanded:n.expanded,childCount:n.children.length}),collect(n.children)}collect(oldTree);function apply(nodes){return nodes.map((n)=>({...n,expanded:(()=>{let previous=oldState.get(n.id);if(!previous)return n.expanded;if(previous.childCount===0&&n.children.length>0)return n.expanded;return previous.expanded})(),children:apply(n.children)}))}return apply(newTree)}var import_react24;var init_Nav=__esm(async()=>{init_spawn_invocation();init_workspace();init_diagnostics();init_initial_agent();init_theme2();init_SystemStats();init_TreeNode();init_jsx_dev_runtime();await __promiseAll([init_react(),init_AgentPicker(),init_ContextMenu(),init_SpawnTargetPicker(),init_TeamCreate()]);import_react24=__toESM(require_react_development(),1)});function QuitDialog({onConfirm,onCancel}){return useKeyboard((key)=>{if(key.name==="enter"||key.name==="return"||key.name==="y")onConfirm();else if(key.name==="escape"||key.name==="n")onCancel()}),import_jsx_dev_runtime2.jsxDEV("box",{position:"absolute",width:"100%",height:"100%",justifyContent:"center",alignItems:"center",backgroundColor:palette.bgOverlay,children:import_jsx_dev_runtime2.jsxDEV("box",{border:!0,borderColor:palette.borderActive,backgroundColor:palette.bgRaised,paddingX:3,paddingY:1,flexDirection:"column",alignItems:"center",gap:1,children:[import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.accent,children:"Quit genie?"},void 0,!1,void 0,this)},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.text,children:"Enter"},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:" to quit "},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:" | "},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.text,children:" Esc"},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:" to cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:"Hint: Ctrl+D to detach (keep running)"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var init_QuitDialog=__esm(async()=>{init_theme2();init_jsx_dev_runtime();await init_react()});import{execSync as execSync18}from"child_process";import{readFileSync as readFileSync41}from"fs";function App({rightPane,workspaceRoot,initialAgent}){let[showQuit,setShowQuit]=import_react27.useState(!1);useKeyboard((key)=>{if(key.ctrl&&key.name==="q")if(showQuit)handleQuit();else setShowQuit(!0)});let handleQuit=import_react27.useCallback(()=>{try{let genieHome6=process.env.GENIE_HOME??`${process.env.HOME}/.genie`,pid=readFileSync41(`${genieHome6}/serve.pid`,"utf-8").trim();process.kill(Number.parseInt(pid,10),"SIGTERM")}catch{}try{execSync18("tmux -L genie-tui kill-server",{stdio:"ignore"})}catch{}},[]),handleTmuxSessionSelect=import_react27.useCallback((sessionName,windowIndex)=>{if(!rightPane)return;attachProjectWindow(rightPane,sessionName,windowIndex)},[rightPane]);return import_jsx_dev_runtime2.jsxDEV("box",{width:"100%",height:"100%",children:[import_jsx_dev_runtime2.jsxDEV(Nav,{onTmuxSessionSelect:handleTmuxSessionSelect,onNewAgentWindow:newAgentWindow,workspaceRoot,initialAgent,keyboardDisabled:showQuit},void 0,!1,void 0,this),showQuit?import_jsx_dev_runtime2.jsxDEV(QuitDialog,{onConfirm:handleQuit,onCancel:()=>setShowQuit(!1)},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}var import_react27;var init_app=__esm(async()=>{init_tmux2();init_jsx_dev_runtime();await __promiseAll([init_react(),init_Nav(),init_QuitDialog()]);import_react27=__toESM(require_react_development(),1)});var exports_render={};__export(exports_render,{resolveTuiRendererConfig:()=>resolveTuiRendererConfig,renderNav:()=>renderNav});function readBool(env2,name,fallback){let raw=env2[name];if(!raw)return fallback;let normalized=raw.trim().toLowerCase();if(TRUTHY3.has(normalized))return!0;if(FALSY.has(normalized))return!1;return fallback}function readPositiveInt(env2,name){let raw=env2[name];if(!raw)return;let parsed=Number.parseInt(raw,10);return Number.isFinite(parsed)&&parsed>0?parsed:void 0}function resolveTuiRendererConfig(env2=process.env,platform2=process.platform){let isDarwin=platform2==="darwin",targetFps=readPositiveInt(env2,"GENIE_TUI_TARGET_FPS")??(isDarwin?8:30),configuredMaxFps=readPositiveInt(env2,"GENIE_TUI_MAX_FPS")??(isDarwin?12:60),maxFps=Math.max(configuredMaxFps,targetFps),useMouse=readBool(env2,"GENIE_TUI_MOUSE",!isDarwin),enableMouseMovement=useMouse&&readBool(env2,"GENIE_TUI_MOUSE_MOVEMENT",!isDarwin);return{exitOnCtrlC:!1,useThread:!isDarwin,targetFps,maxFps,useMouse,enableMouseMovement,useKittyKeyboard:isDarwin?null:void 0,consoleMode:isDarwin?"disabled":void 0,openConsoleOnError:!isDarwin}}async function renderNav(){let rightPane=process.env.GENIE_TUI_RIGHT||void 0,workspaceRoot=process.env.GENIE_TUI_WORKSPACE||void 0,initialAgent=process.env.GENIE_TUI_AGENT||void 0,renderer=await createCliRenderer(resolveTuiRendererConfig());createRoot(renderer).render(import_jsx_dev_runtime2.jsxDEV(App,{rightPane,workspaceRoot,initialAgent},void 0,!1,void 0,this)),await new Promise((resolve20)=>{renderer.once("destroy",resolve20)})}var TRUTHY3,FALSY;var init_render=__esm(async()=>{init_jsx_dev_runtime();await __promiseAll([init_core(),init_react(),init_app()]);TRUTHY3=new Set(["1","true","yes","on"]),FALSY=new Set(["0","false","no","off"])});var exports_tui={};__export(exports_tui,{launchTui:()=>launchTui});import{appendFileSync as appendFileSync4,closeSync as closeSync6,mkdirSync as mkdirSync28,openSync as openSync6,readSync as readSync3,statSync as statSync13}from"fs";import{homedir as homedir45}from"os";import{join as join83}from"path";function genieHome6(){return process.env.GENIE_HOME??join83(homedir45(),".genie")}function extractPreviousRunCrashOutput(logPath){let fd=null;try{let size=statSync13(logPath).size;if(size===0)return"";let readSize=Math.min(size,TUI_CRASH_LOG_RECOVERY_MAX_BYTES);fd=openSync6(logPath,"r");let buffer2=Buffer.alloc(readSize);readSync3(fd,buffer2,0,readSize,size-readSize);let text=buffer2.toString("utf-8"),lastBannerIndex=text.lastIndexOf(TUI_CRASH_LOG_BANNER_PREFIX);if(lastBannerIndex<0)return"";let afterBannerNewline=text.indexOf(`
3854
+ `),service=util4.getValue(lines,"Service",":"),errorCode=util4.getValue(lines,"ConfigManagerErrorCode",":");if(util4.getValue(lines,"PNPClass",":").toLowerCase()==="bluetooth"&&errorCode==="0"&&service==="")result2.push(parseWindowsBluetooth(lines))});if(callback)callback(result2);resolve20(result2)});if(_freebsd||_netbsd||_openbsd||_sunos)resolve20(null)})})}exports.bluetoothDevices=bluetoothDevices});var require_lib5=__commonJS((exports)=>{var lib_version=require_package().version,util4=require_util3(),system=require_system(),osInfo=require_osinfo(),cpu=require_cpu(),memory=require_memory(),battery=require_battery(),graphics=require_graphics(),filesystem=require_filesystem(),network=require_network(),wifi=require_wifi(),processes=require_processes(),users=require_users(),internet=require_internet(),docker=require_docker(),vbox=require_virtualbox(),printer=require_printer(),usb=require_usb(),audio=require_audio(),bluetooth=require_bluetooth(),_platform=process.platform,_windows=_platform==="win32",_freebsd=_platform==="freebsd",_openbsd=_platform==="openbsd",_netbsd=_platform==="netbsd",_sunos=_platform==="sunos";if(_windows)util4.getCodepage(),util4.getPowershell();function version(){return lib_version}function getStaticData(callback){return new Promise((resolve20)=>{process.nextTick(()=>{let data={};data.version=version(),Promise.all([system.system(),system.bios(),system.baseboard(),system.chassis(),osInfo.osInfo(),osInfo.uuid(),osInfo.versions(),cpu.cpu(),cpu.cpuFlags(),graphics.graphics(),network.networkInterfaces(),memory.memLayout(),filesystem.diskLayout(),audio.audio(),bluetooth.bluetoothDevices(),usb.usb(),printer.printer()]).then((res)=>{if(data.system=res[0],data.bios=res[1],data.baseboard=res[2],data.chassis=res[3],data.os=res[4],data.uuid=res[5],data.versions=res[6],data.cpu=res[7],data.cpu.flags=res[8],data.graphics=res[9],data.net=res[10],data.memLayout=res[11],data.diskLayout=res[12],data.audio=res[13],data.bluetooth=res[14],data.usb=res[15],data.printer=res[16],callback)callback(data);resolve20(data)})})})}function getDynamicData(srv,iface,callback){if(util4.isFunction(iface))callback=iface,iface="";if(util4.isFunction(srv))callback=srv,srv="";return new Promise((resolve20)=>{process.nextTick(()=>{iface=iface||network.getDefaultNetworkInterface(),srv=srv||"";let functionProcessed=(()=>{let totalFunctions=15;if(_windows)totalFunctions=13;if(_freebsd||_openbsd||_netbsd)totalFunctions=11;if(_sunos)totalFunctions=6;return function(){if(--totalFunctions===0){if(callback)callback(data);resolve20(data)}}})(),data={};if(data.time=osInfo.time(),data.node=process.versions.node,data.v8=process.versions.v8,cpu.cpuCurrentSpeed().then((res)=>{data.cpuCurrentSpeed=res,functionProcessed()}),users.users().then((res)=>{data.users=res,functionProcessed()}),processes.processes().then((res)=>{data.processes=res,functionProcessed()}),cpu.currentLoad().then((res)=>{data.currentLoad=res,functionProcessed()}),!_sunos)cpu.cpuTemperature().then((res)=>{data.temp=res,functionProcessed()});if(!_openbsd&&!_freebsd&&!_netbsd&&!_sunos)network.networkStats(iface).then((res)=>{data.networkStats=res,functionProcessed()});if(!_sunos)network.networkConnections().then((res)=>{data.networkConnections=res,functionProcessed()});if(memory.mem().then((res)=>{data.mem=res,functionProcessed()}),!_sunos)battery().then((res)=>{data.battery=res,functionProcessed()});if(!_sunos)processes.services(srv).then((res)=>{data.services=res,functionProcessed()});if(!_sunos)filesystem.fsSize().then((res)=>{data.fsSize=res,functionProcessed()});if(!_windows&&!_openbsd&&!_freebsd&&!_netbsd&&!_sunos)filesystem.fsStats().then((res)=>{data.fsStats=res,functionProcessed()});if(!_windows&&!_openbsd&&!_freebsd&&!_netbsd&&!_sunos)filesystem.disksIO().then((res)=>{data.disksIO=res,functionProcessed()});if(!_openbsd&&!_freebsd&&!_netbsd&&!_sunos)wifi.wifiNetworks().then((res)=>{data.wifiNetworks=res,functionProcessed()});internet.inetLatency().then((res)=>{data.inetLatency=res,functionProcessed()})})})}function getAllData(srv,iface,callback){return new Promise((resolve20)=>{process.nextTick(()=>{let data={};if(iface&&util4.isFunction(iface)&&!callback)callback=iface,iface="";if(srv&&util4.isFunction(srv)&&!iface&&!callback)callback=srv,srv="",iface="";getStaticData().then((res)=>{data=res,getDynamicData(srv,iface).then((res2)=>{for(let key in res2)if({}.hasOwnProperty.call(res2,key))data[key]=res2[key];if(callback)callback(data);resolve20(data)})})})})}function get3(valueObject,callback){return new Promise((resolve20)=>{process.nextTick(()=>{let allPromises=Object.keys(valueObject).filter((func)=>({}).hasOwnProperty.call(exports,func)).map((func)=>{let params=valueObject[func].substring(valueObject[func].lastIndexOf("(")+1,valueObject[func].lastIndexOf(")")),funcWithoutParams=func.indexOf(")")>=0?func.split(")")[1].trim():func;if(funcWithoutParams=func.indexOf("|")>=0?func.split("|")[0].trim():funcWithoutParams,params)return exports[funcWithoutParams](params);else return exports[funcWithoutParams]("")});Promise.all(allPromises).then((data)=>{let result2={},i2=0;for(let key in valueObject)if({}.hasOwnProperty.call(valueObject,key)&&{}.hasOwnProperty.call(exports,key)&&data.length>i2){if(valueObject[key]==="*"||valueObject[key]==="all")result2[key]=data[i2];else{let keys=valueObject[key],filter="",filterParts=[];if(keys.indexOf(")")>=0)keys=keys.split(")")[1].trim();if(keys.indexOf("|")>=0)filter=keys.split("|")[1].trim(),filterParts=filter.split(":"),keys=keys.split("|")[0].trim();if(keys=keys.replace(/,/g," ").replace(/ +/g," ").split(" "),data[i2])if(Array.isArray(data[i2])){let partialArray=[];data[i2].forEach((element)=>{let partialRes={};if(keys.length===1&&(keys[0]==="*"||keys[0]==="all"))partialRes=element;else keys.forEach((k2)=>{if({}.hasOwnProperty.call(element,k2))partialRes[k2]=element[k2]});if(filter&&filterParts.length===2){if({}.hasOwnProperty.call(partialRes,filterParts[0].trim())){let val=partialRes[filterParts[0].trim()];if(typeof val==="number"){if(val===parseFloat(filterParts[1].trim()))partialArray.push(partialRes)}else if(typeof val==="string"){if(val.toLowerCase()===filterParts[1].trim().toLowerCase())partialArray.push(partialRes)}}}else partialArray.push(partialRes)}),result2[key]=partialArray}else{let partialRes={};keys.forEach((k2)=>{if({}.hasOwnProperty.call(data[i2],k2))partialRes[k2]=data[i2][k2]}),result2[key]=partialRes}else result2[key]={}}i2++}if(callback)callback(result2);resolve20(result2)})})})}function observe(valueObject,interval,callback){let _data=null;return setInterval(()=>{get3(valueObject).then((data)=>{if(JSON.stringify(_data)!==JSON.stringify(data))_data=Object.assign({},data),callback(data)})},interval)}exports.version=version;exports.system=system.system;exports.bios=system.bios;exports.baseboard=system.baseboard;exports.chassis=system.chassis;exports.time=osInfo.time;exports.osInfo=osInfo.osInfo;exports.versions=osInfo.versions;exports.shell=osInfo.shell;exports.uuid=osInfo.uuid;exports.cpu=cpu.cpu;exports.cpuFlags=cpu.cpuFlags;exports.cpuCache=cpu.cpuCache;exports.cpuCurrentSpeed=cpu.cpuCurrentSpeed;exports.cpuTemperature=cpu.cpuTemperature;exports.currentLoad=cpu.currentLoad;exports.fullLoad=cpu.fullLoad;exports.mem=memory.mem;exports.memLayout=memory.memLayout;exports.battery=battery;exports.graphics=graphics.graphics;exports.fsSize=filesystem.fsSize;exports.fsOpenFiles=filesystem.fsOpenFiles;exports.blockDevices=filesystem.blockDevices;exports.fsStats=filesystem.fsStats;exports.disksIO=filesystem.disksIO;exports.diskLayout=filesystem.diskLayout;exports.networkInterfaceDefault=network.networkInterfaceDefault;exports.networkGatewayDefault=network.networkGatewayDefault;exports.networkInterfaces=network.networkInterfaces;exports.networkStats=network.networkStats;exports.networkConnections=network.networkConnections;exports.wifiNetworks=wifi.wifiNetworks;exports.wifiInterfaces=wifi.wifiInterfaces;exports.wifiConnections=wifi.wifiConnections;exports.services=processes.services;exports.processes=processes.processes;exports.processLoad=processes.processLoad;exports.users=users.users;exports.inetChecksite=internet.inetChecksite;exports.inetLatency=internet.inetLatency;exports.dockerInfo=docker.dockerInfo;exports.dockerImages=docker.dockerImages;exports.dockerContainers=docker.dockerContainers;exports.dockerContainerStats=docker.dockerContainerStats;exports.dockerContainerProcesses=docker.dockerContainerProcesses;exports.dockerVolumes=docker.dockerVolumes;exports.dockerAll=docker.dockerAll;exports.vboxInfo=vbox.vboxInfo;exports.printer=printer.printer;exports.usb=usb.usb;exports.audio=audio.audio;exports.bluetoothDevices=bluetooth.bluetoothDevices;exports.getStaticData=getStaticData;exports.getDynamicData=getDynamicData;exports.getAllData=getAllData;exports.get=get3;exports.observe=observe;exports.powerShellStart=util4.powerShellStart;exports.powerShellRelease=util4.powerShellRelease});import os4 from"os";function toGB(bytes){return Math.round(bytes/1073741824*10)/10}function bar(percent,width){let p=Math.max(0,Math.min(100,percent)),filled=Math.round(p/100*width);return`[${"=".repeat(filled)}${"-".repeat(width-filled)}]`}function pickColor(percent){if(percent>90)return palette.error;if(percent>70)return palette.warning;return palette.accent}function SystemStatsView({stats:stats2}){if(!stats2)return import_jsx_dev_runtime2.jsxDEV("box",{flexDirection:"column",paddingX:1,backgroundColor:palette.bgRaised,children:import_jsx_dev_runtime2.jsxDEV("box",{height:1,width:"100%",children:import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.accent,children:"genie"},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:` v${VERSION}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this);let{cpu,ram,swap,load:load3}=stats2,hotStr=cpu.hotCores.map((c)=>`#${c.id} ${c.load}%`).join(" ");return import_jsx_dev_runtime2.jsxDEV("box",{flexDirection:"column",paddingX:1,backgroundColor:palette.bgRaised,children:[import_jsx_dev_runtime2.jsxDEV("box",{height:1,width:"100%",children:import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.accent,children:"genie"},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:` v${VERSION}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("box",{height:1,width:"100%",children:import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:"CPU "},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:pickColor(cpu.combined),children:`${String(cpu.combined).padStart(3)}% ${bar(cpu.combined,8)}`},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:` ${cpu.coreCount}c`},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("box",{height:1,width:"100%",children:import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:" hot "},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.warning,children:hotStr},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("box",{height:1,width:"100%",children:import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:"RAM "},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:pickColor(ram.percent),children:`${ram.usedGB}/${ram.totalGB}G ${bar(ram.percent,8)}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),swap.totalGB>0?import_jsx_dev_runtime2.jsxDEV("box",{height:1,width:"100%",children:import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:"SWP "},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:pickColor(swap.percent),children:`${swap.usedGB}/${swap.totalGB}G ${bar(swap.percent,8)}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this):null,import_jsx_dev_runtime2.jsxDEV("box",{height:1,width:"100%",children:import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:"Load "},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:pickColor(load3.percent),children:`${load3.percent}%`},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:` (${load3.busy}/${load3.total} busy)`},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function SystemStats(){let[stats2,setStats]=import_react19.useState(null),mountedRef=import_react19.useRef(!0);return import_react19.useEffect(()=>{mountedRef.current=!0;async function refresh(){try{let[cpu,mem]=await Promise.all([import_systeminformation.default.currentLoad(),import_systeminformation.default.mem()]);if(!mountedRef.current)return;let coreCount=os4.cpus().length,avg1=os4.loadavg()[0],sorted=cpu.cpus.map((c,i2)=>({id:i2,load:Math.round(c.load)})).sort((a,b3)=>b3.load-a.load);setStats({cpu:{combined:Math.round(cpu.currentLoad),hotCores:sorted.slice(0,3),coreCount},ram:{usedGB:toGB(mem.active),totalGB:toGB(mem.total),percent:mem.total>0?Math.round(mem.active/mem.total*100):0},swap:{usedGB:toGB(mem.swapused),totalGB:toGB(mem.swaptotal),percent:mem.swaptotal>0?Math.round(mem.swapused/mem.swaptotal*100):0},load:{percent:coreCount>0?Math.round(avg1/coreCount*100):0,busy:Math.round(avg1*10)/10,total:coreCount}})}catch{}}refresh();let timer2=setInterval(refresh,3000);return()=>{mountedRef.current=!1,clearInterval(timer2)}},[]),import_jsx_dev_runtime2.jsxDEV(SystemStatsView,{stats:stats2},void 0,!1,void 0,this)}var import_react19,import_systeminformation;var init_SystemStats=__esm(()=>{init_version();init_theme2();init_jsx_dev_runtime();import_react19=__toESM(require_react_development(),1),import_systeminformation=__toESM(require_lib5(),1)});function validateName(name){if(name.length===0)return null;try{return validateBranchName(name),null}catch(err){return err instanceof Error?err.message:String(err)}}function TeamCreate({availableAgents,workspaceRoot,onConfirm,onCancel}){let[step,setStep]=import_react21.useState("name"),[teamName,setTeamName]=import_react21.useState(""),[selected,setSelected]=import_react21.useState(()=>new Set),[memberCursor,setMemberCursor]=import_react21.useState(0),nameError=import_react21.useMemo(()=>validateName(teamName),[teamName]),nameValid=teamName.length>0&&nameError===null,intent=import_react21.useMemo(()=>({kind:"create-team",name:teamName.length>0?teamName:"TEAM_NAME",repo:workspaceRoot}),[teamName,workspaceRoot]),handleNameChange=import_react21.useCallback((value)=>{setTeamName(value)},[]),advanceFromName=import_react21.useCallback(()=>{if(!nameValid)return;setStep("members")},[nameValid]),toggleMember=import_react21.useCallback((name)=>{setSelected((prev)=>{let next=new Set(prev);if(next.has(name))next.delete(name);else next.add(name);return next})},[]),confirmMembers=import_react21.useCallback(()=>{onConfirm({teamName,members:Array.from(selected)})},[onConfirm,teamName,selected]);return useKeyboard((key)=>{if(step==="name"){handleNameStepKey(key,{onCancel,nameValid,advanceFromName});return}handleMembersStepKey(key,{availableAgents,memberCursor,setStep,setMemberCursor,toggleMember,confirmMembers})}),import_jsx_dev_runtime2.jsxDEV("box",{position:"absolute",width:"100%",height:"100%",justifyContent:"center",alignItems:"center",backgroundColor:palette.bgOverlay,children:import_jsx_dev_runtime2.jsxDEV("box",{border:!0,borderColor:palette.borderActive,backgroundColor:palette.bgRaised,paddingX:3,paddingY:1,flexDirection:"column",width:"100%",gap:1,children:[import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.accent,children:"New team"},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:step==="name"?" \u2014 step 1 of 2":" \u2014 step 2 of 2"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),step==="name"?import_jsx_dev_runtime2.jsxDEV(NameStep,{value:teamName,onChange:handleNameChange,onSubmit:advanceFromName,errorMessage:nameError},void 0,!1,void 0,this):import_jsx_dev_runtime2.jsxDEV(MembersStep,{agents:availableAgents,selected,cursor:memberCursor},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV(CliPreviewLine,{intent,hint:step==="name"?"Enter: next \xB7 Esc: cancel":"Space: toggle \xB7 Enter: create \xB7 Esc: back"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function NameStep({value,onChange,onSubmit,errorMessage}){return import_jsx_dev_runtime2.jsxDEV("box",{flexDirection:"column",gap:1,children:[import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:"Team name (git-branch-safe):"},void 0,!1,void 0,this)},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("input",{value,onInput:onChange,onChange,onSubmit,focused:!0,placeholder:"feat/auth-bug",backgroundColor:palette.bg,textColor:palette.text,placeholderColor:palette.textMuted},void 0,!1,void 0,this),errorMessage!==null?import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.error,children:`\u26A0 ${errorMessage}`},void 0,!1,void 0,this)},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function MembersStep({agents,selected,cursor}){if(agents.length===0)return import_jsx_dev_runtime2.jsxDEV("box",{flexDirection:"column",children:[import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:"No agents registered"},void 0,!1,void 0,this)},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:"Members can be hired later via `genie team hire`."},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return import_jsx_dev_runtime2.jsxDEV("box",{flexDirection:"column",children:[import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:"Select members (space to toggle):"},void 0,!1,void 0,this)},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("box",{flexDirection:"column",children:agents.map((name,idx)=>{let isSelected=selected.has(name),isCursor=idx===cursor,tick=isSelected?"[x]":"[ ]",prefix=isCursor?"\u25B6 ":" ";return import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:isCursor?palette.accent:palette.textMuted,children:prefix},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:isSelected?palette.success:palette.textDim,children:tick},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.text,children:` ${name}`},void 0,!1,void 0,this)]},name,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function isEnter(key){return key.name==="enter"||key.name==="return"}function handleNameStepKey(key,opts){if(key.name==="escape"){opts.onCancel();return}if(isEnter(key)&&opts.nameValid)opts.advanceFromName()}function handleMembersStepKey(key,opts){if(key.name==="escape"){opts.setStep("name");return}if(opts.availableAgents.length===0){if(isEnter(key))opts.confirmMembers();return}if(key.name==="up"||key.name==="k"){opts.setMemberCursor((prev)=>prev<=0?opts.availableAgents.length-1:prev-1);return}if(key.name==="down"||key.name==="j"){opts.setMemberCursor((prev)=>prev>=opts.availableAgents.length-1?0:prev+1);return}if(key.name==="space"){let name=opts.availableAgents[opts.memberCursor];if(name)opts.toggleMember(name);return}if(isEnter(key))opts.confirmMembers()}var import_react21;var init_TeamCreate=__esm(async()=>{init_team_manager();init_theme2();init_CliPreviewLine();init_jsx_dev_runtime();await init_react();import_react21=__toESM(require_react_development(),1)});function getNodeIcon(node){if(node.type==="agent")return getAgentIcon(node);switch(node.type){case"session":return node.data.attached?"\u25B6":"\u25B8";case"window":return node.data.active?"\u25A0":"\u25A1";case"pane":return getPaneIcon(node);default:return" "}}function getAgentIcon(node){switch(node.workState){case"in_flight":return"\u25C6";case"paused":return"\u25D0";case"done":return"\u2714";case"stuck":return"\u2718";default:break}switch(node.wsAgentState){case"running":return"\u25CF";case"stopped":return"\u25CC";case"error":return"\u2298";case"spawning":return"\u231B";default:return"\u25CC"}}function getPaneIcon(node){if(node.data.isDead)return"\u2718";if(node.agentState==="working")return"\u25CF";if(node.agentState==="idle")return"\u25CB";if(node.agentState==="permission")return"\u26A0";if(node.agentState==="error")return"\u2718";if(node.data.command==="claude")return"\u25C6";return"\u25CB"}function getNodeColor(node){if(node.type==="agent")return getAgentColor(node);switch(node.type){case"session":return node.data.attached?palette.success:palette.textDim;case"window":return node.data.active?palette.info:palette.text;case"pane":return getPaneColor(node);default:return palette.text}}function getAgentColor(node){switch(node.workState){case"in_flight":return palette.accentBright;case"paused":return palette.textDim;case"done":return palette.info;case"stuck":return palette.error;default:break}switch(node.wsAgentState){case"running":return palette.success;case"stopped":return palette.text;case"error":return palette.error;case"spawning":return palette.warning;default:return palette.textDim}}function getPaneColor(node){if(node.data.isDead)return palette.error;if(node.agentState==="working")return palette.info;if(node.agentState==="permission")return palette.warning;if(node.agentState==="error")return palette.error;if(node.agentState==="idle")return palette.textDim;if(node.data.command==="claude")return palette.info;return palette.textDim}function getAgentSuffix(node){if(node.workState==="stuck")return" [stuck \u2014 press R to retry]";if(node.workState==="paused")return" [paused \u2014 auto-resume off]";if(node.workState==="done")return" [done]";if(node.wsAgentState==="spawning"&&node.activePanes===0)return" [stuck \u2014 press R to retry]";if(node.wsAgentState==="stopped")return" [Enter to start]";let wc=node.data.windowCount;if(wc>1)return` (${wc} windows)`;if(wc===1)return" (1 window)";return""}function getNodeSuffix(node){if(node.type==="agent")return getAgentSuffix(node);if(node.type==="session"||node.type==="pane"){let count=node.activePanes;if(count>0)return` ${icons.agent}${count}`}return""}function getStateColor(state){switch(state){case"working":return palette.info;case"idle":return palette.textDim;case"permission":return palette.warning;case"error":return palette.error;default:return palette.textMuted}}var import_react22,TreeNodeRow;var init_TreeNode=__esm(()=>{init_theme2();init_jsx_dev_runtime();import_react22=__toESM(require_react_development(),1),TreeNodeRow=import_react22.memo(function({node,selected,onSelect,onToggle,onContextMenu}){let indent2=" ".repeat(node.depth),hasChildren=node.children.length>0,expandIcon=hasChildren?node.expanded?icons.expanded:icons.collapsed:" ",icon=getNodeIcon(node),color2=getNodeColor(node),suffix=getNodeSuffix(node),labelColor=selected?palette.accentBright:node.type==="agent"&&node.kind==="subagent"?palette.textDim:palette.text;return import_jsx_dev_runtime2.jsxDEV("box",{height:1,width:"100%",backgroundColor:selected?palette.accentDim:void 0,onMouseDown:(event)=>{if(event.button===2&&onContextMenu){onSelect(node.id),onContextMenu(node.id);return}if(onSelect(node.id),hasChildren)onToggle(node.id)},children:import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:[indent2,expandIcon," "]},void 0,!0,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:color2,children:[icon," "]},void 0,!0,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:labelColor,children:node.label},void 0,!1,void 0,this),suffix?import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:suffix},void 0,!1,void 0,this):null,node.agentState?import_jsx_dev_runtime2.jsxDEV("span",{fg:getStateColor(node.agentState),children:[" ",node.agentState]},void 0,!0,void 0,this):null,process.env.GENIE_TUI_DEBUG==="1"?import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:` [${node.type}]`},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)},void 0,!1,void 0,this)})});function useDiagnosticsRefresh(setDiagnostics,setRequestedInitialAgent){import_react24.useEffect(()=>{let active=!0;async function refresh(){try{let snap=await collectDiagnostics();if(!active)return;setDiagnostics(snap);let signaledAgent=consumeInitialAgentSignal();if(signaledAgent)setRequestedInitialAgent(signaledAgent)}catch(err){console.error("TUI: diagnostics failed:",err)}}refresh();let timer2=setInterval(refresh,2000);return()=>{active=!1,clearInterval(timer2)}},[setDiagnostics,setRequestedInitialAgent])}function useSessionTreeBuilder(diagnostics,workspaceRoot,setSessionTree){import_react24.useEffect(()=>{if(!diagnostics)return;let newTree;if(workspaceRoot){let agentNames=scanAgents(workspaceRoot);newTree=buildWorkspaceTree({agentNames,sessions:diagnostics.sessions,executors:diagnostics.executors,workStates:diagnostics.workStates})}else newTree=buildSessionTree(diagnostics);setSessionTree((prev)=>mergeExpandedState(prev,newTree))},[diagnostics,workspaceRoot,setSessionTree])}function useStableSelection(flatNodes,selectedIndex,setSelectedIndex,selectedNodeId){import_react24.useEffect(()=>{let node=flatNodes[selectedIndex]?.node;if(node)selectedNodeId.current=node.id},[selectedIndex,flatNodes,selectedNodeId]),import_react24.useLayoutEffect(()=>{if(flatNodes.length===0)return;if(selectedIndex>=flatNodes.length){setSelectedIndex(flatNodes.length-1);return}if(!selectedNodeId.current)return;let currentAtIndex=flatNodes[selectedIndex]?.node;if(currentAtIndex&&currentAtIndex.id===selectedNodeId.current)return;let restored=flatNodes.findIndex((n)=>n.node.id===selectedNodeId.current);if(restored>=0)setSelectedIndex(restored)},[flatNodes])}function useInitialAgentSelection(requestedInitialAgent,flatNodes,setSelectedIndex,setRequestedInitialAgent,onTmuxSessionSelect){import_react24.useEffect(()=>{if(!requestedInitialAgent||flatNodes.length===0)return;let idx=flatNodes.findIndex((n)=>n.node.id===`agent:${requestedInitialAgent}`);if(idx<0)return;setSelectedIndex(idx);let node=flatNodes[idx].node;if(node.type==="agent"&&node.wsAgentState!=="running"&&node.wsAgentState!=="spawning")spawnAgent(agentNameFromNode(node),onTmuxSessionSelect);setRequestedInitialAgent(void 0)},[requestedInitialAgent,flatNodes,onTmuxSessionSelect,setSelectedIndex,setRequestedInitialAgent])}function useAutoAttach(flatNodes,selectedIndex,lastTarget,onTmuxSessionSelect){import_react24.useEffect(()=>{let current=flatNodes[selectedIndex]?.node;if(!current)return;let target=getSessionTarget(current);if(!target)return;if(current.type==="agent"&&current.wsAgentState!=="running")return;let key=`${target.sessionName}:${target.windowIndex??""}`;if(key===lastTarget.current)return;lastTarget.current=key,onTmuxSessionSelect(target.sessionName,target.windowIndex)},[selectedIndex,flatNodes,onTmuxSessionSelect,lastTarget])}function useNavKeyboard(opts){useKeyboard((key)=>{if(opts.keyboardDisabled)return;if(opts.spawnIntoAgent!==null||opts.spawnPickerTarget!==null)return;if(tryOpenTeamCreate(key,{workspaceRoot:opts.workspaceRoot,showTeamCreate:opts.showTeamCreate,contextMenuNodeId:opts.contextMenuNodeId,handleOpenTeamCreate:opts.handleOpenTeamCreate}))return;if(opts.showTeamCreate)return;handleKeyboardInput(key,opts)})}function renderAlertBadge(alertCount){if(alertCount<=0)return null;return import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.error,children:[" ","\u25CF ",alertCount," alert",alertCount===1?"":"s"]},void 0,!0,void 0,this)}function countAgents(nodes,predicate){let count=0;for(let n of nodes){if(n.type==="agent"&&predicate(n))count++;if(n.children.length>0)count+=countAgents(n.children,predicate)}return count}function computeNavCounts(workspaceRoot,sessionTree,diagnostics){if(workspaceRoot){let agentCount=countAgents(sessionTree,()=>!0);if(agentCount>0)return{agentCount,runningCount:countAgents(sessionTree,(n)=>n.wsAgentState==="running")}}let paneSum=diagnostics?.sessions.reduce((sum,s2)=>sum+s2.windows.reduce((ws,w2)=>ws+w2.panes.length,0),0)??0;return{agentCount:diagnostics?.sessions.length??0,runningCount:paneSum}}function Nav({onTmuxSessionSelect,onNewAgentWindow,workspaceRoot,initialAgent,keyboardDisabled=!1}){let[diagnostics,setDiagnostics]=import_react24.useState(null),[sessionTree,setSessionTree]=import_react24.useState([]),[selectedIndex,setSelectedIndex]=import_react24.useState(0),[requestedInitialAgent,setRequestedInitialAgent]=import_react24.useState(initialAgent),[contextMenuNodeId,setContextMenuNodeId]=import_react24.useState(null),[spawnIntoAgent,setSpawnIntoAgent]=import_react24.useState(null),[spawnPickerTarget,setSpawnPickerTarget]=import_react24.useState(null),lastTarget=import_react24.useRef(null),selectedNodeId=import_react24.useRef(null);useDiagnosticsRefresh(setDiagnostics,setRequestedInitialAgent),useSessionTreeBuilder(diagnostics,workspaceRoot,setSessionTree);let flatNodes=import_react24.useMemo(()=>flattenTree(sessionTree),[sessionTree]);useStableSelection(flatNodes,selectedIndex,setSelectedIndex,selectedNodeId),useInitialAgentSelection(requestedInitialAgent,flatNodes,setSelectedIndex,setRequestedInitialAgent,onTmuxSessionSelect),useAutoAttach(flatNodes,selectedIndex,lastTarget,onTmuxSessionSelect);let handleSelect=import_react24.useCallback((id)=>{let idx=flatNodes.findIndex((n)=>n.node.id===id);if(idx>=0)setSelectedIndex(idx)},[flatNodes]),handleToggle=import_react24.useCallback((id)=>{setSessionTree((prev)=>toggleNode(prev,id))},[]),handleVerticalNav=import_react24.useCallback((keyName2)=>{let rowCount=flatNodes.length;if(rowCount===0)return;if(keyName2==="up"||keyName2==="k")setSelectedIndex((prev)=>prev===0?rowCount-1:prev-1);else if(keyName2==="down"||keyName2==="j")setSelectedIndex((prev)=>prev>=rowCount-1?0:prev+1)},[flatNodes.length]),handleExpandCollapse=import_react24.useCallback((keyName2)=>{let node=flatNodes[selectedIndex]?.node;if(!node)return;if((keyName2==="right"||keyName2==="l")&&node.children.length>0&&!node.expanded)handleToggle(node.id);else if((keyName2==="left"||keyName2==="h")&&node.expanded)handleToggle(node.id)},[flatNodes,selectedIndex,handleToggle]),handleEnter=import_react24.useCallback(()=>{let node=flatNodes[selectedIndex]?.node;if(!node)return;if(node.type==="agent"){handleEnterAgent(node,onTmuxSessionSelect);return}if(node.children.length>0)handleToggle(node.id);let target=getSessionTarget(node);if(target)onTmuxSessionSelect(target.sessionName,target.windowIndex)},[flatNodes,selectedIndex,handleToggle,onTmuxSessionSelect]),handleRetry=import_react24.useCallback(()=>{let node=flatNodes[selectedIndex]?.node;if(!node||node.type!=="agent")return;if(node.wsAgentState!=="spawning"&&node.wsAgentState!=="error")return;(async()=>{try{let{reconcileStaleSpawns:reconcileStaleSpawns2}=await Promise.resolve().then(() => (init_agent_registry(),exports_agent_registry));await reconcileStaleSpawns2()}catch{}spawnAgent(agentNameFromNode(node),onTmuxSessionSelect)})()},[flatNodes,selectedIndex,onTmuxSessionSelect]),handleContextMenu=import_react24.useCallback((nodeId)=>{let flat=flatNodes.find((n)=>n.node.id===nodeId);if(flat&&buildMenuItems(flat.node).length>0)setContextMenuNodeId(nodeId)},[flatNodes]),handleContextMenuAction=import_react24.useCallback((action,payload)=>{let node=flatNodes.find((n)=>n.node.id===contextMenuNodeId)?.node;if(!node)return;if(setContextMenuNodeId(null),action==="spawn-here"){let target=resolveSpawnHereTarget(node);if(target)setSpawnPickerTarget(target);return}dispatchContextMenuAction(action,node,payload,{sessionTree,onTmuxSessionSelect,onNewAgentWindow,openSpawnInto:setSpawnIntoAgent})},[flatNodes,contextMenuNodeId,sessionTree,onTmuxSessionSelect,onNewAgentWindow]),handleSpawnIntoConfirm=import_react24.useCallback((intent)=>{executeSpawnIntent(intent),setSpawnIntoAgent(null)},[]),handleSpawnIntoCancel=import_react24.useCallback(()=>{setSpawnIntoAgent(null)},[]),handleSpawnPickerConfirm=import_react24.useCallback((intent)=>{setSpawnPickerTarget(null),executeSpawnIntent(intent)},[]),handleSpawnPickerCancel=import_react24.useCallback(()=>{setSpawnPickerTarget(null)},[]),_menuDisabled=keyboardDisabled||contextMenuNodeId!==null,{showTeamCreate,handleOpenTeamCreate,handleTeamCreateConfirm,handleTeamCreateCancel}=useTeamCreateControls({workspaceRoot,diagnostics,onTmuxSessionSelect});useNavKeyboard({keyboardDisabled,spawnIntoAgent,spawnPickerTarget,workspaceRoot,showTeamCreate,contextMenuNodeId,handleOpenTeamCreate,flatNodes,selectedIndex,setContextMenuNodeId,handleVerticalNav,handleExpandCollapse,handleEnter,handleRetry,onNewAgentWindow});let{agentCount,runningCount}=computeNavCounts(workspaceRoot,sessionTree,diagnostics),headerLabel=workspaceRoot?"Agents":"Sessions",alertCount=diagnostics?.alertCount??0;return import_jsx_dev_runtime2.jsxDEV("box",{flexDirection:"column",width:"100%",height:"100%",backgroundColor:palette.bg,children:[import_jsx_dev_runtime2.jsxDEV("box",{height:1,paddingX:1,backgroundColor:palette.bgRaised,children:import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.accent,children:headerLabel},void 0,!1,void 0,this),diagnostics?import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:[" ",workspaceRoot?`${runningCount}/${agentCount}`:`${agentCount}s ${runningCount}p`]},void 0,!0,void 0,this):null,renderAlertBadge(alertCount)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),diagnostics?import_jsx_dev_runtime2.jsxDEV("scrollbox",{focused:!0,height:"100%",style:{scrollbarOptions:{showArrows:!1,trackOptions:{foregroundColor:palette.scrollThumb,backgroundColor:palette.scrollTrack}}},children:flatNodes.map((flat,i2)=>import_jsx_dev_runtime2.jsxDEV(TreeNodeRow,{node:flat.node,selected:i2===selectedIndex,onSelect:handleSelect,onToggle:handleToggle,onContextMenu:handleContextMenu},flat.node.id,!1,void 0,this))},void 0,!1,void 0,this):import_jsx_dev_runtime2.jsxDEV("box",{flexGrow:1,justifyContent:"center",alignItems:"center",children:import_jsx_dev_runtime2.jsxDEV("text",{fg:palette.textDim,children:"Collecting..."},void 0,!1,void 0,this)},void 0,!1,void 0,this),contextMenuNodeId?import_jsx_dev_runtime2.jsxDEV(ContextMenu,{items:buildMenuItems(flatNodes.find((n)=>n.node.id===contextMenuNodeId)?.node??{}),onAction:handleContextMenuAction,onClose:()=>setContextMenuNodeId(null),positionY:flatNodes.findIndex((n)=>n.node.id===contextMenuNodeId)+1},void 0,!1,void 0,this):null,spawnIntoAgent!==null?import_jsx_dev_runtime2.jsxDEV(SpawnTargetPicker,{agentName:spawnIntoAgent,sessions:diagnostics?.sessions??[],onConfirm:handleSpawnIntoConfirm,onCancel:handleSpawnIntoCancel},void 0,!1,void 0,this):null,spawnPickerTarget!==null?import_jsx_dev_runtime2.jsxDEV(AgentPicker,{target:spawnPickerTarget,onConfirm:handleSpawnPickerConfirm,onCancel:handleSpawnPickerCancel},void 0,!1,void 0,this):null,showTeamCreate?import_jsx_dev_runtime2.jsxDEV(TeamCreate,{availableAgents:workspaceRoot?scanAgents(workspaceRoot):[],workspaceRoot,onConfirm:handleTeamCreateConfirm,onCancel:handleTeamCreateCancel},void 0,!1,void 0,this):null,import_jsx_dev_runtime2.jsxDEV(SystemStats,{},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("box",{height:1,paddingX:1,backgroundColor:palette.bgRaised,children:import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:buildFooterHint(workspaceRoot)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function useTeamCreateControls(opts){let{workspaceRoot,diagnostics,onTmuxSessionSelect}=opts,[showTeamCreate,setShowTeamCreate]=import_react24.useState(!1),pendingTeamNameRef=import_react24.useRef(null),handleOpenTeamCreate=import_react24.useCallback(()=>{if(!workspaceRoot)return;setShowTeamCreate(!0)},[workspaceRoot]),handleTeamCreateConfirm=import_react24.useCallback((result2)=>{setShowTeamCreate(!1),runTeamCreation(result2,workspaceRoot),pendingTeamNameRef.current=result2.teamName},[workspaceRoot]),handleTeamCreateCancel=import_react24.useCallback(()=>{setShowTeamCreate(!1)},[]);return import_react24.useEffect(()=>{let pending=pendingTeamNameRef.current;if(!pending||!diagnostics)return;let session=diagnostics.sessions.find((s2)=>s2.name===pending);if(!session)return;pendingTeamNameRef.current=null,onTmuxSessionSelect(session.name,resolvePreferredWindowIndex(session,pending))},[diagnostics,onTmuxSessionSelect]),{showTeamCreate,handleOpenTeamCreate,handleTeamCreateConfirm,handleTeamCreateCancel}}function handleEnterAgent(node,onTmuxSessionSelect,spawn5=spawnAgent){if(node.wsAgentState!=="running"&&node.wsAgentState!=="spawning")spawn5(agentNameFromNode(node),onTmuxSessionSelect);else if(node.wsAgentState==="running"){let target=getSessionTarget(node);if(target)onTmuxSessionSelect(target.sessionName,target.windowIndex)}}function dispatchContextMenuAction(action,node,payload,deps){let name=node.label;if(action==="spawn-into"&&node.type==="agent"&&deps.openSpawnInto){deps.openSpawnInto(agentNameFromNode(node));return}if(handleAttachAction(action,node,deps.onTmuxSessionSelect))return;if(handleRetryAction(action,name,deps.onTmuxSessionSelect))return;if(handleGenieAction(action,name,payload))return;let tmuxServer=process.env.GENIE_TMUX_SERVER||"genie";if(handleRenameAction(action,node,tmuxServer,payload))return;if(handleAgentWindowActions(action,node,name,tmuxServer,deps.onNewAgentWindow))return;if(handleSessionNodeActions(action,node,tmuxServer,payload))return;if(handleWindowNodeActions(action,node,deps.sessionTree,tmuxServer,payload))return;handlePaneNodeActions(action,node,deps.sessionTree,tmuxServer,deps.onNewAgentWindow)}function handleAttachAction(action,node,onTmuxSessionSelect){if(action!=="attach")return!1;let target=getSessionTarget(node);if(target)onTmuxSessionSelect(target.sessionName,target.windowIndex);return!0}function handleRetryAction(action,name,onTmuxSessionSelect){if(action!=="retry")return!1;return(async()=>{try{let{reconcileStaleSpawns:reconcileStaleSpawns2}=await Promise.resolve().then(() => (init_agent_registry(),exports_agent_registry));await reconcileStaleSpawns2()}catch{}spawnAgent(name,onTmuxSessionSelect)})(),!0}function handleGenieAction(action,name,payload){if(action==="send"&&payload)return executeGenie(["agent","send",payload,"--to",name]),!0;if(action==="answer-text"&&payload)return executeGenie(["agent","answer",name,`text:${payload}`]),!0;let genieArgs={spawn:["spawn",name],"spawn-plan":["spawn",name,"--plan-mode"],stop:["agent","stop",name],kill:["agent","kill",name],log:["agent","log",name],show:["agent","show",name],read:["read",name],"answer-yes":["agent","answer",name,"yes"],"answer-no":["agent","answer",name,"no"]}[action];if(genieArgs)return executeGenie(genieArgs),!0;return!1}function handleRenameAction(action,node,tmuxServer,payload){if(action==="rename-session"&&payload){let sess=node.type==="agent"?node.data.sessionName||node.label:node.id.split(":").slice(1).join(":");return executeTmux3(["-L",tmuxServer,"rename-session","-t",sess,payload]),!0}if(action==="rename-window"&&payload){let idParts=node.id.split(":"),windowTarget=`${idParts[1]}:${idParts[2]}`;return executeTmux3(["-L",tmuxServer,"rename-window","-t",windowTarget,payload]),!0}if(action==="rename-pane"&&payload&&node.type==="pane"){let paneId=node.data.paneId;return executeTmux3(["-L",tmuxServer,"select-pane","-t",`${paneId}`,"-T",payload]),!0}return!1}function handleAgentWindowActions(action,node,name,tmuxServer,onNewAgentWindow){if(action==="agent-new-window"&&node.type==="agent"){if(onNewAgentWindow)onNewAgentWindow(agentNameFromNode(node));return!0}if(action==="new-empty-window"&&node.type==="agent"){let sessionName=node.data.sessionName||name;return executeTmux3(["-L",tmuxServer,"new-window","-a","-t",sessionName]),!0}return!1}function handleSessionNodeActions(action,node,tmuxServer,payload){if(node.type!=="session")return!1;let sess=node.id.split(":").slice(1).join(":");if(action==="kill-session")return executeTmux3(["-L",tmuxServer,"kill-session","-t",sess]),!0;if(action==="new-window")return executeTmux3(["-L",tmuxServer,"new-window","-a","-t",sess]),!0;if(action==="clone-session")return executeTmux3(["-L",tmuxServer,"new-session","-d","-s",`${sess}-clone`,"-t",sess]),!0;if(action==="spawn-in-session"&&payload)return executeGenie(["spawn",payload,"--session",sess]),!0;return!1}function handleWindowNodeActions(action,node,sessionTree,tmuxServer,payload){if(node.type!=="window")return!1;let idParts=node.id.split(":"),windowTarget=`${idParts[1]}:${idParts[2]}`;if(action==="kill-window")return executeTmux3(["-L",tmuxServer,"kill-window","-t",windowTarget]),!0;if(action==="window-new-agent"){let parentAgent=findParentAgent(sessionTree,node.id);if(parentAgent){let agentFullName=agentNameFromNode(parentAgent),suffix=Date.now()%1e4,role=`${agentFullName}-${suffix}`;executeGenie(["spawn",agentFullName,"--role",role,"--window",windowTarget])}return!0}if(action==="split-pane")return executeTmux3(["-L",tmuxServer,"split-window","-t",windowTarget]),!0;if(action==="spawn-in-window"&&payload)return executeGenie(["spawn",payload,"--session",idParts[1]]),!0;return!1}function handlePaneNodeActions(action,node,sessionTree,tmuxServer,onNewAgentWindow){if(node.type!=="pane")return!1;let paneId=node.data.paneId;if(action==="clone-agent"){let parentAgent=findParentAgent(sessionTree,node.id);if(parentAgent&&onNewAgentWindow)onNewAgentWindow(agentNameFromNode(parentAgent));return!0}if(action==="kill-pane")return executeTmux3(["-L",tmuxServer,"kill-pane","-t",`${paneId}`]),!0;if(action==="split-h")return executeTmux3(["-L",tmuxServer,"split-window","-h","-t",`${paneId}`]),!0;if(action==="split-v")return executeTmux3(["-L",tmuxServer,"split-window","-v","-t",`${paneId}`]),!0;return!1}function buildFooterHint(workspaceRoot){return`\u2191\u2193:nav \u2190\u2192:expand Enter:${workspaceRoot?"spawn/attach":"attach"} ^T:new${workspaceRoot?" ^N:team":""} R:retry .:menu`}function tryOpenTeamCreate(key,opts){if(!key.ctrl||key.name!=="n")return!1;if(!opts.workspaceRoot||opts.showTeamCreate||opts.contextMenuNodeId)return!1;return opts.handleOpenTeamCreate(),!0}function tryOpenContextMenu(flatNodes,selectedIndex,setContextMenuNodeId){let node=flatNodes[selectedIndex]?.node;if(node&&buildMenuItems(node).length>0)return setContextMenuNodeId(node.id),!0;return!1}function dispatchNavKey(key,handlers2,agentAction){let n=key.name;if(n==="up"||n==="k"||n==="down"||n==="j")handlers2.handleVerticalNav(n);else if(n==="right"||n==="l"||n==="left"||n==="h")handlers2.handleExpandCollapse(n);else if(n==="enter"||n==="return")handlers2.handleEnter();else if(n==="r")handlers2.handleRetry();else if(key.ctrl&&n==="t")agentAction()}function handleKeyboardInput(key,opts){if(key.name==="."&&!opts.contextMenuNodeId){if(tryOpenContextMenu(opts.flatNodes,opts.selectedIndex,opts.setContextMenuNodeId))return}if(opts.contextMenuNodeId)return;dispatchNavKey(key,opts,()=>{let node=opts.flatNodes[opts.selectedIndex]?.node;if(node?.type==="agent"&&node.wsAgentState==="running"&&opts.onNewAgentWindow)opts.onNewAgentWindow(agentNameFromNode(node))})}function agentNameFromNode(node){return node.id.replace(/^agent:/,"")}function spawnAgent(name,onTmuxSessionSelect){try{let{spawn:spawn5}=__require("child_process"),{join:join84,resolve:resolve20}=__require("path"),{existsSync:existsSync68,mkdirSync:mkdirSync29,openSync:openSync6}=__require("fs"),{homedir:homedir45}=__require("os"),bunPath=process.execPath||"bun",genieBin=process.argv[1],wsRoot=process.env.GENIE_TUI_WORKSPACE,sessionName=name.replace(/\//g,"-"),cwd;if(wsRoot){let parentName=name.includes("/")?name.slice(0,name.indexOf("/")):name,agentDir=resolve20(join84(wsRoot,"agents",parentName));if(existsSync68(agentDir))cwd=agentDir}let{GENIE_TUI_PANE:_a,GENIE_TUI_RIGHT:_b,GENIE_TUI_WORKSPACE:_c,GENIE_IS_DAEMON:_d,...cleanEnv}=process.env,logDir=join84(homedir45(),".genie","logs","tui-spawn");try{mkdirSync29(logDir,{recursive:!0})}catch{}let logPath=join84(logDir,`${sessionName}-${Date.now()}.log`),logFd;try{logFd=openSync6(logPath,"a")}catch{logFd=void 0}let spawnOpts=logFd!==void 0?{detached:!0,stdio:["ignore",logFd,logFd],cwd,env:cleanEnv}:{detached:!0,stdio:"ignore",cwd,env:cleanEnv},child=genieBin&&genieBin!=="genie"?spawn5(bunPath,[genieBin,"spawn",name,"--session",sessionName,"--new-window"],spawnOpts):spawn5("genie",["spawn",name,"--session",sessionName,"--new-window"],spawnOpts);if(child.on("exit",(code)=>{if(code&&code!==0)console.error(`TUI: spawn "${name}" exited ${code}. See ${logPath}`)}),child.on("error",(err)=>{console.error(`TUI: spawn "${name}" error: ${err.message}. See ${logPath}`)}),child.unref(),onTmuxSessionSelect)attachSpawnedAgentWhenReady(sessionName,onTmuxSessionSelect)}catch(err){console.error(`TUI: spawn failed for ${name}:`,err instanceof Error?err.message:err)}}function attachSpawnedAgentWhenReady(sessionName,onTmuxSessionSelect,attempt=0){(async()=>{try{let session=(await collectDiagnostics()).sessions.find((candidate)=>candidate.name===sessionName);if(session){let windowIndex=resolvePreferredWindowIndex(session,sessionName);if(windowIndex!==void 0){onTmuxSessionSelect(sessionName,windowIndex);return}}}catch{}if(attempt>=40){onTmuxSessionSelect(sessionName);return}setTimeout(()=>{attachSpawnedAgentWhenReady(sessionName,onTmuxSessionSelect,attempt+1)},250)})()}function executeTmux3(args){try{let{spawn:spawn5}=__require("child_process");spawn5("tmux",args,{detached:!0,stdio:"ignore"}).unref()}catch{}}function executeGenie(args){try{let{spawn:spawn5}=__require("child_process"),bunPath=process.execPath||"bun",genieBin=process.argv[1];(genieBin&&genieBin!=="genie"?spawn5(bunPath,[genieBin,...args],{detached:!0,stdio:"ignore"}):spawn5("genie",args,{detached:!0,stdio:"ignore"})).unref()}catch{}}function executeGenieAwaited(args){return new Promise((resolve20,reject)=>{try{let{spawn:spawn5}=__require("child_process"),bunPath=process.execPath||"bun",genieBin=process.argv[1],child=genieBin&&genieBin!=="genie"?spawn5(bunPath,[genieBin,...args],{stdio:"ignore"}):spawn5("genie",args,{stdio:"ignore"});child.on("exit",(code)=>resolve20(code)),child.on("error",reject)}catch(err){reject(err instanceof Error?err:Error(String(err)))}})}function resolveSpawnHereTarget(node){if(node.type==="session"){let sess=node.id.split(":").slice(1).join(":");if(sess.length===0)return null;return{session:sess}}if(node.type==="window"){let idParts=node.id.split(":");if(idParts.length<3)return null;return{session:idParts[1],window:`${idParts[1]}:${idParts[2]}`}}return null}function executeSpawnIntent(intent){try{let{argv}=buildSpawnInvocation(intent);executeGenie(argv)}catch(err){console.error("TUI: spawn-intent execution failed:",err instanceof Error?err.message:err)}}async function runTeamCreation(result2,workspaceRoot){let argv;try{({argv}=buildSpawnInvocation({kind:"create-team",name:result2.teamName,repo:workspaceRoot}))}catch(err){console.error("TUI: team create intent build failed:",err instanceof Error?err.message:err);return}let createExit=null;try{createExit=await executeGenieAwaited(argv)}catch(err){console.error("TUI: team create spawn failed:",err instanceof Error?err.message:err);return}if(createExit!==0){console.error(`TUI: team create exited ${createExit} \u2014 skipping member hires for "${result2.teamName}"`);return}for(let member of result2.members)try{let code=await executeGenieAwaited(["team","hire",member,"--team",result2.teamName]);if(code!==0)console.error(`TUI: team hire "${member}" exited ${code} \u2014 continuing with remaining members`)}catch(err){console.error(`TUI: team hire "${member}" failed:`,err instanceof Error?err.message:err)}}function findParentAgent(tree,targetId){for(let node of tree){if(node.type==="agent"&&containsNode(node,targetId))return node;let found=findParentAgent(node.children,targetId);if(found)return found}return null}function containsNode(node,targetId){if(node.id===targetId)return!0;return node.children.some((c)=>containsNode(c,targetId))}function mergeExpandedState(oldTree,newTree){if(oldTree.length===0)return newTree;let oldState=new Map;function collect(nodes){for(let n of nodes)oldState.set(n.id,{expanded:n.expanded,childCount:n.children.length}),collect(n.children)}collect(oldTree);function apply(nodes){return nodes.map((n)=>({...n,expanded:(()=>{let previous=oldState.get(n.id);if(!previous)return n.expanded;if(previous.childCount===0&&n.children.length>0)return n.expanded;return previous.expanded})(),children:apply(n.children)}))}return apply(newTree)}var import_react24;var init_Nav=__esm(async()=>{init_spawn_invocation();init_workspace();init_diagnostics();init_initial_agent();init_theme2();init_SystemStats();init_TreeNode();init_jsx_dev_runtime();await __promiseAll([init_react(),init_AgentPicker(),init_ContextMenu(),init_SpawnTargetPicker(),init_TeamCreate()]);import_react24=__toESM(require_react_development(),1)});function QuitDialog({onConfirm,onCancel}){return useKeyboard((key)=>{if(key.name==="enter"||key.name==="return"||key.name==="y")onConfirm();else if(key.name==="escape"||key.name==="n")onCancel()}),import_jsx_dev_runtime2.jsxDEV("box",{position:"absolute",width:"100%",height:"100%",justifyContent:"center",alignItems:"center",backgroundColor:palette.bgOverlay,children:import_jsx_dev_runtime2.jsxDEV("box",{border:!0,borderColor:palette.borderActive,backgroundColor:palette.bgRaised,paddingX:3,paddingY:1,flexDirection:"column",alignItems:"center",gap:1,children:[import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.accent,children:"Quit genie?"},void 0,!1,void 0,this)},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("text",{children:[import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.text,children:"Enter"},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:" to quit "},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:" | "},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.text,children:" Esc"},void 0,!1,void 0,this),import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textDim,children:" to cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),import_jsx_dev_runtime2.jsxDEV("text",{children:import_jsx_dev_runtime2.jsxDEV("span",{fg:palette.textMuted,children:"Hint: Ctrl+D to detach (keep running)"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var init_QuitDialog=__esm(async()=>{init_theme2();init_jsx_dev_runtime();await init_react()});import{execSync as execSync18}from"child_process";import{readFileSync as readFileSync42}from"fs";function App({rightPane,workspaceRoot,initialAgent}){let[showQuit,setShowQuit]=import_react27.useState(!1);useKeyboard((key)=>{if(key.ctrl&&key.name==="q")if(showQuit)handleQuit();else setShowQuit(!0)});let handleQuit=import_react27.useCallback(()=>{try{let genieHome6=process.env.GENIE_HOME??`${process.env.HOME}/.genie`,pid=readFileSync42(`${genieHome6}/serve.pid`,"utf-8").trim();process.kill(Number.parseInt(pid,10),"SIGTERM")}catch{}try{execSync18("tmux -L genie-tui kill-server",{stdio:"ignore"})}catch{}},[]),handleTmuxSessionSelect=import_react27.useCallback((sessionName,windowIndex)=>{if(!rightPane)return;attachProjectWindow(rightPane,sessionName,windowIndex)},[rightPane]);return import_jsx_dev_runtime2.jsxDEV("box",{width:"100%",height:"100%",children:[import_jsx_dev_runtime2.jsxDEV(Nav,{onTmuxSessionSelect:handleTmuxSessionSelect,onNewAgentWindow:newAgentWindow,workspaceRoot,initialAgent,keyboardDisabled:showQuit},void 0,!1,void 0,this),showQuit?import_jsx_dev_runtime2.jsxDEV(QuitDialog,{onConfirm:handleQuit,onCancel:()=>setShowQuit(!1)},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}var import_react27;var init_app=__esm(async()=>{init_tmux2();init_jsx_dev_runtime();await __promiseAll([init_react(),init_Nav(),init_QuitDialog()]);import_react27=__toESM(require_react_development(),1)});var exports_render={};__export(exports_render,{resolveTuiRendererConfig:()=>resolveTuiRendererConfig,renderNav:()=>renderNav});function readBool(env2,name,fallback){let raw=env2[name];if(!raw)return fallback;let normalized=raw.trim().toLowerCase();if(TRUTHY3.has(normalized))return!0;if(FALSY.has(normalized))return!1;return fallback}function readPositiveInt(env2,name){let raw=env2[name];if(!raw)return;let parsed=Number.parseInt(raw,10);return Number.isFinite(parsed)&&parsed>0?parsed:void 0}function resolveTuiRendererConfig(env2=process.env,platform2=process.platform){let isDarwin=platform2==="darwin",targetFps=readPositiveInt(env2,"GENIE_TUI_TARGET_FPS")??(isDarwin?8:30),configuredMaxFps=readPositiveInt(env2,"GENIE_TUI_MAX_FPS")??(isDarwin?12:60),maxFps=Math.max(configuredMaxFps,targetFps),useMouse=readBool(env2,"GENIE_TUI_MOUSE",!isDarwin),enableMouseMovement=useMouse&&readBool(env2,"GENIE_TUI_MOUSE_MOVEMENT",!isDarwin);return{exitOnCtrlC:!1,useThread:!isDarwin,targetFps,maxFps,useMouse,enableMouseMovement,useKittyKeyboard:isDarwin?null:void 0,consoleMode:isDarwin?"disabled":void 0,openConsoleOnError:!isDarwin}}async function renderNav(){let rightPane=process.env.GENIE_TUI_RIGHT||void 0,workspaceRoot=process.env.GENIE_TUI_WORKSPACE||void 0,initialAgent=process.env.GENIE_TUI_AGENT||void 0,renderer=await createCliRenderer(resolveTuiRendererConfig());createRoot(renderer).render(import_jsx_dev_runtime2.jsxDEV(App,{rightPane,workspaceRoot,initialAgent},void 0,!1,void 0,this)),await new Promise((resolve20)=>{renderer.once("destroy",resolve20)})}var TRUTHY3,FALSY;var init_render=__esm(async()=>{init_jsx_dev_runtime();await __promiseAll([init_core(),init_react(),init_app()]);TRUTHY3=new Set(["1","true","yes","on"]),FALSY=new Set(["0","false","no","off"])});var exports_tui={};__export(exports_tui,{launchTui:()=>launchTui});import{appendFileSync as appendFileSync4,closeSync as closeSync6,mkdirSync as mkdirSync29,openSync as openSync6,readSync as readSync3,statSync as statSync13}from"fs";import{homedir as homedir45}from"os";import{join as join84}from"path";function genieHome6(){return process.env.GENIE_HOME??join84(homedir45(),".genie")}function extractPreviousRunCrashOutput(logPath){let fd=null;try{let size=statSync13(logPath).size;if(size===0)return"";let readSize=Math.min(size,TUI_CRASH_LOG_RECOVERY_MAX_BYTES);fd=openSync6(logPath,"r");let buffer2=Buffer.alloc(readSize);readSync3(fd,buffer2,0,readSize,size-readSize);let text=buffer2.toString("utf-8"),lastBannerIndex=text.lastIndexOf(TUI_CRASH_LOG_BANNER_PREFIX);if(lastBannerIndex<0)return"";let afterBannerNewline=text.indexOf(`
3855
3855
  `,lastBannerIndex);if(afterBannerNewline<0)return"";return text.slice(afterBannerNewline+1).trim()}catch{return""}finally{if(fd!==null)try{closeSync6(fd)}catch{}}}async function ingestPreviousRunCrash(logPath){let body=extractPreviousRunCrashOutput(logPath);if(!body)return;let truncated=body.length>TUI_CRASH_LOG_RECOVERY_MAX_MSG_CHARS?`${body.slice(0,TUI_CRASH_LOG_RECOVERY_MAX_MSG_CHARS)}
3856
- \u2026[truncated]`:body;try{let{emitEvent:emitEvent2}=await Promise.resolve().then(() => (init_emit(),exports_emit));emitEvent2("error.raised",{error_class:"TuiCrash",message:truncated,subsystem:"tui",severity:"error",retryable:!0})}catch{}}async function recordTuiLaunchBreadcrumb(){try{let logsDir=join83(genieHome6(),"logs");mkdirSync28(logsDir,{recursive:!0});let logPath=join83(logsDir,"tui-crash.log");await ingestPreviousRunCrash(logPath);let ts3=new Date().toISOString(),line=`${TUI_CRASH_LOG_BANNER_PREFIX}${ts3} pid=${process.pid} platform=${process.platform} arch=${process.arch} ---
3857
- `;appendFileSync4(logPath,line,{mode:420})}catch{}}async function launchTui(){await recordTuiLaunchBreadcrumb();let{renderNav:renderNav2}=await init_render().then(() => exports_render);await renderNav2()}var TUI_CRASH_LOG_BANNER_PREFIX="--- tui-launch ",TUI_CRASH_LOG_RECOVERY_MAX_BYTES=65536,TUI_CRASH_LOG_RECOVERY_MAX_MSG_CHARS=3000;var init_tui=()=>{};var exports_resolve_agent_cwd={};__export(exports_resolve_agent_cwd,{resolveAgentFromCwd:()=>resolveAgentFromCwd});import{existsSync as existsSync67}from"fs";import{basename as basename16,dirname as dirname25,join as join84,relative as relative10,sep as sep3}from"path";function isRelativeWithin(rel,original){return!rel.startsWith("..")&&rel!==original}function resolveFromCanonicalDir(cwd,agentsDir){let relToAgents=relative10(agentsDir,cwd);if(!isRelativeWithin(relToAgents,cwd))return null;let segments=relToAgents.split(sep3).filter(Boolean);if(segments.length===0)return null;let agentName=segments[0];if(!existsSync67(join84(agentsDir,agentName,"AGENTS.md")))return null;let source=segments.length===1?"exact":"parent";return{agent:agentName,source}}function resolveFromWalkUp(cwd,workspaceRoot){let wsRel=relative10(workspaceRoot,cwd);if(!isRelativeWithin(wsRel,cwd))return null;let current=cwd;while(current!==workspaceRoot&&current!==dirname25(current)){if(existsSync67(join84(current,"AGENTS.md")))return{agent:basename16(current),source:"parent"};current=dirname25(current)}return null}function resolveAgentFromCwd(cwd,workspaceRoot){return resolveFromCanonicalDir(cwd,join84(workspaceRoot,"agents"))??resolveFromWalkUp(cwd,workspaceRoot)??{agent:"genie",source:"default"}}var init_resolve_agent_cwd=()=>{};var import__=__toESM(require_commander(),1),{program,createCommand,createArgument,createOption,CommanderError,InvalidArgumentError,InvalidOptionArgumentError,Command,Argument,Option,Help}=import__.default;init_doctor();init_setup();init_shortcuts();import{existsSync as existsSync23}from"fs";import{homedir as homedir24}from"os";import{join as join29}from"path";async function shortcutsShowCommand(){displayShortcuts();let home=homedir24(),tmuxConf=join29(home,".tmux.conf"),zshrc=join29(home,".zshrc"),bashrc=join29(home,".bashrc");if(console.log("Installation status:"),isShortcutsInstalled(tmuxConf))console.log(" \x1B[32m\u2713\x1B[0m tmux.conf");else console.log(" \x1B[33m-\x1B[0m tmux.conf");let shellRc=existsSync23(zshrc)?zshrc:bashrc;if(isShortcutsInstalled(shellRc))console.log(` \x1B[32m\u2713\x1B[0m ${shellRc.replace(home,"~")}`);else console.log(` \x1B[33m-\x1B[0m ${shellRc.replace(home,"~")}`);console.log(),console.log("Run \x1B[36mgenie shortcuts install\x1B[0m to install shortcuts."),console.log("Run \x1B[36mgenie shortcuts uninstall\x1B[0m to remove shortcuts."),console.log()}async function shortcutsInstallCommand(){await installShortcuts()}async function shortcutsUninstallCommand(){await uninstallShortcuts()}init_esm14();init_claude_settings();init_genie_config2();import{existsSync as existsSync24,lstatSync,rmSync as rmSync2,unlinkSync as unlinkSync8}from"fs";import{homedir as homedir25}from"os";import{join as join30}from"path";var ORCHESTRATION_RULES_PATH=join30(homedir25(),".claude","rules","genie-orchestration.md"),LOCAL_BIN=join30(homedir25(),".local","bin"),SYMLINKS=["genie","term"];function isGenieSymlink(path3){try{if(!existsSync24(path3))return!1;if(!lstatSync(path3).isSymbolicLink())return!1;return!0}catch{return!1}}function removeSymlinks(){let removed=[];for(let name of SYMLINKS){let symlinkPath=join30(LOCAL_BIN,name);if(isGenieSymlink(symlinkPath))try{unlinkSync8(symlinkPath),removed.push(name)}catch{}}return removed}function tryRemoveStep(label,successMsg,fn){console.log(`\x1B[2m${label}\x1B[0m`);try{fn(),console.log(` \x1B[32m+\x1B[0m ${successMsg}`)}catch(error){let message=error instanceof Error?error.message:String(error);console.log(` \x1B[33m!\x1B[0m ${label.replace("...","")} failed: ${message}`)}}function performUninstall(hasHookScript,existingSymlinks,genieDir,hasGenieDir){if(hasHookScript)tryRemoveStep("Removing hook script...","Hook script removed",()=>removeHookScript());if(existingSymlinks.length>0){console.log("\x1B[2mRemoving symlinks...\x1B[0m");let removed=removeSymlinks();if(removed.length>0)console.log(` \x1B[32m+\x1B[0m Removed: ${removed.join(", ")}`)}if(existsSync24(ORCHESTRATION_RULES_PATH))tryRemoveStep("Removing orchestration rules...","Orchestration rules removed (~/.claude/rules/genie-orchestration.md)",()=>unlinkSync8(ORCHESTRATION_RULES_PATH));if(hasGenieDir)tryRemoveStep("Removing genie directory...","Directory removed",()=>rmSync2(genieDir,{recursive:!0,force:!0}))}async function uninstallCommand(){console.log(),console.log("\x1B[1m\x1B[33m Uninstall Genie CLI\x1B[0m"),console.log();let genieDir=getGenieDir(),hasGenieDir=existsSync24(genieDir),hasHookScript=hookScriptExists(),hasOrchestrationRules=existsSync24(ORCHESTRATION_RULES_PATH),existingSymlinks=SYMLINKS.filter((name)=>isGenieSymlink(join30(LOCAL_BIN,name)));if(console.log("\x1B[2mThis will remove:\x1B[0m"),hasHookScript)console.log(" \x1B[31m-\x1B[0m Hook script (~/.claude/hooks/genie-bash-hook.sh)");if(hasOrchestrationRules)console.log(" \x1B[31m-\x1B[0m Orchestration rules (~/.claude/rules/genie-orchestration.md)");if(hasGenieDir)console.log(` \x1B[31m-\x1B[0m Genie directory (${contractPath(genieDir)})`);if(existingSymlinks.length>0)console.log(` \x1B[31m-\x1B[0m Symlinks from ~/.local/bin: ${existingSymlinks.join(", ")}`);if(console.log(),!hasGenieDir&&!hasHookScript&&!hasOrchestrationRules&&existingSymlinks.length===0){console.log("\x1B[33mNothing to uninstall.\x1B[0m"),console.log();return}if(!await esm_default4({message:"Are you sure you want to uninstall Genie CLI?",default:!1})){console.log(),console.log("\x1B[2mUninstall cancelled.\x1B[0m"),console.log();return}console.log(),performUninstall(hasHookScript,existingSymlinks,genieDir,hasGenieDir),console.log(),console.log("\x1B[32m+\x1B[0m Genie CLI uninstalled."),console.log(),console.log("\x1B[2mNote: If you installed via npm/bun, also run:\x1B[0m"),console.log(" \x1B[36mbun remove -g @automagik/genie\x1B[0m"),console.log(" \x1B[2mor\x1B[0m"),console.log(" \x1B[36mnpm uninstall -g @automagik/genie\x1B[0m"),console.log()}init_genie_config2();import{execSync as execSync4,spawn as spawn3}from"child_process";import{chmodSync as chmodSync2,closeSync as closeSync3,copyFileSync as copyFileSync3,existsSync as existsSync25,mkdirSync as mkdirSync13,openSync as openSync3,readFileSync as readFileSync17,readSync as readSync2,readdirSync as readdirSync8,rmSync as rmSync3,statSync as statSync7,writeFileSync as writeFileSync11}from"fs";import{chmod,copyFile,mkdir as mkdir5,unlink as unlink2}from"fs/promises";import{homedir as homedir26}from"os";import{join as join31}from"path";var GENIE_HOME2=process.env.GENIE_HOME||join31(homedir26(),".genie"),GENIE_SRC=join31(GENIE_HOME2,"src"),GENIE_BIN=join31(GENIE_HOME2,"bin"),LOCAL_BIN2=join31(homedir26(),".local","bin"),TRUTHY=new Set(["1","true","yes","on"]),UPDATE_DIAGNOSTIC_SCHEMA_VERSION=1;function log(message){console.log(`\x1B[32m\u25B8\x1B[0m ${message}`)}function success(message){console.log(`\x1B[32m\u2714\x1B[0m ${message}`)}function error(message){console.log(`\x1B[31m\u2716\x1B[0m ${message}`)}function formatDuration2(ms){if(ms<1000)return`${ms}ms`;return`${(ms/1000).toFixed(1)}s`}function isTruthyEnv(value){return value!==void 0&&TRUTHY.has(value.trim().toLowerCase())}async function withTemporaryEnv(key,value,fn){let previous=process.env[key];process.env[key]=value;try{return await fn()}finally{if(previous===void 0)delete process.env[key];else process.env[key]=previous}}function safeExec(command,timeoutMs=1500){try{return execSync4(command,{encoding:"utf-8",stdio:["ignore","pipe","pipe"],timeout:timeoutMs}).trim()}catch(err){let stdout=err.stdout;if(typeof stdout==="string"&&stdout.trim())return stdout.trim();return""}}function safeRead(path3,maxChars=4000){try{let value=readFileSync17(path3,"utf-8");if(value.length<=maxChars)return value;return value.slice(value.length-maxChars)}catch{return null}}function tailLines(path3,maxBytes=64000,maxLines=200){let fd=null;try{let stat4=statSync7(path3),bytesToRead=Math.min(stat4.size,maxBytes),buffer2=Buffer.alloc(bytesToRead);return fd=openSync3(path3,"r"),readSync2(fd,buffer2,0,bytesToRead,Math.max(0,stat4.size-bytesToRead)),buffer2.toString("utf-8").split(/\r?\n/).map((line)=>line.trim()).filter(Boolean).slice(-maxLines)}catch{return[]}finally{if(fd!==null)try{closeSync3(fd)}catch{}}}function summarizeJsonlSignals(path3){let signals2=new Map;for(let line of tailLines(path3))try{let event=JSON.parse(line),level=typeof event.level==="string"?event.level:"unknown";if(level!=="error"&&level!=="warn")continue;let name=typeof event.event==="string"?event.event:"unknown",key=`${level}:${name}`,existing=signals2.get(key)??{level,event:name,count:0};if(existing.count++,typeof event.timestamp==="string")existing.lastTimestamp=event.timestamp;if(typeof event.error==="string")existing.lastError=event.error;signals2.set(key,existing)}catch{}return[...signals2.values()].sort((a,b2)=>b2.count-a.count).slice(0,10)}async function collectUpdateDiagnostics(ctx,maintenance){let logsDir=join31(GENIE_HOME2,"logs");mkdirSync13(logsDir,{recursive:!0});let generatedAt=new Date().toISOString(),safeStamp=generatedAt.replace(/[:.]/g,"-"),path3=join31(logsDir,`update-diagnostics-${safeStamp}.json`),schedulerLog=join31(logsDir,"scheduler.log"),tuiCrashLog=join31(logsDir,"tui-crash.log"),signals2=summarizeJsonlSignals(schedulerLog),diagnostics={schemaVersion:UPDATE_DIAGNOSTIC_SCHEMA_VERSION,generatedAt,update:ctx,runtime:{platform:process.platform,arch:process.arch,cwd:process.cwd(),node:process.version,bun:(await runCommandSilent("bun",["--version"])).output.trim()||null,npm:(await runCommandSilent("npm",["--version"])).output.trim()||null,genie:{which:(await runCommandSilent("which",["genie"])).output.trim()||null,tuiDisabled:isTruthyEnv(process.env.GENIE_TUI_DISABLE),updateSkipMaintenance:isTruthyEnv(process.env.GENIE_UPDATE_SKIP_MAINTENANCE)}},paths:{genieHome:GENIE_HOME2,logsDir,servePid:safeRead(join31(GENIE_HOME2,"serve.pid"),200),pgservePort:safeRead(join31(GENIE_HOME2,"pgserve.port"),200),schedulerLog,tuiCrashLog},processSnapshot:{genie:safeExec("ps -axo pid,ppid,pgid,stat,pcpu,pmem,etime,command -r | rg -i 'dist/genie.js|/src/genie.ts|pgserve|postgres -D .*\\.genie/data/pgserve|tmux -L genie-tui|bun' || true",2000)||null,tuiTmux:safeExec("tmux -L genie-tui ls 2>/dev/null || true",1000)||null},maintenance:{...maintenance,pgAutostartDisabled:!0,legend:{"[ok]":"healthy","[fix]":"fixed during maintenance","[--]":"skipped/non-blocking","[!!]":"operator action needed; update still completed"}},recentLogSignals:{scheduler:signals2,schedulerTail:tailLines(schedulerLog,32000,80),tuiCrashTail:tailLines(tuiCrashLog,32000,80)}};return writeFileSync11(path3,`${JSON.stringify(diagnostics,null,2)}
3856
+ \u2026[truncated]`:body;try{let{emitEvent:emitEvent2}=await Promise.resolve().then(() => (init_emit(),exports_emit));emitEvent2("error.raised",{error_class:"TuiCrash",message:truncated,subsystem:"tui",severity:"error",retryable:!0})}catch{}}async function recordTuiLaunchBreadcrumb(){try{let logsDir=join84(genieHome6(),"logs");mkdirSync29(logsDir,{recursive:!0});let logPath=join84(logsDir,"tui-crash.log");await ingestPreviousRunCrash(logPath);let ts3=new Date().toISOString(),line=`${TUI_CRASH_LOG_BANNER_PREFIX}${ts3} pid=${process.pid} platform=${process.platform} arch=${process.arch} ---
3857
+ `;appendFileSync4(logPath,line,{mode:420})}catch{}}async function launchTui(){await recordTuiLaunchBreadcrumb();let{renderNav:renderNav2}=await init_render().then(() => exports_render);await renderNav2()}var TUI_CRASH_LOG_BANNER_PREFIX="--- tui-launch ",TUI_CRASH_LOG_RECOVERY_MAX_BYTES=65536,TUI_CRASH_LOG_RECOVERY_MAX_MSG_CHARS=3000;var init_tui=()=>{};var exports_resolve_agent_cwd={};__export(exports_resolve_agent_cwd,{resolveAgentFromCwd:()=>resolveAgentFromCwd});import{existsSync as existsSync68}from"fs";import{basename as basename16,dirname as dirname26,join as join85,relative as relative10,sep as sep3}from"path";function isRelativeWithin(rel,original){return!rel.startsWith("..")&&rel!==original}function resolveFromCanonicalDir(cwd,agentsDir){let relToAgents=relative10(agentsDir,cwd);if(!isRelativeWithin(relToAgents,cwd))return null;let segments=relToAgents.split(sep3).filter(Boolean);if(segments.length===0)return null;let agentName=segments[0];if(!existsSync68(join85(agentsDir,agentName,"AGENTS.md")))return null;let source=segments.length===1?"exact":"parent";return{agent:agentName,source}}function resolveFromWalkUp(cwd,workspaceRoot){let wsRel=relative10(workspaceRoot,cwd);if(!isRelativeWithin(wsRel,cwd))return null;let current=cwd;while(current!==workspaceRoot&&current!==dirname26(current)){if(existsSync68(join85(current,"AGENTS.md")))return{agent:basename16(current),source:"parent"};current=dirname26(current)}return null}function resolveAgentFromCwd(cwd,workspaceRoot){return resolveFromCanonicalDir(cwd,join85(workspaceRoot,"agents"))??resolveFromWalkUp(cwd,workspaceRoot)??{agent:"genie",source:"default"}}var init_resolve_agent_cwd=()=>{};var import__=__toESM(require_commander(),1),{program,createCommand,createArgument,createOption,CommanderError,InvalidArgumentError,InvalidOptionArgumentError,Command,Argument,Option,Help}=import__.default;init_doctor();init_setup();init_shortcuts();import{existsSync as existsSync23}from"fs";import{homedir as homedir24}from"os";import{join as join29}from"path";async function shortcutsShowCommand(){displayShortcuts();let home=homedir24(),tmuxConf=join29(home,".tmux.conf"),zshrc=join29(home,".zshrc"),bashrc=join29(home,".bashrc");if(console.log("Installation status:"),isShortcutsInstalled(tmuxConf))console.log(" \x1B[32m\u2713\x1B[0m tmux.conf");else console.log(" \x1B[33m-\x1B[0m tmux.conf");let shellRc=existsSync23(zshrc)?zshrc:bashrc;if(isShortcutsInstalled(shellRc))console.log(` \x1B[32m\u2713\x1B[0m ${shellRc.replace(home,"~")}`);else console.log(` \x1B[33m-\x1B[0m ${shellRc.replace(home,"~")}`);console.log(),console.log("Run \x1B[36mgenie shortcuts install\x1B[0m to install shortcuts."),console.log("Run \x1B[36mgenie shortcuts uninstall\x1B[0m to remove shortcuts."),console.log()}async function shortcutsInstallCommand(){await installShortcuts()}async function shortcutsUninstallCommand(){await uninstallShortcuts()}init_esm14();init_claude_settings();init_genie_config2();import{existsSync as existsSync24,lstatSync,rmSync as rmSync2,unlinkSync as unlinkSync8}from"fs";import{homedir as homedir25}from"os";import{join as join30}from"path";var ORCHESTRATION_RULES_PATH=join30(homedir25(),".claude","rules","genie-orchestration.md"),LOCAL_BIN=join30(homedir25(),".local","bin"),SYMLINKS=["genie","term"];function isGenieSymlink(path3){try{if(!existsSync24(path3))return!1;if(!lstatSync(path3).isSymbolicLink())return!1;return!0}catch{return!1}}function removeSymlinks(){let removed=[];for(let name of SYMLINKS){let symlinkPath=join30(LOCAL_BIN,name);if(isGenieSymlink(symlinkPath))try{unlinkSync8(symlinkPath),removed.push(name)}catch{}}return removed}function tryRemoveStep(label,successMsg,fn){console.log(`\x1B[2m${label}\x1B[0m`);try{fn(),console.log(` \x1B[32m+\x1B[0m ${successMsg}`)}catch(error){let message=error instanceof Error?error.message:String(error);console.log(` \x1B[33m!\x1B[0m ${label.replace("...","")} failed: ${message}`)}}function performUninstall(hasHookScript,existingSymlinks,genieDir,hasGenieDir){if(hasHookScript)tryRemoveStep("Removing hook script...","Hook script removed",()=>removeHookScript());if(existingSymlinks.length>0){console.log("\x1B[2mRemoving symlinks...\x1B[0m");let removed=removeSymlinks();if(removed.length>0)console.log(` \x1B[32m+\x1B[0m Removed: ${removed.join(", ")}`)}if(existsSync24(ORCHESTRATION_RULES_PATH))tryRemoveStep("Removing orchestration rules...","Orchestration rules removed (~/.claude/rules/genie-orchestration.md)",()=>unlinkSync8(ORCHESTRATION_RULES_PATH));if(hasGenieDir)tryRemoveStep("Removing genie directory...","Directory removed",()=>rmSync2(genieDir,{recursive:!0,force:!0}))}async function uninstallCommand(){console.log(),console.log("\x1B[1m\x1B[33m Uninstall Genie CLI\x1B[0m"),console.log();let genieDir=getGenieDir(),hasGenieDir=existsSync24(genieDir),hasHookScript=hookScriptExists(),hasOrchestrationRules=existsSync24(ORCHESTRATION_RULES_PATH),existingSymlinks=SYMLINKS.filter((name)=>isGenieSymlink(join30(LOCAL_BIN,name)));if(console.log("\x1B[2mThis will remove:\x1B[0m"),hasHookScript)console.log(" \x1B[31m-\x1B[0m Hook script (~/.claude/hooks/genie-bash-hook.sh)");if(hasOrchestrationRules)console.log(" \x1B[31m-\x1B[0m Orchestration rules (~/.claude/rules/genie-orchestration.md)");if(hasGenieDir)console.log(` \x1B[31m-\x1B[0m Genie directory (${contractPath(genieDir)})`);if(existingSymlinks.length>0)console.log(` \x1B[31m-\x1B[0m Symlinks from ~/.local/bin: ${existingSymlinks.join(", ")}`);if(console.log(),!hasGenieDir&&!hasHookScript&&!hasOrchestrationRules&&existingSymlinks.length===0){console.log("\x1B[33mNothing to uninstall.\x1B[0m"),console.log();return}if(!await esm_default4({message:"Are you sure you want to uninstall Genie CLI?",default:!1})){console.log(),console.log("\x1B[2mUninstall cancelled.\x1B[0m"),console.log();return}console.log(),performUninstall(hasHookScript,existingSymlinks,genieDir,hasGenieDir),console.log(),console.log("\x1B[32m+\x1B[0m Genie CLI uninstalled."),console.log(),console.log("\x1B[2mNote: If you installed via npm/bun, also run:\x1B[0m"),console.log(" \x1B[36mbun remove -g @automagik/genie\x1B[0m"),console.log(" \x1B[2mor\x1B[0m"),console.log(" \x1B[36mnpm uninstall -g @automagik/genie\x1B[0m"),console.log()}init_genie_config2();import{execSync as execSync4,spawn as spawn3}from"child_process";import{chmodSync as chmodSync2,closeSync as closeSync3,copyFileSync as copyFileSync3,existsSync as existsSync25,mkdirSync as mkdirSync13,openSync as openSync3,readFileSync as readFileSync17,readSync as readSync2,readdirSync as readdirSync8,rmSync as rmSync3,statSync as statSync7,writeFileSync as writeFileSync11}from"fs";import{chmod,copyFile,mkdir as mkdir5,unlink as unlink2}from"fs/promises";import{homedir as homedir26}from"os";import{join as join31}from"path";var GENIE_HOME2=process.env.GENIE_HOME||join31(homedir26(),".genie"),GENIE_SRC=join31(GENIE_HOME2,"src"),GENIE_BIN=join31(GENIE_HOME2,"bin"),LOCAL_BIN2=join31(homedir26(),".local","bin"),TRUTHY=new Set(["1","true","yes","on"]),UPDATE_DIAGNOSTIC_SCHEMA_VERSION=1;function log(message){console.log(`\x1B[32m\u25B8\x1B[0m ${message}`)}function success(message){console.log(`\x1B[32m\u2714\x1B[0m ${message}`)}function error(message){console.log(`\x1B[31m\u2716\x1B[0m ${message}`)}function formatDuration2(ms){if(ms<1000)return`${ms}ms`;return`${(ms/1000).toFixed(1)}s`}function isTruthyEnv(value){return value!==void 0&&TRUTHY.has(value.trim().toLowerCase())}async function withTemporaryEnv(key,value,fn){let previous=process.env[key];process.env[key]=value;try{return await fn()}finally{if(previous===void 0)delete process.env[key];else process.env[key]=previous}}function safeExec(command,timeoutMs=1500){try{return execSync4(command,{encoding:"utf-8",stdio:["ignore","pipe","pipe"],timeout:timeoutMs}).trim()}catch(err){let stdout=err.stdout;if(typeof stdout==="string"&&stdout.trim())return stdout.trim();return""}}function safeRead(path3,maxChars=4000){try{let value=readFileSync17(path3,"utf-8");if(value.length<=maxChars)return value;return value.slice(value.length-maxChars)}catch{return null}}function tailLines(path3,maxBytes=64000,maxLines=200){let fd=null;try{let stat4=statSync7(path3),bytesToRead=Math.min(stat4.size,maxBytes),buffer2=Buffer.alloc(bytesToRead);return fd=openSync3(path3,"r"),readSync2(fd,buffer2,0,bytesToRead,Math.max(0,stat4.size-bytesToRead)),buffer2.toString("utf-8").split(/\r?\n/).map((line)=>line.trim()).filter(Boolean).slice(-maxLines)}catch{return[]}finally{if(fd!==null)try{closeSync3(fd)}catch{}}}function summarizeJsonlSignals(path3){let signals2=new Map;for(let line of tailLines(path3))try{let event=JSON.parse(line),level=typeof event.level==="string"?event.level:"unknown";if(level!=="error"&&level!=="warn")continue;let name=typeof event.event==="string"?event.event:"unknown",key=`${level}:${name}`,existing=signals2.get(key)??{level,event:name,count:0};if(existing.count++,typeof event.timestamp==="string")existing.lastTimestamp=event.timestamp;if(typeof event.error==="string")existing.lastError=event.error;signals2.set(key,existing)}catch{}return[...signals2.values()].sort((a,b2)=>b2.count-a.count).slice(0,10)}async function collectUpdateDiagnostics(ctx,maintenance){let logsDir=join31(GENIE_HOME2,"logs");mkdirSync13(logsDir,{recursive:!0});let generatedAt=new Date().toISOString(),safeStamp=generatedAt.replace(/[:.]/g,"-"),path3=join31(logsDir,`update-diagnostics-${safeStamp}.json`),schedulerLog=join31(logsDir,"scheduler.log"),tuiCrashLog=join31(logsDir,"tui-crash.log"),signals2=summarizeJsonlSignals(schedulerLog),diagnostics={schemaVersion:UPDATE_DIAGNOSTIC_SCHEMA_VERSION,generatedAt,update:ctx,runtime:{platform:process.platform,arch:process.arch,cwd:process.cwd(),node:process.version,bun:(await runCommandSilent("bun",["--version"])).output.trim()||null,npm:(await runCommandSilent("npm",["--version"])).output.trim()||null,genie:{which:(await runCommandSilent("which",["genie"])).output.trim()||null,tuiDisabled:isTruthyEnv(process.env.GENIE_TUI_DISABLE),updateSkipMaintenance:isTruthyEnv(process.env.GENIE_UPDATE_SKIP_MAINTENANCE)}},paths:{genieHome:GENIE_HOME2,logsDir,servePid:safeRead(join31(GENIE_HOME2,"serve.pid"),200),pgservePort:safeRead(join31(GENIE_HOME2,"pgserve.port"),200),schedulerLog,tuiCrashLog},processSnapshot:{genie:safeExec("ps -axo pid,ppid,pgid,stat,pcpu,pmem,etime,command -r | rg -i 'dist/genie.js|/src/genie.ts|pgserve|postgres -D .*\\.genie/data/pgserve|tmux -L genie-tui|bun' || true",2000)||null,tuiTmux:safeExec("tmux -L genie-tui ls 2>/dev/null || true",1000)||null},maintenance:{...maintenance,pgAutostartDisabled:!0,legend:{"[ok]":"healthy","[fix]":"fixed during maintenance","[--]":"skipped/non-blocking","[!!]":"operator action needed; update still completed"}},recentLogSignals:{scheduler:signals2,schedulerTail:tailLines(schedulerLog,32000,80),tuiCrashTail:tailLines(tuiCrashLog,32000,80)}};return writeFileSync11(path3,`${JSON.stringify(diagnostics,null,2)}
3858
3858
  `),{path:path3,signals:signals2}}async function runCommand(command,args,cwd){return new Promise((resolve4)=>{let output=[],child=spawn3(command,args,{cwd,stdio:["inherit","pipe","pipe"],env:{...process.env,FORCE_COLOR:"1"}});child.stdout?.on("data",(data)=>{let str2=data.toString();output.push(str2),process.stdout.write(str2)}),child.stderr?.on("data",(data)=>{let str2=data.toString();output.push(str2),process.stderr.write(str2)}),child.on("close",(code)=>{resolve4({success:code===0,output:output.join("")})}),child.on("error",(err)=>{error(err.message),resolve4({success:!1,output:err.message})})})}async function getGitInfo(cwd){try{let branchResult=await runCommandSilent("git",["rev-parse","--abbrev-ref","HEAD"],cwd),commitResult=await runCommandSilent("git",["rev-parse","--short","HEAD"],cwd),dateResult=await runCommandSilent("git",["log","-1","--format=%ci"],cwd);if(branchResult.success&&commitResult.success&&dateResult.success)return{branch:branchResult.output.trim(),commit:commitResult.output.trim(),commitDate:dateResult.output.trim().split(" ")[0]}}catch{}return null}async function runCommandSilent(command,args,cwd,timeoutMs=4000){return new Promise((resolve4)=>{let output=[],settled=!1,child=spawn3(command,args,{cwd,stdio:["inherit","pipe","pipe"]}),timer2=setTimeout(()=>{if(settled)return;settled=!0,child.kill("SIGTERM"),resolve4({success:!1,output:`Timed out after ${timeoutMs}ms`})},timeoutMs);child.stdout?.on("data",(data)=>{output.push(data.toString())}),child.stderr?.on("data",(data)=>{output.push(data.toString())}),child.on("close",(code)=>{if(settled)return;settled=!0,clearTimeout(timer2),resolve4({success:code===0,output:output.join("")})}),child.on("error",(err)=>{if(settled)return;settled=!0,clearTimeout(timer2),resolve4({success:!1,output:err.message})})})}function detectFromBinaryPath(path3){let resolved=path3;try{resolved=__require("fs").realpathSync(path3)}catch{}if(resolved.includes(".bun"))return"bun";if(resolved.includes("node_modules"))return"npm";if(path3===join31(LOCAL_BIN2,"genie")||resolved.startsWith(GENIE_BIN))return"source";return null}async function detectInstallationType(){let whichResult=await runCommandSilent("which",["genie"]);if(whichResult.success){let detected=detectFromBinaryPath(whichResult.output.trim());if(detected)return detected}if(genieConfigExists())try{let config=await loadGenieConfig();if(config.installMethod)return config.installMethod}catch{}if(existsSync25(join31(GENIE_SRC,".git")))return"source";return(await runCommandSilent("which",["bun"])).success?"bun":"npm"}async function updateViaBun(channel){try{__require("fs").unlinkSync(join31(homedir26(),".bun","install","global","bun.lock"))}catch{}if(log(`Updating via bun (channel: ${channel})...`),!(await runCommand("bun",["add","-g",`@automagik/genie@${channel}`])).success)return error("Failed to update via bun"),!1;return console.log(),success(`Genie CLI updated via bun (${channel})!`),!0}async function updateViaNpm(channel){if(log(`Updating via npm (channel: ${channel})...`),!(await runCommand("npm",["install","-g",`@automagik/genie@${channel}`])).success)return error("Failed to update via npm"),!1;return console.log(),success(`Genie CLI updated via npm (${channel})!`),!0}async function detectGlobalInstalls(){let found=new Set,[npmResult,bunResult]=await Promise.all([runCommandSilent("npm",["list","-g","@automagik/genie"]),runCommandSilent("bun",["pm","ls","-g"])]);if(npmResult.success&&!npmResult.output.includes("(empty)"))found.add("npm");if(bunResult.success&&bunResult.output.includes("@automagik/genie"))found.add("bun");return found}async function updateSource(){if(!existsSync25(GENIE_SRC))error(`Source install path not found: ${GENIE_SRC}`),console.error(" Detection picked the source-install path, but the directory does not exist."),console.error(" This usually means a stale install hint (config or ~/.genie/src/.git) is"),console.error(" pointing somewhere genuine. Either:"),console.error(` 1. Re-clone the source: git clone https://github.com/automagik-dev/genie ${GENIE_SRC}`),console.error(" 2. Update via package manager instead: genie update --next --via bun"),console.error(" 3. Inspect detection: genie doctor --update-detection"),process.exit(1);if(!existsSync25(join31(GENIE_SRC,".git")))error(`Source install path is not a git checkout: ${GENIE_SRC}`),console.error(` ${GENIE_SRC} exists but has no .git/. Cannot run \`git fetch\` from it.`),console.error(` Either delete ${GENIE_SRC} and re-clone, or update via package manager:`),console.error(" genie update --next --via bun"),process.exit(1);let beforeInfo=await getGitInfo(GENIE_SRC);if(beforeInfo)console.log(`Current: \x1B[2m${beforeInfo.branch}@${beforeInfo.commit} (${beforeInfo.commitDate})\x1B[0m`),console.log();if(log("Fetching latest changes..."),!(await runCommand("git",["fetch","origin"],GENIE_SRC)).success)error("Failed to fetch from origin"),process.exit(1);if(log("Resetting to origin/main..."),!(await runCommand("git",["reset","--hard","origin/main"],GENIE_SRC)).success)error("Failed to reset to origin/main"),process.exit(1);console.log();let afterInfo=await getGitInfo(GENIE_SRC);if(beforeInfo&&afterInfo&&beforeInfo.commit===afterInfo.commit){success("Already up to date!"),console.log();return}if(log("Installing dependencies..."),!(await runCommand("bun",["install"],GENIE_SRC)).success)error("Failed to install dependencies"),process.exit(1);if(console.log(),log("Building..."),!(await runCommand("bun",["run","build"],GENIE_SRC)).success)error("Failed to build"),process.exit(1);console.log(),log("Installing binaries...");try{await mkdir5(GENIE_BIN,{recursive:!0}),await mkdir5(LOCAL_BIN2,{recursive:!0});let binaries=["genie.js","term.js"],names=["genie","term"];for(let i2=0;i2<binaries.length;i2++){let src=join31(GENIE_SRC,"dist",binaries[i2]),binDest=join31(GENIE_BIN,binaries[i2]),linkDest=join31(LOCAL_BIN2,names[i2]);await copyFile(src,binDest),await chmod(binDest,493),await symlinkOrCopy(binDest,linkDest)}for(let legacy of["claudio.js","claudio"]){let legacyBin=join31(GENIE_BIN,legacy),legacyLink=join31(LOCAL_BIN2,legacy);try{await unlink2(legacyBin)}catch{}try{await unlink2(legacyLink)}catch{}}success("Binaries installed")}catch(err){error(`Failed to install binaries: ${err}`),process.exit(1)}if(console.log(),console.log("\x1B[2m\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\x1B[0m"),success("Genie CLI updated successfully!"),console.log(),afterInfo)console.log(`Version: \x1B[36m${afterInfo.branch}@${afterInfo.commit}\x1B[0m (${afterInfo.commitDate})`),console.log()}async function symlinkOrCopy(src,dest){let{symlink:symlink2,unlink:unlink3}=await import("fs/promises");try{if(existsSync25(dest))await unlink3(dest);await symlink2(src,dest)}catch{await copyFile(src,dest)}}function copyDirSync(src,dest){mkdirSync13(dest,{recursive:!0});for(let entry2 of readdirSync8(src,{withFileTypes:!0})){let srcPath=join31(src,entry2.name),destPath=join31(dest,entry2.name);if(entry2.isDirectory())copyDirSync(srcPath,destPath);else copyFileSync3(srcPath,destPath)}}async function resolveGlobalPkgDir(installType){if(installType==="bun"){let bunPath=join31(homedir26(),".bun","install","global","node_modules","@automagik","genie");if(existsSync25(bunPath))return bunPath}if(installType==="npm"){let npmRootResult=await runCommandSilent("npm",["root","-g"]);if(npmRootResult.success){let npmPath=join31(npmRootResult.output.trim(),"@automagik","genie");if(existsSync25(npmPath))return npmPath}}let bunFallback=join31(homedir26(),".bun","install","global","node_modules","@automagik","genie");if(existsSync25(bunFallback))return bunFallback;let npmRootFallback=await runCommandSilent("npm",["root","-g"]);if(npmRootFallback.success){let npmPath=join31(npmRootFallback.output.trim(),"@automagik","genie");if(existsSync25(npmPath))return npmPath}return null}function updatePluginRegistry(claudePlugins,cacheDir,version){let registryPath=join31(claudePlugins,"installed_plugins.json");try{if(!existsSync25(registryPath))return;let registry=JSON.parse(readFileSync17(registryPath,"utf-8")),entries=registry.plugins?.["genie@automagik"];if(!Array.isArray(entries))return;for(let entry2 of entries)if(entry2.scope==="user")entry2.installPath=cacheDir,entry2.version=version,entry2.lastUpdated=new Date().toISOString();writeFileSync11(registryPath,JSON.stringify(registry,null,2))}catch(err){log(`Registry update failed (non-fatal): ${err}`)}}function syncTmuxConf(tmuxScriptsSrc){mkdirSync13(GENIE_HOME2,{recursive:!0});let tmuxConfSrc=join31(tmuxScriptsSrc,"genie.tmux.conf"),tmuxConfDest=join31(GENIE_HOME2,"tmux.conf");if(existsSync25(tmuxConfSrc))try{copyFileSync3(tmuxConfSrc,tmuxConfDest),success(`Installed tmux config to ${tmuxConfDest}`);try{let{tmuxBin:tmuxBin2}=(init_ensure_tmux(),__toCommonJS(exports_ensure_tmux));execSync4(`${tmuxBin2()} -L genie source-file '${tmuxConfDest}'`,{stdio:"ignore"}),success("Reloaded genie tmux server configuration")}catch{}}catch{}let tuiConfSrc=join31(tmuxScriptsSrc,"tui-tmux.conf"),tuiConfDest=join31(GENIE_HOME2,"tui-tmux.conf");if(existsSync25(tuiConfSrc))try{copyFileSync3(tuiConfSrc,tuiConfDest),success(`Installed TUI tmux config to ${tuiConfDest}`)}catch{}let themeSrc=join31(tmuxScriptsSrc,".generated.theme.conf"),themeDest=join31(GENIE_HOME2,".generated.theme.conf");if(existsSync25(themeSrc))try{copyFileSync3(themeSrc,themeDest),success(`Installed tmux theme to ${themeDest}`)}catch{}let osc52Src=join31(tmuxScriptsSrc,"osc52-copy.sh"),osc52Dest=join31(GENIE_HOME2,"scripts","osc52-copy.sh");if(existsSync25(osc52Src))try{copyFileSync3(osc52Src,osc52Dest),chmodSync2(osc52Dest,493),success(`Installed OSC 52 clipboard helper to ${osc52Dest}`)}catch{}}function syncTmuxScripts(globalPkgDir){let tmuxScriptsSrc=join31(globalPkgDir,"scripts","tmux");if(!existsSync25(tmuxScriptsSrc))return;let scriptsDir=join31(GENIE_HOME2,"scripts");mkdirSync13(scriptsDir,{recursive:!0});let scriptCount=0;for(let entry2 of readdirSync8(tmuxScriptsSrc))if(entry2.endsWith(".sh")||entry2==="genie.tmux.conf"||entry2==="tui-tmux.conf"||entry2===".generated.theme.conf"){let src=join31(tmuxScriptsSrc,entry2),dest=join31(scriptsDir,entry2);copyFileSync3(src,dest);try{chmodSync2(dest,entry2.endsWith(".sh")?493:420)}catch{}scriptCount++}if(scriptCount>0)success(`Refreshed ${scriptCount} tmux scripts at ${scriptsDir}`);syncTmuxConf(tmuxScriptsSrc)}function syncMarketplaceVersion(claudePlugins,version){let marketplacePath=join31(claudePlugins,"marketplaces","automagik",".claude-plugin","marketplace.json");try{if(!existsSync25(marketplacePath))return;let data=JSON.parse(readFileSync17(marketplacePath,"utf-8"));if(Array.isArray(data.plugins)){for(let plugin of data.plugins)if(plugin.name==="genie")plugin.version=version}writeFileSync11(marketplacePath,JSON.stringify(data,null,2)),success(`Updated marketplace.json to v${version}`)}catch(err){log(`Marketplace version update failed (non-fatal): ${err}`)}}function syncPluginPackageVersion(claudePlugins,version){let pkgPath=join31(claudePlugins,"marketplaces","automagik","plugins","genie","package.json");try{if(!existsSync25(pkgPath))return;let data=JSON.parse(readFileSync17(pkgPath,"utf-8"));data.version=version,writeFileSync11(pkgPath,JSON.stringify(data,null,2)),success(`Updated plugin package.json to v${version}`)}catch(err){log(`Plugin package.json update failed (non-fatal): ${err}`)}}function syncSkillsSymlink(claudePlugins,version){let skillsLink=join31(claudePlugins,"marketplaces","automagik","plugins","genie","skills"),cacheSkills=join31("..","..","..","..","cache","automagik","genie",version,"skills");try{let{symlinkSync,unlinkSync:unlinkSync9,lstatSync:lstatSync2}=__require("fs");try{lstatSync2(skillsLink),unlinkSync9(skillsLink)}catch{}symlinkSync(cacheSkills,skillsLink),success(`Skills symlink \u2192 cache/${version}/skills`)}catch(err){log(`Skills symlink update failed (non-fatal): ${err}`)}}async function syncPlugin(installType){log("Syncing Claude Code plugin...");let globalPkgDir=await resolveGlobalPkgDir(installType);if(!globalPkgDir)return log("Could not find installed package \u2014 skipping plugin sync"),{skippedReason:"installed package not found"};let pluginSrc=join31(globalPkgDir,"plugins","genie");if(!existsSync25(pluginSrc))return log("Plugin source not found in package \u2014 skipping plugin sync"),{globalPkgDir,skippedReason:"plugin source not found in package"};let version;try{version=JSON.parse(readFileSync17(join31(globalPkgDir,"package.json"),"utf-8")).version}catch{return log("Could not read package version \u2014 skipping plugin sync"),{globalPkgDir,skippedReason:"could not read package version"}}let claudePlugins=join31(homedir26(),".claude","plugins"),cacheDir=join31(claudePlugins,"cache","automagik","genie",version);try{if(existsSync25(cacheDir))rmSync3(cacheDir,{recursive:!0,force:!0});copyDirSync(pluginSrc,cacheDir);let skillsSrc=join31(globalPkgDir,"skills");if(existsSync25(skillsSrc)&&!existsSync25(join31(cacheDir,"skills")))copyDirSync(skillsSrc,join31(cacheDir,"skills"))}catch(err){return error(`Failed to copy plugin: ${err}`),{version,globalPkgDir,cacheDir,skippedReason:`failed to copy plugin: ${err}`}}return updatePluginRegistry(claudePlugins,cacheDir,version),syncMarketplaceVersion(claudePlugins,version),syncPluginPackageVersion(claudePlugins,version),syncSkillsSymlink(claudePlugins,version),syncTmuxScripts(globalPkgDir),success(`Plugin synced to v${version}`),{version,globalPkgDir,cacheDir}}async function resolveChannel(options){if(options.next)return"next";if(options.stable)return"latest";if(genieConfigExists())try{let config=await loadGenieConfig();if(config.updateChannel)return config.updateChannel}catch{}return"latest"}async function persistChannel(channel){try{let config=await loadGenieConfig();config.updateChannel=channel,await saveGenieConfig(config)}catch{}}async function updateCommand(options={}){console.log(),console.log("\x1B[1m\uD83E\uDDDE Genie CLI Update\x1B[0m"),console.log("\x1B[2m\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\x1B[0m"),console.log();let channel=await resolveChannel(options);if(options.next||options.stable)await persistChannel(channel);let installType=await detectInstallationType();if(log(`Detected installation: ${installType}`),log(`Channel: ${channel}${channel==="next"?" (dev builds)":" (stable)"}`),console.log(),installType==="unknown")error("No Genie CLI installation found"),console.log(),console.log("Install method not configured. Please reinstall genie:"),console.log("\x1B[36m curl -fsSL https://raw.githubusercontent.com/automagik-dev/genie/main/install.sh | bash\x1B[0m"),console.log(),process.exit(1);if(installType==="source"){await updateSource();return}let globalInstalls=await detectGlobalInstalls(),primaryMethod=installType;if(!(primaryMethod==="bun"?await updateViaBun(channel):await updateViaNpm(channel)))process.exit(1);let secondaryMethod=primaryMethod==="bun"?"npm":"bun";if(globalInstalls.has(secondaryMethod)){if(console.log(),log(`Also updating ${secondaryMethod}-global install...`),!(secondaryMethod==="bun"?await updateViaBun(channel):await updateViaNpm(channel)))error(`Secondary update via ${secondaryMethod} failed (non-blocking)`)}let plugin=await syncPlugin(installType);await runPostUpdateMaintenanceSafe(options,{channel,installType,primaryMethod,globalInstalls:[...globalInstalls].sort(),plugin})}function printPostUpdateMaintenanceIntro(){console.log(),log("Running post-update maintenance..."),console.log(" Purpose: make first launch after update fast and collect upgrade health signals."),console.log(" Checks: runtime partitions, watchdog status, session backfill drift, zombie rows, team config orphans."),console.log(" PG policy: read-only; uses an already-running pgserve when available and will not auto-start it."),console.log(" Legend: [ok]=healthy, [fix]=fixed, [--]=skipped/non-blocking, [!!]=operator action needed.")}async function runMaintenanceWithCapturedLines(maintenanceLines){let{runPostUpdateMaintenance:runPostUpdateMaintenance2}=await Promise.resolve().then(() => (init_doctor(),exports_doctor));await withTemporaryEnv("GENIE_PG_NO_AUTOSTART","1",()=>runPostUpdateMaintenance2({log:(line)=>{maintenanceLines.push(line),console.log(line)}}))}function printDiagnosticsSummary(diagnostics){if(log("Post-update diagnostics captured."),console.log(` Report: ${diagnostics.path}`),console.log(" Include this file when opening a GitHub issue; it contains install metadata, step output,"),console.log(" local process state, and recent scheduler/TUI log signals."),diagnostics.signals.length===0)return;console.log(" Recent scheduler signals:");for(let signal of diagnostics.signals.slice(0,3)){let errorDetail=signal.lastError?` \u2014 ${signal.lastError}`:"";console.log(` ${signal.level}:${signal.event} \xD7${signal.count}${errorDetail}`)}}async function capturePostUpdateDiagnostics(diagnosticsCtx,maintenance){if(!diagnosticsCtx)return;try{let diagnostics=await collectUpdateDiagnostics(diagnosticsCtx,maintenance);printDiagnosticsSummary(diagnostics)}catch(err){let msg=err instanceof Error?err.message:String(err);log(`Post-update diagnostics capture failed (non-fatal): ${msg}`)}}async function runPostUpdateMaintenanceSafe(options={},diagnosticsCtx){if(options.skipMaintenance||isTruthyEnv(process.env.GENIE_UPDATE_SKIP_MAINTENANCE)){log("Skipping post-update maintenance (requested).");return}let startedAt=Date.now(),maintenanceLines=[],outcome="completed",maintenanceError;try{printPostUpdateMaintenanceIntro(),await runMaintenanceWithCapturedLines(maintenanceLines),success(`Post-update maintenance complete (${formatDuration2(Date.now()-startedAt)}).`)}catch(err){outcome="failed",maintenanceError=err instanceof Error?err.message:String(err),error(`Post-update maintenance skipped: ${maintenanceError}`)}await capturePostUpdateDiagnostics(diagnosticsCtx,{outcome,durationMs:Date.now()-startedAt,lines:maintenanceLines,error:maintenanceError})}init_version();init_hooks();async function readStdin(){let chunks=[];for await(let chunk of Bun.stdin.stream())chunks.push(Buffer.from(chunk));return Buffer.concat(chunks).toString("utf-8")}async function dispatchAction(){process.env.GENIE_SKIP_DB_BOOT="1";let stdin=await readStdin();if(!stdin.trim())process.exit(0);let result2=await dispatch(stdin);if(result2)process.stdout.write(result2)}function registerHookNamespace(program2){program2.command("hook").description("Hook middleware for Claude Code integration").command("dispatch").description("Dispatch a CC hook event (reads JSON from stdin, writes decision to stdout)").action(dispatchAction)}init_audit();init_db();init_interactivity();init_otel_receiver();init_target_resolver();init_tmux();init_orchestrator();async function resolveOrcTarget(target){let resolved=await resolveTarget(target);return{paneId:resolved.paneId,session:resolved.session||target,label:formatResolvedLabel(resolved,target)}}async function sendTextChoice(paneId,text){await executeTmux2(`send-keys -t '${paneId}' End`),await sleep2(100),await executeTmux2(`send-keys -t '${paneId}' Enter`),await sleep2(100),await executeTmux2(`send-keys -t '${paneId}' ${shellEscape(text)}`),await sleep2(100),await executeTmux2(`send-keys -t '${paneId}' Enter`)}function findCurrentOption(output){let lines=stripAnsi(output).split(`
3859
3859
  `);for(let line of lines){let match=line.match(/^\s*\u276F\s*(\d+)\./);if(match)return Number.parseInt(match[1],10)}return 1}async function navigateToOption(paneId,targetOption,currentOption){let diff=targetOption-currentOption,key=diff>0?"Down":"Up";for(let i2=0;i2<Math.abs(diff);i2++)await executeTmux2(`send-keys -t '${paneId}' ${key}`),await sleep2(50);await sleep2(100),await executeTmux2(`send-keys -t '${paneId}' Enter`)}async function answerQuestion(target,choice){try{let{paneId,label}=await resolveOrcTarget(target),output=await capturePaneContent(paneId,50),state=detectState(output);if(state.type!=="question"){console.log(`No question pending (state: ${state.type})`);return}if(choice.startsWith("text:")){let text=choice.slice(5);await sendTextChoice(paneId,text),console.log(`Sent feedback: "${text.substring(0,50)}${text.length>50?"...":""}"`)}else if(/^\d+$/.test(choice)){let targetOption=Number.parseInt(choice,10);await navigateToOption(paneId,targetOption,findCurrentOption(output)),console.log(`Selected option ${targetOption} for ${label}`)}else await executeTmux2(`send-keys -t '${paneId}' '${choice}'`),console.log(`Sent '${choice}' to ${label}`)}catch(error2){let message=error2 instanceof Error?error2.message:String(error2);console.error(`Error: ${message}`),process.exit(1)}}function shellEscape(str2){return`"${str2.replace(/"/g,"\\\"").replace(/\$/g,"\\$")}"`}function sleep2(ms){return new Promise((resolve6)=>setTimeout(resolve6,ms))}function registerAgentAnswer(parent){parent.command("answer <name> <choice>").description('Answer a question for an agent (use "text:..." for text input)').action(async(name,choice)=>{try{await answerQuestion(name,choice)}catch(error2){let message=error2 instanceof Error?error2.message:String(error2);console.error(`Error: ${message}`),process.exit(1)}})}var _brief;async function getBrief(){if(!_brief)_brief=await Promise.resolve().then(() => (init_brief(),exports_brief));return _brief}async function handleBrief(options){let team=options.team??process.env.GENIE_TEAM;if(!team)console.error("Error: --team is required (or set GENIE_TEAM)"),process.exit(1);let agent=options.agent??process.env.GENIE_AGENT_NAME,briefService=await getBrief(),brief=await briefService.generateBrief({team,agent,since:options.since,repoPath:process.cwd()});console.log(briefService.formatBrief(brief))}function registerAgentBrief(parent){parent.command("brief").description("Show startup brief \u2014 aggregated context since last session").option("--team <name>","Team name (default: GENIE_TEAM)").option("--agent <name>","Agent name (default: GENIE_AGENT_NAME)").option("--since <iso>","Start timestamp (default: last executor end)").action(async(options)=>{try{await handleBrief(options)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}})}init_agent_directory();init_agent_sync();init_builtin_agents();init_genie_config2();async function showEntry(name,json2){let resolved=await resolve5(name);if(!resolved)console.error(`Agent "${name}" not found in directory or built-ins.`),process.exit(1);if(json2){console.log(JSON.stringify({...resolved.entry,builtin:resolved.builtin},null,2));return}if(resolved.builtin)console.log(`
3860
3860
  (built-in agent)`);if(console.log(""),console.log(` Name: ${resolved.entry.name}`),console.log(` Dir: ${contractPath(resolved.entry.dir)}`),resolved.entry.repo)console.log(` Repo: ${contractPath(resolved.entry.repo)}`);if(console.log(` Prompt mode: ${resolved.entry.promptMode}`),resolved.entry.model)console.log(` Model: ${resolved.entry.model}`);if(resolved.entry.roles?.length)console.log(` Roles: ${resolved.entry.roles.join(", ")}`);console.log(` Registered: ${resolved.entry.registeredAt}`),console.log("")}function printRegisteredAgentsTable(entries){let termW=process.stdout.columns||120,repoValues=entries.map((e)=>e.repo?contractPath(e.repo):contractPath(e.dir)),maxRepoLen=Math.max(4,...repoValues.map((v)=>v.length)),fixedW=42,repoW=Math.min(maxRepoLen+2,Math.max(30,termW-42-20));console.log(""),console.log("REGISTERED AGENTS"),console.log("-".repeat(Math.max(90,42+repoW+20))),console.log(` ${"NAME".padEnd(22)}${"SCOPE".padEnd(10)}${"REPO".padEnd(repoW)}${"MODEL".padEnd(8)}ROLES`);for(let i2=0;i2<entries.length;i2++){let entry2=entries[i2],repo=repoValues[i2],roles=entry2.roles?.join(", ")||"-";console.log(` ${entry2.name.padEnd(22)}${entry2.scope.padEnd(10)}${repo.padEnd(repoW)}${(entry2.model||"-").padEnd(8)}${roles}`)}console.log("")}function printBuiltinAgentsTable(){console.log("BUILT-IN AGENTS"),console.log("-".repeat(80)),console.log(` ${"NAME".padEnd(22)}${"TYPE".padEnd(10)}${"MODEL".padEnd(8)}DESCRIPTION`);for(let agent of ALL_BUILTINS)console.log(` ${agent.name.padEnd(22)}${agent.category.padEnd(10)}${(agent.model||"-").padEnd(8)}${agent.description}`);console.log("")}async function listEntries(json2,includeBuiltins,_includeArchived){let entries=await ls();if(json2){let result2=entries.map((e)=>({...e,builtin:!1}));if(includeBuiltins)for(let b2 of ALL_BUILTINS)result2.push({name:b2.name,description:b2.description,model:b2.model,category:b2.category,scope:"built-in",builtin:!0});console.log(JSON.stringify(result2,null,2));return}if(entries.length===0&&!includeBuiltins){console.log(`
@@ -4203,17 +4203,22 @@ Event Throughput (last 60s):`),console.log(` Emitted: ${data.events_emitted_la
4203
4203
  ORDER BY created_at ASC
4204
4204
  `;if(options.json){console.log(JSON.stringify(rows,null,2));return}if(rows.length===0){console.log("No snapshots in the given time range.");return}let headers=["Time","Workers","Teams","Tmux","CPU%","Mem MB"],data=rows.map((r)=>[formatRelativeTimestamp(r.created_at),String(r.active_workers??0),String(r.active_teams??0),String(r.tmux_sessions??0),r.cpu_percent!==null?String(r.cpu_percent):"-",r.memory_mb!==null?String(r.memory_mb):"-"]),widths=headers.map((h,i2)=>{let colVals=data.map((row)=>row[i2]);return Math.max(h.length,...colVals.map((v)=>v.length))});console.log(headers.map((h,i2)=>padRight(h,widths[i2])).join(" | ")),console.log(widths.map((w)=>"-".repeat(w)).join("-+-"));for(let row of data)console.log(row.map((v,i2)=>padRight(v,widths[i2])).join(" | "));console.log(`
4205
4205
  (${rows.length} snapshot${rows.length===1?"":"s"})`)}async function metricsAgentsCommand(options){if(options.json){console.log(JSON.stringify({deprecated:!0,replacement:"genie status",message:"Use `genie status` for live agent state."}));return}console.error("\u26A0\uFE0F `genie metrics agents` is deprecated and will be removed in a future release."),console.error(" Use `genie status` for live agent state.")}function registerMetricsCommands(program2){let metrics=program2.command("metrics").description("Machine metrics \u2014 snapshots, heartbeats, agents");metrics.command("now",{isDefault:!0}).description("Current machine state").option("--json","Output as JSON").action(async(options)=>{await metricsNowCommand(options)}),metrics.command("history").description("Machine snapshot history").option("--since <duration>","Time window (e.g., 1h, 6h, 1d)","1h").option("--json","Output as JSON").action(async(options)=>{await metricsHistoryCommand(options)}),metrics.command("agents").description("[DEPRECATED] Use `genie status` for live agent state").option("--json","Output as JSON").action(async(options)=>{await metricsAgentsCommand(options)})}init_msg();init_term_format();var _taskService4;async function getTaskService4(){if(!_taskService4)_taskService4=await Promise.resolve().then(() => (init_task_service(),exports_task_service));return _taskService4}function currentActor2(){return{actorType:"local",actorId:process.env.GENIE_AGENT_NAME??"cli"}}async function handleNotifySet(options){let ts3=await getTaskService4(),actor=currentActor2(),pref=await ts3.setPreference(actor,options.channel,{priorityThreshold:options.priority,isDefault:options.default}),defaultLabel=pref.isDefault?", default":"";console.log(`Notification preference set: ${pref.channel} (threshold: ${pref.priorityThreshold}${defaultLabel}).`)}function printPrefsTable(prefs){console.log(` ${padRight("CHANNEL",15)} ${padRight("THRESHOLD",12)} ${padRight("DEFAULT",10)} ENABLED`),console.log(` ${"\u2500".repeat(45)}`);for(let p of prefs){let dflt=p.isDefault?"yes":"no",enabled=p.enabled?"yes":"no";console.log(` ${padRight(p.channel,15)} ${padRight(p.priorityThreshold,12)} ${padRight(dflt,10)} ${enabled}`)}console.log(`
4206
- ${prefs.length} preference${prefs.length===1?"":"s"}`)}async function handleNotifyList(options){let ts3=await getTaskService4(),actor=currentActor2(),prefs=await ts3.getPreferences(actor);if(options.json){console.log(JSON.stringify(prefs,null,2));return}if(prefs.length===0){console.log("No notification preferences configured.");return}printPrefsTable(prefs)}async function handleNotifyRemove(options){let ts3=await getTaskService4(),actor=currentActor2();if(await ts3.deletePreference(actor,options.channel))console.log(`Removed notification preference for channel: ${options.channel}`);else console.log(`No preference found for channel: ${options.channel}`)}function registerNotifyCommands(program2){let notify=program2.command("notify").description("Notification preference management");notify.command("set").description("Set notification preference for a channel").requiredOption("--channel <channel>","Channel: whatsapp, telegram, email, slack, discord, tmux").option("--priority <priority>","Minimum priority threshold","normal").option("--default","Set as default channel").action(async(options)=>{try{await handleNotifySet(options)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}}),notify.command("list").description("List notification preferences").option("--json","Output as JSON").action(async(options)=>{try{await handleNotifyList(options)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}}),notify.command("remove").description("Remove a notification preference").requiredOption("--channel <channel>","Channel to remove").action(async(options)=>{try{await handleNotifyRemove(options)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}})}init_term_format();var _taskService5;async function getTaskService5(){if(!_taskService5)_taskService5=await Promise.resolve().then(() => (init_task_service(),exports_task_service));return _taskService5}async function printProjectList(ts3,projects){let counts={};for(let p of projects){let tasks=await ts3.listTasks({projectName:p.name,allProjects:!0});counts[p.id]=tasks.length}console.log(` ${padRight("NAME",20)} ${padRight("TYPE",10)} ${padRight("TASKS",8)} ${padRight("CREATED",12)} PATH`),console.log(` ${"\u2500".repeat(80)}`);for(let p of projects){let type2=p.repoPath?"repo":"virtual",path3=p.repoPath?truncate2(p.repoPath,40):"-";console.log(` ${padRight(p.name,20)} ${padRight(type2,10)} ${padRight(String(counts[p.id]??0),8)} ${padRight(formatDate(p.createdAt),12)} ${path3}`)}console.log(`
4206
+ ${prefs.length} preference${prefs.length===1?"":"s"}`)}async function handleNotifyList(options){let ts3=await getTaskService4(),actor=currentActor2(),prefs=await ts3.getPreferences(actor);if(options.json){console.log(JSON.stringify(prefs,null,2));return}if(prefs.length===0){console.log("No notification preferences configured.");return}printPrefsTable(prefs)}async function handleNotifyRemove(options){let ts3=await getTaskService4(),actor=currentActor2();if(await ts3.deletePreference(actor,options.channel))console.log(`Removed notification preference for channel: ${options.channel}`);else console.log(`No preference found for channel: ${options.channel}`)}function registerNotifyCommands(program2){let notify=program2.command("notify").description("Notification preference management");notify.command("set").description("Set notification preference for a channel").requiredOption("--channel <channel>","Channel: whatsapp, telegram, email, slack, discord, tmux").option("--priority <priority>","Minimum priority threshold","normal").option("--default","Set as default channel").action(async(options)=>{try{await handleNotifySet(options)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}}),notify.command("list").description("List notification preferences").option("--json","Output as JSON").action(async(options)=>{try{await handleNotifyList(options)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}}),notify.command("remove").description("Remove a notification preference").requiredOption("--channel <channel>","Channel to remove").action(async(options)=>{try{await handleNotifyRemove(options)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}})}init_genie_config2();import{generateKeyPairSync}from"crypto";import{chmodSync as chmodSync3,existsSync as existsSync62,mkdirSync as mkdirSync28,readFileSync as readFileSync38,writeFileSync as writeFileSync28}from"fs";import{hostname as osHostname}from"os";import{dirname as dirname19,join as join73,resolve as resolvePath4}from"path";function keyPaths(){let home=process.env.GENIE_HOME??join73(process.env.HOME??"/root",".genie"),dir=join73(home,"keys");return{dir,privateKey:join73(dir,"genie-host.ed25519"),publicKey:join73(dir,"genie-host.ed25519.pub"),hostJson:join73(dir,"host.json")}}function assertNotInsideGitRepo(dir){let probe=resolvePath4(dir);for(let depth=0;depth<16;depth++){if(existsSync62(join73(probe,".git")))throw Error(`Refusing to write keys to ${dir} \u2014 it lives inside a git working tree (${join73(probe,".git")}). Set $GENIE_HOME to a path outside any git repo and re-run.`);let parent=dirname19(probe);if(parent===probe)return;probe=parent}}function generateAndPersistKeypair(paths){if(!existsSync62(paths.dir))mkdirSync28(paths.dir,{recursive:!0,mode:448});let{publicKey,privateKey}=generateKeyPairSync("ed25519"),rawPub=publicKey.export({format:"der",type:"spki"}),pubkeyB64Url=rawPub.subarray(rawPub.length-32).toString("base64url");return writeFileSync28(paths.privateKey,privateKey.export({format:"pem",type:"pkcs8"}),{mode:384}),writeFileSync28(paths.publicKey,pubkeyB64Url,{mode:420}),chmodSync3(paths.privateKey,384),{pubkeyB64Url}}function loadExistingPubkey(paths){if(!existsSync62(paths.publicKey))return null;return readFileSync38(paths.publicKey,"utf-8").trim()}function loadHostJson(paths){if(!existsSync62(paths.hostJson))return null;try{return JSON.parse(readFileSync38(paths.hostJson,"utf-8"))}catch{return null}}function writeHostJson(paths,record){writeFileSync28(paths.hostJson,`${JSON.stringify(record,null,2)}
4207
+ `,{mode:420})}async function resolveOmniApiKey2(){let envKey=process.env.OMNI_API_KEY;if(envKey)return envKey;return(await loadGenieConfig()).omni?.apiKey}async function callTrustEndpoint(apiUrl,apiKey,method,path3,body){let headers={"Content-Type":"application/json"};if(apiKey)headers.Authorization=`Bearer ${apiKey}`;let res=await fetch(`${apiUrl.replace(/\/+$/,"")}/api/v2/trust${path3}`,{method,headers,body:body===void 0?void 0:JSON.stringify(body)});if(!res.ok){let text=await res.text().catch(()=>"");throw Error(`omni trust ${method} ${path3}: HTTP ${res.status}${text?` \u2014 ${text}`:""}`)}return await res.json()}async function handleHandshake(options){let apiUrl=await resolveOmniApiUrl();if(!apiUrl)throw Error("Omni is not configured. Set OMNI_API_URL or `omni.apiUrl` in your genie config first.\nExample: omni install");let apiKey=await resolveOmniApiKey2();if(!apiKey)throw Error("Omni API key not configured. Set OMNI_API_KEY or `omni.apiKey` in your genie config.");let paths=keyPaths();assertNotInsideGitRepo(paths.dir);let previousRecord=loadHostJson(paths),pubkey=loadExistingPubkey(paths);if(options.rotate){if(!previousRecord)throw Error("Cannot --rotate: no existing host record at ~/.genie/keys/host.json. Run a plain handshake first.");pubkey=generateAndPersistKeypair(paths).pubkeyB64Url}else if(!pubkey)pubkey=generateAndPersistKeypair(paths).pubkeyB64Url;let hostname2=options.hostname??previousRecord?.hostname??osHostname()??"unknown-host",capabilities={genieVersion:process.env.GENIE_VERSION??"unknown",platform:process.platform,nodeVersion:process.version},{data:host}=await callTrustEndpoint(apiUrl,apiKey,"POST","/handshake",{pubkey,hostname:hostname2,capabilities}),newRecord={hostId:host.id,pubkey:host.pubkey,hostname:host.hostname,registeredAt:new Date().toISOString(),...options.rotate&&previousRecord?{rotatedFrom:previousRecord.hostId}:{}};if(writeHostJson(paths,newRecord),options.rotate&&previousRecord&&previousRecord.hostId!==host.id)try{await callTrustEndpoint(apiUrl,apiKey,"DELETE",`/hosts/${previousRecord.hostId}`)}catch(err){let message=err instanceof Error?err.message:String(err);console.warn(`
4208
+ \u26A0 Rotated key registered as ${host.id}, but revoking the old host (${previousRecord.hostId}) failed:
4209
+ ${message}
4210
+ Finish manually: omni trust revoke ${previousRecord.hostId}
4211
+ `)}if(console.log(`Genie host registered: ${host.id}`),console.log(` Hostname: ${host.hostname}`),console.log(` Public key: ${host.pubkey}`),console.log(` Private key: ${paths.privateKey} (perms 0600)`),options.rotate&&previousRecord)console.log(` Rotated from: ${previousRecord.hostId} (revoked)`)}function registerOmniNamespace(program2){(program2.commands.find((c)=>c.name()==="omni")??program2.command("omni").description("Omni integration commands (handshake, etc.)")).command("handshake").description("Register this genie host with the local omni server (ed25519 keypair, idempotent).").option("--rotate","Issue a new keypair and revoke the existing host record").option("--hostname <name>","Override the hostname reported to omni (defaults to os.hostname())").action(async(options)=>{try{await handleHandshake(options)}catch(err){let message=err instanceof Error?err.message:String(err);console.error(`Error: ${message}`),process.exit(1)}})}init_term_format();var _taskService5;async function getTaskService5(){if(!_taskService5)_taskService5=await Promise.resolve().then(() => (init_task_service(),exports_task_service));return _taskService5}async function printProjectList(ts3,projects){let counts={};for(let p of projects){let tasks=await ts3.listTasks({projectName:p.name,allProjects:!0});counts[p.id]=tasks.length}console.log(` ${padRight("NAME",20)} ${padRight("TYPE",10)} ${padRight("TASKS",8)} ${padRight("CREATED",12)} PATH`),console.log(` ${"\u2500".repeat(80)}`);for(let p of projects){let type2=p.repoPath?"repo":"virtual",path3=p.repoPath?truncate2(p.repoPath,40):"-";console.log(` ${padRight(p.name,20)} ${padRight(type2,10)} ${padRight(String(counts[p.id]??0),8)} ${padRight(formatDate(p.createdAt),12)} ${path3}`)}console.log(`
4207
4212
  ${projects.length} project${projects.length===1?"":"s"}`)}function printProjectDetail(p,tasks){let byStatus={},byStage={};for(let t of tasks)byStatus[t.status]=(byStatus[t.status]??0)+1,byStage[t.stage]=(byStage[t.stage]??0)+1;if(console.log(`
4208
4213
  Project: ${p.name}`),console.log("\u2500".repeat(50)),console.log(` ID: ${p.id}`),console.log(` Type: ${p.repoPath?"repo":"virtual"}`),p.repoPath)console.log(` Path: ${p.repoPath}`);if(p.description)console.log(` Desc: ${p.description}`);if(console.log(` Created: ${formatDate(p.createdAt)}`),console.log(` Tasks: ${tasks.length}`),tasks.length>0){console.log(`
4209
4214
  By status:`);for(let[status,count]of Object.entries(byStatus).sort())console.log(` ${padRight(status,15)} ${count}`);console.log(`
4210
- By stage:`);for(let[stage,count]of Object.entries(byStage).sort())console.log(` ${padRight(stage,15)} ${count}`)}}function registerProjectCommands(program2){let project=program2.command("project").description("Project management \u2014 named task boards");project.command("list").description("List all projects").option("--all","Include archived projects").option("--json","Output as JSON").action(async(options)=>{try{let ts3=await getTaskService5(),projects=await ts3.listProjectsFiltered(options.all);if(options.json){console.log(JSON.stringify(projects,null,2));return}if(projects.length===0){console.log("No projects found. Projects are auto-created when you run `genie task create`.");return}await printProjectList(ts3,projects)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}}),project.command("create <name>").description("Create a new project").option("--virtual","Create a virtual project (not tied to a repo)").option("--repo <path>","Repo path for the project").option("--description <text>","Project description").action(async(name,options)=>{try{let ts3=await getTaskService5(),repoPath=options.virtual?null:options.repo??null,p=await ts3.createProject({name,repoPath,description:options.description});if(console.log(`Created project "${p.name}"`),console.log(` ID: ${p.id}`),console.log(` Type: ${p.repoPath?"repo":"virtual"}`),p.repoPath)console.log(` Path: ${p.repoPath}`);if(p.description)console.log(` Desc: ${p.description}`)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}}),project.command("show <name>").description("Show project detail with task stats").option("--json","Output as JSON").action(async(name,options)=>{try{let ts3=await getTaskService5(),p=await ts3.getProjectByName(name);if(!p){console.error(`Error: Project not found: ${name}`),process.exit(1);return}if(options.json){console.log(JSON.stringify(p,null,2));return}let tasks=await ts3.listTasks({projectName:name,allProjects:!0});printProjectDetail(p,tasks)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}}),project.command("archive <name>").description("Archive a project (cascades to boards and unfinished tasks)").action(async(name)=>{try{await(await getTaskService5()).archiveProject(name),console.log(`Archived project "${name}" and cascaded to boards + unfinished tasks.`)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}}),project.command("unarchive <name>").description("Restore an archived project and its boards (tasks stay as-is)").action(async(name)=>{try{await(await getTaskService5()).unarchiveProject(name),console.log(`Unarchived project "${name}" and restored boards.`)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}}),project.command("set-default <name>").description("Set default project for when outside any repo").action(async(name)=>{try{if(!await(await getTaskService5()).getProjectByName(name))console.error(`Error: Project not found: ${name}`),process.exit(1);let{loadGenieConfig:loadGenieConfig2,saveGenieConfig:saveGenieConfig2}=await Promise.resolve().then(() => (init_genie_config2(),exports_genie_config)),config=await loadGenieConfig2();config.defaultProject=name,await saveGenieConfig2(config),console.log(`Default project set to "${name}"`)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}})}init_agent_registry();init_db();function parsePositiveInt(value,name){let parsed=Number.parseInt(value,10);if(!Number.isFinite(parsed)||parsed<=0)throw Error(`Invalid ${name}: ${value} (expected a positive integer)`);return parsed}async function runDryRun(ttlHours){let zombies=await listExhaustedZombies(ttlHours);if(zombies.length===0){console.log(`No exhausted zombies older than ${ttlHours}h.`);return}let plural=zombies.length===1?"":"s";console.log(`Would archive ${zombies.length} zombie agent${plural} older than ${ttlHours}h:`);for(let z of zombies)console.log(` ${z.id} (last state change: ${z.lastStateChange})`)}async function runArchive(ttlHours){let ids=await archiveExhaustedZombies(ttlHours);if(ids.length===0){console.log(`No exhausted zombies older than ${ttlHours}h. Nothing to archive.`);return}let plural=ids.length===1?"":"s";console.log(`Archived ${ids.length} zombie agent${plural} older than ${ttlHours}h:`);for(let id of ids)console.log(` ${id}`)}async function pruneCommand(options){if(!options.zombies)console.error("Error: no prune target specified. Use `--zombies`."),console.error("See `genie prune --help` for available targets."),process.exit(2);let ttlHours=options.ttlHours??24;if(!await isAvailable())console.error("Database is not running. Start it with: genie db status"),process.exit(1);try{await(options.dryRun?runDryRun(ttlHours):runArchive(ttlHours))}catch(err){let message=err instanceof Error?err.message:String(err);console.error(`Prune failed: ${message}`),process.exit(1)}finally{await shutdown().catch(()=>{})}}function registerPruneCommands(program2){program2.command("prune").description("Bulk cleanup of stale or exhausted registry entries").option("--zombies","Archive dead-pane zombies whose auto-resume retries are exhausted").option("--dry-run","List targets that would be affected without mutating").option("--ttl-hours <hours>","Minimum age in hours before a zombie is eligible for archive (default: 24)",(v)=>parsePositiveInt(v,"--ttl-hours")).action(pruneCommand)}init_agent_registry();import{readFile as readFile16,stat as stat10}from"fs/promises";import{join as join75}from"path";import{readFile as readFile14}from"fs/promises";async function parseQaSpec(filePath){let content=await readFile14(filePath,"utf-8");return parseQaSpecContent(content,filePath)}var SECTION_MAP={setup:"setup",actions:"actions",expect:"expect"};function detectSection(line){for(let[keyword,section]of Object.entries(SECTION_MAP))if(new RegExp(`^##\\s+${keyword}`,"i").test(line))return section;if(line.startsWith("## "))return"none";return null}function parseQaSpecContent(content,filePath="<inline>"){let lines=content.split(`
4211
- `),name="",currentSection="none",setup=[],actions=[],expect=[],parsers2={none:()=>{},setup:(line)=>{let step=parseSetupLine(line);if(step)setup.push(step)},actions:(line)=>{let step=parseActionLine(line);if(step)actions.push(step)},expect:(line)=>{let exp=parseExpectLine(line);if(exp)expect.push(exp)}};for(let line of lines){let trimmed=line.trim();if(trimmed.startsWith("# ")&&!trimmed.startsWith("## ")){let match=trimmed.match(/^#\s+(?:Test:\s*)?(.+)$/);if(match)name=match[1].trim();continue}let section=detectSection(trimmed);if(section!==null){currentSection=section;continue}if(!trimmed||trimmed.startsWith("//")||trimmed.startsWith("<!--"))continue;parsers2[currentSection](trimmed)}if(!name)name=filePath.replace(/.*\//,"").replace(/\.md$/,"");return{name,file:filePath,setup,actions,expect}}function parseSetupLine(line){let text=stripListPrefix(line);if(!text)return null;let spawnMatch=text.match(/^spawn\s+(\S+)(?:\s+\((.+)\))?$/i);if(spawnMatch)return{kind:"spawn",target:spawnMatch[1],options:spawnMatch[2]?parseOptions2(spawnMatch[2]):{}};let followMatch=text.match(/^(?:start\s+)?follow(?:\s+(?:on\s+)?(\S+))?(?:\s+\((.+)\))?$/i);if(followMatch)return{kind:"follow",target:followMatch[1]||"team",options:followMatch[2]?parseOptions2(followMatch[2]):{}};return null}function parseActionLine(line){let text=stripListPrefix(line);if(!text)return null;let sendMatch=text.match(/^send\s+"([^"]+)"\s+to\s+(\S+)/i);if(sendMatch)return{kind:"send",message:sendMatch[1],to:sendMatch[2]};let waitMatch=text.match(/^wait\s+(?:for\s+.+?\s+)?\(?(?:max\s+)?(\d+)s\)?/i);if(waitMatch)return{kind:"wait",seconds:Number.parseInt(waitMatch[1],10)};let runMatch=text.match(/^run\s+(.+)$/i);if(runMatch)return{kind:"run",command:runMatch[1]};return null}function detectSource(text){if(/\binbox\b/i.test(text))return"inbox";if(/\blog\b/i.test(text))return"log";if(/\boutput\b/i.test(text))return"output";return"log"}function extractMatchers(text){let matchers={},matcherRegex=/(\w+)\s*([~!]?=)\s*(?:"([^"]+)"|(\S+))/g;for(let match of text.matchAll(matcherRegex)){let op=match[2]==="~="?"~":"",value=(match[3]??match[4]).trim();matchers[match[1]]=`${op}${value}`}return matchers}function parseExpectLine(line){let text=line.replace(/^[-*]\s*\[[ x]\]\s*/i,"").trim();if(!text)return null;return{description:text,source:detectSource(text),matchers:extractMatchers(text)}}function stripListPrefix(line){return line.replace(/^[-*]\s+/,"").replace(/^\d+\.\s+/,"").trim()}function parseOptions2(text){let opts={};for(let pair of text.split(",")){let[key,...rest]=pair.split(":");if(key&&rest.length>0)opts[key.trim()]=rest.join(":").trim()}return opts}import{cp as cp2,mkdir as mkdir11,rm as rm4,writeFile as writeFile10}from"fs/promises";import{tmpdir as tmpdir4}from"os";import{dirname as dirname19,join as join74,resolve as resolve16}from"path";var{$:$4}=globalThis.Bun;import{createHash as createHash7}from"crypto";import{mkdir as mkdir10,readFile as readFile15,readdir as readdir10,stat as stat9,writeFile as writeFile9}from"fs/promises";import{homedir as homedir43}from"os";import{join as join73,relative as relative8,resolve as resolve15}from"path";function repoHash(repoPath){return createHash7("sha256").update(resolve15(repoPath)).digest("hex").slice(0,12)}function resultsDir(repoPath){let base=process.env.GENIE_HOME??join73(homedir43(),".genie");return join73(base,"qa",repoHash(repoPath))}function resultsPath(repoPath){return join73(resultsDir(repoPath),"results.json")}async function loadResults(repoPath){try{let raw=await readFile15(resultsPath(repoPath),"utf-8");return JSON.parse(raw)}catch{return{}}}async function saveResult(repoPath,specKey,report){let dir=resultsDir(repoPath);await mkdir10(dir,{recursive:!0});let results=await loadResults(repoPath),specHash=await hashSpecFile(report.file);results[specKey]={lastRun:new Date().toISOString(),result:report.result,durationMs:report.durationMs,specHash,expectations:report.expectations,error:report.error},await writeFile9(resultsPath(repoPath),JSON.stringify(results,null,2))}async function isStale(repoPath,specKey,specFilePath){let stored=(await loadResults(repoPath))[specKey];if(!stored)return!1;return await hashSpecFile(specFilePath)!==stored.specHash}async function listAllSpecs(specDir){let entries=[];return await walkSpecs(specDir,specDir,entries),entries.sort((a,b2)=>{if(a.domain!==b2.domain)return a.domain.localeCompare(b2.domain);return a.name.localeCompare(b2.name)})}async function hashSpecFile(filePath){try{let content=await readFile15(filePath,"utf-8");return createHash7("sha256").update(content).digest("hex").slice(0,12)}catch{return"unknown"}}async function walkSpecs(baseDir,dir,entries){let items=await readdir10(dir);for(let item of items){let fullPath=join73(dir,item);if((await stat9(fullPath)).isDirectory())await walkSpecs(baseDir,fullPath,entries);else if(item.endsWith(".md")){let rel=relative8(baseDir,fullPath),parts=rel.replace(/\.md$/,"").split("/"),domain=parts.length>1?parts.slice(0,-1).join("/"):"(root)",name=parts[parts.length-1];entries.push({key:rel.replace(/\.md$/,""),domain,name,filePath:fullPath})}}}function specKeyFromPath(specDir,filePath){return relative8(specDir,filePath).replace(/\.md$/,"")}function formatTimeAgo(isoDate){let ms=Date.now()-new Date(isoDate).getTime(),seconds=Math.floor(ms/1000);if(seconds<60)return`${seconds}s ago`;let minutes=Math.floor(seconds/60);if(minutes<60)return`${minutes}m ago`;let hours=Math.floor(minutes/60);if(hours<24)return`${hours}h ago`;return`${Math.floor(hours/24)}d ago`}init_runtime_events();init_team_manager();function emitNdjson(event){process.stdout.write(`${JSON.stringify(event)}
4212
- `)}async function publishQaEvent(repoPath,qaType,payload){let{specKey,domain,team,...rest}=payload;await publishSubjectEvent(repoPath,`genie.qa.${qaType}`,{kind:"qa",agent:"qa",team,text:`${qaType}: ${specKey}`,data:{qaType,specKey,domain,...rest},source:"hook"})}async function emitQaEvent(repoPath,qaType,payload,ndjson){if(await publishQaEvent(repoPath,qaType,payload),ndjson)emitNdjson(payload)}function parseStatusEntry(status,parts,index){if(status.startsWith("R")){let from=parts[index]??"",to=parts[index+1]??"";if(from&&to)return{op:{kind:"rename",from,to},nextIndex:index+2};return{op:null,nextIndex:index+2}}let path3=parts[index]??"";if(!path3)return{op:null,nextIndex:index+1};return{op:{kind:status.startsWith("D")?"delete":"copy",path:path3},nextIndex:index+1}}function parseNameStatusZ(output){if(!output)return[];let parts=output.split("\x00").filter(Boolean),ops=[],i2=0;while(i2<parts.length){let status=parts[i2++]??"";if(!status)break;let{op,nextIndex}=parseStatusEntry(status,parts,i2);if(i2=nextIndex,op)ops.push(op)}return ops}async function overlayDirtyWorkingTree(repoPath,worktreePath){let tracked=(await $4`git -C ${repoPath} diff --name-status --find-renames -z HEAD --`.quiet().nothrow().text()).trim(),untracked=(await $4`git -C ${repoPath} ls-files --others --exclude-standard -z`.quiet().nothrow().text()).trim(),ops=parseNameStatusZ(tracked);for(let path3 of untracked.split("\x00").filter(Boolean))ops.push({kind:"copy",path:path3});for(let op of ops){if(op.kind==="delete"){await rm4(join74(worktreePath,op.path),{recursive:!0,force:!0});continue}if(op.kind==="rename"){await rm4(join74(worktreePath,op.from),{recursive:!0,force:!0});let src2=join74(repoPath,op.to),dest2=join74(worktreePath,op.to);await mkdir11(dirname19(dest2),{recursive:!0}),await cp2(src2,dest2,{recursive:!0,force:!0});continue}let src=join74(repoPath,op.path),dest=join74(worktreePath,op.path);await mkdir11(dirname19(dest),{recursive:!0}),await cp2(src,dest,{recursive:!0,force:!0})}}async function runAllSpecs(specDir,options){let entries=await listAllSpecs(specDir);return runSpecEntries(entries,specDir,options)}async function runDomainSpecs(specDir,domain,options){let filtered=(await listAllSpecs(specDir)).filter((e)=>e.domain===domain);return runSpecEntries(filtered,specDir,options)}async function prepareTeams(entries,repoPath,ndjson){let prepared=[];console.error(`
4213
- [qa] Creating ${entries.length} teams...`);for(let entry2 of entries){let teamName=`qa-${Date.now().toString(36)}-${entry2.name.slice(0,8)}`;try{let spec=await parseQaSpec(entry2.filePath),config=await createTeam(teamName,repoPath);await overlayDirtyWorkingTree(repoPath,config.worktreePath),await hireAgent(teamName,"qa");let prompt2=buildTeamLeadPrompt(spec,teamName,repoPath),promptFile=join74(tmpdir4(),`genie-qa-${teamName}.md`);await writeFile10(promptFile,prompt2),prepared.push({entry:entry2,spec,teamName,worktreePath:config.worktreePath,promptFile}),console.error(` \u2713 ${entry2.name}`),await emitQaEvent(repoPath,"team-created",{type:"qa:team-created",specKey:entry2.key,domain:entry2.domain,team:teamName},ndjson)}catch(err){console.error(` \u2717 ${entry2.name}: ${err instanceof Error?err.message:err}`)}await new Promise((r)=>setTimeout(r,200))}return prepared}async function emitSpecDone(repoPath,specKey,domain,team,report,ndjson){await emitQaEvent(repoPath,"spec-done",{type:"qa:spec-done",specKey,domain,team,result:report.result,durationMs:report.durationMs,expectations:report.expectations,error:report.error},ndjson)}async function runSpecEntries(entries,specDir,options){let repoPath=resolve16(options?.repoPath??process.cwd()),maxConcurrency=options?.parallel??5,timeoutMs=(options?.timeout??3600)*1000,ndjson=options?.ndjson??!1,GREEN="\x1B[32m",RED="\x1B[31m",RESET2="\x1B[0m",DIM2="\x1B[90m",prepared=await prepareTeams(entries,repoPath,ndjson);if(prepared.length===0)return[];let timelineSub=await followRuntimeEvents({repoPath,teamPrefix:"qa-"},(event)=>{if(!event?.timestamp||!event?.kind)return;let team=event.team??"";if(!team.startsWith("qa-"))return;let match=prepared.find((p)=>p.teamName===team),specKey=match?.entry.key??team,specName=match?.entry.name??team,domain=match?.entry.domain??"",time=new Date(event.timestamp).toLocaleTimeString("en-US",{hour12:!1}),text=(event.text??"").slice(0,100);if(console.error(` \x1B[90m${time}\x1B[0m \x1B[90m[${event.kind}]\x1B[0m ${specName} \x1B[90m${text}\x1B[0m`),ndjson)emitNdjson({type:"qa:event",specKey,domain,team,event:{timestamp:event.timestamp,kind:event.kind,agent:event.agent??"",text:event.text??""}})},{pollIntervalMs:250});console.error(`
4215
+ By stage:`);for(let[stage,count]of Object.entries(byStage).sort())console.log(` ${padRight(stage,15)} ${count}`)}}function registerProjectCommands(program2){let project=program2.command("project").description("Project management \u2014 named task boards");project.command("list").description("List all projects").option("--all","Include archived projects").option("--json","Output as JSON").action(async(options)=>{try{let ts3=await getTaskService5(),projects=await ts3.listProjectsFiltered(options.all);if(options.json){console.log(JSON.stringify(projects,null,2));return}if(projects.length===0){console.log("No projects found. Projects are auto-created when you run `genie task create`.");return}await printProjectList(ts3,projects)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}}),project.command("create <name>").description("Create a new project").option("--virtual","Create a virtual project (not tied to a repo)").option("--repo <path>","Repo path for the project").option("--description <text>","Project description").action(async(name,options)=>{try{let ts3=await getTaskService5(),repoPath=options.virtual?null:options.repo??null,p=await ts3.createProject({name,repoPath,description:options.description});if(console.log(`Created project "${p.name}"`),console.log(` ID: ${p.id}`),console.log(` Type: ${p.repoPath?"repo":"virtual"}`),p.repoPath)console.log(` Path: ${p.repoPath}`);if(p.description)console.log(` Desc: ${p.description}`)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}}),project.command("show <name>").description("Show project detail with task stats").option("--json","Output as JSON").action(async(name,options)=>{try{let ts3=await getTaskService5(),p=await ts3.getProjectByName(name);if(!p){console.error(`Error: Project not found: ${name}`),process.exit(1);return}if(options.json){console.log(JSON.stringify(p,null,2));return}let tasks=await ts3.listTasks({projectName:name,allProjects:!0});printProjectDetail(p,tasks)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}}),project.command("archive <name>").description("Archive a project (cascades to boards and unfinished tasks)").action(async(name)=>{try{await(await getTaskService5()).archiveProject(name),console.log(`Archived project "${name}" and cascaded to boards + unfinished tasks.`)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}}),project.command("unarchive <name>").description("Restore an archived project and its boards (tasks stay as-is)").action(async(name)=>{try{await(await getTaskService5()).unarchiveProject(name),console.log(`Unarchived project "${name}" and restored boards.`)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}}),project.command("set-default <name>").description("Set default project for when outside any repo").action(async(name)=>{try{if(!await(await getTaskService5()).getProjectByName(name))console.error(`Error: Project not found: ${name}`),process.exit(1);let{loadGenieConfig:loadGenieConfig2,saveGenieConfig:saveGenieConfig2}=await Promise.resolve().then(() => (init_genie_config2(),exports_genie_config)),config=await loadGenieConfig2();config.defaultProject=name,await saveGenieConfig2(config),console.log(`Default project set to "${name}"`)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}})}init_agent_registry();init_db();function parsePositiveInt(value,name){let parsed=Number.parseInt(value,10);if(!Number.isFinite(parsed)||parsed<=0)throw Error(`Invalid ${name}: ${value} (expected a positive integer)`);return parsed}async function runDryRun(ttlHours){let zombies=await listExhaustedZombies(ttlHours);if(zombies.length===0){console.log(`No exhausted zombies older than ${ttlHours}h.`);return}let plural=zombies.length===1?"":"s";console.log(`Would archive ${zombies.length} zombie agent${plural} older than ${ttlHours}h:`);for(let z of zombies)console.log(` ${z.id} (last state change: ${z.lastStateChange})`)}async function runArchive(ttlHours){let ids=await archiveExhaustedZombies(ttlHours);if(ids.length===0){console.log(`No exhausted zombies older than ${ttlHours}h. Nothing to archive.`);return}let plural=ids.length===1?"":"s";console.log(`Archived ${ids.length} zombie agent${plural} older than ${ttlHours}h:`);for(let id of ids)console.log(` ${id}`)}async function pruneCommand(options){if(!options.zombies)console.error("Error: no prune target specified. Use `--zombies`."),console.error("See `genie prune --help` for available targets."),process.exit(2);let ttlHours=options.ttlHours??24;if(!await isAvailable())console.error("Database is not running. Start it with: genie db status"),process.exit(1);try{await(options.dryRun?runDryRun(ttlHours):runArchive(ttlHours))}catch(err){let message=err instanceof Error?err.message:String(err);console.error(`Prune failed: ${message}`),process.exit(1)}finally{await shutdown().catch(()=>{})}}function registerPruneCommands(program2){program2.command("prune").description("Bulk cleanup of stale or exhausted registry entries").option("--zombies","Archive dead-pane zombies whose auto-resume retries are exhausted").option("--dry-run","List targets that would be affected without mutating").option("--ttl-hours <hours>","Minimum age in hours before a zombie is eligible for archive (default: 24)",(v)=>parsePositiveInt(v,"--ttl-hours")).action(pruneCommand)}init_agent_registry();import{readFile as readFile16,stat as stat10}from"fs/promises";import{join as join76}from"path";import{readFile as readFile14}from"fs/promises";async function parseQaSpec(filePath){let content=await readFile14(filePath,"utf-8");return parseQaSpecContent(content,filePath)}var SECTION_MAP={setup:"setup",actions:"actions",expect:"expect"};function detectSection(line){for(let[keyword,section]of Object.entries(SECTION_MAP))if(new RegExp(`^##\\s+${keyword}`,"i").test(line))return section;if(line.startsWith("## "))return"none";return null}function parseQaSpecContent(content,filePath="<inline>"){let lines=content.split(`
4216
+ `),name="",currentSection="none",setup=[],actions=[],expect=[],parsers2={none:()=>{},setup:(line)=>{let step=parseSetupLine(line);if(step)setup.push(step)},actions:(line)=>{let step=parseActionLine(line);if(step)actions.push(step)},expect:(line)=>{let exp=parseExpectLine(line);if(exp)expect.push(exp)}};for(let line of lines){let trimmed=line.trim();if(trimmed.startsWith("# ")&&!trimmed.startsWith("## ")){let match=trimmed.match(/^#\s+(?:Test:\s*)?(.+)$/);if(match)name=match[1].trim();continue}let section=detectSection(trimmed);if(section!==null){currentSection=section;continue}if(!trimmed||trimmed.startsWith("//")||trimmed.startsWith("<!--"))continue;parsers2[currentSection](trimmed)}if(!name)name=filePath.replace(/.*\//,"").replace(/\.md$/,"");return{name,file:filePath,setup,actions,expect}}function parseSetupLine(line){let text=stripListPrefix(line);if(!text)return null;let spawnMatch=text.match(/^spawn\s+(\S+)(?:\s+\((.+)\))?$/i);if(spawnMatch)return{kind:"spawn",target:spawnMatch[1],options:spawnMatch[2]?parseOptions2(spawnMatch[2]):{}};let followMatch=text.match(/^(?:start\s+)?follow(?:\s+(?:on\s+)?(\S+))?(?:\s+\((.+)\))?$/i);if(followMatch)return{kind:"follow",target:followMatch[1]||"team",options:followMatch[2]?parseOptions2(followMatch[2]):{}};return null}function parseActionLine(line){let text=stripListPrefix(line);if(!text)return null;let sendMatch=text.match(/^send\s+"([^"]+)"\s+to\s+(\S+)/i);if(sendMatch)return{kind:"send",message:sendMatch[1],to:sendMatch[2]};let waitMatch=text.match(/^wait\s+(?:for\s+.+?\s+)?\(?(?:max\s+)?(\d+)s\)?/i);if(waitMatch)return{kind:"wait",seconds:Number.parseInt(waitMatch[1],10)};let runMatch=text.match(/^run\s+(.+)$/i);if(runMatch)return{kind:"run",command:runMatch[1]};return null}function detectSource(text){if(/\binbox\b/i.test(text))return"inbox";if(/\blog\b/i.test(text))return"log";if(/\boutput\b/i.test(text))return"output";return"log"}function extractMatchers(text){let matchers={},matcherRegex=/(\w+)\s*([~!]?=)\s*(?:"([^"]+)"|(\S+))/g;for(let match of text.matchAll(matcherRegex)){let op=match[2]==="~="?"~":"",value=(match[3]??match[4]).trim();matchers[match[1]]=`${op}${value}`}return matchers}function parseExpectLine(line){let text=line.replace(/^[-*]\s*\[[ x]\]\s*/i,"").trim();if(!text)return null;return{description:text,source:detectSource(text),matchers:extractMatchers(text)}}function stripListPrefix(line){return line.replace(/^[-*]\s+/,"").replace(/^\d+\.\s+/,"").trim()}function parseOptions2(text){let opts={};for(let pair of text.split(",")){let[key,...rest]=pair.split(":");if(key&&rest.length>0)opts[key.trim()]=rest.join(":").trim()}return opts}import{cp as cp2,mkdir as mkdir11,rm as rm4,writeFile as writeFile10}from"fs/promises";import{tmpdir as tmpdir4}from"os";import{dirname as dirname20,join as join75,resolve as resolve16}from"path";var{$:$4}=globalThis.Bun;import{createHash as createHash7}from"crypto";import{mkdir as mkdir10,readFile as readFile15,readdir as readdir10,stat as stat9,writeFile as writeFile9}from"fs/promises";import{homedir as homedir43}from"os";import{join as join74,relative as relative8,resolve as resolve15}from"path";function repoHash(repoPath){return createHash7("sha256").update(resolve15(repoPath)).digest("hex").slice(0,12)}function resultsDir(repoPath){let base=process.env.GENIE_HOME??join74(homedir43(),".genie");return join74(base,"qa",repoHash(repoPath))}function resultsPath(repoPath){return join74(resultsDir(repoPath),"results.json")}async function loadResults(repoPath){try{let raw=await readFile15(resultsPath(repoPath),"utf-8");return JSON.parse(raw)}catch{return{}}}async function saveResult(repoPath,specKey,report){let dir=resultsDir(repoPath);await mkdir10(dir,{recursive:!0});let results=await loadResults(repoPath),specHash=await hashSpecFile(report.file);results[specKey]={lastRun:new Date().toISOString(),result:report.result,durationMs:report.durationMs,specHash,expectations:report.expectations,error:report.error},await writeFile9(resultsPath(repoPath),JSON.stringify(results,null,2))}async function isStale(repoPath,specKey,specFilePath){let stored=(await loadResults(repoPath))[specKey];if(!stored)return!1;return await hashSpecFile(specFilePath)!==stored.specHash}async function listAllSpecs(specDir){let entries=[];return await walkSpecs(specDir,specDir,entries),entries.sort((a,b2)=>{if(a.domain!==b2.domain)return a.domain.localeCompare(b2.domain);return a.name.localeCompare(b2.name)})}async function hashSpecFile(filePath){try{let content=await readFile15(filePath,"utf-8");return createHash7("sha256").update(content).digest("hex").slice(0,12)}catch{return"unknown"}}async function walkSpecs(baseDir,dir,entries){let items=await readdir10(dir);for(let item of items){let fullPath=join74(dir,item);if((await stat9(fullPath)).isDirectory())await walkSpecs(baseDir,fullPath,entries);else if(item.endsWith(".md")){let rel=relative8(baseDir,fullPath),parts=rel.replace(/\.md$/,"").split("/"),domain=parts.length>1?parts.slice(0,-1).join("/"):"(root)",name=parts[parts.length-1];entries.push({key:rel.replace(/\.md$/,""),domain,name,filePath:fullPath})}}}function specKeyFromPath(specDir,filePath){return relative8(specDir,filePath).replace(/\.md$/,"")}function formatTimeAgo(isoDate){let ms=Date.now()-new Date(isoDate).getTime(),seconds=Math.floor(ms/1000);if(seconds<60)return`${seconds}s ago`;let minutes=Math.floor(seconds/60);if(minutes<60)return`${minutes}m ago`;let hours=Math.floor(minutes/60);if(hours<24)return`${hours}h ago`;return`${Math.floor(hours/24)}d ago`}init_runtime_events();init_team_manager();function emitNdjson(event){process.stdout.write(`${JSON.stringify(event)}
4217
+ `)}async function publishQaEvent(repoPath,qaType,payload){let{specKey,domain,team,...rest}=payload;await publishSubjectEvent(repoPath,`genie.qa.${qaType}`,{kind:"qa",agent:"qa",team,text:`${qaType}: ${specKey}`,data:{qaType,specKey,domain,...rest},source:"hook"})}async function emitQaEvent(repoPath,qaType,payload,ndjson){if(await publishQaEvent(repoPath,qaType,payload),ndjson)emitNdjson(payload)}function parseStatusEntry(status,parts,index){if(status.startsWith("R")){let from=parts[index]??"",to=parts[index+1]??"";if(from&&to)return{op:{kind:"rename",from,to},nextIndex:index+2};return{op:null,nextIndex:index+2}}let path3=parts[index]??"";if(!path3)return{op:null,nextIndex:index+1};return{op:{kind:status.startsWith("D")?"delete":"copy",path:path3},nextIndex:index+1}}function parseNameStatusZ(output){if(!output)return[];let parts=output.split("\x00").filter(Boolean),ops=[],i2=0;while(i2<parts.length){let status=parts[i2++]??"";if(!status)break;let{op,nextIndex}=parseStatusEntry(status,parts,i2);if(i2=nextIndex,op)ops.push(op)}return ops}async function overlayDirtyWorkingTree(repoPath,worktreePath){let tracked=(await $4`git -C ${repoPath} diff --name-status --find-renames -z HEAD --`.quiet().nothrow().text()).trim(),untracked=(await $4`git -C ${repoPath} ls-files --others --exclude-standard -z`.quiet().nothrow().text()).trim(),ops=parseNameStatusZ(tracked);for(let path3 of untracked.split("\x00").filter(Boolean))ops.push({kind:"copy",path:path3});for(let op of ops){if(op.kind==="delete"){await rm4(join75(worktreePath,op.path),{recursive:!0,force:!0});continue}if(op.kind==="rename"){await rm4(join75(worktreePath,op.from),{recursive:!0,force:!0});let src2=join75(repoPath,op.to),dest2=join75(worktreePath,op.to);await mkdir11(dirname20(dest2),{recursive:!0}),await cp2(src2,dest2,{recursive:!0,force:!0});continue}let src=join75(repoPath,op.path),dest=join75(worktreePath,op.path);await mkdir11(dirname20(dest),{recursive:!0}),await cp2(src,dest,{recursive:!0,force:!0})}}async function runAllSpecs(specDir,options){let entries=await listAllSpecs(specDir);return runSpecEntries(entries,specDir,options)}async function runDomainSpecs(specDir,domain,options){let filtered=(await listAllSpecs(specDir)).filter((e)=>e.domain===domain);return runSpecEntries(filtered,specDir,options)}async function prepareTeams(entries,repoPath,ndjson){let prepared=[];console.error(`
4218
+ [qa] Creating ${entries.length} teams...`);for(let entry2 of entries){let teamName=`qa-${Date.now().toString(36)}-${entry2.name.slice(0,8)}`;try{let spec=await parseQaSpec(entry2.filePath),config=await createTeam(teamName,repoPath);await overlayDirtyWorkingTree(repoPath,config.worktreePath),await hireAgent(teamName,"qa");let prompt2=buildTeamLeadPrompt(spec,teamName,repoPath),promptFile=join75(tmpdir4(),`genie-qa-${teamName}.md`);await writeFile10(promptFile,prompt2),prepared.push({entry:entry2,spec,teamName,worktreePath:config.worktreePath,promptFile}),console.error(` \u2713 ${entry2.name}`),await emitQaEvent(repoPath,"team-created",{type:"qa:team-created",specKey:entry2.key,domain:entry2.domain,team:teamName},ndjson)}catch(err){console.error(` \u2717 ${entry2.name}: ${err instanceof Error?err.message:err}`)}await new Promise((r)=>setTimeout(r,200))}return prepared}async function emitSpecDone(repoPath,specKey,domain,team,report,ndjson){await emitQaEvent(repoPath,"spec-done",{type:"qa:spec-done",specKey,domain,team,result:report.result,durationMs:report.durationMs,expectations:report.expectations,error:report.error},ndjson)}async function runSpecEntries(entries,specDir,options){let repoPath=resolve16(options?.repoPath??process.cwd()),maxConcurrency=options?.parallel??5,timeoutMs=(options?.timeout??3600)*1000,ndjson=options?.ndjson??!1,GREEN="\x1B[32m",RED="\x1B[31m",RESET2="\x1B[0m",DIM2="\x1B[90m",prepared=await prepareTeams(entries,repoPath,ndjson);if(prepared.length===0)return[];let timelineSub=await followRuntimeEvents({repoPath,teamPrefix:"qa-"},(event)=>{if(!event?.timestamp||!event?.kind)return;let team=event.team??"";if(!team.startsWith("qa-"))return;let match=prepared.find((p)=>p.teamName===team),specKey=match?.entry.key??team,specName=match?.entry.name??team,domain=match?.entry.domain??"",time=new Date(event.timestamp).toLocaleTimeString("en-US",{hour12:!1}),text=(event.text??"").slice(0,100);if(console.error(` \x1B[90m${time}\x1B[0m \x1B[90m[${event.kind}]\x1B[0m ${specName} \x1B[90m${text}\x1B[0m`),ndjson)emitNdjson({type:"qa:event",specKey,domain,team,event:{timestamp:event.timestamp,kind:event.kind,agent:event.agent??"",text:event.text??""}})},{pollIntervalMs:250});console.error(`
4214
4219
  [qa] Running ${prepared.length} specs (max ${maxConcurrency} parallel)
4215
4220
  `);let reports=[],running2=0,nextIdx=0,startTime=Date.now();await new Promise((resolveAll)=>{let tryStartNext=()=>{while(running2<maxConcurrency&&nextIdx<prepared.length){let p=prepared[nextIdx++];running2++,emitQaEvent(repoPath,"spec-started",{type:"qa:spec-started",specKey:p.entry.key,domain:p.entry.domain,team:p.teamName},ndjson),runPreparedSpec(repoPath,p.spec,p.teamName,p.worktreePath,p.promptFile,timeoutMs).then(async(report)=>{let key=specKeyFromPath(specDir,p.entry.filePath);await saveResult(repoPath,key,report);let icon=report.result==="pass"?`${"\x1B[32m"}\u2713${"\x1B[0m"}`:`${"\x1B[31m"}\u2717${"\x1B[0m"}`,elapsed=((Date.now()-startTime)/1000).toFixed(0);console.error(` ${icon} ${p.entry.name} (${(report.durationMs/1000).toFixed(0)}s) [${elapsed}s total]`),await emitSpecDone(repoPath,p.entry.key,p.entry.domain,p.teamName,report,ndjson),reports.push(report)}).catch((err)=>{let errorReport=makeErrorReport(p.spec,Date.now(),String(err));reports.push(errorReport),console.error(` ${"\x1B[31m"}\u2717${"\x1B[0m"} ${p.entry.name}: ${err}`),emitSpecDone(repoPath,p.entry.key,p.entry.domain,p.teamName,errorReport,ndjson)}).finally(()=>{if(running2--,reports.length===prepared.length)resolveAll();else tryStartNext()})}};tryStartNext()}),await timelineSub.stop(),console.error(`
4216
- [qa] Cleaning up ${prepared.length} teams...`);for(let p of prepared)try{await disbandTeam(p.teamName)}catch{}return reports}async function runSpec(spec,options){let repoPath=resolve16(options?.repoPath??process.cwd()),timeoutMs=(options?.timeout??3600)*1000,ndjson=options?.ndjson??!1,specKey=options?.specKey??spec.name,domain=specKey.includes("/")?specKey.split("/").slice(0,-1).join("/"):"(root)",teamName=`qa-${Date.now().toString(36)}-${spec.name.slice(0,8).replace(/\s+/g,"-")}`,start3=Date.now();try{let config=await createTeam(teamName,repoPath);await overlayDirtyWorkingTree(repoPath,config.worktreePath),await hireAgent(teamName,"qa"),await emitQaEvent(repoPath,"team-created",{type:"qa:team-created",specKey,domain,team:teamName},ndjson);let prompt2=buildTeamLeadPrompt(spec,teamName,repoPath),promptFile=join74(tmpdir4(),`genie-qa-${teamName}.md`);await writeFile10(promptFile,prompt2),await emitQaEvent(repoPath,"spec-started",{type:"qa:spec-started",specKey,domain,team:teamName},ndjson);let report=await runPreparedSpec(repoPath,spec,teamName,config.worktreePath,promptFile,timeoutMs);return await emitSpecDone(repoPath,specKey,domain,teamName,report,ndjson),await disbandTeam(teamName),report}catch(err){try{await disbandTeam(teamName)}catch{}let errorReport=makeErrorReport(spec,start3,String(err));return await emitSpecDone(repoPath,specKey,domain,teamName,errorReport,ndjson),errorReport}}async function runPreparedSpec(repoPath,spec,teamName,worktreePath,promptFile,timeoutMs){let start3=Date.now(),effectiveTimeoutMs=computeEffectiveTimeoutMs(spec,timeoutMs);try{let{handleWorkerSpawn:handleWorkerSpawn2}=await Promise.resolve().then(() => (init_agents(),exports_agents)),_paneId=await handleWorkerSpawn2("qa",{provider:"claude",team:teamName,session:teamName,cwd:worktreePath,role:"qa",extraArgs:["--append-system-prompt-file",promptFile],initialPrompt:`Execute the QA spec "${spec.name}" end-to-end right now. Do not stop after partial progress or a wait step. Continue until you validate the expectations, publish qa-report, and run team done. Your full instructions are in the system prompt.`});return console.error(` [qa] Spawned qa for "${spec.name}" in ${teamName}`),await waitForResult(spec,repoPath,teamName,effectiveTimeoutMs,start3)}catch(err){return makeErrorReport(spec,start3,String(err))}}function buildQaPromptArtifacts(teamName){let base=`genie-qa-${teamName}`;return{followFile:join74(tmpdir4(),`${base}-follow.ndjson`),followPidFile:join74(tmpdir4(),`${base}-follow.pid`),followSinceFile:join74(tmpdir4(),`${base}-follow.since`),snapshotFile:join74(tmpdir4(),`${base}-snapshot.ndjson`)}}function buildTeamLeadPrompt(spec,teamName,repoPath){let genieEntry=join74(repoPath,"src/genie.ts"),genieCmd=`bun run "${genieEntry}"`,{followFile,followPidFile,followSinceFile,snapshotFile}=buildQaPromptArtifacts(teamName),qaCheckCmd=buildQaCheckCommand(genieCmd,spec.file,teamName,followSinceFile),specSummary=formatSpecForPrompt(spec),setupInstructions=formatSetupInstructions(spec,teamName,genieCmd,followFile,followPidFile,followSinceFile),actionInstructions=formatActionInstructions(spec,teamName,genieCmd,qaCheckCmd),expectInstructions=spec.expect.map((e)=>`- ${e.description} (source: ${e.source}, matchers: ${JSON.stringify(e.matchers)})`).join(`
4221
+ [qa] Cleaning up ${prepared.length} teams...`);for(let p of prepared)try{await disbandTeam(p.teamName)}catch{}return reports}async function runSpec(spec,options){let repoPath=resolve16(options?.repoPath??process.cwd()),timeoutMs=(options?.timeout??3600)*1000,ndjson=options?.ndjson??!1,specKey=options?.specKey??spec.name,domain=specKey.includes("/")?specKey.split("/").slice(0,-1).join("/"):"(root)",teamName=`qa-${Date.now().toString(36)}-${spec.name.slice(0,8).replace(/\s+/g,"-")}`,start3=Date.now();try{let config=await createTeam(teamName,repoPath);await overlayDirtyWorkingTree(repoPath,config.worktreePath),await hireAgent(teamName,"qa"),await emitQaEvent(repoPath,"team-created",{type:"qa:team-created",specKey,domain,team:teamName},ndjson);let prompt2=buildTeamLeadPrompt(spec,teamName,repoPath),promptFile=join75(tmpdir4(),`genie-qa-${teamName}.md`);await writeFile10(promptFile,prompt2),await emitQaEvent(repoPath,"spec-started",{type:"qa:spec-started",specKey,domain,team:teamName},ndjson);let report=await runPreparedSpec(repoPath,spec,teamName,config.worktreePath,promptFile,timeoutMs);return await emitSpecDone(repoPath,specKey,domain,teamName,report,ndjson),await disbandTeam(teamName),report}catch(err){try{await disbandTeam(teamName)}catch{}let errorReport=makeErrorReport(spec,start3,String(err));return await emitSpecDone(repoPath,specKey,domain,teamName,errorReport,ndjson),errorReport}}async function runPreparedSpec(repoPath,spec,teamName,worktreePath,promptFile,timeoutMs){let start3=Date.now(),effectiveTimeoutMs=computeEffectiveTimeoutMs(spec,timeoutMs);try{let{handleWorkerSpawn:handleWorkerSpawn2}=await Promise.resolve().then(() => (init_agents(),exports_agents)),_paneId=await handleWorkerSpawn2("qa",{provider:"claude",team:teamName,session:teamName,cwd:worktreePath,role:"qa",extraArgs:["--append-system-prompt-file",promptFile],initialPrompt:`Execute the QA spec "${spec.name}" end-to-end right now. Do not stop after partial progress or a wait step. Continue until you validate the expectations, publish qa-report, and run team done. Your full instructions are in the system prompt.`});return console.error(` [qa] Spawned qa for "${spec.name}" in ${teamName}`),await waitForResult(spec,repoPath,teamName,effectiveTimeoutMs,start3)}catch(err){return makeErrorReport(spec,start3,String(err))}}function buildQaPromptArtifacts(teamName){let base=`genie-qa-${teamName}`;return{followFile:join75(tmpdir4(),`${base}-follow.ndjson`),followPidFile:join75(tmpdir4(),`${base}-follow.pid`),followSinceFile:join75(tmpdir4(),`${base}-follow.since`),snapshotFile:join75(tmpdir4(),`${base}-snapshot.ndjson`)}}function buildTeamLeadPrompt(spec,teamName,repoPath){let genieEntry=join75(repoPath,"src/genie.ts"),genieCmd=`bun run "${genieEntry}"`,{followFile,followPidFile,followSinceFile,snapshotFile}=buildQaPromptArtifacts(teamName),qaCheckCmd=buildQaCheckCommand(genieCmd,spec.file,teamName,followSinceFile),specSummary=formatSpecForPrompt(spec),setupInstructions=formatSetupInstructions(spec,teamName,genieCmd,followFile,followPidFile,followSinceFile),actionInstructions=formatActionInstructions(spec,teamName,genieCmd,qaCheckCmd),expectInstructions=spec.expect.map((e)=>`- ${e.description} (source: ${e.source}, matchers: ${JSON.stringify(e.matchers)})`).join(`
4217
4222
  `);return`You are a QA team-lead for team "${teamName}". Your job is to execute the following QA spec and report PASS or FAIL.
4218
4223
 
4219
4224
  ## QA Spec: ${spec.name}
@@ -4287,7 +4292,7 @@ Team: ${teamName}
4287
4292
  `}function formatSetupInstructions(spec,teamName,genieCmd,followFile,followPidFile,followSinceFile){return spec.setup.map((s2)=>{if(s2.kind==="spawn"){let provider=s2.options.provider||"claude";return`- Spawn agent: \`${genieCmd} spawn ${s2.target} --provider ${provider} --team ${teamName}\``}if(s2.kind==="follow")return`- Start detached runtime follow with this exact command (do not use Claude background tasks): \`date -u +"%Y-%m-%dT%H:%M:%SZ" > "${followSinceFile}" && nohup ${genieCmd} log --follow --team ${teamName} --ndjson > "${followFile}" 2>&1 < /dev/null & echo $! > "${followPidFile}" && sleep 2\``;return`- Unknown setup step: ${s2.kind}`}).join(`
4288
4293
  `)}function buildQaCheckCommand(genieCmd,specFile,teamName,followSinceFile){return`${genieCmd} qa check "${specFile}" --team ${teamName} --since-file "${followSinceFile}"`}function formatActionInstructions(spec,teamName,genieCmd,qaCheckCmd){return spec.actions.map((a,i2)=>{let isFinalAction=i2===spec.actions.length-1;if(a.kind==="send")return`${i2+1}. Send message: \`${genieCmd} send '${a.message}' --to ${a.to} --team ${teamName}\``;if(a.kind==="wait"){if(isFinalAction)return`${i2+1}. Finalize in one command: \`sleep ${a.seconds??1} && ${qaCheckCmd}\``;return`${i2+1}. Wait ${a.seconds??1} seconds`}if(a.kind==="run")return`${i2+1}. Run command: \`${rewriteRunCommand(a.command??"",genieCmd)}\``;return`${i2+1}. Unknown action: ${a.kind}`}).join(`
4289
4294
  `)}function rewriteRunCommand(command,genieCmd){if(!command)return command;return command.replace(/(^|[;&|()\s])genie(?=\s|$)/g,`$1${genieCmd}`)}function formatSpecForPrompt(spec){return["### Setup",...spec.setup.map(formatSetupStep),"### Actions",...spec.actions.map(formatActionStep),"### Expectations",...spec.expect.map((e)=>`- [ ] ${e.description}`)].join(`
4290
- `)}function formatSetupStep(s2){if(s2.kind==="spawn"){let opts=Object.entries(s2.options).map(([k,v])=>`${k}: ${v}`).join(", ");return`- spawn ${s2.target}${opts?` (${opts})`:""}`}return`- follow ${s2.target}`}function formatActionStep(a){if(a.kind==="send")return`- send "${a.message}" to ${a.to}`;if(a.kind==="wait")return`- wait ${a.seconds??1}s`;if(a.kind==="run")return`- run ${a.command}`;return`- ${a.kind}`}async function waitForResult(spec,repoPath,teamName,timeoutMs,start3){let subject=`genie.qa.${teamName}.result`,remainingMs=Math.max(timeoutMs-(Date.now()-start3),1),event=await waitForRuntimeEvent({repoPath,subject,team:teamName},remainingMs);if(!event)return makeErrorReport(spec,start3,`Timeout after ${timeoutMs}ms waiting for team-lead report in PG event log`);return parseTeamLeadReport(spec,event.data??{},start3)}function parseTeamLeadReport(spec,payload,start3){try{let data=payload;return{name:spec.name,file:spec.file,result:data.result==="pass"?"pass":"fail",expectations:data.expectations??[],collectedEvents:data.collectedEvents??[],durationMs:Date.now()-start3}}catch(err){return makeErrorReport(spec,start3,`Failed to parse team-lead report: ${err}`)}}function makeErrorReport(spec,start3,error2){return{name:spec.name,file:spec.file,result:"error",expectations:[],collectedEvents:[],durationMs:Date.now()-start3,error:error2}}function computeEffectiveTimeoutMs(spec,requestedTimeoutMs){let totalWaitMs=spec.actions.reduce((sum,action)=>sum+(action.kind==="wait"?(action.seconds??0)*1000:0),0),setupSpawnCount=spec.setup.filter((step)=>step.kind==="spawn").length,orchestrationSlackMs=Math.max(30000,Math.min(90000,15000+Math.floor(totalWaitMs/2)+setupSpawnCount*15000));return requestedTimeoutMs+orchestrationSlackMs}function defaultSpecDir(repoPath){return join74(resolve16(repoPath??process.cwd()),".genie","qa")}init_runtime_events();async function qaCommand(target,options){let specDir=defaultSpecDir(),runnerOpts={timeout:options.timeout??3600,parallel:options.parallel??5,verbose:options.verbose??!1,repoPath:process.cwd(),ndjson:options.ndjson??!1},reports;if(target)reports=await resolveAndRun(specDir,target,runnerOpts);else reports=await runAllSpecs(specDir,runnerOpts);if(reports.length===0){console.error(`\x1B[33mNo QA specs found for "${target??"all"}"\x1B[0m`),process.exitCode=1;return}if(options.ndjson)for(let report of reports)console.log(JSON.stringify(report));else printRunResults(reports,options.verbose??!1);if(!reports.every((r)=>r.result==="pass"))process.exitCode=1}async function qaCheckCommand(specFile,options){let team=options.team??process.env.GENIE_TEAM;if(!team){console.error("Error: QA team not set. Use --team <name> or run inside a QA worker."),process.exitCode=1;return}let repoPath=process.cwd(),spec=await parseQaSpec(specFile),since=options.since??(options.sinceFile?await readSinceValue(options.sinceFile):void 0),teamAgents=(await list()).filter((agent)=>agent.team===team),events=await readTeamLog(teamAgents,repoPath,team,buildQaCheckLogFilter(since)),expectations=evaluateExpectations(spec.expect,events),collectedEvents=toCollectedEvents(events),result2=expectations.every((exp)=>exp.result==="pass")?"pass":"fail";await publishSubjectEvent(repoPath,`genie.qa.${team}.result`,{kind:"qa",agent:"qa",team,text:`QA result: ${result2}`,data:{result:result2,expectations,collectedEvents},source:"hook"}),console.log(`QA result published to PG event log as genie.qa.${team}.result`)}async function qaStatusCommand(options){let specDir=defaultSpecDir(),repoPath=process.cwd(),specs=await listAllSpecs(specDir),results=await loadResults(repoPath);if(specs.length===0){if(options?.json)console.log(JSON.stringify({specs:[],summary:{total:0,pass:0,fail:0,stale:0,never:0}}));else console.error("\x1B[33mNo QA specs found.\x1B[0m");return}if(options?.json)await printJsonStatus(specs,results,repoPath);else await printHumanStatus(specs,results,repoPath)}async function printJsonStatus(specs,results,repoPath){let jsonSpecs=[];for(let spec of specs){let stored=results[spec.key],stale=stored?await isStale(repoPath,spec.key,spec.filePath):!1,status=!stored?"never":stale?"stale":stored.result;jsonSpecs.push({key:spec.key,domain:spec.domain,name:spec.name,status,durationMs:stored?.durationMs??null,lastRun:stored?.lastRun??null,expectations:stored?.expectations??[],error:stored?.error??null})}let counts={total:specs.length,pass:jsonSpecs.filter((s2)=>s2.status==="pass").length,fail:jsonSpecs.filter((s2)=>s2.status==="fail"||s2.status==="error").length,stale:jsonSpecs.filter((s2)=>s2.status==="stale").length,never:jsonSpecs.filter((s2)=>s2.status==="never").length};console.log(JSON.stringify({specs:jsonSpecs,summary:counts}))}async function printHumanStatus(specs,results,repoPath){console.log(),console.log("\x1B[1m QA Status\x1B[0m"),console.log(" \x1B[2m\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\x1B[0m"),console.log();let currentDomain="",counts={pass:0,fail:0,stale:0,never:0};for(let spec of specs){if(spec.domain!==currentDomain)currentDomain=spec.domain,console.log(` \x1B[1m${currentDomain}/\x1B[0m`);let stored=results[spec.key],stale=stored?await isStale(repoPath,spec.key,spec.filePath):!1;console.log(formatStatusLine(spec,stored,stale)),tallyResult(counts,stored,stale)}printStatusSummary(specs.length,counts)}function tallyResult(counts,stored,stale){if(!stored)counts.never++;else if(stale)counts.stale++;else if(stored.result==="pass")counts.pass++;else counts.fail++}function printStatusSummary(total,counts){console.log();let parts=[`${counts.pass}/${total} pass`,counts.fail?`${counts.fail} fail`:"",counts.stale?`${counts.stale} stale`:"",counts.never?`${counts.never} never`:""].filter(Boolean);console.log(` ${parts.join(" | ")}`),console.log()}async function readSinceValue(path3){try{return(await readFile16(path3,"utf-8")).trim()||void 0}catch{return}}function evaluateExpectations(expectations,events){return expectations.map((expectation)=>{let matched=events.filter((event)=>eventMatchesExpectationSource(event,expectation.source)).find((event)=>eventMatchesExpectation(event,expectation.matchers));if(matched)return{description:expectation.description,result:"pass",evidence:`${matched.kind} ${matched.agent}: ${matched.text.slice(0,120)}`};return{description:expectation.description,result:"fail",reason:"No matching event found in team log/transcript snapshot"}})}function eventMatchesExpectation(event,matchers){return Object.entries(matchers).every(([field,expected])=>matcherMatches(readEventField(event,field),expected,field))}function buildQaCheckLogFilter(since){if(since)return{since};return{last:200}}function eventMatchesExpectationSource(event,source){switch(source){case"inbox":return event.source==="mailbox"&&event.direction==="in";case"output":return event.source==="provider";default:return!0}}function readEventField(event,field){switch(field){case"timestamp":return event.timestamp;case"kind":return event.kind;case"agent":return event.agent;case"team":return event.team;case"direction":return event.direction;case"peer":return event.peer;case"text":return event.text;case"source":return event.source;default:break}return event.data?.[field]}function matcherMatches(actual,expected,field){if(actual==null)return!1;if(field==="kind"&&expected==="message")return["message","assistant","user"].includes(String(actual));let actualText=String(actual);if(expected.startsWith("~"))return actualText.includes(expected.slice(1));return actualText===expected}function toCollectedEvents(events){return events.slice(-50).map((event)=>({timestamp:event.timestamp,kind:event.kind,agent:event.agent,text:event.text}))}async function qaHistoryCommand(){let repoPath=process.cwd(),results=await loadResults(repoPath),entries=Object.entries(results).map(([key,r])=>({key,...r})).sort((a,b2)=>new Date(b2.lastRun).getTime()-new Date(a.lastRun).getTime());if(entries.length===0){console.error("\x1B[33mNo QA history found. Run `genie qa` first.\x1B[0m");return}console.log(),console.log("\x1B[1m QA History\x1B[0m"),console.log();let limit=20;for(let entry2 of entries.slice(0,limit)){let icon=resultIcon(entry2.result),duration=entry2.durationMs?`${(entry2.durationMs/1000).toFixed(1)}s`:"-",ago=formatTimeAgo(entry2.lastRun);console.log(` ${icon} ${entry2.key.padEnd(35)} ${duration.padStart(6)} \x1B[2m${ago}\x1B[0m`)}if(entries.length>limit)console.log(` \x1B[2m... and ${entries.length-limit} more\x1B[0m`);console.log()}async function resolveAndRun(specDir,target,opts){let domainDir=join75(specDir,target);if(await isDirectory(domainDir))return runDomainSpecs(specDir,target,opts);let specPath=await resolveSpecPath(specDir,target);if(specPath){let spec=await parseQaSpec(specPath),key=specKeyFromPath(specDir,specPath),report=await runSpec(spec,{...opts,specKey:key}),repoPath=opts.repoPath??process.cwd();return await saveResult(repoPath,key,report),[report]}console.error(`\x1B[31mSpec or domain not found: ${target}\x1B[0m`),console.error("Available:");let allSpecs=await listAllSpecs(specDir),domains=[...new Set(allSpecs.map((s2)=>s2.domain))];for(let d of domains)console.error(` \x1B[1m${d}/\x1B[0m`);for(let s2 of allSpecs)console.error(` ${s2.key}`);return process.exitCode=1,[]}async function resolveSpecPath(specDir,name){let candidates=[join75(specDir,name),join75(specDir,`${name}.md`)];for(let path3 of candidates)if(await isFile(path3))return path3;return null}function resultIcon(result2){if(result2==="pass")return"\x1B[32m\u2705\x1B[0m";if(result2==="fail")return"\x1B[31m\u274C\x1B[0m";if(result2==="error")return"\x1B[33m\u26A0\uFE0F\x1B[0m";return"\uD83D\uDD18"}function formatStatusLine(spec,stored,stale){if(!stored)return` \uD83D\uDD18 ${spec.name.padEnd(25)} ${"-".padStart(6)} \x1B[2mnever\x1B[0m`;if(stale){let ago2=formatTimeAgo(stored.lastRun);return` \u26A0\uFE0F ${spec.name.padEnd(25)} ${"-".padStart(6)} \x1B[33m${ago2} (stale)\x1B[0m`}let icon=resultIcon(stored.result),duration=stored.durationMs?`${(stored.durationMs/1000).toFixed(0)}s`:"-",ago=formatTimeAgo(stored.lastRun);return` ${icon} ${spec.name.padEnd(25)} ${duration.padStart(6)} \x1B[2m${ago}\x1B[0m`}function printRunResults(reports,verbose){console.log(),console.log("\x1B[1m QA Results\x1B[0m"),console.log();for(let report of reports)printReport2(report,verbose);let passed=reports.filter((r)=>r.result==="pass").length,failed=reports.filter((r)=>r.result==="fail").length,errors3=reports.filter((r)=>r.result==="error").length,total=reports.length,color2=failed+errors3>0?"\x1B[31m":"\x1B[32m",failedStr=failed?` \x1B[31m${failed} failed\x1B[0m`:"",errorsStr=errors3?` \x1B[33m${errors3} errors\x1B[0m`:"";console.log(` ${color2}${passed}/${total} passed\x1B[0m${failedStr}${errorsStr}`),console.log()}function printReport2(report,verbose){let duration=`${(report.durationMs/1000).toFixed(1)}s`;if(console.log(` ${resultIcon(report.result)} ${report.name} \x1B[2m(${duration})\x1B[0m`),report.error)console.log(` \x1B[31mError: ${report.error}\x1B[0m`);for(let exp of report.expectations)printExpectation(exp);if(verbose&&report.collectedEvents.length>0){console.log(` \x1B[2m--- Collected events (${report.collectedEvents.length}) ---\x1B[0m`);for(let event of report.collectedEvents)console.log(` \x1B[2m ${event.timestamp} ${event.kind} ${event.agent}: ${event.text.slice(0,80)}\x1B[0m`)}console.log()}function printExpectation(exp){let icon=exp.result==="pass"?"\x1B[32m\u2713\x1B[0m":"\x1B[31m\u2717\x1B[0m";if(console.log(` ${icon} ${exp.description}`),exp.result==="pass"&&exp.evidence)console.log(` \x1B[2m${exp.evidence}\x1B[0m`);if(exp.result==="fail"&&exp.reason)console.log(` \x1B[31m${exp.reason}\x1B[0m`)}async function isDirectory(path3){try{return(await stat10(path3)).isDirectory()}catch{return!1}}async function isFile(path3){try{return(await stat10(path3)).isFile()}catch{return!1}}init_read();init_term_format();var _taskService6;async function getTaskService6(){if(!_taskService6)_taskService6=await Promise.resolve().then(() => (init_task_service(),exports_task_service));return _taskService6}function registerReleaseCommands(program2){let release=program2.command("release").description("Release management");release.command("create <name>").description("Create a release and assign tasks to it").requiredOption("--tasks <ids...>","Task IDs or #seqs to include").action(async(name,options)=>{try{let updated=await(await getTaskService6()).setRelease(options.tasks,name);console.log(`Release "${name}" created with ${updated} task${updated===1?"":"s"}.`)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}}),release.command("list").description("List all releases").option("--json","Output as JSON").action(async(options)=>{try{let releases=await(await getTaskService6()).listReleases();if(options.json){console.log(JSON.stringify(releases,null,2));return}if(releases.length===0){console.log("No releases found.");return}console.log(` ${padRight("RELEASE",30)} TASKS`),console.log(` ${"\u2500".repeat(40)}`);for(let r of releases)console.log(` ${padRight(r.releaseId,30)} ${r.count}`);console.log(`
4295
+ `)}function formatSetupStep(s2){if(s2.kind==="spawn"){let opts=Object.entries(s2.options).map(([k,v])=>`${k}: ${v}`).join(", ");return`- spawn ${s2.target}${opts?` (${opts})`:""}`}return`- follow ${s2.target}`}function formatActionStep(a){if(a.kind==="send")return`- send "${a.message}" to ${a.to}`;if(a.kind==="wait")return`- wait ${a.seconds??1}s`;if(a.kind==="run")return`- run ${a.command}`;return`- ${a.kind}`}async function waitForResult(spec,repoPath,teamName,timeoutMs,start3){let subject=`genie.qa.${teamName}.result`,remainingMs=Math.max(timeoutMs-(Date.now()-start3),1),event=await waitForRuntimeEvent({repoPath,subject,team:teamName},remainingMs);if(!event)return makeErrorReport(spec,start3,`Timeout after ${timeoutMs}ms waiting for team-lead report in PG event log`);return parseTeamLeadReport(spec,event.data??{},start3)}function parseTeamLeadReport(spec,payload,start3){try{let data=payload;return{name:spec.name,file:spec.file,result:data.result==="pass"?"pass":"fail",expectations:data.expectations??[],collectedEvents:data.collectedEvents??[],durationMs:Date.now()-start3}}catch(err){return makeErrorReport(spec,start3,`Failed to parse team-lead report: ${err}`)}}function makeErrorReport(spec,start3,error2){return{name:spec.name,file:spec.file,result:"error",expectations:[],collectedEvents:[],durationMs:Date.now()-start3,error:error2}}function computeEffectiveTimeoutMs(spec,requestedTimeoutMs){let totalWaitMs=spec.actions.reduce((sum,action)=>sum+(action.kind==="wait"?(action.seconds??0)*1000:0),0),setupSpawnCount=spec.setup.filter((step)=>step.kind==="spawn").length,orchestrationSlackMs=Math.max(30000,Math.min(90000,15000+Math.floor(totalWaitMs/2)+setupSpawnCount*15000));return requestedTimeoutMs+orchestrationSlackMs}function defaultSpecDir(repoPath){return join75(resolve16(repoPath??process.cwd()),".genie","qa")}init_runtime_events();async function qaCommand(target,options){let specDir=defaultSpecDir(),runnerOpts={timeout:options.timeout??3600,parallel:options.parallel??5,verbose:options.verbose??!1,repoPath:process.cwd(),ndjson:options.ndjson??!1},reports;if(target)reports=await resolveAndRun(specDir,target,runnerOpts);else reports=await runAllSpecs(specDir,runnerOpts);if(reports.length===0){console.error(`\x1B[33mNo QA specs found for "${target??"all"}"\x1B[0m`),process.exitCode=1;return}if(options.ndjson)for(let report of reports)console.log(JSON.stringify(report));else printRunResults(reports,options.verbose??!1);if(!reports.every((r)=>r.result==="pass"))process.exitCode=1}async function qaCheckCommand(specFile,options){let team=options.team??process.env.GENIE_TEAM;if(!team){console.error("Error: QA team not set. Use --team <name> or run inside a QA worker."),process.exitCode=1;return}let repoPath=process.cwd(),spec=await parseQaSpec(specFile),since=options.since??(options.sinceFile?await readSinceValue(options.sinceFile):void 0),teamAgents=(await list()).filter((agent)=>agent.team===team),events=await readTeamLog(teamAgents,repoPath,team,buildQaCheckLogFilter(since)),expectations=evaluateExpectations(spec.expect,events),collectedEvents=toCollectedEvents(events),result2=expectations.every((exp)=>exp.result==="pass")?"pass":"fail";await publishSubjectEvent(repoPath,`genie.qa.${team}.result`,{kind:"qa",agent:"qa",team,text:`QA result: ${result2}`,data:{result:result2,expectations,collectedEvents},source:"hook"}),console.log(`QA result published to PG event log as genie.qa.${team}.result`)}async function qaStatusCommand(options){let specDir=defaultSpecDir(),repoPath=process.cwd(),specs=await listAllSpecs(specDir),results=await loadResults(repoPath);if(specs.length===0){if(options?.json)console.log(JSON.stringify({specs:[],summary:{total:0,pass:0,fail:0,stale:0,never:0}}));else console.error("\x1B[33mNo QA specs found.\x1B[0m");return}if(options?.json)await printJsonStatus(specs,results,repoPath);else await printHumanStatus(specs,results,repoPath)}async function printJsonStatus(specs,results,repoPath){let jsonSpecs=[];for(let spec of specs){let stored=results[spec.key],stale=stored?await isStale(repoPath,spec.key,spec.filePath):!1,status=!stored?"never":stale?"stale":stored.result;jsonSpecs.push({key:spec.key,domain:spec.domain,name:spec.name,status,durationMs:stored?.durationMs??null,lastRun:stored?.lastRun??null,expectations:stored?.expectations??[],error:stored?.error??null})}let counts={total:specs.length,pass:jsonSpecs.filter((s2)=>s2.status==="pass").length,fail:jsonSpecs.filter((s2)=>s2.status==="fail"||s2.status==="error").length,stale:jsonSpecs.filter((s2)=>s2.status==="stale").length,never:jsonSpecs.filter((s2)=>s2.status==="never").length};console.log(JSON.stringify({specs:jsonSpecs,summary:counts}))}async function printHumanStatus(specs,results,repoPath){console.log(),console.log("\x1B[1m QA Status\x1B[0m"),console.log(" \x1B[2m\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\x1B[0m"),console.log();let currentDomain="",counts={pass:0,fail:0,stale:0,never:0};for(let spec of specs){if(spec.domain!==currentDomain)currentDomain=spec.domain,console.log(` \x1B[1m${currentDomain}/\x1B[0m`);let stored=results[spec.key],stale=stored?await isStale(repoPath,spec.key,spec.filePath):!1;console.log(formatStatusLine(spec,stored,stale)),tallyResult(counts,stored,stale)}printStatusSummary(specs.length,counts)}function tallyResult(counts,stored,stale){if(!stored)counts.never++;else if(stale)counts.stale++;else if(stored.result==="pass")counts.pass++;else counts.fail++}function printStatusSummary(total,counts){console.log();let parts=[`${counts.pass}/${total} pass`,counts.fail?`${counts.fail} fail`:"",counts.stale?`${counts.stale} stale`:"",counts.never?`${counts.never} never`:""].filter(Boolean);console.log(` ${parts.join(" | ")}`),console.log()}async function readSinceValue(path3){try{return(await readFile16(path3,"utf-8")).trim()||void 0}catch{return}}function evaluateExpectations(expectations,events){return expectations.map((expectation)=>{let matched=events.filter((event)=>eventMatchesExpectationSource(event,expectation.source)).find((event)=>eventMatchesExpectation(event,expectation.matchers));if(matched)return{description:expectation.description,result:"pass",evidence:`${matched.kind} ${matched.agent}: ${matched.text.slice(0,120)}`};return{description:expectation.description,result:"fail",reason:"No matching event found in team log/transcript snapshot"}})}function eventMatchesExpectation(event,matchers){return Object.entries(matchers).every(([field,expected])=>matcherMatches(readEventField(event,field),expected,field))}function buildQaCheckLogFilter(since){if(since)return{since};return{last:200}}function eventMatchesExpectationSource(event,source){switch(source){case"inbox":return event.source==="mailbox"&&event.direction==="in";case"output":return event.source==="provider";default:return!0}}function readEventField(event,field){switch(field){case"timestamp":return event.timestamp;case"kind":return event.kind;case"agent":return event.agent;case"team":return event.team;case"direction":return event.direction;case"peer":return event.peer;case"text":return event.text;case"source":return event.source;default:break}return event.data?.[field]}function matcherMatches(actual,expected,field){if(actual==null)return!1;if(field==="kind"&&expected==="message")return["message","assistant","user"].includes(String(actual));let actualText=String(actual);if(expected.startsWith("~"))return actualText.includes(expected.slice(1));return actualText===expected}function toCollectedEvents(events){return events.slice(-50).map((event)=>({timestamp:event.timestamp,kind:event.kind,agent:event.agent,text:event.text}))}async function qaHistoryCommand(){let repoPath=process.cwd(),results=await loadResults(repoPath),entries=Object.entries(results).map(([key,r])=>({key,...r})).sort((a,b2)=>new Date(b2.lastRun).getTime()-new Date(a.lastRun).getTime());if(entries.length===0){console.error("\x1B[33mNo QA history found. Run `genie qa` first.\x1B[0m");return}console.log(),console.log("\x1B[1m QA History\x1B[0m"),console.log();let limit=20;for(let entry2 of entries.slice(0,limit)){let icon=resultIcon(entry2.result),duration=entry2.durationMs?`${(entry2.durationMs/1000).toFixed(1)}s`:"-",ago=formatTimeAgo(entry2.lastRun);console.log(` ${icon} ${entry2.key.padEnd(35)} ${duration.padStart(6)} \x1B[2m${ago}\x1B[0m`)}if(entries.length>limit)console.log(` \x1B[2m... and ${entries.length-limit} more\x1B[0m`);console.log()}async function resolveAndRun(specDir,target,opts){let domainDir=join76(specDir,target);if(await isDirectory(domainDir))return runDomainSpecs(specDir,target,opts);let specPath=await resolveSpecPath(specDir,target);if(specPath){let spec=await parseQaSpec(specPath),key=specKeyFromPath(specDir,specPath),report=await runSpec(spec,{...opts,specKey:key}),repoPath=opts.repoPath??process.cwd();return await saveResult(repoPath,key,report),[report]}console.error(`\x1B[31mSpec or domain not found: ${target}\x1B[0m`),console.error("Available:");let allSpecs=await listAllSpecs(specDir),domains=[...new Set(allSpecs.map((s2)=>s2.domain))];for(let d of domains)console.error(` \x1B[1m${d}/\x1B[0m`);for(let s2 of allSpecs)console.error(` ${s2.key}`);return process.exitCode=1,[]}async function resolveSpecPath(specDir,name){let candidates=[join76(specDir,name),join76(specDir,`${name}.md`)];for(let path3 of candidates)if(await isFile(path3))return path3;return null}function resultIcon(result2){if(result2==="pass")return"\x1B[32m\u2705\x1B[0m";if(result2==="fail")return"\x1B[31m\u274C\x1B[0m";if(result2==="error")return"\x1B[33m\u26A0\uFE0F\x1B[0m";return"\uD83D\uDD18"}function formatStatusLine(spec,stored,stale){if(!stored)return` \uD83D\uDD18 ${spec.name.padEnd(25)} ${"-".padStart(6)} \x1B[2mnever\x1B[0m`;if(stale){let ago2=formatTimeAgo(stored.lastRun);return` \u26A0\uFE0F ${spec.name.padEnd(25)} ${"-".padStart(6)} \x1B[33m${ago2} (stale)\x1B[0m`}let icon=resultIcon(stored.result),duration=stored.durationMs?`${(stored.durationMs/1000).toFixed(0)}s`:"-",ago=formatTimeAgo(stored.lastRun);return` ${icon} ${spec.name.padEnd(25)} ${duration.padStart(6)} \x1B[2m${ago}\x1B[0m`}function printRunResults(reports,verbose){console.log(),console.log("\x1B[1m QA Results\x1B[0m"),console.log();for(let report of reports)printReport2(report,verbose);let passed=reports.filter((r)=>r.result==="pass").length,failed=reports.filter((r)=>r.result==="fail").length,errors3=reports.filter((r)=>r.result==="error").length,total=reports.length,color2=failed+errors3>0?"\x1B[31m":"\x1B[32m",failedStr=failed?` \x1B[31m${failed} failed\x1B[0m`:"",errorsStr=errors3?` \x1B[33m${errors3} errors\x1B[0m`:"";console.log(` ${color2}${passed}/${total} passed\x1B[0m${failedStr}${errorsStr}`),console.log()}function printReport2(report,verbose){let duration=`${(report.durationMs/1000).toFixed(1)}s`;if(console.log(` ${resultIcon(report.result)} ${report.name} \x1B[2m(${duration})\x1B[0m`),report.error)console.log(` \x1B[31mError: ${report.error}\x1B[0m`);for(let exp of report.expectations)printExpectation(exp);if(verbose&&report.collectedEvents.length>0){console.log(` \x1B[2m--- Collected events (${report.collectedEvents.length}) ---\x1B[0m`);for(let event of report.collectedEvents)console.log(` \x1B[2m ${event.timestamp} ${event.kind} ${event.agent}: ${event.text.slice(0,80)}\x1B[0m`)}console.log()}function printExpectation(exp){let icon=exp.result==="pass"?"\x1B[32m\u2713\x1B[0m":"\x1B[31m\u2717\x1B[0m";if(console.log(` ${icon} ${exp.description}`),exp.result==="pass"&&exp.evidence)console.log(` \x1B[2m${exp.evidence}\x1B[0m`);if(exp.result==="fail"&&exp.reason)console.log(` \x1B[31m${exp.reason}\x1B[0m`)}async function isDirectory(path3){try{return(await stat10(path3)).isDirectory()}catch{return!1}}async function isFile(path3){try{return(await stat10(path3)).isFile()}catch{return!1}}init_read();init_term_format();var _taskService6;async function getTaskService6(){if(!_taskService6)_taskService6=await Promise.resolve().then(() => (init_task_service(),exports_task_service));return _taskService6}function registerReleaseCommands(program2){let release=program2.command("release").description("Release management");release.command("create <name>").description("Create a release and assign tasks to it").requiredOption("--tasks <ids...>","Task IDs or #seqs to include").action(async(name,options)=>{try{let updated=await(await getTaskService6()).setRelease(options.tasks,name);console.log(`Release "${name}" created with ${updated} task${updated===1?"":"s"}.`)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}}),release.command("list").description("List all releases").option("--json","Output as JSON").action(async(options)=>{try{let releases=await(await getTaskService6()).listReleases();if(options.json){console.log(JSON.stringify(releases,null,2));return}if(releases.length===0){console.log("No releases found.");return}console.log(` ${padRight("RELEASE",30)} TASKS`),console.log(` ${"\u2500".repeat(40)}`);for(let r of releases)console.log(` ${padRight(r.releaseId,30)} ${r.count}`);console.log(`
4291
4296
  ${releases.length} release${releases.length===1?"":"s"}`)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}})}init_cron();init_db();init_term_format();function formatTimestamp2(iso){return formatTimestamp(iso,{seconds:!0})}var defaultScheduleCommandDeps={getConnection,shutdown,exit:(code)=>process.exit(code),stdout:console,stderr:console};function parseAbsoluteTime(input){let date=new Date(input);if(Number.isNaN(date.getTime()))throw Error(`Invalid time: "${input}". Expected ISO 8601 format (e.g., 2026-03-21T09:00)`);return date}function isCronExpression(input){let parts=input.trim().split(/\s+/);return parts.length>=5&&parts.length<=6}function computeFirstDueAt(options){if(options.at){let dueAt=parseAbsoluteTime(options.at);if(dueAt.getTime()<=Date.now())throw Error(`Schedule time is in the past: ${options.at}`);return{dueAt,cronExpr:"@once",scheduleType:"once"}}if(options.after){let delayMs=parseDuration(options.after);return{dueAt:new Date(Date.now()+delayMs),cronExpr:"@once",scheduleType:"once"}}if(options.every){if(isCronExpression(options.every))return{dueAt:computeNextCronDue(options.every,{timezone:options.timezone}),cronExpr:options.every,scheduleType:"cron"};let intervalMs=parseDuration(options.every);return{dueAt:new Date(Date.now()+intervalMs),cronExpr:`@every ${options.every.trim()}`,scheduleType:"interval"}}throw Error("One of --at, --every, or --after is required")}function generateId(){return crypto.randomUUID()}function formatDuration4(ms){if(ms==null||ms<0)return"-";if(ms<1000)return`${ms}ms`;if(ms<60000)return`${(ms/1000).toFixed(1)}s`;if(ms<3600000)return`${(ms/60000).toFixed(1)}m`;return`${(ms/3600000).toFixed(1)}h`}function printTable2(headers,rows){let widths=headers.map((h,i2)=>{let colValues=rows.map((r)=>(r[i2]??"").length);return Math.max(h.length,...colValues)}),headerLine=headers.map((h,i2)=>padRight(h,widths[i2])).join(" ");console.log(headerLine),console.log(widths.map((w)=>"\u2500".repeat(w)).join("\u2500\u2500"));for(let row of rows){let line=row.map((val,i2)=>padRight(val??"",widths[i2])).join(" ");console.log(line)}console.log(`(${rows.length} row${rows.length===1?"":"s"})`)}async function scheduleCreateCommand(name,options){if(!options.command)console.error("Error: --command is required"),process.exit(1);if(!options.at&&!options.every&&!options.after)console.error("Error: one of --at, --every, or --after is required"),process.exit(1);try{let{dueAt,cronExpr,scheduleType}=computeFirstDueAt(options),sql=await getConnection();if((await sql`SELECT id FROM schedules WHERE name = ${name} AND status = 'active'`).length>0)console.error(`Error: schedule "${name}" already exists. Cancel it first or use a different name.`),process.exit(1);let scheduleId=generateId(),triggerId=generateId(),runSpec2=options.leaseTimeout?{lease_timeout_ms:parseDuration(options.leaseTimeout)}:{},metadata={type:scheduleType,original_spec:options.at??options.every??options.after,timezone:options.timezone??"UTC"};await sql.begin(async(tx)=>{await tx`
4292
4297
  INSERT INTO schedules (id, name, cron_expression, timezone, command, run_spec, metadata, status)
4293
4298
  VALUES (${scheduleId}, ${name}, ${cronExpr}, ${options.timezone??"UTC"}, ${options.command}, ${JSON.stringify(runSpec2)}, ${JSON.stringify(metadata)}, 'active')
@@ -4363,9 +4368,9 @@ Team: ${teamName}
4363
4368
  LIMIT ${limit}
4364
4369
  `;if(rows.length===0){console.log(`No execution history for schedule "${schedule.name}"`),await shutdown();return}console.log(`
4365
4370
  History for "${schedule.name}":
4366
- `);let tableRows=rows.map((r)=>[formatTimestamp2(r.due_at),r.trigger_status,r.run_status??"-",formatDuration4(r.duration_ms),r.error?r.error.slice(0,60):"-"]);printTable2(["DUE AT","TRIGGER","RUN","DURATION","ERROR"],tableRows),await shutdown()}catch(error2){let message=error2 instanceof Error?error2.message:String(error2);console.error(`Error: ${message}`),process.exit(1)}}function registerScheduleCommands(program2){let schedule=program2.command("schedule").description("Manage scheduled triggers");schedule.command("create <name>").description("Create a new schedule").requiredOption("--command <cmd>",'Command to execute (e.g., "genie spawn reviewer")').option("--at <time>","One-time schedule at absolute time (ISO 8601)").option("--every <interval>","Repeating schedule: duration (10m, 2h, 24h) or cron expression").option("--after <duration>","One-time schedule after delay (10m, 2h)").option("--timezone <tz>","Timezone for schedule (default: UTC)","UTC").option("--lease-timeout <duration>","Lease timeout for runs (default: 5m)").action(async(name,options)=>{await scheduleCreateCommand(name,options)}),schedule.command("list").description("List schedules with next due trigger").option("--json","Output as JSON").option("--watch","Refresh every 2s").action(async(options)=>{await scheduleListCommand(options)}),schedule.command("cancel <name>").description("Cancel a schedule and skip pending triggers").option("--filter <expr>","Filter expression (e.g., status=pending)").action(async(name,options)=>{await scheduleCancelCommand(name,options)}),schedule.command("retry <name>").description("Reset a failed trigger to pending").action(async(name)=>{await scheduleRetryCommand(name)}),schedule.command("history <name>").description("Show past executions for a schedule").option("--limit <n>","Max rows to show (default: 20)",Number.parseInt).action(async(name,options)=>{await scheduleHistoryCommand(name,options)})}import{spawnSync as spawnSync8}from"child_process";import{existsSync as existsSync62,readFileSync as readFileSync38,readdirSync as readdirSync13,realpathSync as realpathSync7}from"fs";import{dirname as dirname20,join as join76,resolve as resolve17}from"path";var defaultDeps5={existsSync:existsSync62,realpathSync:realpathSync7,readFileSync:(path3,encoding)=>readFileSync38(path3,encoding),spawnSync:(command,args,options)=>spawnSync8(command,args,options),setExitCode:(exitCode)=>{process.exitCode=exitCode},stdout:(line)=>process.stdout.write(`${line}
4371
+ `);let tableRows=rows.map((r)=>[formatTimestamp2(r.due_at),r.trigger_status,r.run_status??"-",formatDuration4(r.duration_ms),r.error?r.error.slice(0,60):"-"]);printTable2(["DUE AT","TRIGGER","RUN","DURATION","ERROR"],tableRows),await shutdown()}catch(error2){let message=error2 instanceof Error?error2.message:String(error2);console.error(`Error: ${message}`),process.exit(1)}}function registerScheduleCommands(program2){let schedule=program2.command("schedule").description("Manage scheduled triggers");schedule.command("create <name>").description("Create a new schedule").requiredOption("--command <cmd>",'Command to execute (e.g., "genie spawn reviewer")').option("--at <time>","One-time schedule at absolute time (ISO 8601)").option("--every <interval>","Repeating schedule: duration (10m, 2h, 24h) or cron expression").option("--after <duration>","One-time schedule after delay (10m, 2h)").option("--timezone <tz>","Timezone for schedule (default: UTC)","UTC").option("--lease-timeout <duration>","Lease timeout for runs (default: 5m)").action(async(name,options)=>{await scheduleCreateCommand(name,options)}),schedule.command("list").description("List schedules with next due trigger").option("--json","Output as JSON").option("--watch","Refresh every 2s").action(async(options)=>{await scheduleListCommand(options)}),schedule.command("cancel <name>").description("Cancel a schedule and skip pending triggers").option("--filter <expr>","Filter expression (e.g., status=pending)").action(async(name,options)=>{await scheduleCancelCommand(name,options)}),schedule.command("retry <name>").description("Reset a failed trigger to pending").action(async(name)=>{await scheduleRetryCommand(name)}),schedule.command("history <name>").description("Show past executions for a schedule").option("--limit <n>","Max rows to show (default: 20)",Number.parseInt).action(async(name,options)=>{await scheduleHistoryCommand(name,options)})}import{spawnSync as spawnSync8}from"child_process";import{existsSync as existsSync63,readFileSync as readFileSync39,readdirSync as readdirSync13,realpathSync as realpathSync7}from"fs";import{dirname as dirname21,join as join77,resolve as resolve17}from"path";var defaultDeps5={existsSync:existsSync63,realpathSync:realpathSync7,readFileSync:(path3,encoding)=>readFileSync39(path3,encoding),spawnSync:(command,args,options)=>spawnSync8(command,args,options),setExitCode:(exitCode)=>{process.exitCode=exitCode},stdout:(line)=>process.stdout.write(`${line}
4367
4372
  `),stderr:(line)=>process.stderr.write(`${line}
4368
- `),now:()=>new Date};function collectRepeatedOption(value,previous){return[...previous,value]}function collectKillPid(value,previous){let pid=Number.parseInt(value,10);if(!Number.isFinite(pid)||pid<=0)throw Error(`--kill-pid expects a positive integer, got "${value}"`);return[...previous,pid]}function resolveGenieRoot2(argv1=process.argv[1],deps=defaultDeps5){try{if(argv1){let scriptDir=dirname20(deps.realpathSync(argv1)),candidates=[resolve17(scriptDir,".."),resolve17(scriptDir,"..","..")];for(let candidate of candidates)if(deps.existsSync(join76(candidate,"package.json")))return candidate}}catch{}return resolve17(import.meta.dir,"..","..")}function resolveSecScanScript(argv1=process.argv[1],deps=defaultDeps5){let root=resolveGenieRoot2(argv1,deps),scriptPath=join76(root,"scripts","sec-scan.cjs");if(!deps.existsSync(scriptPath))throw Error(`Security scanner payload not found at ${scriptPath}`);return scriptPath}function resolveSecRemediateScript(argv1=process.argv[1],deps=defaultDeps5){let root=resolveGenieRoot2(argv1,deps),scriptPath=join76(root,"scripts","sec-remediate.cjs");if(!deps.existsSync(scriptPath))throw Error(`Security remediation payload not found at ${scriptPath}`);return scriptPath}function resolveSecFixScript(argv1=process.argv[1],deps=defaultDeps5){let root=resolveGenieRoot2(argv1,deps),scriptPath=join76(root,"scripts","sec-fix.cjs");if(!deps.existsSync(scriptPath))throw Error(`Security fix payload not found at ${scriptPath}`);return scriptPath}function buildSecFixArgv(options){let args=[];if(options.yes)args.push("--yes");if(options.json)args.push("--json");if(options.skipReinstall)args.push("--skip-reinstall");if(options.skipRescan)args.push("--skip-rescan");if(options.dryRun)args.push("--dry-run");if(options.unsafeUnverified)args.push("--unsafe-unverified",options.unsafeUnverified);return args}function runSecFix(options,deps=defaultDeps5){let args=[resolveSecFixScript(process.argv[1],deps),...buildSecFixArgv(options)],result2=deps.spawnSync(process.execPath,args,{stdio:"inherit"});if(result2.error)throw result2.error;return result2.status??1}var BOOLEAN_FLAG_MAP=[["json","--json"],["allHomes","--all-homes"],["noProgress","--no-progress"],["quiet","--quiet"],["verbose","--verbose"],["progressJson","--progress-json"],["redact","--redact"],["impactSurface","--impact-surface"]],REPEATED_FLAG_MAP=[["home","--home"],["root","--root"],["phaseBudget","--phase-budget"]],STRING_FLAG_MAP=[["progressInterval","--progress-interval"],["eventsFile","--events-file"]];function buildSecScanArgv(options){let args=[];for(let[key,flag]of BOOLEAN_FLAG_MAP)if(options[key])args.push(flag);for(let[key,flag]of REPEATED_FLAG_MAP){let values2=options[key]??[];for(let value of values2)args.push(flag,value)}for(let[key,flag]of STRING_FLAG_MAP){let value=options[key];if(value)args.push(flag,value)}if(options.persist===!1)args.push("--no-persist");return args}function buildSecRemediateArgv(options){let args=[];if(options.dryRun)args.push("--dry-run");if(options.apply)args.push("--apply");if(options.resume)args.push("--resume",options.resume);if(options.scanReport)args.push("--scan-report",options.scanReport);if(options.scanId)args.push("--scan-id",options.scanId);if(options.plan)args.push("--plan",options.plan);if(options.quarantineDir)args.push("--quarantine-dir",options.quarantineDir);if(options.unsafeUnverified)args.push("--unsafe-unverified",options.unsafeUnverified);if(options.remediatePartial)args.push("--remediate-partial");if(options.confirmIncompleteScan)args.push("--confirm-incomplete-scan",options.confirmIncompleteScan);for(let pid of options.killPid??[])args.push("--kill-pid",String(pid));if(options.autoConfirmFrom)args.push("--auto-confirm-from",options.autoConfirmFrom);if(options.json)args.push("--json");return args}function runSecScan(options,deps=defaultDeps5){let args=[resolveSecScanScript(process.argv[1],deps),...buildSecScanArgv(options)],result2=deps.spawnSync(process.execPath,args,{stdio:"inherit"});if(result2.error)throw result2.error;return result2.status??1}function runSecRemediate(options,deps=defaultDeps5){let args=[resolveSecRemediateScript(process.argv[1],deps),...buildSecRemediateArgv(options)],result2=deps.spawnSync(process.execPath,args,{stdio:"inherit"});if(result2.error)throw result2.error;return result2.status??1}function runSecRestore(quarantineId,deps=defaultDeps5){let args=[resolveSecRemediateScript(process.argv[1],deps),"--restore",quarantineId],result2=deps.spawnSync(process.execPath,args,{stdio:"inherit"});if(result2.error)throw result2.error;return result2.status??1}function buildSecRollbackArgv(scanId,options){let args=["--rollback",scanId];if(options.json)args.push("--json");return args}function buildSecQuarantineListArgv(options){let args=["--quarantine-list"];if(options.json)args.push("--json");return args}function buildSecQuarantineGcArgv(options){let args=["--quarantine-gc"];if(options.olderThan)args.push("--older-than",options.olderThan);if(options.confirmGc)args.push("--confirm-gc",options.confirmGc);if(options.json)args.push("--json");return args}function runSecRollback(scanId,options,deps=defaultDeps5){let args=[resolveSecRemediateScript(process.argv[1],deps),...buildSecRollbackArgv(scanId,options)],result2=deps.spawnSync(process.execPath,args,{stdio:"inherit"});if(result2.error)throw result2.error;return result2.status??1}function runSecQuarantineList(options,deps=defaultDeps5){let args=[resolveSecRemediateScript(process.argv[1],deps),...buildSecQuarantineListArgv(options)],result2=deps.spawnSync(process.execPath,args,{stdio:"inherit"});if(result2.error)throw result2.error;return result2.status??1}function runSecQuarantineGc(options,deps=defaultDeps5){let args=[resolveSecRemediateScript(process.argv[1],deps),...buildSecQuarantineGcArgv(options)],result2=deps.spawnSync(process.execPath,args,{stdio:"inherit"});if(result2.error)throw result2.error;return result2.status??1}function applySecScanExitCode(exitCode,deps=defaultDeps5){if(exitCode!==0)deps.setExitCode(exitCode)}var VERIFY_EXIT={VERIFIED:0,SIGNATURE_INVALID:2,SIGNER_IDENTITY_MISMATCH:3,PROVENANCE_INVALID:4,NO_SIGNATURE_MATERIAL:5,MISSING_BINARY:127},SIGNER_IDENTITY_REGEXP="^https://github.com/automagik-dev/genie/.github/workflows/release.yml@",SIGNER_OIDC_ISSUER="https://token.actions.githubusercontent.com",PROVENANCE_SOURCE_URI="github.com/automagik-dev/genie",COSIGN_NO_KEY_SENTINEL="BEGIN COSIGN NO-PINNED-KEY SENTINEL";function discoverSignatureBundle(bundleDir,deps=defaultDeps5){if(!deps.existsSync(bundleDir))return null;let candidates=[];try{for(let entry2 of readdirSync13(bundleDir))if(entry2.endsWith(".tgz"))candidates.push(entry2)}catch{return null}for(let tarballName of candidates){let tarball=join76(bundleDir,tarballName),signature=`${tarball}.sig`,certificate=`${tarball}.cert`;if(!deps.existsSync(signature))continue;if(!deps.existsSync(certificate))continue;let provenancePath=join76(bundleDir,"provenance.intoto.jsonl"),provenance=deps.existsSync(provenancePath)?provenancePath:null;return{tarball,signature,certificate,provenance}}return null}function readsAsCosignSentinel(path3,deps=defaultDeps5){if(!deps.existsSync(path3))return!1;try{return deps.readFileSync(path3,"utf8").includes(COSIGN_NO_KEY_SENTINEL)}catch{return!1}}function ensureBinary(name,deps){let result2=deps.spawnSync(name,["--version"],{stdio:"pipe",encoding:"utf8"});if(result2.error)return{ok:!1,binary:name,reason:result2.error.message};if((result2.status??1)!==0)return{ok:!1,binary:name,reason:`${name} --version exited non-zero`};return{ok:!0,binary:name}}function buildVerifyResult(exitCode,ctx){return{exitCode,json:{verified:exitCode===VERIFY_EXIT.VERIFIED,exit_code:exitCode,signer_identity:SIGNER_IDENTITY_REGEXP,signer_oidc_issuer:SIGNER_OIDC_ISSUER,signature_source:ctx.bundle?.signature??null,provenance_source:ctx.bundle?.provenance??null,tarball_path:ctx.bundle?.tarball??null,verified_at:ctx.verifiedAt,pinned_key_fingerprint:null,signing_mode:"cosign-keyless",offline:ctx.offline,errors:ctx.errors}}}function classifyCosignFailure(stderr){let lower=stderr.toLowerCase();return lower.includes("certificate identity")||lower.includes("subject does not match")||lower.includes("oidc issuer")?VERIFY_EXIT.SIGNER_IDENTITY_MISMATCH:VERIFY_EXIT.SIGNATURE_INVALID}function runCosignStep(bundle,offline,errors3,deps){let cosignCheck=ensureBinary("cosign",deps);if(!cosignCheck.ok)return errors3.push(`cosign not available in PATH (${cosignCheck.reason??"unknown"}). Install from https://docs.sigstore.dev/cosign/installation/.`),VERIFY_EXIT.MISSING_BINARY;let cosignArgs=["verify-blob","--certificate-identity-regexp",SIGNER_IDENTITY_REGEXP,"--certificate-oidc-issuer",SIGNER_OIDC_ISSUER,"--signature",bundle.signature,"--certificate",bundle.certificate,bundle.tarball];if(offline)cosignArgs.push("--insecure-ignore-tlog","--offline");let result2=deps.spawnSync("cosign",cosignArgs,{stdio:"pipe",encoding:"utf8"});if(result2.error)return errors3.push(`cosign spawn failed: ${result2.error.message}`),VERIFY_EXIT.MISSING_BINARY;if((result2.status??1)===0)return VERIFY_EXIT.VERIFIED;let stderr=typeof result2.stderr==="string"?result2.stderr:"";if(stderr)errors3.push(stderr.trim());return classifyCosignFailure(stderr)}function runSlsaStep(bundle,errors3,deps){if(!bundle.provenance)return errors3.push(`provenance.intoto.jsonl missing alongside ${bundle.tarball} \u2014 cosign passed but SLSA provenance cannot be checked.`),VERIFY_EXIT.PROVENANCE_INVALID;let slsaCheck=ensureBinary("slsa-verifier",deps);if(!slsaCheck.ok)return errors3.push(`slsa-verifier not available in PATH (${slsaCheck.reason??"unknown"}). Install from https://github.com/slsa-framework/slsa-verifier.`),VERIFY_EXIT.MISSING_BINARY;let result2=deps.spawnSync("slsa-verifier",["verify-artifact",bundle.tarball,"--provenance-path",bundle.provenance,"--source-uri",PROVENANCE_SOURCE_URI],{stdio:"pipe",encoding:"utf8"});if(result2.error)return errors3.push(`slsa-verifier spawn failed: ${result2.error.message}`),VERIFY_EXIT.MISSING_BINARY;if((result2.status??1)===0)return VERIFY_EXIT.VERIFIED;let stderr=typeof result2.stderr==="string"?result2.stderr:"";if(stderr)errors3.push(stderr.trim());return VERIFY_EXIT.PROVENANCE_INVALID}function resolveBundleDir(options,genieRoot){if(options.bundleDir)return options.bundleDir;if(options.tarball)return dirname20(resolve17(options.tarball));return resolve17(genieRoot)}function runVerifyInstall(options,deps=defaultDeps5){let errors3=[],verifiedAt=deps.now().toISOString(),offline=options.offline===!0,genieRoot=resolveGenieRoot2(process.argv[1],deps),bundleDir=resolveBundleDir(options,genieRoot),bundle=discoverSignatureBundle(bundleDir,deps),ctx={bundle,verifiedAt,offline,errors:errors3};if(!bundle){if(errors3.push(`No signed release bundle found under ${bundleDir}. Expected <pkg>.tgz + .sig + .cert + provenance.intoto.jsonl.`),readsAsCosignSentinel(join76(genieRoot,".github","cosign.pub"),deps))errors3.push(".github/cosign.pub is the documented NO-KEY sentinel \u2014 release signing is cosign KEYLESS ONLY; there is no public key to pin.");return buildVerifyResult(VERIFY_EXIT.NO_SIGNATURE_MATERIAL,ctx)}let cosignExit=runCosignStep(bundle,offline,errors3,deps);if(cosignExit!==VERIFY_EXIT.VERIFIED)return buildVerifyResult(cosignExit,ctx);let slsaExit=runSlsaStep(bundle,errors3,deps);return buildVerifyResult(slsaExit,ctx)}function emitHumanReport(result2,options,deps){let{json:json2,exitCode}=result2,status=json2.verified?"OK":"FAIL";if(deps.stdout(`verify-install: ${status} (exit ${exitCode})`),deps.stdout(` signing mode: ${json2.signing_mode}`),deps.stdout(` signer identity: ${json2.signer_identity}`),deps.stdout(` OIDC issuer: ${json2.signer_oidc_issuer}`),deps.stdout(` provenance source: ${PROVENANCE_SOURCE_URI}`),deps.stdout(` tarball: ${json2.tarball_path??"(not found)"}`),deps.stdout(` signature: ${json2.signature_source??"(not found)"}`),deps.stdout(` provenance: ${json2.provenance_source??"(not found)"}`),deps.stdout(` verified_at: ${json2.verified_at}`),deps.stdout(` offline: ${json2.offline?"yes (skips Rekor tlog)":"no"}`),options.offline)deps.stdout(" warning: offline mode skips the Rekor transparency log; revoked certs are not detected.");if(json2.errors.length>0){deps.stderr("verify-install errors:");for(let err of json2.errors)deps.stderr(` - ${err}`)}}function runVerifyInstallCommand(options,deps=defaultDeps5){let result2=runVerifyInstall(options,deps);if(options.json)deps.stdout(JSON.stringify(result2.json));else emitHumanReport(result2,options,deps);return result2.exitCode}function registerSecCommands(program2,deps=defaultDeps5){let sec=program2.command("sec").description("Security tooling \u2014 host compromise triage and IOC hunts");sec.command("scan",{isDefault:!0}).description("Scan host for TeamPCP/CanisterWorm-style package compromise indicators (read-only)").option("--json","Emit machine-readable report on stdout (for archival, CI, or piping to jq)").option("--all-homes","Blast-radius flag \u2014 scan every /root, /home/*, /Users/*, and WSL Windows home found on the host. When to reach for this: incident-response on a multi-tenant box or CI runner where per-user material must all be assessed in one pass.").option("--home <path>","Add one extra home directory to scan. When to reach for this: the scanner did not auto-discover a non-standard home (e.g. /var/lib/service-user) but you know it holds at-risk material.",collectRepeatedOption,[]).option("--root <path>","Blast-radius flag \u2014 add an application root (repeatable) to scan for lockfiles, node_modules, and project evidence. When to reach for this: a multi-service host where each service lives under its own prefix (e.g. --root /srv/app --root /opt/worker).",collectRepeatedOption,[]).option("--no-progress","Suppress progress output on stderr").option("--quiet","Suppress progress and banners on stderr").option("--verbose","Emit extra diagnostics on stderr").option("--progress-json","Emit progress as NDJSON events to stderr").option("--progress-interval <ms>","Progress tick interval in milliseconds").option("--events-file <path>","Append structured NDJSON events to a 0600-mode file").option("--redact","Hash $HOME-prefixed paths; scrub AWS/GitHub/npm/JWT patterns").option("--no-persist","Do not persist the report to $GENIE_HOME/sec-scan/").option("--impact-surface","Scan for at-risk local material (secrets, wallets, browsers)").option("--phase-budget <name=ms>","Budget (ms) for a named phase (repeatable)",collectRepeatedOption,[]).addHelpText("after",`
4373
+ `),now:()=>new Date};function collectRepeatedOption(value,previous){return[...previous,value]}function collectKillPid(value,previous){let pid=Number.parseInt(value,10);if(!Number.isFinite(pid)||pid<=0)throw Error(`--kill-pid expects a positive integer, got "${value}"`);return[...previous,pid]}function resolveGenieRoot2(argv1=process.argv[1],deps=defaultDeps5){try{if(argv1){let scriptDir=dirname21(deps.realpathSync(argv1)),candidates=[resolve17(scriptDir,".."),resolve17(scriptDir,"..","..")];for(let candidate of candidates)if(deps.existsSync(join77(candidate,"package.json")))return candidate}}catch{}return resolve17(import.meta.dir,"..","..")}function resolveSecScanScript(argv1=process.argv[1],deps=defaultDeps5){let root=resolveGenieRoot2(argv1,deps),scriptPath=join77(root,"scripts","sec-scan.cjs");if(!deps.existsSync(scriptPath))throw Error(`Security scanner payload not found at ${scriptPath}`);return scriptPath}function resolveSecRemediateScript(argv1=process.argv[1],deps=defaultDeps5){let root=resolveGenieRoot2(argv1,deps),scriptPath=join77(root,"scripts","sec-remediate.cjs");if(!deps.existsSync(scriptPath))throw Error(`Security remediation payload not found at ${scriptPath}`);return scriptPath}function resolveSecFixScript(argv1=process.argv[1],deps=defaultDeps5){let root=resolveGenieRoot2(argv1,deps),scriptPath=join77(root,"scripts","sec-fix.cjs");if(!deps.existsSync(scriptPath))throw Error(`Security fix payload not found at ${scriptPath}`);return scriptPath}function buildSecFixArgv(options){let args=[];if(options.yes)args.push("--yes");if(options.json)args.push("--json");if(options.skipReinstall)args.push("--skip-reinstall");if(options.skipRescan)args.push("--skip-rescan");if(options.dryRun)args.push("--dry-run");if(options.unsafeUnverified)args.push("--unsafe-unverified",options.unsafeUnverified);return args}function runSecFix(options,deps=defaultDeps5){let args=[resolveSecFixScript(process.argv[1],deps),...buildSecFixArgv(options)],result2=deps.spawnSync(process.execPath,args,{stdio:"inherit"});if(result2.error)throw result2.error;return result2.status??1}var BOOLEAN_FLAG_MAP=[["json","--json"],["allHomes","--all-homes"],["noProgress","--no-progress"],["quiet","--quiet"],["verbose","--verbose"],["progressJson","--progress-json"],["redact","--redact"],["impactSurface","--impact-surface"]],REPEATED_FLAG_MAP=[["home","--home"],["root","--root"],["phaseBudget","--phase-budget"]],STRING_FLAG_MAP=[["progressInterval","--progress-interval"],["eventsFile","--events-file"]];function buildSecScanArgv(options){let args=[];for(let[key,flag]of BOOLEAN_FLAG_MAP)if(options[key])args.push(flag);for(let[key,flag]of REPEATED_FLAG_MAP){let values2=options[key]??[];for(let value of values2)args.push(flag,value)}for(let[key,flag]of STRING_FLAG_MAP){let value=options[key];if(value)args.push(flag,value)}if(options.persist===!1)args.push("--no-persist");return args}function buildSecRemediateArgv(options){let args=[];if(options.dryRun)args.push("--dry-run");if(options.apply)args.push("--apply");if(options.resume)args.push("--resume",options.resume);if(options.scanReport)args.push("--scan-report",options.scanReport);if(options.scanId)args.push("--scan-id",options.scanId);if(options.plan)args.push("--plan",options.plan);if(options.quarantineDir)args.push("--quarantine-dir",options.quarantineDir);if(options.unsafeUnverified)args.push("--unsafe-unverified",options.unsafeUnverified);if(options.remediatePartial)args.push("--remediate-partial");if(options.confirmIncompleteScan)args.push("--confirm-incomplete-scan",options.confirmIncompleteScan);for(let pid of options.killPid??[])args.push("--kill-pid",String(pid));if(options.autoConfirmFrom)args.push("--auto-confirm-from",options.autoConfirmFrom);if(options.json)args.push("--json");return args}function runSecScan(options,deps=defaultDeps5){let args=[resolveSecScanScript(process.argv[1],deps),...buildSecScanArgv(options)],result2=deps.spawnSync(process.execPath,args,{stdio:"inherit"});if(result2.error)throw result2.error;return result2.status??1}function runSecRemediate(options,deps=defaultDeps5){let args=[resolveSecRemediateScript(process.argv[1],deps),...buildSecRemediateArgv(options)],result2=deps.spawnSync(process.execPath,args,{stdio:"inherit"});if(result2.error)throw result2.error;return result2.status??1}function runSecRestore(quarantineId,deps=defaultDeps5){let args=[resolveSecRemediateScript(process.argv[1],deps),"--restore",quarantineId],result2=deps.spawnSync(process.execPath,args,{stdio:"inherit"});if(result2.error)throw result2.error;return result2.status??1}function buildSecRollbackArgv(scanId,options){let args=["--rollback",scanId];if(options.json)args.push("--json");return args}function buildSecQuarantineListArgv(options){let args=["--quarantine-list"];if(options.json)args.push("--json");return args}function buildSecQuarantineGcArgv(options){let args=["--quarantine-gc"];if(options.olderThan)args.push("--older-than",options.olderThan);if(options.confirmGc)args.push("--confirm-gc",options.confirmGc);if(options.json)args.push("--json");return args}function runSecRollback(scanId,options,deps=defaultDeps5){let args=[resolveSecRemediateScript(process.argv[1],deps),...buildSecRollbackArgv(scanId,options)],result2=deps.spawnSync(process.execPath,args,{stdio:"inherit"});if(result2.error)throw result2.error;return result2.status??1}function runSecQuarantineList(options,deps=defaultDeps5){let args=[resolveSecRemediateScript(process.argv[1],deps),...buildSecQuarantineListArgv(options)],result2=deps.spawnSync(process.execPath,args,{stdio:"inherit"});if(result2.error)throw result2.error;return result2.status??1}function runSecQuarantineGc(options,deps=defaultDeps5){let args=[resolveSecRemediateScript(process.argv[1],deps),...buildSecQuarantineGcArgv(options)],result2=deps.spawnSync(process.execPath,args,{stdio:"inherit"});if(result2.error)throw result2.error;return result2.status??1}function applySecScanExitCode(exitCode,deps=defaultDeps5){if(exitCode!==0)deps.setExitCode(exitCode)}var VERIFY_EXIT={VERIFIED:0,SIGNATURE_INVALID:2,SIGNER_IDENTITY_MISMATCH:3,PROVENANCE_INVALID:4,NO_SIGNATURE_MATERIAL:5,MISSING_BINARY:127},SIGNER_IDENTITY_REGEXP="^https://github.com/automagik-dev/genie/.github/workflows/release.yml@",SIGNER_OIDC_ISSUER="https://token.actions.githubusercontent.com",PROVENANCE_SOURCE_URI="github.com/automagik-dev/genie",COSIGN_NO_KEY_SENTINEL="BEGIN COSIGN NO-PINNED-KEY SENTINEL";function discoverSignatureBundle(bundleDir,deps=defaultDeps5){if(!deps.existsSync(bundleDir))return null;let candidates=[];try{for(let entry2 of readdirSync13(bundleDir))if(entry2.endsWith(".tgz"))candidates.push(entry2)}catch{return null}for(let tarballName of candidates){let tarball=join77(bundleDir,tarballName),signature=`${tarball}.sig`,certificate=`${tarball}.cert`;if(!deps.existsSync(signature))continue;if(!deps.existsSync(certificate))continue;let provenancePath=join77(bundleDir,"provenance.intoto.jsonl"),provenance=deps.existsSync(provenancePath)?provenancePath:null;return{tarball,signature,certificate,provenance}}return null}function readsAsCosignSentinel(path3,deps=defaultDeps5){if(!deps.existsSync(path3))return!1;try{return deps.readFileSync(path3,"utf8").includes(COSIGN_NO_KEY_SENTINEL)}catch{return!1}}function ensureBinary(name,deps){let result2=deps.spawnSync(name,["--version"],{stdio:"pipe",encoding:"utf8"});if(result2.error)return{ok:!1,binary:name,reason:result2.error.message};if((result2.status??1)!==0)return{ok:!1,binary:name,reason:`${name} --version exited non-zero`};return{ok:!0,binary:name}}function buildVerifyResult(exitCode,ctx){return{exitCode,json:{verified:exitCode===VERIFY_EXIT.VERIFIED,exit_code:exitCode,signer_identity:SIGNER_IDENTITY_REGEXP,signer_oidc_issuer:SIGNER_OIDC_ISSUER,signature_source:ctx.bundle?.signature??null,provenance_source:ctx.bundle?.provenance??null,tarball_path:ctx.bundle?.tarball??null,verified_at:ctx.verifiedAt,pinned_key_fingerprint:null,signing_mode:"cosign-keyless",offline:ctx.offline,errors:ctx.errors}}}function classifyCosignFailure(stderr){let lower=stderr.toLowerCase();return lower.includes("certificate identity")||lower.includes("subject does not match")||lower.includes("oidc issuer")?VERIFY_EXIT.SIGNER_IDENTITY_MISMATCH:VERIFY_EXIT.SIGNATURE_INVALID}function runCosignStep(bundle,offline,errors3,deps){let cosignCheck=ensureBinary("cosign",deps);if(!cosignCheck.ok)return errors3.push(`cosign not available in PATH (${cosignCheck.reason??"unknown"}). Install from https://docs.sigstore.dev/cosign/installation/.`),VERIFY_EXIT.MISSING_BINARY;let cosignArgs=["verify-blob","--certificate-identity-regexp",SIGNER_IDENTITY_REGEXP,"--certificate-oidc-issuer",SIGNER_OIDC_ISSUER,"--signature",bundle.signature,"--certificate",bundle.certificate,bundle.tarball];if(offline)cosignArgs.push("--insecure-ignore-tlog","--offline");let result2=deps.spawnSync("cosign",cosignArgs,{stdio:"pipe",encoding:"utf8"});if(result2.error)return errors3.push(`cosign spawn failed: ${result2.error.message}`),VERIFY_EXIT.MISSING_BINARY;if((result2.status??1)===0)return VERIFY_EXIT.VERIFIED;let stderr=typeof result2.stderr==="string"?result2.stderr:"";if(stderr)errors3.push(stderr.trim());return classifyCosignFailure(stderr)}function runSlsaStep(bundle,errors3,deps){if(!bundle.provenance)return errors3.push(`provenance.intoto.jsonl missing alongside ${bundle.tarball} \u2014 cosign passed but SLSA provenance cannot be checked.`),VERIFY_EXIT.PROVENANCE_INVALID;let slsaCheck=ensureBinary("slsa-verifier",deps);if(!slsaCheck.ok)return errors3.push(`slsa-verifier not available in PATH (${slsaCheck.reason??"unknown"}). Install from https://github.com/slsa-framework/slsa-verifier.`),VERIFY_EXIT.MISSING_BINARY;let result2=deps.spawnSync("slsa-verifier",["verify-artifact",bundle.tarball,"--provenance-path",bundle.provenance,"--source-uri",PROVENANCE_SOURCE_URI],{stdio:"pipe",encoding:"utf8"});if(result2.error)return errors3.push(`slsa-verifier spawn failed: ${result2.error.message}`),VERIFY_EXIT.MISSING_BINARY;if((result2.status??1)===0)return VERIFY_EXIT.VERIFIED;let stderr=typeof result2.stderr==="string"?result2.stderr:"";if(stderr)errors3.push(stderr.trim());return VERIFY_EXIT.PROVENANCE_INVALID}function resolveBundleDir(options,genieRoot){if(options.bundleDir)return options.bundleDir;if(options.tarball)return dirname21(resolve17(options.tarball));return resolve17(genieRoot)}function runVerifyInstall(options,deps=defaultDeps5){let errors3=[],verifiedAt=deps.now().toISOString(),offline=options.offline===!0,genieRoot=resolveGenieRoot2(process.argv[1],deps),bundleDir=resolveBundleDir(options,genieRoot),bundle=discoverSignatureBundle(bundleDir,deps),ctx={bundle,verifiedAt,offline,errors:errors3};if(!bundle){if(errors3.push(`No signed release bundle found under ${bundleDir}. Expected <pkg>.tgz + .sig + .cert + provenance.intoto.jsonl.`),readsAsCosignSentinel(join77(genieRoot,".github","cosign.pub"),deps))errors3.push(".github/cosign.pub is the documented NO-KEY sentinel \u2014 release signing is cosign KEYLESS ONLY; there is no public key to pin.");return buildVerifyResult(VERIFY_EXIT.NO_SIGNATURE_MATERIAL,ctx)}let cosignExit=runCosignStep(bundle,offline,errors3,deps);if(cosignExit!==VERIFY_EXIT.VERIFIED)return buildVerifyResult(cosignExit,ctx);let slsaExit=runSlsaStep(bundle,errors3,deps);return buildVerifyResult(slsaExit,ctx)}function emitHumanReport(result2,options,deps){let{json:json2,exitCode}=result2,status=json2.verified?"OK":"FAIL";if(deps.stdout(`verify-install: ${status} (exit ${exitCode})`),deps.stdout(` signing mode: ${json2.signing_mode}`),deps.stdout(` signer identity: ${json2.signer_identity}`),deps.stdout(` OIDC issuer: ${json2.signer_oidc_issuer}`),deps.stdout(` provenance source: ${PROVENANCE_SOURCE_URI}`),deps.stdout(` tarball: ${json2.tarball_path??"(not found)"}`),deps.stdout(` signature: ${json2.signature_source??"(not found)"}`),deps.stdout(` provenance: ${json2.provenance_source??"(not found)"}`),deps.stdout(` verified_at: ${json2.verified_at}`),deps.stdout(` offline: ${json2.offline?"yes (skips Rekor tlog)":"no"}`),options.offline)deps.stdout(" warning: offline mode skips the Rekor transparency log; revoked certs are not detected.");if(json2.errors.length>0){deps.stderr("verify-install errors:");for(let err of json2.errors)deps.stderr(` - ${err}`)}}function runVerifyInstallCommand(options,deps=defaultDeps5){let result2=runVerifyInstall(options,deps);if(options.json)deps.stdout(JSON.stringify(result2.json));else emitHumanReport(result2,options,deps);return result2.exitCode}function registerSecCommands(program2,deps=defaultDeps5){let sec=program2.command("sec").description("Security tooling \u2014 host compromise triage and IOC hunts");sec.command("scan",{isDefault:!0}).description("Scan host for TeamPCP/CanisterWorm-style package compromise indicators (read-only)").option("--json","Emit machine-readable report on stdout (for archival, CI, or piping to jq)").option("--all-homes","Blast-radius flag \u2014 scan every /root, /home/*, /Users/*, and WSL Windows home found on the host. When to reach for this: incident-response on a multi-tenant box or CI runner where per-user material must all be assessed in one pass.").option("--home <path>","Add one extra home directory to scan. When to reach for this: the scanner did not auto-discover a non-standard home (e.g. /var/lib/service-user) but you know it holds at-risk material.",collectRepeatedOption,[]).option("--root <path>","Blast-radius flag \u2014 add an application root (repeatable) to scan for lockfiles, node_modules, and project evidence. When to reach for this: a multi-service host where each service lives under its own prefix (e.g. --root /srv/app --root /opt/worker).",collectRepeatedOption,[]).option("--no-progress","Suppress progress output on stderr").option("--quiet","Suppress progress and banners on stderr").option("--verbose","Emit extra diagnostics on stderr").option("--progress-json","Emit progress as NDJSON events to stderr").option("--progress-interval <ms>","Progress tick interval in milliseconds").option("--events-file <path>","Append structured NDJSON events to a 0600-mode file").option("--redact","Hash $HOME-prefixed paths; scrub AWS/GitHub/npm/JWT patterns").option("--no-persist","Do not persist the report to $GENIE_HOME/sec-scan/").option("--impact-surface","Scan for at-risk local material (secrets, wallets, browsers)").option("--phase-budget <name=ms>","Budget (ms) for a named phase (repeatable)",collectRepeatedOption,[]).addHelpText("after",`
4369
4374
  Examples:
4370
4375
  # Quick triage of the current project and every home on the host.
4371
4376
  $ genie sec scan --all-homes --root "$PWD"
@@ -4537,7 +4542,7 @@ docs/incident-response/canisterworm.md for the legitimate --unsafe-unverified co
4537
4542
  LIMIT ${limit}
4538
4543
  `;if(options.json){console.log(JSON.stringify(rows,null,2));return}if(rows.length===0){console.log(`No results for "${query2}".`);return}for(let r of rows)console.log(`[${formatRelativeTimestamp(r.timestamp)}] ${r.agent_label??"orphaned"} / ${r.session_id.slice(0,12)}`),console.log(` ${r.role}${r.tool_name?` [${r.tool_name}]`:""}: ${r.headline}`);console.log(`
4539
4544
  (${rows.length} result${rows.length===1?"":"s"})`)}async function sessionsSyncStatusCommand(){if(!await isAvailable())console.error("Database not available."),process.exit(1);let sql=await getConnection(),status=await getBackfillStatus(sql);if(!status){console.log("No backfill has been started. It runs automatically on first daemon start.");return}let pct=status.totalFiles>0?(status.processedFiles/status.totalFiles*100).toFixed(1):"0.0",mbRead=(status.processedBytes/1024/1024).toFixed(1),mbTotal=(status.totalBytes/1024/1024).toFixed(1);console.log(`Session backfill: ${status.processedFiles} / ${status.totalFiles} files (${pct}%)`),console.log(`Bytes read: ${mbRead} MB / ${mbTotal} MB`),console.log(`Errors: ${status.errors}`),console.log(`Status: ${status.status}`)}function registerSessionsCommands(program2){let sessions2=program2.command("sessions").description("Session history \u2014 list, replay, search");sessions2.command("list",{isDefault:!0}).description("List Claude Code sessions").option("--active","Show only active sessions").option("--orphaned","Show only orphaned sessions").option("--agent <name>","Filter by agent").option("--source <name>","Filter by executor metadata source (e.g. omni)").option("--limit <n>","Max number of sessions to return (default: 50)").option("--json","Output as JSON").action(async(options)=>{await sessionsListCommand(options)}),sessions2.command("replay <session-id>").description("Replay a session \u2014 interleave content + events").option("--json","Output as JSON").action(async(sessionId,options)=>{await sessionsReplayCommand(sessionId,options)}),sessions2.command("search <query>").description("Full-text search across session content").option("--json","Output as JSON").option("--limit <n>","Max results","20").action(async(query2,options)=>{await sessionsSearchCommand(query2,options)}),sessions2.command("sync").description("Check session backfill progress").action(async()=>{await sessionsSyncStatusCommand()})}init_state();init_observability_health();init_agent_registry();init_agent_registry();init_derived_signals();init_derived_signals();init_executor_registry();init_should_resume();init_term_format();var ANSI2={reset:"\x1B[0m",dim:"\x1B[2m",bold:"\x1B[1m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",cyan:"\x1B[36m",magenta:"\x1B[35m"};function colorize(text,color2){if(process.env.NO_COLOR||!process.stdout.isTTY)return text;return`${ANSI2[color2]}${text}${ANSI2.reset}`}async function aggregateAgentDecisions(includeArchived){let agents=await listAgentsForRender({includeArchived}),results=Array(agents.length),cursor=0,cap=Math.min(BOOT_PASS_CONCURRENCY_CAP,Math.max(1,agents.length)),workers=Array.from({length:cap},async()=>{while(cursor<agents.length){let i2=cursor++;if(i2>=agents.length)return;let a=agents[i2],decision=await shouldResume(a.id).catch(()=>({resume:!1,reason:"no_session_id",rehydrate:"lazy"})),name=a.customName??a.role??a.id,sessionPreview=decision.sessionId?decision.sessionId.slice(0,8):null,lastWriteAt=null;if(a.currentExecutorId){let exec3=await getExecutor(a.currentExecutorId).catch(()=>null);lastWriteAt=exec3?.updatedAt??exec3?.startedAt??null}results[i2]={agentId:a.id,name,kind:a.kind??null,decision,sessionPreview,lastWriteAt}}});return await Promise.all(workers),results}async function collectHealthChecks(){let report=await collectObservabilityHealth();return[{name:"partition",status:report.partition_health,message:report.next_rotation_at?`next rotation: ${report.next_rotation_at}`:void 0},{name:"watchdog",status:report.watchdog,message:report.watchdog_detail},{name:"spill journal",status:report.spill_journal==="pending"?"warn":report.spill_journal==="unknown"?"unknown":"ok",message:report.spill_path},{name:"watcher metrics",status:report.watcher_metrics,message:report.watcher_metrics==="ok"?"all six recently seen":"one or more meta-events missing"}]}function statusIcon(status){switch(status){case"ok":return colorize("\u2713","green");case"warn":return colorize("!","yellow");case"fail":return colorize("\u2717","red");default:return colorize("?","dim")}}function severityBadge(sev){if(sev==="critical")return colorize("[CRITICAL]","red");if(sev==="warn")return colorize("[WARN]","yellow");return colorize("[INFO]","dim")}function formatAgentLine(line){let kindTag=line.kind==="permanent"?colorize("p","magenta"):colorize("t","cyan"),session=line.sessionPreview?colorize(line.sessionPreview,"dim"):colorize("no-session","yellow"),lastWrite=line.lastWriteAt?formatRelativeTimestamp(line.lastWriteAt):"-",reason=line.decision.reason==="ok"?colorize("resume ready","green"):colorize(line.decision.reason,"yellow");return` [${kindTag}] ${line.name.padEnd(28).slice(0,28)} ${session.padEnd(8)} last:${lastWrite.padEnd(10)} ${reason}`}function renderResumableSection(lines){let resumable=lines.filter((l)=>l.decision.resume);if(resumable.length===0){console.log(colorize(" (no in-flight agents \u2014 every prior anchor is closed or paused)","dim"));return}for(let line of resumable)console.log(formatAgentLine(line))}function renderStuckSection(lines){let stuck=lines.filter((l)=>!l.decision.resume&&l.decision.reason!=="assignment_closed"&&l.decision.reason!=="unknown_agent");if(stuck.length===0)return;console.log(""),console.log(colorize("STUCK / NEEDS ATTENTION","bold")),console.log("-".repeat(60));for(let line of stuck)if(console.log(formatAgentLine(line)),line.decision.reason==="auto_resume_disabled")console.log(colorize(` \u2192 genie agent resume ${line.name}`,"dim"));else if(line.decision.reason==="no_session_id")console.log(colorize(` \u2192 genie agent show ${line.name} # inspect; consider archive`,"dim"))}function renderArchivedSection(lines){let done=lines.filter((l)=>l.decision.reason==="assignment_closed");if(done.length===0)return;console.log(""),console.log(colorize("DONE / ARCHIVED","bold")),console.log("-".repeat(60));for(let line of done)console.log(formatAgentLine(line))}function renderSignalsSection(signals2){if(signals2.length===0){console.log(colorize(" (no active alerts)","dim"));return}for(let sig of signals2){console.log(` ${severityBadge(sig.severity)} ${colorize(sig.type,"bold")} on ${sig.subject}`);let drilldown=SIGNAL_DRILLDOWN[sig.type];if(drilldown)console.log(colorize(` \u2192 ${drilldown}`,"dim"));if(sig.triggeredAt)console.log(colorize(` ${formatRelativeTimestamp(sig.triggeredAt)}`,"dim"))}}function renderHealthSection(checks){for(let check2 of checks){let detail=check2.message?colorize(` ${check2.message}`,"dim"):"";console.log(` ${statusIcon(check2.status)} ${check2.name.padEnd(18)} ${detail}`)}}async function renderDebugSection(){let audit=await auditAgentKind();if(console.log(""),console.log(colorize("DEBUG \u2014 kind audit","bold")),console.log("-".repeat(60)),console.log(` rows scanned: ${audit.total}`),console.log(` drift count : ${audit.drifted.length}`),audit.drifted.length>0)for(let d of audit.drifted.slice(0,10))console.log(colorize(` drift: ${d.id} stored=${d.kind??"null"} expected=${d.expected}`,"yellow"))}async function buildReport(opts){let includeArchived=opts.all===!0,[agents,signals2]=await Promise.all([aggregateAgentDecisions(includeArchived),listActiveDerivedSignals()]),partitionSignal=await detectPartitionMissing().catch(()=>null);if(partitionSignal)await recordDerivedSignal(partitionSignal).catch(()=>{}),signals2.unshift(partitionSignal);let report={agents,signals:signals2};if(opts.health)report.health=await collectHealthChecks();return report}async function statusCommand2(opts={}){let t0=Date.now(),report=await buildReport(opts);if(opts.json){console.log(JSON.stringify(report,null,2));return}if(console.log(""),console.log(colorize("IN-FLIGHT \u2014 should resume","bold")),console.log("-".repeat(60)),renderResumableSection(report.agents),renderStuckSection(report.agents),opts.all)renderArchivedSection(report.agents);if(console.log(""),console.log(colorize("ACTIVE SIGNALS","bold")),console.log("-".repeat(60)),renderSignalsSection(report.signals),report.health)console.log(""),console.log(colorize("HEALTH","bold")),console.log("-".repeat(60)),renderHealthSection(report.health);if(opts.debug)await renderDebugSection();console.log(""),console.log(colorize(` rendered in ${Date.now()-t0}ms \u2014 ${report.agents.length} agents, ${report.signals.length} signals`,"dim")),console.log("")}init_genie_tokens();init_term_format();var _taskService7;async function getTaskService7(){if(!_taskService7)_taskService7=await Promise.resolve().then(() => (init_task_service(),exports_task_service));return _taskService7}function registerTagCommands(program2){let tag=program2.command("tag").description("Tag management");tag.command("list").description("List all tags").option("--type <typeId>","Filter by task type").option("--json","Output as JSON").action(async(options)=>{try{let tags=await(await getTaskService7()).listTags(options.type);if(options.json){console.log(JSON.stringify(tags,null,2));return}console.log(` ${padRight("ID",20)} ${padRight("NAME",20)} ${padRight("COLOR",10)} TYPE`),console.log(` ${"\u2500".repeat(55)}`);for(let t of tags)console.log(` ${padRight(t.id,20)} ${padRight(t.name,20)} ${padRight(t.color,10)} ${t.typeId??"-"}`);console.log(`
4540
- ${tags.length} tag${tags.length===1?"":"s"}`)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}}),tag.command("create <name>").description("Create a custom tag").option("--color <hex>","Tag color (hex)",palette.textDim).option("--type <typeId>","Associate with a task type").action(async(name,options)=>{try{let ts3=await getTaskService7(),id=name.toLowerCase().replace(/\s+/g,"-"),t=await ts3.createTag({id,name,color:options.color,typeId:options.type});console.log(`Created tag "${t.name}" (${t.id}) with color ${t.color}.`)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}})}init_term_format();var _taskService8;async function getTaskService8(){if(!_taskService8)_taskService8=await Promise.resolve().then(() => (init_task_service(),exports_task_service));return _taskService8}var _boardService2;async function getBoardService2(){if(!_boardService2)_boardService2=await Promise.resolve().then(() => (init_board_service(),exports_board_service));return _boardService2}var _closeMergedService;async function getCloseMergedService(){if(!_closeMergedService)_closeMergedService=await Promise.resolve().then(() => (init_task_close_merged(),exports_task_close_merged));return _closeMergedService}function localActor2(name){return{actorType:"local",actorId:name}}function currentActor3(){let name=process.env.GENIE_AGENT_NAME??"cli";return localActor2(name)}function getRunId(){return process.env.GENIE_RUN_ID??`run-${Date.now()}`}var PRIORITY_COLORS={urgent:"\x1B[31m",high:"\x1B[33m",normal:"\x1B[0m",low:"\x1B[90m"},RESET2="\x1B[0m";async function resolveDefaultBoardId(){try{let{execSync:execSync17}=await import("child_process"),repoRoot=execSync17("git rev-parse --show-toplevel",{encoding:"utf-8"}).trim(),{join:join77}=await import("path"),configPath2=join77(repoRoot,".genie","config.json"),{existsSync:existsSync63,readFileSync:readFileSync39}=await import("fs");if(existsSync63(configPath2)){let config=JSON.parse(readFileSync39(configPath2,"utf-8"));if(config.activeBoard)return config.activeBoard}}catch{}return null}async function handleInvalidStageError(taskId,message){try{let task=await(await getTaskService8()).getTask(taskId);if(!task?.boardId)return;let board=await(await getBoardService2()).getBoard(task.boardId);if(!board)return;let validCols=board.columns.sort((a,b2)=>a.position-b2.position).map((c)=>c.name).join(" \u2192 ");console.error(`Error: ${message}
4545
+ ${tags.length} tag${tags.length===1?"":"s"}`)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}}),tag.command("create <name>").description("Create a custom tag").option("--color <hex>","Tag color (hex)",palette.textDim).option("--type <typeId>","Associate with a task type").action(async(name,options)=>{try{let ts3=await getTaskService7(),id=name.toLowerCase().replace(/\s+/g,"-"),t=await ts3.createTag({id,name,color:options.color,typeId:options.type});console.log(`Created tag "${t.name}" (${t.id}) with color ${t.color}.`)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}})}init_term_format();var _taskService8;async function getTaskService8(){if(!_taskService8)_taskService8=await Promise.resolve().then(() => (init_task_service(),exports_task_service));return _taskService8}var _boardService2;async function getBoardService2(){if(!_boardService2)_boardService2=await Promise.resolve().then(() => (init_board_service(),exports_board_service));return _boardService2}var _closeMergedService;async function getCloseMergedService(){if(!_closeMergedService)_closeMergedService=await Promise.resolve().then(() => (init_task_close_merged(),exports_task_close_merged));return _closeMergedService}function localActor2(name){return{actorType:"local",actorId:name}}function currentActor3(){let name=process.env.GENIE_AGENT_NAME??"cli";return localActor2(name)}function getRunId(){return process.env.GENIE_RUN_ID??`run-${Date.now()}`}var PRIORITY_COLORS={urgent:"\x1B[31m",high:"\x1B[33m",normal:"\x1B[0m",low:"\x1B[90m"},RESET2="\x1B[0m";async function resolveDefaultBoardId(){try{let{execSync:execSync17}=await import("child_process"),repoRoot=execSync17("git rev-parse --show-toplevel",{encoding:"utf-8"}).trim(),{join:join78}=await import("path"),configPath2=join78(repoRoot,".genie","config.json"),{existsSync:existsSync64,readFileSync:readFileSync40}=await import("fs");if(existsSync64(configPath2)){let config=JSON.parse(readFileSync40(configPath2,"utf-8"));if(config.activeBoard)return config.activeBoard}}catch{}return null}async function handleInvalidStageError(taskId,message){try{let task=await(await getTaskService8()).getTask(taskId);if(!task?.boardId)return;let board=await(await getBoardService2()).getBoard(task.boardId);if(!board)return;let validCols=board.columns.sort((a,b2)=>a.position-b2.position).map((c)=>c.name).join(" \u2192 ");console.error(`Error: ${message}
4541
4546
  Valid columns for board "${board.name}": ${validCols}`),process.exit(1)}catch{}}async function resolveBoardOption(boardName){if(boardName){let board=await(await getBoardService2()).getBoard(boardName);if(!board)console.error(`Error: Board not found: ${boardName}`),process.exit(1);return board.id}return await resolveDefaultBoardId()??void 0}function getProjectName(repoPath){let parts=repoPath.split("/");return parts[parts.length-1]||repoPath}function formatTaskRow(t,showProject,hasExternal){let seq2=showProject?`${getProjectName(t.repoPath)}#${t.seq}`:`#${t.seq}`,title=truncate2(t.title,38),color2=t.status==="archived"?"\x1B[90m":PRIORITY_COLORS[t.priority]??"",due=formatDate(t.dueDate),proj=showProject?`${padRight(getProjectName(t.repoPath),16)} `:"",ext=hasExternal?`${padRight(truncate2(t.externalId??"",25),27)} `:"",statusLabel=t.status==="archived"?"\x1B[90m[archived]\x1B[0m":t.status;return` ${padRight(seq2,showProject?22:6)} ${proj}${padRight(title,40)} ${ext}${padRight(t.stage,12)} ${padRight(statusLabel,12)} ${color2}${padRight(t.priority,10)}${RESET2} ${padRight(due,12)}`}function printTaskList(tasks,showProject=!1){if(tasks.length===0){console.log("No tasks found.");return}let hasExternal=tasks.some((t)=>t.externalId),extCol=hasExternal?`${padRight("EXTERNAL",27)} `:"",projCol=showProject?`${padRight("PROJECT",16)} `:"",header=` ${padRight("#",6)} ${projCol}${padRight("TITLE",40)} ${extCol}${padRight("STAGE",12)} ${padRight("STATUS",12)} ${padRight("PRIORITY",10)} ${padRight("DUE",12)}`,lineLen=(showProject?108:92)+(hasExternal?28:0);console.log(header),console.log(` ${"\u2500".repeat(lineLen)}`);for(let t of tasks)console.log(formatTaskRow(t,showProject,hasExternal));console.log(`
4542
4547
  ${tasks.length} task${tasks.length===1?"":"s"}`)}function printTaskFields(task){console.log(""),console.log(`Task #${task.seq}: ${task.title}`),console.log("\u2500".repeat(60)),console.log(` ID: ${task.id}`),console.log(` Type: ${task.typeId}`),console.log(` Stage: ${task.stage}`),console.log(` Status: ${task.status}`),console.log(` Priority: ${task.priority}`);let optionalFields=[["Description",task.description],["Criteria",task.acceptanceCriteria],["Effort",task.estimatedEffort],["Start",task.startDate?formatDate(task.startDate):null],["Due",task.dueDate?formatDate(task.dueDate):null],["Blocked",task.blockedReason],["Parent",task.parentId],["Release",task.releaseId],["Wish",task.wishFile],["External",task.externalId],["Ext URL",task.externalUrl]];for(let[label,value]of optionalFields)if(value)console.log(` ${padRight(`${label}:`,12)} ${value}`);if(task.checkoutRunId)console.log(` Checkout: ${task.checkoutRunId} (since ${formatTimestamp(task.executionLockedAt)})`);if(console.log(` Created: ${formatTimestamp(task.createdAt)}`),task.startedAt)console.log(` Started: ${formatTimestamp(task.startedAt)}`);if(task.endedAt)console.log(` Ended: ${formatTimestamp(task.endedAt)}`)}async function printTaskRelations(task){let ts3=await getTaskService8(),actors=await ts3.getTaskActors(task.id,task.repoPath);if(actors.length>0){console.log(`
4543
4548
  Actors:`);for(let a of actors)console.log(` ${a.role}: ${a.actorId} (${a.actorType})`)}let tags=await ts3.getTaskTags(task.id,task.repoPath);if(tags.length>0)console.log(`
@@ -4553,7 +4558,7 @@ ${mode}Closed ${result2.closed} task${result2.closed===1?"":"s"} from ${result2.
4553
4558
  Name: ${t.name}`),console.log(`ID: ${t.id}`),console.log(`Builtin: ${t.isBuiltin}`),console.log(`Description: ${t.description??"(none)"}`),t.columns&&t.columns.length>0)console.log(`Columns: ${t.columns.map((c)=>c.name).join(", ")}`);console.log("")}),tmpl.command("delete <name>").description("Delete a template").action(async(name)=>{let{deleteTemplate:deleteTemplate2,getTemplate:getTemplate2}=await Promise.resolve().then(() => (init_template_service(),exports_template_service)),t=await getTemplate2(name);if(!t)console.error(`Template "${name}" not found.`),process.exit(1);let ok=await deleteTemplate2(t.id);console.log(ok?`Deleted template "${t.name}".`:"Delete failed.")})}init_term_format();var _taskService9;async function getTaskService9(){if(!_taskService9)_taskService9=await Promise.resolve().then(() => (init_task_service(),exports_task_service));return _taskService9}function printTypeTable(types4){console.log(` ${padRight("ID",20)} ${padRight("NAME",30)} ${padRight("STAGES",8)} BUILTIN`),console.log(` ${"\u2500".repeat(70)}`);for(let t of types4){let stageCount=Array.isArray(t.stages)?t.stages.length:0,builtin=t.isBuiltin?"yes":"no";console.log(` ${padRight(t.id,20)} ${padRight(t.name,30)} ${padRight(String(stageCount),8)} ${builtin}`)}console.log(`
4554
4559
  ${types4.length} type${types4.length===1?"":"s"}`)}function printTypePipeline(t){if(console.log(`
4555
4560
  Type: ${t.name} (${t.id})`),t.description)console.log(`Description: ${t.description}`);if(t.icon)console.log(`Icon: ${t.icon}`);console.log(`Built-in: ${t.isBuiltin?"yes":"no"}`),console.log("\u2500".repeat(60)),console.log(`
4556
- Stage Pipeline:`);let stages=t.stages;for(let i2=0;i2<stages.length;i2++){let s2=stages[i2],arrow=i2<stages.length-1?" \u2192":"",gate=s2.gate?` [gate: ${s2.gate}]`:"",action=s2.action?` (action: ${s2.action})`:"",auto=s2.auto_advance?" [auto]":"";console.log(` ${i2+1}. ${s2.label??s2.name}${gate}${action}${auto}${arrow}`)}console.log("")}async function handleTypeList(options){console.warn("Warning: `genie type` is deprecated. Use `genie board` instead.");let types4=await(await getTaskService9()).listTypes();if(options.json){console.log(JSON.stringify(types4,null,2));return}printTypeTable(types4)}async function handleTypeShow(id,options){console.warn("Warning: `genie type` is deprecated. Use `genie board` instead.");let t=await(await getTaskService9()).getType(id);if(!t)console.error(`Error: Type not found: ${id}`),process.exit(1);if(options.json){console.log(JSON.stringify(t,null,2));return}printTypePipeline(t)}async function handleTypeCreate(name,options){console.warn("Warning: `genie type` is deprecated. Use `genie board` instead.");let ts3=await getTaskService9(),stages;try{if(stages=JSON.parse(options.stages),!Array.isArray(stages))throw Error("Stages must be a JSON array")}catch(err){console.error(`Error: Invalid stages JSON. ${err instanceof Error?err.message:String(err)}`),process.exit(1)}for(let s2 of stages)if(typeof s2!=="object"||s2===null||!("name"in s2))console.error('Error: Each stage must have at least a "name" field.'),process.exit(1);let id=name.toLowerCase().replace(/\s+/g,"-"),t=await ts3.createType({id,name,description:options.description,icon:options.icon,stages});console.log(`Created type "${t.name}" (${t.id}) with ${stages.length} stages.`)}function registerTypeCommands(program2){let type2=program2.command("type").description("Task type management");type2.command("list").description("List all task types").option("--json","Output as JSON").action(async(options)=>{try{await handleTypeList(options)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}}),type2.command("show <id>").description("Show task type detail with stage pipeline").option("--json","Output as JSON").action(async(id,options)=>{try{await handleTypeShow(id,options)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}}),type2.command("create <name>").description("Create a custom task type").requiredOption("--stages <json>","Stages JSON array").option("--description <text>","Type description").option("--icon <icon>","Type icon").action(async(name,options)=>{try{await handleTypeCreate(name,options)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}})}init_wish_lint();init_wish_parser();init_state();import{existsSync as existsSync64}from"fs";import{mkdir as mkdir12,readFile as readFile17,readdir as readdir11,stat as stat11,writeFile as writeFile11}from"fs/promises";import{dirname as dirname21,join as join78}from"path";function resolveTemplatePath(cwd=process.cwd()){let dir=cwd;for(let i2=0;i2<10;i2++){let candidate=join78(dir,"templates","wish-template.md");if(existsSync64(candidate))return candidate;let parent=dirname21(dir);if(parent===dir)break;dir=parent}return null}var FALLBACK_TEMPLATE=`# Wish: <TODO: title>
4561
+ Stage Pipeline:`);let stages=t.stages;for(let i2=0;i2<stages.length;i2++){let s2=stages[i2],arrow=i2<stages.length-1?" \u2192":"",gate=s2.gate?` [gate: ${s2.gate}]`:"",action=s2.action?` (action: ${s2.action})`:"",auto=s2.auto_advance?" [auto]":"";console.log(` ${i2+1}. ${s2.label??s2.name}${gate}${action}${auto}${arrow}`)}console.log("")}async function handleTypeList(options){console.warn("Warning: `genie type` is deprecated. Use `genie board` instead.");let types4=await(await getTaskService9()).listTypes();if(options.json){console.log(JSON.stringify(types4,null,2));return}printTypeTable(types4)}async function handleTypeShow(id,options){console.warn("Warning: `genie type` is deprecated. Use `genie board` instead.");let t=await(await getTaskService9()).getType(id);if(!t)console.error(`Error: Type not found: ${id}`),process.exit(1);if(options.json){console.log(JSON.stringify(t,null,2));return}printTypePipeline(t)}async function handleTypeCreate(name,options){console.warn("Warning: `genie type` is deprecated. Use `genie board` instead.");let ts3=await getTaskService9(),stages;try{if(stages=JSON.parse(options.stages),!Array.isArray(stages))throw Error("Stages must be a JSON array")}catch(err){console.error(`Error: Invalid stages JSON. ${err instanceof Error?err.message:String(err)}`),process.exit(1)}for(let s2 of stages)if(typeof s2!=="object"||s2===null||!("name"in s2))console.error('Error: Each stage must have at least a "name" field.'),process.exit(1);let id=name.toLowerCase().replace(/\s+/g,"-"),t=await ts3.createType({id,name,description:options.description,icon:options.icon,stages});console.log(`Created type "${t.name}" (${t.id}) with ${stages.length} stages.`)}function registerTypeCommands(program2){let type2=program2.command("type").description("Task type management");type2.command("list").description("List all task types").option("--json","Output as JSON").action(async(options)=>{try{await handleTypeList(options)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}}),type2.command("show <id>").description("Show task type detail with stage pipeline").option("--json","Output as JSON").action(async(id,options)=>{try{await handleTypeShow(id,options)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}}),type2.command("create <name>").description("Create a custom task type").requiredOption("--stages <json>","Stages JSON array").option("--description <text>","Type description").option("--icon <icon>","Type icon").action(async(name,options)=>{try{await handleTypeCreate(name,options)}catch(error2){console.error(`Error: ${error2 instanceof Error?error2.message:String(error2)}`),process.exit(1)}})}init_wish_lint();init_wish_parser();init_state();import{existsSync as existsSync65}from"fs";import{mkdir as mkdir12,readFile as readFile17,readdir as readdir11,stat as stat11,writeFile as writeFile11}from"fs/promises";import{dirname as dirname22,join as join79}from"path";function resolveTemplatePath(cwd=process.cwd()){let dir=cwd;for(let i2=0;i2<10;i2++){let candidate=join79(dir,"templates","wish-template.md");if(existsSync65(candidate))return candidate;let parent=dirname22(dir);if(parent===dir)break;dir=parent}return null}var FALLBACK_TEMPLATE=`# Wish: <TODO: title>
4557
4562
 
4558
4563
  | Field | Value |
4559
4564
  |-------|-------|
@@ -4613,17 +4618,17 @@ Stage Pipeline:`);let stages=t.stages;for(let i2=0;i2<stages.length;i2++){let s2
4613
4618
  \`\`\`
4614
4619
 
4615
4620
  **depends-on:** none
4616
- `;function renderTemplate(raw,slug,date){return raw.replace(/\{\{slug\}\}/g,slug).replace(/\{\{date\}\}/g,date)}function today(){let d=new Date,yyyy=d.getUTCFullYear(),mm=String(d.getUTCMonth()+1).padStart(2,"0"),dd=String(d.getUTCDate()).padStart(2,"0");return`${yyyy}-${mm}-${dd}`}async function wishNewCommand(slug,options){if(!/^[a-z0-9][a-z0-9-]*$/.test(slug))console.error(`\u274C Invalid slug "${slug}" \u2014 use lowercase letters, digits, and hyphens`),process.exit(1);let wishDir=join78(process.cwd(),".genie","wishes",slug),wishPath=join78(wishDir,"WISH.md");if(existsSync64(wishPath)&&!options.force)console.error(`\u274C Wish already exists: ${wishPath}`),console.error(" Pass --force to overwrite"),process.exit(1);let templatePath=resolveTemplatePath(),raw=templatePath?await readFile17(templatePath,"utf-8"):FALLBACK_TEMPLATE;if(!templatePath)console.warn("\u26A0\uFE0F templates/wish-template.md not found \u2014 using inline fallback skeleton");let rendered=renderTemplate(raw,slug,today());await mkdir12(wishDir,{recursive:!0}),await writeFile11(wishPath,rendered,"utf-8"),console.log(`\uD83D\uDCDD Created wish scaffold: ${wishPath}`),console.log(` Template: ${templatePath??"<inline fallback>"}`),console.log(` Next: edit the wish, then run \`genie wish lint ${slug}\` before dispatching`)}function renderDiff(before,after){let beforeLines=before.split(`
4621
+ `;function renderTemplate(raw,slug,date){return raw.replace(/\{\{slug\}\}/g,slug).replace(/\{\{date\}\}/g,date)}function today(){let d=new Date,yyyy=d.getUTCFullYear(),mm=String(d.getUTCMonth()+1).padStart(2,"0"),dd=String(d.getUTCDate()).padStart(2,"0");return`${yyyy}-${mm}-${dd}`}async function wishNewCommand(slug,options){if(!/^[a-z0-9][a-z0-9-]*$/.test(slug))console.error(`\u274C Invalid slug "${slug}" \u2014 use lowercase letters, digits, and hyphens`),process.exit(1);let wishDir=join79(process.cwd(),".genie","wishes",slug),wishPath=join79(wishDir,"WISH.md");if(existsSync65(wishPath)&&!options.force)console.error(`\u274C Wish already exists: ${wishPath}`),console.error(" Pass --force to overwrite"),process.exit(1);let templatePath=resolveTemplatePath(),raw=templatePath?await readFile17(templatePath,"utf-8"):FALLBACK_TEMPLATE;if(!templatePath)console.warn("\u26A0\uFE0F templates/wish-template.md not found \u2014 using inline fallback skeleton");let rendered=renderTemplate(raw,slug,today());await mkdir12(wishDir,{recursive:!0}),await writeFile11(wishPath,rendered,"utf-8"),console.log(`\uD83D\uDCDD Created wish scaffold: ${wishPath}`),console.log(` Template: ${templatePath??"<inline fallback>"}`),console.log(` Next: edit the wish, then run \`genie wish lint ${slug}\` before dispatching`)}function renderDiff(before,after){let beforeLines=before.split(`
4617
4622
  `),afterLines=after.split(`
4618
4623
  `),len=Math.max(beforeLines.length,afterLines.length),out=[];for(let i2=0;i2<len;i2++){let b2=beforeLines[i2],a=afterLines[i2];if(b2===a)continue;if(b2!==void 0)out.push(`- ${b2}`);if(a!==void 0)out.push(`+ ${a}`)}return out.join(`
4619
4624
  `)}function parseWishOrError(markdown){try{return parseWish(markdown)}catch(err){if(err instanceof WishParseError)return err;throw err}}function reportWishFileMissing(slug,wishPath,jsonMode){if(jsonMode)console.log(JSON.stringify({error:`Wish file not found: ${wishPath}`,rule:"missing-title",wish:slug,file:wishPath}));else console.error(`\u274C Wish file not found: ${wishPath}`);process.exit(1)}function emitLintReport(report,wishPath,jsonMode){if(jsonMode)console.log(JSON.stringify(report));else console.log(formatLintReport(report,{color:process.stdout.isTTY??!1,path:wishPath}))}function exitWithErrorCount(report){let errors3=report.violations.filter((v)=>v.severity==="error").length;process.exit(errors3>0?1:0)}function handleNoFixableViolations(report,wishPath,jsonMode){if(jsonMode)console.log(JSON.stringify({...report,fixedViolations:0}));else console.log(formatLintReport(report,{color:process.stdout.isTTY??!1,path:wishPath})),console.log(`
4620
4625
  No fixable violations to apply.`);process.exit(report.summary.total>0?1:0)}function handleDryRunFix(report,markdown,fixed,wishPath,jsonMode){if(jsonMode)console.log(JSON.stringify({...report,dryRun:!0,diff:renderDiff(markdown,fixed)}));else console.log(formatLintReport(report,{color:process.stdout.isTTY??!1,path:wishPath})),console.log(`
4621
4626
  --- Dry-run diff (${wishPath}) ---`),console.log(renderDiff(markdown,fixed)),console.log(`
4622
- File not modified (--dry-run).`);process.exit(report.summary.total>0?1:0)}async function applyAndReportFix(report,fixed,wishPath,slug,lintOpts,jsonMode){await writeFile11(wishPath,fixed,"utf-8");let docOrError2=parseWishOrError(fixed),report2={...lintWish(docOrError2,fixed,lintOpts),wish:slug,file:wishPath},fixedCount=report.summary.fixable;if(jsonMode)console.log(JSON.stringify({...report2,fixedViolations:fixedCount}));else console.log(`\u2705 Applied ${fixedCount} fix(es) to ${wishPath}`),console.log(""),console.log(formatLintReport(report2,{color:process.stdout.isTTY??!1,path:wishPath}));let remainingErrors=report2.violations.filter((v)=>v.severity==="error").length;process.exit(remainingErrors>0?1:0)}async function runLintFix(report,markdown,wishPath,slug,lintOpts,options){let{applyFixes:applyFixes2}=await Promise.resolve().then(() => (init_wish_lint(),exports_wish_lint)),fixed=applyFixes2(markdown,report),jsonMode=options.json??!1;if(fixed===markdown)handleNoFixableViolations(report,wishPath,jsonMode);if(options.dryRun)handleDryRunFix(report,markdown,fixed,wishPath,jsonMode);return applyAndReportFix(report,fixed,wishPath,slug,lintOpts,jsonMode)}async function wishLintCommand(slug,options){let wishPath=join78(process.cwd(),".genie","wishes",slug,"WISH.md"),jsonMode=options.json??!1;if(!existsSync64(wishPath))reportWishFileMissing(slug,wishPath,jsonMode);let markdown=await readFile17(wishPath,"utf-8"),lintOpts={allowTodoPlaceholders:options.allowTodoPlaceholders},docOrError=parseWishOrError(markdown),report={...lintWish(docOrError,markdown,lintOpts),wish:slug,file:wishPath};if(options.fix){await runLintFix(report,markdown,wishPath,slug,lintOpts,options);return}emitLintReport(report,wishPath,jsonMode),exitWithErrorCount(report)}function reportWishParseError(error2,jsonMode){let payload={error:error2.message,rule:error2.rule,line:error2.line,column:error2.column??null,file:error2.file??null};if(jsonMode){console.log(JSON.stringify(payload));return}if(console.error(`\u274C Parse failed (${payload.rule}): ${payload.error}`),payload.file)console.error(` File: ${payload.file}`);if(payload.line)console.error(` Line: ${payload.line}`)}async function wishParseCommand(slug,options){try{let doc=parseWishFile(slug);console.log(options.json?JSON.stringify(doc):JSON.stringify(doc,null,2));return}catch(error2){if(error2 instanceof WishParseError)reportWishParseError(error2,options.json??!1),process.exit(1);let message=error2 instanceof Error?error2.message:String(error2);console.error(`\u274C ${message}`),process.exit(1)}}async function isWishFile(wishPath){try{return(await stat11(wishPath)).isFile()}catch{return!1}}function parseWishSummary(slug){try{let doc=parseWishFile(slug);return{status:doc.metadata.status??"-",groupCount:String(doc.executionGroups.length)}}catch(error2){return{status:error2 instanceof WishParseError?"malformed":"error",groupCount:"-"}}}async function loadStateCounts(slug){try{let state=await(await Promise.resolve().then(() => (init_wish_state(),exports_wish_state))).getState(slug);if(!state)return{ready:0,inProgress:0,done:0};let ready=0,inProgress=0,done=0;for(let g of Object.values(state.groups))if(g.status==="ready")ready++;else if(g.status==="in_progress")inProgress++;else if(g.status==="done")done++;return{ready,inProgress,done}}catch{return{ready:0,inProgress:0,done:0}}}async function wishListCommand(){let wishesRoot=join78(process.cwd(),".genie","wishes");if(!existsSync64(wishesRoot))console.error(`\u274C Wishes directory not found: ${wishesRoot}`),process.exit(1);let entries=await readdir11(wishesRoot),rows=[];for(let entry2 of entries.sort()){if(entry2.startsWith("_")||entry2.startsWith("."))continue;if(!await isWishFile(join78(wishesRoot,entry2,"WISH.md")))continue;let{status,groupCount}=parseWishSummary(entry2),{ready,inProgress,done}=await loadStateCounts(entry2);rows.push({slug:entry2,status,groupCount,ready,inProgress,done})}if(rows.length===0){console.log("No wishes found under .genie/wishes/");return}let slugW=Math.max(4,...rows.map((r)=>r.slug.length)),statusW=Math.max(6,...rows.map((r)=>r.status.length)),pad=(s2,n)=>s2+" ".repeat(Math.max(0,n-s2.length));console.log(` ${pad("SLUG",slugW)} ${pad("STATUS",statusW)} GROUPS READY IN-PROG DONE`),console.log(` ${"\u2500".repeat(slugW+statusW+32)}`);for(let r of rows)console.log(` ${pad(r.slug,slugW)} ${pad(r.status,statusW)} ${pad(r.groupCount,6)} ${pad(String(r.ready),5)} ${pad(String(r.inProgress),7)} ${r.done}`);console.log(""),console.log(` Total: ${rows.length} wishes`)}function registerWishCommands(program2){let wish=program2.command("wish").description("Wish lifecycle management");wish.command("new <slug>").description("Scaffold a new WISH.md from templates/wish-template.md").option("--force","Overwrite an existing wish directory").action(async(slug,options)=>{await wishNewCommand(slug,options)}),wish.command("lint <slug>").description("Structural health check (stub \u2014 full implementation in Group 3)").option("--json","Emit machine-readable JSON output").option("--fix","Auto-repair deterministic violations").option("--dry-run","With --fix: print diff without writing").option("--allow-todo-placeholders","Pass <TODO> placeholders without emitting todo-placeholder-remaining").action(async(slug,options)=>{await wishLintCommand(slug,options)}),wish.command("parse <slug>").description("Parse WISH.md and emit the WishDocument as JSON").option("--json","One-line JSON output (default: pretty-printed)").action(async(slug,options)=>{await wishParseCommand(slug,options)}),wish.command("status <slug>").description("Show wish state overview for all groups").action(async(slug)=>{await statusCommand(slug)}),wish.command("done <ref>").description("Mark a wish group as done (format: <slug>#<group>)").action(async(ref)=>{await doneCommand(ref)}),wish.command("reset <ref>").option("-y, --yes","Skip confirmation prompt (required in non-interactive mode)").description("Reset wish state. <slug>#<group> resets one in-progress group; bare <slug> wipes the wish and recreates from current WISH.md").action(async(ref,options)=>{await resetAction(ref,options)}),wish.command("list").description("Enumerate all wishes with status, group counts, and progress").action(async()=>{await wishListCommand()})}var _T_BOOT=Date.now();try{let{execSync:execSyncStartup}=__require("child_process");if(execSyncStartup("git config core.bare",{encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim()==="true")execSyncStartup("git config core.bare false",{stdio:["pipe","pipe","pipe"]})}catch{}function parseNumericFlag2(flagName){return(value)=>{let n=Number(value);if(Number.isNaN(n))throw Error(`${flagName} must be a number, got: ${value}`);return n}}if(process.env.GENIE_PROFILE_DB)console.error(`[profile] imports=${Date.now()-_T_BOOT}ms`);var program2=new Command;program2.name("genie").description("Genie CLI - AI-assisted development").version(VERSION);program2.option("--no-interactive","Disable interactive prompts (exit 2 instead of prompting)");program2.option("--no-tui","Skip TUI bootstrap (or set GENIE_TUI_DISABLE=1)");program2.configureHelp({sortSubcommands:!0,showGlobalOptions:!0});program2.configureOutput({outputError:(str5,write)=>{let cmd=program2.commands.find((c)=>process.argv.slice(2,6).includes(c.name())),prefix=cmd?`genie ${cmd.name()}`:"genie";write(`\x1B[31mError (${prefix}): ${str5}\x1B[0m
4623
- `)}});async function startNamedSession(name){let{randomUUID:randomUUID14}=await import("crypto"),{buildTeamLeadCommand:buildTeamLeadCommand2}=await Promise.resolve().then(() => (init_team_lead_command(),exports_team_lead_command)),{getAgentsFilePath:getAgentsFilePath2}=await Promise.resolve().then(() => (init_session(),exports_session)),systemPromptFile=getAgentsFilePath2(),sessionId=randomUUID14(),cmd=buildTeamLeadCommand2(name,{systemPromptFile:systemPromptFile??void 0,sessionId});console.log(`Starting new session: ${name}`);let{spawnSync:spawnSync9}=await import("child_process"),result2=spawnSync9("sh",["-c",cmd],{stdio:"inherit"});if(result2.status)process.exit(result2.status)}program2.command("setup").description("Configure genie settings").option("--quick","Accept all defaults").option("--shortcuts","Only configure keyboard shortcuts").option("--codex","Only configure Codex integration").option("--terminal","Only configure terminal defaults").option("--session","Only configure session settings").option("--reset","Reset configuration to defaults").option("--show","Show current configuration").action(async(options)=>{await setupCommand(options)});program2.command("doctor").description("Run diagnostic checks on genie installation").option("--fix","Auto-fix: kill zombie postgres, clean shared memory, restart daemon").option("--observability","Report partition health + GENIE_WIDE_EMIT flag state").option("--perf","Report rolling per-handler P50/P99 from hook_perf_baseline + flag P99 regressions and recent fallback-log entries").option("--fix-team-orphans","Archive stale Claude-team config dirs missing config.json (paired with invincible-genie wish migration 050)").option("--dry-run","Pair with --fix-team-orphans to preview archive moves without mutating").option("--json","Emit JSON instead of human output (pairs with --observability)").action(doctorCommand);program2.command("update").description("Update Genie CLI to the latest version").option("--next","Switch to dev builds (npm @next tag)").option("--stable","Switch to stable releases (npm @latest tag)").option("--skip-maintenance","Skip post-update maintenance (or set GENIE_UPDATE_SKIP_MAINTENANCE=1)").action(updateCommand);program2.command("uninstall").description("Remove Genie CLI and clean up hooks").action(uninstallCommand);var shortcuts=program2.command("shortcuts").description("Manage tmux keyboard shortcuts");shortcuts.action(shortcutsShowCommand);shortcuts.command("show").description("Show available shortcuts and installation status").action(shortcutsShowCommand);shortcuts.command("install").description("Install shortcuts to config files (~/.tmux.conf, shell rc)").action(shortcutsInstallCommand);shortcuts.command("uninstall").description("Remove shortcuts from config files").action(shortcutsUninstallCommand);registerServeCommands(program2);registerAppCommand(program2);registerInitCommands(program2);registerTeamNamespace(program2);registerDirNamespace(program2);registerAgentCommands(program2);registerSendInboxCommands(program2);registerStateCommands(program2);registerDispatchCommands(program2);registerDispatchGroupCommands(program2);registerWishCommands(program2);registerHookNamespace(program2);registerDbCommands(program2);registerScheduleCommands(program2);registerDaemonCommands(program2);registerTaskCommands(program2);registerTypeCommands(program2);registerBoardCommands(program2);registerTagCommands(program2);registerReleaseCommands(program2);registerSecCommands(program2);registerProjectCommands(program2);registerPruneCommands(program2);registerNotifyCommands(program2);registerEventsCommands(program2);registerSessionsCommands(program2);registerMetricsCommands(program2);registerExportCommands(program2);registerImportCommands(program2);registerTemplateCommands(program2);registerBrainCommands(program2);registerBriefCommands(program2);registerApprovalCommands(program2);program2.command("done [ref]").description("Close the current turn (inside an agent session) or mark a wish group done (team-lead, <slug>#<group>)").action(async(ref)=>{let{doneAction:doneAction2}=await Promise.resolve().then(() => (init_done(),exports_done));await doneAction2(ref)});program2.command("blocked").description("Close the current turn with outcome=blocked").requiredOption("--reason <message>","Why the turn is blocked").action(async(options)=>{let{blockedAction:blockedAction2}=await Promise.resolve().then(() => (init_blocked(),exports_blocked));await blockedAction2(options)});program2.command("failed").description("Close the current turn with outcome=failed").requiredOption("--reason <message>","Why the turn failed").action(async(options)=>{let{failedAction:failedAction2}=await Promise.resolve().then(() => (init_failed(),exports_failed));await failedAction2(options)});program2.command("pane-trap").description("Internal: write clean_exit_unverified outcome for a dying pane/shell. Invoked by the tmux pane-died hook and the inline shell EXIT trap.").option("--pane-id <id>","tmux pane id (%N) \u2014 resolved to executor via executors.tmux_pane_id").option("--executor-id <id>","explicit executor UUID (preferred when available)").option("--reason <reason>","trap source: pane_died or shell_exit","pane_died").action(async(options)=>{let{paneTrapAction:paneTrapAction2}=await Promise.resolve().then(() => (init_pane_trap2(),exports_pane_trap));await paneTrapAction2(options)});installWorkspaceCheck(program2);var auditTimers=new Map,auditSpans=new Map;program2.hook("preAction",(_thisCommand,actionCommand)=>{let name=actionCommand.name();auditTimers.set(name,Date.now()),Promise.resolve().then(() => (init_db(),exports_db)).then(({isConnected:isConnected2})=>{if(!isConnected2())return;recordAuditEvent("command",name,"command_start",getActor(),{args:actionCommand.args}).catch(()=>{})}).catch(()=>{}),(async()=>{try{let{isWideEmitEnabled:isWideEmitEnabled2}=await Promise.resolve().then(() => exports_observability_flag);if(!isWideEmitEnabled2())return;let{startSpan:startSpan2}=await Promise.resolve().then(() => (init_emit(),exports_emit)),{getAmbient:getAmbient2}=await Promise.resolve().then(() => (init_trace_context(),exports_trace_context)),handle=startSpan2("cli.command",{command:name,args:actionCommand.args??[],cwd:process.cwd()},{severity:"debug",source_subsystem:"cli",ctx:getAmbient2()??void 0,agent:getActor()});auditSpans.set(name,handle)}catch{}})()});program2.hook("postAction",async(_thisCommand,actionCommand)=>{let name=actionCommand.name(),startMs=auditTimers.get(name),durationMs=startMs?Date.now()-startMs:void 0;auditTimers.delete(name);try{let{isConnected:isConnected2}=await Promise.resolve().then(() => (init_db(),exports_db));if(!isConnected2())return;await recordAuditEvent("command",name,"command_success",getActor(),{args:actionCommand.args,duration_ms:durationMs})}catch{}let handle=auditSpans.get(name);auditSpans.delete(name);try{if(handle){let{isWideEmitEnabled:isWideEmitEnabled2}=await Promise.resolve().then(() => exports_observability_flag);if(isWideEmitEnabled2()){let{endSpan:endSpan2}=await Promise.resolve().then(() => (init_emit(),exports_emit));endSpan2(handle,{exit_code:0,duration_ms:durationMs??0},{severity:"debug",source_subsystem:"cli",agent:getActor()})}}}catch{}try{let{flushNow:flushNow2}=await Promise.resolve().then(() => (init_emit(),exports_emit));await flushNow2()}catch{}});program2.command("spawn <name>").description("Spawn a new agent by name (resolves from directory or built-ins)").option("--provider <provider>","Provider: claude or codex","claude").option("--team <team>","Team name").option("--model <model>","Model override (e.g., sonnet, opus)").option("--skill <skill>","Skill to load (optional)").option("--layout <layout>","Layout mode: mosaic (default) or vertical").option("--color <color>","Teammate pane border color").option("--plan-mode","Start teammate in plan mode").option("--permission-mode <mode>","Permission mode (e.g., acceptEdits)").option("--extra-args <args...>","Extra CLI args forwarded to provider").option("--cwd <path>","Working directory for the agent (overrides directory entry)").option("--session <session>","Tmux session name to spawn into").option("--role <role>","Override role name for registration (avoids duplicate guard)").option("--new-window","Create a new tmux window instead of splitting").option("--window <target>","Tmux window to split into (e.g., genie:3)").option("--no-auto-resume","Disable auto-resume on pane death").option("--no-auto-sync","Disable auto-registration from workspace agents directory").option("--stream","Stream SDK messages to stdout in real-time (claude-sdk provider)").option("--stream-format <format>","Streaming output format: text, json, ndjson (default: text)","text").option("--sdk-max-turns <n>","SDK: max conversation turns",parseNumericFlag2("--sdk-max-turns")).option("--sdk-max-budget <usd>","SDK: max budget in USD",parseNumericFlag2("--sdk-max-budget")).option("--sdk-stream","SDK: enable streaming output (shortcut for --stream)").option("--sdk-effort <level>","SDK: reasoning effort level (low, medium, high, max)").option("--sdk-resume <session-id>","SDK: resume a previous session by ID").option("--prompt <text>","Initial prompt to send as the first user message").addHelpText("after",`
4627
+ File not modified (--dry-run).`);process.exit(report.summary.total>0?1:0)}async function applyAndReportFix(report,fixed,wishPath,slug,lintOpts,jsonMode){await writeFile11(wishPath,fixed,"utf-8");let docOrError2=parseWishOrError(fixed),report2={...lintWish(docOrError2,fixed,lintOpts),wish:slug,file:wishPath},fixedCount=report.summary.fixable;if(jsonMode)console.log(JSON.stringify({...report2,fixedViolations:fixedCount}));else console.log(`\u2705 Applied ${fixedCount} fix(es) to ${wishPath}`),console.log(""),console.log(formatLintReport(report2,{color:process.stdout.isTTY??!1,path:wishPath}));let remainingErrors=report2.violations.filter((v)=>v.severity==="error").length;process.exit(remainingErrors>0?1:0)}async function runLintFix(report,markdown,wishPath,slug,lintOpts,options){let{applyFixes:applyFixes2}=await Promise.resolve().then(() => (init_wish_lint(),exports_wish_lint)),fixed=applyFixes2(markdown,report),jsonMode=options.json??!1;if(fixed===markdown)handleNoFixableViolations(report,wishPath,jsonMode);if(options.dryRun)handleDryRunFix(report,markdown,fixed,wishPath,jsonMode);return applyAndReportFix(report,fixed,wishPath,slug,lintOpts,jsonMode)}async function wishLintCommand(slug,options){let wishPath=join79(process.cwd(),".genie","wishes",slug,"WISH.md"),jsonMode=options.json??!1;if(!existsSync65(wishPath))reportWishFileMissing(slug,wishPath,jsonMode);let markdown=await readFile17(wishPath,"utf-8"),lintOpts={allowTodoPlaceholders:options.allowTodoPlaceholders},docOrError=parseWishOrError(markdown),report={...lintWish(docOrError,markdown,lintOpts),wish:slug,file:wishPath};if(options.fix){await runLintFix(report,markdown,wishPath,slug,lintOpts,options);return}emitLintReport(report,wishPath,jsonMode),exitWithErrorCount(report)}function reportWishParseError(error2,jsonMode){let payload={error:error2.message,rule:error2.rule,line:error2.line,column:error2.column??null,file:error2.file??null};if(jsonMode){console.log(JSON.stringify(payload));return}if(console.error(`\u274C Parse failed (${payload.rule}): ${payload.error}`),payload.file)console.error(` File: ${payload.file}`);if(payload.line)console.error(` Line: ${payload.line}`)}async function wishParseCommand(slug,options){try{let doc=parseWishFile(slug);console.log(options.json?JSON.stringify(doc):JSON.stringify(doc,null,2));return}catch(error2){if(error2 instanceof WishParseError)reportWishParseError(error2,options.json??!1),process.exit(1);let message=error2 instanceof Error?error2.message:String(error2);console.error(`\u274C ${message}`),process.exit(1)}}async function isWishFile(wishPath){try{return(await stat11(wishPath)).isFile()}catch{return!1}}function parseWishSummary(slug){try{let doc=parseWishFile(slug);return{status:doc.metadata.status??"-",groupCount:String(doc.executionGroups.length)}}catch(error2){return{status:error2 instanceof WishParseError?"malformed":"error",groupCount:"-"}}}async function loadStateCounts(slug){try{let state=await(await Promise.resolve().then(() => (init_wish_state(),exports_wish_state))).getState(slug);if(!state)return{ready:0,inProgress:0,done:0};let ready=0,inProgress=0,done=0;for(let g of Object.values(state.groups))if(g.status==="ready")ready++;else if(g.status==="in_progress")inProgress++;else if(g.status==="done")done++;return{ready,inProgress,done}}catch{return{ready:0,inProgress:0,done:0}}}async function wishListCommand(){let wishesRoot=join79(process.cwd(),".genie","wishes");if(!existsSync65(wishesRoot))console.error(`\u274C Wishes directory not found: ${wishesRoot}`),process.exit(1);let entries=await readdir11(wishesRoot),rows=[];for(let entry2 of entries.sort()){if(entry2.startsWith("_")||entry2.startsWith("."))continue;if(!await isWishFile(join79(wishesRoot,entry2,"WISH.md")))continue;let{status,groupCount}=parseWishSummary(entry2),{ready,inProgress,done}=await loadStateCounts(entry2);rows.push({slug:entry2,status,groupCount,ready,inProgress,done})}if(rows.length===0){console.log("No wishes found under .genie/wishes/");return}let slugW=Math.max(4,...rows.map((r)=>r.slug.length)),statusW=Math.max(6,...rows.map((r)=>r.status.length)),pad=(s2,n)=>s2+" ".repeat(Math.max(0,n-s2.length));console.log(` ${pad("SLUG",slugW)} ${pad("STATUS",statusW)} GROUPS READY IN-PROG DONE`),console.log(` ${"\u2500".repeat(slugW+statusW+32)}`);for(let r of rows)console.log(` ${pad(r.slug,slugW)} ${pad(r.status,statusW)} ${pad(r.groupCount,6)} ${pad(String(r.ready),5)} ${pad(String(r.inProgress),7)} ${r.done}`);console.log(""),console.log(` Total: ${rows.length} wishes`)}function registerWishCommands(program2){let wish=program2.command("wish").description("Wish lifecycle management");wish.command("new <slug>").description("Scaffold a new WISH.md from templates/wish-template.md").option("--force","Overwrite an existing wish directory").action(async(slug,options)=>{await wishNewCommand(slug,options)}),wish.command("lint <slug>").description("Structural health check (stub \u2014 full implementation in Group 3)").option("--json","Emit machine-readable JSON output").option("--fix","Auto-repair deterministic violations").option("--dry-run","With --fix: print diff without writing").option("--allow-todo-placeholders","Pass <TODO> placeholders without emitting todo-placeholder-remaining").action(async(slug,options)=>{await wishLintCommand(slug,options)}),wish.command("parse <slug>").description("Parse WISH.md and emit the WishDocument as JSON").option("--json","One-line JSON output (default: pretty-printed)").action(async(slug,options)=>{await wishParseCommand(slug,options)}),wish.command("status <slug>").description("Show wish state overview for all groups").action(async(slug)=>{await statusCommand(slug)}),wish.command("done <ref>").description("Mark a wish group as done (format: <slug>#<group>)").action(async(ref)=>{await doneCommand(ref)}),wish.command("reset <ref>").option("-y, --yes","Skip confirmation prompt (required in non-interactive mode)").description("Reset wish state. <slug>#<group> resets one in-progress group; bare <slug> wipes the wish and recreates from current WISH.md").action(async(ref,options)=>{await resetAction(ref,options)}),wish.command("list").description("Enumerate all wishes with status, group counts, and progress").action(async()=>{await wishListCommand()})}var _T_BOOT=Date.now();try{let{execSync:execSyncStartup}=__require("child_process");if(execSyncStartup("git config core.bare",{encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim()==="true")execSyncStartup("git config core.bare false",{stdio:["pipe","pipe","pipe"]})}catch{}function parseNumericFlag2(flagName){return(value)=>{let n=Number(value);if(Number.isNaN(n))throw Error(`${flagName} must be a number, got: ${value}`);return n}}if(process.env.GENIE_PROFILE_DB)console.error(`[profile] imports=${Date.now()-_T_BOOT}ms`);var program2=new Command;program2.name("genie").description("Genie CLI - AI-assisted development").version(VERSION);program2.option("--no-interactive","Disable interactive prompts (exit 2 instead of prompting)");program2.option("--no-tui","Skip TUI bootstrap (or set GENIE_TUI_DISABLE=1)");program2.configureHelp({sortSubcommands:!0,showGlobalOptions:!0});program2.configureOutput({outputError:(str5,write)=>{let cmd=program2.commands.find((c)=>process.argv.slice(2,6).includes(c.name())),prefix=cmd?`genie ${cmd.name()}`:"genie";write(`\x1B[31mError (${prefix}): ${str5}\x1B[0m
4628
+ `)}});async function startNamedSession(name){let{randomUUID:randomUUID14}=await import("crypto"),{buildTeamLeadCommand:buildTeamLeadCommand2}=await Promise.resolve().then(() => (init_team_lead_command(),exports_team_lead_command)),{getAgentsFilePath:getAgentsFilePath2}=await Promise.resolve().then(() => (init_session(),exports_session)),systemPromptFile=getAgentsFilePath2(),sessionId=randomUUID14(),cmd=buildTeamLeadCommand2(name,{systemPromptFile:systemPromptFile??void 0,sessionId});console.log(`Starting new session: ${name}`);let{spawnSync:spawnSync9}=await import("child_process"),result2=spawnSync9("sh",["-c",cmd],{stdio:"inherit"});if(result2.status)process.exit(result2.status)}program2.command("setup").description("Configure genie settings").option("--quick","Accept all defaults").option("--shortcuts","Only configure keyboard shortcuts").option("--codex","Only configure Codex integration").option("--terminal","Only configure terminal defaults").option("--session","Only configure session settings").option("--reset","Reset configuration to defaults").option("--show","Show current configuration").action(async(options)=>{await setupCommand(options)});program2.command("doctor").description("Run diagnostic checks on genie installation").option("--fix","Auto-fix: kill zombie postgres, clean shared memory, restart daemon").option("--observability","Report partition health + GENIE_WIDE_EMIT flag state").option("--perf","Report rolling per-handler P50/P99 from hook_perf_baseline + flag P99 regressions and recent fallback-log entries").option("--fix-team-orphans","Archive stale Claude-team config dirs missing config.json (paired with invincible-genie wish migration 050)").option("--dry-run","Pair with --fix-team-orphans to preview archive moves without mutating").option("--json","Emit JSON instead of human output (pairs with --observability)").action(doctorCommand);program2.command("update").description("Update Genie CLI to the latest version").option("--next","Switch to dev builds (npm @next tag)").option("--stable","Switch to stable releases (npm @latest tag)").option("--skip-maintenance","Skip post-update maintenance (or set GENIE_UPDATE_SKIP_MAINTENANCE=1)").action(updateCommand);program2.command("uninstall").description("Remove Genie CLI and clean up hooks").action(uninstallCommand);var shortcuts=program2.command("shortcuts").description("Manage tmux keyboard shortcuts");shortcuts.action(shortcutsShowCommand);shortcuts.command("show").description("Show available shortcuts and installation status").action(shortcutsShowCommand);shortcuts.command("install").description("Install shortcuts to config files (~/.tmux.conf, shell rc)").action(shortcutsInstallCommand);shortcuts.command("uninstall").description("Remove shortcuts from config files").action(shortcutsUninstallCommand);registerServeCommands(program2);registerAppCommand(program2);registerInitCommands(program2);registerTeamNamespace(program2);registerDirNamespace(program2);registerAgentCommands(program2);registerOmniNamespace(program2);registerSendInboxCommands(program2);registerStateCommands(program2);registerDispatchCommands(program2);registerDispatchGroupCommands(program2);registerWishCommands(program2);registerHookNamespace(program2);registerDbCommands(program2);registerScheduleCommands(program2);registerDaemonCommands(program2);registerTaskCommands(program2);registerTypeCommands(program2);registerBoardCommands(program2);registerTagCommands(program2);registerReleaseCommands(program2);registerSecCommands(program2);registerProjectCommands(program2);registerPruneCommands(program2);registerNotifyCommands(program2);registerEventsCommands(program2);registerSessionsCommands(program2);registerMetricsCommands(program2);registerExportCommands(program2);registerImportCommands(program2);registerTemplateCommands(program2);registerBrainCommands(program2);registerBriefCommands(program2);registerApprovalCommands(program2);program2.command("done [ref]").description("Close the current turn (inside an agent session) or mark a wish group done (team-lead, <slug>#<group>)").action(async(ref)=>{let{doneAction:doneAction2}=await Promise.resolve().then(() => (init_done(),exports_done));await doneAction2(ref)});program2.command("blocked").description("Close the current turn with outcome=blocked").requiredOption("--reason <message>","Why the turn is blocked").action(async(options)=>{let{blockedAction:blockedAction2}=await Promise.resolve().then(() => (init_blocked(),exports_blocked));await blockedAction2(options)});program2.command("failed").description("Close the current turn with outcome=failed").requiredOption("--reason <message>","Why the turn failed").action(async(options)=>{let{failedAction:failedAction2}=await Promise.resolve().then(() => (init_failed(),exports_failed));await failedAction2(options)});program2.command("pane-trap").description("Internal: write clean_exit_unverified outcome for a dying pane/shell. Invoked by the tmux pane-died hook and the inline shell EXIT trap.").option("--pane-id <id>","tmux pane id (%N) \u2014 resolved to executor via executors.tmux_pane_id").option("--executor-id <id>","explicit executor UUID (preferred when available)").option("--reason <reason>","trap source: pane_died or shell_exit","pane_died").action(async(options)=>{let{paneTrapAction:paneTrapAction2}=await Promise.resolve().then(() => (init_pane_trap2(),exports_pane_trap));await paneTrapAction2(options)});installWorkspaceCheck(program2);var auditTimers=new Map,auditSpans=new Map;program2.hook("preAction",(_thisCommand,actionCommand)=>{let name=actionCommand.name();auditTimers.set(name,Date.now()),Promise.resolve().then(() => (init_db(),exports_db)).then(({isConnected:isConnected2})=>{if(!isConnected2())return;recordAuditEvent("command",name,"command_start",getActor(),{args:actionCommand.args}).catch(()=>{})}).catch(()=>{}),(async()=>{try{let{isWideEmitEnabled:isWideEmitEnabled2}=await Promise.resolve().then(() => exports_observability_flag);if(!isWideEmitEnabled2())return;let{startSpan:startSpan2}=await Promise.resolve().then(() => (init_emit(),exports_emit)),{getAmbient:getAmbient2}=await Promise.resolve().then(() => (init_trace_context(),exports_trace_context)),handle=startSpan2("cli.command",{command:name,args:actionCommand.args??[],cwd:process.cwd()},{severity:"debug",source_subsystem:"cli",ctx:getAmbient2()??void 0,agent:getActor()});auditSpans.set(name,handle)}catch{}})()});program2.hook("postAction",async(_thisCommand,actionCommand)=>{let name=actionCommand.name(),startMs=auditTimers.get(name),durationMs=startMs?Date.now()-startMs:void 0;auditTimers.delete(name);try{let{isConnected:isConnected2}=await Promise.resolve().then(() => (init_db(),exports_db));if(!isConnected2())return;await recordAuditEvent("command",name,"command_success",getActor(),{args:actionCommand.args,duration_ms:durationMs})}catch{}let handle=auditSpans.get(name);auditSpans.delete(name);try{if(handle){let{isWideEmitEnabled:isWideEmitEnabled2}=await Promise.resolve().then(() => exports_observability_flag);if(isWideEmitEnabled2()){let{endSpan:endSpan2}=await Promise.resolve().then(() => (init_emit(),exports_emit));endSpan2(handle,{exit_code:0,duration_ms:durationMs??0},{severity:"debug",source_subsystem:"cli",agent:getActor()})}}}catch{}try{let{flushNow:flushNow2}=await Promise.resolve().then(() => (init_emit(),exports_emit));await flushNow2()}catch{}});program2.command("spawn <name>").description("Spawn a new agent by name (resolves from directory or built-ins)").option("--provider <provider>","Provider: claude or codex","claude").option("--team <team>","Team name").option("--model <model>","Model override (e.g., sonnet, opus)").option("--skill <skill>","Skill to load (optional)").option("--layout <layout>","Layout mode: mosaic (default) or vertical").option("--color <color>","Teammate pane border color").option("--plan-mode","Start teammate in plan mode").option("--permission-mode <mode>","Permission mode (e.g., acceptEdits)").option("--extra-args <args...>","Extra CLI args forwarded to provider").option("--cwd <path>","Working directory for the agent (overrides directory entry)").option("--session <session>","Tmux session name to spawn into").option("--role <role>","Override role name for registration (avoids duplicate guard)").option("--new-window","Create a new tmux window instead of splitting").option("--window <target>","Tmux window to split into (e.g., genie:3)").option("--no-auto-resume","Disable auto-resume on pane death").option("--no-auto-sync","Disable auto-registration from workspace agents directory").option("--stream","Stream SDK messages to stdout in real-time (claude-sdk provider)").option("--stream-format <format>","Streaming output format: text, json, ndjson (default: text)","text").option("--sdk-max-turns <n>","SDK: max conversation turns",parseNumericFlag2("--sdk-max-turns")).option("--sdk-max-budget <usd>","SDK: max budget in USD",parseNumericFlag2("--sdk-max-budget")).option("--sdk-stream","SDK: enable streaming output (shortcut for --stream)").option("--sdk-effort <level>","SDK: reasoning effort level (low, medium, high, max)").option("--sdk-resume <session-id>","SDK: resume a previous session by ID").option("--prompt <text>","Initial prompt to send as the first user message").addHelpText("after",`
4624
4629
  Examples:
4625
4630
  genie spawn engineer # Spawn built-in engineer role
4626
4631
  genie spawn researcher --model sonnet # Spawn with model override
4627
4632
  genie spawn my-agent --team my-feature # Spawn into a specific team
4628
- genie spawn council--questioner --provider codex # Use Codex provider`).action(async(name,options)=>{if(options.autoSync===!1)options.noAutoSync=!0;try{await handleWorkerSpawn(name,options)}catch(error2){let message=error2 instanceof Error?error2.message:String(error2);console.error(`Error: ${message}`),process.exit(1)}});program2.command("kill <name>").description("Force kill an agent by name").action(async(name)=>{try{await handleWorkerKill(name)}catch(error2){let message=error2 instanceof Error?error2.message:String(error2);console.error(`Error: ${message}`),process.exit(1)}});program2.command("stop <name>").description("Stop an agent (preserves session for resume)").action(async(name)=>{try{await handleWorkerStop(name)}catch(error2){let message=error2 instanceof Error?error2.message:String(error2);console.error(`Error: ${message}`),process.exit(1)}});program2.command("resume [name]").description("Resume a suspended/failed agent with its Claude session").option("--all","Resume all eligible agents").action(async(name,options)=>{try{await handleWorkerResume(name,options)}catch(error2){let message=error2 instanceof Error?error2.message:String(error2);console.error(`Error: ${message}`),process.exit(1)}});program2.command("history <name>").description("Show compressed session history for an agent").option("--full","Show full conversation without compression").option("--since <n>","Show last N user/assistant exchanges",Number.parseInt).option("--last <n>","Show last N transcript entries",Number.parseInt).option("--type <role>","Filter by role (user, assistant, tool_call)").option("--after <timestamp>","Only entries after ISO timestamp").option("--json","Output as JSON").option("--ndjson","Output as newline-delimited JSON (pipeable to jq)").option("--raw","Output raw JSONL entries").option("--log-file <path>","Direct path to log file (for testing)").action(async(name,options)=>{await historyCommand(name,options)});program2.command("log [agent]").description("Unified observability feed \u2014 aggregates transcript, DMs, team chat").option("--team <name>","Show interleaved feed for all agents in a team").option("--type <kind>","Filter by event kind (transcript, message, tool_call, state, system)").option("--since <timestamp>","Only events after ISO timestamp").option("--last <n>","Show last N events",Number.parseInt).option("--ndjson","Output as newline-delimited JSON (pipeable to jq)").option("--json","Output as pretty JSON").option("-f, --follow","Follow mode \u2014 real-time streaming").action(async(agent,options)=>{await logCommand(agent,options)});var qaCmd=program2.command("qa").description("QA \u2014 self-testing system for genie CLI");qaCmd.command("run [target]",{isDefault:!0}).description("Run QA specs (all, a domain, or a single spec)").option("--timeout <seconds>","Max seconds per spec",(v2)=>Number(v2),3600).option("--parallel <n>","Max specs to run in parallel",(v2)=>Number(v2),5).option("--verbose","Show all collected events").option("--ndjson","Machine-readable NDJSON output").action(async(target,options)=>{await qaCommand(target,options)});qaCmd.command("status").description("Show QA dashboard with last results per spec").option("--json","Output as JSON").action(async(options)=>{await qaStatusCommand(options)});qaCmd.command("history").description("Show recent QA runs").action(async()=>{await qaHistoryCommand()});qaCmd.command("check <specFile>").description("Evaluate a QA spec against current team logs and publish qa-report").option("--team <name>","Team name (defaults to GENIE_TEAM)").option("--since <timestamp>","Only consider events after this ISO timestamp").option("--since-file <path>","Read the lower-bound timestamp from a file").action(async(specFile,options)=>{await qaCheckCommand(specFile,options)});program2.command("qa-report <json>").description("Publish QA result to the PG event log (called by QA team-lead)").action(async(json2)=>{let team=process.env.GENIE_TEAM;if(!team)console.error("Error: GENIE_TEAM not set. This command must be run by a QA team-lead agent."),process.exit(1);try{let data=JSON.parse(json2),{publishSubjectEvent:publishSubjectEvent2}=await Promise.resolve().then(() => (init_runtime_events(),exports_runtime_events));await publishSubjectEvent2(process.cwd(),`genie.qa.${team}.result`,{kind:"qa",agent:"qa",team,text:`QA result: ${String(data.result??"unknown")}`,data,source:"hook"}),console.log(`QA result published to PG event log as genie.qa.${team}.result`)}catch(err){console.error(`Failed to publish QA result: ${err}`),process.exit(1)}});program2.command("read <name>").description("Read terminal output from an agent pane").option("-n, --lines <number>","Number of lines to read").option("--from <line>","Start line").option("--to <line>","End line").option("--range <range>",'Line range (e.g., "10-20")').option("--search <text>","Search for text").option("--grep <pattern>","Grep for pattern").option("-f, --follow","Follow mode (like tail -f)").option("--all","Show all output").option("-r, --reverse","Reverse order").option("--json","Output as JSON").action(async(name,options)=>{await readSessionLogs2(name,options)});program2.command("answer <name> <choice>").description('Answer a question for an agent (use "text:..." for text input)').action(async(name,choice)=>{await answerQuestion(name,choice)});program2.command("status").description("Aggregated observability \u2014 agents to resume, active alerts, optional health checklist").option("--health","Add the four-item health checklist (partition, watchdog, spill, watcher metrics)").option("--all","Include archived / done agents").option("--debug","Add structural-inference audit (former `doctor --state`)").option("--json","Emit JSON instead of human output").action(async(options)=>{try{await statusCommand2(options)}catch(error2){let message=error2 instanceof Error?error2.message:String(error2);console.error(`Error: ${message}`),process.exit(1)}});program2.command("ls").description("List registered agents with runtime status").option("--json","Output as JSON").option("--source <name>","Filter by executor metadata source (e.g. omni)").option("--all","Include archived agents (hidden by default)").action(async(options)=>{try{await handleLsCommand(options)}catch(error2){let message=error2 instanceof Error?error2.message:String(error2);console.error(`Error: ${message}`),process.exit(1)}});var args=process.argv.slice(2),isTuiPane=process.env.GENIE_TUI_PANE==="left"&&args.length===0,tuiRightPane=process.env.GENIE_TUI_RIGHT;delete process.env.GENIE_TUI_PANE;delete process.env.GENIE_TUI_RIGHT;delete process.env.GENIE_IS_DAEMON;if(isTuiPane){let{isTuiDisabled:isTuiDisabled2,noticeTuiSkipped:noticeTuiSkipped2}=await Promise.resolve().then(() => (init_tui_disable(),exports_tui_disable));if(isTuiDisabled2())noticeTuiSkipped2("renderer"),await new Promise(()=>{}),process.exit(0);if(tuiRightPane)process.env.GENIE_TUI_RIGHT=tuiRightPane;let{launchTui:launchTui2}=await Promise.resolve().then(() => (init_tui(),exports_tui));await launchTui2(),process.exit(0)}if(args.length===0){{let{isTuiDisabled:isTuiDisabled2,noticeTuiSkipped:noticeTuiSkipped2}=await Promise.resolve().then(() => (init_tui_disable(),exports_tui_disable));if(isTuiDisabled2())noticeTuiSkipped2("attach"),console.error(" Use `genie ls`, `genie spawn <agent>`, `genie log`, etc. directly."),console.error(" Unset GENIE_TUI_DISABLE (or omit --no-tui) to re-enable the TUI."),process.exit(0)}if(process.env.TMUX?.includes("genie-tui")){let{findWorkspace:findWorkspace3}=await Promise.resolve().then(() => (init_workspace(),exports_workspace)),ws2=findWorkspace3();if(ws2){let{resolveAgentFromCwd:resolveAgentFromCwd3}=await Promise.resolve().then(() => (init_resolve_agent_cwd(),exports_resolve_agent_cwd)),resolved2=resolveAgentFromCwd3(process.cwd(),ws2.root);if(resolved2.source!=="default"){let{writeFileSync:writeFileSync29}=await import("fs"),{join:join85}=await import("path"),home=process.env.GENIE_HOME??join85((await import("os")).homedir(),".genie");try{writeFileSync29(join85(home,"tui-initial-agent"),resolved2.agent,"utf-8")}catch{}console.log(`Navigating to ${resolved2.agent}...`)}else console.log("Already inside the genie TUI. Use Ctrl-b d to detach, or run genie commands directly.")}else console.log("Already inside the genie TUI. Use Ctrl-b d to detach, or run genie commands directly.");process.exit(0)}if(process.env.TMUX)console.warn("Note: switching to genie TUI from within another tmux session.");let{findWorkspace:findWorkspace2}=await Promise.resolve().then(() => (init_workspace(),exports_workspace)),ws=findWorkspace2();if(!ws){let{isInteractive:isInteractive2}=await Promise.resolve().then(() => (init_interactivity(),exports_interactivity));if(!isInteractive2())console.error("No workspace found. Run `genie init` to set up."),process.exit(2);let{confirm:confirm2}=await Promise.resolve().then(() => (init_esm14(),exports_esm));if(!await confirm2({message:"No workspace found. Initialize? [Y/n]",default:!0}))console.error("No workspace found. Run `genie init` to set up."),process.exit(2);let{mkdirSync:mkdirSync29,writeFileSync:writeFileSync29}=await import("fs"),{basename:basename17,join:join85}=await import("path"),cwd=process.cwd(),genieDir=join85(cwd,".genie");mkdirSync29(genieDir,{recursive:!0});let config={name:basename17(cwd),agents:{defaults:{}},tmux:{socket:"genie"},sdk:{}};if(writeFileSync29(join85(genieDir,"workspace.json"),`${JSON.stringify(config,null,2)}
4629
- `),console.log(`Workspace initialized: ${cwd}`),ws=findWorkspace2(),!ws)console.error("Failed to initialize workspace."),process.exit(1)}let{resolveAgentFromCwd:resolveAgentFromCwd2}=await Promise.resolve().then(() => (init_resolve_agent_cwd(),exports_resolve_agent_cwd)),resolved=resolveAgentFromCwd2(process.cwd(),ws.root),initialAgent=resolved.agent,{isServeRunning:isServeRunning2,autoStartServe:autoStartServe2,isTuiSessionReady:isTuiSessionReady2,ensureTuiSession:ensureTuiSession2}=await Promise.resolve().then(() => (init_serve(),exports_serve));if(!isServeRunning2())console.log("Starting genie serve..."),await autoStartServe2();else if(!isTuiSessionReady2())ensureTuiSession2(ws.root);if(ws.root)process.env.GENIE_TUI_WORKSPACE=ws.root;if(initialAgent)process.env.GENIE_TUI_AGENT=initialAgent;if(resolved.source!=="default"){let{execSync:execSync19}=await import("child_process");try{execSync19(`tmux has-session -t =${initialAgent} 2>/dev/null`,{stdio:"pipe"})}catch{console.log(`Spawning ${initialAgent}...`);try{execSync19(`genie spawn ${initialAgent}`,{stdio:"inherit",timeout:15000})}catch{}}}if(initialAgent){let{writeFileSync:writeFileSync29}=await import("fs"),{join:join85}=await import("path"),home=process.env.GENIE_HOME??join85((await import("os")).homedir(),".genie");try{writeFileSync29(join85(home,"tui-initial-agent"),initialAgent,"utf-8")}catch{}}let{attachTuiSession:attachTuiSession2}=await Promise.resolve().then(() => (init_tmux2(),exports_tmux2));attachTuiSession2(),process.exit(0)}if(args.every((a)=>a==="--reset")){let{sessionCommand:sessionCommand2}=await Promise.resolve().then(() => (init_session(),exports_session));await sessionCommand2({reset:!0}),process.exit(0)}var sessionIdx=args.indexOf("--session");if(sessionIdx!==-1&&sessionIdx+1<args.length){let sessionName=args[sessionIdx+1];if(!args.filter((_2,i2)=>i2!==sessionIdx&&i2!==sessionIdx+1).some((a)=>!a.startsWith("-")))try{await startNamedSession(sessionName),process.exit(0)}catch(err){console.error(`Error: ${err instanceof Error?err.message:err}`),process.exit(1)}else try{await program2.parseAsync(process.argv)}finally{await stopOtelReceiver().catch(()=>{}),await shutdown().catch(()=>{})}}else try{let _cmdStart=Date.now();if(await program2.parseAsync(process.argv),process.env.GENIE_PROFILE_DB)console.error(`[profile] parseAsync=${Date.now()-_cmdStart}ms`)}finally{let _shutStart=Date.now();if(await stopOtelReceiver().catch(()=>{}),await shutdown().catch(()=>{}),process.env.GENIE_PROFILE_DB)console.error(`[profile] shutdown=${Date.now()-_shutStart}ms`)}
4633
+ genie spawn council--questioner --provider codex # Use Codex provider`).action(async(name,options)=>{if(options.autoSync===!1)options.noAutoSync=!0;try{await handleWorkerSpawn(name,options)}catch(error2){let message=error2 instanceof Error?error2.message:String(error2);console.error(`Error: ${message}`),process.exit(1)}});program2.command("kill <name>").description("Force kill an agent by name").action(async(name)=>{try{await handleWorkerKill(name)}catch(error2){let message=error2 instanceof Error?error2.message:String(error2);console.error(`Error: ${message}`),process.exit(1)}});program2.command("stop <name>").description("Stop an agent (preserves session for resume)").action(async(name)=>{try{await handleWorkerStop(name)}catch(error2){let message=error2 instanceof Error?error2.message:String(error2);console.error(`Error: ${message}`),process.exit(1)}});program2.command("resume [name]").description("Resume a suspended/failed agent with its Claude session").option("--all","Resume all eligible agents").action(async(name,options)=>{try{await handleWorkerResume(name,options)}catch(error2){let message=error2 instanceof Error?error2.message:String(error2);console.error(`Error: ${message}`),process.exit(1)}});program2.command("history <name>").description("Show compressed session history for an agent").option("--full","Show full conversation without compression").option("--since <n>","Show last N user/assistant exchanges",Number.parseInt).option("--last <n>","Show last N transcript entries",Number.parseInt).option("--type <role>","Filter by role (user, assistant, tool_call)").option("--after <timestamp>","Only entries after ISO timestamp").option("--json","Output as JSON").option("--ndjson","Output as newline-delimited JSON (pipeable to jq)").option("--raw","Output raw JSONL entries").option("--log-file <path>","Direct path to log file (for testing)").action(async(name,options)=>{await historyCommand(name,options)});program2.command("log [agent]").description("Unified observability feed \u2014 aggregates transcript, DMs, team chat").option("--team <name>","Show interleaved feed for all agents in a team").option("--type <kind>","Filter by event kind (transcript, message, tool_call, state, system)").option("--since <timestamp>","Only events after ISO timestamp").option("--last <n>","Show last N events",Number.parseInt).option("--ndjson","Output as newline-delimited JSON (pipeable to jq)").option("--json","Output as pretty JSON").option("-f, --follow","Follow mode \u2014 real-time streaming").action(async(agent,options)=>{await logCommand(agent,options)});var qaCmd=program2.command("qa").description("QA \u2014 self-testing system for genie CLI");qaCmd.command("run [target]",{isDefault:!0}).description("Run QA specs (all, a domain, or a single spec)").option("--timeout <seconds>","Max seconds per spec",(v2)=>Number(v2),3600).option("--parallel <n>","Max specs to run in parallel",(v2)=>Number(v2),5).option("--verbose","Show all collected events").option("--ndjson","Machine-readable NDJSON output").action(async(target,options)=>{await qaCommand(target,options)});qaCmd.command("status").description("Show QA dashboard with last results per spec").option("--json","Output as JSON").action(async(options)=>{await qaStatusCommand(options)});qaCmd.command("history").description("Show recent QA runs").action(async()=>{await qaHistoryCommand()});qaCmd.command("check <specFile>").description("Evaluate a QA spec against current team logs and publish qa-report").option("--team <name>","Team name (defaults to GENIE_TEAM)").option("--since <timestamp>","Only consider events after this ISO timestamp").option("--since-file <path>","Read the lower-bound timestamp from a file").action(async(specFile,options)=>{await qaCheckCommand(specFile,options)});program2.command("qa-report <json>").description("Publish QA result to the PG event log (called by QA team-lead)").action(async(json2)=>{let team=process.env.GENIE_TEAM;if(!team)console.error("Error: GENIE_TEAM not set. This command must be run by a QA team-lead agent."),process.exit(1);try{let data=JSON.parse(json2),{publishSubjectEvent:publishSubjectEvent2}=await Promise.resolve().then(() => (init_runtime_events(),exports_runtime_events));await publishSubjectEvent2(process.cwd(),`genie.qa.${team}.result`,{kind:"qa",agent:"qa",team,text:`QA result: ${String(data.result??"unknown")}`,data,source:"hook"}),console.log(`QA result published to PG event log as genie.qa.${team}.result`)}catch(err){console.error(`Failed to publish QA result: ${err}`),process.exit(1)}});program2.command("read <name>").description("Read terminal output from an agent pane").option("-n, --lines <number>","Number of lines to read").option("--from <line>","Start line").option("--to <line>","End line").option("--range <range>",'Line range (e.g., "10-20")').option("--search <text>","Search for text").option("--grep <pattern>","Grep for pattern").option("-f, --follow","Follow mode (like tail -f)").option("--all","Show all output").option("-r, --reverse","Reverse order").option("--json","Output as JSON").action(async(name,options)=>{await readSessionLogs2(name,options)});program2.command("answer <name> <choice>").description('Answer a question for an agent (use "text:..." for text input)').action(async(name,choice)=>{await answerQuestion(name,choice)});program2.command("status").description("Aggregated observability \u2014 agents to resume, active alerts, optional health checklist").option("--health","Add the four-item health checklist (partition, watchdog, spill, watcher metrics)").option("--all","Include archived / done agents").option("--debug","Add structural-inference audit (former `doctor --state`)").option("--json","Emit JSON instead of human output").action(async(options)=>{try{await statusCommand2(options)}catch(error2){let message=error2 instanceof Error?error2.message:String(error2);console.error(`Error: ${message}`),process.exit(1)}});program2.command("ls").description("List registered agents with runtime status").option("--json","Output as JSON").option("--source <name>","Filter by executor metadata source (e.g. omni)").option("--all","Include archived agents (hidden by default)").action(async(options)=>{try{await handleLsCommand(options)}catch(error2){let message=error2 instanceof Error?error2.message:String(error2);console.error(`Error: ${message}`),process.exit(1)}});var args=process.argv.slice(2),isTuiPane=process.env.GENIE_TUI_PANE==="left"&&args.length===0,tuiRightPane=process.env.GENIE_TUI_RIGHT;delete process.env.GENIE_TUI_PANE;delete process.env.GENIE_TUI_RIGHT;delete process.env.GENIE_IS_DAEMON;if(isTuiPane){let{isTuiDisabled:isTuiDisabled2,noticeTuiSkipped:noticeTuiSkipped2}=await Promise.resolve().then(() => (init_tui_disable(),exports_tui_disable));if(isTuiDisabled2())noticeTuiSkipped2("renderer"),await new Promise(()=>{}),process.exit(0);if(tuiRightPane)process.env.GENIE_TUI_RIGHT=tuiRightPane;let{launchTui:launchTui2}=await Promise.resolve().then(() => (init_tui(),exports_tui));await launchTui2(),process.exit(0)}if(args.length===0){{let{isTuiDisabled:isTuiDisabled2,noticeTuiSkipped:noticeTuiSkipped2}=await Promise.resolve().then(() => (init_tui_disable(),exports_tui_disable));if(isTuiDisabled2())noticeTuiSkipped2("attach"),console.error(" Use `genie ls`, `genie spawn <agent>`, `genie log`, etc. directly."),console.error(" Unset GENIE_TUI_DISABLE (or omit --no-tui) to re-enable the TUI."),process.exit(0)}if(process.env.TMUX?.includes("genie-tui")){let{findWorkspace:findWorkspace3}=await Promise.resolve().then(() => (init_workspace(),exports_workspace)),ws2=findWorkspace3();if(ws2){let{resolveAgentFromCwd:resolveAgentFromCwd3}=await Promise.resolve().then(() => (init_resolve_agent_cwd(),exports_resolve_agent_cwd)),resolved2=resolveAgentFromCwd3(process.cwd(),ws2.root);if(resolved2.source!=="default"){let{writeFileSync:writeFileSync30}=await import("fs"),{join:join86}=await import("path"),home=process.env.GENIE_HOME??join86((await import("os")).homedir(),".genie");try{writeFileSync30(join86(home,"tui-initial-agent"),resolved2.agent,"utf-8")}catch{}console.log(`Navigating to ${resolved2.agent}...`)}else console.log("Already inside the genie TUI. Use Ctrl-b d to detach, or run genie commands directly.")}else console.log("Already inside the genie TUI. Use Ctrl-b d to detach, or run genie commands directly.");process.exit(0)}if(process.env.TMUX)console.warn("Note: switching to genie TUI from within another tmux session.");let{findWorkspace:findWorkspace2}=await Promise.resolve().then(() => (init_workspace(),exports_workspace)),ws=findWorkspace2();if(!ws){let{isInteractive:isInteractive2}=await Promise.resolve().then(() => (init_interactivity(),exports_interactivity));if(!isInteractive2())console.error("No workspace found. Run `genie init` to set up."),process.exit(2);let{confirm:confirm2}=await Promise.resolve().then(() => (init_esm14(),exports_esm));if(!await confirm2({message:"No workspace found. Initialize? [Y/n]",default:!0}))console.error("No workspace found. Run `genie init` to set up."),process.exit(2);let{mkdirSync:mkdirSync30,writeFileSync:writeFileSync30}=await import("fs"),{basename:basename17,join:join86}=await import("path"),cwd=process.cwd(),genieDir=join86(cwd,".genie");mkdirSync30(genieDir,{recursive:!0});let config={name:basename17(cwd),agents:{defaults:{}},tmux:{socket:"genie"},sdk:{}};if(writeFileSync30(join86(genieDir,"workspace.json"),`${JSON.stringify(config,null,2)}
4634
+ `),console.log(`Workspace initialized: ${cwd}`),ws=findWorkspace2(),!ws)console.error("Failed to initialize workspace."),process.exit(1)}let{resolveAgentFromCwd:resolveAgentFromCwd2}=await Promise.resolve().then(() => (init_resolve_agent_cwd(),exports_resolve_agent_cwd)),resolved=resolveAgentFromCwd2(process.cwd(),ws.root),initialAgent=resolved.agent,{isServeRunning:isServeRunning2,autoStartServe:autoStartServe2,isTuiSessionReady:isTuiSessionReady2,ensureTuiSession:ensureTuiSession2}=await Promise.resolve().then(() => (init_serve(),exports_serve));if(!isServeRunning2())console.log("Starting genie serve..."),await autoStartServe2();else if(!isTuiSessionReady2())ensureTuiSession2(ws.root);if(ws.root)process.env.GENIE_TUI_WORKSPACE=ws.root;if(initialAgent)process.env.GENIE_TUI_AGENT=initialAgent;if(resolved.source!=="default"){let{execSync:execSync19}=await import("child_process");try{execSync19(`tmux has-session -t =${initialAgent} 2>/dev/null`,{stdio:"pipe"})}catch{console.log(`Spawning ${initialAgent}...`);try{execSync19(`genie spawn ${initialAgent}`,{stdio:"inherit",timeout:15000})}catch{}}}if(initialAgent){let{writeFileSync:writeFileSync30}=await import("fs"),{join:join86}=await import("path"),home=process.env.GENIE_HOME??join86((await import("os")).homedir(),".genie");try{writeFileSync30(join86(home,"tui-initial-agent"),initialAgent,"utf-8")}catch{}}let{attachTuiSession:attachTuiSession2}=await Promise.resolve().then(() => (init_tmux2(),exports_tmux2));attachTuiSession2(),process.exit(0)}if(args.every((a)=>a==="--reset")){let{sessionCommand:sessionCommand2}=await Promise.resolve().then(() => (init_session(),exports_session));await sessionCommand2({reset:!0}),process.exit(0)}var sessionIdx=args.indexOf("--session");if(sessionIdx!==-1&&sessionIdx+1<args.length){let sessionName=args[sessionIdx+1];if(!args.filter((_2,i2)=>i2!==sessionIdx&&i2!==sessionIdx+1).some((a)=>!a.startsWith("-")))try{await startNamedSession(sessionName),process.exit(0)}catch(err){console.error(`Error: ${err instanceof Error?err.message:err}`),process.exit(1)}else try{await program2.parseAsync(process.argv)}finally{await stopOtelReceiver().catch(()=>{}),await shutdown().catch(()=>{})}}else try{let _cmdStart=Date.now();if(await program2.parseAsync(process.argv),process.env.GENIE_PROFILE_DB)console.error(`[profile] parseAsync=${Date.now()-_cmdStart}ms`)}finally{let _shutStart=Date.now();if(await stopOtelReceiver().catch(()=>{}),await shutdown().catch(()=>{}),process.env.GENIE_PROFILE_DB)console.error(`[profile] shutdown=${Date.now()-_shutStart}ms`)}