@polycode-projects/the-mechanical-code-talker 5.0.0 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,41 +1,41 @@
1
- (()=>{var Vy=Object.defineProperty;var I=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(s){throw n=[s],s}};var Fn=(e,t)=>{for(var n in t)Vy(e,n,{get:t[n],enumerable:!0})};var ct,NC,PC,MC,FC,DC,zC,BC,UC,WC,GC,HC,VC,qC,KC,YC,XC,Q,$e,Xt,Ld,JC,QC,ZC,Be=I(()=>{ct=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},NC=ct("createRequire"),PC=ct("readFileSync"),MC=ct("access"),FC=ct("readFile"),DC=ct("writeFile"),zC=ct("appendFile"),BC=ct("mkdir"),UC=ct("mkdtemp"),WC=ct("rename"),GC=ct("unlink"),HC=ct("rm"),VC=ct("stat"),qC=ct("copyFile"),KC=ct("readdir"),YC=ct("createReadStream"),XC=ct("createWriteStream"),Q=(...e)=>e.join("/"),$e=e=>String(e).replace(/\/[^/]*$/,""),Xt=(...e)=>e.join("/"),Ld="/",JC=ct("randomBytes"),QC=ct("spawnSync"),ZC=ct("createInterface")});var lt,tO,nO,Nd,ze,fr,qy,xn,Ky,ui,Ja,Yy,Xy,sO,Jy,oO,rO,iO,aO,cO,jt=I(()=>{lt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},tO=lt("createRequire"),nO=lt("readFileSync"),Nd=lt("access"),ze=lt("readFile"),fr=lt("writeFile"),qy=lt("appendFile"),xn=lt("mkdir"),Ky=lt("mkdtemp"),ui=lt("rename"),Ja=lt("unlink"),Yy=lt("rm"),Xy=lt("stat"),sO=lt("copyFile"),Jy=lt("readdir"),oO=lt("createReadStream"),rO=lt("createWriteStream"),iO=lt("randomBytes"),aO=lt("spawnSync"),cO=lt("createInterface")});function ho(e){let t=Zy.exec(String(e||""));return t?t[1].toLowerCase():null}function di(e){return String(e||"").replace(ev,"$1")}function Ps(e){return e.replace(tv,"").trim()}function on(e){let t=e;for(let n=0;n<2;n+=1){let s=t.replace(sv,"").trim();if(s=s.replace(rv,"").trim(),s===t)break;t=s}return t}var Pd,mr,Ns,Md,Fd,Qy,Zy,hr,Jt,Qa,ev,hn,Za,tv,nv,sv,ov,rv,de,gr,iv,Dd,Ue,Qt,as,zd,ec,tc,nc,Bd,br,Ms,Ud,Wd,Fs,Dn,zn,go,Xe,Gd,Ds,zs,cs,En,Hd,wr,bo,pi,wo,Vd,Bn=I(()=>{Pd=["is a superclass of","are a superclass of","is a parent class of","are a parent class of","superclass","superclasses"],mr={imports:{bare:"import",comment:"Module -> Module: subject's import graph references object (usesComplexType).",verbs:["couples to","couple to","depends on","imports","import","relies on","rely on","requires","require","references","reference","pulls in","pull in","built on","builds on","build on","uses code from","grabs","grab","pulls from","pull from","leans on","lean on","is wired to","are wired to","is hooked up to","are hooked up to","importing"]},uses:{bare:"use",comment:"query-side union: imports (Module->Module) + calls (Module->Module) + callsSymbol (fn->fn).",verbs:["uses","use","makes use of","make use of","talks to","talk to","using"]},calls:{bare:"call",comment:"Function/Method -> Function/Class (symbol-grain) or Module -> Module (coarse): subject invokes object.",verbs:["invokes","invoke","calls","call","runs","run","executes","execute","hits","hit","triggers","trigger","fires","fire","kicks off","kick off","calling"]},defines:{bare:"define",comment:"Module -> top-level Function/Class/Method/Attribute: subject declares object.",verbs:["defines","define","declares","declare","has","have","holds","hold","defining"]},contains:{bare:"contain",comment:"Class -> Method/Attribute: subject's membership includes object.",verbs:["contains","contain","lives in","live in","is defined in","are defined in","is part of","are part of","sits in","sit in","sits inside","sit inside","containing"]},tests:{bare:"test",comment:"Module -> Module: subject is a test module importing/covering object.",verbs:["tests","test","covers","cover","verifies","verify","exercises","exercise","checks","check","makes sure of","make sure of","testing"]},inherits:{bare:"inherit from",comment:"Class -> Class: subject's declared base resolves to object (subclassOf).",verbs:["inherits from","inherit from","inherits","inherit","extends","extend","subclasses","subclass","derives from","derive from","is a subclass of","are a subclass of","is a kind of","are a kind of","is built off","are built off","is built on top of","are built on top of","extending","inheriting from","inheriting","subclassing","extends from",...Pd]},touches:{bare:"touch",comment:"Commit -> Module (coarse) or Commit -> symbol (fine, touchesSymbol): a commit's changed-line-range intersects object.",verbs:["touched","touches","changed","change","modified","modifies","was changed in","were changed in","was edited in","were edited in","was modified by","were modified by","was tweaked in","were tweaked in","got changed in","got edited in","touch","changed in","landed in","land in","was in","were in","went into","included in","updated","edited","touching"]},cochange:{bare:"co-change with",comment:"Module -> Module: subject and object are frequently committed together (changeCoupledWith).",verbs:["changed with","co-changes with","co-change with","changes alongside","change alongside","shares commits with","share commits with","tends to change together with","tend to change together with","moves together with","move together with","changed together with","change together with","changes together with","changes with","change with","tends to change with","tend to change with","usually changes with"]},reexports:{bare:"re-export",comment:"Module -> exported symbol: subject's public API surface (__all__/export list).",verbs:["exports","export","re-exports","re-export","passes through","pass through","exposes","expose","exporting"]},serves:{bare:"serve",comment:"subject provides or backs the object \u2014 a handler serving a route, a module serving a surface (mgx:serves).",verbs:["serves","serve","serving"]},denotes:{bare:"denote",comment:"subject names the object \u2014 a glossary/lexicon term denoting a code entity (mgx:denotes).",verbs:["denotes","denote","denoting"]}},Ns=Object.freeze({placement:Object.freeze({predicate:"mgx:currently-in",comment:"individual -> place: where the subject is right now.",nouns:Object.freeze(["location","locations","position","positions","place","places","whereabouts","room","rooms"]),reads:"is in",matchesLocativePredicates:!0}),mood:Object.freeze({predicate:"mgx:feels",comment:"individual -> mood word: how the subject feels right now.",nouns:Object.freeze(["mood","moods","feeling","feelings","emotion","emotions"]),reads:"feels"}),mass:Object.freeze({predicate:"mgx:mass",comment:"individual -> number: the subject's current mass.",nouns:Object.freeze(["mass","masses","weight","weights"]),reads:"has mass"})}),Md=Object.freeze(Object.fromEntries(Object.entries(Ns).flatMap(([e,{nouns:t}])=>t.map(n=>[n,e])))),Fd=Object.freeze(Object.values(Ns).map(e=>e.predicate)),Qy=Object.freeze(["on","in","at","inside","under","below","above","near","beside","behind","by"]),Zy=new RegExp(`^mgx:[a-z]+-(${Qy.join("|")})$`,"i");hr=Object.freeze([...Pd,"is the superclass of","are the superclass of","is the parent class of"]),Jt=Object.freeze(["defined","declared","located","implemented"]),Qa=Object.freeze(["now","currently","right now","at the moment","these days","today"]),ev=new RegExp(`\\s+(?:${[...Qa].sort((e,t)=>t.length-e.length).join("|")})(\\s*[?.!]*)$`,"i");hn=Object.freeze(["mentioned","referenced"]),Za=Object.freeze(["in this graph","in the graph","in this codebase","in the codebase","in this repo","in the repo","here"]),tv=new RegExp(`\\s+(?:${Za.join("|")})\\s*[?.!]*$`,"i");nv=Object.freeze(["then","though","too"]),sv=new RegExp(`\\s+(?:${nv.join("|")})\\s*[?.!]*$`,"i"),ov=Object.freeze(["please explain","explain"]),rv=new RegExp(`,\\s*(?:${ov.join("|")})\\s*[?.!]*$`,"i");de=Object.freeze(Object.fromEntries(Object.entries(mr).flatMap(([e,{verbs:t}])=>t.map(n=>[n,e])))),gr=Object.freeze(new Set(["has","have","holds","hold"])),iv=e=>!hr.includes(e),Dd=Object.freeze([...new Set(Object.keys(de).filter(iv).map(e=>e.match(/^(?:is|are)\s+an?\s+(.+)$/i)).filter(Boolean).map(e=>e[1].toLowerCase()))]),Ue=Object.freeze({function:"Function",functions:"Function",method:"Method",methods:"Method",class:"Class",classes:"Class",module:"Module",modules:"Module",mod:"Module",mods:"Module",file:"Module",files:"Module",package:"Package",packages:"Package",attribute:"Attribute",attributes:"Attribute",field:"Attribute",fields:"Attribute",variable:"GlobalVariable",variables:"GlobalVariable",global:"GlobalVariable",globals:"GlobalVariable",change:"Change",changes:"Change",commit:"Commit",commits:"Commit"}),Qt=Object.freeze({explicitly:"direct",directly:"direct",transitively:"transitive",indirectly:"transitive"}),as=Object.freeze({imported:"imports",called:"calls",used:"uses",tested:"tests",covered:"tests",verified:"tests",exercised:"tests",checked:"tests",defined:"defines",declared:"defines",inherited:"inherits",extended:"inherits",subclassed:"inherits",contained:"contains",exported:"reexports","re-exported":"reexports",exposed:"reexports",touched:"touches",changed:"touches",modified:"touches",edited:"touches",updated:"touches"}),zd=Object.freeze({"inherited from":{kind:"inherits",role:"object"},"extended from":{kind:"inherits",role:"object"},"subclassed from":{kind:"inherits",role:"object"},"defined in":{kind:"defines",role:"agent"},"declared in":{kind:"defines",role:"agent"},"contained in":{kind:"contains",role:"agent"},"imported by":{kind:"imports",role:"agent"},"called by":{kind:"calls",role:"agent"},"used by":{kind:"uses",role:"agent"},"tested by":{kind:"tests",role:"agent"},"covered by":{kind:"tests",role:"agent"},"touched by":{kind:"touches",role:"agent"},"changed by":{kind:"touches",role:"agent"},"exported by":{kind:"reexports",role:"agent"}}),ec=Object.freeze({"ain't":"is not",aint:"is not","isn't":"is not",isnt:"is not","aren't":"are not",arent:"are not","doesn't":"does not",doesnt:"does not","don't":"do not",dont:"do not","didn't":"did not",didnt:"did not","there's":"there is",theres:"there is","what's":"what is",whats:"what is","who's":"who is",whos:"who is",gonna:"going to",wanna:"want to",gotta:"got to",yer:"your",ur:"your",gimme:"give me"}),tc=Object.freeze({funtion:"function",funtions:"functions",fucntion:"function",fucntions:"functions",functoin:"function",functoins:"functions",calss:"class",calsses:"classes",classs:"class",clases:"classes",modul:"module",moduls:"modules",moduel:"module",moduels:"modules",moudle:"module",moudles:"modules",methdo:"method",methdos:"methods",mehtod:"method",mehtods:"methods",comit:"commit",comits:"commits",commmit:"commit",commmits:"commits",varaible:"variable",varaibles:"variables",varibale:"variable",varibales:"variables",atribute:"attribute",atributes:"attributes",improt:"import",improts:"imports",imoprt:"import",imoprts:"imports",inherts:"inherits",inheirts:"inherits",extands:"extends",extneds:"extends",depnds:"depends",touchs:"touches",tuoches:"touches",touhced:"touched",touchd:"touched",defned:"defined",chagned:"changed",chnaged:"changed",chagnes:"changes",chnages:"changes",calles:"calls",exprot:"export",exprots:"exports",tets:"tests",whcih:"which",wich:"which",whihc:"which",wehre:"where",whre:"where",waht:"what",wat:"what",dat:"that",dose:"does",doess:"does",teh:"the",manyn:"many",mnay:"many",amny:"many",mnany:"many",hwo:"how",coutn:"count",conut:"count",cuont:"count",ocunt:"count",numer:"number",nubmer:"number",numbr:"number",nmuber:"number",lst:"list",lsit:"list",ilst:"list",shwo:"show",hsow:"show",dispaly:"display",dsiplay:"display",funtcions:"functions",funciton:"function",funcitons:"functions"}),nc=Object.freeze({folder:"module",folders:"modules",directory:"module",directories:"modules",func:"function",funcs:"functions",changeset:"commit",changesets:"commits",revision:"commit",revisions:"commits",property:"attribute",properties:"attributes"}),Bd=/\b([a-z]{3,})in'/gi,br=Object.freeze(["um","uh","erm","so","like","yo","hey","bru","bro","fam","mate","please","could you","can you","would you","tell me","i wonder","just wondering","quickly","real quick","kinda","sorta","btw","by the way","you","quick q"]),Ms=Object.freeze(["this","it","that","here","this one","that one"]),Ud=Object.freeze([{re:/\bthere\s+is\s+not\s+(?:anything|nothing)\s+(?:that\s+)?(\S.*)$/i,to:e=>`what ${e[1]}`},{re:/\bthere\s+is\s+no\s+\S+\s+(?:that\s+)?(\S.*)$/i,to:e=>`what ${e[1]}`},{re:/\bis\s+not\s+there\s+(?:anything|nothing)\s+(?:that\s+)?(\S.*)$/i,to:e=>`what ${e[1]}`},{re:/\b(?:nobody|nothing|no one)\s+(\S.*?)(?:,?\s+does\s+it\??|,?\s+do\s+they\??)?$/i,to:e=>`what ${e[1]}`}]),Wd=Object.freeze([{re:/^what\s+(?:is|was|were|are)\s+in\s+((?:commit\s+)?[0-9a-f]{7,40})\??$/i,to:e=>`what did ${e[1]} touch`},{re:/^what\s+(?:went|got)\s+into\s+((?:commit\s+)?[0-9a-f]{7,40})\??$/i,to:e=>`what did ${e[1]} touch`},{re:/^what\s+made\s+it\s+into\s+((?:commit\s+)?[0-9a-f]{7,40})\??$/i,to:e=>`what did ${e[1]} touch`}]),Fs=Object.freeze(["mean","means","stand for","stands for","signify","signifies","represent","represents","refer to","refers to"]),Dn=Object.freeze(["that","which","who"]),zn=Object.freeze(["something","anything","everything","somethings","things","thing","entities","entity","nodes","node","stuff","code","symbol","symbols"]),go=Object.freeze({"but do not":"difference","but does not":"difference","and do not":"difference","and does not":"difference","but not":"difference","and not":"difference",except:"difference",without:"difference",and:"intersection",plus:"intersection",but:"intersection",or:"union"}),Xe=Object.freeze({public:{via:"visibility",value:"public"},private:{via:"visibility",value:"private"},protected:{via:"visibility",value:"protected"},static:{via:"attr",attr:"isStatic"},abstract:{via:"attr",attr:"isAbstract"},constant:{via:"attr",attr:"isConstant"},exported:{via:"exported"},"re-exported":{via:"exported"},tested:{via:"tested",value:!0},covered:{via:"tested",value:!0},untested:{via:"tested",value:!1},uncovered:{via:"tested",value:!1}}),Gd=Object.freeze(new Set(["tests","test","anything","something","anyone","someone","any"])),Ds=Object.freeze(["how many","how much","how many of","number of","total number of","quantity of","tally of","sum of","total of","amount of","count","count up","count of","tot up"]),zs=Object.freeze(["list","show","show me","show us","display","print","print out","dump","enumerate","name","give me","get me","spit out","rattle off","run down","run through","ls","what are","which are"]),cs=Object.freeze({most:"most",greatest:"most",highest:"most",biggest:"most",largest:"most","most-connected":"most","most connected":"most",fewest:"fewest",least:"fewest",smallest:"fewest",lowest:"fewest"}),En=Object.freeze({imports:{kind:"imports",dir:"out"},dependencies:{kind:"imports",dir:"out"},importers:{kind:"imports",dir:"in"},dependents:{kind:"imports",dir:"in"},callers:{kind:"calls",dir:"in",sibling:"callsSymbol"},callees:{kind:"calls",dir:"out",sibling:"callsSymbol"},calls:{kind:"calls",dir:"out",sibling:"callsSymbol"},methods:{kind:"contains",dir:"out",filter:"Method"},members:{kind:"contains",dir:"out"},tests:{kind:"tests",dir:"in"},test:{kind:"tests",dir:"in"},subclasses:{kind:"inherits",dir:"in"},connections:{kind:"*",dir:"both"},edges:{kind:"*",dir:"both"},connected:{kind:"*",dir:"both"},imported:{kind:"imports",dir:"in"},"depended-on":{kind:"imports",dir:"in"},depended:{kind:"imports",dir:"in"},used:{kind:"imports",dir:"in",sibling:"callsSymbol"},called:{kind:"calls",dir:"in",sibling:"callsSymbol"}}),Hd=Object.freeze({tests:"Module",test:"Module"}),wr=Object.freeze(["those","them","these"]),bo=Object.freeze(["contains","defines"]),pi=Object.freeze(["the","a","an","some","other","about","please","pls","plz","kindly","just","simply","maybe","perhaps","thanks","thank","ta","cheers","too","also","well","either","sorry","oops","actually","mean","meant","rather","hi","hello","hey","yo","hiya","howdy","ok","okay","matey","mate","buddy","pal","dude","man","bro","bru","fam","friend","sir","maam","folks","guys","everyone","dear","tmct","show","tell","give","list","find","me","us","lemme"]),wo=Object.freeze({tally:"count",tallies:"count",sum:"count",total:"count",totals:"count"}),Vd=Object.freeze(["help","help me","how do i ask","how do i use this","what can i ask","what can you ask","usage","commands","examples","syntax","options"])});var We,yo,sc=I(()=>{We="#000000",yo=Object.freeze({happy:`<circle cx="-0.4" cy="-0.15" r="0.11" fill="${We}" opacity="0.85"/><circle cx="0.4" cy="-0.15" r="0.11" fill="${We}" opacity="0.85"/><path d="M -0.4 0.35 Q 0 0.68 0.4 0.35" fill="none" stroke="${We}" stroke-width="0.09" stroke-linecap="round" opacity="0.85"/>`,sad:`<circle cx="-0.4" cy="-0.1" r="0.1" fill="${We}" opacity="0.85"/><circle cx="0.4" cy="-0.1" r="0.1" fill="${We}" opacity="0.85"/><path d="M -0.38 0.55 Q 0 0.3 0.38 0.55" fill="none" stroke="${We}" stroke-width="0.09" stroke-linecap="round" opacity="0.85"/>`,angry:`<path d="M -0.58 -0.32 L -0.22 -0.16" stroke="${We}" stroke-width="0.09" stroke-linecap="round" opacity="0.85"/><path d="M 0.58 -0.32 L 0.22 -0.16" stroke="${We}" stroke-width="0.09" stroke-linecap="round" opacity="0.85"/><circle cx="-0.32" cy="-0.02" r="0.09" fill="${We}" opacity="0.85"/><circle cx="0.32" cy="-0.02" r="0.09" fill="${We}" opacity="0.85"/><path d="M -0.36 0.5 L 0.36 0.42" stroke="${We}" stroke-width="0.1" stroke-linecap="round" opacity="0.85"/>`,scared:`<circle cx="-0.4" cy="-0.12" r="0.2" fill="none" stroke="${We}" stroke-width="0.07" opacity="0.85"/><circle cx="-0.4" cy="-0.12" r="0.07" fill="${We}" opacity="0.85"/><circle cx="0.4" cy="-0.12" r="0.2" fill="none" stroke="${We}" stroke-width="0.07" opacity="0.85"/><circle cx="0.4" cy="-0.12" r="0.07" fill="${We}" opacity="0.85"/><circle cx="0" cy="0.42" r="0.09" fill="none" stroke="${We}" stroke-width="0.07" opacity="0.85"/>`,surprised:`<circle cx="-0.38" cy="-0.12" r="0.17" fill="none" stroke="${We}" stroke-width="0.07" opacity="0.85"/><circle cx="-0.38" cy="-0.12" r="0.06" fill="${We}" opacity="0.85"/><circle cx="0.38" cy="-0.12" r="0.17" fill="none" stroke="${We}" stroke-width="0.07" opacity="0.85"/><circle cx="0.38" cy="-0.12" r="0.06" fill="${We}" opacity="0.85"/><ellipse cx="0" cy="0.42" rx="0.16" ry="0.22" fill="${We}" opacity="0.7"/>`,calm:`<path d="M -0.5 -0.1 Q -0.4 -0.2 -0.3 -0.1" fill="none" stroke="${We}" stroke-width="0.08" stroke-linecap="round" opacity="0.85"/><path d="M 0.3 -0.1 Q 0.4 -0.2 0.5 -0.1" fill="none" stroke="${We}" stroke-width="0.08" stroke-linecap="round" opacity="0.85"/><path d="M -0.3 0.4 Q 0 0.5 0.3 0.4" fill="none" stroke="${We}" stroke-width="0.08" stroke-linecap="round" opacity="0.85"/>`})});var av,rn,qd,Kd,oc,Yd,mO,hO,Xd=I(()=>{Bn();sc();av=()=>Object.keys(yo).sort(),rn=e=>({type:"object",required:["symbol"],properties:{symbol:{type:"string",description:e}}}),qd=e=>({type:"object",required:["module"],properties:{module:{type:"string",description:e}}}),Kd=e=>({type:"object",required:["class"],properties:{class:{type:"string",description:e}}}),oc=Object.freeze([{name:"tmct_context",tier:"hot",summary:"A sized edit bundle for one symbol \u2014 exemplar source, sibling signatures, registration anchor and the insertion region, in one call.",agentDescription:"START HERE to add/modify code: ONE call returns a sized edit bundle (exemplar source, sibling signatures, registration, insertion region) \u2014 then write directly, don't Read.",inputSchema:{type:"object",required:["symbol"],properties:{symbol:{type:"string",description:"Module path (e.g. path/to/module) or a sibling function/class name defined in it."},depth:{type:"string",enum:["min","auto","full"],default:"auto",description:"auto (sized to the task) | min (leanest) | full (every section)."}}},example:{symbol:"django/utils/text.py"}},{name:"tmct_snippet",tier:"hot",summary:"The exact source of one function, class or Class.method \u2014 its line span only, plus a one-line in-repo call hint.",agentDescription:"EXACT source of one function/class/Class.method by name (its line span only) + a one-line in-repo call hint. Prefer over Read for a single symbol.",inputSchema:{type:"object",required:["symbol"],properties:{symbol:{type:"string",description:"function/class name, Class.method, or fn:<path>#name."}}},example:{symbol:"Truncator.chars"}},{name:"tmct_ask",tier:"hot",summary:"A structural question in plain English, answered from the graph in one call \u2014 no model, and a clean miss instead of a guess.",agentDescription:'Ask a structural question in plain English: "which functions call X", "what uses X", "where is X defined", "when did X change". One call, no model. A clean miss beats a guess.',inputSchema:{type:"object",required:["query"],properties:{query:{type:"string",description:'A free-text question, e.g. "which functions explicitly couple to logging".'}}},example:{query:"which modules import src/core/model.mjs"},chat:{exampleRepo:"examples/mini-webapp",grammar:[{form:"which <things> <relation-verb> <entity>",example:"which modules import src/core/model.mjs",answers:"the imports edge, read forwards"},{form:"what is <relation-verb-passive> <entity>",example:"what is imported by src/core/store.mjs",answers:"the same edge, read backwards \u2014 a passive is the opposite direction, not a synonym"},{form:"what <relation-verb> <entity>",example:"what uses src/lib/http.mjs",answers:"the uses union: imports plus calls"},{form:"where is <entity> <where-marker>",example:"where is saveStore defined",answers:"the definition's file and line span"},{form:"when did <entity> change",example:"when did src/core/store.mjs change",answers:"the commits that touched it, newest first"}],whereMarkers:Jt}},{name:"tmct_describe",tier:"cold",summary:"Locate one symbol and list its typed edges (both directions) with provenance.",inputSchema:rn("A module path, symbol name, or Class.method."),example:{symbol:"django/utils/text.py"}},{name:"tmct_signature",tier:"cold",summary:"One symbol's API surface (params, returns, raises/catches, flags, decorators, doc) without the body.",inputSchema:rn("A function, method, or Class.method name."),example:{symbol:"Truncator.chars"}},{name:"tmct_impact",tier:"cold",summary:"Transitive reverse closure over imports/calls \u2014 what breaks if a module or symbol changes, by depth, with tests.",inputSchema:qd("The module (or a symbol it defines) whose dependents you want."),example:{module:"django/utils/text.py"}},{name:"tmct_search",tier:"cold",summary:"Free-text/ranked lookup over the code-map to find the right module or symbol.",inputSchema:{type:"object",required:[],properties:{query:{type:"string",description:"Free text to rank against the code-map. Required unless kind narrows the search on its own."},kind:{type:"string",description:"Restrict to an entity class, e.g. function, class, module."},decorator:{type:"string",description:"Restrict to definitions carrying this decorator."},name:{type:"string",description:"Restrict to definitions whose name matches."}}},example:{query:"template filters",kind:"function"}},{name:"tmct_members",tier:"cold",summary:"A class's methods + attributes (file:line, decorators) in one slice.",inputSchema:Kd("The class whose members you want."),example:{class:"Truncator"}},{name:"tmct_subclasses",tier:"cold",summary:"A class's base classes plus the transitive set of classes that extend it.",inputSchema:Kd("The class to walk the inheritance edges of."),example:{class:"Field"}},{name:"tmct_related",tier:"cold",summary:"A term's synonyms (skos:altLabel) and related concepts (skos:related), from the memory graph's relation facts.",inputSchema:{type:"object",required:["term"],properties:{term:{type:"string",description:"The term whose synonyms / related concepts you want."}}},example:{term:"sofa"}},{name:"tmct_sprite",tier:"cold",summary:"The sprite markup for a class, resolved up the taught rdfs:subClassOf chain \u2014 with the expression and size asked for, and the ancestor chain the resolver walked to find it.",inputSchema:{type:"object",required:["class"],properties:{class:{type:"string",description:"The class to draw, e.g. spider. Resolved through the memory graph's own rdfs:subClassOf taxonomy."},expression:{type:"string",enum:av(),description:"The face the sprite wears, as an mgx:feels value. A class whose template takes no expression parameter misses rather than dropping it."},size:{type:"string",description:"A taught size property word (mgx:hasProperty), resolved to a numeric render SCALE \u2014 the size of the thing drawn, not a choice of template tier."}}},example:{class:"spider",expression:"happy",size:"large"}},{name:"tmct_architecture",tier:"cold",summary:"Package/module map + the most-imported hub modules (optionally scoped to a package).",inputSchema:{type:"object",required:[],properties:{package:{type:"string",description:"Scope the map to one package. Omit for the whole repository."}}},example:{package:"django/template"}},{name:"tmct_exports",tier:"cold",summary:"A module's public __all__ surface, each name resolved to the module that defines it.",inputSchema:qd("The module whose public API surface you want."),example:{module:"django/db/models/__init__.py"}},{name:"tmct_tests_for",tier:"cold",summary:"The test modules covering a symbol or module, from the typed test edges.",inputSchema:rn("The symbol or module to find covering tests for."),example:{symbol:"django/utils/text.py"}},{name:"tmct_untested",tier:"cold",summary:"Source modules with no covering test module \u2014 a coverage-gap view (no arguments).",inputSchema:{type:"object",required:[],properties:{}},example:{}},{name:"tmct_history",tier:"cold",summary:"Recent commits that touched a symbol's module (newest first).",inputSchema:rn("The symbol whose module's history you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_file_history",tier:"cold",summary:"Commits that touched a symbol's module, each with author / date / subject.",inputSchema:rn("The symbol whose module's history you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_method_history",tier:"cold",summary:"Commits that touched a specific method symbol (fine-grained), with author / date / subject.",inputSchema:rn("A Class.method name."),example:{symbol:"Truncator.chars"}},{name:"tmct_class_history",tier:"cold",summary:"Commits that touched a specific class symbol (fine-grained), with author / date / subject.",inputSchema:rn("A class name."),example:{symbol:"Truncator"}},{name:"tmct_callers",tier:"cold",summary:"Modules that call into a symbol's module (one hop).",inputSchema:rn("The symbol whose callers you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_callees",tier:"cold",summary:"Modules a symbol's module calls into (one hop).",inputSchema:rn("The symbol whose callees you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_calls",tier:"cold",summary:"The in-repo symbols a function calls (fn\u2192fn), each with file:line.",inputSchema:rn("The function whose in-repo call sites you want."),example:{symbol:"slugify"}},{name:"tmct_cochanges",tier:"cold",summary:"Modules that historically change in the same commit as a symbol's module (git co-change).",inputSchema:rn("The symbol whose module's change-coupling you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_context_more",tier:"cold",summary:"The bundle sections a lean tmct_context omitted (siblings / tests / cochange / class members / re-exports).",inputSchema:rn("The symbol a lean tmct_context bundle was built for."),example:{symbol:"django/utils/text.py"}},{name:"tmct_export",tier:"cold",summary:"Every stored memory fact as JSONL (subject/predicate/object/provenance) \u2014 the shape `tmct extract` emits, for backup or audit.",inputSchema:{type:"object",required:[],properties:{}},example:{}},{name:"tmct_ingest",tier:"cold",summary:"Ground plain text into memory facts with the same deterministic recognizer the chat teach lane uses \u2014 the strict tier, plus an optional lower-trust fuzzy tier \u2014 and report the canonical triples.",inputSchema:{type:"object",required:["text"],properties:{text:{type:"string",description:"The plain text to ground into facts."},optimistic:{type:"boolean",description:"Also run the lower-trust fuzzy tier over sentences the strict recognizer skips."}}},example:{text:"A kettle is a container. An otter is a mammal.",optimistic:!0}}]),Yd=oc.filter(e=>e.tier==="hot"),mO=oc.filter(e=>e.tier==="cold"),hO=Object.freeze(oc.map(e=>e.name))});var Jd,Re,Dt=I(()=>{Be();Jd=Q(".tmct","graph.json"),Re=class extends Error{constructor(t){super(t),this.name="ToolError"}}});function cv(e){let t=new Set;for(let n of Array.isArray(e?.individuals)?e.individuals:[])n&&n.id&&t.add(n.id);return t}function Qd(e){let t=(Array.isArray(e)?e:[]).map((l,c)=>({file:l?.file,payload:l?.payload||{},name:l?.name!=null&&String(l.name).length?String(l.name):String(c)})),n=t.map(({payload:l})=>cv(l)),s=new Map;for(let l of n)for(let c of l)s.set(c,(s.get(c)||0)+1);let o=new Set([...s.entries()].filter(([,l])=>l>1).map(([l])=>l)),r={generated_at:"",classes:[],vocabulary:[],objectProperties:[],individuals:[],proseIndex:{}},i="",a=t.length>0;for(let{payload:l,name:c}of t){a=a&&!!l.bootstrap,typeof l.generated_at=="string"&&l.generated_at>i&&(i=l.generated_at);let u=f=>o.has(f)?`${c}/${f}`:f;Array.isArray(l.classes)&&r.classes.push(...l.classes),Array.isArray(l.vocabulary)&&r.vocabulary.push(...l.vocabulary);for(let f of Array.isArray(l.individuals)?l.individuals:[]){if(!f)continue;let p={...f};p.id&&(p.id=u(p.id)),Array.isArray(p.derived_from)&&(p.derived_from=p.derived_from.map(m=>u(m))),Array.isArray(p.mentions)&&(p.mentions=p.mentions.map(m=>m&&m.id?{...m,id:u(m.id)}:m)),r.individuals.push(p)}for(let f of Array.isArray(l.objectProperties)?l.objectProperties:[]){if(!f)continue;let p={...f};Array.isArray(p.examples)&&(p.examples=p.examples.map(m=>{if(!m)return m;let h={...m};return h.subject&&(h.subject=u(h.subject)),h.object&&(h.object=u(h.object)),h})),r.objectProperties.push(p)}let d=l.proseIndex&&typeof l.proseIndex=="object"?l.proseIndex:{};for(let[f,p]of Object.entries(d)){let m=r.proseIndex[f]||(r.proseIndex[f]=[]);for(let h of Array.isArray(p)?p:[]){let g=u(h);m.includes(g)||m.push(g)}}}return r.generated_at=i,a&&(r.bootstrap=!0),r}var Zd=I(()=>{});var $o={};Fn($o,{clearCache:()=>lv,emptyEntities:()=>rc,fetchEntities:()=>fv,registerProvider:()=>uv});function lv(){vo=null,yr=null}function uv(e){if(e!=null&&typeof e!="function")throw new TypeError("registerProvider expects a function (config) => entities payload, or null");let t=fi;return fi=e??null,vo=null,t}function rc(){return{generated_at:"",bootstrap:!0,classes:[],vocabulary:[],objectProperties:[],individuals:[],proseIndex:{}}}async function dv(e){let t;try{t=await ze(e,"utf8")}catch(n){if(n?.code==="ENOENT")return rc();throw new Re(`cannot read graph artifact at ${e} (${n?.code||n?.message||n})`)}try{return JSON.parse(t)}catch{throw new Re(`graph artifact ${e} is not valid JSON`)}}async function pv(e){let t=e.graphFiles,n=[...t].map(String).sort().join("|");if(yr&&yr.key===n)return yr.payload;let s=[];for(let r=0;r<t.length;r++){let i=await dv(t[r]);s.push({file:t[r],payload:i,name:e.graphNames?.[r]})}let o=Qd(s);return yr={key:n,payload:o},o}async function fv(e){if(fi){let s;try{s=await fi(e)}catch(o){throw o instanceof Re?o:new Re(`graph provider failed (${o?.message||o})`)}if(!s||typeof s!="object")throw new Re("graph provider returned no entities payload");return s}if(Array.isArray(e.graphFiles)&&e.graphFiles.length>1)return pv(e);if(vo&&vo.file===e.graphFile)return vo.payload;let t;try{t=await ze(e.graphFile,"utf8")}catch(s){if(s?.code==="ENOENT")return rc();throw new Re(`cannot read graph artifact at ${e.graphFile} (${s?.code||s?.message||s})`)}let n;try{n=JSON.parse(t)}catch{throw new Re(`graph artifact ${e.graphFile} is not valid JSON`)}return vo={file:e.graphFile,payload:n},n}var vo,yr,fi,vr=I(()=>{jt();Dt();Zd();vo=null,yr=null,fi=null});function Sn(e){if(!e)return[];let t=String(e).replace(/\.[A-Za-z0-9]+$/,"");return t=t.replace(/[/\\]/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/([A-Za-z])([0-9])/g,"$1 $2").replace(/([0-9])([A-Za-z])/g,"$1 $2").replace(/[_\-.]+/g," "),t.split(/\s+/).map(n=>n.toLowerCase()).filter(n=>n.length>1&&n.length<=ep)}function ic(e){if(!e)return[];let t=[],n=new Set;for(let s of String(e).toLowerCase().split(/[^a-z0-9]+/))if(!(s.length<2||s.length>ep||mv.has(s))&&!n.has(s)&&(n.add(s),t.push(s),t.length>=hv))break;return t}function mi({name:e,doc:t}={}){return[...new Set([...Sn(e),...ic(t)])].sort()}function tp(e){let t=Object.create(null);for(let n of e){let s=(n.attributes||[]).find(o=>o.key==="prose_tokens");if(s?.value)for(let o of s.value.split(" "))t[o]||(t[o]=[]),t[o].push(n.id)}for(let n of Object.keys(t))t[n].sort();return t}function Bs(e,t,{limit:n=10}={}){let s=[...new Set([...Sn(t),...ic(t)])];if(!s.length)return[];let o=new Map;for(let r of s)for(let i of e?.[r]||[])o.set(i,(o.get(i)||0)+1);return[...o.entries()].sort((r,i)=>i[1]-r[1]||String(r[0]).localeCompare(i[0])).slice(0,n).map(([r,i])=>({id:r,score:i}))}function np(e,t){let n=e&&(e["tmct:layers"]?e:e.proseIndex),s=n&&n["tmct:layers"],o=String(t||"").toLowerCase(),r={ids:[],via:null};if(!o||!s||typeof s!="object")return r;let i=new Set,a=new Set;for(let l of Object.keys(s)){let c=s[l];if(!c||typeof c!="object")continue;let u=c[o],d=Array.isArray(u)?u:Array.isArray(u?.ids)?u.ids:null;if(d?.length){for(let f of d)i.add(f);a.add(l)}}return i.size?{ids:[...i].sort(),via:[...a].sort().join("+")}:r}var mv,ep,hv,ls=I(()=>{mv=new Set("a an and or but the of to in on at for with from by as is are was were be been being it its this that these those i you he she they we me my your our do does did not no yes if then else than so such can will would should could may might about into over under out up down off again more most some any all what which who whom whose when where why how".split(/\s+/)),ep=40,hv=120});function sp(e){let t=e.indexOf("@"),n=t>=0?e.slice(0,t):e,s=t>=0?e.slice(t+1):"",o=n.indexOf(":"),r=o>=0?n.slice(o+1):"";return{createdAt:s,...r?{sessionId:r}:{}}}function gv(e){if(!e.startsWith(rp))return null;let t=e.indexOf("@"),n=t>=0?e.slice(0,t):e,s=t>=0?e.slice(t+1):"",o=n.indexOf(op);if(o<0)return null;let r=n.slice(o+op.length);return r?{kind:"teachNode",nodeId:r,displayName:n.slice(rp.length,o),createdAt:s}:null}function ds(e){let t=String(e||"").trim();if(!t)return null;if(t.startsWith("reference:")){let s=t.slice(10),o=s.indexOf(":");if(o<0)return{kind:"reference",pack:s||"unknown",article:""};let r=s.slice(0,o)||"unknown";return{kind:wv(r),pack:r,article:s.slice(o+1)}}if(t.startsWith("research:")){let s=t.slice(9),o=s.lastIndexOf("@");return{kind:"referenceLive",pack:"research",article:(o>=0?s.slice(0,o):s).trim()||"unknown"}}let n=t.split(/\s+/)[0];if(n.startsWith("corpus-weak:"))return{kind:"corpusWeak",name:n.slice(12)||"unknown"};if(n.startsWith("corpus:"))return{kind:"corpus",name:n.slice(7)||"unknown"};if(n.startsWith("child:"))return{kind:"corpus",name:n.slice(6).split(":")[0]||"unknown"};if(n.startsWith("world:"))return{kind:"corpus",name:n.slice(6).split(":")[0]||"unknown"};if(n.startsWith("mud:"))return{kind:"corpus",name:`mud:${n.slice(4).split(":")[0]||"unknown"}`};if(n.startsWith("ace:"))return{kind:"operator",...sp(n.slice(4))};if(n.startsWith("teach:")){let s=n.slice(6),o=gv(s);return o||{kind:"teach",...sp(s)}}return n.startsWith("web:")?{kind:"web",url:n.slice(4)}:n.startsWith("url:")?{kind:"web",url:n.slice(4)}:n.startsWith("optimistic-extract:")?{kind:"optimisticExtract",name:n.slice(19)||"unknown"}:n.startsWith("extracted:")?{kind:"extracted",name:n.slice(10)||"unknown"}:n.startsWith("entailed:")?{kind:"entailed",rule:n.slice(9)}:n.startsWith("chat:")||n.startsWith("session:")||n.startsWith("operator")?{kind:"operator"}:null}function up(e){let t=(e?.attributes||[]).find(s=>s.prop==="mgx:sourceReliability")?.value;if(t===void 0)return ap;let n=Number(t);return Number.isFinite(n)?Math.max(ac,Math.min(lp,n)):ap}function dp(e,t=Date.now(),n=yv){let s=Date.parse(e);if(!Number.isFinite(s))return 1;let o=Math.max(0,t-s);return ip+(1-ip)*Math.pow(.5,o/n)}function pp(e,t={},n={}){let s=typeof n.now=="number"?n.now:Date.now(),o=Array.isArray(e?.sourceIds)?e.sourceIds:[],r=new Set,i=[],a=[];for(let p of o){if(r.has(p))continue;r.add(p);let m=t[p],h=vv(m);if(!h)continue;i.push(h);let g=(Us[h]??0)*up(m);a.push(Math.max(0,Math.min(1,g)))}let l=0,c=1;for(let p of a)c*=1-p;if(a.length&&(l=Math.min(1,1-c)),i.includes("entailed")&&Array.isArray(n.premiseTrusts)&&n.premiseTrusts.length){let p=typeof n.ruleConfidence=="number"?n.ruleConfidence:1;l=Math.max(0,Math.min(1,Math.min(...n.premiseTrusts)*p))}let u=dp(e?.createdAt,s,n.halfLifeMs),d=xo(Math.min(1,l*u)),f={sourceTypes:i.slice().sort(),corroboration:i.length,createdAt:e?.createdAt||"",recency:xo(u)};return{score:d,inputs:f}}function gi(e,t){let n=(Us[e]??0)*up(t);return xo(Math.max(0,Math.min(1,n)))}function $v(e){if(e==="operator")return 1;let t=Us[e];return t===void 0?1:(t+1)/2}function bi(e,t={}){let n=typeof t.now=="number"?t.now:Date.now(),s=Array.isArray(e)?e:[],o=new Map,r=[];for(let a of s){let l=dp(a?.assertedAt,n,t.halfLifeMs),c=Math.max(0,Math.min(1,Number(a?.ownTrust)||0)),u=a?.sourceType||"",d=Math.max(0,Math.min(1,c*l)),f=o.get(u)||{complement:1,strongest:0};f.complement*=1-d,f.strongest=Math.max(f.strongest,d),o.set(u,f),r.push({sourceId:a?.sourceId||"",sourceType:u,ownTrust:c,recency:xo(l)})}let i=1;for(let[a,l]of o){let c=Math.max($v(a),l.strongest);i*=1-Math.min(1-l.complement,c)}return{score:s.length?xo(Math.min(1,1-i)):0,inputs:r}}function fp(e){return bi(e,{halfLifeMs:xv})}function mp({factsAsserted:e=0,factsContradicted:t=0}={}){let n=Math.max(0,Number(e)||0),s=Math.max(0,Number(t)||0),o=Math.max(-1,Math.min(1,(n-2*s)/Math.max(1,n))),r=n/(n+Ev),i=(o*r+1)/2;return xo(ac+(lp-ac)*i)}var Eo,hi,st,us,op,rp,bv,wv,Us,cc,cp,yv,ip,ac,lp,ap,xo,vv,xv,Ev,ps=I(()=>{Eo="mgx:trustScore",hi="mgx:trustInputs",st="mgx:createdAt",us="mgx:updatedAt";op="#node:",rp="peer:";bv="wikipedia-live",wv=e=>e===bv?"referenceLive":"reference";Us=Object.freeze({operator:1,teach:.95,provider:.9,corpus:.7,reference:.6,corpusWeak:.55,referenceLive:.5,extracted:.45,web:.4,optimisticExtract:.35,entailed:.3}),cc=Object.freeze({operator:{subClass:"tmct:AgentSource",prov:"prov:Agent"},teach:{subClass:"tmct:AgentSource",prov:"prov:Agent"},provider:{subClass:"tmct:AgentSource",prov:"prov:Agent"},corpus:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},corpusWeak:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},reference:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},referenceLive:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},web:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},extracted:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},optimisticExtract:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},entailed:{subClass:"tmct:ActivitySource",prov:"prov:Activity"}}),cp=new Set(Object.entries(cc).filter(([,e])=>e.prov==="prov:Agent").map(([e])=>e)),yv=720*60*60*1e3,ip=.9,ac=.5,lp=1.5,ap=1,xo=(e,t=6)=>Number(e.toFixed(t)),vv=e=>(e?.attributes||[]).find(t=>t.prop==="mgx:sourceType")?.value||"";xv=1/0;Ev=19});var Ws,lc=I(()=>{Ws=e=>/(^|\/)tests?\//.test(e)||/(^|\/)test_[^/]*\.py$/.test(e)||/\.tests(\.|$)/.test(e)||/(^|\/)[^/]*[-_]tests?\//.test(e)||/\.(test|spec)\.[cm]?[jt]sx?$/.test(e)});function uc(e,t){return Math.log(1+e/(1+t))}var $r=I(()=>{});var yi={};Fn(yi,{bfsLevels:()=>wi,findActionPath:()=>dc,findReachableSet:()=>pc});function hp(e){return e&&typeof e=="object"?JSON.stringify(e):String(e)}function gp(e,t){let n=[];for(let{action:s,nextState:o}of t(e)||[])n.push({state:o,actions:[s],states:[e,o]});return n}function dc(e,t,n,{maxDepth:s=50,stateKey:o=hp}={}){if(t(e))return{actions:[],states:[e]};let r=gp(e,n),i=new Set([o(e)]);for(let a=1;a<=s&&r.length;a+=1){for(let c of r)if(t(c.state))return{actions:c.actions,states:c.states};if(a===s)break;let l=[];for(let c of r){let u=o(c.state);if(!i.has(u)){i.add(u);for(let{action:d,nextState:f}of n(c.state)||[]){let p=o(f);i.has(p)||l.push({state:f,actions:[...c.actions,d],states:[...c.states,f]})}}}r=l}return null}function pc(e,t,{maxDepth:n=50,stateKey:s=hp}={}){let o=gp(e,t),r=new Set([s(e)]),i=[];for(let a=1;a<=n&&o.length;a+=1){let l=[];for(let c of o){let u=s(c.state);if(!r.has(u)&&(r.add(u),i.push({node:c.state,path:{actions:c.actions,states:c.states}}),a!==n))for(let{action:d,nextState:f}of t(c.state)||[]){let p=s(f);r.has(p)||l.push({state:f,actions:[...c.actions,d],states:[...c.states,f]})}}o=l}return i}function*wi(e,t,{maxDepth:n=8,keyOf:s=o=>o}={}){let o=new Set([e]),r=[e];for(let i=1;i<=n&&r.length;i+=1){let a=[],l=[];for(let c of r)for(let u of t(c)||[]){let d=s(u);o.has(d)||(o.add(d),a.push(u),l.push(d))}r=l,yield a}}var Gs=I(()=>{});function $i(e){let t=Array.isArray(e?.individuals)?e.individuals:[],n=new Map;for(let r of t)r&&r.id&&n.set(r.id,r);let s=(Array.isArray(e?.objectProperties)?e.objectProperties:[]).filter(r=>r&&(r.predicate||r.prop)).map(r=>{let i=(Array.isArray(r.examples)?r.examples:[]).filter(a=>a&&a.subject&&a.object);return{predicate:String(r.predicate||""),prop:r.prop||null,count:Number(r.count)||i.length,edges:i}}),o=s.filter(r=>r.count>r.edges.length).map(r=>({predicate:r.predicate,count:r.count,shown:r.edges.length}));return{individuals:t,byId:n,relations:s,truncated:o,generatedAt:e?.generated_at||null,proseIndex:e?.proseIndex||{}}}function wc(e){return!e||!Array.isArray(e.individuals)?0:e.individuals.filter(t=>(t.class||"")==="Module").length}function Hn(e){let t=String(e?.prop||"").toLowerCase();if(bp[t])return bp[t];let n=String(e?.predicate||"").toLowerCase();if(/symbol/.test(n)){if(/\b(call|invoke)/.test(n))return"callsSymbol";if(/(touch|chang|modif)/.test(n))return"touchesSymbol"}return/\bimport/.test(n)?"imports":/\b(call|invoke)/.test(n)?"calls":/\b(define|export|declare)/.test(n)?"defines":/\b(test|cover)/.test(n)?"tests":/\b(touch|chang|modif)/.test(n)?"touches":/\bcontain/.test(n)?"contains":/\b(inherit|subclass|extend|specializ)/.test(n)?"inherits":null}function Wn(e){return String(e||"").trim().toLowerCase().replace(/^\.\//,"").replace(/^\//,"")}function fc(e){let t=Wn(e).split("/");return t[t.length-1]}function Sv(e){return(e?.derived_from||[]).filter(Ap).length}function wp(e){return(e?.mentions||[]).reduce((n,s)=>n+(Number(s?.count)||0),0)+Sv(e)}function Zt(e,t){let n=Wn(t);if(!n)return{match:null,candidates:[]};let s=fc(n),o=!n.includes("/"),r=[];for(let i of e.individuals){let a=Wn(i.label),l=String(i.id||"").toLowerCase(),c=0;a===n||l===n?c=100:a.endsWith(`/${n}`)||o&&(fc(a)===s||fc(a).replace(/\.[a-z]+$/,"")===s)?c=80:a.includes(n)&&(c=Math.max(10,50-(a.length-n.length))),c>0&&r.push({ind:i,score:c})}return r.sort((i,a)=>a.score-i.score||wp(a.ind)-wp(i.ind)||String(i.ind.label).length-String(a.ind.label).length),{match:r[0]?.ind||null,candidates:r.slice(1,5).map(i=>i.ind)}}function _t(e){let t=(e?.attributes||[]).find(s=>s.key==="site");if(!t)return null;let n=String(t.value).match(/^(.*):(\d+)(?:-(\d+))?$/);return n?{path:n[1],start:Number(n[2]),end:n[3]?Number(n[3]):Number(n[2])}:null}function kv(e,t){let n=[],s=[];for(let o of e.relations){let r=o.edges.filter(a=>a.subject===t),i=o.edges.filter(a=>a.object===t);r.length&&n.push({group:o,edges:r}),i.length&&s.push({group:o,edges:i})}return{out:n,incoming:s}}function yp(e){return e.prop?`${e.predicate} [${e.prop}]`:e.predicate}function Gn(e){let t=e||"Entity",n=Sn(t);return n.length<2?t:n.map(s=>s[0].toUpperCase()+s.slice(1)).join(" ")}function ut(e,t,n=", "){return e.length<=t?e.join(n):e.slice(0,t).join(n)+`, +${e.length-t} more`}function yc(e,t,{candidates:n=[]}={}){let s=[];s.push(`${t.label} \u2014 ${Gn(t.class)} (id: ${t.id})`);let o=(t.derived_from||[]).filter(Ap);o.length&&s.push(`attestation: touched by ${o.length} commit(s)`);for(let l of t.attributes||[])s.push(`attribute: ${l.key} = ${l.value}${l.prop?` [${l.prop}]`:""}`);let{out:r,incoming:i}=kv(e,t.id);if(!r.length&&!i.length)s.push("edges: none in the current artifact");else{s.push("edges:");for(let{group:l,edges:c}of r)s.push(` ${yp(l)} (${c.length}) \u2192 ${ut(c.map(u=>u.objectLabel||u.object),vp)}`);for(let{group:l,edges:c}of i)s.push(` \u2190 ${yp(l)} (${c.length}) by ${ut(c.map(u=>u.subjectLabel||u.subject),vp)}`)}let a=t.derived_from||[];return a.length&&s.push(`provenance: ${ut(a,jv)}`),n.length&&s.push(`other matches: ${n.map(l=>`${l.label} (${Gn(l.class)})`).join(", ")}`),e.truncated.length&&s.push(_v(e)),s.join(`
2
- `)}function _v(e){return`note: partial edge lists for: ${e.truncated.map(n=>`${n.predicate} (${n.shown}/${n.count})`).join(", ")}. Counts are complete; the lists are not.`}function ko(e,t,{maxDepth:n=8}={}){let s=new Map,o=new Map,r=(a,l,c,u)=>{!a||!l||a===l||(s.has(a)||s.set(a,[]),s.get(a).push({id:l,label:c,via:u}))};for(let a of e.relations){let l=Hn(a);if(l==="imports"||l==="calls")for(let c of a.edges)r(c.object,c.subject,c.subjectLabel||c.subject,a.predicate);else if(l==="callsSymbol")for(let c of a.edges){let u=Un(e,c.subject),d=Un(e,c.object);if(!u||!d)continue;let f=e.byId.get(u)?.label||u;r(d,u,f,a.predicate),u!==d&&r(c.object,u,f,a.predicate)}else if(l==="tests")for(let c of a.edges)o.has(c.object)||o.set(c.object,[]),o.get(c.object).push(c.subjectLabel||c.subject)}let i=[];for(let a of wi(t.id,l=>s.get(l)||[],{maxDepth:n,keyOf:l=>l.id})){if(!a.length)continue;let l=a.map(c=>({...c,tests:o.get(c.id)||[]})).sort((c,u)=>String(c.label).localeCompare(String(u.label)));i.push(l)}return i}function Cp(e,t,{maxDepth:n=8}={}){let s=ko(e,t,{maxDepth:n}),o=[`Impact of changing ${t.label} (reverse closure over imports/calls edges, module- and function-level):`];s.length||o.push("no dependents found in the current artifact \u2014 nothing imports or calls it (or its edges are not in the extracted graph yet).");let r=s.reduce((a,l)=>a+l.length,0);s.length&&o.push(`total: ${r} dependent(s) across ${s.length} depth level(s) (lists capped for brevity).`),s.forEach((a,l)=>{if(l>=Rv){o.push(`depth ${l+1}: ${a.length} more dependent(s) (not listed)`);return}o.push(l===0?`depth 1 (${a.length} direct dependents):`:`depth ${l+1} (${a.length}):`);for(let c of a.slice(0,mc)){let u=c.tests.length?`tests: ${ut(c.tests,Tv)}`:"tests: none recorded",d=l===0?`${c.via} it`:"reaches it through an intermediary";o.push(` - ${c.label} (${d}) \u2014 ${u}`)}a.length>mc&&o.push(` \u2026+${a.length-mc} more at depth ${l+1}`)});let i=e.truncated.filter(a=>{let l=Hn({predicate:a.predicate});return l==="imports"||l==="calls"||l==="callsSymbol"||l==="tests"});return i.length&&o.push("warning: partial edge lists ("+i.map(a=>`${a.predicate}: ${a.shown}/${a.count}`).join(", ")+") \u2014 this closure may be missing edges. Cross-check critical results with a lexical search (/find <term>)."),o.join(`
3
- `)}function Op(e){let t=new Map;for(let n of e.relations)if(Hn(n)==="defines")for(let s of n.edges)t.has(s.subject)||t.set(s.subject,[]),t.get(s.subject).push(s.objectLabel||s.object);return t}function xp(e){return new Set(String(e).replace(/([a-z0-9])([A-Z])/g,"$1_$2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean))}function Mp(e,t,n=null){let s=n||(i=>Un(e,i)),o=new Map,r=(i,a)=>{!i||!a||i===a||(o.has(i)||o.set(i,new Set),o.has(a)||o.set(a,new Set),o.get(i).add(a),o.get(a).add(i))};for(let i of t)for(let a of ke(e,i))r(s(a.subject),s(a.object));return o}function d$(e,t,n){if(t.length<2)return;let s=new Map(t.map(c=>[c.ind.id,c])),o=new Map(t.map(c=>[c.ind.id,c.score])),r=c=>{if(!c.size)return[[],[]];let u=0;for(let m of c.values())u=Math.max(u,m);let d=[...c.entries()].sort((m,h)=>h[1]-m[1]),f=[],p=[];for(let[m,h]of d)h>=u*t$&&f.length<n?f.push([m,h]):p.length<$p&&p.push([m,h]);return[f,p]},[i,a]=r(new Map(t.map(c=>[c.ind.id,c.score]))),l=new Set(i.map(([c])=>c));for(let c=0;c<o$&&i.length;c++){let u=new Map,d=[];for(let f of r$){let p=Mp(e,f),m=new Map;for(let[b,y]of i)for(let w of p.get(b)||[])o.has(w)&&m.set(w,Math.max(m.get(w)||0,y));let[h,g]=r(m);for(let[b,y]of h)u.set(b,Math.max(u.get(b)||0,y));d.push(...g)}a.push(...d);for(let[f,p]of u){if(l.has(f))continue;let m=s.get(f);m&&(m.score+=Math.min(p*n$,m.score*s$),l.add(f))}i=[...u.entries()],!i.length&&a.length&&(i=a.splice(0,$p).filter(([f])=>!l.has(f)))}}function p$(e,t=[],{depth:n=Lp,q:s=Pp,nodeLimit:o=Np,kinds:r=i$,classPredicate:i=u=>(u.class||"")==="Module",idNormalizer:a=null,seeds:l=null,hubDegree:c=1/0}={}){let u=new Map(t.map(S=>[S.ind.id,S])),d=0;for(let S of t)d=Math.max(d,S.score);let f=t.length>0&&d>0,p=new Set(l??u.keys());if(!p.size)return[];let m=Mp(e,r,a),h=S=>m.get(S)?.size||0,g=[],b=(S,R)=>S.hop!==R.hop?S.hop<R.hop:S.deg!==R.deg?S.deg<R.deg:S.id<R.id,y=(S,R)=>{let k=g[S];g[S]=g[R],g[R]=k},w=S=>{g.push(S);let R=g.length-1;for(;R>0;){let k=R-1>>1;if(b(g[R],g[k]))y(R,k),R=k;else break}},$=()=>{let S=g[0],R=g.pop();if(g.length){g[0]=R;let k=0;for(;;){let A=2*k+1,P=2*k+2,T=k;if(A<g.length&&b(g[A],g[T])&&(T=A),P<g.length&&b(g[P],g[T])&&(T=P),T===k)break;y(k,T),k=T}}return S},_=new Set(p);for(let S of p)w({id:S,hop:0,deg:h(S)});let v=null,x=0,E=[];for(;g.length&&x<o;){let S=$();if(E.push({id:S.id,hop:S.hop}),!p.has(S.id)){if(f){let A=d*a$*Math.pow(c$,S.hop-1),P=u.get(S.id);if(P)P.score+=Math.min(A*l$,P.score*u$);else{let T=e.byId?.get?.(S.id);if(T&&i(T)){v||(v=Op(e));let M=v.get(T.id)||[],B={ind:T,score:A,defineCount:M.length,matching:[],density:0};t.push(B),u.set(S.id,B)}}}x++}if(S.hop>=n||S.hop>0&&h(S.id)>c)continue;let R=[];for(let A of m.get(S.id)||[]){if(_.has(A))continue;let P=e.byId?.get?.(A);!P||!i(P)||R.push({id:A,deg:h(A)})}if(!R.length)continue;R.sort((A,P)=>A.deg-P.deg||(A.id<P.id?-1:A.id>P.id?1:0));let k=Math.max(1,Math.floor(s*R.length));for(let A=0;A<k;A++){let P=R[A];_.add(P.id),w({id:P.id,hop:S.hop+1,deg:P.deg})}}return E}function Fp(e,t,n={}){let{demoteNonProd:s=!1,callAdjacency:o=!1,implOfInterface:r=!1,beamSearch:i=!1,spiral:a=!1,proseBoost:l=!1,proseLayers:c=!1,literalMention:u=!1,rawQuery:d=""}=n,f=Number.isFinite(n.beamWidth)&&n.beamWidth>0?n.beamWidth:8,p=Op(e),m=[];for(let $ of e.individuals){if(($.class||"")!=="Module")continue;let _=String($.label),v=_.toLowerCase(),x=p.get($.id)||[],E=new Set(x.map(k=>k.toLowerCase())),S=new Set;for(let k of x)for(let A of xp(k))S.add(A);let R=u?String(($.attributes||[]).find(k=>k.key==="dotted")?.value||"").toLowerCase():"";m.push({ind:$,label:_,labelLc:v,defines:x,symSet:E,symComps:S,dotted:R})}let h=m.length||1,g=new Map,b=$=>{let _=0;for(let v of m)(v.labelLc.includes($)||v.symComps.has($)||v.symSet.has($))&&_++;return _},y=$=>(g.has($)||g.set($,uc(h,b($))),g.get($));for(let $ of t)y($);let w=[];for(let $ of m){let _=0,v=0,x=0,E=[];for(let P of t){let T=g.get(P)||0;T&&($.symSet.has(P)?(_+=T*Ip,x++):$.symComps.has(P)&&(E.push(T),x++),$.labelLc.includes(P)&&(v+=T*Cv))}E.sort((P,T)=>T-P);let S=0;for(let P=0;P<Math.min(E.length,Iv);P++)S+=E[P]*Ov;let R=_+v+S;if(!R)continue;s&&(Ws($.labelLc)||Mv($.labelLc))?R*=Pv:Ws($.labelLc)&&(R*=.4);let k=$.defines.filter(P=>{let T=P.toLowerCase(),M=xp(P);return t.some(B=>T===B||M.has(B))}),A=$.defines.length?x/$.defines.length:0;w.push({ind:$.ind,score:R,defineCount:$.defines.length,matching:k,density:A})}if(u&&d&&w.length){let $=String(d).toLowerCase(),_=S=>S!=null&&/[a-z0-9_./]/.test(S),v=S=>{for(let R=$.indexOf(S);R!==-1;R=$.indexOf(S,R+1))if(!_($[R-1])&&!_($[R+S.length]))return!0;return!1},x=new Map(m.map(S=>[S.ind.id,S])),E=0;for(let S of w)E=Math.max(E,S.score);for(let S of w){let R=x.get(S.ind.id);if(!R)continue;let k=0;for(let A of new Set([R.dotted,R.labelLc])){if(!A||A.split(/[./]+/).filter(Boolean).length<Jv||!v(A))continue;let P=[...new Set(A.split(/[^a-z0-9_]+/).filter(Boolean))].map(y).sort((M,B)=>B-M),T=0;for(let M=0;M<Math.min(P.length,Qv);M++)T+=P[M]*Xv;k=Math.max(k,T)}k&&(S.score+=Math.min(k*Zv,E*e$))}}if(w.length>1){let $=new Map(w.map(v=>[v.ind.id,v.score])),_=new Map;for(let v of ke(e,"imports"))!$.has(v.subject)&&!$.has(v.object)||(_.has(v.subject)||_.set(v.subject,new Set),_.has(v.object)||_.set(v.object,new Set),_.get(v.subject).add(v.object),_.get(v.object).add(v.subject));for(let v of w){let x=0;for(let E of _.get(v.ind.id)||[])x=Math.max(x,$.get(E)||0);v.score+=Math.min(x*Lv,v.score*Nv)}}if(o&&w.length>1){let $=new Map(w.map(v=>[v.ind.id,v.score])),_=new Map;for(let v of["calls","callsSymbol"])for(let x of ke(e,v)){let E=Un(e,x.subject),S=Un(e,x.object);!E||!S||E===S||!$.has(E)&&!$.has(S)||(_.has(E)||_.set(E,new Set),_.has(S)||_.set(S,new Set),_.get(E).add(S),_.get(S).add(E))}for(let v of w){let x=0;for(let E of _.get(v.ind.id)||[])x=Math.max(x,$.get(E)||0);v.score+=Math.min(x*Fv,v.score*Dv)}}if(r&&w.length>1){let $=new Map(w.map(v=>[v.ind.id,v.score])),_=new Map;for(let v of e.individuals)(v.class||"")==="Class"&&v.label&&_.set(String(v.label),v);for(let v of w){if(!Uv(v.ind.label))continue;let x=0;for(let E of ke(e,"inherits")){if(Un(e,E.subject)!==v.ind.id||!Wv(E.objectLabel))continue;let R=Un(e,E.object);if(!R){let k=_.get(String(E.objectLabel||""));k&&(R=kn(e,k))}R&&(x=Math.max(x,$.get(R)||0))}v.score+=Math.min(x*zv,v.score*Bv)}}if(l&&w.length&&e.proseIndex){let $=Bs(e.proseIndex,t.join(" "),{limit:Vv});if($.length){let _=new Map;for(let{id:v,score:x}of $){let E=Un(e,v);E&&_.set(E,(_.get(E)||0)+x)}for(let v of w){let x=_.get(v.ind.id)||0;x&&(v.score+=Math.min(x*Gv,v.score*Hv))}}}if(c&&w.length&&e.proseIndex){let $=new Map(w.map(x=>[x.ind.id,x])),_=new Map(m.map(x=>[x.ind.id,x])),v=new Map;for(let x of new Set(t)){let E=g.get(x)||0;if(!E)continue;let{ids:S}=np(e.proseIndex,x);if(!S.length)continue;let R=new Set;for(let k of S){let A=Un(e,k);if(!A||R.has(A)||(R.add(A),!$.has(A)))continue;let P=_.get(A);P&&(P.symSet.has(x)||P.symComps.has(x)||P.labelLc.includes(x))||v.set(A,(v.get(A)||0)+E*Yv)}}for(let x of w){let E=v.get(x.ind.id)||0;E&&(x.score+=Math.min(E*qv,x.score*Kv))}}return i&&w.length>1&&d$(e,w,f),a&&w.length&&p$(e,w,{depth:Number.isFinite(n.spiralDepth)&&n.spiralDepth>0?n.spiralDepth:Lp,q:Number.isFinite(n.mostDistinctiveBeams)&&n.mostDistinctiveBeams>0?n.mostDistinctiveBeams:Pp,nodeLimit:Number.isFinite(n.spiralNodeLimit)&&n.spiralNodeLimit>0?n.spiralNodeLimit:Np}),w.sort(($,_)=>_.score-$.score||_.density-$.density||$.defineCount-_.defineCount||String($.ind.label).length-String(_.ind.label).length),w}function Dp(e,t,n={}){let s=String(t||""),o=s.toLowerCase().split(/[^a-z0-9_]+/).filter(Boolean);if(!o.length)return[];let r=n.literalMention?{...n,rawQuery:s}:n;return Fp(e,o,r).map(i=>({path:String(i.ind.label),score:i.score}))}function m$(e){let t=0,n=!1,s=!1,o=!1,r="",i=!1,a=()=>{t+=1,r===")"&&(n=!0),i=!0};for(let l=0;l<e.length;l++){let c=e[l];if(c==="\\"){let u=e[l+1]||"";!o&&u>="1"&&u<="9"&&(s=!0),l+=1,r="",i=!1;continue}if(o){c==="]"&&(o=!1,r="]",i=!1);continue}if(c==="["){o=!0,r="[",i=!1;continue}if(c==="?"&&(r==="("||i)){r="?",i=!1;continue}if(c==="*"||c==="+"||c==="?"){a(),r=c;continue}if(c==="{"){let u=e.indexOf("}",l),d=u===-1?"":e.slice(l+1,u);if(u!==-1&&/^\d+(,\d*)?$/.test(d)){a(),l=u,r="}";continue}r="{",i=!1;continue}r=c,i=!1}return{quantifiers:t,quantifiedGroup:n,backreference:s}}function vc(e,{now:t=Date.now}={}){let n=String(e);if(n.length>Ep)return{error:`name pattern is ${n.length} characters; the limit is ${Ep}.`};let{quantifiers:s,quantifiedGroup:o,backreference:r}=m$(n);if(o)return{error:`name pattern "${n}" quantifies a group, which can backtrack for minutes on one label. Quantify a character or a class instead.`};if(r)return{error:`name pattern "${n}" uses a back-reference, which can backtrack for minutes on one label.`};if(s>Sp)return{error:`name pattern "${n}" has ${s} quantifiers; the limit is ${Sp}.`};let i;try{i=new RegExp(n,"i")}catch{return{error:`invalid name pattern: ${n}`}}let a=null;return{test(l){if(a===null)a=t()+kp;else if(t()>a)throw new vi(`name pattern "${n}" exceeded its ${kp}ms matching budget.`);return i.test(String(l).slice(0,f$))}}}function zp(e,t,{limit:n=xi,kind:s="",decorator:o="",name:r="",toolNamePrefix:i="tmct_"}={}){let a=String(t||"").toLowerCase().split(/[^a-z0-9_]+/).filter(Boolean),l=String(s||"").trim().toLowerCase(),c=String(o||"").trim().toLowerCase(),u=null;if(r){let m=vc(r);if(m.error)return m.error;u=m}if(l&&l!=="module")try{return y$(e,a,{limit:n,kind:l,decFilter:c,nameRe:u,toolNamePrefix:i})}catch(m){if(m instanceof vi)return m.message;throw m}if(!a.length&&!u&&!c)return"empty query";let d=Fp(e,a);if(!d.length)return`no module matches "${t}". Try broader keywords, or ${i}describe <path> if you know where it lives.`;let f=d.slice(0,n),p=[`${d.length} module(s) match "${t}" (top ${f.length}):`];for(let{ind:m,defineCount:h,matching:g}of f){let b=g.length?` \u2014 matching: ${ut([...new Set(g)],Av)}`:"";p.push(`- ${m.label} (defines ${h} symbol(s))${b}`)}return p.push(`Then ${i}describe <path> for the full sibling list + typed edges, or ${i}impact <path> for dependents.`),p.join(`
4
- `)}function ke(e,t){let n=jp.get(e);n||(n=new Map,jp.set(e,n));let s=n.get(t);if(s)return s;let o=[];for(let r of e.relations)if(Hn(r)===t)for(let i of r.edges)o.push(i);return n.set(t,o),o}function Un(e,t){let n=e.byId?.get?.(t);if(n)return kn(e,n);let s=String(t||"").match(/^fn:(.+)#/);return s?`mod:${s[1]}`:null}function kn(e,t){if((t?.class||"")==="Module")return t.id;let n=_t(t);if(n)return`mod:${n.path}`;let s=String(t?.id||"").match(/^fn:(.+)#/);return s?`mod:${s[1]}`:null}function $c(e){if(!e)return"";let t=e.end>e.start?`${e.start}-${e.end}`:`${e.start}`;return` [${e.path}:${t}]`}function So(e){return(e?.attributes||[]).find(t=>t.key==="decorators")?.value||""}function Bp(e,t,{toolNamePrefix:n="tmct_"}={}){let s=[`${t.label} \u2014 ${Gn(t.class)} (id: ${t.id})`],o=ke(e,"contains").filter(a=>a.subject===t.id);if(!o.length)return s.push(`members: none recorded (empty class, or members not in the extracted graph). Use ${n}describe for its edges.`),s.join(`
5
- `);let r=[],i=[];for(let a of o){let l=e.byId.get(a.object),c=$c(l?_t(l):null),u=l?So(l):"",d=`${a.objectLabel||a.object}${c}${u?` @${u}`:""}`;((l?.class||"")==="Attribute"?i:r).push(d)}return r.length&&s.push(`methods (${r.length}): ${ut(r,_p)}`),i.length&&s.push(`attributes (${i.length}): ${ut(i,_p)}`),s.push(`Use ${n}snippet <Class.member> for an exact body.`),s.join(`
6
- `)}function Up(e,t,{toolNamePrefix:n="tmct_"}={}){let s=_t(t),o=[`${t.label} \u2014 ${Gn(t.class)}${$c(s)}`],r=Pe(t,"params"),i=Pe(t,"returns");(r||i||(t.class||"")==="Method"||(t.class||"")==="Function")&&o.push(`signature: ${t.label}(${r})${i?` -> ${i}`:""}`);let a=[];Pe(t,"isStatic")&&a.push("static"),Pe(t,"isAbstract")&&a.push("abstract"),Pe(t,"isConstant")&&a.push("constant");let l=Pe(t,"visibility");l&&a.push(l),a.length&&o.push(`flags: ${a.join(", ")}`);let c=So(t);c&&o.push(`decorators: @${c.split(", ").join(", @")}`);let u=Pe(t,"raises");u&&o.push(`raises: ${u}`);let d=Pe(t,"catches");d&&o.push(`catches: ${d}`);let f=Pe(t,"self_fields");f&&o.push(`self fields: ${f}`);let p=Pe(t,"value");p&&o.push(`value: ${p}`);let m=Pe(t,"doc");return m&&o.push(`doc: ${m}`),o.length===1&&o.push(`(no signature detail recorded for this symbol \u2014 likely a module or attribute; use ${n}snippet for its source.)`),o.push(`Use ${n}snippet for the exact body.`),o.join(`
7
- `)}function Wp(e,t){let n=ke(e,"inherits"),s=n.filter(l=>l.subject===t.id).map(l=>l.objectLabel||l.object),o=new Map;for(let l of n)o.has(l.object)||o.set(l.object,[]),o.get(l.object).push({id:l.subject,label:l.subjectLabel||l.subject});let r=[`${t.label} \u2014 ${Gn(t.class)} (id: ${t.id})`];r.push(s.length?`extends: ${ut(s,Rp)}`:"extends: (no internal/recorded base classes)");let i=[];for(let l of wi(t.id,c=>o.get(c)||[],{maxDepth:8,keyOf:c=>c.id}))l.length&&i.push(l.map(c=>c.label).sort((c,u)=>String(c).localeCompare(String(u))));let a=i.reduce((l,c)=>l+c.length,0);return a?(r.push(`subclasses: ${a} total across ${i.length} level(s).`),i.forEach((l,c)=>r.push(` depth ${c+1} (${l.length}): ${ut(l,Rp)}`))):r.push("subclasses: none recorded \u2014 nothing extends it in the extracted graph."),r.join(`
8
- `)}function Ei(e){let t=new Map;for(let n of e){let s=n.label.includes("/")?n.label.slice(0,n.label.lastIndexOf("/")):"(root)";t.set(s,(t.get(s)||0)+1)}return t}function Si(e,t=""){let n=Wn(t);return e.individuals.filter(s=>(s.class||"")==="Module"&&(!n||Wn(s.label).startsWith(n)))}function Gp(e,{pkg:t=""}={}){let n=Wn(t),s=Si(e,t);if(!s.length)return n?`no modules under "${t}".`:"no modules in the graph.";let o=Ei(s),r=new Map;for(let u of ke(e,"imports"))r.set(u.object,(r.get(u.object)||0)+1);let i=new Set(s.map(u=>u.id)),a=[...r.entries()].filter(([u])=>i.has(u)).sort((u,d)=>d[1]-u[1]).slice(0,g$).map(([u,d])=>`${e.byId.get(u)?.label||u} (${d} importers)`),l=[...o.entries()].sort((u,d)=>d[1]-u[1]),c=[`Architecture${n?` of ${t}`:""}: ${s.length} module(s) in ${l.length} package(s).`];return c.push(`packages (by module count): ${ut(l.map(([u,d])=>`${u} (${d})`),h$)}`),c.push(a.length?`hub modules (most imported): ${a.join(", ")}`:"hub modules: none (no internal imports recorded)."),c.join(`
9
- `)}function Vp(e,t){let n=kn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||_t(t)?.path||n,o=[...new Set(ke(e,"tests").filter(a=>a.object===n).map(a=>a.subjectLabel||a.subject))],r=o.length>0,i=r?`covered by ${o.length} test module(s):
10
- ${ut(o,Hp,`
1
+ (()=>{var i$=Object.defineProperty;var O=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(s){throw n=[s],s}};var Fn=(e,t)=>{for(var n in t)i$(e,n,{get:t[n],enumerable:!0})};var ct,pC,fC,mC,hC,gC,bC,wC,yC,$C,vC,xC,EC,SC,kC,jC,_C,Q,ve,Jt,Bd,RC,TC,AC,Ue=O(()=>{ct=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},pC=ct("createRequire"),fC=ct("readFileSync"),mC=ct("access"),hC=ct("readFile"),gC=ct("writeFile"),bC=ct("appendFile"),wC=ct("mkdir"),yC=ct("mkdtemp"),$C=ct("rename"),vC=ct("unlink"),xC=ct("rm"),EC=ct("stat"),SC=ct("copyFile"),kC=ct("readdir"),jC=ct("createReadStream"),_C=ct("createWriteStream"),Q=(...e)=>e.join("/"),ve=e=>String(e).replace(/\/[^/]*$/,""),Jt=(...e)=>e.join("/"),Bd="/",RC=ct("randomBytes"),TC=ct("spawnSync"),AC=ct("createInterface")});var lt,CC,OC,Wd,ze,mr,a$,xn,c$,mi,oc,l$,u$,LC,d$,NC,MC,PC,FC,DC,_t=O(()=>{lt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},CC=lt("createRequire"),OC=lt("readFileSync"),Wd=lt("access"),ze=lt("readFile"),mr=lt("writeFile"),a$=lt("appendFile"),xn=lt("mkdir"),c$=lt("mkdtemp"),mi=lt("rename"),oc=lt("unlink"),l$=lt("rm"),u$=lt("stat"),LC=lt("copyFile"),d$=lt("readdir"),NC=lt("createReadStream"),MC=lt("createWriteStream"),PC=lt("randomBytes"),FC=lt("spawnSync"),DC=lt("createInterface")});function yo(e){let t=f$.exec(String(e||""));return t?t[1].toLowerCase():null}function hi(e){return String(e||"").replace(m$,"$1")}function zs(e){return e.replace(h$,"").trim()}function on(e){let t=e;for(let n=0;n<2;n+=1){let s=t.replace(b$,"").trim();if(s=s.replace(y$,"").trim(),s===t)break;t=s}return t}var Gd,hr,Ds,qd,Vd,p$,f$,gr,Qt,rc,m$,hn,ic,h$,g$,b$,w$,y$,de,br,$$,Hd,We,Zt,cs,Kd,ac,cc,lc,Yd,wr,Us,Xd,Jd,Bs,Dn,zn,$o,Xe,Qd,Ws,Gs,ls,En,Zd,yr,vo,gi,xo,ep,Un=O(()=>{Gd=["is a superclass of","are a superclass of","is a parent class of","are a parent class of","superclass","superclasses"],hr={imports:{bare:"import",comment:"Module -> Module: subject's import graph references object (usesComplexType).",verbs:["couples to","couple to","depends on","imports","import","relies on","rely on","requires","require","references","reference","pulls in","pull in","built on","builds on","build on","uses code from","grabs","grab","pulls from","pull from","leans on","lean on","is wired to","are wired to","is hooked up to","are hooked up to","importing"]},uses:{bare:"use",comment:"query-side union: imports (Module->Module) + calls (Module->Module) + callsSymbol (fn->fn).",verbs:["uses","use","makes use of","make use of","talks to","talk to","using"]},calls:{bare:"call",comment:"Function/Method -> Function/Class (symbol-grain) or Module -> Module (coarse): subject invokes object.",verbs:["invokes","invoke","calls","call","runs","run","executes","execute","hits","hit","triggers","trigger","fires","fire","kicks off","kick off","calling"]},defines:{bare:"define",comment:"Module -> top-level Function/Class/Method/Attribute: subject declares object.",verbs:["defines","define","declares","declare","has","have","holds","hold","defining"]},contains:{bare:"contain",comment:"Class -> Method/Attribute: subject's membership includes object.",verbs:["contains","contain","lives in","live in","is defined in","are defined in","is part of","are part of","sits in","sit in","sits inside","sit inside","containing"]},tests:{bare:"test",comment:"Module -> Module: subject is a test module importing/covering object.",verbs:["tests","test","covers","cover","verifies","verify","exercises","exercise","checks","check","makes sure of","make sure of","testing"]},inherits:{bare:"inherit from",comment:"Class -> Class: subject's declared base resolves to object (subclassOf).",verbs:["inherits from","inherit from","inherits","inherit","extends","extend","subclasses","subclass","derives from","derive from","is a subclass of","are a subclass of","is a kind of","are a kind of","is built off","are built off","is built on top of","are built on top of","extending","inheriting from","inheriting","subclassing","extends from",...Gd]},touches:{bare:"touch",comment:"Commit -> Module (coarse) or Commit -> symbol (fine, touchesSymbol): a commit's changed-line-range intersects object.",verbs:["touched","touches","changed","change","modified","modifies","was changed in","were changed in","was edited in","were edited in","was modified by","were modified by","was tweaked in","were tweaked in","got changed in","got edited in","touch","changed in","landed in","land in","was in","were in","went into","included in","updated","edited","touching"]},cochange:{bare:"co-change with",comment:"Module -> Module: subject and object are frequently committed together (changeCoupledWith).",verbs:["changed with","co-changes with","co-change with","changes alongside","change alongside","shares commits with","share commits with","tends to change together with","tend to change together with","moves together with","move together with","changed together with","change together with","changes together with","changes with","change with","tends to change with","tend to change with","usually changes with"]},reexports:{bare:"re-export",comment:"Module -> exported symbol: subject's public API surface (__all__/export list).",verbs:["exports","export","re-exports","re-export","passes through","pass through","exposes","expose","exporting"]},serves:{bare:"serve",comment:"subject provides or backs the object \u2014 a handler serving a route, a module serving a surface (mgx:serves).",verbs:["serves","serve","serving"]},denotes:{bare:"denote",comment:"subject names the object \u2014 a glossary/lexicon term denoting a code entity (mgx:denotes).",verbs:["denotes","denote","denoting"]}},Ds=Object.freeze({placement:Object.freeze({predicate:"mgx:currently-in",comment:"individual -> place: where the subject is right now.",nouns:Object.freeze(["location","locations","position","positions","place","places","whereabouts","room","rooms"]),reads:"is in",matchesLocativePredicates:!0}),mood:Object.freeze({predicate:"mgx:feels",comment:"individual -> mood word: how the subject feels right now.",nouns:Object.freeze(["mood","moods","feeling","feelings","emotion","emotions"]),reads:"feels"}),mass:Object.freeze({predicate:"mgx:mass",comment:"individual -> number: the subject's current mass.",nouns:Object.freeze(["mass","masses","weight","weights"]),reads:"has mass"})}),qd=Object.freeze(Object.fromEntries(Object.entries(Ds).flatMap(([e,{nouns:t}])=>t.map(n=>[n,e])))),Vd=Object.freeze(Object.values(Ds).map(e=>e.predicate)),p$=Object.freeze(["on","in","at","inside","under","below","above","near","beside","behind","by"]),f$=new RegExp(`^mgx:[a-z]+-(${p$.join("|")})$`,"i");gr=Object.freeze([...Gd,"is the superclass of","are the superclass of","is the parent class of"]),Qt=Object.freeze(["defined","declared","located","implemented"]),rc=Object.freeze(["now","currently","right now","at the moment","these days","today"]),m$=new RegExp(`\\s+(?:${[...rc].sort((e,t)=>t.length-e.length).join("|")})(\\s*[?.!]*)$`,"i");hn=Object.freeze(["mentioned","referenced"]),ic=Object.freeze(["in this graph","in the graph","in this codebase","in the codebase","in this repo","in the repo","here"]),h$=new RegExp(`\\s+(?:${ic.join("|")})\\s*[?.!]*$`,"i");g$=Object.freeze(["then","though","too"]),b$=new RegExp(`\\s+(?:${g$.join("|")})\\s*[?.!]*$`,"i"),w$=Object.freeze(["please explain","explain"]),y$=new RegExp(`,\\s*(?:${w$.join("|")})\\s*[?.!]*$`,"i");de=Object.freeze(Object.fromEntries(Object.entries(hr).flatMap(([e,{verbs:t}])=>t.map(n=>[n,e])))),br=Object.freeze(new Set(["has","have","holds","hold"])),$$=e=>!gr.includes(e),Hd=Object.freeze([...new Set(Object.keys(de).filter($$).map(e=>e.match(/^(?:is|are)\s+an?\s+(.+)$/i)).filter(Boolean).map(e=>e[1].toLowerCase()))]),We=Object.freeze({function:"Function",functions:"Function",method:"Method",methods:"Method",class:"Class",classes:"Class",module:"Module",modules:"Module",mod:"Module",mods:"Module",file:"Module",files:"Module",package:"Package",packages:"Package",attribute:"Attribute",attributes:"Attribute",field:"Attribute",fields:"Attribute",variable:"GlobalVariable",variables:"GlobalVariable",global:"GlobalVariable",globals:"GlobalVariable",change:"Change",changes:"Change",commit:"Commit",commits:"Commit"}),Zt=Object.freeze({explicitly:"direct",directly:"direct",transitively:"transitive",indirectly:"transitive"}),cs=Object.freeze({imported:"imports",called:"calls",used:"uses",tested:"tests",covered:"tests",verified:"tests",exercised:"tests",checked:"tests",defined:"defines",declared:"defines",inherited:"inherits",extended:"inherits",subclassed:"inherits",contained:"contains",exported:"reexports","re-exported":"reexports",exposed:"reexports",touched:"touches",changed:"touches",modified:"touches",edited:"touches",updated:"touches"}),Kd=Object.freeze({"inherited from":{kind:"inherits",role:"object"},"extended from":{kind:"inherits",role:"object"},"subclassed from":{kind:"inherits",role:"object"},"defined in":{kind:"defines",role:"agent"},"declared in":{kind:"defines",role:"agent"},"contained in":{kind:"contains",role:"agent"},"imported by":{kind:"imports",role:"agent"},"called by":{kind:"calls",role:"agent"},"used by":{kind:"uses",role:"agent"},"tested by":{kind:"tests",role:"agent"},"covered by":{kind:"tests",role:"agent"},"touched by":{kind:"touches",role:"agent"},"changed by":{kind:"touches",role:"agent"},"exported by":{kind:"reexports",role:"agent"}}),ac=Object.freeze({"ain't":"is not",aint:"is not","isn't":"is not",isnt:"is not","aren't":"are not",arent:"are not","doesn't":"does not",doesnt:"does not","don't":"do not",dont:"do not","didn't":"did not",didnt:"did not","there's":"there is",theres:"there is","what's":"what is",whats:"what is","who's":"who is",whos:"who is",gonna:"going to",wanna:"want to",gotta:"got to",yer:"your",ur:"your",gimme:"give me"}),cc=Object.freeze({funtion:"function",funtions:"functions",fucntion:"function",fucntions:"functions",functoin:"function",functoins:"functions",calss:"class",calsses:"classes",classs:"class",clases:"classes",modul:"module",moduls:"modules",moduel:"module",moduels:"modules",moudle:"module",moudles:"modules",methdo:"method",methdos:"methods",mehtod:"method",mehtods:"methods",comit:"commit",comits:"commits",commmit:"commit",commmits:"commits",varaible:"variable",varaibles:"variables",varibale:"variable",varibales:"variables",atribute:"attribute",atributes:"attributes",improt:"import",improts:"imports",imoprt:"import",imoprts:"imports",inherts:"inherits",inheirts:"inherits",extands:"extends",extneds:"extends",depnds:"depends",touchs:"touches",tuoches:"touches",touhced:"touched",touchd:"touched",defned:"defined",chagned:"changed",chnaged:"changed",chagnes:"changes",chnages:"changes",calles:"calls",exprot:"export",exprots:"exports",tets:"tests",whcih:"which",wich:"which",whihc:"which",wehre:"where",whre:"where",waht:"what",wat:"what",dat:"that",dose:"does",doess:"does",teh:"the",manyn:"many",mnay:"many",amny:"many",mnany:"many",hwo:"how",coutn:"count",conut:"count",cuont:"count",ocunt:"count",numer:"number",nubmer:"number",numbr:"number",nmuber:"number",lst:"list",lsit:"list",ilst:"list",shwo:"show",hsow:"show",dispaly:"display",dsiplay:"display",funtcions:"functions",funciton:"function",funcitons:"functions"}),lc=Object.freeze({folder:"module",folders:"modules",directory:"module",directories:"modules",func:"function",funcs:"functions",changeset:"commit",changesets:"commits",revision:"commit",revisions:"commits",property:"attribute",properties:"attributes"}),Yd=/\b([a-z]{3,})in'/gi,wr=Object.freeze(["um","uh","erm","so","like","yo","hey","bru","bro","fam","mate","please","could you","can you","would you","tell me","i wonder","just wondering","quickly","real quick","kinda","sorta","btw","by the way","you","quick q"]),Us=Object.freeze(["this","it","that","here","this one","that one"]),Xd=Object.freeze([{re:/\bthere\s+is\s+not\s+(?:anything|nothing)\s+(?:that\s+)?(\S.*)$/i,to:e=>`what ${e[1]}`},{re:/\bthere\s+is\s+no\s+\S+\s+(?:that\s+)?(\S.*)$/i,to:e=>`what ${e[1]}`},{re:/\bis\s+not\s+there\s+(?:anything|nothing)\s+(?:that\s+)?(\S.*)$/i,to:e=>`what ${e[1]}`},{re:/\b(?:nobody|nothing|no one)\s+(\S.*?)(?:,?\s+does\s+it\??|,?\s+do\s+they\??)?$/i,to:e=>`what ${e[1]}`}]),Jd=Object.freeze([{re:/^what\s+(?:is|was|were|are)\s+in\s+((?:commit\s+)?[0-9a-f]{7,40})\??$/i,to:e=>`what did ${e[1]} touch`},{re:/^what\s+(?:went|got)\s+into\s+((?:commit\s+)?[0-9a-f]{7,40})\??$/i,to:e=>`what did ${e[1]} touch`},{re:/^what\s+made\s+it\s+into\s+((?:commit\s+)?[0-9a-f]{7,40})\??$/i,to:e=>`what did ${e[1]} touch`}]),Bs=Object.freeze(["mean","means","stand for","stands for","signify","signifies","represent","represents","refer to","refers to"]),Dn=Object.freeze(["that","which","who"]),zn=Object.freeze(["something","anything","everything","somethings","things","thing","entities","entity","nodes","node","stuff","code","symbol","symbols"]),$o=Object.freeze({"but do not":"difference","but does not":"difference","and do not":"difference","and does not":"difference","but not":"difference","and not":"difference",except:"difference",without:"difference",and:"intersection",plus:"intersection",but:"intersection",or:"union"}),Xe=Object.freeze({public:{via:"visibility",value:"public"},private:{via:"visibility",value:"private"},protected:{via:"visibility",value:"protected"},static:{via:"attr",attr:"isStatic"},abstract:{via:"attr",attr:"isAbstract"},constant:{via:"attr",attr:"isConstant"},exported:{via:"exported"},"re-exported":{via:"exported"},tested:{via:"tested",value:!0},covered:{via:"tested",value:!0},untested:{via:"tested",value:!1},uncovered:{via:"tested",value:!1}}),Qd=Object.freeze(new Set(["tests","test","anything","something","anyone","someone","any"])),Ws=Object.freeze(["how many","how much","how many of","number of","total number of","quantity of","tally of","sum of","total of","amount of","count","count up","count of","tot up"]),Gs=Object.freeze(["list","show","show me","show us","display","print","print out","dump","enumerate","name","give me","get me","spit out","rattle off","run down","run through","ls","what are","which are"]),ls=Object.freeze({most:"most",greatest:"most",highest:"most",biggest:"most",largest:"most","most-connected":"most","most connected":"most",fewest:"fewest",least:"fewest",smallest:"fewest",lowest:"fewest"}),En=Object.freeze({imports:{kind:"imports",dir:"out"},dependencies:{kind:"imports",dir:"out"},importers:{kind:"imports",dir:"in"},dependents:{kind:"imports",dir:"in"},callers:{kind:"calls",dir:"in",sibling:"callsSymbol"},callees:{kind:"calls",dir:"out",sibling:"callsSymbol"},calls:{kind:"calls",dir:"out",sibling:"callsSymbol"},methods:{kind:"contains",dir:"out",filter:"Method"},members:{kind:"contains",dir:"out"},tests:{kind:"tests",dir:"in"},test:{kind:"tests",dir:"in"},subclasses:{kind:"inherits",dir:"in"},connections:{kind:"*",dir:"both"},edges:{kind:"*",dir:"both"},connected:{kind:"*",dir:"both"},imported:{kind:"imports",dir:"in"},"depended-on":{kind:"imports",dir:"in"},depended:{kind:"imports",dir:"in"},used:{kind:"imports",dir:"in",sibling:"callsSymbol"},called:{kind:"calls",dir:"in",sibling:"callsSymbol"}}),Zd=Object.freeze({tests:"Module",test:"Module"}),yr=Object.freeze(["those","them","these"]),vo=Object.freeze(["contains","defines"]),gi=Object.freeze(["the","a","an","some","other","about","please","pls","plz","kindly","just","simply","maybe","perhaps","thanks","thank","ta","cheers","too","also","well","either","sorry","oops","actually","mean","meant","rather","hi","hello","hey","yo","hiya","howdy","ok","okay","matey","mate","buddy","pal","dude","man","bro","bru","fam","friend","sir","maam","folks","guys","everyone","dear","tmct","show","tell","give","list","find","me","us","lemme"]),xo=Object.freeze({tally:"count",tallies:"count",sum:"count",total:"count",totals:"count"}),ep=Object.freeze(["help","help me","how do i ask","how do i use this","what can i ask","what can you ask","usage","commands","examples","syntax","options"])});var Ge,Eo,uc=O(()=>{Ge="#000000",Eo=Object.freeze({happy:`<circle cx="-0.4" cy="-0.15" r="0.11" fill="${Ge}" opacity="0.85"/><circle cx="0.4" cy="-0.15" r="0.11" fill="${Ge}" opacity="0.85"/><path d="M -0.4 0.35 Q 0 0.68 0.4 0.35" fill="none" stroke="${Ge}" stroke-width="0.09" stroke-linecap="round" opacity="0.85"/>`,sad:`<circle cx="-0.4" cy="-0.1" r="0.1" fill="${Ge}" opacity="0.85"/><circle cx="0.4" cy="-0.1" r="0.1" fill="${Ge}" opacity="0.85"/><path d="M -0.38 0.55 Q 0 0.3 0.38 0.55" fill="none" stroke="${Ge}" stroke-width="0.09" stroke-linecap="round" opacity="0.85"/>`,angry:`<path d="M -0.58 -0.32 L -0.22 -0.16" stroke="${Ge}" stroke-width="0.09" stroke-linecap="round" opacity="0.85"/><path d="M 0.58 -0.32 L 0.22 -0.16" stroke="${Ge}" stroke-width="0.09" stroke-linecap="round" opacity="0.85"/><circle cx="-0.32" cy="-0.02" r="0.09" fill="${Ge}" opacity="0.85"/><circle cx="0.32" cy="-0.02" r="0.09" fill="${Ge}" opacity="0.85"/><path d="M -0.36 0.5 L 0.36 0.42" stroke="${Ge}" stroke-width="0.1" stroke-linecap="round" opacity="0.85"/>`,scared:`<circle cx="-0.4" cy="-0.12" r="0.2" fill="none" stroke="${Ge}" stroke-width="0.07" opacity="0.85"/><circle cx="-0.4" cy="-0.12" r="0.07" fill="${Ge}" opacity="0.85"/><circle cx="0.4" cy="-0.12" r="0.2" fill="none" stroke="${Ge}" stroke-width="0.07" opacity="0.85"/><circle cx="0.4" cy="-0.12" r="0.07" fill="${Ge}" opacity="0.85"/><circle cx="0" cy="0.42" r="0.09" fill="none" stroke="${Ge}" stroke-width="0.07" opacity="0.85"/>`,surprised:`<circle cx="-0.38" cy="-0.12" r="0.17" fill="none" stroke="${Ge}" stroke-width="0.07" opacity="0.85"/><circle cx="-0.38" cy="-0.12" r="0.06" fill="${Ge}" opacity="0.85"/><circle cx="0.38" cy="-0.12" r="0.17" fill="none" stroke="${Ge}" stroke-width="0.07" opacity="0.85"/><circle cx="0.38" cy="-0.12" r="0.06" fill="${Ge}" opacity="0.85"/><ellipse cx="0" cy="0.42" rx="0.16" ry="0.22" fill="${Ge}" opacity="0.7"/>`,calm:`<path d="M -0.5 -0.1 Q -0.4 -0.2 -0.3 -0.1" fill="none" stroke="${Ge}" stroke-width="0.08" stroke-linecap="round" opacity="0.85"/><path d="M 0.3 -0.1 Q 0.4 -0.2 0.5 -0.1" fill="none" stroke="${Ge}" stroke-width="0.08" stroke-linecap="round" opacity="0.85"/><path d="M -0.3 0.4 Q 0 0.5 0.3 0.4" fill="none" stroke="${Ge}" stroke-width="0.08" stroke-linecap="round" opacity="0.85"/>`})});var v$,rn,tp,np,dc,sp,qC,VC,op=O(()=>{Un();uc();v$=()=>Object.keys(Eo).sort(),rn=e=>({type:"object",required:["symbol"],properties:{symbol:{type:"string",description:e}}}),tp=e=>({type:"object",required:["module"],properties:{module:{type:"string",description:e}}}),np=e=>({type:"object",required:["class"],properties:{class:{type:"string",description:e}}}),dc=Object.freeze([{name:"tmct_context",tier:"hot",summary:"A sized edit bundle for one symbol \u2014 exemplar source, sibling signatures, registration anchor and the insertion region, in one call.",agentDescription:"START HERE to add/modify code: ONE call returns a sized edit bundle (exemplar source, sibling signatures, registration, insertion region) \u2014 then write directly, don't Read.",inputSchema:{type:"object",required:["symbol"],properties:{symbol:{type:"string",description:"Module path (e.g. path/to/module) or a sibling function/class name defined in it."},depth:{type:"string",enum:["min","auto","full"],default:"auto",description:"auto (sized to the task) | min (leanest) | full (every section)."}}},example:{symbol:"django/utils/text.py"}},{name:"tmct_snippet",tier:"hot",summary:"The exact source of one function, class or Class.method \u2014 its line span only, plus a one-line in-repo call hint.",agentDescription:"EXACT source of one function/class/Class.method by name (its line span only) + a one-line in-repo call hint. Prefer over Read for a single symbol.",inputSchema:{type:"object",required:["symbol"],properties:{symbol:{type:"string",description:"function/class name, Class.method, or fn:<path>#name."}}},example:{symbol:"Truncator.chars"}},{name:"tmct_ask",tier:"hot",summary:"A structural question in plain English, answered from the graph in one call \u2014 no model, and a clean miss instead of a guess.",agentDescription:'Ask a structural question in plain English: "which functions call X", "what uses X", "where is X defined", "when did X change". One call, no model. A clean miss beats a guess.',inputSchema:{type:"object",required:["query"],properties:{query:{type:"string",description:'A free-text question, e.g. "which functions explicitly couple to logging".'}}},example:{query:"which modules import src/core/model.mjs"},chat:{exampleRepo:"examples/mini-webapp",grammar:[{form:"which <things> <relation-verb> <entity>",example:"which modules import src/core/model.mjs",answers:"the imports edge, read forwards"},{form:"what is <relation-verb-passive> <entity>",example:"what is imported by src/core/store.mjs",answers:"the same edge, read backwards \u2014 a passive is the opposite direction, not a synonym"},{form:"what <relation-verb> <entity>",example:"what uses src/lib/http.mjs",answers:"the uses union: imports plus calls"},{form:"where is <entity> <where-marker>",example:"where is saveStore defined",answers:"the definition's file and line span"},{form:"when did <entity> change",example:"when did src/core/store.mjs change",answers:"the commits that touched it, newest first"}],whereMarkers:Qt}},{name:"tmct_describe",tier:"cold",summary:"Locate one symbol and list its typed edges (both directions) with provenance.",inputSchema:rn("A module path, symbol name, or Class.method."),example:{symbol:"django/utils/text.py"}},{name:"tmct_signature",tier:"cold",summary:"One symbol's API surface (params, returns, raises/catches, flags, decorators, doc) without the body.",inputSchema:rn("A function, method, or Class.method name."),example:{symbol:"Truncator.chars"}},{name:"tmct_impact",tier:"cold",summary:"Transitive reverse closure over imports/calls \u2014 what breaks if a module or symbol changes, by depth, with tests.",inputSchema:tp("The module (or a symbol it defines) whose dependents you want."),example:{module:"django/utils/text.py"}},{name:"tmct_search",tier:"cold",summary:"Free-text/ranked lookup over the code-map to find the right module or symbol.",inputSchema:{type:"object",required:[],properties:{query:{type:"string",description:"Free text to rank against the code-map. Required unless kind narrows the search on its own."},kind:{type:"string",description:"Restrict to an entity class, e.g. function, class, module."},decorator:{type:"string",description:"Restrict to definitions carrying this decorator."},name:{type:"string",description:"Restrict to definitions whose name matches."}}},example:{query:"template filters",kind:"function"}},{name:"tmct_members",tier:"cold",summary:"A class's methods + attributes (file:line, decorators) in one slice.",inputSchema:np("The class whose members you want."),example:{class:"Truncator"}},{name:"tmct_subclasses",tier:"cold",summary:"A class's base classes plus the transitive set of classes that extend it.",inputSchema:np("The class to walk the inheritance edges of."),example:{class:"Field"}},{name:"tmct_related",tier:"cold",summary:"A term's synonyms (skos:altLabel) and related concepts (skos:related), from the memory graph's relation facts.",inputSchema:{type:"object",required:["term"],properties:{term:{type:"string",description:"The term whose synonyms / related concepts you want."}}},example:{term:"sofa"}},{name:"tmct_sprite",tier:"cold",summary:"The sprite markup for a class, resolved up the taught rdfs:subClassOf chain \u2014 with the expression and size asked for, and the ancestor chain the resolver walked to find it.",inputSchema:{type:"object",required:["class"],properties:{class:{type:"string",description:"The class to draw, e.g. spider. Resolved through the memory graph's own rdfs:subClassOf taxonomy."},expression:{type:"string",enum:v$(),description:"The face the sprite wears, as an mgx:feels value. A class whose template takes no expression parameter misses rather than dropping it."},size:{type:"string",description:"A taught size property word (mgx:hasProperty), resolved to a numeric render SCALE \u2014 the size of the thing drawn, not a choice of template tier."}}},example:{class:"spider",expression:"happy",size:"large"}},{name:"tmct_architecture",tier:"cold",summary:"Package/module map + the most-imported hub modules (optionally scoped to a package).",inputSchema:{type:"object",required:[],properties:{package:{type:"string",description:"Scope the map to one package. Omit for the whole repository."}}},example:{package:"django/template"}},{name:"tmct_exports",tier:"cold",summary:"A module's public __all__ surface, each name resolved to the module that defines it.",inputSchema:tp("The module whose public API surface you want."),example:{module:"django/db/models/__init__.py"}},{name:"tmct_tests_for",tier:"cold",summary:"The test modules covering a symbol or module, from the typed test edges.",inputSchema:rn("The symbol or module to find covering tests for."),example:{symbol:"django/utils/text.py"}},{name:"tmct_untested",tier:"cold",summary:"Source modules with no covering test module \u2014 a coverage-gap view (no arguments).",inputSchema:{type:"object",required:[],properties:{}},example:{}},{name:"tmct_history",tier:"cold",summary:"Recent commits that touched a symbol's module (newest first).",inputSchema:rn("The symbol whose module's history you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_file_history",tier:"cold",summary:"Commits that touched a symbol's module, each with author / date / subject.",inputSchema:rn("The symbol whose module's history you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_method_history",tier:"cold",summary:"Commits that touched a specific method symbol (fine-grained), with author / date / subject.",inputSchema:rn("A Class.method name."),example:{symbol:"Truncator.chars"}},{name:"tmct_class_history",tier:"cold",summary:"Commits that touched a specific class symbol (fine-grained), with author / date / subject.",inputSchema:rn("A class name."),example:{symbol:"Truncator"}},{name:"tmct_callers",tier:"cold",summary:"Modules that call into a symbol's module (one hop).",inputSchema:rn("The symbol whose callers you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_callees",tier:"cold",summary:"Modules a symbol's module calls into (one hop).",inputSchema:rn("The symbol whose callees you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_calls",tier:"cold",summary:"The in-repo symbols a function calls (fn\u2192fn), each with file:line.",inputSchema:rn("The function whose in-repo call sites you want."),example:{symbol:"slugify"}},{name:"tmct_cochanges",tier:"cold",summary:"Modules that historically change in the same commit as a symbol's module (git co-change).",inputSchema:rn("The symbol whose module's change-coupling you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_context_more",tier:"cold",summary:"The bundle sections a lean tmct_context omitted (siblings / tests / cochange / class members / re-exports).",inputSchema:rn("The symbol a lean tmct_context bundle was built for."),example:{symbol:"django/utils/text.py"}},{name:"tmct_export",tier:"cold",summary:"Every stored memory fact as JSONL (subject/predicate/object/provenance) \u2014 the shape `tmct extract` emits, for backup or audit.",inputSchema:{type:"object",required:[],properties:{}},example:{}},{name:"tmct_ingest",tier:"cold",summary:"Ground plain text into memory facts with the same deterministic recognizer the chat teach lane uses \u2014 the strict tier, plus an optional lower-trust fuzzy tier \u2014 and report the canonical triples.",inputSchema:{type:"object",required:["text"],properties:{text:{type:"string",description:"The plain text to ground into facts."},optimistic:{type:"boolean",description:"Also run the lower-trust fuzzy tier over sentences the strict recognizer skips."}}},example:{text:"A kettle is a container. An otter is a mammal.",optimistic:!0}}]),sp=dc.filter(e=>e.tier==="hot"),qC=dc.filter(e=>e.tier==="cold"),VC=Object.freeze(dc.map(e=>e.name))});var rp,Re,zt=O(()=>{Ue();rp=Q(".tmct","graph.json"),Re=class extends Error{constructor(t){super(t),this.name="ToolError"}}});function x$(e){let t=new Set;for(let n of Array.isArray(e?.individuals)?e.individuals:[])n&&n.id&&t.add(n.id);return t}function ip(e){let t=(Array.isArray(e)?e:[]).map((l,c)=>({file:l?.file,payload:l?.payload||{},name:l?.name!=null&&String(l.name).length?String(l.name):String(c)})),n=t.map(({payload:l})=>x$(l)),s=new Map;for(let l of n)for(let c of l)s.set(c,(s.get(c)||0)+1);let o=new Set([...s.entries()].filter(([,l])=>l>1).map(([l])=>l)),r={generated_at:"",classes:[],vocabulary:[],objectProperties:[],individuals:[],proseIndex:{}},i="",a=t.length>0;for(let{payload:l,name:c}of t){a=a&&!!l.bootstrap,typeof l.generated_at=="string"&&l.generated_at>i&&(i=l.generated_at);let u=f=>o.has(f)?`${c}/${f}`:f;Array.isArray(l.classes)&&r.classes.push(...l.classes),Array.isArray(l.vocabulary)&&r.vocabulary.push(...l.vocabulary);for(let f of Array.isArray(l.individuals)?l.individuals:[]){if(!f)continue;let p={...f};p.id&&(p.id=u(p.id)),Array.isArray(p.derived_from)&&(p.derived_from=p.derived_from.map(m=>u(m))),Array.isArray(p.mentions)&&(p.mentions=p.mentions.map(m=>m&&m.id?{...m,id:u(m.id)}:m)),r.individuals.push(p)}for(let f of Array.isArray(l.objectProperties)?l.objectProperties:[]){if(!f)continue;let p={...f};Array.isArray(p.examples)&&(p.examples=p.examples.map(m=>{if(!m)return m;let h={...m};return h.subject&&(h.subject=u(h.subject)),h.object&&(h.object=u(h.object)),h})),r.objectProperties.push(p)}let d=l.proseIndex&&typeof l.proseIndex=="object"?l.proseIndex:{};for(let[f,p]of Object.entries(d)){let m=r.proseIndex[f]||(r.proseIndex[f]=[]);for(let h of Array.isArray(p)?p:[]){let g=u(h);m.includes(g)||m.push(g)}}}return r.generated_at=i,a&&(r.bootstrap=!0),r}var ap=O(()=>{});var ko={};Fn(ko,{clearCache:()=>E$,emptyEntities:()=>pc,fetchEntities:()=>_$,registerProvider:()=>S$});function E$(){So=null,$r=null}function S$(e){if(e!=null&&typeof e!="function")throw new TypeError("registerProvider expects a function (config) => entities payload, or null");let t=bi;return bi=e??null,So=null,t}function pc(){return{generated_at:"",bootstrap:!0,classes:[],vocabulary:[],objectProperties:[],individuals:[],proseIndex:{}}}async function k$(e){let t;try{t=await ze(e,"utf8")}catch(n){if(n?.code==="ENOENT")return pc();throw new Re(`cannot read graph artifact at ${e} (${n?.code||n?.message||n})`)}try{return JSON.parse(t)}catch{throw new Re(`graph artifact ${e} is not valid JSON`)}}async function j$(e){let t=e.graphFiles,n=[...t].map(String).sort().join("|");if($r&&$r.key===n)return $r.payload;let s=[];for(let r=0;r<t.length;r++){let i=await k$(t[r]);s.push({file:t[r],payload:i,name:e.graphNames?.[r]})}let o=ip(s);return $r={key:n,payload:o},o}async function _$(e){if(bi){let s;try{s=await bi(e)}catch(o){throw o instanceof Re?o:new Re(`graph provider failed (${o?.message||o})`)}if(!s||typeof s!="object")throw new Re("graph provider returned no entities payload");return s}if(Array.isArray(e.graphFiles)&&e.graphFiles.length>1)return j$(e);if(So&&So.file===e.graphFile)return So.payload;let t;try{t=await ze(e.graphFile,"utf8")}catch(s){if(s?.code==="ENOENT")return pc();throw new Re(`cannot read graph artifact at ${e.graphFile} (${s?.code||s?.message||s})`)}let n;try{n=JSON.parse(t)}catch{throw new Re(`graph artifact ${e.graphFile} is not valid JSON`)}return So={file:e.graphFile,payload:n},n}var So,$r,bi,vr=O(()=>{_t();zt();ap();So=null,$r=null,bi=null});function Sn(e){if(!e)return[];let t=String(e).replace(/\.[A-Za-z0-9]+$/,"");return t=t.replace(/[/\\]/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/([A-Za-z])([0-9])/g,"$1 $2").replace(/([0-9])([A-Za-z])/g,"$1 $2").replace(/[_\-.]+/g," "),t.split(/\s+/).map(n=>n.toLowerCase()).filter(n=>n.length>1&&n.length<=cp)}function fc(e){if(!e)return[];let t=[],n=new Set;for(let s of String(e).toLowerCase().split(/[^a-z0-9]+/))if(!(s.length<2||s.length>cp||R$.has(s))&&!n.has(s)&&(n.add(s),t.push(s),t.length>=T$))break;return t}function wi({name:e,doc:t}={}){return[...new Set([...Sn(e),...fc(t)])].sort()}function lp(e){let t=Object.create(null);for(let n of e){let s=(n.attributes||[]).find(o=>o.key==="prose_tokens");if(s?.value)for(let o of s.value.split(" "))t[o]||(t[o]=[]),t[o].push(n.id)}for(let n of Object.keys(t))t[n].sort();return t}function qs(e,t,{limit:n=10}={}){let s=[...new Set([...Sn(t),...fc(t)])];if(!s.length)return[];let o=new Map;for(let r of s)for(let i of e?.[r]||[])o.set(i,(o.get(i)||0)+1);return[...o.entries()].sort((r,i)=>i[1]-r[1]||String(r[0]).localeCompare(i[0])).slice(0,n).map(([r,i])=>({id:r,score:i}))}function up(e,t){let n=e&&(e["tmct:layers"]?e:e.proseIndex),s=n&&n["tmct:layers"],o=String(t||"").toLowerCase(),r={ids:[],via:null};if(!o||!s||typeof s!="object")return r;let i=new Set,a=new Set;for(let l of Object.keys(s)){let c=s[l];if(!c||typeof c!="object")continue;let u=c[o],d=Array.isArray(u)?u:Array.isArray(u?.ids)?u.ids:null;if(d?.length){for(let f of d)i.add(f);a.add(l)}}return i.size?{ids:[...i].sort(),via:[...a].sort().join("+")}:r}var R$,cp,T$,us=O(()=>{R$=new Set("a an and or but the of to in on at for with from by as is are was were be been being it its this that these those i you he she they we me my your our do does did not no yes if then else than so such can will would should could may might about into over under out up down off again more most some any all what which who whom whose when where why how".split(/\s+/)),cp=40,T$=120});function dp(e){let t=e.indexOf("@"),n=t>=0?e.slice(0,t):e,s=t>=0?e.slice(t+1):"",o=n.indexOf(":"),r=o>=0?n.slice(o+1):"";return{createdAt:s,...r?{sessionId:r}:{}}}function A$(e){if(!e.startsWith(fp))return null;let t=e.indexOf("@"),n=t>=0?e.slice(0,t):e,s=t>=0?e.slice(t+1):"",o=n.indexOf(pp);if(o<0)return null;let r=n.slice(o+pp.length);return r?{kind:"teachNode",nodeId:r,displayName:n.slice(fp.length,o),createdAt:s}:null}function ps(e){let t=String(e||"").trim();if(!t)return null;if(t.startsWith("reference:")){let s=t.slice(10),o=s.indexOf(":");if(o<0)return{kind:"reference",pack:s||"unknown",article:""};let r=s.slice(0,o)||"unknown";return{kind:C$(r),pack:r,article:s.slice(o+1)}}if(t.startsWith("research:")){let s=t.slice(9),o=s.lastIndexOf("@");return{kind:"referenceLive",pack:"research",article:(o>=0?s.slice(0,o):s).trim()||"unknown"}}let n=t.split(/\s+/)[0];if(n.startsWith("corpus-weak:"))return{kind:"corpusWeak",name:n.slice(12)||"unknown"};if(n.startsWith("corpus:"))return{kind:"corpus",name:n.slice(7)||"unknown"};if(n.startsWith("child:"))return{kind:"corpus",name:n.slice(6).split(":")[0]||"unknown"};if(n.startsWith("world:"))return{kind:"corpus",name:n.slice(6).split(":")[0]||"unknown"};if(n.startsWith("mud:"))return{kind:"corpus",name:`mud:${n.slice(4).split(":")[0]||"unknown"}`};if(n.startsWith("ace:"))return{kind:"operator",...dp(n.slice(4))};if(n.startsWith("teach:")){let s=n.slice(6),o=A$(s);return o||{kind:"teach",...dp(s)}}return n.startsWith("web:")?{kind:"web",url:n.slice(4)}:n.startsWith("url:")?{kind:"web",url:n.slice(4)}:n.startsWith("optimistic-extract:")?{kind:"optimisticExtract",name:n.slice(19)||"unknown"}:n.startsWith("extracted:")?{kind:"extracted",name:n.slice(10)||"unknown"}:n.startsWith("entailed:")?{kind:"entailed",rule:n.slice(9)}:n.startsWith("chat:")||n.startsWith("session:")||n.startsWith("operator")?{kind:"operator"}:null}function wp(e){let t=(e?.attributes||[]).find(s=>s.prop==="mgx:sourceReliability")?.value;if(t===void 0)return hp;let n=Number(t);return Number.isFinite(n)?Math.max(mc,Math.min(bp,n)):hp}function yp(e,t=Date.now(),n=O$){let s=Date.parse(e);if(!Number.isFinite(s))return 1;let o=Math.max(0,t-s);return mp+(1-mp)*Math.pow(.5,o/n)}function $p(e,t={},n={}){let s=typeof n.now=="number"?n.now:Date.now(),o=Array.isArray(e?.sourceIds)?e.sourceIds:[],r=new Set,i=[],a=[];for(let p of o){if(r.has(p))continue;r.add(p);let m=t[p],h=L$(m);if(!h)continue;i.push(h);let g=(Vs[h]??0)*wp(m);a.push(Math.max(0,Math.min(1,g)))}let l=0,c=1;for(let p of a)c*=1-p;if(a.length&&(l=Math.min(1,1-c)),i.includes("entailed")&&Array.isArray(n.premiseTrusts)&&n.premiseTrusts.length){let p=typeof n.ruleConfidence=="number"?n.ruleConfidence:1;l=Math.max(0,Math.min(1,Math.min(...n.premiseTrusts)*p))}let u=yp(e?.createdAt,s,n.halfLifeMs),d=jo(Math.min(1,l*u)),f={sourceTypes:i.slice().sort(),corroboration:i.length,createdAt:e?.createdAt||"",recency:jo(u)};return{score:d,inputs:f}}function $i(e,t){let n=(Vs[e]??0)*wp(t);return jo(Math.max(0,Math.min(1,n)))}function N$(e){if(e==="operator")return 1;let t=Vs[e];return t===void 0?1:(t+1)/2}function vi(e,t={}){let n=typeof t.now=="number"?t.now:Date.now(),s=Array.isArray(e)?e:[],o=new Map,r=[];for(let a of s){let l=yp(a?.assertedAt,n,t.halfLifeMs),c=Math.max(0,Math.min(1,Number(a?.ownTrust)||0)),u=a?.sourceType||"",d=Math.max(0,Math.min(1,c*l)),f=o.get(u)||{complement:1,strongest:0};f.complement*=1-d,f.strongest=Math.max(f.strongest,d),o.set(u,f),r.push({sourceId:a?.sourceId||"",sourceType:u,ownTrust:c,recency:jo(l)})}let i=1;for(let[a,l]of o){let c=Math.max(N$(a),l.strongest);i*=1-Math.min(1-l.complement,c)}return{score:s.length?jo(Math.min(1,1-i)):0,inputs:r}}function vp(e){return vi(e,{halfLifeMs:M$})}function xp({factsAsserted:e=0,factsContradicted:t=0}={}){let n=Math.max(0,Number(e)||0),s=Math.max(0,Number(t)||0),o=Math.max(-1,Math.min(1,(n-2*s)/Math.max(1,n))),r=n/(n+P$),i=(o*r+1)/2;return jo(mc+(bp-mc)*i)}var _o,yi,st,ds,pp,fp,I$,C$,Vs,hc,gp,O$,mp,mc,bp,hp,jo,L$,M$,P$,fs=O(()=>{_o="mgx:trustScore",yi="mgx:trustInputs",st="mgx:createdAt",ds="mgx:updatedAt";pp="#node:",fp="peer:";I$="wikipedia-live",C$=e=>e===I$?"referenceLive":"reference";Vs=Object.freeze({operator:1,teach:.95,provider:.9,corpus:.7,reference:.6,corpusWeak:.55,referenceLive:.5,extracted:.45,web:.4,optimisticExtract:.35,entailed:.3}),hc=Object.freeze({operator:{subClass:"tmct:AgentSource",prov:"prov:Agent"},teach:{subClass:"tmct:AgentSource",prov:"prov:Agent"},provider:{subClass:"tmct:AgentSource",prov:"prov:Agent"},corpus:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},corpusWeak:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},reference:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},referenceLive:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},web:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},extracted:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},optimisticExtract:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},entailed:{subClass:"tmct:ActivitySource",prov:"prov:Activity"}}),gp=new Set(Object.entries(hc).filter(([,e])=>e.prov==="prov:Agent").map(([e])=>e)),O$=720*60*60*1e3,mp=.9,mc=.5,bp=1.5,hp=1,jo=(e,t=6)=>Number(e.toFixed(t)),L$=e=>(e?.attributes||[]).find(t=>t.prop==="mgx:sourceType")?.value||"";M$=1/0;P$=19});var Hs,gc=O(()=>{Hs=e=>/(^|\/)tests?\//.test(e)||/(^|\/)test_[^/]*\.py$/.test(e)||/\.tests(\.|$)/.test(e)||/(^|\/)[^/]*[-_]tests?\//.test(e)||/\.(test|spec)\.[cm]?[jt]sx?$/.test(e)});function bc(e,t){return Math.log(1+e/(1+t))}var xr=O(()=>{});var ki={};Fn(ki,{bfsLevels:()=>Si,findActionPath:()=>xi,findReachableSet:()=>Ei});function Ep(e){return e&&typeof e=="object"?JSON.stringify(e):String(e)}function Sp(e,t){let n=[];for(let{action:s,nextState:o}of t(e)||[])n.push({state:o,actions:[s],states:[e,o]});return n}function xi(e,t,n,{maxDepth:s=50,stateKey:o=Ep}={}){if(t(e))return{actions:[],states:[e]};let r=Sp(e,n),i=new Set([o(e)]);for(let a=1;a<=s&&r.length;a+=1){for(let c of r)if(t(c.state))return{actions:c.actions,states:c.states};if(a===s)break;let l=[];for(let c of r){let u=o(c.state);if(!i.has(u)){i.add(u);for(let{action:d,nextState:f}of n(c.state)||[]){let p=o(f);i.has(p)||l.push({state:f,actions:[...c.actions,d],states:[...c.states,f]})}}}r=l}return null}function Ei(e,t,{maxDepth:n=50,stateKey:s=Ep}={}){let o=Sp(e,t),r=new Set([s(e)]),i=[];for(let a=1;a<=n&&o.length;a+=1){let l=[];for(let c of o){let u=s(c.state);if(!r.has(u)&&(r.add(u),i.push({node:c.state,path:{actions:c.actions,states:c.states}}),a!==n))for(let{action:d,nextState:f}of t(c.state)||[]){let p=s(f);r.has(p)||l.push({state:f,actions:[...c.actions,d],states:[...c.states,f]})}}o=l}return i}function*Si(e,t,{maxDepth:n=8,keyOf:s=o=>o}={}){let o=new Set([e]),r=[e];for(let i=1;i<=n&&r.length;i+=1){let a=[],l=[];for(let c of r)for(let u of t(c)||[]){let d=s(u);o.has(d)||(o.add(d),a.push(u),l.push(d))}r=l,yield a}}var ms=O(()=>{});function _i(e){let t=Array.isArray(e?.individuals)?e.individuals:[],n=new Map;for(let r of t)r&&r.id&&n.set(r.id,r);let s=(Array.isArray(e?.objectProperties)?e.objectProperties:[]).filter(r=>r&&(r.predicate||r.prop)).map(r=>{let i=(Array.isArray(r.examples)?r.examples:[]).filter(a=>a&&a.subject&&a.object);return{predicate:String(r.predicate||""),prop:r.prop||null,count:Number(r.count)||i.length,edges:i}}),o=s.filter(r=>r.count>r.edges.length).map(r=>({predicate:r.predicate,count:r.count,shown:r.edges.length}));return{individuals:t,byId:n,relations:s,truncated:o,generatedAt:e?.generated_at||null,proseIndex:e?.proseIndex||{}}}function Ec(e){return!e||!Array.isArray(e.individuals)?0:e.individuals.filter(t=>(t.class||"")==="Module").length}function qn(e){let t=String(e?.prop||"").toLowerCase();if(kp[t])return kp[t];let n=String(e?.predicate||"").toLowerCase();if(/symbol/.test(n)){if(/\b(call|invoke)/.test(n))return"callsSymbol";if(/(touch|chang|modif)/.test(n))return"touchesSymbol"}return/\bimport/.test(n)?"imports":/\b(call|invoke)/.test(n)?"calls":/\b(define|export|declare)/.test(n)?"defines":/\b(test|cover)/.test(n)?"tests":/\b(touch|chang|modif)/.test(n)?"touches":/\bcontain/.test(n)?"contains":/\b(inherit|subclass|extend|specializ)/.test(n)?"inherits":null}function Wn(e){return String(e||"").trim().toLowerCase().replace(/^\.\//,"").replace(/^\//,"")}function wc(e){let t=Wn(e).split("/");return t[t.length-1]}function F$(e){return(e?.derived_from||[]).filter(Fp).length}function jp(e){return(e?.mentions||[]).reduce((n,s)=>n+(Number(s?.count)||0),0)+F$(e)}function en(e,t){let n=Wn(t);if(!n)return{match:null,candidates:[]};let s=wc(n),o=!n.includes("/"),r=[];for(let i of e.individuals){let a=Wn(i.label),l=String(i.id||"").toLowerCase(),c=0;a===n||l===n?c=100:a.endsWith(`/${n}`)||o&&(wc(a)===s||wc(a).replace(/\.[a-z]+$/,"")===s)?c=80:a.includes(n)&&(c=Math.max(10,50-(a.length-n.length))),c>0&&r.push({ind:i,score:c})}return r.sort((i,a)=>a.score-i.score||jp(a.ind)-jp(i.ind)||String(i.ind.label).length-String(a.ind.label).length),{match:r[0]?.ind||null,candidates:r.slice(1,5).map(i=>i.ind)}}function Rt(e){let t=(e?.attributes||[]).find(s=>s.key==="site");if(!t)return null;let n=String(t.value).match(/^(.*):(\d+)(?:-(\d+))?$/);return n?{path:n[1],start:Number(n[2]),end:n[3]?Number(n[3]):Number(n[2])}:null}function D$(e,t){let n=[],s=[];for(let o of e.relations){let r=o.edges.filter(a=>a.subject===t),i=o.edges.filter(a=>a.object===t);r.length&&n.push({group:o,edges:r}),i.length&&s.push({group:o,edges:i})}return{out:n,incoming:s}}function _p(e){return e.prop?`${e.predicate} [${e.prop}]`:e.predicate}function Gn(e){let t=e||"Entity",n=Sn(t);return n.length<2?t:n.map(s=>s[0].toUpperCase()+s.slice(1)).join(" ")}function ut(e,t,n=", "){return e.length<=t?e.join(n):e.slice(0,t).join(n)+`, +${e.length-t} more`}function Sc(e,t,{candidates:n=[]}={}){let s=[];s.push(`${t.label} \u2014 ${Gn(t.class)} (id: ${t.id})`);let o=(t.derived_from||[]).filter(Fp);o.length&&s.push(`attestation: touched by ${o.length} commit(s)`);for(let l of t.attributes||[])s.push(`attribute: ${l.key} = ${l.value}${l.prop?` [${l.prop}]`:""}`);let{out:r,incoming:i}=D$(e,t.id);if(!r.length&&!i.length)s.push("edges: none in the current artifact");else{s.push("edges:");for(let{group:l,edges:c}of r)s.push(` ${_p(l)} (${c.length}) \u2192 ${ut(c.map(u=>u.objectLabel||u.object),Rp)}`);for(let{group:l,edges:c}of i)s.push(` \u2190 ${_p(l)} (${c.length}) by ${ut(c.map(u=>u.subjectLabel||u.subject),Rp)}`)}let a=t.derived_from||[];return a.length&&s.push(`provenance: ${ut(a,z$)}`),n.length&&s.push(`other matches: ${n.map(l=>`${l.label} (${Gn(l.class)})`).join(", ")}`),e.truncated.length&&s.push(U$(e)),s.join(`
2
+ `)}function U$(e){return`note: partial edge lists for: ${e.truncated.map(n=>`${n.predicate} (${n.shown}/${n.count})`).join(", ")}. Counts are complete; the lists are not.`}function To(e,t,{maxDepth:n=8}={}){let s=new Map,o=new Map,r=(a,l,c,u)=>{!a||!l||a===l||(s.has(a)||s.set(a,[]),s.get(a).push({id:l,label:c,via:u}))};for(let a of e.relations){let l=qn(a);if(l==="imports"||l==="calls")for(let c of a.edges)r(c.object,c.subject,c.subjectLabel||c.subject,a.predicate);else if(l==="callsSymbol")for(let c of a.edges){let u=Bn(e,c.subject),d=Bn(e,c.object);if(!u||!d)continue;let f=e.byId.get(u)?.label||u;r(d,u,f,a.predicate),u!==d&&r(c.object,u,f,a.predicate)}else if(l==="tests")for(let c of a.edges)o.has(c.object)||o.set(c.object,[]),o.get(c.object).push(c.subjectLabel||c.subject)}let i=[];for(let a of Si(t.id,l=>s.get(l)||[],{maxDepth:n,keyOf:l=>l.id})){if(!a.length)continue;let l=a.map(c=>({...c,tests:o.get(c.id)||[]})).sort((c,u)=>String(c.label).localeCompare(String(u.label)));i.push(l)}return i}function Dp(e,t,{maxDepth:n=8}={}){let s=To(e,t,{maxDepth:n}),o=[`Impact of changing ${t.label} (reverse closure over imports/calls edges, module- and function-level):`];s.length||o.push("no dependents found in the current artifact \u2014 nothing imports or calls it (or its edges are not in the extracted graph yet).");let r=s.reduce((a,l)=>a+l.length,0);s.length&&o.push(`total: ${r} dependent(s) across ${s.length} depth level(s) (lists capped for brevity).`),s.forEach((a,l)=>{if(l>=B$){o.push(`depth ${l+1}: ${a.length} more dependent(s) (not listed)`);return}o.push(l===0?`depth 1 (${a.length} direct dependents):`:`depth ${l+1} (${a.length}):`);for(let c of a.slice(0,yc)){let u=c.tests.length?`tests: ${ut(c.tests,W$)}`:"tests: none recorded",d=l===0?`${c.via} it`:"reaches it through an intermediary";o.push(` - ${c.label} (${d}) \u2014 ${u}`)}a.length>yc&&o.push(` \u2026+${a.length-yc} more at depth ${l+1}`)});let i=e.truncated.filter(a=>{let l=qn({predicate:a.predicate});return l==="imports"||l==="calls"||l==="callsSymbol"||l==="tests"});return i.length&&o.push("warning: partial edge lists ("+i.map(a=>`${a.predicate}: ${a.shown}/${a.count}`).join(", ")+") \u2014 this closure may be missing edges. Cross-check critical results with a lexical search (/find <term>)."),o.join(`
3
+ `)}function zp(e){let t=new Map;for(let n of e.relations)if(qn(n)==="defines")for(let s of n.edges)t.has(s.subject)||t.set(s.subject,[]),t.get(s.subject).push(s.objectLabel||s.object);return t}function Ap(e){return new Set(String(e).replace(/([a-z0-9])([A-Z])/g,"$1_$2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean))}function qp(e,t,n=null){let s=n||(i=>Bn(e,i)),o=new Map,r=(i,a)=>{!i||!a||i===a||(o.has(i)||o.set(i,new Set),o.has(a)||o.set(a,new Set),o.get(i).add(a),o.get(a).add(i))};for(let i of t)for(let a of ke(e,i))r(s(a.subject),s(a.object));return o}function kv(e,t,n){if(t.length<2)return;let s=new Map(t.map(c=>[c.ind.id,c])),o=new Map(t.map(c=>[c.ind.id,c.score])),r=c=>{if(!c.size)return[[],[]];let u=0;for(let m of c.values())u=Math.max(u,m);let d=[...c.entries()].sort((m,h)=>h[1]-m[1]),f=[],p=[];for(let[m,h]of d)h>=u*hv&&f.length<n?f.push([m,h]):p.length<Tp&&p.push([m,h]);return[f,p]},[i,a]=r(new Map(t.map(c=>[c.ind.id,c.score]))),l=new Set(i.map(([c])=>c));for(let c=0;c<wv&&i.length;c++){let u=new Map,d=[];for(let f of yv){let p=qp(e,f),m=new Map;for(let[b,y]of i)for(let w of p.get(b)||[])o.has(w)&&m.set(w,Math.max(m.get(w)||0,y));let[h,g]=r(m);for(let[b,y]of h)u.set(b,Math.max(u.get(b)||0,y));d.push(...g)}a.push(...d);for(let[f,p]of u){if(l.has(f))continue;let m=s.get(f);m&&(m.score+=Math.min(p*gv,m.score*bv),l.add(f))}i=[...u.entries()],!i.length&&a.length&&(i=a.splice(0,Tp).filter(([f])=>!l.has(f)))}}function jv(e,t=[],{depth:n=Bp,q:s=Gp,nodeLimit:o=Wp,kinds:r=$v,classPredicate:i=u=>(u.class||"")==="Module",idNormalizer:a=null,seeds:l=null,hubDegree:c=1/0}={}){let u=new Map(t.map(S=>[S.ind.id,S])),d=0;for(let S of t)d=Math.max(d,S.score);let f=t.length>0&&d>0,p=new Set(l??u.keys());if(!p.size)return[];let m=qp(e,r,a),h=S=>m.get(S)?.size||0,g=[],b=(S,R)=>S.hop!==R.hop?S.hop<R.hop:S.deg!==R.deg?S.deg<R.deg:S.id<R.id,y=(S,R)=>{let k=g[S];g[S]=g[R],g[R]=k},w=S=>{g.push(S);let R=g.length-1;for(;R>0;){let k=R-1>>1;if(b(g[R],g[k]))y(R,k),R=k;else break}},v=()=>{let S=g[0],R=g.pop();if(g.length){g[0]=R;let k=0;for(;;){let A=2*k+1,M=2*k+2,T=k;if(A<g.length&&b(g[A],g[T])&&(T=A),M<g.length&&b(g[M],g[T])&&(T=M),T===k)break;y(k,T),k=T}}return S},_=new Set(p);for(let S of p)w({id:S,hop:0,deg:h(S)});let $=null,x=0,E=[];for(;g.length&&x<o;){let S=v();if(E.push({id:S.id,hop:S.hop}),!p.has(S.id)){if(f){let A=d*vv*Math.pow(xv,S.hop-1),M=u.get(S.id);if(M)M.score+=Math.min(A*Ev,M.score*Sv);else{let T=e.byId?.get?.(S.id);if(T&&i(T)){$||($=zp(e));let P=$.get(T.id)||[],U={ind:T,score:A,defineCount:P.length,matching:[],density:0};t.push(U),u.set(S.id,U)}}}x++}if(S.hop>=n||S.hop>0&&h(S.id)>c)continue;let R=[];for(let A of m.get(S.id)||[]){if(_.has(A))continue;let M=e.byId?.get?.(A);!M||!i(M)||R.push({id:A,deg:h(A)})}if(!R.length)continue;R.sort((A,M)=>A.deg-M.deg||(A.id<M.id?-1:A.id>M.id?1:0));let k=Math.max(1,Math.floor(s*R.length));for(let A=0;A<k;A++){let M=R[A];_.add(M.id),w({id:M.id,hop:S.hop+1,deg:M.deg})}}return E}function Vp(e,t,n={}){let{demoteNonProd:s=!1,callAdjacency:o=!1,implOfInterface:r=!1,beamSearch:i=!1,spiral:a=!1,proseBoost:l=!1,proseLayers:c=!1,literalMention:u=!1,rawQuery:d=""}=n,f=Number.isFinite(n.beamWidth)&&n.beamWidth>0?n.beamWidth:8,p=zp(e),m=[];for(let v of e.individuals){if((v.class||"")!=="Module")continue;let _=String(v.label),$=_.toLowerCase(),x=p.get(v.id)||[],E=new Set(x.map(k=>k.toLowerCase())),S=new Set;for(let k of x)for(let A of Ap(k))S.add(A);let R=u?String((v.attributes||[]).find(k=>k.key==="dotted")?.value||"").toLowerCase():"";m.push({ind:v,label:_,labelLc:$,defines:x,symSet:E,symComps:S,dotted:R})}let h=m.length||1,g=new Map,b=v=>{let _=0;for(let $ of m)($.labelLc.includes(v)||$.symComps.has(v)||$.symSet.has(v))&&_++;return _},y=v=>(g.has(v)||g.set(v,bc(h,b(v))),g.get(v));for(let v of t)y(v);let w=[];for(let v of m){let _=0,$=0,x=0,E=[];for(let M of t){let T=g.get(M)||0;T&&(v.symSet.has(M)?(_+=T*Up,x++):v.symComps.has(M)&&(E.push(T),x++),v.labelLc.includes(M)&&($+=T*q$))}E.sort((M,T)=>T-M);let S=0;for(let M=0;M<Math.min(E.length,H$);M++)S+=E[M]*V$;let R=_+$+S;if(!R)continue;s&&(Hs(v.labelLc)||J$(v.labelLc))?R*=X$:Hs(v.labelLc)&&(R*=.4);let k=v.defines.filter(M=>{let T=M.toLowerCase(),P=Ap(M);return t.some(U=>T===U||P.has(U))}),A=v.defines.length?x/v.defines.length:0;w.push({ind:v.ind,score:R,defineCount:v.defines.length,matching:k,density:A})}if(u&&d&&w.length){let v=String(d).toLowerCase(),_=S=>S!=null&&/[a-z0-9_./]/.test(S),$=S=>{for(let R=v.indexOf(S);R!==-1;R=v.indexOf(S,R+1))if(!_(v[R-1])&&!_(v[R+S.length]))return!0;return!1},x=new Map(m.map(S=>[S.ind.id,S])),E=0;for(let S of w)E=Math.max(E,S.score);for(let S of w){let R=x.get(S.ind.id);if(!R)continue;let k=0;for(let A of new Set([R.dotted,R.labelLc])){if(!A||A.split(/[./]+/).filter(Boolean).length<dv||!$(A))continue;let M=[...new Set(A.split(/[^a-z0-9_]+/).filter(Boolean))].map(y).sort((P,U)=>U-P),T=0;for(let P=0;P<Math.min(M.length,pv);P++)T+=M[P]*uv;k=Math.max(k,T)}k&&(S.score+=Math.min(k*fv,E*mv))}}if(w.length>1){let v=new Map(w.map($=>[$.ind.id,$.score])),_=new Map;for(let $ of ke(e,"imports"))!v.has($.subject)&&!v.has($.object)||(_.has($.subject)||_.set($.subject,new Set),_.has($.object)||_.set($.object,new Set),_.get($.subject).add($.object),_.get($.object).add($.subject));for(let $ of w){let x=0;for(let E of _.get($.ind.id)||[])x=Math.max(x,v.get(E)||0);$.score+=Math.min(x*K$,$.score*Y$)}}if(o&&w.length>1){let v=new Map(w.map($=>[$.ind.id,$.score])),_=new Map;for(let $ of["calls","callsSymbol"])for(let x of ke(e,$)){let E=Bn(e,x.subject),S=Bn(e,x.object);!E||!S||E===S||!v.has(E)&&!v.has(S)||(_.has(E)||_.set(E,new Set),_.has(S)||_.set(S,new Set),_.get(E).add(S),_.get(S).add(E))}for(let $ of w){let x=0;for(let E of _.get($.ind.id)||[])x=Math.max(x,v.get(E)||0);$.score+=Math.min(x*Q$,$.score*Z$)}}if(r&&w.length>1){let v=new Map(w.map($=>[$.ind.id,$.score])),_=new Map;for(let $ of e.individuals)($.class||"")==="Class"&&$.label&&_.set(String($.label),$);for(let $ of w){if(!nv($.ind.label))continue;let x=0;for(let E of ke(e,"inherits")){if(Bn(e,E.subject)!==$.ind.id||!sv(E.objectLabel))continue;let R=Bn(e,E.object);if(!R){let k=_.get(String(E.objectLabel||""));k&&(R=kn(e,k))}R&&(x=Math.max(x,v.get(R)||0))}$.score+=Math.min(x*ev,$.score*tv)}}if(l&&w.length&&e.proseIndex){let v=qs(e.proseIndex,t.join(" "),{limit:iv});if(v.length){let _=new Map;for(let{id:$,score:x}of v){let E=Bn(e,$);E&&_.set(E,(_.get(E)||0)+x)}for(let $ of w){let x=_.get($.ind.id)||0;x&&($.score+=Math.min(x*ov,$.score*rv))}}}if(c&&w.length&&e.proseIndex){let v=new Map(w.map(x=>[x.ind.id,x])),_=new Map(m.map(x=>[x.ind.id,x])),$=new Map;for(let x of new Set(t)){let E=g.get(x)||0;if(!E)continue;let{ids:S}=up(e.proseIndex,x);if(!S.length)continue;let R=new Set;for(let k of S){let A=Bn(e,k);if(!A||R.has(A)||(R.add(A),!v.has(A)))continue;let M=_.get(A);M&&(M.symSet.has(x)||M.symComps.has(x)||M.labelLc.includes(x))||$.set(A,($.get(A)||0)+E*lv)}}for(let x of w){let E=$.get(x.ind.id)||0;E&&(x.score+=Math.min(E*av,x.score*cv))}}return i&&w.length>1&&kv(e,w,f),a&&w.length&&jv(e,w,{depth:Number.isFinite(n.spiralDepth)&&n.spiralDepth>0?n.spiralDepth:Bp,q:Number.isFinite(n.mostDistinctiveBeams)&&n.mostDistinctiveBeams>0?n.mostDistinctiveBeams:Gp,nodeLimit:Number.isFinite(n.spiralNodeLimit)&&n.spiralNodeLimit>0?n.spiralNodeLimit:Wp}),w.sort((v,_)=>_.score-v.score||_.density-v.density||v.defineCount-_.defineCount||String(v.ind.label).length-String(_.ind.label).length),w}function Hp(e,t,n={}){let s=String(t||""),o=s.toLowerCase().split(/[^a-z0-9_]+/).filter(Boolean);if(!o.length)return[];let r=n.literalMention?{...n,rawQuery:s}:n;return Vp(e,o,r).map(i=>({path:String(i.ind.label),score:i.score}))}function Rv(e){let t=0,n=!1,s=!1,o=!1,r="",i=!1,a=()=>{t+=1,r===")"&&(n=!0),i=!0};for(let l=0;l<e.length;l++){let c=e[l];if(c==="\\"){let u=e[l+1]||"";!o&&u>="1"&&u<="9"&&(s=!0),l+=1,r="",i=!1;continue}if(o){c==="]"&&(o=!1,r="]",i=!1);continue}if(c==="["){o=!0,r="[",i=!1;continue}if(c==="?"&&(r==="("||i)){r="?",i=!1;continue}if(c==="*"||c==="+"||c==="?"){a(),r=c;continue}if(c==="{"){let u=e.indexOf("}",l),d=u===-1?"":e.slice(l+1,u);if(u!==-1&&/^\d+(,\d*)?$/.test(d)){a(),l=u,r="}";continue}r="{",i=!1;continue}r=c,i=!1}return{quantifiers:t,quantifiedGroup:n,backreference:s}}function kc(e,{now:t=Date.now}={}){let n=String(e);if(n.length>Ip)return{error:`name pattern is ${n.length} characters; the limit is ${Ip}.`};let{quantifiers:s,quantifiedGroup:o,backreference:r}=Rv(n);if(o)return{error:`name pattern "${n}" quantifies a group, which can backtrack for minutes on one label. Quantify a character or a class instead.`};if(r)return{error:`name pattern "${n}" uses a back-reference, which can backtrack for minutes on one label.`};if(s>Cp)return{error:`name pattern "${n}" has ${s} quantifiers; the limit is ${Cp}.`};let i;try{i=new RegExp(n,"i")}catch{return{error:`invalid name pattern: ${n}`}}let a=null;return{test(l){if(a===null)a=t()+Op;else if(t()>a)throw new ji(`name pattern "${n}" exceeded its ${Op}ms matching budget.`);return i.test(String(l).slice(0,_v))}}}function Kp(e,t,{limit:n=Ri,kind:s="",decorator:o="",name:r="",toolNamePrefix:i="tmct_"}={}){let a=String(t||"").toLowerCase().split(/[^a-z0-9_]+/).filter(Boolean),l=String(s||"").trim().toLowerCase(),c=String(o||"").trim().toLowerCase(),u=null;if(r){let m=kc(r);if(m.error)return m.error;u=m}if(l&&l!=="module")try{return Ov(e,a,{limit:n,kind:l,decFilter:c,nameRe:u,toolNamePrefix:i})}catch(m){if(m instanceof ji)return m.message;throw m}if(!a.length&&!u&&!c)return"empty query";let d=Vp(e,a);if(!d.length)return`no module matches "${t}". Try broader keywords, or ${i}describe <path> if you know where it lives.`;let f=d.slice(0,n),p=[`${d.length} module(s) match "${t}" (top ${f.length}):`];for(let{ind:m,defineCount:h,matching:g}of f){let b=g.length?` \u2014 matching: ${ut([...new Set(g)],G$)}`:"";p.push(`- ${m.label} (defines ${h} symbol(s))${b}`)}return p.push(`Then ${i}describe <path> for the full sibling list + typed edges, or ${i}impact <path> for dependents.`),p.join(`
4
+ `)}function ke(e,t){let n=Lp.get(e);n||(n=new Map,Lp.set(e,n));let s=n.get(t);if(s)return s;let o=[];for(let r of e.relations)if(qn(r)===t)for(let i of r.edges)o.push(i);return n.set(t,o),o}function Bn(e,t){let n=e.byId?.get?.(t);if(n)return kn(e,n);let s=String(t||"").match(/^fn:(.+)#/);return s?`mod:${s[1]}`:null}function kn(e,t){if((t?.class||"")==="Module")return t.id;let n=Rt(t);if(n)return`mod:${n.path}`;let s=String(t?.id||"").match(/^fn:(.+)#/);return s?`mod:${s[1]}`:null}function jc(e){if(!e)return"";let t=e.end>e.start?`${e.start}-${e.end}`:`${e.start}`;return` [${e.path}:${t}]`}function Ro(e){return(e?.attributes||[]).find(t=>t.key==="decorators")?.value||""}function Yp(e,t,{toolNamePrefix:n="tmct_"}={}){let s=[`${t.label} \u2014 ${Gn(t.class)} (id: ${t.id})`],o=ke(e,"contains").filter(a=>a.subject===t.id);if(!o.length)return s.push(`members: none recorded (empty class, or members not in the extracted graph). Use ${n}describe for its edges.`),s.join(`
5
+ `);let r=[],i=[];for(let a of o){let l=e.byId.get(a.object),c=jc(l?Rt(l):null),u=l?Ro(l):"",d=`${a.objectLabel||a.object}${c}${u?` @${u}`:""}`;((l?.class||"")==="Attribute"?i:r).push(d)}return r.length&&s.push(`methods (${r.length}): ${ut(r,Np)}`),i.length&&s.push(`attributes (${i.length}): ${ut(i,Np)}`),s.push(`Use ${n}snippet <Class.member> for an exact body.`),s.join(`
6
+ `)}function Xp(e,t,{toolNamePrefix:n="tmct_"}={}){let s=Rt(t),o=[`${t.label} \u2014 ${Gn(t.class)}${jc(s)}`],r=Me(t,"params"),i=Me(t,"returns");(r||i||(t.class||"")==="Method"||(t.class||"")==="Function")&&o.push(`signature: ${t.label}(${r})${i?` -> ${i}`:""}`);let a=[];Me(t,"isStatic")&&a.push("static"),Me(t,"isAbstract")&&a.push("abstract"),Me(t,"isConstant")&&a.push("constant");let l=Me(t,"visibility");l&&a.push(l),a.length&&o.push(`flags: ${a.join(", ")}`);let c=Ro(t);c&&o.push(`decorators: @${c.split(", ").join(", @")}`);let u=Me(t,"raises");u&&o.push(`raises: ${u}`);let d=Me(t,"catches");d&&o.push(`catches: ${d}`);let f=Me(t,"self_fields");f&&o.push(`self fields: ${f}`);let p=Me(t,"value");p&&o.push(`value: ${p}`);let m=Me(t,"doc");return m&&o.push(`doc: ${m}`),o.length===1&&o.push(`(no signature detail recorded for this symbol \u2014 likely a module or attribute; use ${n}snippet for its source.)`),o.push(`Use ${n}snippet for the exact body.`),o.join(`
7
+ `)}function Jp(e,t){let n=ke(e,"inherits"),s=n.filter(l=>l.subject===t.id).map(l=>l.objectLabel||l.object),o=new Map;for(let l of n)o.has(l.object)||o.set(l.object,[]),o.get(l.object).push({id:l.subject,label:l.subjectLabel||l.subject});let r=[`${t.label} \u2014 ${Gn(t.class)} (id: ${t.id})`];r.push(s.length?`extends: ${ut(s,Mp)}`:"extends: (no internal/recorded base classes)");let i=[];for(let l of Si(t.id,c=>o.get(c)||[],{maxDepth:8,keyOf:c=>c.id}))l.length&&i.push(l.map(c=>c.label).sort((c,u)=>String(c).localeCompare(String(u))));let a=i.reduce((l,c)=>l+c.length,0);return a?(r.push(`subclasses: ${a} total across ${i.length} level(s).`),i.forEach((l,c)=>r.push(` depth ${c+1} (${l.length}): ${ut(l,Mp)}`))):r.push("subclasses: none recorded \u2014 nothing extends it in the extracted graph."),r.join(`
8
+ `)}function Ti(e){let t=new Map;for(let n of e){let s=n.label.includes("/")?n.label.slice(0,n.label.lastIndexOf("/")):"(root)";t.set(s,(t.get(s)||0)+1)}return t}function Ai(e,t=""){let n=Wn(t);return e.individuals.filter(s=>(s.class||"")==="Module"&&(!n||Wn(s.label).startsWith(n)))}function Qp(e,{pkg:t=""}={}){let n=Wn(t),s=Ai(e,t);if(!s.length)return n?`no modules under "${t}".`:"no modules in the graph.";let o=Ti(s),r=new Map;for(let u of ke(e,"imports"))r.set(u.object,(r.get(u.object)||0)+1);let i=new Set(s.map(u=>u.id)),a=[...r.entries()].filter(([u])=>i.has(u)).sort((u,d)=>d[1]-u[1]).slice(0,Av).map(([u,d])=>`${e.byId.get(u)?.label||u} (${d} importers)`),l=[...o.entries()].sort((u,d)=>d[1]-u[1]),c=[`Architecture${n?` of ${t}`:""}: ${s.length} module(s) in ${l.length} package(s).`];return c.push(`packages (by module count): ${ut(l.map(([u,d])=>`${u} (${d})`),Tv)}`),c.push(a.length?`hub modules (most imported): ${a.join(", ")}`:"hub modules: none (no internal imports recorded)."),c.join(`
9
+ `)}function ef(e,t){let n=kn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||Rt(t)?.path||n,o=[...new Set(ke(e,"tests").filter(a=>a.object===n).map(a=>a.subjectLabel||a.subject))],r=o.length>0,i=r?`covered by ${o.length} test module(s):
10
+ ${ut(o,Zp,`
11
11
  `)}`:"no covering tests recorded (no test module imports it).";return n===t.id?`${s}: ${i}`:`${t.label} is defined in ${s}, which ${r?"is":"has"} ${i}
12
- ${b$}`}function qp(e){let t=new Set,n=new Set;for(let o of ke(e,"tests"))t.add(o.object),n.add(o.subject);let s=e.individuals.filter(o=>(o.class||"")==="Module"&&!n.has(o.id)&&!Ws(String(o.label).toLowerCase())&&!t.has(o.id)).map(o=>o.label).sort();return s.length?`${s.length} source module(s) with no covering test module:
13
- ${ut(s,Hp,`
14
- `)}`:"every source module has at least one covering test module."}function Kp(e,t){let n=kn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=ke(e,"touches").filter(r=>r.object===n).map(r=>r.subjectLabel||r.subject);return o.length?`${s}: touched by ${o.length} recent commit(s): ${ut(o,zt)}`:`${s}: no commit history recorded (outside the git-log window or unmodified).`}function Xp(e,t,{toolNamePrefix:n="tmct_"}={}){if(Yp.has(t.class)){let i=[...new Set(ke(e,"callsSymbol").filter(a=>a.object===t.id).map(a=>a.subjectLabel||a.subject))];return i.length?`${t.label} \u2014 called by ${i.length} symbol(s):
15
- ${ut(i,xr,`
12
+ ${Iv}`}function tf(e){let t=new Set,n=new Set;for(let o of ke(e,"tests"))t.add(o.object),n.add(o.subject);let s=e.individuals.filter(o=>(o.class||"")==="Module"&&!n.has(o.id)&&!Hs(String(o.label).toLowerCase())&&!t.has(o.id)).map(o=>o.label).sort();return s.length?`${s.length} source module(s) with no covering test module:
13
+ ${ut(s,Zp,`
14
+ `)}`:"every source module has at least one covering test module."}function nf(e,t){let n=kn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=ke(e,"touches").filter(r=>r.object===n).map(r=>r.subjectLabel||r.subject);return o.length?`${s}: touched by ${o.length} recent commit(s): ${ut(o,Ut)}`:`${s}: no commit history recorded (outside the git-log window or unmodified).`}function of(e,t,{toolNamePrefix:n="tmct_"}={}){if(sf.has(t.class)){let i=[...new Set(ke(e,"callsSymbol").filter(a=>a.object===t.id).map(a=>a.subjectLabel||a.subject))];return i.length?`${t.label} \u2014 called by ${i.length} symbol(s):
15
+ ${ut(i,Er,`
16
16
  `)}`:`${t.label}: no recorded callers (fine-grained call edges are conservative \u2014 absence is not proof). Try ${n}impact for the full reverse closure.`}let s=kn(e,t);if(!s)return`cannot map ${t.label} to a module.`;let o=e.byId.get(s)?.label||s,r=[...new Set(ke(e,"calls").filter(i=>i.object===s).map(i=>i.subjectLabel||i.subject))];return r.length?`${o} \u2014 called by ${r.length} module(s):
17
- ${ut(r,xr,`
18
- `)}`:`${o}: no recorded callers (calls are coarse/import-backed \u2014 absence is not proof). Try ${n}impact for the full reverse closure.`}function Jp(e,t){if(Yp.has(t.class)){let r=[...new Set(ke(e,"callsSymbol").filter(i=>i.subject===t.id).map(i=>i.objectLabel||i.object))];return r.length?`${t.label} \u2014 calls into ${r.length} symbol(s):
19
- ${ut(r,xr,`
17
+ ${ut(r,Er,`
18
+ `)}`:`${o}: no recorded callers (calls are coarse/import-backed \u2014 absence is not proof). Try ${n}impact for the full reverse closure.`}function rf(e,t){if(sf.has(t.class)){let r=[...new Set(ke(e,"callsSymbol").filter(i=>i.subject===t.id).map(i=>i.objectLabel||i.object))];return r.length?`${t.label} \u2014 calls into ${r.length} symbol(s):
19
+ ${ut(r,Er,`
20
20
  `)}`:`${t.label}: no recorded callees (calls only stdlib/external, or fine-grained call edges are not in the extracted graph).`}let n=kn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=[...new Set(ke(e,"calls").filter(r=>r.subject===n).map(r=>r.objectLabel||r.object))];return o.length?`${s} \u2014 calls into ${o.length} module(s):
21
- ${ut(o,xr,`
22
- `)}`:`${s}: no recorded callees.`}function Qp(e,t){let n=e.byId.get(t.object),s=n?_t(n):null;return`${t.objectLabel||n?.label||t.object}${s?` [${s.path}:${s.start}]`:""}`}function xc(e,t){if(!t?.id)return"";let n=ke(e,"callsSymbol").filter(s=>s.subject===t.id);return n.length?`calls in-repo: ${ut(n.map(s=>Qp(e,s)),w$)}`:""}function Zp(e,t){let n=ke(e,"callsSymbol").filter(o=>o.subject===t.id);if(!n.length)return`${t.label} \u2014 ${Gn(t.class)}: no in-repo calls recorded (calls only stdlib/external, or fine-grained call edges are not in the extracted graph).`;let s=n.map(o=>Qp(e,o));return`${t.label} \u2014 ${Gn(t.class)} calls ${n.length} in-repo symbol(s):
23
- ${ut(s,xr,`
24
- `)}`}function ef(e,t,n){let s=e.byId.get(t),o=s?.label||n||t,r=Pe(s,"commitDate")||Pe(s,"date"),i=Pe(s,"commitAuthor")||Pe(s,"author"),a=Pe(s,"commitMessage")||Pe(s,"message"),l=[o,r,i].filter(Boolean).join(" ");return a?`${l} \u2014 ${a}`:l}function tf(e,t){let n=kn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=ke(e,"touches").filter(a=>a.object===n);if(!o.length)return`${s}: no commit history recorded (outside the git-log window or unmodified).`;let r=o.slice(0,zt).map(a=>` ${ef(e,a.subject,a.subjectLabel)}`),i=o.length>zt?`
25
- \u2026+${o.length-zt} more`:"";return`${s}: touched by ${o.length} recent commit(s):
21
+ ${ut(o,Er,`
22
+ `)}`:`${s}: no recorded callees.`}function af(e,t){let n=e.byId.get(t.object),s=n?Rt(n):null;return`${t.objectLabel||n?.label||t.object}${s?` [${s.path}:${s.start}]`:""}`}function _c(e,t){if(!t?.id)return"";let n=ke(e,"callsSymbol").filter(s=>s.subject===t.id);return n.length?`calls in-repo: ${ut(n.map(s=>af(e,s)),Cv)}`:""}function cf(e,t){let n=ke(e,"callsSymbol").filter(o=>o.subject===t.id);if(!n.length)return`${t.label} \u2014 ${Gn(t.class)}: no in-repo calls recorded (calls only stdlib/external, or fine-grained call edges are not in the extracted graph).`;let s=n.map(o=>af(e,o));return`${t.label} \u2014 ${Gn(t.class)} calls ${n.length} in-repo symbol(s):
23
+ ${ut(s,Er,`
24
+ `)}`}function lf(e,t,n){let s=e.byId.get(t),o=s?.label||n||t,r=Me(s,"commitDate")||Me(s,"date"),i=Me(s,"commitAuthor")||Me(s,"author"),a=Me(s,"commitMessage")||Me(s,"message"),l=[o,r,i].filter(Boolean).join(" ");return a?`${l} \u2014 ${a}`:l}function uf(e,t){let n=kn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=ke(e,"touches").filter(a=>a.object===n);if(!o.length)return`${s}: no commit history recorded (outside the git-log window or unmodified).`;let r=o.slice(0,Ut).map(a=>` ${lf(e,a.subject,a.subjectLabel)}`),i=o.length>Ut?`
25
+ \u2026+${o.length-Ut} more`:"";return`${s}: touched by ${o.length} recent commit(s):
26
26
  ${r.join(`
27
- `)}${i}`}function nf(e,t){let n=ke(e,"touchesSymbol").filter(r=>r.object===t.id);if(!n.length)return`${t.label} \u2014 ${Gn(t.class)}: no symbol-level commit history recorded (outside the git-log window, or fine-grained history is not in the extracted graph).`;let s=n.slice(0,zt).map(r=>` ${ef(e,r.subject,r.subjectLabel)}`),o=n.length>zt?`
28
- \u2026+${n.length-zt} more`:"";return`${t.label} \u2014 ${Gn(t.class)}: touched by ${n.length} commit(s):
27
+ `)}${i}`}function df(e,t){let n=ke(e,"touchesSymbol").filter(r=>r.object===t.id);if(!n.length)return`${t.label} \u2014 ${Gn(t.class)}: no symbol-level commit history recorded (outside the git-log window, or fine-grained history is not in the extracted graph).`;let s=n.slice(0,Ut).map(r=>` ${lf(e,r.subject,r.subjectLabel)}`),o=n.length>Ut?`
28
+ \u2026+${n.length-Ut} more`:"";return`${t.label} \u2014 ${Gn(t.class)}: touched by ${n.length} commit(s):
29
29
  ${s.join(`
30
- `)}${o}`}function sf(e,t){return nf(e,t)}function of(e,t){return nf(e,t)}function Ec(e,t,{kind:n,decFilter:s="",nameRe:o=null}={}){let r=rf[n];if(!r)return[];let i=[];for(let a of e.individuals){if((a.class||"")!==r||o&&!o.test(a.label)||s&&!So(a).toLowerCase().includes(s))continue;let l=String(a.label).toLowerCase(),c=t.length?0:1;for(let u of t)l.includes(u)&&(c+=5);t.length&&!c||i.push({ind:a,score:c})}return i.sort((a,l)=>l.score-a.score||String(a.ind.label).length-String(l.ind.label).length),i}function y$(e,t,{limit:n=xi,kind:s,decFilter:o,nameRe:r,toolNamePrefix:i="tmct_"}){if(!rf[s])return`unknown kind "${s}" (use function, class, method, attribute, or module).`;let l=Ec(e,t,{kind:s,decFilter:o,nameRe:r});if(!l.length)return`no ${s} matches the given filters.`;let c=l.slice(0,n),u=[`${l.length} ${s}(s) match (top ${c.length}):`];for(let{ind:d}of c)u.push(`- ${d.label}${$c(_t(d))}`);return u.push(`Then ${i}snippet <name> for the exact body, or ${i}describe for its edges.`),u.join(`
31
- `)}function T$(e){return{paramCount:ki(e?.params),hasReturns:!!e?.returns,hasRaises:!!e?.raises,callees:e?.callees instanceof Set?e.callees:new Set}}function A$(e){if(!e.length)return{paramCount:0,hasReturns:!1,hasRaises:!1,callees:new Set};let t=e.map(i=>ki(i.params)),n=e.filter(i=>!!i.returns).length,s=e.filter(i=>!!i.raises).length,o=new Map;for(let i of e)for(let a of i.callees||[])o.set(a,(o.get(a)||0)+1);let r=new Set([...o.entries()].filter(([,i])=>i>=2).map(([i])=>i));return{paramCount:R$(t),hasReturns:n*2>=e.length,hasRaises:s*2>=e.length,callees:r}}function C$(e,t){if(!t)return 0;let n=Math.max(0,4-Math.abs(ki(e.params)-t.paramCount));!!e.returns===t.hasReturns&&(n+=2),!!e.raises===t.hasRaises&&(n+=2);let s=[...e.callees||[]].filter(o=>t.callees.has(o)).length;return n+Math.min(s,4)*2}function O$(e,{decorators:t="",label:n="",site:s=null}={},o=null){let r=new Map;for(let f of e)for(let p of hc(f.decorators))r.set(p,(r.get(p)||0)+1);let i="",a=1;for(let[f,p]of r)p>a&&(a=p,i=f);let l=new Set(hc(t)),c=l.size?l:new Set(i?[i]:[]),u=new Set(Tp(n)),d=s?.start??null;for(let f of e){let p=hc(f.decorators).some(b=>c.has(b))?1:0,m=Tp(f.label).filter(b=>u.has(b)).length,h=C$(f,o),g=d!=null&&f.site?1/(1+Math.abs(f.site.start-d)):0;f._score=p*1e3+m*50+h+g}return[...e].sort((f,p)=>p._score-f._score||(f.site?.start||0)-(p.site?.start||0))}function jo(e,t){let n=kn(e,t),s=e.byId.get(n)?.label||String(n||"").replace(/^mod:/,""),o=ke(e,"defines").filter(k=>k.subject===n),r=new Map;for(let k of ke(e,"callsSymbol"))r.has(k.subject)||r.set(k.subject,new Set),r.get(k.subject).add(k.object);let i=[],a=[],l=0;for(let k of o){let A=e.byId.get(k.object);if(!A)continue;let P=A.class||"",T=_t(A);P==="GlobalVariable"?(a.push({label:A.label,value:(A.attributes||[]).find(M=>M.key==="value")?.value||"",site:T}),T&&(l=Math.max(l,T.end))):(P==="Function"||P==="Class")&&(i.push({id:A.id,label:A.label,class:P,site:T,decorators:So(A),raises:Pe(A,"raises"),doc:Pe(A,"doc"),params:Pe(A,"params"),returns:Pe(A,"returns"),callees:r.get(A.id)||new Set}),T&&(l=Math.max(l,T.end)))}let c=_t(t),u=c&&(t.class||"")!=="Module"?{id:t.id,label:t.label,class:t.class||"",site:c,decorators:So(t),raises:Pe(t,"raises"),params:Pe(t,"params"),returns:Pe(t,"returns"),callees:r.get(t.id)||new Set}:null,d=i.length,f=u?T$(u):A$(i);i=O$(i,u||{label:t.label},f);let p=u?null:i.find(k=>k.site&&k.label!==t.label)||null,m=[...new Set(ke(e,"tests").filter(k=>k.object===n).map(k=>k.subjectLabel||k.subject))].slice(0,E$),h=uf(e,n).slice(0,x$),g=ke(e,"reexports").filter(k=>k.subject===n).map(k=>k.objectLabel||k.object).slice(0,20),b=Pe(e.byId.get(n),"all"),y=ke(e,"contains"),w=null;(t.class||"")==="Class"?w=t.id:(t.class||"")==="Method"&&(w=y.find(k=>k.object===t.id)?.subject||null);let $=null;if(w){let k=e.byId.get(w),A=y.filter(P=>P.subject===w).map(P=>{let T=e.byId.get(P.object);return{label:P.objectLabel||T?.label||P.object,class:T?.class||"",site:T?_t(T):null,decorators:T?So(T):"",params:T?Pe(T,"params"):"",returns:T?Pe(T,"returns"):"",raises:T?Pe(T,"raises"):""}}).slice(0,$$);$={className:k?.label||String(w).replace(/^fn:.*#/,""),members:A,total:y.filter(P=>P.subject===w).length}}let _=null;for(let k of[...i,...a])k.site&&(!_||k.site.start>_.start)&&(_=k.site);let v=_?{start:_.start,end:_.end}:null,x=u||p,E=x?.id?e.byId.get(x.id):null,S=E?xc(e,E):"",R=[];if(x?.callees)for(let k of x.callees){let A=e.byId.get(k),P=A?_t(A):null;if(P&&R.push({label:A.label,site:P}),R.length>=_$)break}return{modId:n,moduleLabel:s,anchor:u,siblings:i,totalSiblings:d,exemplar:p,globals:a,tests:m,cochange:h,exports:g,allExports:b,classMembers:$,insertion:l,insertionRegion:v,calleeBodies:R,callHint:S,siblingCap:v$}}function Hs(e){let t={anchor:!0,exemplar:!0,registration:!0,insertionRegion:!0,allExports:!0,classMembers:!0,siblings:!0,reexports:!0,tests:!0,cochange:!0,inlinedCallees:!1};return e==="TINY"?{...t,classMembers:!1,siblings:!1,reexports:!1,tests:!1,cochange:!1}:e==="LARGE"||e==="FULL"?{...t,inlinedCallees:!0}:t}function af(e){return{...e,anchor:!1,exemplar:!1,inlinedCallees:!1,classMembers:!1,reexports:!1,tests:!1,cochange:!1,registration:!0,siblings:!0,insertionRegion:!0,allExports:!0}}function ji(e,t,{untuned:n=!1}={}){let s=e.anchor||e.exemplar,o="TINY";if(e.anchor&&e.anchor.site||e.exemplar&&e.exemplar.site||(o="MID"),e.classMembers&&e.classMembers.members&&e.classMembers.members.length&&(o="MID"),s){let i=s.site?s.site.end-s.site.start+1:1/0,a=ki(s.params);(i>S$||a>k$||s.raises)&&(o="MID");let l=!1;if(e.anchor)for(let u of s.callees||[]){let d=t.byId.get(u),f=d?_t(d):null;if(f&&f.path!==e.moduleLabel){l=!0;break}}let c=(e.anchor?.class||"")==="Method"&&Number(e.classMembers?.total||e.classMembers?.members?.length||0)>=j$;(l||c)&&(o="LARGE")}else o="MID";return{tier:o,mask:Hs(o),topup:o!=="TINY"}}function cf(e){let t=[`Additional context for ${e.moduleLabel} (sections omitted from the lean bundle):`];if(e.classMembers&&e.classMembers.members.length){t.push(`
30
+ `)}${o}`}function pf(e,t){return df(e,t)}function ff(e,t){return df(e,t)}function Rc(e,t,{kind:n,decFilter:s="",nameRe:o=null}={}){let r=mf[n];if(!r)return[];let i=[];for(let a of e.individuals){if((a.class||"")!==r||o&&!o.test(a.label)||s&&!Ro(a).toLowerCase().includes(s))continue;let l=String(a.label).toLowerCase(),c=t.length?0:1;for(let u of t)l.includes(u)&&(c+=5);t.length&&!c||i.push({ind:a,score:c})}return i.sort((a,l)=>l.score-a.score||String(a.ind.label).length-String(l.ind.label).length),i}function Ov(e,t,{limit:n=Ri,kind:s,decFilter:o,nameRe:r,toolNamePrefix:i="tmct_"}){if(!mf[s])return`unknown kind "${s}" (use function, class, method, attribute, or module).`;let l=Rc(e,t,{kind:s,decFilter:o,nameRe:r});if(!l.length)return`no ${s} matches the given filters.`;let c=l.slice(0,n),u=[`${l.length} ${s}(s) match (top ${c.length}):`];for(let{ind:d}of c)u.push(`- ${d.label}${jc(Rt(d))}`);return u.push(`Then ${i}snippet <name> for the exact body, or ${i}describe for its edges.`),u.join(`
31
+ `)}function Wv(e){return{paramCount:Ii(e?.params),hasReturns:!!e?.returns,hasRaises:!!e?.raises,callees:e?.callees instanceof Set?e.callees:new Set}}function Gv(e){if(!e.length)return{paramCount:0,hasReturns:!1,hasRaises:!1,callees:new Set};let t=e.map(i=>Ii(i.params)),n=e.filter(i=>!!i.returns).length,s=e.filter(i=>!!i.raises).length,o=new Map;for(let i of e)for(let a of i.callees||[])o.set(a,(o.get(a)||0)+1);let r=new Set([...o.entries()].filter(([,i])=>i>=2).map(([i])=>i));return{paramCount:Bv(t),hasReturns:n*2>=e.length,hasRaises:s*2>=e.length,callees:r}}function qv(e,t){if(!t)return 0;let n=Math.max(0,4-Math.abs(Ii(e.params)-t.paramCount));!!e.returns===t.hasReturns&&(n+=2),!!e.raises===t.hasRaises&&(n+=2);let s=[...e.callees||[]].filter(o=>t.callees.has(o)).length;return n+Math.min(s,4)*2}function Vv(e,{decorators:t="",label:n="",site:s=null}={},o=null){let r=new Map;for(let f of e)for(let p of $c(f.decorators))r.set(p,(r.get(p)||0)+1);let i="",a=1;for(let[f,p]of r)p>a&&(a=p,i=f);let l=new Set($c(t)),c=l.size?l:new Set(i?[i]:[]),u=new Set(Pp(n)),d=s?.start??null;for(let f of e){let p=$c(f.decorators).some(b=>c.has(b))?1:0,m=Pp(f.label).filter(b=>u.has(b)).length,h=qv(f,o),g=d!=null&&f.site?1/(1+Math.abs(f.site.start-d)):0;f._score=p*1e3+m*50+h+g}return[...e].sort((f,p)=>p._score-f._score||(f.site?.start||0)-(p.site?.start||0))}function Ao(e,t){let n=kn(e,t),s=e.byId.get(n)?.label||String(n||"").replace(/^mod:/,""),o=ke(e,"defines").filter(k=>k.subject===n),r=new Map;for(let k of ke(e,"callsSymbol"))r.has(k.subject)||r.set(k.subject,new Set),r.get(k.subject).add(k.object);let i=[],a=[],l=0;for(let k of o){let A=e.byId.get(k.object);if(!A)continue;let M=A.class||"",T=Rt(A);M==="GlobalVariable"?(a.push({label:A.label,value:(A.attributes||[]).find(P=>P.key==="value")?.value||"",site:T}),T&&(l=Math.max(l,T.end))):(M==="Function"||M==="Class")&&(i.push({id:A.id,label:A.label,class:M,site:T,decorators:Ro(A),raises:Me(A,"raises"),doc:Me(A,"doc"),params:Me(A,"params"),returns:Me(A,"returns"),callees:r.get(A.id)||new Set}),T&&(l=Math.max(l,T.end)))}let c=Rt(t),u=c&&(t.class||"")!=="Module"?{id:t.id,label:t.label,class:t.class||"",site:c,decorators:Ro(t),raises:Me(t,"raises"),params:Me(t,"params"),returns:Me(t,"returns"),callees:r.get(t.id)||new Set}:null,d=i.length,f=u?Wv(u):Gv(i);i=Vv(i,u||{label:t.label},f);let p=u?null:i.find(k=>k.site&&k.label!==t.label)||null,m=[...new Set(ke(e,"tests").filter(k=>k.object===n).map(k=>k.subjectLabel||k.subject))].slice(0,Pv),h=wf(e,n).slice(0,Mv),g=ke(e,"reexports").filter(k=>k.subject===n).map(k=>k.objectLabel||k.object).slice(0,20),b=Me(e.byId.get(n),"all"),y=ke(e,"contains"),w=null;(t.class||"")==="Class"?w=t.id:(t.class||"")==="Method"&&(w=y.find(k=>k.object===t.id)?.subject||null);let v=null;if(w){let k=e.byId.get(w),A=y.filter(M=>M.subject===w).map(M=>{let T=e.byId.get(M.object);return{label:M.objectLabel||T?.label||M.object,class:T?.class||"",site:T?Rt(T):null,decorators:T?Ro(T):"",params:T?Me(T,"params"):"",returns:T?Me(T,"returns"):"",raises:T?Me(T,"raises"):""}}).slice(0,Nv);v={className:k?.label||String(w).replace(/^fn:.*#/,""),members:A,total:y.filter(M=>M.subject===w).length}}let _=null;for(let k of[...i,...a])k.site&&(!_||k.site.start>_.start)&&(_=k.site);let $=_?{start:_.start,end:_.end}:null,x=u||p,E=x?.id?e.byId.get(x.id):null,S=E?_c(e,E):"",R=[];if(x?.callees)for(let k of x.callees){let A=e.byId.get(k),M=A?Rt(A):null;if(M&&R.push({label:A.label,site:M}),R.length>=Uv)break}return{modId:n,moduleLabel:s,anchor:u,siblings:i,totalSiblings:d,exemplar:p,globals:a,tests:m,cochange:h,exports:g,allExports:b,classMembers:v,insertion:l,insertionRegion:$,calleeBodies:R,callHint:S,siblingCap:Lv}}function Ks(e){let t={anchor:!0,exemplar:!0,registration:!0,insertionRegion:!0,allExports:!0,classMembers:!0,siblings:!0,reexports:!0,tests:!0,cochange:!0,inlinedCallees:!1};return e==="TINY"?{...t,classMembers:!1,siblings:!1,reexports:!1,tests:!1,cochange:!1}:e==="LARGE"||e==="FULL"?{...t,inlinedCallees:!0}:t}function hf(e){return{...e,anchor:!1,exemplar:!1,inlinedCallees:!1,classMembers:!1,reexports:!1,tests:!1,cochange:!1,registration:!0,siblings:!0,insertionRegion:!0,allExports:!0}}function Ci(e,t,{untuned:n=!1}={}){let s=e.anchor||e.exemplar,o="TINY";if(e.anchor&&e.anchor.site||e.exemplar&&e.exemplar.site||(o="MID"),e.classMembers&&e.classMembers.members&&e.classMembers.members.length&&(o="MID"),s){let i=s.site?s.site.end-s.site.start+1:1/0,a=Ii(s.params);(i>Fv||a>Dv||s.raises)&&(o="MID");let l=!1;if(e.anchor)for(let u of s.callees||[]){let d=t.byId.get(u),f=d?Rt(d):null;if(f&&f.path!==e.moduleLabel){l=!0;break}}let c=(e.anchor?.class||"")==="Method"&&Number(e.classMembers?.total||e.classMembers?.members?.length||0)>=zv;(l||c)&&(o="LARGE")}else o="MID";return{tier:o,mask:Ks(o),topup:o!=="TINY"}}function gf(e){let t=[`Additional context for ${e.moduleLabel} (sections omitted from the lean bundle):`];if(e.classMembers&&e.classMembers.members.length){t.push(`
32
32
  ## members of ${e.classMembers.className}:`);for(let n of e.classMembers.members){let s=String(n.label).split(".").pop(),o=n.params!=null&&n.params!==""?`(${n.params})${n.returns?` -> ${n.returns}`:""}`:"",r=n.decorators?`@${n.decorators} `:"",i=n.raises?` raises=${n.raises}`:"";t.push(` ${n.class} ${s}${n.site?` :${n.site.start}`:""} ${r}${s}${o}${i}`)}}if(e.siblings.length){t.push(`
33
33
  ## sibling symbols (most relevant first; ${e.siblings.length} total):`);for(let n of e.siblings.slice(0,e.siblingCap)){let s=n.decorators?`@${n.decorators} `:"",o=n.raises?` raises=${n.raises}`:"";t.push(` ${n.class} ${n.label}${n.site?` :${n.site.start}`:""} ${s}${o}`)}e.siblings.length>e.siblingCap&&t.push(` \u2026+${e.siblings.length-e.siblingCap} more`)}return e.allExports&&t.push(`
34
34
  ## module __all__: ${e.allExports}`),e.exports&&e.exports.length&&t.push(`
35
35
  ## re-exported symbols: ${e.exports.join(", ")}`),e.tests.length&&t.push(`
36
36
  ## covering tests: ${e.tests.join(", ")}`),e.cochange&&e.cochange.length&&t.push(`
37
37
  ## usually changed together: ${e.cochange.map(n=>`${n.label} (\xD7${n.weight})`).join(", ")}`),t.length===1&&t.push("(no omitted sections \u2014 the lean bundle already contained everything for this symbol.)"),t.join(`
38
- `)}function lf(e,t){let n=[`Edit context for ${e.moduleLabel} (graph-only bundle \u2014 siblings/registration/tests are real graph truth; no source body without a source-capable provider).`];if(t.registration&&e.globals.length){n.push(`
38
+ `)}function bf(e,t){let n=[`Edit context for ${e.moduleLabel} (graph-only bundle \u2014 siblings/registration/tests are real graph truth; no source body without a source-capable provider).`];if(t.registration&&e.globals.length){n.push(`
39
39
  ## registration / module globals (replicate this pattern):`);for(let s of e.globals)n.push(` ${s.label} = ${s.value}${s.site?` [:${s.site.start}]`:""}`)}if(t.classMembers&&e.classMembers&&e.classMembers.members.length){n.push(`
40
40
  ## members of ${e.classMembers.className}:`);for(let s of e.classMembers.members){let o=String(s.label).split(".").pop(),r=s.params!=null&&s.params!==""?`(${s.params})${s.returns?` -> ${s.returns}`:""}`:"",i=s.decorators?`@${s.decorators} `:"",a=s.raises?` raises=${s.raises}`:"";n.push(` ${s.class} ${o}${s.site?` :${s.site.start}`:""} ${i}${o}${r}${a}`)}}if(t.siblings&&e.siblings.length){n.push(`
41
41
  ## sibling symbols to copy the style of (most relevant first; ${e.siblings.length} total):`);for(let s of e.siblings.slice(0,e.siblingCap)){let o=s.decorators?`@${s.decorators} `:"",r=s.raises?` raises=${s.raises}`:"";n.push(` ${s.class} ${s.label}${s.site?` :${s.site.start}`:""} ${o}${r}`)}e.siblings.length>e.siblingCap&&n.push(` \u2026+${e.siblings.length-e.siblingCap} more`)}return t.allExports&&e.allExports&&n.push(`
@@ -45,66 +45,66 @@ ${s.join(`
45
45
  ## insert the new sibling after line ~${e.insertion} (end of the last top-level definition).`)),t.tests&&e.tests.length&&n.push(`
46
46
  ## covering tests: ${e.tests.join(", ")}`),t.cochange&&e.cochange&&e.cochange.length&&n.push(`
47
47
  ## usually changed together (consider editing these too): ${e.cochange.map(s=>`${s.label} (\xD7${s.weight})`).join(", ")}`),n.join(`
48
- `)}function uf(e,t){let n=[];for(let s of ke(e,"cochange"))s.subject===t?n.push({label:s.objectLabel||s.object,weight:s.weight||0}):s.object===t&&n.push({label:s.subjectLabel||s.subject,weight:s.weight||0});return n.sort((s,o)=>o.weight-s.weight)}function df(e,t){let n=kn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=uf(e,n);if(!o.length)return`${s}: no change-coupling recorded (rarely co-committed, or outside the git-log window).`;let r=o.slice(0,gc).map(i=>`${i.label} (\xD7${i.weight})`);return`${s} \u2014 usually changes together with ${o.length} module(s) (edit these too):
48
+ `)}function wf(e,t){let n=[];for(let s of ke(e,"cochange"))s.subject===t?n.push({label:s.objectLabel||s.object,weight:s.weight||0}):s.object===t&&n.push({label:s.subjectLabel||s.subject,weight:s.weight||0});return n.sort((s,o)=>o.weight-s.weight)}function yf(e,t){let n=kn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=wf(e,n);if(!o.length)return`${s}: no change-coupling recorded (rarely co-committed, or outside the git-log window).`;let r=o.slice(0,vc).map(i=>`${i.label} (\xD7${i.weight})`);return`${s} \u2014 usually changes together with ${o.length} module(s) (edit these too):
49
49
  ${r.join(`
50
- `)}`+(o.length>gc?`
51
- \u2026+${o.length-gc} more`:"")}function pf(e,t){let n=kn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=ke(e,"reexports").filter(i=>i.subject===n);if(!o.length)return`${s}: no public exports recorded (no export list / __all__ found, or none resolved).`;let r=o.slice(0,bc).map(i=>{let a=e.byId.get(i.object),l=a?_t(a):null,c=l?` \u2190 ${l.path}`:"";return`${i.objectLabel||i.object}${c}`});return`${s} \u2014 public API (${o.length} export(s)):
50
+ `)}`+(o.length>vc?`
51
+ \u2026+${o.length-vc} more`:"")}function $f(e,t){let n=kn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=ke(e,"reexports").filter(i=>i.subject===n);if(!o.length)return`${s}: no public exports recorded (no export list / __all__ found, or none resolved).`;let r=o.slice(0,xc).map(i=>{let a=e.byId.get(i.object),l=a?Rt(a):null,c=l?` \u2190 ${l.path}`:"";return`${i.objectLabel||i.object}${c}`});return`${s} \u2014 public API (${o.length} export(s)):
52
52
  ${r.join(`
53
- `)}`+(o.length>bc?`
54
- \u2026+${o.length-bc} more`:"")}var bp,Ap,vp,jv,Rv,mc,Tv,xi,Av,Cv,Ov,Ip,Iv,Lv,Nv,Pv,Mv,Fv,Dv,zv,Bv,Uv,Wv,Gv,Hv,Vv,qv,Kv,Yv,Xv,Jv,Qv,Zv,e$,t$,n$,s$,$p,o$,r$,Lp,Np,Pp,i$,a$,c$,l$,u$,Ep,Sp,f$,kp,vi,jp,_p,Rp,xr,Pe,h$,g$,Hp,b$,zt,Yp,w$,rf,v$,$$,x$,E$,S$,k$,j$,_$,hc,Tp,ki,R$,gc,bc,Ie=I(()=>{ls();ps();lc();$r();Gs();bp={"mgx:importsnamespace":"imports","mgx:callscoarse":"calls","seon:declaresmethod":"defines","mgx:testscoverage":"tests","mgx:touchedbycommit":"touches","seon:containscodeentity":"contains","seon:hassupertype":"inherits","mgx:changecoupledwith":"cochange","mgx:reexports":"reexports","mgx:serves":"serves","mgx:denotes":"denotes","mgx:touchessymbol":"touchesSymbol","mgx:callssymbol":"callsSymbol","seon:usescomplextype":"imports","seon:invokesmethod":"calls","seon:history":"touches","mgx:subclassof":"inherits","mg:imports":"imports","mg:calls":"calls","mg:defines":"defines","mg:tests":"tests","mg:touches":"touches","mgx:saidinsession":"saidInSession","mgx:inreplyto":"inReplyTo","mgx:statedby":"statedBy","mgx:canonicalisedfrom":"canonicalisedFrom"};Ap=e=>/^(git|turn):/.test(String(e||""));vp=30,jv=8;Rv=2,mc=25,Tv=3;xi=10,Av=8,Cv=3,Ov=2,Ip=5,Iv=4,Lv=.2,Nv=.35,Pv=.15,Mv=e=>/(^|\/)(examples?|fixtures?|samples?|demos?|benchmarks?|test-[^/]+)(\/|$)/.test(e),Fv=.2,Dv=.35,zv=.2,Bv=.35,Uv=e=>/\.cs$/i.test(e),Wv=e=>/^I[A-Z]/.test(String(e||"")),Gv=.2,Hv=.35,Vv=50,qv=.2,Kv=.35,Yv=.5,Xv=Ip,Jv=3,Qv=4,Zv=1,e$=.9,t$=.5,n$=.2,s$=.35,$p=4,o$=2,r$=[["imports"],["calls","callsSymbol"],["inherits"],["cochange"]],Lp=3,Np=12,Pp=.9,i$=["imports","calls","callsSymbol","inherits"],a$=.5,c$=.6,l$=.2,u$=.35;Ep=128,Sp=4,f$=64,kp=250,vi=class extends Error{};jp=new WeakMap;_p=40,Rp=40,xr=30;Pe=(e,t)=>(e?.attributes||[]).find(n=>n.key===t)?.value||"";h$=25,g$=15;Hp=40,b$="tests edges are recorded module to module, so this is module-grain coverage.";zt=15;Yp=new Set(["Function","Method"]);w$=8;rf={function:"Function",class:"Class",method:"Method",attribute:"Attribute"};v$=8,$$=16,x$=4,E$=6,S$=12,k$=2,j$=8,_$=3,hc=e=>String(e||"").split(",").map(t=>t.trim()).filter(Boolean),Tp=e=>String(e||"").replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean),ki=e=>{let t=String(e||"").trim();return t?t.split(",").map(n=>n.trim()).filter(Boolean).length:0},R$=e=>{let t=new Map,n=e[0]??0,s=0;for(let o of e){let r=(t.get(o)||0)+1;t.set(o,r),r>s&&(s=r,n=o)}return n};gc=20;bc=40});function Je(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function yf(e){let t=String(e||"");return ff&&(t=t.replace(ff," ")),t.replace(/\s+/g," ").trim()}function vf(e){let t=String(e||"");t=t.replace(Y$," ").replace(/\s+/g," ").trim();for(let n=0;n<3;n++){let s=t,o=t.match(V$);if(o&&(t=o[1].trim()),o=t.match(q$),o&&(t=o[1].trim()),o=t.match(mf),o&&(t=o[1].trim()),o=t.match(hf),o&&(t=o[1].trim()),o=t.match(gf),o&&(t=o[1].trim()),o=t.match(K$),o&&(t=o[1].trim()),o=t.match(bf),o&&(t=o[1].trim()),o=t.match(X$),o&&(t=o[1].trim()),o=t.match(J$),o&&fs.test(o[1].trim())&&(t=o[1].trim()),o=t.match(Q$),o&&fs.test(o[1].trim())&&(t=o[1].trim()),o=t.match(Z$),o&&fs.test(o[1].trim())&&(t=o[1].trim()),o=t.match(ex),o&&fs.test(o[1].trim())&&(t=o[1].trim()),o=t.match(tx),o&&fs.test(o[1].trim())&&(t=o[1].trim()),o=t.match(nx),o&&fs.test(o[1].trim())&&(t=o[1].trim()),o=t.match(sx),o&&(t=`what ${o[2].toLowerCase()} ${o[1].trim()}`),o=t.match(ox),o&&(t=`what does ${o[1].trim()} mean`),o=t.match(rx),o){let r=o[1].trim();H$(r)||(t=!ix.test(r)&&(U$.test(r)||fs.test(r))?r:`describe ${r}`)}if(o=t.match(ax),o){let r=o[1].trim();(fs.test(r)||cx.test(r)||bf.test(r)||mf.test(r)||gf.test(r)||hf.test(r)||lx.test(r))&&(t=r)}if(t===s)break}return t}function px(e){let t=String(e||"");for(let n=0;n<3;n++){let s=t,o=t.match(ux);if(o&&(t=o[1].trim()),o=t.match(dx),o&&(t=o[1].trim()),t===s)break}return t}function mx(e){let t=String(e||"");for(let n=0;n<3;n++){let s=t.match(fx);if(!s)break;let o=s[1].trim();if(!o||o===t)break;t=o}return t}function bx(e){let t=String(e||""),n=t.match(gx);if(n){let o=xf[n[1].toLowerCase()],r=$f[n[2].toLowerCase()];return`${o} ${r} ${n[3].trim()} and ${n[4].toLowerCase()}`}let s=t.match(Ef);return s?`which modules transitively import ${s[1].trim()}`:t}function _i(e){return String(e||"").replace(L$,t=>ec[t.toLowerCase()])}function Vs(e){let t=_i(e);return t=t.replace(N$,n=>tc[n.toLowerCase()]),t=t.replace(P$,n=>nc[n.toLowerCase()]),t=t.replace(M$,"with"),t=t.replace(F$,(n,s)=>`${s} for`),t=t.replace(D$,(n,s)=>`for ${s}`),t=t.replace(z$,(n,s)=>s),t=t.replace(wx,"$1$2"),t=t.replace(Bd,"$1ing"),t=vf(t),t=mx(t),t=px(t),t=bx(t),t=yf(t),t=on(t),t=t.replace(/\?{2,}\s*$/,"?"),t.replace(/\s+/g," ").trim()}function Er(e){for(let t of[...Wd,...Ud]){let n=e.match(t.re);if(n)return t.to(n).replace(/\s+/g," ").trim()}return e}function Sc(e){for(let t of yx){let n=e.match(t.re);if(n)return t.to(n).replace(/\s+/g," ").trim()}return e}function Sf(e){let t=String(e||"").match(vx);if(!t)return null;let n=t[1].toLowerCase(),s=t[2].trim();return s?{entWord:n,predicate:s}:null}var I$,L$,wf,N$,P$,M$,F$,D$,z$,B$,ff,U$,fs,W$,G$,H$,V$,q$,mf,hf,gf,K$,Y$,X$,J$,Q$,Z$,ex,tx,nx,sx,ox,rx,ix,ax,cx,lx,bf,ux,dx,fx,$f,xf,hx,gx,Ef,wx,yx,vx,et,Bt,me,jn=I(()=>{Bn();I$=e=>new RegExp("\\b("+Object.keys(e).sort((t,n)=>n.length-t.length).map(Je).join("|")+")\\b","gi"),L$=I$(ec),wf=e=>new RegExp("\\b("+Object.keys(e).sort((t,n)=>n.length-t.length).map(Je).join("|")+")\\b(?!\\.[a-z0-9])","gi"),N$=wf(tc),P$=wf(nc),M$=/(?<=^|\s)w\/(?=\s|$)/gi,F$=/\b(thx|thanks|thank\s+you|many\s+thanks|ty|cheers)\s+4\b/gi,D$=/\b4\s+(example|instance)\b(?!\s*[a-z])/gi,z$=/\b(this|that)\s+(class|module|function|method|attribute|variable|file|commit)\b/gi,B$=Object.keys(de).sort((e,t)=>t.length-e.length).map(Je).join("|"),ff=br.length?new RegExp("\\b("+[...br].sort((e,t)=>t.length-e.length).map(Je).join("|")+")\\b\\s*,?","gi"):null;U$=new RegExp("\\b(?:"+Object.keys(de).sort((e,t)=>t.length-e.length).map(Je).join("|")+")\\b","i"),fs=/^(?:which|what|who|whose|where|when|why|how)\b/i,W$=new Set(["modules","files","packages","functions","methods","classes","attributes","fields","properties","variables","globals","commits","changes","tests","members"]),G$=/^(?:all\s+|the\s+)?(?:module|file|package|function|method|class|attribute|field|property|variable|global|commit|change|test|member)\??$/i,H$=e=>{if(G$.test(e))return!0;let t=e.replace(/\?+\s*$/,"").trim().split(/\s+/);return W$.has((t[t.length-1]||"").toLowerCase())},V$=/^(?:hi|hiya|hello|hey|yo|howdy|g'?day|yeah\s+nah|good\s+(?:morning|afternoon|evening|day)|greetings|salutations)(?:\s+(?:there|pardner|folks|friend|mate))?\s*[,.—–-]\s*(?:(?:just\s+a\s+)?quick\s+question\s*[,:—–-]?\s*)?(.+)$/i,q$=/^(?:thanks|thank\s+you|many\s+thanks|thx|ty|cheers)(?:\s+(?:so\s+much|a\s+lot|very\s+much|a\s+bunch))?\s*[,—–-]\s*(?:(?:just\s+a\s+)?quick\s+question\s*[,:—–-]?\s*)?(.+)$/i,mf=/^(?:(?:ok(?:ay)?|aight|cool|alright|sure|right|fine|great|nice|got it|gotcha|sounds good|no worries|no problem|(?:just\s+)?(?:one|another)\s+more|another\s+one)[\s,]+)+(.+)$/i,hf=/^(?:just\s+(?:poking\s+around|looking\s+around|browsing|exploring|checking\s+(?:this|it)\s+out)|first\s+time\s+(?:trying\s+this\s+out|using\s+this|here)|i'?m\s+new\s+(?:here|around\s+here|to\s+(?:this|all\s+this)(?:\s+(?:repo|codebase|project|app|tool|thing))?))\s*[,.—–-]\s*(.+)$/i,gf=/^(?:(?:maybe|possibly|perhaps)\s+)+(.+)$/i,K$=/^(?:please[\s,]+)+(.+)$/i,Y$=/,?\s*if\s+(?:it'?s|it\s+is|that'?s|that\s+is)\s+not\s+too\s+much\s+(?:trouble|bother|hassle)\s*,?\s*/i,X$=/^(?:can|could|would|will)\s+you\s+(?:please\s+)?(.+?)(?:[,\s]+please)?\??$/i,J$=/^explain\s+(?:to\s+me\s+|please\s+)*(.+?)\??$/i,Q$=/^tell\s+me\s+(?:please\s+)?(.+?)\??$/i,Z$=/^(?:(?:would|do)\s+you\s+)?mind\s+telling\s+(?:me|us)\s+(?:please\s+)?(.+?)\??$/i,ex=/^do\s+you\s+know\s+(.+?)\??$/i,tx=/^i(?:'d|\s+would)?\s+(?:(?:like|want|need)\s+to|wanna)\s+know\s+(.+?)\??$/i,nx=/^i(?:\s+was|\s+am|'m)?\s+(?:just\s+)?(?:wonder(?:ing|ed)?|curious)(?:\s+(?:if|whether|about))?\s+(.+?)\??$/i,sx=/^what\s+((?:an?\s+|the\s+)?[\w'-]+(?:\s+[\w'-]+){0,2})\s+(is|are)\??$/i,ox=/^what\s+((?:an?\s+|the\s+)?[\w'-]+(?:\s+[\w'-]+){0,2})\s+means\??$/i,rx=/^(?:show|give)\s+me\s+(?:the\s+)?(.+?)\??$/i,ix=/^everything\s+i(?:'d|\s+would)?\s+need\b/i,ax=/^(?:and|also|so|then|now|but)\s+(.+)$/i,cx=/^(?:does|do|did|is|are|was|were|has|have|had|can|could|will|would|should)\b/i,lx=/^(?:the|its|their|his|her|our|my)\s+[\w'-]+(?:\s+[\w'-]+){0,2}\s+(?:that|which|who)\s+\S/i,bf=/^(?:(?:actually|no\s+wait|wait|hold\s+on|never\s+mind|scratch\s+that|on\s+second\s+thought|i\s+mean(?:t)?)[\s,.]+)+(.+)$/i;ux=/^(?:since|although|(?:even\s+)?though|while|because|whereas|given\s+that|now\s+that)\s+.+?,\s*(.+)$/i,dx=/^(.+?),\s*(?:since|although|(?:even\s+)?though|while|because|whereas|given\s+that|now\s+that)\s+.+$/i;fx=/^.+?(?:\s*(?:--|—|-)\s*)?\b(?:sorry|i\s+mean)\b\s*(?:--|—|-|,|:)\s*(.+)$/i;$f=Object.freeze({imports:"importing",calls:"calling",touches:"touching",tests:"testing",exports:"exporting",contains:"containing",defines:"defining",uses:"using","inherits from":"inheriting from"}),xf=Object.freeze({module:"modules",class:"classes",function:"functions",method:"methods",attribute:"attributes",variable:"variables",commit:"commits",file:"files"}),hx="public|private|protected|static|abstract|constant|re-?exported|exported|tested|covered|untested|uncovered",gx=new RegExp("^if\\s+(?:a|an|the)?\\s*("+Object.keys(xf).join("|")+")\\s+("+Object.keys($f).join("|")+")\\s+(.+?),\\s*(?:is|are)\\s+(?:it|that|they|this)\\s+("+hx+")\\??$","i"),Ef=/^if\s+(.+?)\s+(?:were|was)\s+(?:deleted|removed),?\s*what\s+(?:would|might|could)\s+(?:break|fail|be\s+affected)\??$/i;wx=new RegExp(`^(where\\s+(?:is|are|was|were)\\s+.+?)\\s+(?:${Qa.map(Je).join("|")})(\\s*[?.!]*)$`,"i");yx=Object.freeze([{re:/^what\s+(?:functions?|methods?|members?|attributes?|fields?|properties)\s+(?:are|is)\s+(?:in|inside|within)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+(?:functions?|methods?|members?|attributes?|fields?|properties)\s+(?:does|do)\s+(.+?)\s+have\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+are\s+(?:the\s+)?(?:functions?|methods?|members?|attributes?|fields?|properties)\s+(?:of|in|inside|within)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^(?:the\s+)?(?:members?|methods?|attributes?|contents)\s+of\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+is\s+(?:in|inside)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+else\s+is\s+(?:in|inside)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+(?:defined|declared)\s+(?:the\s+)?(?:function\s+|method\s+|class\s+|module\s+|variable\s+|constant\s+)?(.+?)\??$/i,to:e=>`where is ${e[1]} defined`},{re:/^where'?s\s+(?:the\s+)?(.+?)\s+(defined|declared|located|implemented)\??$/i,to:e=>`where is ${e[1]} ${e[2]}`},{re:/^were\s+is\s+(?:the\s+)?(.+?)\s+(defined|declared|located|implemented)\??$/i,to:e=>`where is ${e[1]} ${e[2]}`},{re:/^what\s+is\s+the\s+purpose\s+of\s+(?:the\s+)?(?!(?:an?|it|this|that|these|those)\s)(.+?)\??$/i,to:e=>`what is a ${e[1]}`},{re:new RegExp(`^what\\s+does\\s+(?:the\\s+)?(?!(?:an?|it|this|that|these|those)\\s)(.+?)\\s+do\\s+(?:${Za.map(Je).join("|")})\\??$`,"i"),to:e=>`what is a ${e[1]}`},{re:/^(?:which|what)\s+(?:the\s+|all\s+)?([a-z][a-z-]*?)\s+(?:are|is)\s+(public|private|protected|static|abstract|constant|exported|re-?exported|tested|covered|untested|uncovered)\??$/i,to:e=>`${e[2].toLowerCase()} ${e[1].toLowerCase()}`},{re:/^what\s+(?:is|are)\s+(not\s+)?(tested|untested|covered|uncovered)\??$/i,to:e=>{let t=e[2].toLowerCase();return`${e[1]?t==="tested"?"untested":t==="covered"?"uncovered":t:t} modules`}},{re:/^what\s+does\s+(.+?)\s+changes?\s+together\s+with\??$/i,to:e=>`what co-changes with ${e[1]}`},{re:/^what\s+changes?\s+together\s+with\s+(.+?)\??$/i,to:e=>`what co-changes with ${e[1]}`},{re:/^how\s+many\s+commits\s+(?:are|were)\s+(?:recorded|logged)\s+(?:for|against)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`how many commits touched ${e[1]}`},{re:/^who\s+(?:wrote|authored)\s+(?:the\s+)?(?!(?:commit\s+)?[0-9a-f]{7,40}\??$)(.+?)\??$/i,to:e=>`who touched ${e[1]}`},{re:/^who\s+is\s+the\s+authors?\s+of\s+(?:the\s+)?(?!(?:commit\s+)?[0-9a-f]{7,40}\??$)(.+?)\??$/i,to:e=>`who touched ${e[1]}`},{re:/^(?:does|do)\s+(?!.*\bnot\b)(.+?)\s+have\s+(?:any\s+)?(?:tests?|test\s+coverage|coverage)\??$/i,to:e=>`what tests ${e[1]}`},{re:/^(?:is|are)\s+(?!.*\bnot\b)(.+?)\s+tested\??$/i,to:e=>`what tests ${e[1]}`},{re:/^what\s+needs\s+(?:to\s+be\s+)?(?:a\s+)?(?:tested|tests?|testing|coverage|covering)\??$/i,to:()=>"untested modules"},{re:/^(?:which|what|list|show(?:\s+me)?|find)?\s*(?:the\s+|all\s+)?([a-z][a-z-]*?)\s+(?:(?:that|which)\s+)?(?:have|has|having|with)\s+no\s+tests?\??$/i,to:e=>`untested ${e[1].toLowerCase()}`},{re:/^(?:which|what|list|show(?:\s+me)?|find)?\s*(?:the\s+|all\s+)?([a-z][a-z-]*?)\s+without\s+(?:any\s+)?tests?\??$/i,to:e=>`untested ${e[1].toLowerCase()}`},{re:new RegExp(`^(?:do|does)\\s+(.+?)\\s+(${B$})\\s+(?:anything|something)(?:\\s+else)?\\??$`,"i"),to:e=>`what does ${e[1]} ${e[2]}`}]);vx=new RegExp("^(?:which|what|who|list|show(?:\\s+me)?|find|give\\s+me)?\\s*(?:the\\s+|all\\s+)?([a-z][a-z-]*)\\s+(?:(?:that|which|who)\\s+)?(?:(?:do|does|did|are|is|was|were|have|has|can|could|will|would|should)\\s+not|cannot|can't|won't|couldn't|shouldn't|wouldn't|not)\\s+(.+)$","i");et=new Set(["what","who","which","where","when","why","how","does","do","did","is","are","was","were","the","a","an","of","to","from","at","in","on","there","something","anything","nothing","one","any","anywhere","last","usually","typically","generally","normally","often","commonly","mostly","should","would","could","can","will","shall","might","must"]),Bt=e=>String(e).replace(/\?+\s*$/,"").replace(/,/g," ").split(/\s+/).filter(Boolean),me=e=>e.flatMap(t=>String(t).toLowerCase().split(" "))});var jf,kf=I(()=>{jf={source:"corpus/wordnet/*.jsonl lemmas, expanded through the regular -s/-ed/-ing inflections",generator:"scripts/generate-real-word-collisions.mjs",targets:["alongside","build","builds","built","call","calling","calls","change","changed","changes","check","checks","class","co-change","co-changes","code","commits","contain","containing","contains","couple","couples","cover","covers","declare","declares","define","defined","defines","defining","denote","denotes","denoting","depends","derive","derives","directly","edited","execute","executes","exercise","exercises","explicitly","export","exporting","exports","expose","exposes","extend","extending","extends","fire","fires","from","grab","grabs","have","hits","hold","holds","hooked","import","importing","imports","included","indirectly","inherit","inheriting","inherits","inside","into","invoke","invokes","kick","kicks","kind","land","landed","lean","leans","live","lives","make","makes","modified","modifies","move","moves","parent","part","pass","passes","pull","pulls","re-export","re-exports","reference","references","relies","rely","require","requires","runs","serve","serves","serving","share","shares","sits","subclass","subclasses","subclassing","superclass","superclasses","sure","talk","talks","tend","tends","test","testing","tests","through","together","touch","touched","touches","touching","transitively","trigger","triggers","tweaked","updated","uses","using","usually","verifies","verify","went","were","wired","with"],words:["aalging","aasing","aave","ablies","abling","aboves","absing","abuses","abusing","acauling","achinged","acolds","acquire","acquires","acyling","adelies","adenine","adenined","adenines","adenining","adenota","adenotaing","adenotas","aditted","aerides","aerified","aerifies","aerify","aerying","affine","affined","affines","affining","afire","afires","afling","agalling","ailing","aired","airied","airies","airport","airporting","airports","airsed","airses","airted","alaing","alases","albing","alecks","aleves","aliaes","alikes","alines","alive","alives","allaing","allies","alling","alls","allying","alongsided","alongsides","alping","alting","altogether","amasses","amazes","amends","amorting","amorts","amuses","amusing","analling","anded","anoded","ansing","anuses","apart","aparts","apises","apparent","appends","appose","apposes","apsing","apsises","arab","arabis","arabs","ardent","argent","arpent","arrive","arrives","arsing","asaing","asding","aseans","ases","ashing","ashore","ashores","asing","asking","asping","asring","asses","assess","assets","assing","assure","attending","attest","attesting","attests","audited","aufing","auging","auking","aurifies","aurify","avouch","avouched","avouches","avouching","awaked","awakes","awared","awares","awling","awried","axling","baases","badded","bailed","bailing","baited","bake","bakeds","bakers","bakes","balded","balding","baling","balk","balking","balks","ball","balling","balls","ballsing","ballying","balming","band","banded","bandeds","bandied","bandsed","banked","banned","barded","barelies","barely","barses","bart","baseses","bashes","basing","basises","bass","bassed","basses","basset","bassets","bassos","bastes","basting","batses","bauded","baulks","bawded","bawling","bbsing","beaked","bean","beanos","beans","beasting","beasts","beating","beeting","begild","begilds","behave","behold","beholds","belied","belief","beliefs","belies","belikes","belizes","belles","bellies","belling","belting","bend","bended","bends","bent","berging","bering","berking","berming","beroes","besets","besots","besses","bessing","best","besting","bests","beting","betting","bevies","bhanged","biered","bigger","biggers","billing","bind","binded","birded","birled","birles","biroed","birred","bising","bjsing","bladed","blanced","bland","blanda","blandaed","blanded","blands","blanked","blares","blases","blasts","bleaked","bleaks","blears","bleats","blended","blends","blesting","blests","blinded","blinds","blited","blites","bloked","blonded","bmuses","bnsing","boched","boches","boching","bocked","bode","bodilied","bodilies","boiled","boileds","bokked","bold","bolds","bolling","bonded","boners","bonked","boobed","booked","bookeds","bookend","booker","bookied","booksed","boomed","booned","boored","booted","boozed","borers","borough","bosked","bosses","botched","botches","botching","boucheed","bouchees","boucle","boucled","boucling","boughed","boughing","boules","boulle","boulles","bouses","bousing","bowers","boxers","bpsing","bragger","braggers","brakes","branded","brasses","breaked","breves","breving","bricks","brigged","brills","broked","brooked","bruins","brunts","brunus","bses","bsing","bugled","bugles","buhled","builders","buildups","bull","bulled","bullet","bulling","bulls","buns","bunses","bunsing","buried","burieds","burled","burleds","buses","bushes","bushing","busied","busies","busking","bussing","busying","buyied","buying","bypass","bypasses","caballing","cabals","cabbing","cabers","cabged","cabging","cables","cablin","cabling","cablins","caching","cackling","cadded","cadding","cadent","cadged","cadges","cadging","cadring","cafers","caffing","cafing","cagers","caging","cagying","caining","cajoling","cake","cakes","cakiling","caking","calcine","calean","caleans","caleying","caleys","calf","calfing","calfs","califs","calkin","calking","calkins","callaing","callas","callers","callinged","callings","callous","callowing","callows","calluna","callus","calm","calming","calmings","calmlying","calms","calquing","calvaing","calvas","calves","calving","calvings","calx","calxes","calxing","calycling","calyxing","camass","camelling","camels","camming","camoing","camping","canaing","canalling","canals","candid","candied","candled","candling","cangue","cangued","cangues","caning","canning","canoes","canting","cantling","capers","caping","caplin","caplins","capoing","capping","captain","captaining","captains","carded","carding","caring","carking","carlina","carline","carling","carlings","carlos","carning","caroling","carolling","carols","carping","carring","cart","carting","carver","carvers","carves","casaing","cashes","cashing","casking","cassies","castes","castling","casually","casuses","caters","catling","catlings","catses","catsing","catting","cattling","caul","cauline","cauling","caulking","cauls","cavaing","cave","caverns","cavilling","cavils","caving","cavying","cawing","caying","ceases","cecalling","cede","cedied","ceiling","cell","celling","celloing","cellos","cells","cellsing","cent","cercises","cere","cering","cerise","cerises","ceroing","cerring","certain","certaining","certains","certifies","certify","cervina","cervus","cfling","cgsing","chadded","chafed","chaffed","chafinged","chagaed","chagas","chagga","chaggaed","chaggas","chained","chainsed","chainses","chaired","chaise","chaised","chaises","chaited","chaits","chajaed","chalked","chalking","challis","champed","chanal","chanals","chanar","chanars","chance","chanced","chancels","chances","chancied","chancies","chancre","chancred","chancres","chancy","changers","channels","chanted","chanters","chanteys","chantied","chanties","chanty","chaosed","chaoses","chapped","charded","chards","charge","charged","chargers","charges","charied","charmed","charms","charred","charrs","charted","charts","chased","chasmed","chasms","chassed","chaste","chasted","chastes","chatted","chaunaed","chaused","chauses","chawed","cheaps","cheats","checkeds","checkers","checksum","checkups","cheek","cheeks","cheeps","chelas","chenned","cheops","cherts","chesting","chewas","chianed","chick","chicks","chigger","chiggers","chiling","chilling","chills","chinaed","chined","chines","chinked","chinks","chinned","chinoed","chirks","chits","chives","choanaed","chock","chocked","chocks","choked","choker","chokers","choler","cholers","chonned","choosed","chords","chores","chough","chuaned","chuck","chucks","chugged","chunga","chungaed","chungas","chunked","chunks","chyling","cialis","cicers","ciders","circed","circes","cive","cives","civies","cladded","claded","clades","clading","clads","claims","clamps","clams","clamses","clanged","clangers","clanks","clans","claps","clarks","claros","clash","clashes","clasp","clasps","classed","classic","classy","clast","clasts","clausa","clausas","clause","clauses","claver","clavers","clavus","clawing","claws","claying","clays","clean","cleans","cleanse","clerks","clever","clevers","cliing","climes","clinged","cloaks","clocks","closer","closers","closes","cloved","cloven","clovens","clover","clovers","clucks","cluing","clving","clxing","cnsing","coached","coaches","coaching","coaling","coasts","coaxer","coaxers","cobber","cobbers","cobble","cobbles","cocain","cocaining","cocains","cocked","cocker","cockers","cockle","cockles","coda","codaed","codded","coddles","coded","coders","codes","codex","codgers","codified","codifies","codling","cods","coed","coeurs","coffer","coffers","coggle","coggles","coheres","coiling","coiner","coiners","coired","coke","colaing","cold","colded","colding","colds","cole","coleus","coliing","coling","colling","collins","collying","colors","coltan","coltanning","coltans","colter","colters","colting","comalling","combats","comber","combers","come","comer","comers","comfies","comfit","comfits","comics","comints","comity","commas","comments","commes","commie","commied","commies","comming","commit","commix","commixes","commons","commute","commutes","compel","compels","compile","compiles","complies","comply","comport","comporting","comports","conched","conches","conching","concluded","cone","coneys","confer","confers","confining","confits","conged","conger","congers","conges","conjoin","conjoining","conjoins","conked","conker","conkers","constrain","constraining","constrains","contact","contacting","contacts","contadinoing","contadinos","contagion","contagioning","contagions","containeds","containers","contemn","contemning","contemns","continuing","contrail","contrailing","contrails","contriting","contriving","converse","converso","converts","convex","convey","conveys","convoke","convokes","cooked","cookeds","cookers","cookied","cooled","cooler","coolers","cooling","cooned","cooped","cooper","coopers","cooted","cooter","cooters","copalling","cope","copeck","copecks","copier","copiers","copies","copper","coppers","copses","copula","copulas","coralling","corded","core","coreference","coreferences","corer","corers","corked","corker","corkers","corner","corners","corpse","corpses","corvee","corvees","cosecs","cosher","coshers","cosmics","cosmids","cosses","costing","cotanning","cotans","cote","cotter","cotters","couch","couched","couches","couching","coude","couded","coue","coughed","coughing","coupe","coupes","coupleds","couplers","couplets","coupon","coupons","course","courses","couthed","couthing","coved","coven","covens","covereds","coverts","covet","covets","covey","coveys","cower","cowers","cowling","cowpie","cowpies","cozens","cpsing","crab","crabs","cracks","cradling","cragged","crakes","craned","cranes","cranked","cranned","crass","crasses","crawling","crawls","creaked","creaks","credited","creeks","cresting","crests","criers","cringe","cringed","cringes","crocks","crooked","crouch","crouched","crouches","crouching","croupe","croupes","crumple","crumples","cruses","crusing","cses","csing","ctened","ctenes","cubing","cuking","culling","culming","culting","cupalling","cupels","cupsing","cupule","cupules","cure","curing","curling","curses","cursing","curtain","curtaining","curtains","curves","curving","cusking","cusping","cussing","cuting","cutlass","cutses","cutsing","cxling","cxlving","cyanned","cyanoed","cycling","cyders","cymling","cysting","dadded","dahling","dailing","daises","daling","dall","dalliing","dalling","dallis","dalls","dallying","daloing","danced","dander","dandied","dandled","danked","dansed","danses","darded","darling","dart","dashes","dassed","dassies","dative","datives","dayses","ddsing","deafened","deafening","deafing","deaing","dealting","dean","deaned","deaning","deans","dearie","dearies","debate","debates","debating","debiled","debiling","deboned","debrises","debted","decade","decades","decalling","decease","deceases","deceive","deceives","decents","decided","deciding","deciled","deciling","declaim","declaims","declareds","declarers","declaw","declined","declining","decocting","decodes","decoding","decoing","decoke","decokes","decoking","decouple","decouples","decoying","decries","deepens","deface","defaced","defaces","defacing","defame","defamed","defames","defaming","defang","defanged","defanging","defangs","defence","defenced","defences","defencing","defended","defending","defends","defensed","defenses","defensing","deference","deferences","deferenses","defiance","defianced","defiances","defiancing","defiant","defianted","defianting","defiants","defied","defies","defile","defiled","defilers","defiles","defiling","defininged","definings","definited","definites","definiting","deflate","deflates","deftness","defuse","defused","defuses","defusing","deglaze","deglazes","deicing","deified","deifying","deigned","deigning","deisted","deists","deitied","delete","deletes","deleting","delfing","delfting","deliing","delivers","delling","delving","demands","demised","demising","demode","demodes","demoding","demoing","demote","demotes","demoting","dengue","dengues","denguing","denied","denned","denotives","denotiving","densaing","denses","densing","dent","dentate","dentates","dentating","dente","denteds","dentes","dentin","dentined","dentines","denting","dentining","dentins","denude","denudes","denuding","denying","depart","depend","depended","deplane","deplanes","deplore","deplores","deponed","deposing","depotting","deprave","depraves","deprive","depriveds","deprives","depute","deputes","deputing","derating","derbies","deride","derides","deriding","derisive","derisives","deriveds","dermises","derpies","derping","derring","derrises","derving","descends","deserve","deserves","deserving","designed","designing","desired","desiring","desking","desponds","dessing","destined","destines","destining","destiny","detained","detaining","detents","detest","detesting","detests","detinue","detinued","detinues","detinuing","detoxes","detoxing","deuses","deusing","deveined","deveining","deviced","devicing","deviled","devised","devising","devote","devoteds","devotees","devotes","devoting","devouting","dewied","dewiness","dewing","dexoned","dhalling","dholed","dholes","dick","dicks","dieted","digger","diggers","dilling","dining","dinted","dinting","dire","direct","directed","director","directory","directs","dired","dires","dirged","dirges","dirked","disport","disporting","disports","disses","ditaed","ditted","dive","dives","divest","divine","divined","divines","divining","dmuses","docked","doleds","dolling","domine","domined","domines","domining","donate","donates","donating","doobed","doomed","doored","dopeds","dories","dorked","dosing","dosses","doting","double","doubles","douched","douches","douching","doughed","doughing","douses","dousing","dove","doves","dowers","dozers","drab","drabas","drabs","dragger","draggers","drained","draining","drakes","dranged","drecks","drilies","drive","drivels","drivens","drivers","drives","drover","drovers","drunks","druses","drusing","drylies","dses","dsing","dsling","dtsing","ducing","duding","dudses","dudsing","duking","dulies","dull","dulling","dulls","dulses","dulsing","duning","duns","duoing","duping","duples","during","dusking","eagling","earling","earses","easies","easing","easted","easting","eating","eatses","ebitted","ebooked","ebsing","ebving","echted","eclats","ecting","eddaed","eddied","eddoed","edgied","edibled","edicted","editeds","editor","editted","edsing","edtaed","educed","eduled","eelses","eerilies","eerily","eerying","effort","efforting","efforts","efting","egesting","egests","eidoses","eiraed","elan","eland","elanded","elanned","elans","elanus","elated","elegans","elided","elinted","elited","elling","elocute","elocutes","elopses","elsing","eluted","elvers","emending","emiled","emitted","emoted","emoting","emsing","enated","enates","enating","encode","endived","ends","energise","energises","enquire","enquires","ensile","ensure","entendring","ententing","epopses","eposes","equally","equine","equines","eraing","erectly","erging","erning","eroses","erring","ersted","ersting","erudited","erying","escort","escorting","escorts","eses","esing","esports","esportsing","espouse","espouses","esquire","esquires","esting","ests","eternise","eternises","ethoses","evicted","evoked","evokes","exceed","exceeding","exceeds","exchange","exchanged","exchanges","excite","excited","excites","excluded","execrate","execrates","executeds","executive","executives","executors","exegete","exegetes","exercisers","exerciseses","exerting","exerts","exhort","exhorting","exhorts","exiled","existed","exitted","exodes","exorcise","exorcisers","exorcises","exorcism","exorcisms","exorcist","exorcists","exorcize","exorcizes","expand","expanding","expands","expanse","expanses","expats","expatting","expect","expecting","expects","expend","expending","expendings","expends","expense","expenses","expensing","expert","experting","expertise","expertises","experts","expiating","expiring","expiry","expirying","explicit","explicits","explode","explodes","exploit","exploiting","exploits","exploring","expoing","exporters","exportinged","exportings","expos","exposeds","exposing","exposure","exposures","express","exsert","exserting","exserts","extant","extanting","extants","extendeds","extent","extented","extenting","extents","extern","externa","externaing","externas","externed","externing","externus","extort","extorting","extorts","extruding","fabling","fadded","failing","failling","faire","faires","fairies","faited","fake","fakers","fakes","fall","falling","fallings","falls","fallsing","falses","falsing","fanned","farces","fare","fares","fart","fasces","fassed","fasting","fawkes","fcsing","feasting","feasts","feating","fecalling","feeting","feined","feining","feisting","feists","felids","feline","felined","felining","felises","fellies","felling","felting","fend","fended","fends","feres","ferined","fering","ferining","ferning","ferring","fesses","fessing","feting","fetting","fevers","fibers","fibre","fibres","fice","fices","fide","fides","fiends","fierce","fierces","fieries","fieris","fife","fifes","figure","figures","file","filers","files","filets","filles","filling","filses","find","finded","fine","finers","fines","fining","fiords","fireds","firm","firmas","firmers","firms","firmus","firsts","firths","fishes","fisting","fitses","fixe","fixeds","fixers","fixes","fizzes","flakes","flange","flanges","flanked","flanned","flasks","flecks","flicks","fliers","flirts","focalling","fold","folds","folies","folked","fonded","fooded","fooled","footed","forces","fore","fores","forest","forges","forked","form","fortes","fosses","fountain","fountaining","fountains","foyers","fpsing","freaked","frieds","friers","fries","frigged","frog","froms","frores","fros","frsing","fsbing","fshing","full","fulling","fulls","fuming","funded","funs","furies","furzes","fuseds","fusees","fusels","fuses","fusing","fussing","fuzing","fwsing","gabling","gabs","gadded","gaeling","gaited","galaing","galing","gall","galliing","gallina","galling","gallings","gallis","galls","gallus","gand","ganded","gander","gandied","ganked","gaoling","garb","garbs","garded","garment","garnet","gaseses","gashes","gassed","gassies","gatling","gauched","gauches","gauching","gauded","gauling","gausses","gcsing","gean","geans","gelids","gellies","gelling","gelting","genies","genome","genomes","genoming","gent","germing","gerres","gestaing","gestes","gesting","getting","gilling","girded","girled","giroed","gisting","give","givens","gives","gladded","gladed","glanced","gland","glanded","glands","glandsed","glansed","glares","glass","glasses","glassy","gleams","glean","gleans","glides","glises","gofers","gold","golds","gonded","goners","gooded","goofed","gooked","gooned","gooped","goosed","gorals","gouached","gouaches","gouaching","governs","gpsing","graces","grad","grades","grads","graf","grafs","grafts","grails","grains","gram","gramas","gramps","grams","gran","granded","grands","grange","granged","granges","grans","grants","grapes","graphs","grases","grasps","grass","grasses","grassy","gratas","grates","gratis","graves","gravis","gray","grays","grazes","greats","grebes","greylies","greyly","groaks","groans","groats","grouch","grouched","grouches","grouching","groves","grub","grubs","grunts","gruses","gsaing","gsring","guesting","guests","guiing","guild","guilds","guiled","guiles","guilt","guilty","guises","guising","gull","gulling","gulls","guns","guses","gushes","gushing","gussing","gutses","gutsing","guying","gyrans","habits","hacked","hadded","hagged","haicks","haiked","hailing","haired","haje","hakeas","hakes","halals","hale","halfing","haling","hall","halling","halls","halming","haloing","halting","halve","halved","halves","halving","hame","hand","handed","handeds","handel","hander","handied","handled","handsed","hanged","hangers","harded","harems","hares","harked","harold","harolds","hart","harvey","hashes","hassles","hastes","hasting","hate","hats","hauling","haved","haven","havens","haves","hawked","hawses","haze","heating","heave","heaved","heaven","heaver","heaving","hectare","hectares","hefting","heired","heisting","held","helds","helixes","helling","helving","herbes","herbing","herding","here","hering","herming","heroing","herpes","herring","hets","hetting","hexine","hexined","hexines","hexining","hexose","hexoses","hhsing","hiatus","hick","hicked","hicks","hies","hilling","hilts","hind","hinded","hinged","hinges","hins","hints","hips","hire","hired","hirers","hires","hirtas","hiss","hisses","hives","hivs","hoards","hoared","hoaxed","hobbed","hoboed","hocced","hocked","hockey","hodded","hods","hoed","hogged","hoists","hokaed","holcus","holders","holdups","hole","holed","holes","holeys","holism","hollas","hollos","holm","holms","holy","homers","homied","homoed","honied","honked","honker","honkey","honkied","honored","hooches","hooching","hood","hooded","hoodeds","hoods","hooeyed","hoofed","hoofeds","hoofer","hookah","hookeds","hooker","hookeri","hookers","hookied","hookies","hooksed","hookses","hookup","hooped","hoopoed","hoopsed","hooted","hooter","hooved","hooveds","hoovers","hopers","hopied","hopped","hopple","hopples","hopsed","horded","hordes","horned","horsed","hosing","hosted","hosting","hotbed","hots","hotsed","hotted","hounds","houred","housed","houses","housing","hover","hovers","hoyaed","hrts","hses","hsing","hucked","huging","hulked","hull","hulling","hullos","hulls","hunged","hunked","huns","huoned","hushes","hushing","husked","husking","husoing","huts","hyoids","ictalling","idioted","idlies","iising","ileals","illing","images","impact","impacting","impacts","impart","imparting","impartings","imparts","impasses","impends","implore","implores","imploring","impoliting","important","importeds","importeeing","importees","importers","importinged","importings","importune","importuning","imposing","impost","imposting","imposts","improving","impure","impures","impuring","imputing","inbuilt","incise","incite","inclined","inclosed","include","includeds","includes","income","incomes","indied","indirect","indirected","indirects","indite","indited","indole","indoles","inerting","inerts","inference","inferences","infidel","influxed","info","inhabit","inhabits","inhere","inhered","inherent","inherenting","inherents","inheriteds","inheritinged","inheritings","inheritors","inheritting","inhibit","inhibits","initio","inkied","inland","inlanded","inline","inosine","inquire","inquires","insane","insert","inserting","inserts","insided","insider","insiders","insides","insist","insoles","inspire","insted","insting","intake","intakes","intending","interim","interims","intermit","intermits","inti","intied","intoed","intones","intos","intro","intron","intros","intruded","invades","invert","inverting","inverts","invites","invoice","invoices","involve","involves","iodide","ipsing","ired","ires","ironside","irsing","iruses","ises","isiing","ising","island","islanded","isling","isming","isning","isring","itsing","iuding","jailing","jakes","janned","jawses","jean","jeans","jellies","jelling","jerking","jest","jesting","jestings","jests","jetting","jigger","jiggers","jirded","jive","jives","jocked","jokers","jooked","josing","josses","joules","jove","joves","juking","julies","juning","jure","juring","juses","jussing","justes","juting","kailing","kakkes","kalaing","kaliing","kaling","kalkas","karens","karling","kelpies","kelting","kenoing","kepting","keraing","kerbing","kerite","kerited","kerites","kerning","kerring","keynote","keynotes","keynoting","khanned","kianged","kickers","kied","killing","kilned","kina","kinaed","kinda","kindas","kindle","kindly","kinds","kine","kined","king","kinged","kinked","kinks","kinned","kino","kinoed","kins","kiosks","kirk","kirked","kirks","kisses","kith","kleins","klick","klicks","knacks","knocks","knucks","koined","kooked","kookied","kuiing","kvasses","kweeked","kylies","labbed","lacced","lacied","lacked","ladded","ladder","laddied","laded","ladied","ladled","ladling","laed","lagans","lagend","lagended","lagged","lahhed","lahued","laiced","laid","laided","lairded","lake","lakes","lakhed","lallying","lamaed","lambed","lament","lammed","lamnaed","lamped","lanaied","lanated","lanced","lancer","lances","lancet","landaued","landeds","lander","landers","landler","lands","lane","lang","langed","langued","lank","lankaed","lanked","lankied","lanned","lansaed","lanseh","lanset","lapped","lapsed","lapses","lard","larded","larder","larged","laried","larked","larred","lashed","lashes","lassas","lasses","lassies","lassos","lasted","lasting","latent","latest","latesting","latests","lathed","latked","latkes","latsed","latses","latted","lauans","laud","lauded","lauder","laudes","launced","launder","lavaed","laves","lavved","lawsed","lawses","laxaed","lazied","lead","leaded","leaden","leadens","leads","leaf","leafs","leak","leaked","leaks","leal","leals","leaners","leap","leaps","learn","learns","leases","leasting","leaven","leavens","leaving","ledded","lefting","legals","legends","lemnas","lemons","lended","lender","lends","lenifies","lenify","lens","lensed","lent","lented","lentes","lentoing","leon","leones","leons","lerring","lesses","lessing","letting","levants","levees","levels","levited","levving","lewded","lianaed","lianas","liared","libels","libred","lice","lices","lick","licks","lidded","lieded","lieges","lies","life","lifers","lifes","ligand","liganded","ligans","ligers","lignes","like","likeds","likens","likes","limans","lime","limens","limes","limeys","linden","lindied","line","lineds","linens","liners","lines","linged","linied","linked","linoed","linted","liraed","lirred","lises","lisles","listes","listing","lite","liters","lites","lithes","litred","livedos","livens","livers","livias","livids","llanoed","llanos","loached","loaches","loaching","loaded","loan","loans","localling","loched","loches","loching","locked","lode","lohans","loired","lolling","loners","longed","looked","looker","looksed","loomed","looned","looped","loosed","looted","lorded","losers","losing","losses","losting","louched","louches","louching","louded","loughed","loughing","loupes","louses","lousing","louver","louvers","lover","lovers","lowans","lowers","lsding","lubing","lueses","luesing","luging","lull","lulling","lulls","lunaed","lundaed","lunged","lunned","luoing","lure","luring","lushes","lushing","luting","luxing","lynxed","mace","macers","maces","maches","mackems","mackle","mackles","madake","madakes","madded","made","mades","maes","magens","mahoes","maided","mailing","maines","maired","maizes","makers","makeups","mako","makos","male","maleos","males","maliing","maliks","maling","mall","malling","malls","malsing","malting","mameys","mandaed","manded","mane","maneds","manes","manied","manies","mankies","manned","mansed","manxed","manxes","maples","mapling","mare","mares","marges","maries","markeds","markers","markets","marling","mart","martes","masers","mases","maskeds","maskers","mass","massed","masseds","masses","masting","mate","mateds","maters","mates","mateys","mattes","mauling","maunded","maxes","maybes","maze","mazeds","mazers","mazes","mazies","mealies","mean","means","meating","mediaed","mediated","medicied","meeting","meined","meining","melees","melias","melics","melting","mend","mended","mends","menoing","mere","merelies","merely","merges","merging","mering","merited","merles","merling","merring","merses","mersing","mesaing","meshing","mesning","messes","messing","meting","metrifies","metrify","mevving","mick","micks","mike","mikes","milling","mind","minded","minified","minifies","minkes","mire","mired","mires","miried","miries","miroed","mising","misses","misting","mitred","mitres","mlsing","mocked","models","modems","modes","modest","modifieded","modifiered","modifiers","modished","modishes","modisted","modistes","modses","mogens","mohaves","mohses","moired","mojave","mojaves","mold","molds","mole","moles","molest","molles","mollified","mollifies","molling","molvas","mommies","monded","mondes","monels","moneys","monked","monses","montan","montanning","montans","montes","mooched","mooches","mooching","mooded","mooned","moored","moosed","mooses","mooted","mope","mopeds","mopes","more","morels","mores","morses","mortified","mortifies","moses","moseys","moshes","mosting","mote","motels","motes","motets","motiffed","motive","motives","moue","moues","moulds","mountain","mountaining","mountains","mousing","mouthed","mouthing","moveds","movie","movies","moxies","mpsing","mrsing","msbing","mscing","mses","msging","mshing","msing","muanged","muched","muches","muching","muling","mull","mullas","mulling","mulls","mullus","muming","musaing","musding","musers","muses","mushes","mushing","musing","musings","musking","mussing","muting","mutually","myalling","myalls","myopes","nadded","nailing","naives","nakeds","nalline","nanaed","nanced","nand","nanded","nandued","nanned","narded","nashes","nasuses","nauched","nauches","nauching","nave","neating","nemine","nemined","nemines","nemining","nerding","nerve","nerves","nerving","nervus","nervying","nesses","nessing","nest","nesting","nestings","nestling","nests","netting","nevers","neving","newlies","newting","nexted","nexting","nick","nicks","nigger","niggers","nilling","nisied","nisting","nitred","nitres","niveas","nivose","nivoses","nocked","node","noired","noires","nolling","nonuple","nonuples","nooked","nookied","nooksed","nooned","noosed","nosing","notched","notches","notching","notified","notifies","noting","nouses","nousing","nsaing","nscing","nsfing","nsuing","nswing","nuding","nuited","nuking","null","nulling","nulls","nuns","nurses","nursing","nutses","nutsing","nuxing","oakens","oasing","oasises","oasting","oatses","observe","observes","observing","obtain","obtaining","obtains","occluded","oceans","ochers","octalling","octuple","octuples","odisted","ogives","oilies","oising","olds","olefine","olefined","olefines","olefining","oleins","olive","olives","onlies","onto","onuses","opalling","opiated","oppose","opposes","opulus","opuses","oralling","orange","oranged","oranges","oses","osing","otuses","ouring","ousels","outclass","outclasses","outclassing","outdated","outing","outrigger","outriggers","ovalling","over","overs","overts","pacoses","pacs","pact","padded","padres","pads","paduses","paeans","pageant","pageses","paided","pailing","painses","paired","paks","palases","paliing","paling","palling","pallying","palming","palmses","paloing","pals","palsies","pandaed","pander","pangses","panned","pans","pansies","pant","panted","pantses","paps","para","parang","pare","parental","parented","parents","parers","pareve","pari","paries","paring","parises","parity","park","parr","parsec","parsecs","parsed","parsee","parsees","parser","parsers","parses","parted","parti","partis","partly","parts","partses","party","paruses","parvenu","parving","pasches","paso","pasoed","pasos","pasques","passages","passed","passeds","passee","passeed","passees","passel","passels","passer","passers","passims","passives","passkey","passkeys","passu","passued","passus","pasted","pasteds","pastel","pastels","paster","pasters","pastes","pasties","pasting","pastises","pasts","patases","patens","patent","patents","patient","pats","patsies","pauling","paulis","paused","pauses","pausing","pave","pavises","pawling","paws","payees","payment","pays","pbsing","peaked","pean","peans","peated","peating","pecans","pecses","peeves","peeving","pekans","pelling","pelting","pent","percent","perces","percing","pere","periing","pering","perking","perming","perring","pert","peruing","perve","perves","perving","pesoing","pessed","pessing","pest","pesting","pestis","pestling","pestoing","pestos","pests","petited","petrifies","petrify","petting","peyote","peyotes","peyoting","phaged","pharos","pholis","phsing","pick","picks","piered","pigses","pill","pilling","pills","pinses","pinto","pintos","pisces","piss","pissed","pisseds","pisser","pissers","pisses","pistes","pisting","pith","pitses","plaided","planaed","planked","planned","planted","plashes","plated","pleads","pleats","plover","plovers","pmsing","poached","poaches","poaching","pocked","poises","pokers","polers","polies","poll","polling","pollos","polls","pommies","ponded","ponses","pooched","pooches","pooching","pooded","poofed","pooled","pooned","pooped","poored","pooved","pooves","porched","porches","porching","porked","port","portent","posers","poshes","posies","posing","posits","possed","posses","possess","posset","possets","postes","posting","potent","pouch","pouched","pouches","pouching","powers","praises","pranged","prat","prated","preference","preferences","prelims","premies","preses","presses","prexies","pricks","prigged","prises","prom","proses","proves","prunes","prunos","prunus","psaing","psas","pses","psiing","psing","pucing","puking","pula","pulas","pule","pules","puling","pullers","pullets","pulleys","pulling","pulp","pulps","pulsing","puns","pupals","pupated","pupils","pure","purelies","purely","purifies","purify","puring","purl","purls","pursing","puses","pushing","puss","pussed","pusses","pussies","pussing","pyrene","qianged","quaing","quakes","quares","quells","questing","quests","quicks","quiing","quilt","quired","quited","quoing","quolls","rabies","racies","radded","raided","railing","raises","rake","rakes","raling","rallies","rallying","ramies","ranaed","rand","randed","randied","raneed","ranges","ranied","ranked","ranted","rarelies","rarely","rarifies","rarify","rashes","rasing","rassed","rave","ravers","readies","realines","realise","realises","realizes","reallies","really","realties","realty","reaving","rebuild","rebuilds","reburies","recall","recalling","recalls","recces","reccies","recipes","recited","recites","reclines","recode","recommits","recover","recovers","redefine","redefined","redefines","redefining","redlines","reedies","reefies","reeving","referee","referees","referenceds","referent","refine","refined","refiners","refines","refining","refinings","refits","regias","regimes","regius","reined","reining","reited","reiting","rejigs","relaces","relates","relaxes","relay","relics","relict","relicts","relied","relief","reliefs","relieve","relieves","relievo","relievos","relines","relining","relish","relishes","relived","relives","remake","remakes","remise","remises","remiss","remits","remote","remotes","remoting","remove","removes","rend","rended","rends","renins","renises","rent","repands","repens","repents","repine","repined","repining","replay","replied","replies","reply","repose","reposes","requiems","requireds","requite","requites","requote","requotes","reruns","reserve","reserves","reserving","resets","reshes","reshing","reside","resides","resids","resiles","resins","resizes","respire","respires","ressing","rest","resting","restings","rests","retied","reties","reting","retire","retouch","retouched","retouches","retouching","retries","retting","reusing","reverence","reverences","revers","review","reviews","reviles","revise","revises","revive","revoke","revokes","revues","revving","rewire","rewired","rhuses","rick","ricks","rigged","riggeds","rigger","riggers","rilling","rimies","rind","rinded","ringer","ringers","ringside","rising","risses","rive","rives","rivets","roached","roaches","roaching","rocked","rogers","roilies","rolling","rons","rooded","roofed","rooked","rookied","roomed","rooted","ropers","ropies","rosies","rosing","rouble","roubles","roughed","roughing","rounds","rouses","rousing","rove","rover","rovers","roves","rowers","rubens","rubies","rubing","rubins","rubs","rudelies","rudely","ruding","rues","rugger","ruggers","rugs","ruins","rulied","rulies","ruling","ruly","rumens","rums","rune","runes","rung","rungs","runics","runing","runt","runts","runups","ruses","rushes","rushing","rusing","rusking","russing","ruts","saales","saaling","saames","sabling","sabres","sadded","saided","sailing","saints","saises","sake","sakes","salals","saling","salk","salking","salks","salling","sallying","salols","salping","salting","salves","sand","sanded","sander","sandied","sandsed","sanned","sansed","sanses","sapling","sarded","sarding","sariing","sarsing","sashes","sass","sassed","sasses","sassies","sats","saurel","save","savers","saving","scalding","scalds","scaling","scalping","scalps","scalying","scapes","scarce","scarces","scare","scareds","scarers","scares","scarfs","scaries","scarps","scends","schick","schicks","scired","scoked","scolds","scorer","scorers","scores","scoter","scoters","screes","scries","scruple","scruples","scrying","sculling","seaing","sealing","seaming","seaport","seaporting","seaports","seareds","searing","seasing","seaxing","sebaes","sebaing","sebbing","sebing","sebses","sebsing","seccing","secluded","secure","sedans","sedding","sedges","sedging","seeding","seeing","seeking","seeling","seeming","seening","seeping","seering","segoing","segues","seguing","seifing","seiing","seined","seizes","seizing","selfing","selvaing","selvas","semiing","semited","senate","senates","senating","send","sended","sending","sends","sening","senning","senses","sensing","sent","sepping","sequine","sequines","serape","serapes","seraping","seraxes","seraxing","serbing","serene","serenes","serening","serers","seres","serfing","serge","sergers","serges","serging","series","serined","sering","serous","serowing","serows","serpens","serums","servals","servant","servers","services","servicing","serviles","serviling","servinged","servings","servo","servoing","servos","setaing","sets","seuling","sevens","sewing","sewning","sexing","sexpot","sexpots","sexpotting","sexted","sexying","shabus","shade","shadeds","shades","shadies","shafts","shagged","shake","shakens","shakers","shakes","shakies","shakos","shale","shales","shame","shameds","shames","shamus","shanged","shanked","shanks","shanned","shape","shapeds","shapers","shapes","shard","shards","shareds","sharers","shareses","sharias","shark","sharks","sharons","sharp","sharpens","sharpers","sharpie","sharpies","sharps","shart","sharts","shaveds","shavens","shavers","shaves","shaving","shawls","shawms","sheareds","shearers","shearses","sheers","sheiks","shelve","shelves","shelving","sherding","sherds","shines","shinto","shire","shires","shirks","shirrs","shited","shnooked","shocked","shocks","shoeds","shooed","shooked","shooted","shore","shoreas","shores","shorns","shorts","shotes","shover","shovers","shoving","shreds","shrews","shriving","shrove","shroves","shroving","shucks","sibs","sick","sicks","sics","sids","sieving","sifts","sights","silling","silts","sind","sinded","sing","sins","sips","sirced","sircing","sired","sirens","sires","siring","sirred","sirring","sirs","sising","siss","sisses","sitars","site","sites","sitkas","sittas","situ","situs","sitz","sitzes","sixths","skates","skinks","skints","skirts","skits","skiving","skulls","slander","slanted","slates","slaving","sleeve","sleeves","sleeving","slices","slicks","slides","slimes","slits","slivers","slouch","slouched","slouches","slouching","slsing","smalling","smalls","smarms","smarts","smited","smites","smiths","smoked","snare","snarers","snares","snarfs","snarls","sneaked","snicks","snigger","sniggers","snits","snooked","snores","soaked","soaving","sobers","socked","solare","solares","sold","solds","solids","solling","solver","solvers","solving","sooned","sooted","sorbing","sore","sorelies","sorely","soring","sorting","sots","souchong","soughed","soughing","souked","soupies","source","soured","souses","sousing","southed","southing","sowers","spaces","spades","spalling","spanged","spare","sparers","spares","sparge","sparges","sparks","spasms","spated","spates","spazes","speaked","specks","spells","sperming","sphere","spheres","spicks","spills","spinto","spired","spirts","spited","spites","spits","splits","spoked","spooked","spores","sprees","spries","sprigger","spriggers","spring","sprits","sprues","spruing","sprying","spurge","squally","squares","squires","sriing","ssaing","sses","ssing","ssping","ssriing","sssing","sswing","stacks","stages","stalk","stalks","stalling","standed","stands","stanks","stapes","stare","starers","stares","starets","starses","starts","starving","states","staving","steads","steaked","steeds","stenting","sterling","sterning","stetting","sticks","stilts","stints","stoked","stores","stover","stovers","stoving","streaked","string","stringer","stringers","striving","suaving","subclassed","suched","suches","suching","sucre","sucred","sudated","sudses","sudsing","suer","suered","suering","sues","suiing","suing","suited","suites","suits","sullas","summits","sundated","sunglass","sunglasses","sunglassing","suns","superclassed","supergrass","supergrasses","sura","suraed","suraing","surd","surded","surding","sured","surelies","sures","surety","surf","surfed","surfer","surfing","surge","surged","surging","surrey","surveys","suses","sussing","suture","suvving","svring","swages","swales","swards","swarms","swarts","sweared","sweated","swerve","swerves","swerving","swervings","swifts","swined","swiped","swirled","switch","taaling","tables","tabling","tabses","tached","taches","taching","tack","tacks","tacting","tadded","taeling","tagger","taggers","tailing","tajiks","take","takens","takers","takes","tala","talaing","talas","talc","talcing","talcs","tale","talent","tales","taling","talkers","talkies","talking","talksed","talkses","talling","tallying","talons","talus","tandem","tank","tankas","tanked","tanks","tanned","taoses","tapses","tart","tarting","task","tasking","tasks","tassed","tassel","tassels","tasses","tasset","tassets","tassing","tasting","tastings","tastying","tatting","tauting","tawses","tdting","teached","teaches","teaching","teaing","teaked","teaking","tealed","tealing","teamed","teaming","teared","tearing","teased","teases","teasing","teasling","teat","teated","teating","teats","tebets","teccing","teched","teches","tectaing","tectas","tedding","teds","teed","teeing","teeming","teened","teening","teething","teeths","teffing","tegging","teiids","tejuing","tellies","temming","temping","tempting","tempts","tenched","tenches","tenching","tendeds","tenders","tendons","tenens","tenged","tenges","tenging","tenias","tenned","tenning","tennis","tennos","tenons","tenors","tensed","tenseds","tensing","tented","tenthing","tenting","tentings","tenuis","tepids","terces","tereting","terned","terrifies","terrify","teslaing","teslas","testaing","testas","testating","testeds","testeeing","testees","testers","testes","testied","testify","testily","testinged","testings","testis","testying","tether","tething","tetting","tevets","texans","text","texted","textes","texting","textings","texts","thaned","thanked","thanks","thanned","thecas","thefting","thefts","theist","theisting","theists","theres","thesis","thinged","tholed","tholes","thonged","thorough","thoroughs","thought","thrive","thrives","throng","throngs","throughed","throughs","thrush","thuses","ticalling","tick","ticks","tiered","tigers","tilling","tilting","tineds","tinting","tire","tired","tires","tiroed","titred","titres","titting","tnting","toasting","toasts","toeaed","toeses","toesing","togethers","told","tolds","tolling","tommies","tomtits","toneds","toners","tontining","tooled","tooned","tooted","toothed","toothing","tooting","topers","toposes","topple","topples","torch","torched","torches","torching","torting","toshed","toshes","tosked","tosking","tosses","tossing","toters","toting","totting","toucan","toucans","touchers","touchied","touchies","touchinged","touchingly","touchings","touchline","touchy","touchying","tough","toughed","toughens","toughied","toughies","toughing","toughying","touped","toupee","toupeed","touping","toured","touring","tousle","tousled","tousling","touted","towers","tracks","transitive","transitived","transitives","transitivity","treaded","treads","treated","treating","treats","treeds","trekked","trend","trends","trenting","tressing","trestling","triage","triaged","tricker","trickers","tricks","triers","trifler","triflers","trigged","trimer","trimers","trimmer","trimmers","tripper","trippers","trited","triting","troched","troches","troching","trough","troughed","troughing","troughs","troves","truced","truces","trucing","trucked","trucking","trudger","trudgers","trulies","trunks","trusting","trusts","truthed","truthing","trysting","trysts","tsetse","tsetsing","tubing","tucked","tucking","tufting","tugger","tuggers","tuling","tulles","tulling","tumses","tumsing","tuning","tuns","turing","tushed","tutting","tuxing","twanged","tweaks","tweeded","tweeds","tweeped","tweeted","tweeting","tweets","tweezed","twelved","twenty","twerked","twerped","twiced","twigged","twined","twirled","twirped","twisting","twists","twitch","ufoing","uglies","uhfing","uing","ukases","ukasing","ukes","uking","ulls","ulting","umaing","umping","unchanged","unclouded","uncouple","uncouples","uncover","uncovers","undated","undateds","undefined","unding","unedited","unhooked","uniated","uning","united","unkind","unlive","unlives","unmake","unmakes","unmated","unmodified","unqing","unsated","unsees","unsung","unsure","untouched","unusually","unwired","unyoke","unyokes","upbeated","upcasted","update","updates","updrafted","uphold","upholds","uping","upland","uplanded","upsets","upside","uptaked","upvoted","urated","urging","urling","urning","urns","ursine","uruses","usages","usaging","usaing","usas","usbegs","usbeks","uscbing","usdaed","usdaing","used","useds","user","userring","users","ushers","usinged","usings","usmcing","usneas","usning","usns","usps","uspses","uspsing","usss","usssing","usualed","usuals","usurer","utaing","utcing","utes","uting","utning","uubing","uuhing","uuping","uuqing","uuting","uving","uziing","valiing","valing","valling","valses","valsing","valuing","valving","vandaed","vanned","varment","vasing","vassed","vasting","vedisted","vegans","veined","veines","veining","vend","vended","vends","venose","venoses","venosing","vent","veraing","verbified","verbifies","verbify","verbing","verdes","verding","verges","verging","veridis","veridises","veried","verified","verifieds","verifier","verifiers","verited","veritied","verities","verity","verses","versified","versifier","versifiers","versifies","versify","versing","versting","versts","vertes","verve","verves","vervets","verving","verying","vest","vesting","vests","vetting","vianded","vilifies","vilify","vinifies","vinify","virens","vireos","vising","visits","visually","vitrifies","vitrify","vive","vives","vivifies","vivify","vivred","vocalling","vomers","vomits","voters","vouch","vouched","voucheed","vouchees","vouchers","vouches","vouching","vowers","wadded","wadses","waifed","wailed","wailing","wained","waived","waives","wake","wakens","wakers","wakes","waling","walk","walking","walks","wall","walling","wallings","walls","wallying","wand","wanded","wander","wanked","wanned","want","wanted","ware","wared","waried","warmed","warned","warped","warred","warsed","warses","wart","warted","washes","wassed","wastes","wasting","watses","wauling","wave","wavers","wawling","wayses","wbsing","weaked","weaken","wealed","wean","weaned","weans","wearer","weaved","weaves","weaving","weeked","weft","wefting","weirded","weired","wekaed","welling","welt","welting","wended","wends","wens","weres","wering","westing","wests","wetting","whacks","whales","whanged","wharfs","whelks","whiled","whined","whirled","whirred","whists","whites","whits","wholed","wholes","whooped","whored","whores","wick","wicked","wicks","wided","width","widths","wifed","wified","wigged","wilded","wiled","wilied","wilies","willed","willing","wilted","wimped","winced","wind","wined","winged","winied","winked","winned","winoed","wiped","wipeds","wireds","wirer","wiried","wised","wisent","wish","wished","wising","wisped","witch","withal","withe","wither","withes","within","withs","withy","witsed","witted","wive","wived","wives","wizzed","wlanned","wokked","wold","wolds","wonked","wont","wooded","wooers","woofed","wooled","worded","worlds","wormed","worned","worsed","worted","woulds","wove","woves","wraith","wrasses","wreaked","wrecks","wresting","wrests","wricks","wried","wriggler","wrigglers","wringer","wringers","writhe","wswing","wussing","wyrded","xerotes","xmases","yanaed","yanked","yarded","yawling","yawses","yearns","yeasting","yeasts","yelling","yerring","yessing","yetting","yolked","yorked","youthed","youthing","yuling","yuses","yussing","zaired","zaires","zanied","zend","zended","zends","zeroing","zest","zesting","zests","zestying","zeuses","zeusing","zhuanged","zilling","zonked","zoomed","zooted"]}});function Vn(e,t,n){if(e===t)return 0;if(Math.abs(e.length-t.length)>n)return n+1;let s=null,o=Array.from({length:t.length+1},(r,i)=>i);for(let r=1;r<=e.length;r+=1){let i=[r],a=r;for(let l=1;l<=t.length;l+=1){let c=e[r-1]===t[l-1]?0:1,u=Math.min(o[l]+1,i[l-1]+1,o[l-1]+c);r>1&&l>1&&e[r-1]===t[l-2]&&e[r-2]===t[l-1]&&(u=Math.min(u,s[l-2]+c)),i[l]=u,u<a&&(a=u)}if(a>n)return n+1;s=o,o=i}return o[t.length]}function jc(e){return/^[a-z]+$/.test(e)&&!et.has(e)&&!kc.has(e)}function Tf(e){return Sx(e)?null:Ri(e,Rf,qn(e))}function Ri(e,t,n=qn(e)){let s=n+1,o=null,r=!1;for(let i of t){let a=Vn(e,i,Math.min(s,n));a<s?(s=a,o=i,r=!1):a===s&&a<=n&&i!==o&&(r=!0)}return s<=n&&!r?o:null}var xx,qn,kc,_f,Rf,Ex,Sx,_o=I(()=>{Bn();kf();jn();xx=["used"];qn=e=>e.length<=5?1:2,kc=new Set([...Object.keys(de),...Object.keys(Ue),...Object.keys(Qt),...xx].flatMap(e=>e.split(" "))),_f=4,Rf=[...new Set([...Object.keys(de),...Object.keys(Qt)].flatMap(e=>e.split(" ")).filter(e=>e.length>=_f))],Ex=new Set(jf.words),Sx=e=>Ex.has(e)});function Ro(e){for(let t of Rx){let n=e.match(t.re);if(n){let s=t.build(n);if(s)return s}}return null}var Ti,kx,jx,_x,_c,Rx,Af,Ai=I(()=>{Bn();jn();Ti=Object.keys(de).sort((e,t)=>t.length-e.length).map(Je).join("|"),kx=Object.keys(Ue).sort((e,t)=>t.length-e.length).map(Je).join("|"),jx=Object.keys(Qt).sort((e,t)=>t.length-e.length).map(Je).join("|"),_x=Fs.slice().sort((e,t)=>t.length-e.length).map(Je).join("|"),_c=(e,t)=>e==="defines"&&gr.has(t),Rx=[{name:"ask",re:new RegExp(`^(?:does|do|did)\\s+(.+?)\\s+(${Ti})\\s+(.+?)\\??$`,"i"),build:e=>{let t=e[2].toLowerCase(),n=de[t];if(_c(n,t))return null;let s=e[1].trim(),o=e[3].trim();return hr.includes(t)&&([s,o]=[o,s]),{shape:"ask",entityType:null,modifier:"direct",kind:n,subject:s,object:o}}},{name:"reverse",re:new RegExp(`^which\\s+(${kx})\\s+(?:(${jx})\\s+)?(${Ti})\\s+(.+?)\\??$`,"i"),build:e=>{let t=e[3].toLowerCase(),n=de[t];return _c(n,t)?null:{shape:"reverse",entityType:Ue[e[1].toLowerCase()],modifier:e[2]?Qt[e[2].toLowerCase()]:"direct",kind:n,object:e[4].trim()}}},{name:"forward",re:new RegExp(`^what\\s+(?:does|do|did)\\s+(.+?)\\s+(${Ti})\\??$`,"i"),build:e=>{let t=e[2].toLowerCase(),n=de[t];return _c(n,t)?null:{shape:"forward",entityType:null,modifier:"direct",kind:n,object:e[1].trim()}}},{name:"meta-mean",re:new RegExp(`^what\\s+(?:does|do|is|are)\\s+(.+?)\\s+(?:${_x})\\??$`,"i"),build:e=>({shape:"meta",entityType:null,modifier:"direct",kind:"meta",object:e[1].trim()})},{name:"meta-whatis",re:new RegExp("^what\\s+(?:is|are)\\s+(?:(an?|the)\\s+)?(.+?)\\??$","i"),build:e=>{let t=e[1]?e[1].toLowerCase():null,n=on(e[2].trim()),s=!/\s/.test(n);if(t==="the"&&!s||!t&&!Ue[n.toLowerCase()])return null;let o=n.toLowerCase();return t&&t!=="the"&&Dd.some(r=>o===r||o.startsWith(`${r} `))?null:{shape:"meta",entityType:null,modifier:"direct",kind:"meta",object:Ps(n)}}},{name:"mention",re:new RegExp(`^where\\s+(?:is|are|was|were)\\s+(.+?)\\s+(?:${hn.map(Je).join("|")})\\??$`,"i"),build:e=>({shape:"mentions",entityType:null,modifier:"direct",kind:"mentions",object:e[1].trim()})},{name:"where",re:new RegExp(`^where\\s+(?:is|are|was|were)\\s+(.+?)(?:\\s+(?:${Jt.map(Je).join("|")}))?\\??$`,"i"),build:e=>({shape:"where",entityType:null,modifier:"direct",kind:"where",object:e[1].trim()})},{name:"when",re:new RegExp(`^when\\s+(?:did|does|do|was|were|is)\\s+(.+?)\\s+(?:last\\s+)?(${Ti})\\??$`,"i"),build:e=>de[e[2].toLowerCase()]==="touches"?{shape:"when",entityType:null,modifier:"direct",kind:"touches",object:e[1].trim()}:null},{name:"commit-history",re:/^(?:the\s+)?commit\s+history\s+(?:of|for)\s+(.+?)\??$/i,build:e=>({shape:"when",entityType:null,modifier:"direct",kind:"touches",object:e[1].trim()})},{name:"cochange-partners",re:/^co-?change\s+partners\s+(?:of|for|with)\s+(.+?)\??$/i,build:e=>({shape:"reverse",entityType:"Module",modifier:"direct",kind:"cochange",object:e[1].trim()})}];Af={id:"grammar",class:"graph-query",run(e){let t=Ro(e);return t?{strategyId:"grammar",class:"graph-query",candidates:[{parsed:t,confidence:.9}]}:null}}});function Rt(e,t,n=null){let s=Object.keys(t).sort((o,r)=>r.split(" ").length-o.split(" ").length);for(let o of s){let r=o.split(" ");for(let i=0;i<=e.length-r.length;i+=1)if(!(n&&r.some((a,l)=>n.has(i+l)))&&r.every((a,l)=>e[i+l]===a))return{kind:t[o],start:i,end:i+r.length}}return null}function kr(e,t=null){let n=e.replace(/\?+\s*$/,"").replace(/,/g," ").split(/\s+/).filter(Boolean),s=n.map(E=>E.toLowerCase());if(s.includes("where")&&!Rt(s,de)){let E=s.some(k=>hn.includes(k)),S=new Set([...Jt,...hn]),R=n.filter((k,A)=>!et.has(s[A])&&!S.has(s[A])).join(" ").trim();if(R){let k=E?"mentions":"where";return{shape:k,entityType:null,modifier:"direct",kind:k,object:R}}}if(new Set(["has","have","had"]).has(s[0])){let E=s.length;for(;E>1&&(s[E-1]==="ever"||s[E-1]==="been");)E-=1;if((E>1?de[s[E-1]]:null)==="touches"){let R=n.slice(1,E-1).filter((k,A)=>!et.has(s[1+A])).join(" ").trim();if(R)return{shape:"when",entityType:null,modifier:"direct",kind:"touches",object:R}}}let r=s,i=Rt(s,de);if(!i&&t){let E=s.map(S=>{if(!jc(S))return S;let R=t.lemma(S);return kc.has(R)?R:S});i=Rt(E,de),i&&(r=E)}let a=null;if(!i){let E=s.map(S=>S.length>=4&&jc(S)&&Tf(S)||S);if(i=Rt(E,de),i){r=E;let S=s.slice(i.start,i.end).findIndex((k,A)=>k!==E[i.start+A]),R=i.start+Math.max(S,0);a={from:s[R],to:E[R]}}}let l=!1;if(!i)for(let E=0;E<s.length;E+=1){let S=as[s[E]];if(!(S&&s[E]==="used"&&s[E+1]==="for")&&S&&s.slice(0,E).some(R=>Sr.has(R))){i={kind:S,start:E,end:E+1},l=!0;break}}if(!i)return null;!l&&i.end-i.start===1&&as[s[i.start]]&&s.slice(0,i.start).some(E=>Sr.has(E))&&(l=!0);let c=E=>a?{...E,fuzzyVerb:a}:E;if(t&&i.end-i.start===1){let E=i.start,S=s[E-1];if((S==="the"||S==="these"||S==="those")&&s[E+1]==="of"&&t.posTags(n)[E]==="NOUN"){let k=n.slice(E+2).filter((A,P)=>!et.has(s[E+2+P])).join(" ").trim();if(k)return c({shape:"forward",entityType:null,modifier:"direct",kind:i.kind,object:k})}}let u=new Set,d=E=>{if(E)for(let S=E.start;S<E.end;S+=1)u.add(S)};d(i);for(let[E,S]of Object.entries(de)){if(S!==i.kind)continue;let R=E.split(" "),k=i.end;if(R.every((A,P)=>r[k+P]===A)){d({start:k,end:k+R.length});break}}let f=Rt(r,Ue,u);d(f);let p=Rt(r,Qt,u);d(p);let m=(E,S)=>n.slice(E,S).filter((R,k)=>!u.has(E+k)&&!et.has(s[E+k])).join(" ").trim(),h=m(0,i.start),g=m(i.end,n.length);l&&!s.includes("by")&&Cx.has(g.toLowerCase())&&(g="");let b=i.kind,y=f?Ue[r.slice(f.start,f.end).join(" ")]:null,w=p?Qt[r.slice(p.start,p.end).join(" ")]:"direct";if(b==="touches"&&s.includes("when")){let E=h||g;if(E)return c({shape:"when",entityType:null,modifier:"direct",kind:"touches",object:E})}if(b==="touches"&&s.includes("who")&&s.includes("last")){let E=h||g;if(E)return c({shape:"whoLast",entityType:null,modifier:"direct",kind:"touches",object:E})}let $=s.indexOf("by"),_=s.slice(0,i.start).findIndex(E=>Sr.has(E)),v=_>=0,x=v&&_>$;if($>=0&&!u.has($)&&v){let E=(k,A)=>n.slice(k,A).filter((P,T)=>{let M=k+T,B=s[M];return!u.has(M)&&!et.has(B)&&B!=="by"&&!Sr.has(B)&&!Tx.has(B)&&!Ax.has(B)}).join(" ").trim(),[S,R]=x?[E(_+1,n.length),E($+1,_)]:[E(0,$),E($+1,n.length)];if(S&&R)return b==="defines"&&gr.has(r.slice(i.start,i.end).join(" "))?null:c({shape:"ask",entityType:null,modifier:"direct",kind:b,subject:R,object:S});if(R)return c({shape:"forward",entityType:y,modifier:w,kind:b,object:R});if(S)return c({shape:"reverse",entityType:y,modifier:w,kind:b,object:S})}if(l&&$<0&&g&&s[i.start]==="called")return null;if(h&&g){let E=r.slice(i.start,i.end).join(" ");if(b==="defines"&&gr.has(E))return null;let S=h,R=g;return hr.includes(E)&&([S,R]=[R,S]),c({shape:"ask",entityType:null,modifier:"direct",kind:b,subject:S,object:R})}if(g){let E=f&&f.start>=i.end?null:y;return c({shape:"reverse",entityType:E,modifier:w,kind:b,object:g})}if(b==="inherits"&&!h&&f&&f.start===i.end){let E=r.slice(f.start,f.end).join(" ");if(E)return c({shape:"reverse",entityType:null,modifier:w,kind:b,object:E})}if(h&&!g&&v&&i.end-i.start===1&&as[s[i.start]]){if(h.split(/\s+/).length>1)return null;if(b==="touches")return c({shape:"when",entityType:null,modifier:"direct",kind:b,object:h});let E=Sr.has(s[0]);return c({shape:"reverse",entityType:y,modifier:w,kind:b,object:h,...E?{polar:!0}:{}})}return h?c({shape:"forward",entityType:y,modifier:"direct",kind:b,object:h}):null}var Sr,Tx,Ax,Cx,Cf,Ci=I(()=>{Bn();jn();_o();Sr=new Set(["is","are","was","were","be","been","being","get","gets","got"]),Tx=new Set(["which","what","who","whom","whose"]),Ax=new Set(zn.map(e=>e.toLowerCase())),Cx=new Set(["recently","lately","yet","already","ever","again"]);Cf={id:"keyword-spot",class:"graph-query",run(e,t={}){let n=kr(e,t.nlp||null);return n?{strategyId:"keyword-spot",class:"graph-query",candidates:[{parsed:n,confidence:.7}]}:null}}});function Ix(e,t,n){if(!n||typeof n.posTags!="function"||!t.length)return[];let s=new Set(t.map(i=>i.toLowerCase())),o;try{o=n.posTags(e)}catch{return[]}let r=[];for(let i=0;i<e.length;i+=1){let a=e[i],l=a.toLowerCase();!/^[a-z]+$/.test(a)||Of.has(l)||!s.has(l)||o[i]==="VERB"&&r.push(l)}return r}function Lx(e,t=null){let n=Bt(e),s=[],o=[];for(let i of n){let a=i.toLowerCase();/^[a-z]+$/.test(i)&&!Of.has(a)&&(Ox.has(a)||t&&typeof t.isStopWord=="function"&&t.isStopWord(a))?o.push(i):s.push(i)}let r=Ix(n,s,t);return{text:s.join(" "),dropped:o,maybeNoise:r}}var Of,Ox,If,Lf=I(()=>{Bn();jn();Ai();Ci();Of=new Set([...et,...me(Ms),...me(Object.keys(de)),...me(Object.keys(Ue)),...me(Object.keys(Qt)),...me(Object.keys(Xe)),...me(Ds),...me(zs),...me(Object.keys(cs)),...me(Object.keys(En)),...me(Object.keys(go)),...me(zn),...me(wr),...me(Fs),...me(Jt),...me(hn),...me(Dn),...me(Object.keys(wo))]),Ox=new Set([...me(br),...me(pi)]);If={id:"noise-strip",class:"noise-stripped",run(e,t={}){if(Ro(e))return null;let{text:n,dropped:s,maybeNoise:o}=Lx(e,t.nlp||null);if(!s.length||!n)return null;let r=Ro(n)||kr(n,t.nlp||null);if(!r)return null;if(o.length&&(r.shape==="where"||r.shape==="mentions")&&r.object){let i=r.object.split(/\s+/).filter(a=>!o.includes(a.toLowerCase())).join(" ").trim();i&&i!==r.object&&(r.altObject=i)}return{strategyId:"noise-strip",class:"noise-stripped",candidates:[{parsed:r,confidence:.75,note:`noise-stripped to "${n}"`}]}}}});var Nf=I(()=>{});var Oi,Ii=I(()=>{Oi=()=>{}});function Mf(e,t){return e.shape!==t.shape||e.kind!==t.kind?!1:e.shape==="ask"?To(e.subject)===To(t.subject)&&To(e.object)===To(t.object):To(e.object)===To(t.object)}function Rc(e){let t=(e||[]).filter(c=>c&&Array.isArray(c.candidates)&&c.candidates.length);if(!t.length)return null;let n=[];for(let c of t)for(let u of c.candidates)!u||!u.parsed||n.push({parsed:u.parsed,confidence:typeof u.confidence=="number"?u.confidence:.5,note:u.note||null,via:u.via||null,strategyId:c.strategyId,class:c.class});if(n.some(c=>!Ff(c))&&(n=n.filter(c=>!Ff(c))),!n.length)return null;let s=new Map;for(let c of n)s.has(c.class)||s.set(c.class,[]),s.get(c.class).push(c);let o=[];for(let[c,u]of s){let d=[];for(let f of u){let p=d.find(m=>Mf(m.parsed,f.parsed)&&m.via===f.via);if(p){p.agreed+=1,p.confidence=Math.max(p.confidence,f.confidence),Pf(f.parsed)<Pf(p.parsed)&&(p.parsed=f.parsed);continue}d.push({...f,agreed:1})}d.length&&o.push({class:c,candidates:d})}if(!o.length)return null;let r=c=>Math.max(...c.candidates.map(u=>u.confidence)),i=o[0];for(let c of o)r(c)>r(i)&&(i=c);let a=i.candidates.length===1?i.candidates[0].parsed:{ambiguousParse:!0,candidates:i.candidates.map(c=>c.parsed)},l=o.filter(c=>c!==i).map(c=>c.candidates[0]).filter(c=>!i.candidates.some(u=>Mf(u.parsed,c.parsed)));return{class:i.class,parsed:a,winner:i.candidates[0],alternates:l}}function Mx(e){if(!e)return"something else";if(e.ambiguousParse)return"one of several readings";let t=e.object??e.subject??"?";return`${e.kind} "${t}"`}function Df(e,{describe:t=Mx,answerFor:n=null}={}){return(e||[]).map(s=>{let o=s.note||t(s.parsed),r=n&&n(s)||"ask it that way";return`if you mean ${o} then ${r}`})}var To,Nx,Pf,Px,Ff,Tc=I(()=>{To=e=>String(e||"").trim().toLowerCase().replace(/\s+/g," ").replace(/^(?:the|a|an)\s+/,"").replace(/^commit\s+(?=[0-9a-f]{7,40}$)/,""),Nx=/^\s*(?:the|a|an)\s+/i,Pf=e=>[e?.subject,e?.object].filter(t=>Nx.test(String(t||""))).length;Px=new Set(["fuzzy","lemma","spell"]),Ff=e=>Px.has(e.via)});function Li(e){Ac=e}function Ni(){return typeof Ac=="function"?Ac():null}var Ac,Ao=I(()=>{Ac=null});function Uf(e,t={},n=Dx){let s=[];for(let o of n)try{let r=o.run(e,t);r&&typeof r.then!="function"&&s.push(r)}catch{}return s}var Fx,Dx,Wf=I(()=>{jn();Ai();Ci();Lf();Nf();Ii();Tc();Ao();Fx=[...typeof void 0<"u"?[void 0]:[],...typeof void 0<"u"?[void 0]:[]],Dx=[Af,Cf,If,...Fx]});function Co(e){return zx.test(String(e||"").trim())?"an":"a"}function Pi(e){let t=String(e||"").trim();return t&&(/(?:s|x|z|ch|sh)$/.test(t)?`${t}es`:/[^aeiou]y$/.test(t)?`${t.slice(0,-1)}ies`:`${t}s`)}function Oo(e){let t=String(e||"");return t&&t[0].toUpperCase()+t.slice(1)}function jr(e){let t=(e||[]).map(n=>String(n||"").trim()).filter(Boolean);return t.length===0?"":t.length===1?t[0]:t.length===2?`${t[0]} and ${t[1]}`:`${t.slice(0,-1).join(", ")}, and ${t[t.length-1]}`}var zx,Mi=I(()=>{zx=/^[aeiou]/i});var _r,Cc=I(()=>{_r=(e,t,n)=>n});var Om={};Fn(Om,{DYNAMIC_TAIL_OK_RE:()=>rl,applyNegationFrames:()=>Er,ask:()=>bs,classDisplayName:()=>Kn,degreeMetric:()=>Em,metaFallbackEntityAnswer:()=>gm,normalizeQuery:()=>Vs,parseQuery:()=>Cr,parseQueryFull:()=>Vc,render:()=>bn,rephraseHint:()=>Zc,resolveObject:()=>wn,traverse:()=>Ut,worldRelationGraphPayload:()=>IS});function qe(e,t){let n=Gf.get(e);n||(n=new Map,Gf.set(e,n));let s=n.get(t);if(s)return s;let o=[];for(let r of e.relations)if(Hn(r)===t)for(let i of r.edges)o.push(i);return n.set(t,o),o}function Me(e,t){let[n,s]=Mc[e]||["result","results"];return t===1?n:s}function Ir(e,t,n,s={}){return!e||!t.length?[]:[{kind:"set",class:e,label:`${t.length} ${Me(e,t.length)}`,ids:t.map(o=>o.id),attrs:{count:t.length},lane:n,...s}]}function Kn(e){let t=String(e||"");if(typeof Sn=="function"){let n=Sn(t).join(" ");if(n)return n}return t.replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase()}function qs(e){return Ux[e]||e}function qx(e){if(!e?.ambiguousParse||!Array.isArray(e.candidates)||e.candidates.length!==2)return e;let t=e.candidates.find(r=>r?.shape==="meta"),n=e.candidates.find(r=>r!==t);if(!t||!n)return e;let s=String(t.object||"").trim().toLowerCase();if(!s||Vx.has(s))return e;let o=String(n.object||"").trim().toLowerCase();return me(Fs).includes(o)?t:e}function Xx(e,t){if(!e||e.shape!=="where"||e.altObject||!Kx.test(t))return e;let n=di(t),s=di(String(e.object||"")),o=s===e.object?e:{...e,object:s},r=Bt(s);if(r.length<2)return o;let i=r[r.length-1].toLowerCase();if(!/^[a-z][a-z'-]*$/.test(i)||et.has(i)||de[i]||i.endsWith("ing"))return o;let a=Bt(n).map(c=>c.toLowerCase());for(;a.length&&Yx.has(a[a.length-1]);)a.pop();if(a[a.length-1]!==i)return o;let l=r.slice(0,-1).join(" ");return{...e,object:l,altObject:s,verb:i}}function Cr(e,{nlp:t=void 0}={}){return Vc(e,{nlp:t}).parsed}function Vc(e,{nlp:t=void 0}={}){let n=t===void 0?Ni():t,s=String(e||"").trim().replace(/\s+/g," ");if(!s)return{parsed:null,alternates:[],class:null};let o=Sc(Er(Vs(s)));if(!o)return{parsed:null,alternates:[],class:null};let r=Qx(o,n);if(r)return{parsed:r,alternates:[],class:null};let i=Rc(Uf(o,{nlp:n,raw:s}));return i?{parsed:Xx(qx(i.parsed),o),alternates:i.alternates||[],class:i.class||null}:{parsed:null,alternates:[],class:null}}function Dc(e,t){return t.length&&im.has(t[0])?{bw:e.slice(1),blc:t.slice(1)}:{bw:e,blc:t}}function No(e,t){return Ro(e)||kr(e,t)}function Qx(e,t){let n=Bt(e),s=n.map(o=>o.toLowerCase());return wE(n,s)||vE(n,s)||nE(n,s,t)||cm(e,t,0)||$E(n,s,t)||oE(n,s,t)||dE(n,s,t,0)||fE(n,s)||gE(n,s,t)||xE(n,s,t)||kE(n,s,t)||_E(n,s,t,0)||SE(n,s,t,0)||Kc(n,s,t,0)||iE(n,s,t)||eE(n,s)||mm(n,s,t,0)}function eE(e,t){let n=0;Zx.has(t[n])&&(n+=1);let s=Tt(t[n]);if(!s||s.placeholder||!s.entityType)return null;let o=s.entityType;n+=1;let r=m=>m+1<t.length?zd[`${t[m]} ${t[m+1]}`]:void 0,i=r(n);if(!i)return null;let a=n+2,l=-1,c;for(let m=a;m+1<t.length;m+=1){let h=r(m);if(h){l=m,c=h;break}}if(l<0)return null;let u=e.slice(a,l).join(" ").trim(),d=e.slice(l+2).join(" ").trim();if(!u||!d)return null;let f=(m,h)=>m.role==="object"?{shape:"reverse",kind:m.kind,entityType:o,modifier:"direct",object:h}:{shape:"forward",kind:m.kind,modifier:"direct",object:h},p=f(i,u);return p.entityType=o,{node:"boolean",entityType:o,atoms:[{op:"seed",kind:"set",ast:{node:"clause",clause:p}},{op:"intersection",kind:"set",ast:{node:"clause",clause:f(c,d)}}]}}function Di(e,t){return{node:"boolean",entityType:e,atoms:[{op:"seed",kind:"set",ast:{node:"allOfClass",entityType:e}},t]}}function nE(e,t,n){if(!["do","does","did"].includes(t[0])||!tE.has(t[1]))return null;let s=Tt(t[2]);if(!s||s.placeholder||!s.entityType)return null;let o=s.entityType;if(o==="Change")return{node:"miss",reason:`"${t[2]}" isn't an enumerable kind \u2014 a universal check needs a concrete kind (functions, classes, modules, \u2026)`};let r=t[2],i=e.slice(3),a=t.slice(3);if(!i.length)return null;let l=Rt(a,de);if(!l)return{node:"miss",reason:"a universal check needs a known relation verb (import, call, inherit from, test, \u2026)"};let u=i.filter((f,p)=>(p<l.start||p>=l.end)&&!et.has(a[p])&&a[p]!=="from").join(" ").trim();if(!u)return null;let d=Po(`which ${r} ${i.join(" ")}`,n,1);return!d||d.node==="miss"?{node:"miss",reason:d&&d.reason||"the universal clause didn't parse"}:{node:"universal",entityType:o,kind:l.kind,object:u,complement:Di(o,{op:"difference",kind:"set",ast:d})}}function cm(e,t,n=0){let s=Sf(e);if(!s)return null;let o=Tt(s.entWord);if(!o||o.placeholder||!o.entityType)return null;let r=o.entityType;if(r==="Change")return{node:"miss",reason:`"${s.entWord}" isn't an enumerable kind \u2014 a set complement needs a concrete kind (functions, classes, modules, \u2026)`};let i=Bt(s.predicate),a=i.map(d=>d.toLowerCase());if(a.length&&a.every(d=>Xe[d]))return Di(r,{op:"difference",kind:"qual",filters:a});let l=Rt(a,de);if(!l)return{node:"miss",reason:"a negated set query needs a known relation verb (import, call, inherit from, test, \u2026)"};if(!i.filter((d,f)=>(f<l.start||f>=l.end)&&!et.has(a[f])&&a[f]!=="from").length)return Di(r,{op:"difference",kind:"set",ast:{node:"existsEdge",entityType:r,kind:l.kind}});let u=Po(`which ${s.entWord} ${s.predicate}`,t,n+1);return!u||u.node==="miss"?{node:"miss",reason:u&&u.reason||"the negated clause didn't parse"}:Di(r,{op:"difference",kind:"set",ast:u})}function oE(e,t,n){let s=0;for(;s<t.length&&sE.has(t[s]);)s+=1;if(!["do","does","did"].includes(t[s]))return null;s+=1;let o=e.slice(s),r=t.slice(s),i=r.indexOf("not");if(i<0)return null;let a=Rt(r,de);if(!a)return null;let c=o.filter((u,d)=>d!==i&&(d<a.start||d>=a.end)&&r[d]!=="from"&&!et.has(r[d])).join(" ").trim();return c?{node:"forwardComplement",kind:a.kind,subjectTerm:c}:null}function lm(e,t){let n=new Set;for(let s of t)for(let o of qe(e,s)){let r=e.byId.get(o.object);r&&r.class&&n.add(r.class)}return n}function um(e,t){let n=It(t),s=n.filter(r=>!om.has(r)),o=lm(e,s.length?s:n);return o.size===1?[...o][0]:null}function Po(e,t,n){if(n>rm)return{node:"miss",reason:"too deep to resolve"};let s=cm(e,t,n);if(s)return s;let o=Bt(e),r=o.map(c=>c.toLowerCase()),i=Kc(o,r,t,n);if(i)return i;let a=mm(o,r,t,n);if(a)return a;let l=No(e,t);return l?{node:"clause",clause:l}:null}function Kc(e,t,n,s){for(let o=1;o<t.length;o+=1){let r=Dn.includes(t[o]),i=!r&&am(t[o]);if(!r&&!i||r&&o+1>=t.length||!Tt(t[o-1]))continue;let l=e.slice(0,o-1);if(!l.length||l.every(f=>Xe[f.toLowerCase()]))continue;let c=No([...l,Fc].join(" "),n);if(!c||c.shape!=="reverse"&&c.shape!=="forward"||c.modifier&&c.modifier!=="direct")continue;let u=`which ${t[o-1]} ${e.slice(r?o+1:o).join(" ")}`,d=Po(u,n,s+1);return!d||d.node==="miss"?d?{node:"miss",reason:d.reason||"inner clause didn't parse"}:{node:"miss",reason:"inner clause didn't parse"}:{node:c.shape==="reverse"?"reverseSet":"forwardSet",kind:c.kind,entityType:c.entityType,inner:d}}return null}function iE(e,t,n){for(let s=0;s<t.length;s+=1){if(!rE.has(t[s])||t[s-1]==="of")continue;let o=s===t.length-1,r=s+1<t.length&&!!de[t[s+1]];if(!o&&!r)continue;let i=[...e.slice(0,s),Fc,...e.slice(s+1)],a=No(i.join(" "),n);if(!(!a||a.shape!=="reverse"&&a.shape!=="forward")&&a.object===Fc&&!(a.modifier&&a.modifier!=="direct"))return{node:a.shape==="reverse"?"reverseSet":"forwardSet",kind:a.kind,entityType:a.entityType,inner:{node:"prevSet"}}}return null}function dE(e,t,n,s=0){if(t[0]!=="when")return null;let o=1;if(!aE.has(t[o]))return null;o+=1;let r=-1;for(let d=t.length-1;d>=o;d-=1)if(cE.has(t[d])){r=d;break}if(r<0)return null;let i=e.slice(o,r),a=t.slice(o,r);for(;a.length&&lE.has(a[a.length-1]);)i=i.slice(0,-1),a=a.slice(0,-1);for(;a.length&&uE.has(a[0]);)i=i.slice(1),a=a.slice(1);if(!i.length||!a.some(d=>Dn.includes(d)))return null;let l=qc.has(a[0])?i.join(" "):`which ${i.join(" ")}`,c=Po(l,n,s+1);if(!c||c.node==="miss")return c?{node:"miss",reason:c.reason||"the inner set of the temporal query didn't parse"}:{node:"miss",reason:"the inner set of the temporal query didn't parse"};let u=Tt(a[0]);return{node:"temporal",inner:c,entityType:u&&u.entityType||null}}function fE(e,t){if(t[0]!=="what"||t[1]!=="changed")return null;let n=2;if(t[n]==="ever"&&(n+=1),!pE.has(t[n]))return null;let s=t[n],o=e.slice(n+1).join(" ").trim();return o?{node:"commitFilter",op:s,pivotRaw:o}:{node:"miss",reason:`"what changed ${s}" needs a date or commit afterward`}}function hE(e){let t=new Set,n=[];for(let s of e){if(!s||!mE.test(s))continue;let o=s.toLowerCase();t.has(o)||(t.add(o),n.push(s))}return n}function gE(e,t,n){if(t.length===2&&t[0]==="which"&&(t[1]==="ones"||t[1]==="one"))return{node:"anaphora",mode:"list",filter:{type:"all"}};let s=-1,o=!1;for(let d=1;d<t.length;d+=1){if(!wr.includes(t[d]))continue;if(t[d-1]==="of"){s=d,o=!0;break}let f=t.slice(0,d).join(" ");if(d===t.length-1&&(Ds.includes(f)||zs.includes(f))){s=d;break}}if(s<0)return null;let r=(o?t.slice(0,s-1):t.slice(0,s)).join(" "),i=Ds.includes(r)||/^(how many|how much|count|number|quantity|total)\b/.test(r)?"count":"list",a=bE(e.slice(s+1),n);if(a===void 0)return{node:"miss",reason:"the follow-up filter didn't parse"};let l=o?s-1:s,c=hE(e.slice(0,l)),u={node:"anaphora",mode:i,filter:a};return c.length>=2&&(u.candidateTerms=c),u}function bE(e,t){let n=0,s=e.map(a=>a.toLowerCase());for(;n<s.length&&Jx.has(s[n]);)n+=1;let o=e.slice(n),r=s.slice(n);if(!o.length)return{type:"all"};if(r.every(a=>Xe[a]))return{type:"qual",filters:r};if(o.length===1){let a=Tt(r[0]);if(a&&!a.placeholder&&a.entityType)return{type:"entity",entityType:a.entityType}}let i=No(`what ${o.join(" ")}`,t);if(i&&(i.shape==="reverse"||i.shape==="forward")&&i.object)return{type:"clause",clause:i}}function wE(e,t){let n;if(t[0]==="is"&&t[1]==="there")n=2;else if(t[0]==="are"&&t[1]==="there")n=2;else return null;let s=t[n];if(s==="a"||s==="an"||s==="any")n+=1;else return null;let o=n<t.length?Tt(t[n]):null;if(!o||o.placeholder||!o.entityType)return null;let r=o.entityType;n+=1;let i=t.slice(n),a=e.slice(n);if(i.length&&i[i.length-1]==="anywhere"?(i=i.slice(0,-1),a=a.slice(0,-1)):i.length>=2&&i[i.length-2]==="at"&&i[i.length-1]==="all"&&(i=i.slice(0,-2),a=a.slice(0,-2)),!i.length)return{node:"exists",entityType:r,term:null,scopeModule:null};if(i[0]==="called"||i[0]==="named"){if(i.length<2)return{node:"miss",reason:`"${i[0]}" needs a name afterward`};let l=i.indexOf("in",1);if(l>0){let u=a.slice(1,l).join(" ").trim(),d=a.slice(l+1).join(" ").trim();return!u||!d?{node:"miss",reason:'a named existence check needs both a name and a module after "in"'}:{node:"exists",entityType:r,term:u,scopeModule:d}}let c=a.slice(1).join(" ").trim();return c?{node:"exists",entityType:r,term:c,scopeModule:null}:{node:"miss",reason:`"${i[0]}" needs a name afterward`}}if(i[0]==="in"){let l=a.slice(1).join(" ").trim();return l?{node:"exists",entityType:r,term:null,scopeModule:l}:{node:"miss",reason:'"in" needs a module afterward'}}return null}function yE(e,t){if(!t.length)return null;let n=`${e} ${t.join(" ")}`,s=Ps(n).slice(e.length).trim(),o=Bt(s),r=o.findIndex(a=>a.toLowerCase()==="in");if(r<0)return null;let i=o.slice(r+1).join(" ").trim();return i?{scope:i}:{node:"miss",reason:'"in" needs a scope afterward'}}function vE(e,t){if(t[0]!=="is"&&t[0]!=="are"||t[1]==="there")return null;let n=-1,s=!1;for(let c=1;c<t.length;c+=1)if(Xe[t[c]]){n=c,s=t[c-1]==="not";break}if(n<0)return null;let o=t.indexOf("by",n+1);if(o>0&&as[t[n]]){let c=o+1;for(;c<t.length&&(t[c]==="the"||t[c]==="a"||t[c]==="an");)c+=1;let u=t[c];if(u&&!Gd.has(u))return null}let r=yE(t[n],e.slice(n+1));if(r?.node==="miss")return r;let i=1;t[i]==="the"&&(i+=1);let a=s?n-1:n;a>i&&(t[a-1]==="a"||t[a-1]==="an")&&(a-=1);let l=a>i?e.slice(i,a).join(" ").trim():"";return l?{node:"qualCheck",term:l,qualifier:t[n],negated:s,scope:r?.scope||null}:{node:"miss",reason:'"is/are <qualifier>" needs a named thing to check first'}}function $E(e,t,n){if(!["do","does","did","is","are","was","were"].includes(t[0]))return null;let s=t.indexOf("not",1);if(s<0)return null;let o=No(e.filter((r,i)=>i!==s).join(" "),n);return!o||o.shape!=="ask"?null:{...o,negated:!0}}function xE(e,t,n){let s=Ds.find(d=>t.slice(0,d.split(" ").length).join(" ")===d);if(!s)return null;let o=s.split(" ").length;for(;o<t.length&&(t[o]==="the"||t[o]==="a"||t[o]==="all");)o+=1;let r=[];for(;o<t.length&&Xe[t[o]];)r.push(t[o]),o+=1;let i=o<t.length?Tt(t[o]):null;if(!i)return{node:"miss",reason:"count needs a known entity kind (functions, classes, modules, \u2026)"};let a=t[o];o+=1;let l=e.slice(o),c=t.slice(o).some(d=>!et.has(d)&&!dm.has(d)),u;if(c){let d=Po(`which ${a} ${l.join(" ")}`,n,1);if(!d||d.node==="miss")return{node:"miss",reason:"the count restrictor didn't parse"};u=d}else u={node:"allOfClass",entityType:i.entityType};return r.length&&(u={node:"qualifier",filters:r,inner:u}),{node:"count",entityType:i.entityType,base:u}}function SE(e,t,n,s){let o=0,r=!1,i=null;for(let y of pm){let w=y.split(" ");if(t.slice(0,w.length).join(" ")===y){i=y,o=w.length;break}}if(!i)if(t[0]==="what"||t[0]==="which")r=!0,o=1;else return null;for(;o<t.length&&Yc.has(t[o]);)o+=1;let a=[];for(;o<t.length&&Xe[t[o]];)a.push(t[o]),o+=1;let l=o<t.length?Tt(t[o]):null;if(!l||l.placeholder||l.entityType==="Change")return!r&&o<t.length&&o===t.length-1&&/^[a-z]+$/.test(t[o])&&!de[t[o]]&&!zn.includes(t[o])?{node:"miss",reason:`"${t[o]}" isn't a listable kind \u2014 try ${fm}`}:null;let c=l.entityType,u=t[o];o+=1;let d=e.slice(o),f=t.slice(o).some(y=>!et.has(y)&&!dm.has(y)),p=t.slice(o),m=d;(p[0]==="is"||p[0]==="are")&&(p=p.slice(1),m=m.slice(1));let h=r&&EE.has(p[0]);if(r&&(f&&!h||d.length===0))return null;let g,b=!1;if(f){let y=h?m:d,w=Po(`which ${[...a,u,...y].join(" ")}`,n,(s||0)+1);if(!w||w.node==="miss")return{node:"miss",reason:w&&w.reason||"the list filter didn't parse"};g=w,b=!0}else g={node:"allOfClass",entityType:c},a.length&&(g={node:"qualifier",filters:a,inner:g});return{node:"list",entityType:c,base:g,scoped:b}}function kE(e,t,n){let s=null,o=-1;for(let m=0;m<t.length;m+=1){let h=t.slice(m,m+2).join(" ");if(cs[h]){s=cs[h],o=m;break}if(cs[t[m]]){s=cs[t[m]],o=m;break}}if(!s)return null;let r=null,i=null;for(let m=o;m<t.length;m+=1)if(En[t[m]]){r=En[t[m]],i=t[m];break}if(!r){for(let m=o-1;m>=0;m-=1)if(En[t[m]]){r=En[t[m]],i=t[m];break}}let a=t.includes("connected")||t.slice(o,o+2).join(" ")==="most connected"||["largest","biggest","smallest"].includes(t[o]),l=["important","significant","central","key","core","essential","critical","principal"],c=t.some(m=>l.includes(m));!r&&(a||c)&&(r=En.connections,i="connections");let u,d=null;for(let m of t){let h=Tt(m);if(h&&!h.placeholder){u=h.entityType,d=m;break}}if(!d&&(u=i?Hd[i]:void 0,!u))return{node:"miss",reason:"a superlative needs an entity kind (module, class, function, \u2026)"};if(!r)return{node:"miss",reason:"name what to rank by (imports, callers, methods, tests, or connections)"};let f=["needs","need","needing","lacks","lack","lacking","misses","missing"],p=t.some(m=>f.includes(m))?s==="most"?"fewest":"most":s;return{node:"superlative",entityType:u,metric:r,metricNoun:i,extreme:p}}function _E(e,t,n,s){if(t[0]!=="find")return null;let o=1;for(;o<t.length&&Yc.has(t[o]);)o+=1;if(o>=t.length)return null;let r=Tt(t[o]);if(r&&!r.placeholder&&r.entityType!=="Change"&&o+1<t.length&&jE.has(t[o+1])){let a=e.slice(o+2).join(" ").trim();if(a)return{node:"find",entityType:r.entityType,term:a}}let i=Tt(t[t.length-1]);if(i&&!i.placeholder&&i.entityType!=="Change"){let a=e.slice(o,t.length-1).join(" ").trim();if(a)return{node:"find",entityType:i.entityType,term:a}}return t.some(a=>Dn.includes(a))?null:o===t.length-1&&/^[a-z]+$/.test(t[o])&&!de[t[o]]&&!zn.includes(t[o])?{node:"miss",reason:`"${t[o]}" isn't a listable kind \u2014 try ${fm}`}:null}function RE(e,t){if(t[0]!=="find")return null;let n=1;for(;n<t.length&&Yc.has(t[n]);)n+=1;let s=-1;for(let i=n+1;i<t.length;i+=1)if(Dn.includes(t[i])){s=i;break}if(s<0)return null;let o=Tt(t[s-1]);if(!o||o.placeholder||o.entityType==="Change")return null;let r=e.slice(n,s-1).join(" ").trim();return r?{entityType:o.entityType,term:r,relIdx:s}:null}function TE(e,t,n,s,o,r){let{branches:i,ops:a}=zi(n,s),l=null,c=[];for(let u=0;u<i.length;u+=1){let d=i[u],f=d.map(y=>y.toLowerCase()),p=u===0?"intersection":a[u-1],m=Dc(d,f);if(m.blc.length&&m.blc.every(y=>Xe[y])){c.push({op:p,kind:"qual",filters:m.blc});continue}if(f[0]==="of"||f[0]==="in"){c.push({op:p,kind:"set",ast:{node:"membership",entityType:e,term:d.slice(1).join(" ")}});continue}let h=d,g=Rt(f,de);g?l=d.slice(g.start,g.end):l&&(h=[...l,...d]);let b=hm(`${t} ${h.join(" ")}`,o,r);if(!b||b.node==="miss")return{miss:b&&b.reason||"a clause in the combination didn't parse"};c.push({op:p,kind:"set",ast:b})}return{atoms:c}}function mm(e,t,n,s){let o=RE(e,t);if(o){let{entityType:R,term:k,relIdx:A}=o,P=t.slice(A+1),T=e.slice(A+1);if(!P.length)return{node:"miss",reason:`a relative clause needs a predicate after "${t[A]}"`};let M=TE(R,`which ${t[A-1]}`,P,T,n,s+1);if(M.miss)return{node:"miss",reason:M.miss};let B=[{op:"seed",kind:"set",ast:{node:"find",entityType:R,term:k}},...M.atoms];return B.length===1?B[0].ast:{node:"boolean",entityType:R,atoms:B}}let r=0;for(;r<t.length&&qc.has(t[r]);)r+=1;let i=r>0,a=[];for(;r<t.length&&Xe[t[r]];)a.push(t[r]),r+=1;let l=r<t.length?Tt(t[r]):null;if(!l){let R=r+1<t.length?Tt(t[r+1]):null;if(Hf.has(t[r])&&R&&R.entityType==="Commit"&&r+2===t.length)return{node:"recentCommits"};if(im.has(t[r])){let k=r+1;k<t.length&&(t[k]==="the"||t[k]==="a"||t[k]==="an")&&(k+=1);let A=k+1<t.length?Tt(t[k+1]):null;if(Hf.has(t[k])&&A&&A.entityType==="Commit"&&k+2===t.length)return{node:"recentCommits"}}return(i||a.length)&&R&&/^[a-z]+$/.test(t[r])&&!de[t[r]]&&!et.has(t[r])&&!sl.has(t[r])?{node:"find",entityType:R.entityType,term:e[r]}:null}let c=l.entityType,u=t[r];r+=1;let d=t.slice(r),f=e.slice(r),p=!1;d.length&&Dn.includes(d[0])&&(p=!0,d=d.slice(1),f=f.slice(1));let m=d[0]==="of"||d[0]==="in",h=d.length>0&&am(d[0]),g=f.length>0&&zi(d,f).branches.some(R=>{let{blc:k}=Dc(R,R.map(A=>A.toLowerCase()));return k.length&&k.every(A=>Xe[A])}),b=f.length>0?zi(d,f).branches:[],y=!1;if(b.length>1){let R=b[0].map(A=>A.toLowerCase()),k=Rt(R,de);k&&k.start===0&&(y=b.slice(1).every(A=>{let P=A.map(M=>M.toLowerCase()),T=Rt(P,de);return T&&T.start===0?T.kind===k.kind:!T}))}let w=!1;if(b.length>1){let R=b[0].map(A=>A.toLowerCase()),k=Rt(R,de);k&&k.start===0&&(w=b.slice(1).every(A=>{let P=A.map(M=>M.toLowerCase()),T=Rt(P,de);return!!T&&T.start===0&&T.end-T.start===1}))}if(!(a.length||p||m||h||g||y||w))return null;if(!f.length){let R={node:"allOfClass",entityType:c};return a.length?{node:"qualifier",filters:a,inner:R,entityType:c}:{node:"miss",reason:"nothing to filter or traverse"}}let $=l.placeholder?"what":`which ${u}`,{branches:_,ops:v}=zi(d,f),x=null,E=[];for(let R=0;R<_.length;R+=1){let k=_[R],A=k.map(J=>J.toLowerCase()),P=R===0?"seed":v[R-1],T=Dc(k,A);if(T.blc.length&&T.blc.every(J=>Xe[J])){E.push({op:P,kind:"qual",filters:T.blc});continue}if(A[0]==="of"||A[0]==="in"){E.push({op:P,kind:"set",ast:{node:"membership",entityType:c,term:k.slice(1).join(" ")}});continue}let M=k,B=Rt(A,de);B?x=k.slice(B.start,B.end):x&&(M=[...x,...k]);let Z=hm(`${$} ${M.join(" ")}`,n,s+1);if(!Z||Z.node==="miss")return{node:"miss",reason:Z&&Z.reason||"a clause in the combination didn't parse"};E.push({op:P,kind:"set",ast:Z})}if(E[0].kind!=="set")return{node:"miss",reason:"start with a clause, then combine with and/or/but-not"};let S;return E.length===1?S=E[0].ast:S={node:"boolean",entityType:c,atoms:E},a.length&&(S={node:"qualifier",filters:a,inner:S,entityType:c}),S}function hm(e,t,n){if(n>rm)return{node:"miss",reason:"too deep to resolve"};let s=Bt(e),o=s.map(a=>a.toLowerCase()),r=Kc(s,o,t,n);if(r)return r;let i=No(e,t);return i?{node:"clause",clause:i}:null}function zi(e,t){let n=Object.keys(go).sort((a,l)=>l.split(" ").length-a.split(" ").length),s=[],o=[],r=0,i=0;for(;i<e.length;){let a=null;for(let l of n){let c=l.split(" ");if(e.slice(i,i+c.length).join(" ")===l){a={c:l,len:c.length};break}}a&&i>r?(s.push(t.slice(r,i)),o.push(go[a.c]),i+=a.len,r=i):a?(i+=a.len,r=i):i+=1}return s.push(t.slice(r)),{branches:s,ops:o}}function Xc(e,t,n,s){let o=Io[t];if(o&&gs.has(n)){let u=qe(e,o).filter(d=>s.has(d.object));return Xn(u.map(d=>e.byId.get(d.subject)).filter(d=>d&&d.class===n))}let a=(!!o&&[...s].some(u=>gs.has(e.byId.get(u)?.class))?[...It(t),o]:It(t)).flatMap(u=>qe(e,u)).filter(u=>s.has(u.object)),l=Xn(a.map(u=>e.byId.get(u.subject)).filter(Boolean));if(!n||n==="Change")return l;let c=l.filter(u=>u.class===n);return c.length?c:n!=="Module"&&l.some(u=>u.class==="Module")?el(e,new Set(l.filter(u=>u.class==="Module").map(u=>u.id)),n):[]}function CE(e,t){let n=new Set(Xc(e,"touches","Commit",t).map(s=>String(s.label||"").toLowerCase()));for(let s of t)for(let o of e.byId.get(s)?.derived_from||[]){let r=AE.exec(String(o||""));r&&n.add(r[1].toLowerCase())}return n.size}function Ar(e,t,n){let s=It(t).flatMap(o=>qe(e,o)).filter(o=>n.has(o.subject));return Xn(s.map(o=>e.byId.get(o.object)).filter(Boolean))}function Xn(e){let t=new Set,n=[];for(let s of e)s&&!t.has(s.id)&&(t.add(s.id),n.push(s));return n}function OE(e,t){let n=Wn(t);if(!n)return[];let s=`${n}/`;return e.individuals.filter(o=>o.class==="Module"&&Wn(o.label).startsWith(s))}function zc(e){let t=Vf.get(e);if(t)return t;let n=new Set;for(let i of qe(e,"reexports")){n.add(String(i.object).toLowerCase());let a=e.byId.get(i.object);a&&n.add(String(a.label).toLowerCase())}let s=new Set,o=new Set;for(let i of qe(e,"tests"))s.add(i.object),o.add(i.subject);let r=new Map;for(let i of qe(e,"defines"))r.set(i.object,i.subject);return t={exported:n,testedModules:s,testModules:o,moduleOfSymbol:r},Vf.set(e,t),t}function Lo(e,t){return t?t.class==="Module"?t.id:zc(e).moduleOfSymbol.get(t.id)||null:null}function gm(e,t){let n=String(t||"").trim().toLowerCase();if(!n)return null;let s=(e?.individuals||[]).filter(d=>IE.has(d.class)&&String(d.label).toLowerCase()===n);if(s.length!==1)return null;let o=s[0],r=Lo(e,o),i=r&&e.byId.get(r)?.label||String((o.attributes||[]).find(d=>d.key==="site")?.value||"").split(":")[0]||null,a=Me(o.class,1),l=a==="attribute"?"an":"a",c=i?`, ${_r("defined-in",o.id,"defined in")} ${i}`:"",u=o.class==="Class"?` or "which classes inherit from ${o.label}"`:"";return{text:`${o.label} is ${l} ${a} in this codebase${c} \u2014 try "describe ${o.label}"${u}.`,hit:o,modLabel:i}}function Bc(e,t,n){let s=Xn(bo.flatMap(o=>Ar(e,o,new Set([t]))));return n?s.filter(o=>o.class===n):s}function Jc(e,t,n=null){let s=Yn(e,t,n);if(!(s.match&&s.tier===1)){let o=OE(e,t);if(o.length)return{kind:"dir",mods:o}}return s.match?{kind:"single",id:s.match.id,entityClass:s.match.class,label:s.match.label}:{kind:"miss"}}function bm(e,t,n,s,o){let r=o||(()=>!0),i=Bc(e,t,s).filter(r);if(i.length||!ym(e,n))return{own:i,inherited:[],viaId:null,viaLabel:null};for(let a of wm(e,t)){let l=e.byId.get(a);if(!l)continue;let c=Bc(e,a,s).filter(r);if(c.length)return{own:i,inherited:c,viaId:a,viaLabel:l.label}}return{own:i,inherited:[],viaId:null,viaLabel:null}}function Ks(e,t,n){if(!n)return!1;switch(n.via){case"visibility":return String((t.attributes||[]).find(o=>o.key==="visibility")?.value||"public").toLowerCase()===n.value;case"attr":return!!(t.attributes||[]).find(s=>s.key===n.attr)?.value;case"exported":{let s=zc(e).exported;return s.has(String(t.label).toLowerCase())||s.has(String(t.id).toLowerCase())}case"tested":{let s=Lo(e,t),o=zc(e),r=s?e.byId?.get?.(s):null;return s&&(o.testModules.has(s)||r&&Ws(String(r.label).toLowerCase()))?!1:(!!s&&o.testedModules.has(s))===n.value}default:return!1}}function Qc(e){return qe(e,"inherits")}function Uc(e,t){return Qc(e).filter(n=>n.object===t).map(n=>n.subject)}function qf(e,t){return Qc(e).filter(n=>n.subject===t).map(n=>n.object)}function LE(e,t){let n=new Set,s=[...Uc(e,t)];for(;s.length;){let o=s.shift();if(!n.has(o)){n.add(o);for(let r of Uc(e,o))n.has(r)||s.push(r)}}return n}function wm(e,t){let n=new Set,s=[...qf(e,t)];for(;s.length;){let o=s.shift();if(!n.has(o)){n.add(o);for(let r of qf(e,o))n.has(r)||s.push(r)}}return n}function ym(e,t){let n=Kf.get(e);if(n||(n=new Map,Kf.set(e,n)),n.has(t))return n.get(t);let s=Qc(e).some(o=>{let r=e.byId.get(o.subject),i=e.byId.get(o.object);return!!r&&!!i&&r.class===t&&i.class===t});return n.set(t,s),s}function Yf(e,t){let n=String(e.label||"").toLowerCase();if(t.every(o=>n.includes(o)))return"label";let s=(e.attributes||[]).map(o=>String(o.value??"").toLowerCase());return t.every(o=>s.some(r=>r.includes(o)))?"attr":null}function Jf(e){return e.slice().sort((t,n)=>Xf[n.via]-Xf[t.via]||String(t.ind.label).length-String(n.ind.label).length).map(t=>t.ind)}function Qf(e,t){let n=String(t||"").trim().toLowerCase();if(n.length<4)return!1;let s=qn(n);if(Vn(String(e.label||"").toLowerCase(),n,s)<=s)return!0;for(let o of Ys(e.label))if(Vn(o,n,s)<=s)return!0;return!1}function vm(e,t,n){let s=e.individuals.filter(l=>l.class===t),o=[...Ys(n)];if(!o.length||!s.length)return{narrow:[],broad:[]};let r=ym(e,t),i=[];for(let l of s){let c=Yf(l,o);if(c){i.push({ind:l,via:c});continue}if(!r)continue;[...LE(e,l.id)].some(d=>{let f=e.byId.get(d);return!!f&&!!Yf(f,o)})&&i.push({ind:l,via:"chain"})}if(i.length||!r)return{narrow:Jf(i),broad:[]};let a=new Map;for(let l of s)for(let c of wm(e,l.id)){if(!a.has(c)){let u=e.byId.get(c);u&&u.class===t&&Qf(u,n)&&a.set(c,{ind:u,via:"chain"})}for(let u of Uc(e,c)){if(u===l.id||a.has(u))continue;let d=e.byId.get(u);d&&d.class===t&&Qf(d,n)&&a.set(u,{ind:d,via:"chain"})}}return{narrow:[],broad:Jf([...a.values()])}}function NE(e){return[...Ei(Si(e)).entries()].sort((t,n)=>n[1]-t[1]||t[0].localeCompare(n[0])).map(([t])=>({id:`pkg:${t}`,label:t,class:"Package"}))}function an(e,t,n){switch(t.node){case"clause":return Ut(e,t.clause,n).matches||[];case"allOfClass":return t.entityType==="Package"?NE(e):e.individuals.filter(s=>s.class===t.entityType);case"find":{let{narrow:s,broad:o}=vm(e,t.entityType,t.term);return s.length?s:o}case"existsEdge":{let s=new Set(It(t.kind).flatMap(o=>qe(e,o)).map(o=>o.subject));return e.individuals.filter(o=>s.has(o.id)&&(!t.entityType||o.class===t.entityType))}case"forwardComplement":{let s=Yn(e,t.subjectTerm,n&&n.contextId);if(!s.match)return[];let o=um(e,t.kind);if(!o)return[];let r=new Set(Ar(e,t.kind,new Set([s.match.id])).map(i=>i.id));return e.individuals.filter(i=>i.class===o&&!r.has(i.id))}case"reverseSet":{let s=new Set(an(e,t.inner,n).map(o=>o.id));return Xc(e,t.kind,t.entityType,s)}case"forwardSet":{let s=new Set(an(e,t.inner,n).map(o=>o.id));return Ar(e,t.kind,s)}case"prevSet":{let s=n&&n.prev;return Array.isArray(s)?s.map(o=>e.byId.get(o)).filter(Boolean):[]}case"membership":{let s=Jc(e,t.term,n&&n.contextId);if(s.kind==="dir"){if(!t.entityType||t.entityType==="Module")return s.mods;let i=new Set(s.mods.map(l=>l.id));return Xn(bo.flatMap(l=>Ar(e,l,i))).filter(l=>l.class===t.entityType)}if(s.kind==="miss")return[];let{own:o,inherited:r}=bm(e,s.id,s.entityClass,t.entityType);return o.length?o:r}case"qualifier":return t.inner.node==="membership"?Sm(e,t,n).matches:an(e,t.inner,n).filter(o=>t.filters.every(r=>Ks(e,o,Xe[r])));case"boolean":return $m(e,t,n);case"anaphora":return xm(e,t,n).matches;default:return[]}}function $m(e,t,n){let s=[];for(let o of t.atoms){if(o.op==="seed"){s=an(e,o.ast,n);continue}if(o.kind==="qual"){let i=l=>o.filters.every(c=>Ks(e,l,Xe[c])),a=l=>o.filters.every(c=>{let u=PE(Xe[c]);return u?Ks(e,l,u):!Ks(e,l,Xe[c])});s=o.op==="difference"?s.filter(a):s.filter(i);continue}let r=new Set(an(e,o.ast,n).map(i=>i.id));if(o.op==="intersection")s=s.filter(i=>r.has(i.id));else if(o.op==="difference")s=s.filter(i=>!r.has(i.id));else if(o.op==="union"){let i=new Set(s.map(a=>a.id));for(let a of an(e,o.ast,n))i.has(a.id)||(i.add(a.id),s.push(a))}}return s}function ME(e,t){if(!Array.isArray(t)||t.length<2)return null;let n=new Set,s=[];for(let o of t){let r=wn(e,o);r&&r.match&&!n.has(r.match.id)&&(n.add(r.match.id),s.push(r.match))}return s.length>=2?s:null}function xm(e,t,n){let o=ME(e,t.candidateTerms);if(!o){let d=n&&n.prev;if(!Array.isArray(d)||!d.length)return{compositeMiss:!0,reason:"no-prev",matches:[]};o=d.map(f=>e.byId.get(f)).filter(Boolean)}let r=o,i=t.filter;if(i&&i.type==="qual")r=r.filter(d=>i.filters.every(f=>Ks(e,d,Xe[f])));else if(i&&i.type==="entity")r=r.filter(d=>d.class===i.entityType);else if(i&&i.type==="clause"){let d=wn(e,i.clause.object);if(!d.match)r=[];else{let f=Io[i.clause.kind],p=[...It(i.clause.kind),...f?[f]:[]],m=new Set(p.flatMap(h=>qe(e,h)).filter(h=>h.object===d.match.id).map(h=>h.subject));r=r.filter(h=>m.has(h.id))}}let a=d=>d.length&&d.every(f=>f.class===d[0].class)?d[0].class:null,l=i&&i.type==="entity"?i.entityType:a(o),c=r.length?a(r):l;if(t.mode==="count")return{compositeKind:"count",count:r.length,entityType:c,matches:[]};let u=Ir(c,r,"anaphora",{bound:!0});return{compositeKind:"set",matches:r,entityType:c,referents:u}}function Em(e,t,n){let s=n.kind==="*"?FE:[n.kind,...n.sibling?[n.sibling]:[]],o=0;for(let r of s)for(let i of qe(e,r)){let a=i.subject===t.id,l=i.object===t.id;if(n.dir==="out"&&a){if(n.filter){let c=e.byId.get(i.object);if(!c||c.class!==n.filter)continue}o+=1}else(n.dir==="in"&&l||n.dir==="both"&&(a||l))&&(o+=1)}return o}function DE(e){let t=e.individuals.filter(s=>s.class==="Commit"),n=s=>String((s.attributes||[]).find(o=>o.key==="date")?.value||"");return t.sort((s,o)=>n(o).localeCompare(n(s))),{compositeKind:"recentCommits",matches:t}}function BE(e,t){let{op:n,pivotRaw:s}=t,o=u=>String((u.attributes||[]).find(d=>d.key==="date")?.value||"").slice(0,10),r=null,i=null,a=null;if(zE.test(s))r=s;else{let{match:u,ambiguous:d}=wn(e,s,{expectedClass:"Commit"});u&&!d&&u.class==="Commit"&&o(u)&&(i=u.id,a=u.label,r=o(u))}if(!r)return{compositeKind:"commitFilter",op:n,pivotRaw:s,pivotResolved:!1,matches:[]};let l=e.individuals.filter(u=>u.class==="Commit"&&u.id!==i&&o(u)).filter(u=>{let d=o(u);return n==="since"?d>=r:n==="before"?d<r:n==="after"?d>r:d===r}).sort((u,d)=>o(d).localeCompare(o(u))),c=[];return l.length&&c.push({kind:"set",class:"Commit",label:`${l.length} commit${l.length===1?"":"s"} ${n} ${s}`,ids:l.map(u=>u.id),attrs:{count:l.length,op:n,...i?{pivot:i}:{}},lane:"commitFilter"}),i&&c.push({kind:"event",class:"Commit",label:a,ids:[i],attrs:{date:r},lane:"commitFilter"}),{compositeKind:"commitFilter",op:n,pivotRaw:s,pivotDate:r,pivotResolved:!0,matches:l,referents:c}}function UE(e,t,n){let s=an(e,t.inner,n),o=new Set(s.map(a=>a.id));if(!o.size)return{compositeKind:"temporal",matches:[],entityType:t.entityType,innerCount:0};let r=Xc(e,"touches","Commit",o),i=a=>String((a.attributes||[]).find(l=>l.key==="date")?.value||"");return r.sort((a,l)=>i(l).localeCompare(i(a))),{compositeKind:"temporal",matches:r,entityType:t.entityType,innerCount:s.length}}function WE(e,t){let n=e.individuals.filter(a=>a.class===t.entityType);if(t.metric?.kind==="tests"&&t.entityType==="Module"){let a=new Set(qe(e,"tests").map(l=>l.subject));n=n.filter(l=>!a.has(l.id)&&!Ws(String(l.label).toLowerCase()))}let s=n.map(a=>({ind:a,score:Em(e,a,t.metric)})).sort((a,l)=>t.extreme==="most"?l.score-a.score:a.score-l.score);if(!s.length)return{compositeKind:"superlative",entityType:t.entityType,matches:[]};let o=s[0].score,r=s.filter(a=>a.score===o).map(a=>a.ind),i=r.length>=2?Ir(t.entityType,r,"superlative"):[{kind:"entity",class:t.entityType,label:r[0].label,ids:[r[0].id],attrs:{},lane:"superlative"}];return i.push({kind:"measure",label:`${o} ${t.metricNoun}`,ids:[],attrs:{metric:o},lane:"superlative"}),{compositeKind:"superlative",entityType:t.entityType,metricNoun:t.metricNoun,extreme:t.extreme,score:o,matches:r,referents:i}}function Sm(e,t,n){let s=t.node==="qualifier"&&t.inner.node==="membership"?t:null,o=s?s.inner:t,r=o.entityType,i=s?m=>s.filters.every(h=>Ks(e,m,Xe[h])):null,a=m=>Ir(r,m,"membership"),l=Jc(e,o.term,n&&n.contextId);if(l.kind==="dir"){let m;if(!r||r==="Module")m=l.mods;else{let h=new Set(l.mods.map(g=>g.id));m=Xn(bo.flatMap(g=>Ar(e,g,h))).filter(g=>g.class===r)}return i&&(m=m.filter(i)),{compositeKind:"set",matches:m,entityType:r,referents:a(m)}}if(l.kind==="miss")return{compositeKind:"set",matches:[],entityType:r};let{own:c,inherited:u,viaLabel:d}=bm(e,l.id,l.entityClass,r,i),f=!c.length&&u.length>0,p=f?u:c;return{compositeKind:"membership",entityType:r,matches:p,inheritedNotOwn:f,viaLabel:d,ownerLabel:l.label,referents:a(p)}}function GE(e,t){let{entityType:n,term:s,scopeModule:o}=t,r=null;if(o){let a=wn(e,o,{expectedClass:"Module"});if(!a.match)return{compositeKind:"exists",entityType:n,term:s,scopeModule:o,scopeMiss:!0,matches:[]};r=a.match}if(s){let a=wn(e,s,{expectedClass:n}),l=!r||a.match&&Lo(e,a.match)===r.id,c=a.match&&l;return{compositeKind:"exists",entityType:n,term:s,scopeModule:o,scopeMatch:r,matches:c?[a.match]:[]}}let i=r?el(e,new Set([r.id]),n):e.individuals.filter(a=>a.class===n);return{compositeKind:"exists",entityType:n,term:null,scopeModule:o,scopeMatch:r,matches:i}}function HE(e,t,n){let s=Lo(e,t);return n.kind==="dir"?n.mods.some(o=>o.id===t.id||o.id===s):s===n.id||Bc(e,n.id).some(o=>o.id===t.id)}function VE(e,t,n){let{term:s,qualifier:o,negated:r,scope:i}=t,a=Yn(e,s,n.contextId);if(a.unresolvedPronoun)return{compositeKind:"qualCheck",qualCheckMiss:"pronoun",term:s,matches:[]};if(!a.match)return{compositeKind:"qualCheck",qualCheckMiss:"unresolved",term:s,matches:[]};if(i){let d=Jc(e,i,n.contextId);if(d.kind==="miss")return{compositeKind:"qualCheck",qualCheckMiss:"scope",term:s,scope:i,matches:[]};if(!HE(e,a.match,d))return{compositeKind:"qualCheck",qualCheckMiss:"outsideScope",term:s,scope:i,subjectLabel:a.match.label,scopeLabel:d.kind==="dir"?i:d.label,matches:[]}}let l=Ks(e,a.match,Xe[o]),c=r?!l:l,u=[{kind:"entity",class:a.match.class,label:a.match.label,ids:[a.match.id],attrs:{},lane:"qualCheck"}];return{compositeKind:"qualCheck",subject:a.match,qualifier:o,negated:r,holds:c,matches:[a.match],referents:u}}function qE(e,t,n){let s=wn(e,t.object);if(!s||!s.match)return{compositeKind:"universal",universalMiss:"unresolved",object:t.object,matches:[]};let o=an(e,{node:"allOfClass",entityType:t.entityType},n),r=$m(e,t.complement,n),i=r.length===0;return{compositeKind:"universal",entityType:t.entityType,kind:t.kind,object:s.match.label,holds:i,total:o.length,counter:r,matches:i?o:r}}function KE(e,t,n){if(t.node==="reverseSet"&&t.kind==="touches"&&t.entityType==="Commit")return new Set(an(e,t.inner,n).map(s=>s.id));if(t.node==="clause"&&t.clause?.shape==="reverse"&&t.clause.kind==="touches"&&t.clause.entityType==="Commit"){let{objMatch:s,ambiguous:o}=Ut(e,t.clause,n);return s&&!o?new Set([s.id]):null}return null}function YE(e,t,n={}){if(t.node==="miss")return{compositeMiss:!0,reason:t.reason||null,matches:[]};if(t.node==="exists")return GE(e,t);if(t.node==="qualCheck")return VE(e,t,n);if(t.node==="universal")return qE(e,t,n);if(t.node==="count"){let i=KE(e,t.base,n);return i?{compositeKind:"count",count:CE(e,i),entityType:t.entityType,matches:[]}:{compositeKind:"count",count:an(e,t.base,n).length,entityType:t.entityType,matches:[]}}if(t.node==="list")return{compositeKind:"list",matches:an(e,t.base,n),entityType:t.entityType,scoped:t.scoped};if(t.node==="worldRelation")return CS(e,t);if(t.node==="superlative")return WE(e,t);if(t.node==="temporal")return UE(e,t,n);if(t.node==="recentCommits")return DE(e);if(t.node==="commitFilter")return BE(e,t);if(t.node==="anaphora")return xm(e,t,n);if(t.node==="membership"||t.node==="qualifier"&&t.inner.node==="membership")return Sm(e,t,n);if(t.node==="find"){let{narrow:i,broad:a}=vm(e,t.entityType,t.term);return{compositeKind:"find",entityType:t.entityType,term:t.term,matches:i.length?i:a,broad:!i.length&&a.length>0}}if((t.node==="reverseSet"||t.node==="forwardSet")&&t.inner.node==="prevSet"&&!(Array.isArray(n.prev)&&n.prev.length))return{compositeMiss:!0,reason:"no-prev",matches:[]};let s=an(e,t,n),o=t.entityType||null,r=Ir(o,s,t.node==="qualifier"?"qualifierListing":"compositeSet");return{compositeKind:"set",matches:s,entityType:o,referents:r}}function km(){return'compositional queries also work: "which functions call X and call Y", "what calls something that imports X", "public methods of X", "list functions" / "show me the classes", "how many classes", "which module has the most imports", "find me the payment class", or (after a listing) "which of those are tested"'}function XE(e){let t=["Function","Method"].includes(e.class)?`${e.label}()`:e.label;if(e.class==="Module")return t;let n=Or(e);return n?`${t} in ${n}`:t}function Wc(e){return!e||typeof e!="object"?!1:Array.isArray(e)?e.some(Wc):Array.isArray(e.filters)&&e.filters.some(t=>Xe[String(t).toLowerCase()]?.via==="tested")?!0:Object.values(e).some(Wc)}function JE(e,t){return!["Function","Method"].includes(t)||!Wc(e)?null:"This index records tests edges module to module, so it holds no function-grain coverage to filter on \u2014 ask whether the module a function lives in is tested instead."}function QE(e,t,n){if(t.compositeMiss)return t.reason==="no-prev"?{content:'"those"/"them" needs a previous answer to refer to \u2014 ask a listing question first, then follow up.',miss:!0,ambiguous:!1}:{content:`couldn't compile this compositional question${t.reason?` (${t.reason})`:""}. ${km()}.`,miss:!0,ambiguous:!1};if(t.compositeKind==="exists"){if(t.scopeMiss)return{content:`no module matching "${t.scopeModule}" found in the index.`,miss:!0,ambiguous:!1};let s=Me(t.entityType,1),o=Me(t.entityType,2),r=t.scopeMatch?` in ${t.scopeMatch.label}`:"";if(t.term){if(!t.matches.length)return{content:`No \u2014 no ${s} named "${t.term}" found${r}.`,miss:!0,ambiguous:!1};let i=t.matches[0],a=Or(i),l=i.class==="Module"?"":a?`, ${_r("defined-in",i.id,"defined in")} ${a}`:"";return{content:`Yes \u2014 ${i.label} is a ${s}${l}.`,miss:!1,ambiguous:!1,matches:t.matches}}return t.matches.length?{content:`Yes \u2014 ${ms(t.matches)}${r}.`,miss:!1,ambiguous:!1,matches:t.matches}:{content:`No \u2014 no ${o} found${r}.`,miss:!0,ambiguous:!1}}if(t.compositeKind==="qualCheck"){if(t.qualCheckMiss==="pronoun")return{content:`"${t.term}" needs a selected node to refer to \u2014 click a node first, or name it directly.`,miss:!0,ambiguous:!1};if(t.qualCheckMiss==="unresolved")return{content:`couldn't find "${t.term}" in the index to check.`,miss:!0,ambiguous:!1};if(t.qualCheckMiss==="scope")return{content:`couldn't find "${t.scope}" in the index to check inside.`,miss:!0,ambiguous:!1};if(t.qualCheckMiss==="outsideScope")return{content:`No \u2014 ${t.subjectLabel} isn't in ${t.scopeLabel}.`,miss:!0,ambiguous:!1};let s=t.subject.label,o=t.negated?`not ${t.qualifier}`:t.qualifier,r=t.negated?t.qualifier:`not ${t.qualifier}`;return{content:`${t.holds?"Yes":"No"} \u2014 ${s} is ${t.holds?o:r}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="universal"){if(t.universalMiss==="unresolved")return{content:`couldn't find "${t.object}" in the index to check.`,miss:!0,ambiguous:!1,matches:[]};let s=Me(t.entityType,t.total),o=Gx(t.kind);return t.holds?{content:`Yes \u2014 all ${t.total} ${s} ${o} ${t.object}.`,miss:!1,ambiguous:!1,matches:t.matches}:{content:`No \u2014 ${t.counter.length} of ${t.total} ${s} do not ${o} ${t.object}: ${ms(t.counter)}.`,miss:!1,ambiguous:!1,matches:t.counter}}if(t.compositeKind==="count"){let s=t.entityType?Me(t.entityType,t.count):t.count===1?"result":"results";return{content:`${t.count} ${s}.`,miss:!1,ambiguous:!1,matches:[]}}if(t.compositeKind==="list"){if(!t.matches.length)return{content:`no ${Me(t.entityType,2)} in this index.`,miss:!0,ambiguous:!1,matches:[]};let s=!["Module","Package","Commit","Fact","Utterance","Session","Source","Rule"].includes(t.entityType),o=!t.scoped&&s&&t.matches.length>Ve?` \u2014 narrow with "${Me(t.entityType,2)} in <module>"`:"";return{content:`${ms(t.matches)}${o}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="worldRelation"){let s=gn(t.asked),o=Ns[t.relation].nouns[1];return t.pairs.length?{content:`${t.pairs.map(i=>`${i.subject.label||i.subject.id} ${i.reads} ${i.object}`).join("; ")}.`,miss:!1,ambiguous:!1,matches:t.matches}:{content:`no ${o} on record for ${s} in this graph.`,miss:!0,ambiguous:!1,matches:[]}}if(t.compositeKind==="membership"){if(!t.matches.length)return{content:`nothing in the index matches that${t.entityType?` (${Me(t.entityType,2)})`:""}. ${hs(n)}`,miss:!0,ambiguous:!1,matches:[]};if(t.inheritedNotOwn){let s=Me(t.entityType,2);return{content:`${t.ownerLabel?`${t.ownerLabel} has no own ${s}`:`no own ${s}`} \u2014 inherited from ${t.viaLabel}: ${ms(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches,inheritedNotOwn:!0}}return{content:`${ms(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="find"){let s=Me(t.entityType,1);if(!t.matches.length)return{content:`no ${Me(t.entityType,2)} found matching "${t.term}".`,miss:!0,ambiguous:!1,matches:[]};let o=t.matches.length===1?XE(t.matches[0]):ms(t.matches);return t.broad?{content:`no exact ${s} named "${t.term}", but found a related ${t.matches.length===1?s:Me(t.entityType,2)}: ${o}.`,miss:!1,ambiguous:!1,matches:t.matches,relatedNotExact:!0}:{content:`${o}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="recentCommits"){if(!t.matches.length)return{content:"no commits recorded in this index.",miss:!0,ambiguous:!1,matches:[]};let s=i=>String((i.attributes||[]).find(a=>a.key==="date")?.value||""),o=t.matches.slice(0,zt).map(i=>{let a=s(i).slice(0,10),l=(i.attributes||[]).find(c=>c.key==="message")?.value||"";return`${i.label}${a?` (${a})`:""}${l?` \u2014 ${l}`:""}`}),r=t.matches.length>zt?` \u2026+${t.matches.length-zt} more`:"";return{content:`${t.matches.length} recent commit(s): ${o.join(", ")}${r}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="commitFilter"){if(!t.pivotResolved)return{content:`"${t.pivotRaw}" isn't a recognized date (yyyy-mm-dd) or a known commit \u2014 try "what changed since 2026-06-01" or "what changed before <commit>".`,miss:!0,ambiguous:!1,matches:[]};if(!t.matches.length)return{content:`no commits recorded ${t.op} ${t.pivotRaw}.`,miss:!0,ambiguous:!1,matches:[]};let s=i=>String((i.attributes||[]).find(a=>a.key==="date")?.value||""),o=t.matches.slice(0,zt).map(i=>{let a=s(i).slice(0,10),l=(i.attributes||[]).find(c=>c.key==="message")?.value||"";return`${i.label}${a?` (${a})`:""}${l?` \u2014 ${l}`:""}`}),r=t.matches.length>zt?` \u2026+${t.matches.length-zt} more`:"";return{content:`${t.matches.length} commit(s) changed ${t.op} ${t.pivotRaw}: ${o.join(", ")}${r}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="superlative"){if(!t.matches.length)return{content:`no ${Me(t.entityType,2)} to rank in this index.`,miss:!0,ambiguous:!1};let s=t.extreme==="most"?"the most":"the fewest",o=t.matches.length>1?` (${t.matches.length}-way tie)`:"";return{content:`${ms(t.matches)} \u2014 ${s} ${t.metricNoun} (${t.score})${o}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="temporal"){let s=t.innerCount||0,o=t.entityType?Me(t.entityType,s||2):s===1?"entity":"entities",r=s===1?"was":"were";if(!s)return{content:`nothing in the index matches the inner set, so there is no change history to date. ${hs(n)}`,miss:!0,ambiguous:!1,matches:[]};if(!t.matches.length)return{content:`no recorded commit touched the ${s} ${o} in that set in this index. ${hs(n)}`,miss:!0,ambiguous:!1,matches:[]};let i=t.matches[0],a=(i.attributes||[]).find(d=>d.key==="date")?.value||"";if(!a)return{content:`the ${o} in that set ${r} last touched by commit ${i.label}, but this index records no commit dates \u2014 regenerate the graph to attach mgx:commitDate.`,miss:!0,ambiguous:!1,matches:t.matches};let l=(i.attributes||[]).find(d=>d.key==="message")?.value||"",c=String(a).slice(0,10),u=t.matches.length-1;return{content:`the ${o} in that set ${r} last touched by commit ${i.label} on ${c}${l?` ("${l}")`:""}${u?`; ${u} earlier commit${u===1?"":"s"} recorded`:""}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(!t.matches.length){let s=JE(e,t.entityType)||hs(n);return{content:`nothing in the index matches that${t.entityType?` (${Me(t.entityType,2)})`:""}. ${s}`,miss:!0,ambiguous:!1,matches:[]}}return{content:`${ms(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches}}function Zc(){return`"which <functions|classes|modules> <imports|calls|uses|inherits from|tests> <name>" or "what does <name> <import|call|export>" or "what uses <name>" or "where is <name> defined" / "where is <name> mentioned" or "when did <name> change" or "which commits touched <name>" or "which changes touch commit <sha>"/"what did commit <sha> touch" (a commit's own changes) or plainly "what calls this" (about a selected node) or "what does <term> mean"/"what is a <ClassName>" (about the graph's own vocabulary). `+km()}function hs(e=null){return e&&wc(e)===0?"This store holds no code index, so it records no modules or commits to look through.":`Try "who touched <a module that actually has commits>" or "/describe <module>" to see what's in the index.`}function Ys(e){return new Set(String(e).toLowerCase().split(/[^a-z0-9]+/).filter(Boolean))}function Ui(e){if(e.length<5)return e;let t=e.replace(/(ing|ers|ors|er|or)$/,"");return t===e?e:t.length>=3&&t[t.length-1]===t[t.length-2]?t.slice(0,-1):t}function jm(e){return String(e||"").replace(/\.[a-z0-9]+$/i,"").toLowerCase().replace(/[/\-_.]+/g,"")}function ZE(e){return String(e||"").trim().replace(/^(?:the|a|an)\s+/i,"").toLowerCase().replace(/[\s\-_]+/g,"")}function Rr(e,t,{expectedClass:n=null}={}){let s=String(t||"").trim();if(!s)return{match:null,candidates:[],tier:null,ambiguous:!1};let o=s.toLowerCase(),r=n?e.individuals.filter(g=>g.class===n):e.individuals,i=o.match(/^(commit[:\s])?([0-9a-f]{7,40})$/);if(i){let g=i[2],b=r.filter(y=>y.class==="Commit"&&(String(y.id).toLowerCase().startsWith(`commit:${g}`)||String(y.label).toLowerCase().startsWith(g)));if(b.length===1)return{match:b[0],candidates:[],tier:1,ambiguous:!1};if(b.length>1)return{match:b[0],candidates:b.slice(1,5),tier:1,ambiguous:!0};if(i[1])return{match:null,candidates:[],tier:null,ambiguous:!1}}let a=r.find(g=>String(g.label).toLowerCase()===o||String(g.id).toLowerCase()===o);if(a)return{match:a,candidates:[],tier:1,ambiguous:!1};let l=`ext:${o}`,c=null;e:for(let g of e.relations)for(let b of g.edges)if(String(b.object).toLowerCase()===l){c=b.object;break e}if(c&&!n)return{match:{id:c,label:s,class:null},candidates:[],tier:2,ambiguous:!1};let u=s.split(/\s+and\s+/i).map(g=>g.trim()).filter(Boolean);if(u.length>1){let g=new Set;for(let b of u){let y=Rr(e,b,{expectedClass:n});y.match&&!y.ambiguous&&g.add(y.match.id)}if(g.size>1)return{match:null,candidates:[],tier:null,ambiguous:!1}}let d=[],f=!o.includes("/")&&/^[\w$]+(\.[\w$]+)+$/.test(o);if(f){let g=o.split(".").pop();for(let b of r){let y=String(b.label||"").toLowerCase();b.class==="Module"?y.split("/").pop()===o&&d.push({ind:b,score:1e3-Math.abs(y.length-o.length)}):y.includes(o)?d.push({ind:b,score:2e3-Math.abs(y.length-o.length)}):y.endsWith(`.${g}`)&&d.push({ind:b,score:1500-Math.abs(y.length-o.length)})}}else{let g=[...Ys(s)],b=o.split(/\s+/).find(v=>v.includes("/")),y=b?b.split("/").pop().replace(/\.[a-z0-9]+$/,""):null,$=s.trim().replace(/^(?:the|a|an)\s+/i,"").trim().split(/\s+/).filter(Boolean).length>=2,_=$?ZE(s):null;for(let v of r){let x=String(v.label||"").toLowerCase(),E=x.split("/").pop().replace(/\.[a-z0-9]+$/,"");if(E===o){d.push({ind:v,score:5e3});continue}if(o.length>=4&&(E.startsWith(o)||E.endsWith(o))){d.push({ind:v,score:4e3-Math.abs(E.length-o.length)});continue}if($){let k=jm(v.label);if(k&&k===_){d.push({ind:v,score:5e3});continue}let A=/[/_-]/.test(v.label)||/\.[a-z0-9]+$/i.test(String(v.label||""));if(k&&A&&_.length>=4&&k.includes(_)){d.push({ind:v,score:2e3-Math.abs(k.length-_.length)});continue}}if(v.class==="Module"){let k=Ui(o);if(k!==o&&k===Ui(E)){let A=qn(o);if(Vn(E,o,A)>A){d.push({ind:v,score:3e3-Math.abs(E.length-o.length)});continue}}}if(o.length>=4&&x.includes(o)){d.push({ind:v,score:1e3-Math.abs(x.length-o.length)});continue}let S=Ys(v.label),R=g.filter(k=>S.has(k)).length;R>0&&(!y||S.has(y))&&d.push({ind:v,score:R/g.length*Ic})}}if(d.sort((g,b)=>b.score-g.score),d.length){let[g,...b]=d,y=b.filter($=>$.score===g.score),w=g.score>=Ic?b.filter($=>$.score>=Ic):b;return{match:g.ind,candidates:w.slice(0,4).map($=>$.ind),tier:3,ambiguous:y.length>0}}let p=f||o.includes("/"),m=null,h=!p&&typeof Bs=="function"?Bs(e.proseIndex,s).filter(g=>!n||e.byId.get(g.id)?.class===n):[];if(h.length){let[g,...b]=h,y=e.byId.get(g.id);if(y){let w=b.filter($=>$.score===g.score);if(m={match:y,candidates:b.slice(0,4).map($=>e.byId.get($.id)).filter(Boolean),tier:4,ambiguous:w.length>0,matchedVia:"prose"},!m.ambiguous&&g.via!=="spell")return m}}if(!i&&o.length>=4){let g=qn(o),b=g+1,y=[];for(let w of r){let $=Vn(String(w.label||"").toLowerCase(),o,g);if($>0)for(let _ of Ys(w.label)){if($<=0)break;$=Math.min($,Vn(_,o,g))}$<b?(b=$,y=[w]):$===b&&$<=g&&y.push(w)}if(b<=g&&y.length===1)return{match:y[0],candidates:[],tier:5,ambiguous:!1,matchedVia:"fuzzy"};if(b<=g&&y.length>1&&!m){let[w,...$]=y;return{match:w,candidates:$.slice(0,4),tier:5,ambiguous:!0,matchedVia:"fuzzy"}}}return m||{match:null,candidates:[],tier:null,ambiguous:!1}}function Lc(e,t){let n=jm(t),s=[...Ys(t)],o=[];for(let r of Ys(e))n.includes(r)||s.some(i=>Ui(i)===Ui(r))||Bi.has(r)||Tm.has(r)||o.push(r);return o}function Fi(e,t){if(!e?.match||e.tier!==3||e.matchedVia)return e;if(e.ambiguous){let s=[e.match,...e.candidates||[]],o=s.map(r=>new Set(Lc(t,r.label))).reduce((r,i)=>r.filter(a=>i.has(a)),Lc(t,s[0].label));return o.length?{match:null,candidates:[],tier:null,ambiguous:!1,unplacedWords:o,nearestLabel:gn(s.slice(0,4).map(r=>r.label))}:e}let n=Lc(t,e.match.label);return n.length?{match:null,candidates:[],tier:null,ambiguous:!1,unplacedWords:n,nearestLabel:e.match.label}:e}function wn(e,t,n={}){let{expectedClass:s=null}=n;if(!s){let o=String(t||"").trim(),r=o.replace(eS,"").trim(),i=r.match(tS);if(i){let a=r.slice(0,i.index).trim(),l=Ue[i[1].toLowerCase()];if(a&&l){let c=Fi(Rr(e,a,{expectedClass:l}),a);if(c?.match?.id&&!c.ambiguous)return c}}if(r&&r!==o){let a=Fi(Rr(e,r,n),r);if(a?.match?.id&&!a.ambiguous)return a}return Fi(Rr(e,t,n),t)}return Fi(Rr(e,t,n),t)}function Yn(e,t,n){if(Ms.includes(String(t||"").trim().toLowerCase())){if(!n)return{match:null,candidates:[],tier:null,ambiguous:!1,unresolvedPronoun:!0};let s=e.byId.get(n);return s?{match:s,candidates:[],tier:1,ambiguous:!1}:{match:null,candidates:[],tier:null,ambiguous:!1,unresolvedPronoun:!0}}return wn(e,t)}function el(e,t,n){let s=[];for(let o of qe(e,"defines")){if(!t.has(o.subject))continue;let r=e.byId.get(o.object);r&&r.class===n&&s.push(r)}return s}function nS(e,t,n,s={}){let o=!n||n==="Change"||n==="Commit",r=o||n==="Module",i=o||gs.has(n),a=[...r?["touches"]:[],...i?["touchesSymbol"]:[]],l=a.flatMap(c=>qe(e,c)).filter(c=>c.subject===t.id).map(c=>e.byId.get(c.object)).filter(Boolean);return n&&gs.has(n)&&(l=l.filter(c=>c.class===n)),{matches:l,objMatch:t,commitSubject:!0,ambiguous:!1,candidates:[],traversal:`${a.join("+")} edges where subject = commit ${t.label}`,...s}}function iS(e,t){let n=new Set(String(t||"").toLowerCase().split(/[\s-]+/).filter(Boolean));return(e.individuals||[]).filter(s=>s.class==="Module"&&tl.has(Zf(s.label))).map(s=>({ind:s,named:n.has(Zf(s.label))?1:0,depth:String(s.label).split("/").length,fixture:rS(s.label)?1:0})).sort((s,o)=>o.named-s.named||s.depth-o.depth||s.fixture-o.fixture||String(s.ind.label).localeCompare(String(o.ind.label))).map(s=>s.ind)}function aS(e,t,n){return e==="reverse"&&(t==="imports"||t==="calls")&&(!n||n==="Module")}function nl(e){return(e?.attributes||[]).find(t=>t.prop===cS)?.value||null}function lS(e){return e==="SchemaClass"?"a class in the graph's schema":e==="SchemaPredicate"?"a predicate (relation) in the graph's schema":`${Co(e)} ${e} in this graph's vocabulary`}function Ut(e,t,{contextId:n=null,prev:s=null,pinnedObjMatch:o=null}={}){if(!t)return{matches:[],objMatch:null,candidates:[],traversal:null,ambiguous:!1};if(t.node)return YE(e,t,{contextId:n,prev:s});if(t.ambiguousParse){let T=t.candidates.map(M=>{let B=Ut(e,M,{contextId:n,prev:s});return{parsed:M,result:B,rendered:bn(M,B,e)}});return{matches:[],objMatch:null,candidates:t.candidates,traversal:null,ambiguous:!0,branches:T}}let{shape:r,kind:i,entityType:a}=t;if(r==="meta"){let T=String(t.object||"").trim(),M=T.toLowerCase(),B=(e.individuals||[]).find(Z=>{if(!nl(Z))return!1;if(String(Z.label).toLowerCase()===M)return!0;let J=(Z.attributes||[]).find(ne=>ne.key==="token")?.value;return J&&String(J).toLowerCase()===M});if(!B){let Z=gm(e,T);return Z?{matches:[Z.hit],objMatch:Z.hit,candidates:[],ambiguous:!1,metaCodeClass:!0,metaFallbackText:Z.text,traversal:`schema lookup for "${T}" (miss), then unique code-entity individual by label`}:{matches:[],objMatch:null,candidates:[],traversal:`schema lookup for "${T}"`,ambiguous:!1}}return{matches:[B],objMatch:B,candidates:[],traversal:`schema lookup for "${T}"`,ambiguous:!1}}if(r==="mentions"){let T=String(t.object||"").trim();return{matches:(typeof Bs=="function"?Bs(e.proseIndex,T):[]).map(Z=>e.byId.get(Z.id)).filter(Boolean),objMatch:null,candidates:[],ambiguous:!1,mentionsShape:!0,traversal:`proseIndex word lookup for "${T}"`}}if(r==="where"&&sS.test(String(t.object||"").trim())){let T=iS(e,t.object);return{matches:T,objMatch:T[0]||null,candidates:T.slice(1,5),ambiguous:!1,entryPointShape:!0,traversal:`Module individuals with an entry-point basename (${[...tl].join("/")}), ranked query-named basename first, then shallower path, then non-test path`}}if(t.modifier&&t.modifier!=="direct"&&!aS(r,i,a))return{matches:[],objMatch:null,candidates:[],ambiguous:!1,unsupportedModifier:!0,traversal:`modifier "${t.modifier}" requested for a "${i}" query \u2014 no closure traversal exists for this combination yet`};if(r==="ask"){let T=Yn(e,t.subject,n),M=Yn(e,t.object,n);if(!T.match||!M.match||T.ambiguous||M.ambiguous)return{matches:[],objMatch:M.match,candidates:M.candidates,traversal:null,ambiguous:!1,answer:null,unresolvedPronoun:!!(T.unresolvedPronoun||M.unresolvedPronoun)};let[B,Z]=[T.match,M.match];i==="touches"&&Z.class==="Commit"&&B.class!=="Commit"&&([B,Z]=[Z,B]);let J=Io[i],ne=[...new Set(J?[...It(i),J]:It(i))],D=ne.flatMap(z=>qe(e,z)).filter(z=>z.subject===B.id&&z.object===Z.id);return{matches:D,answer:t.negated?D.length===0:D.length>0,objMatch:M.match,subjMatch:T.match,candidates:[],traversal:`${ne.join("+")} edge from ${B.label} to ${Z.label}`,ambiguous:!1}}let l;if(o)l={match:o,candidates:[],ambiguous:!1,matchedVia:null};else{if(l=Yn(e,t.object,n),t.altObject&&t.altObject!==t.object){let T=Yn(e,t.altObject,n),M=!!l.match&&!l.ambiguous,B=!!T.match&&!T.ambiguous;!M&&B?l=T:M&&B&&l.match.id!==T.match.id&&(l={...l,ambiguous:!0,candidates:[T.match,...l.candidates||[]]})}if(t.kind==="tests"&&l.match&&!l.ambiguous&&!String(t.object||"").includes("/")){let T=Z=>Z.replace(/\.(?:test|spec|tests)(?=\.[^.]+$)/,""),M=T(String(t.object||"").trim().toLowerCase()),B=(e.individuals||[]).find(Z=>{if(Z.class!=="Module"||Z.id===l.match.id)return!1;let J=String(Z.label||"").toLowerCase().split("/").pop();return J!==T(J)&&T(J)===M});B&&(l={...l,ambiguous:!0,candidates:[B,...l.candidates||[]]})}}let{match:c,candidates:u,ambiguous:d,unresolvedPronoun:f,matchedVia:p,unplacedWords:m,nearestLabel:h}=l;if(!c)return{matches:[],objMatch:null,candidates:u,traversal:null,ambiguous:!1,unresolvedPronoun:f,unplacedWords:m,nearestLabel:h};if(d){let M=Xn([c,...u||[]]).slice(0,Ve).map(B=>{let Z=Ut(e,t,{contextId:n,prev:s,pinnedObjMatch:B});return{candidate:B,result:Z,rendered:bn(t,Z,e)}});return{matches:[],objMatch:c,candidates:u,traversal:null,ambiguous:!0,branches:M}}if(r==="where"){let T=(c.attributes||[]).find(M=>M.key==="site")?.value||null;return{matches:[c],objMatch:c,candidates:u,ambiguous:d,matchedVia:p,whereShape:!0,site:T,traversal:T?`site attribute of ${c.label}`:`class + defining module of ${c.label}`}}if(r==="when"){let T=Z=>String((Z.attributes||[]).find(J=>J.key==="date")?.value||""),M;if(c.class==="Commit")M=[c];else{let Z=["touches","touchesSymbol"].flatMap(ne=>qe(e,ne)).filter(ne=>ne.object===c.id),J=new Set;M=[];for(let ne of Z){if(J.has(ne.subject))continue;J.add(ne.subject);let D=e.byId.get(ne.subject);D&&D.class==="Commit"&&M.push(D)}M.sort((ne,D)=>T(D).localeCompare(T(ne)))}let B=M.length&&T(M[0])?[{kind:"event",class:"Commit",label:M[0].label,ids:[M[0].id],attrs:{date:T(M[0]).slice(0,10)},lane:"when"}]:[];return{matches:M,objMatch:c,candidates:u,ambiguous:d,matchedVia:p,whenShape:!0,referents:B,traversal:`touches+touchesSymbol edges where object = ${c.label}, newest commit date first`}}if(r==="whoLast"){let T=ne=>String((ne.attributes||[]).find(D=>D.key==="date")?.value||""),M=["touches","touchesSymbol"].flatMap(ne=>qe(e,ne)).filter(ne=>ne.object===c.id),B=new Set,Z=[];for(let ne of M){if(B.has(ne.subject))continue;B.add(ne.subject);let D=e.byId.get(ne.subject);D&&D.class==="Commit"&&Z.push(D)}Z.sort((ne,D)=>T(D).localeCompare(T(ne)));let J=Z.length&&T(Z[0])?[{kind:"event",class:"Commit",label:Z[0].label,ids:[Z[0].id],attrs:{date:T(Z[0]).slice(0,10)},lane:"whoLast"}]:[];return{matches:Z,objMatch:c,candidates:u,ambiguous:d,matchedVia:p,whoLastShape:!0,referents:J,traversal:`touches+touchesSymbol edges where object = ${c.label}, newest commit's author`}}if(i==="touches"&&c.class==="Commit")return nS(e,c,a,{candidates:u,ambiguous:d,matchedVia:p});if(r==="forward"){let T=Io[i],B=!!(T&&c.class&&gs.has(c.class))?[...new Set([...It(i),T])]:It(i);if(a&&a!=="Change"){let W=lm(e,B),C=Oc[a];if(W.size&&!W.has(a)&&!(C&&W.has(C)))return{matches:[],objMatch:c,candidates:u,ambiguous:d,matchedVia:p,forwardGrainMiss:!0,wantClasses:[...W],traversal:`${B.join("+")} edges where subject = ${c.label} (grain mismatch: this "${i}" relation never targets a ${Kn(a)})`}}let J=B.flatMap(W=>qe(e,W)).filter(W=>W.subject===c.id).map(W=>e.byId.get(W.object)).filter(Boolean),ne=Xn(J),D=ne,z="";if(a&&a!=="Change"){D=ne.filter(C=>C.class===a);let W=Oc[a];if(!D.length&&W){let C=ne.filter(L=>L.class===W);C.length&&(D=C,z=`, widened to ${W} subjects (no ${a} recorded)`)}}return{matches:D,objMatch:c,candidates:u,traversal:`${B.join("+")} edges where subject = ${c.label}${z}`,ambiguous:d,matchedVia:p}}if(t.modifier==="transitive")return{matches:ko(e,c,{maxDepth:em}).flat().map(B=>e.byId.get(B.id)).filter(Boolean),objMatch:c,candidates:u,ambiguous:d,matchedVia:p,traversal:`reverse dependency closure over imports+calls edges from ${c.label} (impactClosure, maxDepth=${em})`};let g=Io[i]||It(i).find(T=>om.has(T))||null,b=!!(c.class&&gs.has(c.class));if(g&&(gs.has(a)||b)){let T=qe(e,g).filter(z=>z.object===c.id),M=Xn(T.map(z=>e.byId.get(z.subject)).filter(Boolean)),B=!a||a==="Change"?M:M.filter(z=>z.class===a),Z="",J=Oc[a];if(!B.length&&J){let z=M.filter(W=>W.class===J);z.length&&(B=z,Z=`, widened to ${J} subjects (no ${a} recorded)`)}let ne=(i==="touches"||i==="calls"||i==="uses")&&c.class==="Class"&&!qe(e,"contains").some(z=>z.subject===c.id),D=ne?e.byId.get(Lo(e,c)||""):null;if(B.length||!(ne&&D))return{matches:B,objMatch:c,candidates:u,traversal:`${g} edges where object = ${c.label}${Z}`,ambiguous:d,matchedVia:p}}let y=c,w=u,$=d,_=p,v="",x=um(e,i);if(x&&y.class&&y.class!==x){let T=wn(e,t.object,{expectedClass:x});if(T.match&&!T.ambiguous)y=T.match,w=T.candidates,$=T.ambiguous,_=T.matchedVia;else if(x==="Module"){let M=Lo(e,y),B=M&&e.byId.get(M);if(B)v=`, refined from ${y.label} to its containing module`,y=B;else return{matches:[],objMatch:y,candidates:w,ambiguous:$,matchedVia:_,wrongGrainMiss:!0,wantClass:x,traversal:`"${t.object}" resolved to ${Kn(y.class)} ${y.label} (grain mismatch: this "${i}" question needs a ${Kn(x)}, and no containing module could be found to refine to)`}}else return{matches:[],objMatch:y,candidates:w,ambiguous:$,matchedVia:_,wrongGrainMiss:!0,wantClass:x,traversal:`"${t.object}" resolved to ${Kn(y.class)} ${y.label} (grain mismatch: this "${i}" question needs a ${Kn(x)})`}}let E=It(i).flatMap(T=>qe(e,T)).filter(T=>T.object===y.id);i==="cochange"&&(E=E.concat(It(i).flatMap(T=>qe(e,T)).filter(T=>T.subject===y.id).map(T=>({...T,subject:T.object,object:T.subject}))));let S="";if(!E.length&&y.class){let T=`ext:${String(y.label).toLowerCase()}`;E=It(i).flatMap(M=>qe(e,M)).filter(M=>String(M.object).toLowerCase()===T),E.length&&(S=` (by name, via unresolved ${T} references)`)}let R=[],k=new Set;for(let T of E){let M=e.byId.get(T.subject);M&&!k.has(M.id)&&(k.add(M.id),R.push(M))}let A,P="";if(!a||a==="Change")A=R;else{let T=R.filter(M=>M.class===a);if(T.length)A=T;else if(a!=="Module"&&R.some(M=>M.class==="Module")){let M=new Set(R.filter(B=>B.class==="Module").map(B=>B.id));A=el(e,M,a),P=`, then ${Kn(a)} defined in the matched module(s)`}else A=[]}return{matches:A,objMatch:y,candidates:w,traversal:`${It(i).join("+")} edges where object = ${y.label}${S}${P}${v}`,ambiguous:$,matchedVia:_}}function Or(e){if(e.class==="Module")return e.label;let t=(e.attributes||[]).find(s=>s.key==="site")?.value;if(t)return String(t).split(":")[0];let n=String(e.id||"").match(/^fn:(.+)#/);return n?n[1]:null}function Nc(e){let t=String(e.label||e.id||"");return["Function","Method"].includes(e.class)?`function ${t}()`:t}function uS(e){let t=String(e.label||e.id||""),n=(e.attributes||[]).find(s=>s.key==="author")?.value;return n?`${t} (${n})`:t}function gn(e){return e.length>1?`${e.slice(0,-1).join(", ")} and ${e[e.length-1]}`:e[0]}function Tr(e){let t=e.object??e.subject??"?";return`${e.entityType?Me(e.entityType,2)+" that ":""}${e.kind} "${t}"`}function Gc(e){return mr[e]?.bare||e}function dS(e){let t=Gc(e);return t.endsWith("e")?`${t}d`:`${t}ed`}function pS(e){if(!Array.isArray(e.atoms)||e.atoms.length!==2)return null;let[t,n]=e.atoms;if(t.op!=="seed"||t.ast?.node!=="allOfClass"||n.op!=="difference")return null;let s=Me(e.entityType,2);if(n.kind==="qual")return`${s} that are not ${n.filters.join(" and not ")}`;if(n.kind!=="set"||!n.ast)return null;if(n.ast.node==="existsEdge")return`${s} that do not ${Gc(n.ast.kind)} anything`;let o=n.ast.node==="clause"?n.ast.clause:n.ast;if(!o||o.node||!o.kind)return null;let r=o.object??o.subject;return r==null?null:`${s} that do not ${Gc(o.kind)} ${JSON.stringify(String(r))}`}function _m(e){if(!e)return null;if(e.ambiguousParse)return{english:`ambiguous: ${e.candidates.map(Tr).join(" \u2014 or \u2014 ")}`,machine:`ambiguousParse(${e.candidates.map(r=>_m(r)?.machine).join(", ")})`};if(e.node)return{english:(e.node==="boolean"?pS(e):null)||`a compositional query (${e.node})`,machine:`composite(${e.node})`};let t=r=>JSON.stringify(String(r??"")),n=[];e.kind&&n.push(e.kind),e.negated&&n.push("negated"),e.entityType&&n.push(`entityType=${e.entityType}`),e.modifier&&e.modifier!=="direct"&&n.push(`modifier=${e.modifier}`),e.subject!=null&&n.push(`subject=${t(e.subject)}`),e.object!=null&&n.push(t(e.object));let s=`${e.shape}(${n.join(", ")})`,o;if(e.shape==="ask")o=`does "${e.subject}" ${e.negated?"not ":""}${qs(e.kind)} "${e.object}"?`;else if(e.shape==="meta")o=`what does "${e.object}" mean, in this graph's own vocabulary?`;else if(e.shape==="mentions")o=`where is "${e.object}" mentioned?`;else if(e.shape==="where")o=`where is "${e.object}" defined?`;else{let r=e.entityType?Me(e.entityType,2)+" that ":"";o=e.shape==="forward"?`what "${e.object}" itself ${qs(e.kind)}`:`${r}${qs(e.kind)} "${e.object}"`}return{english:o,machine:s}}function bn(e,t,n=null){let s=Rm(e,t,n);return t&&t.matchedVia==="fuzzy"&&t.objMatch&&!s.ambiguous&&(s.content=`assuming you meant ${t.objMatch.label}: ${s.content}`),s}function Rm(e,t,n){if(!e)return{content:`couldn't parse this as a graph question. Try: ${Zc()}`,miss:!0,ambiguous:!1};if(e.node)return QE(e,t,n);if(e.ambiguousParse)return t.branches&&t.branches.length?{content:`this could mean more than one thing:
55
- ${t.branches.map((l,c)=>`${c+1}) as ${Tr(l.parsed)}: ${l.rendered.content}`).join(`
53
+ `)}`+(o.length>xc?`
54
+ \u2026+${o.length-xc} more`:"")}var kp,Fp,Rp,z$,B$,yc,W$,Ri,G$,q$,V$,Up,H$,K$,Y$,X$,J$,Q$,Z$,ev,tv,nv,sv,ov,rv,iv,av,cv,lv,uv,dv,pv,fv,mv,hv,gv,bv,Tp,wv,yv,Bp,Wp,Gp,$v,vv,xv,Ev,Sv,Ip,Cp,_v,Op,ji,Lp,Np,Mp,Er,Me,Tv,Av,Zp,Iv,Ut,sf,Cv,mf,Lv,Nv,Mv,Pv,Fv,Dv,zv,Uv,$c,Pp,Ii,Bv,vc,xc,Oe=O(()=>{us();fs();gc();xr();ms();kp={"mgx:importsnamespace":"imports","mgx:callscoarse":"calls","seon:declaresmethod":"defines","mgx:testscoverage":"tests","mgx:touchedbycommit":"touches","seon:containscodeentity":"contains","seon:hassupertype":"inherits","mgx:changecoupledwith":"cochange","mgx:reexports":"reexports","mgx:serves":"serves","mgx:denotes":"denotes","mgx:touchessymbol":"touchesSymbol","mgx:callssymbol":"callsSymbol","seon:usescomplextype":"imports","seon:invokesmethod":"calls","seon:history":"touches","mgx:subclassof":"inherits","mg:imports":"imports","mg:calls":"calls","mg:defines":"defines","mg:tests":"tests","mg:touches":"touches","mgx:saidinsession":"saidInSession","mgx:inreplyto":"inReplyTo","mgx:statedby":"statedBy","mgx:canonicalisedfrom":"canonicalisedFrom"};Fp=e=>/^(git|turn):/.test(String(e||""));Rp=30,z$=8;B$=2,yc=25,W$=3;Ri=10,G$=8,q$=3,V$=2,Up=5,H$=4,K$=.2,Y$=.35,X$=.15,J$=e=>/(^|\/)(examples?|fixtures?|samples?|demos?|benchmarks?|test-[^/]+)(\/|$)/.test(e),Q$=.2,Z$=.35,ev=.2,tv=.35,nv=e=>/\.cs$/i.test(e),sv=e=>/^I[A-Z]/.test(String(e||"")),ov=.2,rv=.35,iv=50,av=.2,cv=.35,lv=.5,uv=Up,dv=3,pv=4,fv=1,mv=.9,hv=.5,gv=.2,bv=.35,Tp=4,wv=2,yv=[["imports"],["calls","callsSymbol"],["inherits"],["cochange"]],Bp=3,Wp=12,Gp=.9,$v=["imports","calls","callsSymbol","inherits"],vv=.5,xv=.6,Ev=.2,Sv=.35;Ip=128,Cp=4,_v=64,Op=250,ji=class extends Error{};Lp=new WeakMap;Np=40,Mp=40,Er=30;Me=(e,t)=>(e?.attributes||[]).find(n=>n.key===t)?.value||"";Tv=25,Av=15;Zp=40,Iv="tests edges are recorded module to module, so this is module-grain coverage.";Ut=15;sf=new Set(["Function","Method"]);Cv=8;mf={function:"Function",class:"Class",method:"Method",attribute:"Attribute"};Lv=8,Nv=16,Mv=4,Pv=6,Fv=12,Dv=2,zv=8,Uv=3,$c=e=>String(e||"").split(",").map(t=>t.trim()).filter(Boolean),Pp=e=>String(e||"").replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean),Ii=e=>{let t=String(e||"").trim();return t?t.split(",").map(n=>n.trim()).filter(Boolean).length:0},Bv=e=>{let t=new Map,n=e[0]??0,s=0;for(let o of e){let r=(t.get(o)||0)+1;t.set(o,r),r>s&&(s=r,n=o)}return n};vc=20;xc=40});function Je(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function _f(e){let t=String(e||"");return vf&&(t=t.replace(vf," ")),t.replace(/\s+/g," ").trim()}function Rf(e){let t=String(e||"");t=t.replace(lx," ").replace(/\s+/g," ").trim();for(let n=0;n<3;n++){let s=t,o=t.match(ix);if(o&&(t=o[1].trim()),o=t.match(ax),o&&(t=o[1].trim()),o=t.match(xf),o&&(t=o[1].trim()),o=t.match(Ef),o&&(t=o[1].trim()),o=t.match(Sf),o&&(t=o[1].trim()),o=t.match(cx),o&&(t=o[1].trim()),o=t.match(kf),o&&(t=o[1].trim()),o=t.match(ux),o&&(t=o[1].trim()),o=t.match(dx),o&&hs.test(o[1].trim())&&(t=o[1].trim()),o=t.match(px),o&&hs.test(o[1].trim())&&(t=o[1].trim()),o=t.match(fx),o&&hs.test(o[1].trim())&&(t=o[1].trim()),o=t.match(mx),o&&hs.test(o[1].trim())&&(t=o[1].trim()),o=t.match(hx),o&&hs.test(o[1].trim())&&(t=o[1].trim()),o=t.match(gx),o&&hs.test(o[1].trim())&&(t=o[1].trim()),o=t.match(bx),o&&(t=`what ${o[2].toLowerCase()} ${o[1].trim()}`),o=t.match(wx),o&&(t=`what does ${o[1].trim()} mean`),o=t.match(yx),o){let r=o[1].trim();rx(r)||(t=!$x.test(r)&&(nx.test(r)||hs.test(r))?r:`describe ${r}`)}if(o=t.match(vx),o){let r=o[1].trim();(hs.test(r)||xx.test(r)||kf.test(r)||xf.test(r)||Sf.test(r)||Ef.test(r)||Ex.test(r))&&(t=r)}if(t===s)break}return t}function jx(e){let t=String(e||"");for(let n=0;n<3;n++){let s=t,o=t.match(Sx);if(o&&(t=o[1].trim()),o=t.match(kx),o&&(t=o[1].trim()),t===s)break}return t}function Rx(e){let t=String(e||"");for(let n=0;n<3;n++){let s=t.match(_x);if(!s)break;let o=s[1].trim();if(!o||o===t)break;t=o}return t}function Ix(e){let t=String(e||""),n=t.match(Ax);if(n){let o=Af[n[1].toLowerCase()],r=Tf[n[2].toLowerCase()];return`${o} ${r} ${n[3].trim()} and ${n[4].toLowerCase()}`}let s=t.match(If);return s?`which modules transitively import ${s[1].trim()}`:t}function Oi(e){return String(e||"").replace(Kv,t=>ac[t.toLowerCase()])}function Ys(e){let t=Oi(e);return t=t.replace(Yv,n=>cc[n.toLowerCase()]),t=t.replace(Xv,n=>lc[n.toLowerCase()]),t=t.replace(Jv,"with"),t=t.replace(Qv,(n,s)=>`${s} for`),t=t.replace(Zv,(n,s)=>`for ${s}`),t=t.replace(ex,(n,s)=>s),t=t.replace(Cx,"$1$2"),t=t.replace(Yd,"$1ing"),t=Rf(t),t=Rx(t),t=jx(t),t=Ix(t),t=_f(t),t=on(t),t=t.replace(/\?{2,}\s*$/,"?"),t.replace(/\s+/g," ").trim()}function Sr(e){for(let t of[...Jd,...Xd]){let n=e.match(t.re);if(n)return t.to(n).replace(/\s+/g," ").trim()}return e}function Tc(e){for(let t of Ox){let n=e.match(t.re);if(n)return t.to(n).replace(/\s+/g," ").trim()}return e}function Cf(e){let t=String(e||"").match(Lx);if(!t)return null;let n=t[1].toLowerCase(),s=t[2].trim();return s?{entWord:n,predicate:s}:null}var Hv,Kv,jf,Yv,Xv,Jv,Qv,Zv,ex,tx,vf,nx,hs,sx,ox,rx,ix,ax,xf,Ef,Sf,cx,lx,ux,dx,px,fx,mx,hx,gx,bx,wx,yx,$x,vx,xx,Ex,kf,Sx,kx,_x,Tf,Af,Tx,Ax,If,Cx,Ox,Lx,et,Bt,me,jn=O(()=>{Un();Hv=e=>new RegExp("\\b("+Object.keys(e).sort((t,n)=>n.length-t.length).map(Je).join("|")+")\\b","gi"),Kv=Hv(ac),jf=e=>new RegExp("\\b("+Object.keys(e).sort((t,n)=>n.length-t.length).map(Je).join("|")+")\\b(?!\\.[a-z0-9])","gi"),Yv=jf(cc),Xv=jf(lc),Jv=/(?<=^|\s)w\/(?=\s|$)/gi,Qv=/\b(thx|thanks|thank\s+you|many\s+thanks|ty|cheers)\s+4\b/gi,Zv=/\b4\s+(example|instance)\b(?!\s*[a-z])/gi,ex=/\b(this|that)\s+(class|module|function|method|attribute|variable|file|commit)\b/gi,tx=Object.keys(de).sort((e,t)=>t.length-e.length).map(Je).join("|"),vf=wr.length?new RegExp("\\b("+[...wr].sort((e,t)=>t.length-e.length).map(Je).join("|")+")\\b\\s*,?","gi"):null;nx=new RegExp("\\b(?:"+Object.keys(de).sort((e,t)=>t.length-e.length).map(Je).join("|")+")\\b","i"),hs=/^(?:which|what|who|whose|where|when|why|how)\b/i,sx=new Set(["modules","files","packages","functions","methods","classes","attributes","fields","properties","variables","globals","commits","changes","tests","members"]),ox=/^(?:all\s+|the\s+)?(?:module|file|package|function|method|class|attribute|field|property|variable|global|commit|change|test|member)\??$/i,rx=e=>{if(ox.test(e))return!0;let t=e.replace(/\?+\s*$/,"").trim().split(/\s+/);return sx.has((t[t.length-1]||"").toLowerCase())},ix=/^(?:hi|hiya|hello|hey|yo|howdy|g'?day|yeah\s+nah|good\s+(?:morning|afternoon|evening|day)|greetings|salutations)(?:\s+(?:there|pardner|folks|friend|mate))?\s*[,.—–-]\s*(?:(?:just\s+a\s+)?quick\s+question\s*[,:—–-]?\s*)?(.+)$/i,ax=/^(?:thanks|thank\s+you|many\s+thanks|thx|ty|cheers)(?:\s+(?:so\s+much|a\s+lot|very\s+much|a\s+bunch))?\s*[,—–-]\s*(?:(?:just\s+a\s+)?quick\s+question\s*[,:—–-]?\s*)?(.+)$/i,xf=/^(?:(?:ok(?:ay)?|aight|cool|alright|sure|right|fine|great|nice|got it|gotcha|sounds good|no worries|no problem|(?:just\s+)?(?:one|another)\s+more|another\s+one)[\s,]+)+(.+)$/i,Ef=/^(?:just\s+(?:poking\s+around|looking\s+around|browsing|exploring|checking\s+(?:this|it)\s+out)|first\s+time\s+(?:trying\s+this\s+out|using\s+this|here)|i'?m\s+new\s+(?:here|around\s+here|to\s+(?:this|all\s+this)(?:\s+(?:repo|codebase|project|app|tool|thing))?))\s*[,.—–-]\s*(.+)$/i,Sf=/^(?:(?:maybe|possibly|perhaps)\s+)+(.+)$/i,cx=/^(?:please[\s,]+)+(.+)$/i,lx=/,?\s*if\s+(?:it'?s|it\s+is|that'?s|that\s+is)\s+not\s+too\s+much\s+(?:trouble|bother|hassle)\s*,?\s*/i,ux=/^(?:can|could|would|will)\s+you\s+(?:please\s+)?(.+?)(?:[,\s]+please)?\??$/i,dx=/^explain\s+(?:to\s+me\s+|please\s+)*(.+?)\??$/i,px=/^tell\s+me\s+(?:please\s+)?(.+?)\??$/i,fx=/^(?:(?:would|do)\s+you\s+)?mind\s+telling\s+(?:me|us)\s+(?:please\s+)?(.+?)\??$/i,mx=/^do\s+you\s+know\s+(.+?)\??$/i,hx=/^i(?:'d|\s+would)?\s+(?:(?:like|want|need)\s+to|wanna)\s+know\s+(.+?)\??$/i,gx=/^i(?:\s+was|\s+am|'m)?\s+(?:just\s+)?(?:wonder(?:ing|ed)?|curious)(?:\s+(?:if|whether|about))?\s+(.+?)\??$/i,bx=/^what\s+((?:an?\s+|the\s+)?[\w'-]+(?:\s+[\w'-]+){0,2})\s+(is|are)\??$/i,wx=/^what\s+((?:an?\s+|the\s+)?[\w'-]+(?:\s+[\w'-]+){0,2})\s+means\??$/i,yx=/^(?:show|give)\s+me\s+(?:the\s+)?(.+?)\??$/i,$x=/^everything\s+i(?:'d|\s+would)?\s+need\b/i,vx=/^(?:and|also|so|then|now|but)\s+(.+)$/i,xx=/^(?:does|do|did|is|are|was|were|has|have|had|can|could|will|would|should)\b/i,Ex=/^(?:the|its|their|his|her|our|my)\s+[\w'-]+(?:\s+[\w'-]+){0,2}\s+(?:that|which|who)\s+\S/i,kf=/^(?:(?:actually|no\s+wait|wait|hold\s+on|never\s+mind|scratch\s+that|on\s+second\s+thought|i\s+mean(?:t)?)[\s,.]+)+(.+)$/i;Sx=/^(?:since|although|(?:even\s+)?though|while|because|whereas|given\s+that|now\s+that)\s+.+?,\s*(.+)$/i,kx=/^(.+?),\s*(?:since|although|(?:even\s+)?though|while|because|whereas|given\s+that|now\s+that)\s+.+$/i;_x=/^.+?(?:\s*(?:--|—|-)\s*)?\b(?:sorry|i\s+mean)\b\s*(?:--|—|-|,|:)\s*(.+)$/i;Tf=Object.freeze({imports:"importing",calls:"calling",touches:"touching",tests:"testing",exports:"exporting",contains:"containing",defines:"defining",uses:"using","inherits from":"inheriting from"}),Af=Object.freeze({module:"modules",class:"classes",function:"functions",method:"methods",attribute:"attributes",variable:"variables",commit:"commits",file:"files"}),Tx="public|private|protected|static|abstract|constant|re-?exported|exported|tested|covered|untested|uncovered",Ax=new RegExp("^if\\s+(?:a|an|the)?\\s*("+Object.keys(Af).join("|")+")\\s+("+Object.keys(Tf).join("|")+")\\s+(.+?),\\s*(?:is|are)\\s+(?:it|that|they|this)\\s+("+Tx+")\\??$","i"),If=/^if\s+(.+?)\s+(?:were|was)\s+(?:deleted|removed),?\s*what\s+(?:would|might|could)\s+(?:break|fail|be\s+affected)\??$/i;Cx=new RegExp(`^(where\\s+(?:is|are|was|were)\\s+.+?)\\s+(?:${rc.map(Je).join("|")})(\\s*[?.!]*)$`,"i");Ox=Object.freeze([{re:/^what\s+(?:functions?|methods?|members?|attributes?|fields?|properties)\s+(?:are|is)\s+(?:in|inside|within)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+(?:functions?|methods?|members?|attributes?|fields?|properties)\s+(?:does|do)\s+(.+?)\s+have\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+are\s+(?:the\s+)?(?:functions?|methods?|members?|attributes?|fields?|properties)\s+(?:of|in|inside|within)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^(?:the\s+)?(?:members?|methods?|attributes?|contents)\s+of\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+is\s+(?:in|inside)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+else\s+is\s+(?:in|inside)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+(?:defined|declared)\s+(?:the\s+)?(?:function\s+|method\s+|class\s+|module\s+|variable\s+|constant\s+)?(.+?)\??$/i,to:e=>`where is ${e[1]} defined`},{re:/^where'?s\s+(?:the\s+)?(.+?)\s+(defined|declared|located|implemented)\??$/i,to:e=>`where is ${e[1]} ${e[2]}`},{re:/^were\s+is\s+(?:the\s+)?(.+?)\s+(defined|declared|located|implemented)\??$/i,to:e=>`where is ${e[1]} ${e[2]}`},{re:/^what\s+is\s+the\s+purpose\s+of\s+(?:the\s+)?(?!(?:an?|it|this|that|these|those)\s)(.+?)\??$/i,to:e=>`what is a ${e[1]}`},{re:new RegExp(`^what\\s+does\\s+(?:the\\s+)?(?!(?:an?|it|this|that|these|those)\\s)(.+?)\\s+do\\s+(?:${ic.map(Je).join("|")})\\??$`,"i"),to:e=>`what is a ${e[1]}`},{re:/^(?:which|what)\s+(?:the\s+|all\s+)?([a-z][a-z-]*?)\s+(?:are|is)\s+(public|private|protected|static|abstract|constant|exported|re-?exported|tested|covered|untested|uncovered)\??$/i,to:e=>`${e[2].toLowerCase()} ${e[1].toLowerCase()}`},{re:/^what\s+(?:is|are)\s+(not\s+)?(tested|untested|covered|uncovered)\??$/i,to:e=>{let t=e[2].toLowerCase();return`${e[1]?t==="tested"?"untested":t==="covered"?"uncovered":t:t} modules`}},{re:/^what\s+does\s+(.+?)\s+changes?\s+together\s+with\??$/i,to:e=>`what co-changes with ${e[1]}`},{re:/^what\s+changes?\s+together\s+with\s+(.+?)\??$/i,to:e=>`what co-changes with ${e[1]}`},{re:/^how\s+many\s+commits\s+(?:are|were)\s+(?:recorded|logged)\s+(?:for|against)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`how many commits touched ${e[1]}`},{re:/^who\s+(?:wrote|authored)\s+(?:the\s+)?(?!(?:commit\s+)?[0-9a-f]{7,40}\??$)(.+?)\??$/i,to:e=>`who touched ${e[1]}`},{re:/^who\s+is\s+the\s+authors?\s+of\s+(?:the\s+)?(?!(?:commit\s+)?[0-9a-f]{7,40}\??$)(.+?)\??$/i,to:e=>`who touched ${e[1]}`},{re:/^(?:does|do)\s+(?!.*\bnot\b)(.+?)\s+have\s+(?:any\s+)?(?:tests?|test\s+coverage|coverage)\??$/i,to:e=>`what tests ${e[1]}`},{re:/^(?:is|are)\s+(?!.*\bnot\b)(.+?)\s+tested\??$/i,to:e=>`what tests ${e[1]}`},{re:/^what\s+needs\s+(?:to\s+be\s+)?(?:a\s+)?(?:tested|tests?|testing|coverage|covering)\??$/i,to:()=>"untested modules"},{re:/^(?:which|what|list|show(?:\s+me)?|find)?\s*(?:the\s+|all\s+)?([a-z][a-z-]*?)\s+(?:(?:that|which)\s+)?(?:have|has|having|with)\s+no\s+tests?\??$/i,to:e=>`untested ${e[1].toLowerCase()}`},{re:/^(?:which|what|list|show(?:\s+me)?|find)?\s*(?:the\s+|all\s+)?([a-z][a-z-]*?)\s+without\s+(?:any\s+)?tests?\??$/i,to:e=>`untested ${e[1].toLowerCase()}`},{re:new RegExp(`^(?:do|does)\\s+(.+?)\\s+(${tx})\\s+(?:anything|something)(?:\\s+else)?\\??$`,"i"),to:e=>`what does ${e[1]} ${e[2]}`}]);Lx=new RegExp("^(?:which|what|who|list|show(?:\\s+me)?|find|give\\s+me)?\\s*(?:the\\s+|all\\s+)?([a-z][a-z-]*)\\s+(?:(?:that|which|who)\\s+)?(?:(?:do|does|did|are|is|was|were|have|has|can|could|will|would|should)\\s+not|cannot|can't|won't|couldn't|shouldn't|wouldn't|not)\\s+(.+)$","i");et=new Set(["what","who","which","where","when","why","how","does","do","did","is","are","was","were","the","a","an","of","to","from","at","in","on","there","something","anything","nothing","one","any","anywhere","last","usually","typically","generally","normally","often","commonly","mostly","should","would","could","can","will","shall","might","must"]),Bt=e=>String(e).replace(/\?+\s*$/,"").replace(/,/g," ").split(/\s+/).filter(Boolean),me=e=>e.flatMap(t=>String(t).toLowerCase().split(" "))});var Lf,Of=O(()=>{Lf={source:"corpus/wordnet/*.jsonl lemmas, expanded through the regular -s/-ed/-ing inflections",generator:"scripts/generate-real-word-collisions.mjs",targets:["alongside","build","builds","built","call","calling","calls","change","changed","changes","check","checks","class","co-change","co-changes","code","commits","contain","containing","contains","couple","couples","cover","covers","declare","declares","define","defined","defines","defining","denote","denotes","denoting","depends","derive","derives","directly","edited","execute","executes","exercise","exercises","explicitly","export","exporting","exports","expose","exposes","extend","extending","extends","fire","fires","from","grab","grabs","have","hits","hold","holds","hooked","import","importing","imports","included","indirectly","inherit","inheriting","inherits","inside","into","invoke","invokes","kick","kicks","kind","land","landed","lean","leans","live","lives","make","makes","modified","modifies","move","moves","parent","part","pass","passes","pull","pulls","re-export","re-exports","reference","references","relies","rely","require","requires","runs","serve","serves","serving","share","shares","sits","subclass","subclasses","subclassing","superclass","superclasses","sure","talk","talks","tend","tends","test","testing","tests","through","together","touch","touched","touches","touching","transitively","trigger","triggers","tweaked","updated","uses","using","usually","verifies","verify","went","were","wired","with"],words:["aalging","aasing","aave","ablies","abling","aboves","absing","abuses","abusing","acauling","achinged","acolds","acquire","acquires","acyling","adelies","adenine","adenined","adenines","adenining","adenota","adenotaing","adenotas","aditted","aerides","aerified","aerifies","aerify","aerying","affine","affined","affines","affining","afire","afires","afling","agalling","ailing","aired","airied","airies","airport","airporting","airports","airsed","airses","airted","alaing","alases","albing","alecks","aleves","aliaes","alikes","alines","alive","alives","allaing","allies","alling","alls","allying","alongsided","alongsides","alping","alting","altogether","amasses","amazes","amends","amorting","amorts","amuses","amusing","analling","anded","anoded","ansing","anuses","apart","aparts","apises","apparent","appends","appose","apposes","apsing","apsises","arab","arabis","arabs","ardent","argent","arpent","arrive","arrives","arsing","asaing","asding","aseans","ases","ashing","ashore","ashores","asing","asking","asping","asring","asses","assess","assets","assing","assure","attending","attest","attesting","attests","audited","aufing","auging","auking","aurifies","aurify","avouch","avouched","avouches","avouching","awaked","awakes","awared","awares","awling","awried","axling","baases","badded","bailed","bailing","baited","bake","bakeds","bakers","bakes","balded","balding","baling","balk","balking","balks","ball","balling","balls","ballsing","ballying","balming","band","banded","bandeds","bandied","bandsed","banked","banned","barded","barelies","barely","barses","bart","baseses","bashes","basing","basises","bass","bassed","basses","basset","bassets","bassos","bastes","basting","batses","bauded","baulks","bawded","bawling","bbsing","beaked","bean","beanos","beans","beasting","beasts","beating","beeting","begild","begilds","behave","behold","beholds","belied","belief","beliefs","belies","belikes","belizes","belles","bellies","belling","belting","bend","bended","bends","bent","berging","bering","berking","berming","beroes","besets","besots","besses","bessing","best","besting","bests","beting","betting","bevies","bhanged","biered","bigger","biggers","billing","bind","binded","birded","birled","birles","biroed","birred","bising","bjsing","bladed","blanced","bland","blanda","blandaed","blanded","blands","blanked","blares","blases","blasts","bleaked","bleaks","blears","bleats","blended","blends","blesting","blests","blinded","blinds","blited","blites","bloked","blonded","bmuses","bnsing","boched","boches","boching","bocked","bode","bodilied","bodilies","boiled","boileds","bokked","bold","bolds","bolling","bonded","boners","bonked","boobed","booked","bookeds","bookend","booker","bookied","booksed","boomed","booned","boored","booted","boozed","borers","borough","bosked","bosses","botched","botches","botching","boucheed","bouchees","boucle","boucled","boucling","boughed","boughing","boules","boulle","boulles","bouses","bousing","bowers","boxers","bpsing","bragger","braggers","brakes","branded","brasses","breaked","breves","breving","bricks","brigged","brills","broked","brooked","bruins","brunts","brunus","bses","bsing","bugled","bugles","buhled","builders","buildups","bull","bulled","bullet","bulling","bulls","buns","bunses","bunsing","buried","burieds","burled","burleds","buses","bushes","bushing","busied","busies","busking","bussing","busying","buyied","buying","bypass","bypasses","caballing","cabals","cabbing","cabers","cabged","cabging","cables","cablin","cabling","cablins","caching","cackling","cadded","cadding","cadent","cadged","cadges","cadging","cadring","cafers","caffing","cafing","cagers","caging","cagying","caining","cajoling","cake","cakes","cakiling","caking","calcine","calean","caleans","caleying","caleys","calf","calfing","calfs","califs","calkin","calking","calkins","callaing","callas","callers","callinged","callings","callous","callowing","callows","calluna","callus","calm","calming","calmings","calmlying","calms","calquing","calvaing","calvas","calves","calving","calvings","calx","calxes","calxing","calycling","calyxing","camass","camelling","camels","camming","camoing","camping","canaing","canalling","canals","candid","candied","candled","candling","cangue","cangued","cangues","caning","canning","canoes","canting","cantling","capers","caping","caplin","caplins","capoing","capping","captain","captaining","captains","carded","carding","caring","carking","carlina","carline","carling","carlings","carlos","carning","caroling","carolling","carols","carping","carring","cart","carting","carver","carvers","carves","casaing","cashes","cashing","casking","cassies","castes","castling","casually","casuses","caters","catling","catlings","catses","catsing","catting","cattling","caul","cauline","cauling","caulking","cauls","cavaing","cave","caverns","cavilling","cavils","caving","cavying","cawing","caying","ceases","cecalling","cede","cedied","ceiling","cell","celling","celloing","cellos","cells","cellsing","cent","cercises","cere","cering","cerise","cerises","ceroing","cerring","certain","certaining","certains","certifies","certify","cervina","cervus","cfling","cgsing","chadded","chafed","chaffed","chafinged","chagaed","chagas","chagga","chaggaed","chaggas","chained","chainsed","chainses","chaired","chaise","chaised","chaises","chaited","chaits","chajaed","chalked","chalking","challis","champed","chanal","chanals","chanar","chanars","chance","chanced","chancels","chances","chancied","chancies","chancre","chancred","chancres","chancy","changers","channels","chanted","chanters","chanteys","chantied","chanties","chanty","chaosed","chaoses","chapped","charded","chards","charge","charged","chargers","charges","charied","charmed","charms","charred","charrs","charted","charts","chased","chasmed","chasms","chassed","chaste","chasted","chastes","chatted","chaunaed","chaused","chauses","chawed","cheaps","cheats","checkeds","checkers","checksum","checkups","cheek","cheeks","cheeps","chelas","chenned","cheops","cherts","chesting","chewas","chianed","chick","chicks","chigger","chiggers","chiling","chilling","chills","chinaed","chined","chines","chinked","chinks","chinned","chinoed","chirks","chits","chives","choanaed","chock","chocked","chocks","choked","choker","chokers","choler","cholers","chonned","choosed","chords","chores","chough","chuaned","chuck","chucks","chugged","chunga","chungaed","chungas","chunked","chunks","chyling","cialis","cicers","ciders","circed","circes","cive","cives","civies","cladded","claded","clades","clading","clads","claims","clamps","clams","clamses","clanged","clangers","clanks","clans","claps","clarks","claros","clash","clashes","clasp","clasps","classed","classic","classy","clast","clasts","clausa","clausas","clause","clauses","claver","clavers","clavus","clawing","claws","claying","clays","clean","cleans","cleanse","clerks","clever","clevers","cliing","climes","clinged","cloaks","clocks","closer","closers","closes","cloved","cloven","clovens","clover","clovers","clucks","cluing","clving","clxing","cnsing","coached","coaches","coaching","coaling","coasts","coaxer","coaxers","cobber","cobbers","cobble","cobbles","cocain","cocaining","cocains","cocked","cocker","cockers","cockle","cockles","coda","codaed","codded","coddles","coded","coders","codes","codex","codgers","codified","codifies","codling","cods","coed","coeurs","coffer","coffers","coggle","coggles","coheres","coiling","coiner","coiners","coired","coke","colaing","cold","colded","colding","colds","cole","coleus","coliing","coling","colling","collins","collying","colors","coltan","coltanning","coltans","colter","colters","colting","comalling","combats","comber","combers","come","comer","comers","comfies","comfit","comfits","comics","comints","comity","commas","comments","commes","commie","commied","commies","comming","commit","commix","commixes","commons","commute","commutes","compel","compels","compile","compiles","complies","comply","comport","comporting","comports","conched","conches","conching","concluded","cone","coneys","confer","confers","confining","confits","conged","conger","congers","conges","conjoin","conjoining","conjoins","conked","conker","conkers","constrain","constraining","constrains","contact","contacting","contacts","contadinoing","contadinos","contagion","contagioning","contagions","containeds","containers","contemn","contemning","contemns","continuing","contrail","contrailing","contrails","contriting","contriving","converse","converso","converts","convex","convey","conveys","convoke","convokes","cooked","cookeds","cookers","cookied","cooled","cooler","coolers","cooling","cooned","cooped","cooper","coopers","cooted","cooter","cooters","copalling","cope","copeck","copecks","copier","copiers","copies","copper","coppers","copses","copula","copulas","coralling","corded","core","coreference","coreferences","corer","corers","corked","corker","corkers","corner","corners","corpse","corpses","corvee","corvees","cosecs","cosher","coshers","cosmics","cosmids","cosses","costing","cotanning","cotans","cote","cotter","cotters","couch","couched","couches","couching","coude","couded","coue","coughed","coughing","coupe","coupes","coupleds","couplers","couplets","coupon","coupons","course","courses","couthed","couthing","coved","coven","covens","covereds","coverts","covet","covets","covey","coveys","cower","cowers","cowling","cowpie","cowpies","cozens","cpsing","crab","crabs","cracks","cradling","cragged","crakes","craned","cranes","cranked","cranned","crass","crasses","crawling","crawls","creaked","creaks","credited","creeks","cresting","crests","criers","cringe","cringed","cringes","crocks","crooked","crouch","crouched","crouches","crouching","croupe","croupes","crumple","crumples","cruses","crusing","cses","csing","ctened","ctenes","cubing","cuking","culling","culming","culting","cupalling","cupels","cupsing","cupule","cupules","cure","curing","curling","curses","cursing","curtain","curtaining","curtains","curves","curving","cusking","cusping","cussing","cuting","cutlass","cutses","cutsing","cxling","cxlving","cyanned","cyanoed","cycling","cyders","cymling","cysting","dadded","dahling","dailing","daises","daling","dall","dalliing","dalling","dallis","dalls","dallying","daloing","danced","dander","dandied","dandled","danked","dansed","danses","darded","darling","dart","dashes","dassed","dassies","dative","datives","dayses","ddsing","deafened","deafening","deafing","deaing","dealting","dean","deaned","deaning","deans","dearie","dearies","debate","debates","debating","debiled","debiling","deboned","debrises","debted","decade","decades","decalling","decease","deceases","deceive","deceives","decents","decided","deciding","deciled","deciling","declaim","declaims","declareds","declarers","declaw","declined","declining","decocting","decodes","decoding","decoing","decoke","decokes","decoking","decouple","decouples","decoying","decries","deepens","deface","defaced","defaces","defacing","defame","defamed","defames","defaming","defang","defanged","defanging","defangs","defence","defenced","defences","defencing","defended","defending","defends","defensed","defenses","defensing","deference","deferences","deferenses","defiance","defianced","defiances","defiancing","defiant","defianted","defianting","defiants","defied","defies","defile","defiled","defilers","defiles","defiling","defininged","definings","definited","definites","definiting","deflate","deflates","deftness","defuse","defused","defuses","defusing","deglaze","deglazes","deicing","deified","deifying","deigned","deigning","deisted","deists","deitied","delete","deletes","deleting","delfing","delfting","deliing","delivers","delling","delving","demands","demised","demising","demode","demodes","demoding","demoing","demote","demotes","demoting","dengue","dengues","denguing","denied","denned","denotives","denotiving","densaing","denses","densing","dent","dentate","dentates","dentating","dente","denteds","dentes","dentin","dentined","dentines","denting","dentining","dentins","denude","denudes","denuding","denying","depart","depend","depended","deplane","deplanes","deplore","deplores","deponed","deposing","depotting","deprave","depraves","deprive","depriveds","deprives","depute","deputes","deputing","derating","derbies","deride","derides","deriding","derisive","derisives","deriveds","dermises","derpies","derping","derring","derrises","derving","descends","deserve","deserves","deserving","designed","designing","desired","desiring","desking","desponds","dessing","destined","destines","destining","destiny","detained","detaining","detents","detest","detesting","detests","detinue","detinued","detinues","detinuing","detoxes","detoxing","deuses","deusing","deveined","deveining","deviced","devicing","deviled","devised","devising","devote","devoteds","devotees","devotes","devoting","devouting","dewied","dewiness","dewing","dexoned","dhalling","dholed","dholes","dick","dicks","dieted","digger","diggers","dilling","dining","dinted","dinting","dire","direct","directed","director","directory","directs","dired","dires","dirged","dirges","dirked","disport","disporting","disports","disses","ditaed","ditted","dive","dives","divest","divine","divined","divines","divining","dmuses","docked","doleds","dolling","domine","domined","domines","domining","donate","donates","donating","doobed","doomed","doored","dopeds","dories","dorked","dosing","dosses","doting","double","doubles","douched","douches","douching","doughed","doughing","douses","dousing","dove","doves","dowers","dozers","drab","drabas","drabs","dragger","draggers","drained","draining","drakes","dranged","drecks","drilies","drive","drivels","drivens","drivers","drives","drover","drovers","drunks","druses","drusing","drylies","dses","dsing","dsling","dtsing","ducing","duding","dudses","dudsing","duking","dulies","dull","dulling","dulls","dulses","dulsing","duning","duns","duoing","duping","duples","during","dusking","eagling","earling","earses","easies","easing","easted","easting","eating","eatses","ebitted","ebooked","ebsing","ebving","echted","eclats","ecting","eddaed","eddied","eddoed","edgied","edibled","edicted","editeds","editor","editted","edsing","edtaed","educed","eduled","eelses","eerilies","eerily","eerying","effort","efforting","efforts","efting","egesting","egests","eidoses","eiraed","elan","eland","elanded","elanned","elans","elanus","elated","elegans","elided","elinted","elited","elling","elocute","elocutes","elopses","elsing","eluted","elvers","emending","emiled","emitted","emoted","emoting","emsing","enated","enates","enating","encode","endived","ends","energise","energises","enquire","enquires","ensile","ensure","entendring","ententing","epopses","eposes","equally","equine","equines","eraing","erectly","erging","erning","eroses","erring","ersted","ersting","erudited","erying","escort","escorting","escorts","eses","esing","esports","esportsing","espouse","espouses","esquire","esquires","esting","ests","eternise","eternises","ethoses","evicted","evoked","evokes","exceed","exceeding","exceeds","exchange","exchanged","exchanges","excite","excited","excites","excluded","execrate","execrates","executeds","executive","executives","executors","exegete","exegetes","exercisers","exerciseses","exerting","exerts","exhort","exhorting","exhorts","exiled","existed","exitted","exodes","exorcise","exorcisers","exorcises","exorcism","exorcisms","exorcist","exorcists","exorcize","exorcizes","expand","expanding","expands","expanse","expanses","expats","expatting","expect","expecting","expects","expend","expending","expendings","expends","expense","expenses","expensing","expert","experting","expertise","expertises","experts","expiating","expiring","expiry","expirying","explicit","explicits","explode","explodes","exploit","exploiting","exploits","exploring","expoing","exporters","exportinged","exportings","expos","exposeds","exposing","exposure","exposures","express","exsert","exserting","exserts","extant","extanting","extants","extendeds","extent","extented","extenting","extents","extern","externa","externaing","externas","externed","externing","externus","extort","extorting","extorts","extruding","fabling","fadded","failing","failling","faire","faires","fairies","faited","fake","fakers","fakes","fall","falling","fallings","falls","fallsing","falses","falsing","fanned","farces","fare","fares","fart","fasces","fassed","fasting","fawkes","fcsing","feasting","feasts","feating","fecalling","feeting","feined","feining","feisting","feists","felids","feline","felined","felining","felises","fellies","felling","felting","fend","fended","fends","feres","ferined","fering","ferining","ferning","ferring","fesses","fessing","feting","fetting","fevers","fibers","fibre","fibres","fice","fices","fide","fides","fiends","fierce","fierces","fieries","fieris","fife","fifes","figure","figures","file","filers","files","filets","filles","filling","filses","find","finded","fine","finers","fines","fining","fiords","fireds","firm","firmas","firmers","firms","firmus","firsts","firths","fishes","fisting","fitses","fixe","fixeds","fixers","fixes","fizzes","flakes","flange","flanges","flanked","flanned","flasks","flecks","flicks","fliers","flirts","focalling","fold","folds","folies","folked","fonded","fooded","fooled","footed","forces","fore","fores","forest","forges","forked","form","fortes","fosses","fountain","fountaining","fountains","foyers","fpsing","freaked","frieds","friers","fries","frigged","frog","froms","frores","fros","frsing","fsbing","fshing","full","fulling","fulls","fuming","funded","funs","furies","furzes","fuseds","fusees","fusels","fuses","fusing","fussing","fuzing","fwsing","gabling","gabs","gadded","gaeling","gaited","galaing","galing","gall","galliing","gallina","galling","gallings","gallis","galls","gallus","gand","ganded","gander","gandied","ganked","gaoling","garb","garbs","garded","garment","garnet","gaseses","gashes","gassed","gassies","gatling","gauched","gauches","gauching","gauded","gauling","gausses","gcsing","gean","geans","gelids","gellies","gelling","gelting","genies","genome","genomes","genoming","gent","germing","gerres","gestaing","gestes","gesting","getting","gilling","girded","girled","giroed","gisting","give","givens","gives","gladded","gladed","glanced","gland","glanded","glands","glandsed","glansed","glares","glass","glasses","glassy","gleams","glean","gleans","glides","glises","gofers","gold","golds","gonded","goners","gooded","goofed","gooked","gooned","gooped","goosed","gorals","gouached","gouaches","gouaching","governs","gpsing","graces","grad","grades","grads","graf","grafs","grafts","grails","grains","gram","gramas","gramps","grams","gran","granded","grands","grange","granged","granges","grans","grants","grapes","graphs","grases","grasps","grass","grasses","grassy","gratas","grates","gratis","graves","gravis","gray","grays","grazes","greats","grebes","greylies","greyly","groaks","groans","groats","grouch","grouched","grouches","grouching","groves","grub","grubs","grunts","gruses","gsaing","gsring","guesting","guests","guiing","guild","guilds","guiled","guiles","guilt","guilty","guises","guising","gull","gulling","gulls","guns","guses","gushes","gushing","gussing","gutses","gutsing","guying","gyrans","habits","hacked","hadded","hagged","haicks","haiked","hailing","haired","haje","hakeas","hakes","halals","hale","halfing","haling","hall","halling","halls","halming","haloing","halting","halve","halved","halves","halving","hame","hand","handed","handeds","handel","hander","handied","handled","handsed","hanged","hangers","harded","harems","hares","harked","harold","harolds","hart","harvey","hashes","hassles","hastes","hasting","hate","hats","hauling","haved","haven","havens","haves","hawked","hawses","haze","heating","heave","heaved","heaven","heaver","heaving","hectare","hectares","hefting","heired","heisting","held","helds","helixes","helling","helving","herbes","herbing","herding","here","hering","herming","heroing","herpes","herring","hets","hetting","hexine","hexined","hexines","hexining","hexose","hexoses","hhsing","hiatus","hick","hicked","hicks","hies","hilling","hilts","hind","hinded","hinged","hinges","hins","hints","hips","hire","hired","hirers","hires","hirtas","hiss","hisses","hives","hivs","hoards","hoared","hoaxed","hobbed","hoboed","hocced","hocked","hockey","hodded","hods","hoed","hogged","hoists","hokaed","holcus","holders","holdups","hole","holed","holes","holeys","holism","hollas","hollos","holm","holms","holy","homers","homied","homoed","honied","honked","honker","honkey","honkied","honored","hooches","hooching","hood","hooded","hoodeds","hoods","hooeyed","hoofed","hoofeds","hoofer","hookah","hookeds","hooker","hookeri","hookers","hookied","hookies","hooksed","hookses","hookup","hooped","hoopoed","hoopsed","hooted","hooter","hooved","hooveds","hoovers","hopers","hopied","hopped","hopple","hopples","hopsed","horded","hordes","horned","horsed","hosing","hosted","hosting","hotbed","hots","hotsed","hotted","hounds","houred","housed","houses","housing","hover","hovers","hoyaed","hrts","hses","hsing","hucked","huging","hulked","hull","hulling","hullos","hulls","hunged","hunked","huns","huoned","hushes","hushing","husked","husking","husoing","huts","hyoids","ictalling","idioted","idlies","iising","ileals","illing","images","impact","impacting","impacts","impart","imparting","impartings","imparts","impasses","impends","implore","implores","imploring","impoliting","important","importeds","importeeing","importees","importers","importinged","importings","importune","importuning","imposing","impost","imposting","imposts","improving","impure","impures","impuring","imputing","inbuilt","incise","incite","inclined","inclosed","include","includeds","includes","income","incomes","indied","indirect","indirected","indirects","indite","indited","indole","indoles","inerting","inerts","inference","inferences","infidel","influxed","info","inhabit","inhabits","inhere","inhered","inherent","inherenting","inherents","inheriteds","inheritinged","inheritings","inheritors","inheritting","inhibit","inhibits","initio","inkied","inland","inlanded","inline","inosine","inquire","inquires","insane","insert","inserting","inserts","insided","insider","insiders","insides","insist","insoles","inspire","insted","insting","intake","intakes","intending","interim","interims","intermit","intermits","inti","intied","intoed","intones","intos","intro","intron","intros","intruded","invades","invert","inverting","inverts","invites","invoice","invoices","involve","involves","iodide","ipsing","ired","ires","ironside","irsing","iruses","ises","isiing","ising","island","islanded","isling","isming","isning","isring","itsing","iuding","jailing","jakes","janned","jawses","jean","jeans","jellies","jelling","jerking","jest","jesting","jestings","jests","jetting","jigger","jiggers","jirded","jive","jives","jocked","jokers","jooked","josing","josses","joules","jove","joves","juking","julies","juning","jure","juring","juses","jussing","justes","juting","kailing","kakkes","kalaing","kaliing","kaling","kalkas","karens","karling","kelpies","kelting","kenoing","kepting","keraing","kerbing","kerite","kerited","kerites","kerning","kerring","keynote","keynotes","keynoting","khanned","kianged","kickers","kied","killing","kilned","kina","kinaed","kinda","kindas","kindle","kindly","kinds","kine","kined","king","kinged","kinked","kinks","kinned","kino","kinoed","kins","kiosks","kirk","kirked","kirks","kisses","kith","kleins","klick","klicks","knacks","knocks","knucks","koined","kooked","kookied","kuiing","kvasses","kweeked","kylies","labbed","lacced","lacied","lacked","ladded","ladder","laddied","laded","ladied","ladled","ladling","laed","lagans","lagend","lagended","lagged","lahhed","lahued","laiced","laid","laided","lairded","lake","lakes","lakhed","lallying","lamaed","lambed","lament","lammed","lamnaed","lamped","lanaied","lanated","lanced","lancer","lances","lancet","landaued","landeds","lander","landers","landler","lands","lane","lang","langed","langued","lank","lankaed","lanked","lankied","lanned","lansaed","lanseh","lanset","lapped","lapsed","lapses","lard","larded","larder","larged","laried","larked","larred","lashed","lashes","lassas","lasses","lassies","lassos","lasted","lasting","latent","latest","latesting","latests","lathed","latked","latkes","latsed","latses","latted","lauans","laud","lauded","lauder","laudes","launced","launder","lavaed","laves","lavved","lawsed","lawses","laxaed","lazied","lead","leaded","leaden","leadens","leads","leaf","leafs","leak","leaked","leaks","leal","leals","leaners","leap","leaps","learn","learns","leases","leasting","leaven","leavens","leaving","ledded","lefting","legals","legends","lemnas","lemons","lended","lender","lends","lenifies","lenify","lens","lensed","lent","lented","lentes","lentoing","leon","leones","leons","lerring","lesses","lessing","letting","levants","levees","levels","levited","levving","lewded","lianaed","lianas","liared","libels","libred","lice","lices","lick","licks","lidded","lieded","lieges","lies","life","lifers","lifes","ligand","liganded","ligans","ligers","lignes","like","likeds","likens","likes","limans","lime","limens","limes","limeys","linden","lindied","line","lineds","linens","liners","lines","linged","linied","linked","linoed","linted","liraed","lirred","lises","lisles","listes","listing","lite","liters","lites","lithes","litred","livedos","livens","livers","livias","livids","llanoed","llanos","loached","loaches","loaching","loaded","loan","loans","localling","loched","loches","loching","locked","lode","lohans","loired","lolling","loners","longed","looked","looker","looksed","loomed","looned","looped","loosed","looted","lorded","losers","losing","losses","losting","louched","louches","louching","louded","loughed","loughing","loupes","louses","lousing","louver","louvers","lover","lovers","lowans","lowers","lsding","lubing","lueses","luesing","luging","lull","lulling","lulls","lunaed","lundaed","lunged","lunned","luoing","lure","luring","lushes","lushing","luting","luxing","lynxed","mace","macers","maces","maches","mackems","mackle","mackles","madake","madakes","madded","made","mades","maes","magens","mahoes","maided","mailing","maines","maired","maizes","makers","makeups","mako","makos","male","maleos","males","maliing","maliks","maling","mall","malling","malls","malsing","malting","mameys","mandaed","manded","mane","maneds","manes","manied","manies","mankies","manned","mansed","manxed","manxes","maples","mapling","mare","mares","marges","maries","markeds","markers","markets","marling","mart","martes","masers","mases","maskeds","maskers","mass","massed","masseds","masses","masting","mate","mateds","maters","mates","mateys","mattes","mauling","maunded","maxes","maybes","maze","mazeds","mazers","mazes","mazies","mealies","mean","means","meating","mediaed","mediated","medicied","meeting","meined","meining","melees","melias","melics","melting","mend","mended","mends","menoing","mere","merelies","merely","merges","merging","mering","merited","merles","merling","merring","merses","mersing","mesaing","meshing","mesning","messes","messing","meting","metrifies","metrify","mevving","mick","micks","mike","mikes","milling","mind","minded","minified","minifies","minkes","mire","mired","mires","miried","miries","miroed","mising","misses","misting","mitred","mitres","mlsing","mocked","models","modems","modes","modest","modifieded","modifiered","modifiers","modished","modishes","modisted","modistes","modses","mogens","mohaves","mohses","moired","mojave","mojaves","mold","molds","mole","moles","molest","molles","mollified","mollifies","molling","molvas","mommies","monded","mondes","monels","moneys","monked","monses","montan","montanning","montans","montes","mooched","mooches","mooching","mooded","mooned","moored","moosed","mooses","mooted","mope","mopeds","mopes","more","morels","mores","morses","mortified","mortifies","moses","moseys","moshes","mosting","mote","motels","motes","motets","motiffed","motive","motives","moue","moues","moulds","mountain","mountaining","mountains","mousing","mouthed","mouthing","moveds","movie","movies","moxies","mpsing","mrsing","msbing","mscing","mses","msging","mshing","msing","muanged","muched","muches","muching","muling","mull","mullas","mulling","mulls","mullus","muming","musaing","musding","musers","muses","mushes","mushing","musing","musings","musking","mussing","muting","mutually","myalling","myalls","myopes","nadded","nailing","naives","nakeds","nalline","nanaed","nanced","nand","nanded","nandued","nanned","narded","nashes","nasuses","nauched","nauches","nauching","nave","neating","nemine","nemined","nemines","nemining","nerding","nerve","nerves","nerving","nervus","nervying","nesses","nessing","nest","nesting","nestings","nestling","nests","netting","nevers","neving","newlies","newting","nexted","nexting","nick","nicks","nigger","niggers","nilling","nisied","nisting","nitred","nitres","niveas","nivose","nivoses","nocked","node","noired","noires","nolling","nonuple","nonuples","nooked","nookied","nooksed","nooned","noosed","nosing","notched","notches","notching","notified","notifies","noting","nouses","nousing","nsaing","nscing","nsfing","nsuing","nswing","nuding","nuited","nuking","null","nulling","nulls","nuns","nurses","nursing","nutses","nutsing","nuxing","oakens","oasing","oasises","oasting","oatses","observe","observes","observing","obtain","obtaining","obtains","occluded","oceans","ochers","octalling","octuple","octuples","odisted","ogives","oilies","oising","olds","olefine","olefined","olefines","olefining","oleins","olive","olives","onlies","onto","onuses","opalling","opiated","oppose","opposes","opulus","opuses","oralling","orange","oranged","oranges","oses","osing","otuses","ouring","ousels","outclass","outclasses","outclassing","outdated","outing","outrigger","outriggers","ovalling","over","overs","overts","pacoses","pacs","pact","padded","padres","pads","paduses","paeans","pageant","pageses","paided","pailing","painses","paired","paks","palases","paliing","paling","palling","pallying","palming","palmses","paloing","pals","palsies","pandaed","pander","pangses","panned","pans","pansies","pant","panted","pantses","paps","para","parang","pare","parental","parented","parents","parers","pareve","pari","paries","paring","parises","parity","park","parr","parsec","parsecs","parsed","parsee","parsees","parser","parsers","parses","parted","parti","partis","partly","parts","partses","party","paruses","parvenu","parving","pasches","paso","pasoed","pasos","pasques","passages","passed","passeds","passee","passeed","passees","passel","passels","passer","passers","passims","passives","passkey","passkeys","passu","passued","passus","pasted","pasteds","pastel","pastels","paster","pasters","pastes","pasties","pasting","pastises","pasts","patases","patens","patent","patents","patient","pats","patsies","pauling","paulis","paused","pauses","pausing","pave","pavises","pawling","paws","payees","payment","pays","pbsing","peaked","pean","peans","peated","peating","pecans","pecses","peeves","peeving","pekans","pelling","pelting","pent","percent","perces","percing","pere","periing","pering","perking","perming","perring","pert","peruing","perve","perves","perving","pesoing","pessed","pessing","pest","pesting","pestis","pestling","pestoing","pestos","pests","petited","petrifies","petrify","petting","peyote","peyotes","peyoting","phaged","pharos","pholis","phsing","pick","picks","piered","pigses","pill","pilling","pills","pinses","pinto","pintos","pisces","piss","pissed","pisseds","pisser","pissers","pisses","pistes","pisting","pith","pitses","plaided","planaed","planked","planned","planted","plashes","plated","pleads","pleats","plover","plovers","pmsing","poached","poaches","poaching","pocked","poises","pokers","polers","polies","poll","polling","pollos","polls","pommies","ponded","ponses","pooched","pooches","pooching","pooded","poofed","pooled","pooned","pooped","poored","pooved","pooves","porched","porches","porching","porked","port","portent","posers","poshes","posies","posing","posits","possed","posses","possess","posset","possets","postes","posting","potent","pouch","pouched","pouches","pouching","powers","praises","pranged","prat","prated","preference","preferences","prelims","premies","preses","presses","prexies","pricks","prigged","prises","prom","proses","proves","prunes","prunos","prunus","psaing","psas","pses","psiing","psing","pucing","puking","pula","pulas","pule","pules","puling","pullers","pullets","pulleys","pulling","pulp","pulps","pulsing","puns","pupals","pupated","pupils","pure","purelies","purely","purifies","purify","puring","purl","purls","pursing","puses","pushing","puss","pussed","pusses","pussies","pussing","pyrene","qianged","quaing","quakes","quares","quells","questing","quests","quicks","quiing","quilt","quired","quited","quoing","quolls","rabies","racies","radded","raided","railing","raises","rake","rakes","raling","rallies","rallying","ramies","ranaed","rand","randed","randied","raneed","ranges","ranied","ranked","ranted","rarelies","rarely","rarifies","rarify","rashes","rasing","rassed","rave","ravers","readies","realines","realise","realises","realizes","reallies","really","realties","realty","reaving","rebuild","rebuilds","reburies","recall","recalling","recalls","recces","reccies","recipes","recited","recites","reclines","recode","recommits","recover","recovers","redefine","redefined","redefines","redefining","redlines","reedies","reefies","reeving","referee","referees","referenceds","referent","refine","refined","refiners","refines","refining","refinings","refits","regias","regimes","regius","reined","reining","reited","reiting","rejigs","relaces","relates","relaxes","relay","relics","relict","relicts","relied","relief","reliefs","relieve","relieves","relievo","relievos","relines","relining","relish","relishes","relived","relives","remake","remakes","remise","remises","remiss","remits","remote","remotes","remoting","remove","removes","rend","rended","rends","renins","renises","rent","repands","repens","repents","repine","repined","repining","replay","replied","replies","reply","repose","reposes","requiems","requireds","requite","requites","requote","requotes","reruns","reserve","reserves","reserving","resets","reshes","reshing","reside","resides","resids","resiles","resins","resizes","respire","respires","ressing","rest","resting","restings","rests","retied","reties","reting","retire","retouch","retouched","retouches","retouching","retries","retting","reusing","reverence","reverences","revers","review","reviews","reviles","revise","revises","revive","revoke","revokes","revues","revving","rewire","rewired","rhuses","rick","ricks","rigged","riggeds","rigger","riggers","rilling","rimies","rind","rinded","ringer","ringers","ringside","rising","risses","rive","rives","rivets","roached","roaches","roaching","rocked","rogers","roilies","rolling","rons","rooded","roofed","rooked","rookied","roomed","rooted","ropers","ropies","rosies","rosing","rouble","roubles","roughed","roughing","rounds","rouses","rousing","rove","rover","rovers","roves","rowers","rubens","rubies","rubing","rubins","rubs","rudelies","rudely","ruding","rues","rugger","ruggers","rugs","ruins","rulied","rulies","ruling","ruly","rumens","rums","rune","runes","rung","rungs","runics","runing","runt","runts","runups","ruses","rushes","rushing","rusing","rusking","russing","ruts","saales","saaling","saames","sabling","sabres","sadded","saided","sailing","saints","saises","sake","sakes","salals","saling","salk","salking","salks","salling","sallying","salols","salping","salting","salves","sand","sanded","sander","sandied","sandsed","sanned","sansed","sanses","sapling","sarded","sarding","sariing","sarsing","sashes","sass","sassed","sasses","sassies","sats","saurel","save","savers","saving","scalding","scalds","scaling","scalping","scalps","scalying","scapes","scarce","scarces","scare","scareds","scarers","scares","scarfs","scaries","scarps","scends","schick","schicks","scired","scoked","scolds","scorer","scorers","scores","scoter","scoters","screes","scries","scruple","scruples","scrying","sculling","seaing","sealing","seaming","seaport","seaporting","seaports","seareds","searing","seasing","seaxing","sebaes","sebaing","sebbing","sebing","sebses","sebsing","seccing","secluded","secure","sedans","sedding","sedges","sedging","seeding","seeing","seeking","seeling","seeming","seening","seeping","seering","segoing","segues","seguing","seifing","seiing","seined","seizes","seizing","selfing","selvaing","selvas","semiing","semited","senate","senates","senating","send","sended","sending","sends","sening","senning","senses","sensing","sent","sepping","sequine","sequines","serape","serapes","seraping","seraxes","seraxing","serbing","serene","serenes","serening","serers","seres","serfing","serge","sergers","serges","serging","series","serined","sering","serous","serowing","serows","serpens","serums","servals","servant","servers","services","servicing","serviles","serviling","servinged","servings","servo","servoing","servos","setaing","sets","seuling","sevens","sewing","sewning","sexing","sexpot","sexpots","sexpotting","sexted","sexying","shabus","shade","shadeds","shades","shadies","shafts","shagged","shake","shakens","shakers","shakes","shakies","shakos","shale","shales","shame","shameds","shames","shamus","shanged","shanked","shanks","shanned","shape","shapeds","shapers","shapes","shard","shards","shareds","sharers","shareses","sharias","shark","sharks","sharons","sharp","sharpens","sharpers","sharpie","sharpies","sharps","shart","sharts","shaveds","shavens","shavers","shaves","shaving","shawls","shawms","sheareds","shearers","shearses","sheers","sheiks","shelve","shelves","shelving","sherding","sherds","shines","shinto","shire","shires","shirks","shirrs","shited","shnooked","shocked","shocks","shoeds","shooed","shooked","shooted","shore","shoreas","shores","shorns","shorts","shotes","shover","shovers","shoving","shreds","shrews","shriving","shrove","shroves","shroving","shucks","sibs","sick","sicks","sics","sids","sieving","sifts","sights","silling","silts","sind","sinded","sing","sins","sips","sirced","sircing","sired","sirens","sires","siring","sirred","sirring","sirs","sising","siss","sisses","sitars","site","sites","sitkas","sittas","situ","situs","sitz","sitzes","sixths","skates","skinks","skints","skirts","skits","skiving","skulls","slander","slanted","slates","slaving","sleeve","sleeves","sleeving","slices","slicks","slides","slimes","slits","slivers","slouch","slouched","slouches","slouching","slsing","smalling","smalls","smarms","smarts","smited","smites","smiths","smoked","snare","snarers","snares","snarfs","snarls","sneaked","snicks","snigger","sniggers","snits","snooked","snores","soaked","soaving","sobers","socked","solare","solares","sold","solds","solids","solling","solver","solvers","solving","sooned","sooted","sorbing","sore","sorelies","sorely","soring","sorting","sots","souchong","soughed","soughing","souked","soupies","source","soured","souses","sousing","southed","southing","sowers","spaces","spades","spalling","spanged","spare","sparers","spares","sparge","sparges","sparks","spasms","spated","spates","spazes","speaked","specks","spells","sperming","sphere","spheres","spicks","spills","spinto","spired","spirts","spited","spites","spits","splits","spoked","spooked","spores","sprees","spries","sprigger","spriggers","spring","sprits","sprues","spruing","sprying","spurge","squally","squares","squires","sriing","ssaing","sses","ssing","ssping","ssriing","sssing","sswing","stacks","stages","stalk","stalks","stalling","standed","stands","stanks","stapes","stare","starers","stares","starets","starses","starts","starving","states","staving","steads","steaked","steeds","stenting","sterling","sterning","stetting","sticks","stilts","stints","stoked","stores","stover","stovers","stoving","streaked","string","stringer","stringers","striving","suaving","subclassed","suched","suches","suching","sucre","sucred","sudated","sudses","sudsing","suer","suered","suering","sues","suiing","suing","suited","suites","suits","sullas","summits","sundated","sunglass","sunglasses","sunglassing","suns","superclassed","supergrass","supergrasses","sura","suraed","suraing","surd","surded","surding","sured","surelies","sures","surety","surf","surfed","surfer","surfing","surge","surged","surging","surrey","surveys","suses","sussing","suture","suvving","svring","swages","swales","swards","swarms","swarts","sweared","sweated","swerve","swerves","swerving","swervings","swifts","swined","swiped","swirled","switch","taaling","tables","tabling","tabses","tached","taches","taching","tack","tacks","tacting","tadded","taeling","tagger","taggers","tailing","tajiks","take","takens","takers","takes","tala","talaing","talas","talc","talcing","talcs","tale","talent","tales","taling","talkers","talkies","talking","talksed","talkses","talling","tallying","talons","talus","tandem","tank","tankas","tanked","tanks","tanned","taoses","tapses","tart","tarting","task","tasking","tasks","tassed","tassel","tassels","tasses","tasset","tassets","tassing","tasting","tastings","tastying","tatting","tauting","tawses","tdting","teached","teaches","teaching","teaing","teaked","teaking","tealed","tealing","teamed","teaming","teared","tearing","teased","teases","teasing","teasling","teat","teated","teating","teats","tebets","teccing","teched","teches","tectaing","tectas","tedding","teds","teed","teeing","teeming","teened","teening","teething","teeths","teffing","tegging","teiids","tejuing","tellies","temming","temping","tempting","tempts","tenched","tenches","tenching","tendeds","tenders","tendons","tenens","tenged","tenges","tenging","tenias","tenned","tenning","tennis","tennos","tenons","tenors","tensed","tenseds","tensing","tented","tenthing","tenting","tentings","tenuis","tepids","terces","tereting","terned","terrifies","terrify","teslaing","teslas","testaing","testas","testating","testeds","testeeing","testees","testers","testes","testied","testify","testily","testinged","testings","testis","testying","tether","tething","tetting","tevets","texans","text","texted","textes","texting","textings","texts","thaned","thanked","thanks","thanned","thecas","thefting","thefts","theist","theisting","theists","theres","thesis","thinged","tholed","tholes","thonged","thorough","thoroughs","thought","thrive","thrives","throng","throngs","throughed","throughs","thrush","thuses","ticalling","tick","ticks","tiered","tigers","tilling","tilting","tineds","tinting","tire","tired","tires","tiroed","titred","titres","titting","tnting","toasting","toasts","toeaed","toeses","toesing","togethers","told","tolds","tolling","tommies","tomtits","toneds","toners","tontining","tooled","tooned","tooted","toothed","toothing","tooting","topers","toposes","topple","topples","torch","torched","torches","torching","torting","toshed","toshes","tosked","tosking","tosses","tossing","toters","toting","totting","toucan","toucans","touchers","touchied","touchies","touchinged","touchingly","touchings","touchline","touchy","touchying","tough","toughed","toughens","toughied","toughies","toughing","toughying","touped","toupee","toupeed","touping","toured","touring","tousle","tousled","tousling","touted","towers","tracks","transitive","transitived","transitives","transitivity","treaded","treads","treated","treating","treats","treeds","trekked","trend","trends","trenting","tressing","trestling","triage","triaged","tricker","trickers","tricks","triers","trifler","triflers","trigged","trimer","trimers","trimmer","trimmers","tripper","trippers","trited","triting","troched","troches","troching","trough","troughed","troughing","troughs","troves","truced","truces","trucing","trucked","trucking","trudger","trudgers","trulies","trunks","trusting","trusts","truthed","truthing","trysting","trysts","tsetse","tsetsing","tubing","tucked","tucking","tufting","tugger","tuggers","tuling","tulles","tulling","tumses","tumsing","tuning","tuns","turing","tushed","tutting","tuxing","twanged","tweaks","tweeded","tweeds","tweeped","tweeted","tweeting","tweets","tweezed","twelved","twenty","twerked","twerped","twiced","twigged","twined","twirled","twirped","twisting","twists","twitch","ufoing","uglies","uhfing","uing","ukases","ukasing","ukes","uking","ulls","ulting","umaing","umping","unchanged","unclouded","uncouple","uncouples","uncover","uncovers","undated","undateds","undefined","unding","unedited","unhooked","uniated","uning","united","unkind","unlive","unlives","unmake","unmakes","unmated","unmodified","unqing","unsated","unsees","unsung","unsure","untouched","unusually","unwired","unyoke","unyokes","upbeated","upcasted","update","updates","updrafted","uphold","upholds","uping","upland","uplanded","upsets","upside","uptaked","upvoted","urated","urging","urling","urning","urns","ursine","uruses","usages","usaging","usaing","usas","usbegs","usbeks","uscbing","usdaed","usdaing","used","useds","user","userring","users","ushers","usinged","usings","usmcing","usneas","usning","usns","usps","uspses","uspsing","usss","usssing","usualed","usuals","usurer","utaing","utcing","utes","uting","utning","uubing","uuhing","uuping","uuqing","uuting","uving","uziing","valiing","valing","valling","valses","valsing","valuing","valving","vandaed","vanned","varment","vasing","vassed","vasting","vedisted","vegans","veined","veines","veining","vend","vended","vends","venose","venoses","venosing","vent","veraing","verbified","verbifies","verbify","verbing","verdes","verding","verges","verging","veridis","veridises","veried","verified","verifieds","verifier","verifiers","verited","veritied","verities","verity","verses","versified","versifier","versifiers","versifies","versify","versing","versting","versts","vertes","verve","verves","vervets","verving","verying","vest","vesting","vests","vetting","vianded","vilifies","vilify","vinifies","vinify","virens","vireos","vising","visits","visually","vitrifies","vitrify","vive","vives","vivifies","vivify","vivred","vocalling","vomers","vomits","voters","vouch","vouched","voucheed","vouchees","vouchers","vouches","vouching","vowers","wadded","wadses","waifed","wailed","wailing","wained","waived","waives","wake","wakens","wakers","wakes","waling","walk","walking","walks","wall","walling","wallings","walls","wallying","wand","wanded","wander","wanked","wanned","want","wanted","ware","wared","waried","warmed","warned","warped","warred","warsed","warses","wart","warted","washes","wassed","wastes","wasting","watses","wauling","wave","wavers","wawling","wayses","wbsing","weaked","weaken","wealed","wean","weaned","weans","wearer","weaved","weaves","weaving","weeked","weft","wefting","weirded","weired","wekaed","welling","welt","welting","wended","wends","wens","weres","wering","westing","wests","wetting","whacks","whales","whanged","wharfs","whelks","whiled","whined","whirled","whirred","whists","whites","whits","wholed","wholes","whooped","whored","whores","wick","wicked","wicks","wided","width","widths","wifed","wified","wigged","wilded","wiled","wilied","wilies","willed","willing","wilted","wimped","winced","wind","wined","winged","winied","winked","winned","winoed","wiped","wipeds","wireds","wirer","wiried","wised","wisent","wish","wished","wising","wisped","witch","withal","withe","wither","withes","within","withs","withy","witsed","witted","wive","wived","wives","wizzed","wlanned","wokked","wold","wolds","wonked","wont","wooded","wooers","woofed","wooled","worded","worlds","wormed","worned","worsed","worted","woulds","wove","woves","wraith","wrasses","wreaked","wrecks","wresting","wrests","wricks","wried","wriggler","wrigglers","wringer","wringers","writhe","wswing","wussing","wyrded","xerotes","xmases","yanaed","yanked","yarded","yawling","yawses","yearns","yeasting","yeasts","yelling","yerring","yessing","yetting","yolked","yorked","youthed","youthing","yuling","yuses","yussing","zaired","zaires","zanied","zend","zended","zends","zeroing","zest","zesting","zests","zestying","zeuses","zeusing","zhuanged","zilling","zonked","zoomed","zooted"]}});function Vn(e,t,n){if(e===t)return 0;if(Math.abs(e.length-t.length)>n)return n+1;let s=null,o=Array.from({length:t.length+1},(r,i)=>i);for(let r=1;r<=e.length;r+=1){let i=[r],a=r;for(let l=1;l<=t.length;l+=1){let c=e[r-1]===t[l-1]?0:1,u=Math.min(o[l]+1,i[l-1]+1,o[l-1]+c);r>1&&l>1&&e[r-1]===t[l-2]&&e[r-2]===t[l-1]&&(u=Math.min(u,s[l-2]+c)),i[l]=u,u<a&&(a=u)}if(a>n)return n+1;s=o,o=i}return o[t.length]}function Ic(e){return/^[a-z]+$/.test(e)&&!et.has(e)&&!Ac.has(e)}function Pf(e){return Fx(e)?null:Li(e,Mf,Hn(e))}function Li(e,t,n=Hn(e)){let s=n+1,o=null,r=!1;for(let i of t){let a=Vn(e,i,Math.min(s,n));a<s?(s=a,o=i,r=!1):a===s&&a<=n&&i!==o&&(r=!0)}return s<=n&&!r?o:null}var Mx,Hn,Ac,Nf,Mf,Px,Fx,Io=O(()=>{Un();Of();jn();Mx=["used"];Hn=e=>e.length<=5?1:2,Ac=new Set([...Object.keys(de),...Object.keys(We),...Object.keys(Zt),...Mx].flatMap(e=>e.split(" "))),Nf=4,Mf=[...new Set([...Object.keys(de),...Object.keys(Zt)].flatMap(e=>e.split(" ")).filter(e=>e.length>=Nf))],Px=new Set(Lf.words),Fx=e=>Px.has(e)});function Co(e){for(let t of Bx){let n=e.match(t.re);if(n){let s=t.build(n);if(s)return s}}return null}var Ni,Dx,zx,Ux,Cc,Bx,Ff,Mi=O(()=>{Un();jn();Ni=Object.keys(de).sort((e,t)=>t.length-e.length).map(Je).join("|"),Dx=Object.keys(We).sort((e,t)=>t.length-e.length).map(Je).join("|"),zx=Object.keys(Zt).sort((e,t)=>t.length-e.length).map(Je).join("|"),Ux=Bs.slice().sort((e,t)=>t.length-e.length).map(Je).join("|"),Cc=(e,t)=>e==="defines"&&br.has(t),Bx=[{name:"ask",re:new RegExp(`^(?:does|do|did)\\s+(.+?)\\s+(${Ni})\\s+(.+?)\\??$`,"i"),build:e=>{let t=e[2].toLowerCase(),n=de[t];if(Cc(n,t))return null;let s=e[1].trim(),o=e[3].trim();return gr.includes(t)&&([s,o]=[o,s]),{shape:"ask",entityType:null,modifier:"direct",kind:n,subject:s,object:o}}},{name:"reverse",re:new RegExp(`^which\\s+(${Dx})\\s+(?:(${zx})\\s+)?(${Ni})\\s+(.+?)\\??$`,"i"),build:e=>{let t=e[3].toLowerCase(),n=de[t];return Cc(n,t)?null:{shape:"reverse",entityType:We[e[1].toLowerCase()],modifier:e[2]?Zt[e[2].toLowerCase()]:"direct",kind:n,object:e[4].trim()}}},{name:"forward",re:new RegExp(`^what\\s+(?:does|do|did)\\s+(.+?)\\s+(${Ni})\\??$`,"i"),build:e=>{let t=e[2].toLowerCase(),n=de[t];return Cc(n,t)?null:{shape:"forward",entityType:null,modifier:"direct",kind:n,object:e[1].trim()}}},{name:"meta-mean",re:new RegExp(`^what\\s+(?:does|do|is|are)\\s+(.+?)\\s+(?:${Ux})\\??$`,"i"),build:e=>({shape:"meta",entityType:null,modifier:"direct",kind:"meta",object:e[1].trim()})},{name:"meta-whatis",re:new RegExp("^what\\s+(?:is|are)\\s+(?:(an?|the)\\s+)?(.+?)\\??$","i"),build:e=>{let t=e[1]?e[1].toLowerCase():null,n=on(e[2].trim()),s=!/\s/.test(n);if(t==="the"&&!s||!t&&!We[n.toLowerCase()])return null;let o=n.toLowerCase();return t&&t!=="the"&&Hd.some(r=>o===r||o.startsWith(`${r} `))?null:{shape:"meta",entityType:null,modifier:"direct",kind:"meta",object:zs(n)}}},{name:"mention",re:new RegExp(`^where\\s+(?:is|are|was|were)\\s+(.+?)\\s+(?:${hn.map(Je).join("|")})\\??$`,"i"),build:e=>({shape:"mentions",entityType:null,modifier:"direct",kind:"mentions",object:e[1].trim()})},{name:"where",re:new RegExp(`^where\\s+(?:is|are|was|were)\\s+(.+?)(?:\\s+(?:${Qt.map(Je).join("|")}))?\\??$`,"i"),build:e=>({shape:"where",entityType:null,modifier:"direct",kind:"where",object:e[1].trim()})},{name:"when",re:new RegExp(`^when\\s+(?:did|does|do|was|were|is)\\s+(.+?)\\s+(?:last\\s+)?(${Ni})\\??$`,"i"),build:e=>de[e[2].toLowerCase()]==="touches"?{shape:"when",entityType:null,modifier:"direct",kind:"touches",object:e[1].trim()}:null},{name:"commit-history",re:/^(?:the\s+)?commit\s+history\s+(?:of|for)\s+(.+?)\??$/i,build:e=>({shape:"when",entityType:null,modifier:"direct",kind:"touches",object:e[1].trim()})},{name:"cochange-partners",re:/^co-?change\s+partners\s+(?:of|for|with)\s+(.+?)\??$/i,build:e=>({shape:"reverse",entityType:"Module",modifier:"direct",kind:"cochange",object:e[1].trim()})}];Ff={id:"grammar",class:"graph-query",run(e){let t=Co(e);return t?{strategyId:"grammar",class:"graph-query",candidates:[{parsed:t,confidence:.9}]}:null}}});function Tt(e,t,n=null){let s=Object.keys(t).sort((o,r)=>r.split(" ").length-o.split(" ").length);for(let o of s){let r=o.split(" ");for(let i=0;i<=e.length-r.length;i+=1)if(!(n&&r.some((a,l)=>n.has(i+l)))&&r.every((a,l)=>e[i+l]===a))return{kind:t[o],start:i,end:i+r.length}}return null}function jr(e,t=null){let n=e.replace(/\?+\s*$/,"").replace(/,/g," ").split(/\s+/).filter(Boolean),s=n.map(E=>E.toLowerCase());if(s.includes("where")&&!Tt(s,de)){let E=s.some(k=>hn.includes(k)),S=new Set([...Qt,...hn]),R=n.filter((k,A)=>!et.has(s[A])&&!S.has(s[A])).join(" ").trim();if(R){let k=E?"mentions":"where";return{shape:k,entityType:null,modifier:"direct",kind:k,object:R}}}if(new Set(["has","have","had"]).has(s[0])){let E=s.length;for(;E>1&&(s[E-1]==="ever"||s[E-1]==="been");)E-=1;if((E>1?de[s[E-1]]:null)==="touches"){let R=n.slice(1,E-1).filter((k,A)=>!et.has(s[1+A])).join(" ").trim();if(R)return{shape:"when",entityType:null,modifier:"direct",kind:"touches",object:R}}}let r=s,i=Tt(s,de);if(!i&&t){let E=s.map(S=>{if(!Ic(S))return S;let R=t.lemma(S);return Ac.has(R)?R:S});i=Tt(E,de),i&&(r=E)}let a=null;if(!i){let E=s.map(S=>S.length>=4&&Ic(S)&&Pf(S)||S);if(i=Tt(E,de),i){r=E;let S=s.slice(i.start,i.end).findIndex((k,A)=>k!==E[i.start+A]),R=i.start+Math.max(S,0);a={from:s[R],to:E[R]}}}let l=!1;if(!i)for(let E=0;E<s.length;E+=1){let S=cs[s[E]];if(!(S&&s[E]==="used"&&s[E+1]==="for")&&S&&s.slice(0,E).some(R=>kr.has(R))){i={kind:S,start:E,end:E+1},l=!0;break}}if(!i)return null;!l&&i.end-i.start===1&&cs[s[i.start]]&&s.slice(0,i.start).some(E=>kr.has(E))&&(l=!0);let c=E=>a?{...E,fuzzyVerb:a}:E;if(t&&i.end-i.start===1){let E=i.start,S=s[E-1];if((S==="the"||S==="these"||S==="those")&&s[E+1]==="of"&&t.posTags(n)[E]==="NOUN"){let k=n.slice(E+2).filter((A,M)=>!et.has(s[E+2+M])).join(" ").trim();if(k)return c({shape:"forward",entityType:null,modifier:"direct",kind:i.kind,object:k})}}let u=new Set,d=E=>{if(E)for(let S=E.start;S<E.end;S+=1)u.add(S)};d(i);for(let[E,S]of Object.entries(de)){if(S!==i.kind)continue;let R=E.split(" "),k=i.end;if(R.every((A,M)=>r[k+M]===A)){d({start:k,end:k+R.length});break}}let f=Tt(r,We,u);d(f);let p=Tt(r,Zt,u);d(p);let m=(E,S)=>n.slice(E,S).filter((R,k)=>!u.has(E+k)&&!et.has(s[E+k])).join(" ").trim(),h=m(0,i.start),g=m(i.end,n.length);l&&!s.includes("by")&&qx.has(g.toLowerCase())&&(g="");let b=i.kind,y=f?We[r.slice(f.start,f.end).join(" ")]:null,w=p?Zt[r.slice(p.start,p.end).join(" ")]:"direct";if(b==="touches"&&s.includes("when")){let E=h||g;if(E)return c({shape:"when",entityType:null,modifier:"direct",kind:"touches",object:E})}if(b==="touches"&&s.includes("who")&&s.includes("last")){let E=h||g;if(E)return c({shape:"whoLast",entityType:null,modifier:"direct",kind:"touches",object:E})}let v=s.indexOf("by"),_=s.slice(0,i.start).findIndex(E=>kr.has(E)),$=_>=0,x=$&&_>v;if(v>=0&&!u.has(v)&&$){let E=(k,A)=>n.slice(k,A).filter((M,T)=>{let P=k+T,U=s[P];return!u.has(P)&&!et.has(U)&&U!=="by"&&!kr.has(U)&&!Wx.has(U)&&!Gx.has(U)}).join(" ").trim(),[S,R]=x?[E(_+1,n.length),E(v+1,_)]:[E(0,v),E(v+1,n.length)];if(S&&R)return b==="defines"&&br.has(r.slice(i.start,i.end).join(" "))?null:c({shape:"ask",entityType:null,modifier:"direct",kind:b,subject:R,object:S});if(R)return c({shape:"forward",entityType:y,modifier:w,kind:b,object:R});if(S)return c({shape:"reverse",entityType:y,modifier:w,kind:b,object:S})}if(l&&v<0&&g&&s[i.start]==="called")return null;if(h&&g){let E=r.slice(i.start,i.end).join(" ");if(b==="defines"&&br.has(E))return null;let S=h,R=g;return gr.includes(E)&&([S,R]=[R,S]),c({shape:"ask",entityType:null,modifier:"direct",kind:b,subject:S,object:R})}if(g){let E=f&&f.start>=i.end?null:y;return c({shape:"reverse",entityType:E,modifier:w,kind:b,object:g})}if(b==="inherits"&&!h&&f&&f.start===i.end){let E=r.slice(f.start,f.end).join(" ");if(E)return c({shape:"reverse",entityType:null,modifier:w,kind:b,object:E})}if(h&&!g&&$&&i.end-i.start===1&&cs[s[i.start]]){if(h.split(/\s+/).length>1)return null;if(b==="touches")return c({shape:"when",entityType:null,modifier:"direct",kind:b,object:h});let E=kr.has(s[0]);return c({shape:"reverse",entityType:y,modifier:w,kind:b,object:h,...E?{polar:!0}:{}})}return h?c({shape:"forward",entityType:y,modifier:"direct",kind:b,object:h}):null}var kr,Wx,Gx,qx,Df,Pi=O(()=>{Un();jn();Io();kr=new Set(["is","are","was","were","be","been","being","get","gets","got"]),Wx=new Set(["which","what","who","whom","whose"]),Gx=new Set(zn.map(e=>e.toLowerCase())),qx=new Set(["recently","lately","yet","already","ever","again"]);Df={id:"keyword-spot",class:"graph-query",run(e,t={}){let n=jr(e,t.nlp||null);return n?{strategyId:"keyword-spot",class:"graph-query",candidates:[{parsed:n,confidence:.7}]}:null}}});function Hx(e,t,n){if(!n||typeof n.posTags!="function"||!t.length)return[];let s=new Set(t.map(i=>i.toLowerCase())),o;try{o=n.posTags(e)}catch{return[]}let r=[];for(let i=0;i<e.length;i+=1){let a=e[i],l=a.toLowerCase();!/^[a-z]+$/.test(a)||zf.has(l)||!s.has(l)||o[i]==="VERB"&&r.push(l)}return r}function Kx(e,t=null){let n=Bt(e),s=[],o=[];for(let i of n){let a=i.toLowerCase();/^[a-z]+$/.test(i)&&!zf.has(a)&&(Vx.has(a)||t&&typeof t.isStopWord=="function"&&t.isStopWord(a))?o.push(i):s.push(i)}let r=Hx(n,s,t);return{text:s.join(" "),dropped:o,maybeNoise:r}}var zf,Vx,Uf,Bf=O(()=>{Un();jn();Mi();Pi();zf=new Set([...et,...me(Us),...me(Object.keys(de)),...me(Object.keys(We)),...me(Object.keys(Zt)),...me(Object.keys(Xe)),...me(Ws),...me(Gs),...me(Object.keys(ls)),...me(Object.keys(En)),...me(Object.keys($o)),...me(zn),...me(yr),...me(Bs),...me(Qt),...me(hn),...me(Dn),...me(Object.keys(xo))]),Vx=new Set([...me(wr),...me(gi)]);Uf={id:"noise-strip",class:"noise-stripped",run(e,t={}){if(Co(e))return null;let{text:n,dropped:s,maybeNoise:o}=Kx(e,t.nlp||null);if(!s.length||!n)return null;let r=Co(n)||jr(n,t.nlp||null);if(!r)return null;if(o.length&&(r.shape==="where"||r.shape==="mentions")&&r.object){let i=r.object.split(/\s+/).filter(a=>!o.includes(a.toLowerCase())).join(" ").trim();i&&i!==r.object&&(r.altObject=i)}return{strategyId:"noise-strip",class:"noise-stripped",candidates:[{parsed:r,confidence:.75,note:`noise-stripped to "${n}"`}]}}}});var Wf=O(()=>{});var Fi,Di=O(()=>{Fi=()=>{}});function qf(e,t){return e.shape!==t.shape||e.kind!==t.kind?!1:e.shape==="ask"?Oo(e.subject)===Oo(t.subject)&&Oo(e.object)===Oo(t.object):Oo(e.object)===Oo(t.object)}function Oc(e){let t=(e||[]).filter(c=>c&&Array.isArray(c.candidates)&&c.candidates.length);if(!t.length)return null;let n=[];for(let c of t)for(let u of c.candidates)!u||!u.parsed||n.push({parsed:u.parsed,confidence:typeof u.confidence=="number"?u.confidence:.5,note:u.note||null,via:u.via||null,strategyId:c.strategyId,class:c.class});if(n.some(c=>!Vf(c))&&(n=n.filter(c=>!Vf(c))),!n.length)return null;let s=new Map;for(let c of n)s.has(c.class)||s.set(c.class,[]),s.get(c.class).push(c);let o=[];for(let[c,u]of s){let d=[];for(let f of u){let p=d.find(m=>qf(m.parsed,f.parsed)&&m.via===f.via);if(p){p.agreed+=1,p.confidence=Math.max(p.confidence,f.confidence),Gf(f.parsed)<Gf(p.parsed)&&(p.parsed=f.parsed);continue}d.push({...f,agreed:1})}d.length&&o.push({class:c,candidates:d})}if(!o.length)return null;let r=c=>Math.max(...c.candidates.map(u=>u.confidence)),i=o[0];for(let c of o)r(c)>r(i)&&(i=c);let a=i.candidates.length===1?i.candidates[0].parsed:{ambiguousParse:!0,candidates:i.candidates.map(c=>c.parsed)},l=o.filter(c=>c!==i).map(c=>c.candidates[0]).filter(c=>!i.candidates.some(u=>qf(u.parsed,c.parsed)));return{class:i.class,parsed:a,winner:i.candidates[0],alternates:l}}function Jx(e){if(!e)return"something else";if(e.ambiguousParse)return"one of several readings";let t=e.object??e.subject??"?";return`${e.kind} "${t}"`}function Hf(e,{describe:t=Jx,answerFor:n=null}={}){return(e||[]).map(s=>{let o=s.note||t(s.parsed),r=n&&n(s)||"ask it that way";return`if you mean ${o} then ${r}`})}var Oo,Yx,Gf,Xx,Vf,Lc=O(()=>{Oo=e=>String(e||"").trim().toLowerCase().replace(/\s+/g," ").replace(/^(?:the|a|an)\s+/,"").replace(/^commit\s+(?=[0-9a-f]{7,40}$)/,""),Yx=/^\s*(?:the|a|an)\s+/i,Gf=e=>[e?.subject,e?.object].filter(t=>Yx.test(String(t||""))).length;Xx=new Set(["fuzzy","lemma","spell"]),Vf=e=>Xx.has(e.via)});function zi(e){Nc=e}function Ui(){return typeof Nc=="function"?Nc():null}var Nc,Lo=O(()=>{Nc=null});function Xf(e,t={},n=Zx){let s=[];for(let o of n)try{let r=o.run(e,t);r&&typeof r.then!="function"&&s.push(r)}catch{}return s}var Qx,Zx,Jf=O(()=>{jn();Mi();Pi();Bf();Wf();Di();Lc();Lo();Qx=[...typeof void 0<"u"?[void 0]:[],...typeof void 0<"u"?[void 0]:[]],Zx=[Ff,Df,Uf,...Qx]});function No(e){return eE.test(String(e||"").trim())?"an":"a"}function Bi(e){let t=String(e||"").trim();return t&&(/(?:s|x|z|ch|sh)$/.test(t)?`${t}es`:/[^aeiou]y$/.test(t)?`${t.slice(0,-1)}ies`:`${t}s`)}function Mo(e){let t=String(e||"");return t&&t[0].toUpperCase()+t.slice(1)}function _r(e){let t=(e||[]).map(n=>String(n||"").trim()).filter(Boolean);return t.length===0?"":t.length===1?t[0]:t.length===2?`${t[0]} and ${t[1]}`:`${t.slice(0,-1).join(", ")}, and ${t[t.length-1]}`}var eE,Wi=O(()=>{eE=/^[aeiou]/i});var Rr,Mc=O(()=>{Rr=(e,t,n)=>n});var zm={};Fn(zm,{DYNAMIC_TAIL_OK_RE:()=>ul,applyNegationFrames:()=>Sr,ask:()=>ys,classDisplayName:()=>Kn,degreeMetric:()=>Im,metaFallbackEntityAnswer:()=>Sm,normalizeQuery:()=>Ys,parseQuery:()=>Cr,parseQueryFull:()=>Jc,render:()=>bn,rephraseHint:()=>ol,resolveObject:()=>wn,traverse:()=>Wt,worldRelationGraphPayload:()=>HS});function Ke(e,t){let n=Qf.get(e);n||(n=new Map,Qf.set(e,n));let s=n.get(t);if(s)return s;let o=[];for(let r of e.relations)if(qn(r)===t)for(let i of r.edges)o.push(i);return n.set(t,o),o}function Pe(e,t){let[n,s]=Bc[e]||["result","results"];return t===1?n:s}function Lr(e,t,n,s={}){return!e||!t.length?[]:[{kind:"set",class:e,label:`${t.length} ${Pe(e,t.length)}`,ids:t.map(o=>o.id),attrs:{count:t.length},lane:n,...s}]}function Kn(e){let t=String(e||"");if(typeof Sn=="function"){let n=Sn(t).join(" ");if(n)return n}return t.replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase()}function Xs(e){return nE[e]||e}function aE(e){if(!e?.ambiguousParse||!Array.isArray(e.candidates)||e.candidates.length!==2)return e;let t=e.candidates.find(r=>r?.shape==="meta"),n=e.candidates.find(r=>r!==t);if(!t||!n)return e;let s=String(t.object||"").trim().toLowerCase();if(!s||iE.has(s))return e;let o=String(n.object||"").trim().toLowerCase();return me(Bs).includes(o)?t:e}function uE(e,t){if(!e||e.shape!=="where"||e.altObject||!cE.test(t))return e;let n=hi(t),s=hi(String(e.object||"")),o=s===e.object?e:{...e,object:s},r=Bt(s);if(r.length<2)return o;let i=r[r.length-1].toLowerCase();if(!/^[a-z][a-z'-]*$/.test(i)||et.has(i)||de[i]||i.endsWith("ing"))return o;let a=Bt(n).map(c=>c.toLowerCase());for(;a.length&&lE.has(a[a.length-1]);)a.pop();if(a[a.length-1]!==i)return o;let l=r.slice(0,-1).join(" ");return{...e,object:l,altObject:s,verb:i}}function Cr(e,{nlp:t=void 0}={}){return Jc(e,{nlp:t}).parsed}function Jc(e,{nlp:t=void 0}={}){let n=t===void 0?Ui():t,s=String(e||"").trim().replace(/\s+/g," ");if(!s)return{parsed:null,alternates:[],class:null};let o=Tc(Sr(Ys(s)));if(!o)return{parsed:null,alternates:[],class:null};let r=pE(o,n);if(r)return{parsed:r,alternates:[],class:null};let i=Oc(Xf(o,{nlp:n,raw:s}));return i?{parsed:uE(aE(i.parsed),o),alternates:i.alternates||[],class:i.class||null}:{parsed:null,alternates:[],class:null}}function Gc(e,t){return t.length&&mm.has(t[0])?{bw:e.slice(1),blc:t.slice(1)}:{bw:e,blc:t}}function Do(e,t){return Co(e)||jr(e,t)}function pE(e,t){let n=Bt(e),s=n.map(o=>o.toLowerCase());return CE(n,s)||LE(n,s)||gE(n,s,t)||gm(e,t,0)||NE(n,s,t)||wE(n,s,t)||kE(n,s,t,0)||_E(n,s)||AE(n,s,t)||ME(n,s,t)||DE(n,s,t)||UE(n,s,t,0)||FE(n,s,t,0)||Zc(n,s,t,0)||$E(n,s,t)||mE(n,s)||xm(n,s,t,0)}function mE(e,t){let n=0;fE.has(t[n])&&(n+=1);let s=At(t[n]);if(!s||s.placeholder||!s.entityType)return null;let o=s.entityType;n+=1;let r=m=>m+1<t.length?Kd[`${t[m]} ${t[m+1]}`]:void 0,i=r(n);if(!i)return null;let a=n+2,l=-1,c;for(let m=a;m+1<t.length;m+=1){let h=r(m);if(h){l=m,c=h;break}}if(l<0)return null;let u=e.slice(a,l).join(" ").trim(),d=e.slice(l+2).join(" ").trim();if(!u||!d)return null;let f=(m,h)=>m.role==="object"?{shape:"reverse",kind:m.kind,entityType:o,modifier:"direct",object:h}:{shape:"forward",kind:m.kind,modifier:"direct",object:h},p=f(i,u);return p.entityType=o,{node:"boolean",entityType:o,atoms:[{op:"seed",kind:"set",ast:{node:"clause",clause:p}},{op:"intersection",kind:"set",ast:{node:"clause",clause:f(c,d)}}]}}function qi(e,t){return{node:"boolean",entityType:e,atoms:[{op:"seed",kind:"set",ast:{node:"allOfClass",entityType:e}},t]}}function gE(e,t,n){if(!["do","does","did"].includes(t[0])||!hE.has(t[1]))return null;let s=At(t[2]);if(!s||s.placeholder||!s.entityType)return null;let o=s.entityType;if(o==="Change")return{node:"miss",reason:`"${t[2]}" isn't an enumerable kind \u2014 a universal check needs a concrete kind (functions, classes, modules, \u2026)`};let r=t[2],i=e.slice(3),a=t.slice(3);if(!i.length)return null;let l=Tt(a,de);if(!l)return{node:"miss",reason:"a universal check needs a known relation verb (import, call, inherit from, test, \u2026)"};let u=i.filter((f,p)=>(p<l.start||p>=l.end)&&!et.has(a[p])&&a[p]!=="from").join(" ").trim();if(!u)return null;let d=zo(`which ${r} ${i.join(" ")}`,n,1);return!d||d.node==="miss"?{node:"miss",reason:d&&d.reason||"the universal clause didn't parse"}:{node:"universal",entityType:o,kind:l.kind,object:u,complement:qi(o,{op:"difference",kind:"set",ast:d})}}function gm(e,t,n=0){let s=Cf(e);if(!s)return null;let o=At(s.entWord);if(!o||o.placeholder||!o.entityType)return null;let r=o.entityType;if(r==="Change")return{node:"miss",reason:`"${s.entWord}" isn't an enumerable kind \u2014 a set complement needs a concrete kind (functions, classes, modules, \u2026)`};let i=Bt(s.predicate),a=i.map(d=>d.toLowerCase());if(a.length&&a.every(d=>Xe[d]))return qi(r,{op:"difference",kind:"qual",filters:a});let l=Tt(a,de);if(!l)return{node:"miss",reason:"a negated set query needs a known relation verb (import, call, inherit from, test, \u2026)"};if(!i.filter((d,f)=>(f<l.start||f>=l.end)&&!et.has(a[f])&&a[f]!=="from").length)return qi(r,{op:"difference",kind:"set",ast:{node:"existsEdge",entityType:r,kind:l.kind}});let u=zo(`which ${s.entWord} ${s.predicate}`,t,n+1);return!u||u.node==="miss"?{node:"miss",reason:u&&u.reason||"the negated clause didn't parse"}:qi(r,{op:"difference",kind:"set",ast:u})}function wE(e,t,n){let s=0;for(;s<t.length&&bE.has(t[s]);)s+=1;if(!["do","does","did"].includes(t[s]))return null;s+=1;let o=e.slice(s),r=t.slice(s),i=r.indexOf("not");if(i<0)return null;let a=Tt(r,de);if(!a)return null;let c=o.filter((u,d)=>d!==i&&(d<a.start||d>=a.end)&&r[d]!=="from"&&!et.has(r[d])).join(" ").trim();return c?{node:"forwardComplement",kind:a.kind,subjectTerm:c}:null}function bm(e,t){let n=new Set;for(let s of t)for(let o of Ke(e,s)){let r=e.byId.get(o.object);r&&r.class&&n.add(r.class)}return n}function wm(e,t){let n=Lt(t),s=n.filter(r=>!pm.has(r)),o=bm(e,s.length?s:n);return o.size===1?[...o][0]:null}function zo(e,t,n){if(n>fm)return{node:"miss",reason:"too deep to resolve"};let s=gm(e,t,n);if(s)return s;let o=Bt(e),r=o.map(c=>c.toLowerCase()),i=Zc(o,r,t,n);if(i)return i;let a=xm(o,r,t,n);if(a)return a;let l=Do(e,t);return l?{node:"clause",clause:l}:null}function Zc(e,t,n,s){for(let o=1;o<t.length;o+=1){let r=Dn.includes(t[o]),i=!r&&hm(t[o]);if(!r&&!i||r&&o+1>=t.length||!At(t[o-1]))continue;let l=e.slice(0,o-1);if(!l.length||l.every(f=>Xe[f.toLowerCase()]))continue;let c=Do([...l,Wc].join(" "),n);if(!c||c.shape!=="reverse"&&c.shape!=="forward"||c.modifier&&c.modifier!=="direct")continue;let u=`which ${t[o-1]} ${e.slice(r?o+1:o).join(" ")}`,d=zo(u,n,s+1);return!d||d.node==="miss"?d?{node:"miss",reason:d.reason||"inner clause didn't parse"}:{node:"miss",reason:"inner clause didn't parse"}:{node:c.shape==="reverse"?"reverseSet":"forwardSet",kind:c.kind,entityType:c.entityType,inner:d}}return null}function $E(e,t,n){for(let s=0;s<t.length;s+=1){if(!yE.has(t[s])||t[s-1]==="of")continue;let o=s===t.length-1,r=s+1<t.length&&!!de[t[s+1]];if(!o&&!r)continue;let i=[...e.slice(0,s),Wc,...e.slice(s+1)],a=Do(i.join(" "),n);if(!(!a||a.shape!=="reverse"&&a.shape!=="forward")&&a.object===Wc&&!(a.modifier&&a.modifier!=="direct"))return{node:a.shape==="reverse"?"reverseSet":"forwardSet",kind:a.kind,entityType:a.entityType,inner:{node:"prevSet"}}}return null}function kE(e,t,n,s=0){if(t[0]!=="when")return null;let o=1;if(!vE.has(t[o]))return null;o+=1;let r=-1;for(let d=t.length-1;d>=o;d-=1)if(xE.has(t[d])){r=d;break}if(r<0)return null;let i=e.slice(o,r),a=t.slice(o,r);for(;a.length&&EE.has(a[a.length-1]);)i=i.slice(0,-1),a=a.slice(0,-1);for(;a.length&&SE.has(a[0]);)i=i.slice(1),a=a.slice(1);if(!i.length||!a.some(d=>Dn.includes(d)))return null;let l=Qc.has(a[0])?i.join(" "):`which ${i.join(" ")}`,c=zo(l,n,s+1);if(!c||c.node==="miss")return c?{node:"miss",reason:c.reason||"the inner set of the temporal query didn't parse"}:{node:"miss",reason:"the inner set of the temporal query didn't parse"};let u=At(a[0]);return{node:"temporal",inner:c,entityType:u&&u.entityType||null}}function _E(e,t){if(t[0]!=="what"||t[1]!=="changed")return null;let n=2;if(t[n]==="ever"&&(n+=1),!jE.has(t[n]))return null;let s=t[n],o=e.slice(n+1).join(" ").trim();return o?{node:"commitFilter",op:s,pivotRaw:o}:{node:"miss",reason:`"what changed ${s}" needs a date or commit afterward`}}function TE(e){let t=new Set,n=[];for(let s of e){if(!s||!RE.test(s))continue;let o=s.toLowerCase();t.has(o)||(t.add(o),n.push(s))}return n}function AE(e,t,n){if(t.length===2&&t[0]==="which"&&(t[1]==="ones"||t[1]==="one"))return{node:"anaphora",mode:"list",filter:{type:"all"}};let s=-1,o=!1;for(let d=1;d<t.length;d+=1){if(!yr.includes(t[d]))continue;if(t[d-1]==="of"){s=d,o=!0;break}let f=t.slice(0,d).join(" ");if(d===t.length-1&&(Ws.includes(f)||Gs.includes(f))){s=d;break}}if(s<0)return null;let r=(o?t.slice(0,s-1):t.slice(0,s)).join(" "),i=Ws.includes(r)||/^(how many|how much|count|number|quantity|total)\b/.test(r)?"count":"list",a=IE(e.slice(s+1),n);if(a===void 0)return{node:"miss",reason:"the follow-up filter didn't parse"};let l=o?s-1:s,c=TE(e.slice(0,l)),u={node:"anaphora",mode:i,filter:a};return c.length>=2&&(u.candidateTerms=c),u}function IE(e,t){let n=0,s=e.map(a=>a.toLowerCase());for(;n<s.length&&dE.has(s[n]);)n+=1;let o=e.slice(n),r=s.slice(n);if(!o.length)return{type:"all"};if(r.every(a=>Xe[a]))return{type:"qual",filters:r};if(o.length===1){let a=At(r[0]);if(a&&!a.placeholder&&a.entityType)return{type:"entity",entityType:a.entityType}}let i=Do(`what ${o.join(" ")}`,t);if(i&&(i.shape==="reverse"||i.shape==="forward")&&i.object)return{type:"clause",clause:i}}function CE(e,t){let n;if(t[0]==="is"&&t[1]==="there")n=2;else if(t[0]==="are"&&t[1]==="there")n=2;else return null;let s=t[n];if(s==="a"||s==="an"||s==="any")n+=1;else return null;let o=n<t.length?At(t[n]):null;if(!o||o.placeholder||!o.entityType)return null;let r=o.entityType;n+=1;let i=t.slice(n),a=e.slice(n);if(i.length&&i[i.length-1]==="anywhere"?(i=i.slice(0,-1),a=a.slice(0,-1)):i.length>=2&&i[i.length-2]==="at"&&i[i.length-1]==="all"&&(i=i.slice(0,-2),a=a.slice(0,-2)),!i.length)return{node:"exists",entityType:r,term:null,scopeModule:null};if(i[0]==="called"||i[0]==="named"){if(i.length<2)return{node:"miss",reason:`"${i[0]}" needs a name afterward`};let l=i.indexOf("in",1);if(l>0){let u=a.slice(1,l).join(" ").trim(),d=a.slice(l+1).join(" ").trim();return!u||!d?{node:"miss",reason:'a named existence check needs both a name and a module after "in"'}:{node:"exists",entityType:r,term:u,scopeModule:d}}let c=a.slice(1).join(" ").trim();return c?{node:"exists",entityType:r,term:c,scopeModule:null}:{node:"miss",reason:`"${i[0]}" needs a name afterward`}}if(i[0]==="in"){let l=a.slice(1).join(" ").trim();return l?{node:"exists",entityType:r,term:null,scopeModule:l}:{node:"miss",reason:'"in" needs a module afterward'}}return null}function OE(e,t){if(!t.length)return null;let n=`${e} ${t.join(" ")}`,s=zs(n).slice(e.length).trim(),o=Bt(s),r=o.findIndex(a=>a.toLowerCase()==="in");if(r<0)return null;let i=o.slice(r+1).join(" ").trim();return i?{scope:i}:{node:"miss",reason:'"in" needs a scope afterward'}}function LE(e,t){if(t[0]!=="is"&&t[0]!=="are"||t[1]==="there")return null;let n=-1,s=!1;for(let c=1;c<t.length;c+=1)if(Xe[t[c]]){n=c,s=t[c-1]==="not";break}if(n<0)return null;let o=t.indexOf("by",n+1);if(o>0&&cs[t[n]]){let c=o+1;for(;c<t.length&&(t[c]==="the"||t[c]==="a"||t[c]==="an");)c+=1;let u=t[c];if(u&&!Qd.has(u))return null}let r=OE(t[n],e.slice(n+1));if(r?.node==="miss")return r;let i=1;t[i]==="the"&&(i+=1);let a=s?n-1:n;a>i&&(t[a-1]==="a"||t[a-1]==="an")&&(a-=1);let l=a>i?e.slice(i,a).join(" ").trim():"";return l?{node:"qualCheck",term:l,qualifier:t[n],negated:s,scope:r?.scope||null}:{node:"miss",reason:'"is/are <qualifier>" needs a named thing to check first'}}function NE(e,t,n){if(!["do","does","did","is","are","was","were"].includes(t[0]))return null;let s=t.indexOf("not",1);if(s<0)return null;let o=Do(e.filter((r,i)=>i!==s).join(" "),n);return!o||o.shape!=="ask"?null:{...o,negated:!0}}function ME(e,t,n){let s=Ws.find(d=>t.slice(0,d.split(" ").length).join(" ")===d);if(!s)return null;let o=s.split(" ").length;for(;o<t.length&&(t[o]==="the"||t[o]==="a"||t[o]==="all");)o+=1;let r=[];for(;o<t.length&&Xe[t[o]];)r.push(t[o]),o+=1;let i=o<t.length?At(t[o]):null;if(!i)return{node:"miss",reason:"count needs a known entity kind (functions, classes, modules, \u2026)"};let a=t[o];o+=1;let l=e.slice(o),c=t.slice(o).some(d=>!et.has(d)&&!ym.has(d)),u;if(c){let d=zo(`which ${a} ${l.join(" ")}`,n,1);if(!d||d.node==="miss")return{node:"miss",reason:"the count restrictor didn't parse"};u=d}else u={node:"allOfClass",entityType:i.entityType};return r.length&&(u={node:"qualifier",filters:r,inner:u}),{node:"count",entityType:i.entityType,base:u}}function FE(e,t,n,s){let o=0,r=!1,i=null;for(let y of $m){let w=y.split(" ");if(t.slice(0,w.length).join(" ")===y){i=y,o=w.length;break}}if(!i)if(t[0]==="what"||t[0]==="which")r=!0,o=1;else return null;for(;o<t.length&&el.has(t[o]);)o+=1;let a=[];for(;o<t.length&&Xe[t[o]];)a.push(t[o]),o+=1;let l=o<t.length?At(t[o]):null;if(!l||l.placeholder||l.entityType==="Change")return!r&&o<t.length&&o===t.length-1&&/^[a-z]+$/.test(t[o])&&!de[t[o]]&&!zn.includes(t[o])?{node:"miss",reason:`"${t[o]}" isn't a listable kind \u2014 try ${vm}`}:null;let c=l.entityType,u=t[o];o+=1;let d=e.slice(o),f=t.slice(o).some(y=>!et.has(y)&&!ym.has(y)),p=t.slice(o),m=d;(p[0]==="is"||p[0]==="are")&&(p=p.slice(1),m=m.slice(1));let h=r&&PE.has(p[0]);if(r&&(f&&!h||d.length===0))return null;let g,b=!1;if(f){let y=h?m:d,w=zo(`which ${[...a,u,...y].join(" ")}`,n,(s||0)+1);if(!w||w.node==="miss")return{node:"miss",reason:w&&w.reason||"the list filter didn't parse"};g=w,b=!0}else g={node:"allOfClass",entityType:c},a.length&&(g={node:"qualifier",filters:a,inner:g});return{node:"list",entityType:c,base:g,scoped:b}}function DE(e,t,n){let s=null,o=-1;for(let m=0;m<t.length;m+=1){let h=t.slice(m,m+2).join(" ");if(ls[h]){s=ls[h],o=m;break}if(ls[t[m]]){s=ls[t[m]],o=m;break}}if(!s)return null;let r=null,i=null;for(let m=o;m<t.length;m+=1)if(En[t[m]]){r=En[t[m]],i=t[m];break}if(!r){for(let m=o-1;m>=0;m-=1)if(En[t[m]]){r=En[t[m]],i=t[m];break}}let a=t.includes("connected")||t.slice(o,o+2).join(" ")==="most connected"||["largest","biggest","smallest"].includes(t[o]),l=["important","significant","central","key","core","essential","critical","principal"],c=t.some(m=>l.includes(m));!r&&(a||c)&&(r=En.connections,i="connections");let u,d=null;for(let m of t){let h=At(m);if(h&&!h.placeholder){u=h.entityType,d=m;break}}if(!d&&(u=i?Zd[i]:void 0,!u))return{node:"miss",reason:"a superlative needs an entity kind (module, class, function, \u2026)"};if(!r)return{node:"miss",reason:"name what to rank by (imports, callers, methods, tests, or connections)"};let f=["needs","need","needing","lacks","lack","lacking","misses","missing"],p=t.some(m=>f.includes(m))?s==="most"?"fewest":"most":s;return{node:"superlative",entityType:u,metric:r,metricNoun:i,extreme:p}}function UE(e,t,n,s){if(t[0]!=="find")return null;let o=1;for(;o<t.length&&el.has(t[o]);)o+=1;if(o>=t.length)return null;let r=At(t[o]);if(r&&!r.placeholder&&r.entityType!=="Change"&&o+1<t.length&&zE.has(t[o+1])){let a=e.slice(o+2).join(" ").trim();if(a)return{node:"find",entityType:r.entityType,term:a}}let i=At(t[t.length-1]);if(i&&!i.placeholder&&i.entityType!=="Change"){let a=e.slice(o,t.length-1).join(" ").trim();if(a)return{node:"find",entityType:i.entityType,term:a}}return t.some(a=>Dn.includes(a))?null:o===t.length-1&&/^[a-z]+$/.test(t[o])&&!de[t[o]]&&!zn.includes(t[o])?{node:"miss",reason:`"${t[o]}" isn't a listable kind \u2014 try ${vm}`}:null}function BE(e,t){if(t[0]!=="find")return null;let n=1;for(;n<t.length&&el.has(t[n]);)n+=1;let s=-1;for(let i=n+1;i<t.length;i+=1)if(Dn.includes(t[i])){s=i;break}if(s<0)return null;let o=At(t[s-1]);if(!o||o.placeholder||o.entityType==="Change")return null;let r=e.slice(n,s-1).join(" ").trim();return r?{entityType:o.entityType,term:r,relIdx:s}:null}function WE(e,t,n,s,o,r){let{branches:i,ops:a}=Vi(n,s),l=null,c=[];for(let u=0;u<i.length;u+=1){let d=i[u],f=d.map(y=>y.toLowerCase()),p=u===0?"intersection":a[u-1],m=Gc(d,f);if(m.blc.length&&m.blc.every(y=>Xe[y])){c.push({op:p,kind:"qual",filters:m.blc});continue}if(f[0]==="of"||f[0]==="in"){c.push({op:p,kind:"set",ast:{node:"membership",entityType:e,term:d.slice(1).join(" ")}});continue}let h=d,g=Tt(f,de);g?l=d.slice(g.start,g.end):l&&(h=[...l,...d]);let b=Em(`${t} ${h.join(" ")}`,o,r);if(!b||b.node==="miss")return{miss:b&&b.reason||"a clause in the combination didn't parse"};c.push({op:p,kind:"set",ast:b})}return{atoms:c}}function xm(e,t,n,s){let o=BE(e,t);if(o){let{entityType:R,term:k,relIdx:A}=o,M=t.slice(A+1),T=e.slice(A+1);if(!M.length)return{node:"miss",reason:`a relative clause needs a predicate after "${t[A]}"`};let P=WE(R,`which ${t[A-1]}`,M,T,n,s+1);if(P.miss)return{node:"miss",reason:P.miss};let U=[{op:"seed",kind:"set",ast:{node:"find",entityType:R,term:k}},...P.atoms];return U.length===1?U[0].ast:{node:"boolean",entityType:R,atoms:U}}let r=0;for(;r<t.length&&Qc.has(t[r]);)r+=1;let i=r>0,a=[];for(;r<t.length&&Xe[t[r]];)a.push(t[r]),r+=1;let l=r<t.length?At(t[r]):null;if(!l){let R=r+1<t.length?At(t[r+1]):null;if(Zf.has(t[r])&&R&&R.entityType==="Commit"&&r+2===t.length)return{node:"recentCommits"};if(mm.has(t[r])){let k=r+1;k<t.length&&(t[k]==="the"||t[k]==="a"||t[k]==="an")&&(k+=1);let A=k+1<t.length?At(t[k+1]):null;if(Zf.has(t[k])&&A&&A.entityType==="Commit"&&k+2===t.length)return{node:"recentCommits"}}return(i||a.length)&&R&&/^[a-z]+$/.test(t[r])&&!de[t[r]]&&!et.has(t[r])&&!cl.has(t[r])?{node:"find",entityType:R.entityType,term:e[r]}:null}let c=l.entityType,u=t[r];r+=1;let d=t.slice(r),f=e.slice(r),p=!1;d.length&&Dn.includes(d[0])&&(p=!0,d=d.slice(1),f=f.slice(1));let m=d[0]==="of"||d[0]==="in",h=d.length>0&&hm(d[0]),g=f.length>0&&Vi(d,f).branches.some(R=>{let{blc:k}=Gc(R,R.map(A=>A.toLowerCase()));return k.length&&k.every(A=>Xe[A])}),b=f.length>0?Vi(d,f).branches:[],y=!1;if(b.length>1){let R=b[0].map(A=>A.toLowerCase()),k=Tt(R,de);k&&k.start===0&&(y=b.slice(1).every(A=>{let M=A.map(P=>P.toLowerCase()),T=Tt(M,de);return T&&T.start===0?T.kind===k.kind:!T}))}let w=!1;if(b.length>1){let R=b[0].map(A=>A.toLowerCase()),k=Tt(R,de);k&&k.start===0&&(w=b.slice(1).every(A=>{let M=A.map(P=>P.toLowerCase()),T=Tt(M,de);return!!T&&T.start===0&&T.end-T.start===1}))}if(!(a.length||p||m||h||g||y||w))return null;if(!f.length){let R={node:"allOfClass",entityType:c};return a.length?{node:"qualifier",filters:a,inner:R,entityType:c}:{node:"miss",reason:"nothing to filter or traverse"}}let v=l.placeholder?"what":`which ${u}`,{branches:_,ops:$}=Vi(d,f),x=null,E=[];for(let R=0;R<_.length;R+=1){let k=_[R],A=k.map(J=>J.toLowerCase()),M=R===0?"seed":$[R-1],T=Gc(k,A);if(T.blc.length&&T.blc.every(J=>Xe[J])){E.push({op:M,kind:"qual",filters:T.blc});continue}if(A[0]==="of"||A[0]==="in"){E.push({op:M,kind:"set",ast:{node:"membership",entityType:c,term:k.slice(1).join(" ")}});continue}let P=k,U=Tt(A,de);U?x=k.slice(U.start,U.end):x&&(P=[...x,...k]);let Z=Em(`${v} ${P.join(" ")}`,n,s+1);if(!Z||Z.node==="miss")return{node:"miss",reason:Z&&Z.reason||"a clause in the combination didn't parse"};E.push({op:M,kind:"set",ast:Z})}if(E[0].kind!=="set")return{node:"miss",reason:"start with a clause, then combine with and/or/but-not"};let S;return E.length===1?S=E[0].ast:S={node:"boolean",entityType:c,atoms:E},a.length&&(S={node:"qualifier",filters:a,inner:S,entityType:c}),S}function Em(e,t,n){if(n>fm)return{node:"miss",reason:"too deep to resolve"};let s=Bt(e),o=s.map(a=>a.toLowerCase()),r=Zc(s,o,t,n);if(r)return r;let i=Do(e,t);return i?{node:"clause",clause:i}:null}function Vi(e,t){let n=Object.keys($o).sort((a,l)=>l.split(" ").length-a.split(" ").length),s=[],o=[],r=0,i=0;for(;i<e.length;){let a=null;for(let l of n){let c=l.split(" ");if(e.slice(i,i+c.length).join(" ")===l){a={c:l,len:c.length};break}}a&&i>r?(s.push(t.slice(r,i)),o.push($o[a.c]),i+=a.len,r=i):a?(i+=a.len,r=i):i+=1}return s.push(t.slice(r)),{branches:s,ops:o}}function tl(e,t,n,s){let o=Po[t];if(o&&ws.has(n)){let u=Ke(e,o).filter(d=>s.has(d.object));return Xn(u.map(d=>e.byId.get(d.subject)).filter(d=>d&&d.class===n))}let a=(!!o&&[...s].some(u=>ws.has(e.byId.get(u)?.class))?[...Lt(t),o]:Lt(t)).flatMap(u=>Ke(e,u)).filter(u=>s.has(u.object)),l=Xn(a.map(u=>e.byId.get(u.subject)).filter(Boolean));if(!n||n==="Change")return l;let c=l.filter(u=>u.class===n);return c.length?c:n!=="Module"&&l.some(u=>u.class==="Module")?rl(e,new Set(l.filter(u=>u.class==="Module").map(u=>u.id)),n):[]}function qE(e,t){let n=new Set(tl(e,"touches","Commit",t).map(s=>String(s.label||"").toLowerCase()));for(let s of t)for(let o of e.byId.get(s)?.derived_from||[]){let r=GE.exec(String(o||""));r&&n.add(r[1].toLowerCase())}return n.size}function Ir(e,t,n){let s=Lt(t).flatMap(o=>Ke(e,o)).filter(o=>n.has(o.subject));return Xn(s.map(o=>e.byId.get(o.object)).filter(Boolean))}function Xn(e){let t=new Set,n=[];for(let s of e)s&&!t.has(s.id)&&(t.add(s.id),n.push(s));return n}function VE(e,t){let n=Wn(t);if(!n)return[];let s=`${n}/`;return e.individuals.filter(o=>o.class==="Module"&&Wn(o.label).startsWith(s))}function qc(e){let t=em.get(e);if(t)return t;let n=new Set;for(let i of Ke(e,"reexports")){n.add(String(i.object).toLowerCase());let a=e.byId.get(i.object);a&&n.add(String(a.label).toLowerCase())}let s=new Set,o=new Set;for(let i of Ke(e,"tests"))s.add(i.object),o.add(i.subject);let r=new Map;for(let i of Ke(e,"defines"))r.set(i.object,i.subject);return t={exported:n,testedModules:s,testModules:o,moduleOfSymbol:r},em.set(e,t),t}function Fo(e,t){return t?t.class==="Module"?t.id:qc(e).moduleOfSymbol.get(t.id)||null:null}function Sm(e,t){let n=String(t||"").trim().toLowerCase();if(!n)return null;let s=(e?.individuals||[]).filter(d=>HE.has(d.class)&&String(d.label).toLowerCase()===n);if(s.length!==1)return null;let o=s[0],r=Fo(e,o),i=r&&e.byId.get(r)?.label||String((o.attributes||[]).find(d=>d.key==="site")?.value||"").split(":")[0]||null,a=Pe(o.class,1),l=a==="attribute"?"an":"a",c=i?`, ${Rr("defined-in",o.id,"defined in")} ${i}`:"",u=o.class==="Class"?` or "which classes inherit from ${o.label}"`:"";return{text:`${o.label} is ${l} ${a} in this codebase${c} \u2014 try "describe ${o.label}"${u}.`,hit:o,modLabel:i}}function Vc(e,t,n){let s=Xn(vo.flatMap(o=>Ir(e,o,new Set([t]))));return n?s.filter(o=>o.class===n):s}function nl(e,t,n=null){let s=Yn(e,t,n);if(!(s.match&&s.tier===1)){let o=VE(e,t);if(o.length)return{kind:"dir",mods:o}}return s.match?{kind:"single",id:s.match.id,entityClass:s.match.class,label:s.match.label}:{kind:"miss"}}function km(e,t,n,s,o){let r=o||(()=>!0),i=Vc(e,t,s).filter(r);if(i.length||!_m(e,n))return{own:i,inherited:[],viaId:null,viaLabel:null};for(let a of jm(e,t)){let l=e.byId.get(a);if(!l)continue;let c=Vc(e,a,s).filter(r);if(c.length)return{own:i,inherited:c,viaId:a,viaLabel:l.label}}return{own:i,inherited:[],viaId:null,viaLabel:null}}function Js(e,t,n){if(!n)return!1;switch(n.via){case"visibility":return String((t.attributes||[]).find(o=>o.key==="visibility")?.value||"public").toLowerCase()===n.value;case"attr":return!!(t.attributes||[]).find(s=>s.key===n.attr)?.value;case"exported":{let s=qc(e).exported;return s.has(String(t.label).toLowerCase())||s.has(String(t.id).toLowerCase())}case"tested":{let s=Fo(e,t),o=qc(e),r=s?e.byId?.get?.(s):null;return s&&(o.testModules.has(s)||r&&Hs(String(r.label).toLowerCase()))?!1:(!!s&&o.testedModules.has(s))===n.value}default:return!1}}function sl(e){return Ke(e,"inherits")}function Hc(e,t){return sl(e).filter(n=>n.object===t).map(n=>n.subject)}function tm(e,t){return sl(e).filter(n=>n.subject===t).map(n=>n.object)}function KE(e,t){let n=new Set,s=[...Hc(e,t)];for(;s.length;){let o=s.shift();if(!n.has(o)){n.add(o);for(let r of Hc(e,o))n.has(r)||s.push(r)}}return n}function jm(e,t){let n=new Set,s=[...tm(e,t)];for(;s.length;){let o=s.shift();if(!n.has(o)){n.add(o);for(let r of tm(e,o))n.has(r)||s.push(r)}}return n}function _m(e,t){let n=nm.get(e);if(n||(n=new Map,nm.set(e,n)),n.has(t))return n.get(t);let s=sl(e).some(o=>{let r=e.byId.get(o.subject),i=e.byId.get(o.object);return!!r&&!!i&&r.class===t&&i.class===t});return n.set(t,s),s}function sm(e,t){let n=String(e.label||"").toLowerCase();if(t.every(o=>n.includes(o)))return"label";let s=(e.attributes||[]).map(o=>String(o.value??"").toLowerCase());return t.every(o=>s.some(r=>r.includes(o)))?"attr":null}function rm(e){return e.slice().sort((t,n)=>om[n.via]-om[t.via]||String(t.ind.label).length-String(n.ind.label).length).map(t=>t.ind)}function im(e,t){let n=String(t||"").trim().toLowerCase();if(n.length<4)return!1;let s=Hn(n);if(Vn(String(e.label||"").toLowerCase(),n,s)<=s)return!0;for(let o of Qs(e.label))if(Vn(o,n,s)<=s)return!0;return!1}function Rm(e,t,n){let s=e.individuals.filter(l=>l.class===t),o=[...Qs(n)];if(!o.length||!s.length)return{narrow:[],broad:[]};let r=_m(e,t),i=[];for(let l of s){let c=sm(l,o);if(c){i.push({ind:l,via:c});continue}if(!r)continue;[...KE(e,l.id)].some(d=>{let f=e.byId.get(d);return!!f&&!!sm(f,o)})&&i.push({ind:l,via:"chain"})}if(i.length||!r)return{narrow:rm(i),broad:[]};let a=new Map;for(let l of s)for(let c of jm(e,l.id)){if(!a.has(c)){let u=e.byId.get(c);u&&u.class===t&&im(u,n)&&a.set(c,{ind:u,via:"chain"})}for(let u of Hc(e,c)){if(u===l.id||a.has(u))continue;let d=e.byId.get(u);d&&d.class===t&&im(d,n)&&a.set(u,{ind:d,via:"chain"})}}return{narrow:[],broad:rm([...a.values()])}}function YE(e){return[...Ti(Ai(e)).entries()].sort((t,n)=>n[1]-t[1]||t[0].localeCompare(n[0])).map(([t])=>({id:`pkg:${t}`,label:t,class:"Package"}))}function an(e,t,n){switch(t.node){case"clause":return Wt(e,t.clause,n).matches||[];case"allOfClass":return t.entityType==="Package"?YE(e):e.individuals.filter(s=>s.class===t.entityType);case"find":{let{narrow:s,broad:o}=Rm(e,t.entityType,t.term);return s.length?s:o}case"existsEdge":{let s=new Set(Lt(t.kind).flatMap(o=>Ke(e,o)).map(o=>o.subject));return e.individuals.filter(o=>s.has(o.id)&&(!t.entityType||o.class===t.entityType))}case"forwardComplement":{let s=Yn(e,t.subjectTerm,n&&n.contextId);if(!s.match)return[];let o=wm(e,t.kind);if(!o)return[];let r=new Set(Ir(e,t.kind,new Set([s.match.id])).map(i=>i.id));return e.individuals.filter(i=>i.class===o&&!r.has(i.id))}case"reverseSet":{let s=new Set(an(e,t.inner,n).map(o=>o.id));return tl(e,t.kind,t.entityType,s)}case"forwardSet":{let s=new Set(an(e,t.inner,n).map(o=>o.id));return Ir(e,t.kind,s)}case"prevSet":{let s=n&&n.prev;return Array.isArray(s)?s.map(o=>e.byId.get(o)).filter(Boolean):[]}case"membership":{let s=nl(e,t.term,n&&n.contextId);if(s.kind==="dir"){if(!t.entityType||t.entityType==="Module")return s.mods;let i=new Set(s.mods.map(l=>l.id));return Xn(vo.flatMap(l=>Ir(e,l,i))).filter(l=>l.class===t.entityType)}if(s.kind==="miss")return[];let{own:o,inherited:r}=km(e,s.id,s.entityClass,t.entityType);return o.length?o:r}case"qualifier":return t.inner.node==="membership"?Cm(e,t,n).matches:an(e,t.inner,n).filter(o=>t.filters.every(r=>Js(e,o,Xe[r])));case"boolean":return Tm(e,t,n);case"anaphora":return Am(e,t,n).matches;default:return[]}}function Tm(e,t,n){let s=[];for(let o of t.atoms){if(o.op==="seed"){s=an(e,o.ast,n);continue}if(o.kind==="qual"){let i=l=>o.filters.every(c=>Js(e,l,Xe[c])),a=l=>o.filters.every(c=>{let u=XE(Xe[c]);return u?Js(e,l,u):!Js(e,l,Xe[c])});s=o.op==="difference"?s.filter(a):s.filter(i);continue}let r=new Set(an(e,o.ast,n).map(i=>i.id));if(o.op==="intersection")s=s.filter(i=>r.has(i.id));else if(o.op==="difference")s=s.filter(i=>!r.has(i.id));else if(o.op==="union"){let i=new Set(s.map(a=>a.id));for(let a of an(e,o.ast,n))i.has(a.id)||(i.add(a.id),s.push(a))}}return s}function JE(e,t){if(!Array.isArray(t)||t.length<2)return null;let n=new Set,s=[];for(let o of t){let r=wn(e,o);r&&r.match&&!n.has(r.match.id)&&(n.add(r.match.id),s.push(r.match))}return s.length>=2?s:null}function Am(e,t,n){let o=JE(e,t.candidateTerms);if(!o){let d=n&&n.prev;if(!Array.isArray(d)||!d.length)return{compositeMiss:!0,reason:"no-prev",matches:[]};o=d.map(f=>e.byId.get(f)).filter(Boolean)}let r=o,i=t.filter;if(i&&i.type==="qual")r=r.filter(d=>i.filters.every(f=>Js(e,d,Xe[f])));else if(i&&i.type==="entity")r=r.filter(d=>d.class===i.entityType);else if(i&&i.type==="clause"){let d=wn(e,i.clause.object);if(!d.match)r=[];else{let f=Po[i.clause.kind],p=[...Lt(i.clause.kind),...f?[f]:[]],m=new Set(p.flatMap(h=>Ke(e,h)).filter(h=>h.object===d.match.id).map(h=>h.subject));r=r.filter(h=>m.has(h.id))}}let a=d=>d.length&&d.every(f=>f.class===d[0].class)?d[0].class:null,l=i&&i.type==="entity"?i.entityType:a(o),c=r.length?a(r):l;if(t.mode==="count")return{compositeKind:"count",count:r.length,entityType:c,matches:[]};let u=Lr(c,r,"anaphora",{bound:!0});return{compositeKind:"set",matches:r,entityType:c,referents:u}}function Im(e,t,n){let s=n.kind==="*"?QE:[n.kind,...n.sibling?[n.sibling]:[]],o=0;for(let r of s)for(let i of Ke(e,r)){let a=i.subject===t.id,l=i.object===t.id;if(n.dir==="out"&&a){if(n.filter){let c=e.byId.get(i.object);if(!c||c.class!==n.filter)continue}o+=1}else(n.dir==="in"&&l||n.dir==="both"&&(a||l))&&(o+=1)}return o}function ZE(e){let t=e.individuals.filter(s=>s.class==="Commit"),n=s=>String((s.attributes||[]).find(o=>o.key==="date")?.value||"");return t.sort((s,o)=>n(o).localeCompare(n(s))),{compositeKind:"recentCommits",matches:t}}function tS(e,t){let{op:n,pivotRaw:s}=t,o=u=>String((u.attributes||[]).find(d=>d.key==="date")?.value||"").slice(0,10),r=null,i=null,a=null;if(eS.test(s))r=s;else{let{match:u,ambiguous:d}=wn(e,s,{expectedClass:"Commit"});u&&!d&&u.class==="Commit"&&o(u)&&(i=u.id,a=u.label,r=o(u))}if(!r)return{compositeKind:"commitFilter",op:n,pivotRaw:s,pivotResolved:!1,matches:[]};let l=e.individuals.filter(u=>u.class==="Commit"&&u.id!==i&&o(u)).filter(u=>{let d=o(u);return n==="since"?d>=r:n==="before"?d<r:n==="after"?d>r:d===r}).sort((u,d)=>o(d).localeCompare(o(u))),c=[];return l.length&&c.push({kind:"set",class:"Commit",label:`${l.length} commit${l.length===1?"":"s"} ${n} ${s}`,ids:l.map(u=>u.id),attrs:{count:l.length,op:n,...i?{pivot:i}:{}},lane:"commitFilter"}),i&&c.push({kind:"event",class:"Commit",label:a,ids:[i],attrs:{date:r},lane:"commitFilter"}),{compositeKind:"commitFilter",op:n,pivotRaw:s,pivotDate:r,pivotResolved:!0,matches:l,referents:c}}function nS(e,t,n){let s=an(e,t.inner,n),o=new Set(s.map(a=>a.id));if(!o.size)return{compositeKind:"temporal",matches:[],entityType:t.entityType,innerCount:0};let r=tl(e,"touches","Commit",o),i=a=>String((a.attributes||[]).find(l=>l.key==="date")?.value||"");return r.sort((a,l)=>i(l).localeCompare(i(a))),{compositeKind:"temporal",matches:r,entityType:t.entityType,innerCount:s.length}}function sS(e,t){let n=e.individuals.filter(a=>a.class===t.entityType);if(t.metric?.kind==="tests"&&t.entityType==="Module"){let a=new Set(Ke(e,"tests").map(l=>l.subject));n=n.filter(l=>!a.has(l.id)&&!Hs(String(l.label).toLowerCase()))}let s=n.map(a=>({ind:a,score:Im(e,a,t.metric)})).sort((a,l)=>t.extreme==="most"?l.score-a.score:a.score-l.score);if(!s.length)return{compositeKind:"superlative",entityType:t.entityType,matches:[]};let o=s[0].score,r=s.filter(a=>a.score===o).map(a=>a.ind),i=r.length>=2?Lr(t.entityType,r,"superlative"):[{kind:"entity",class:t.entityType,label:r[0].label,ids:[r[0].id],attrs:{},lane:"superlative"}];return i.push({kind:"measure",label:`${o} ${t.metricNoun}`,ids:[],attrs:{metric:o},lane:"superlative"}),{compositeKind:"superlative",entityType:t.entityType,metricNoun:t.metricNoun,extreme:t.extreme,score:o,matches:r,referents:i}}function Cm(e,t,n){let s=t.node==="qualifier"&&t.inner.node==="membership"?t:null,o=s?s.inner:t,r=o.entityType,i=s?m=>s.filters.every(h=>Js(e,m,Xe[h])):null,a=m=>Lr(r,m,"membership"),l=nl(e,o.term,n&&n.contextId);if(l.kind==="dir"){let m;if(!r||r==="Module")m=l.mods;else{let h=new Set(l.mods.map(g=>g.id));m=Xn(vo.flatMap(g=>Ir(e,g,h))).filter(g=>g.class===r)}return i&&(m=m.filter(i)),{compositeKind:"set",matches:m,entityType:r,referents:a(m)}}if(l.kind==="miss")return{compositeKind:"set",matches:[],entityType:r};let{own:c,inherited:u,viaLabel:d}=km(e,l.id,l.entityClass,r,i),f=!c.length&&u.length>0,p=f?u:c;return{compositeKind:"membership",entityType:r,matches:p,inheritedNotOwn:f,viaLabel:d,ownerLabel:l.label,referents:a(p)}}function oS(e,t){let{entityType:n,term:s,scopeModule:o}=t,r=null;if(o){let a=wn(e,o,{expectedClass:"Module"});if(!a.match)return{compositeKind:"exists",entityType:n,term:s,scopeModule:o,scopeMiss:!0,matches:[]};r=a.match}if(s){let a=wn(e,s,{expectedClass:n}),l=!r||a.match&&Fo(e,a.match)===r.id,c=a.match&&l;return{compositeKind:"exists",entityType:n,term:s,scopeModule:o,scopeMatch:r,matches:c?[a.match]:[]}}let i=r?rl(e,new Set([r.id]),n):e.individuals.filter(a=>a.class===n);return{compositeKind:"exists",entityType:n,term:null,scopeModule:o,scopeMatch:r,matches:i}}function rS(e,t,n){let s=Fo(e,t);return n.kind==="dir"?n.mods.some(o=>o.id===t.id||o.id===s):s===n.id||Vc(e,n.id).some(o=>o.id===t.id)}function iS(e,t,n){let{term:s,qualifier:o,negated:r,scope:i}=t,a=Yn(e,s,n.contextId);if(a.unresolvedPronoun)return{compositeKind:"qualCheck",qualCheckMiss:"pronoun",term:s,matches:[]};if(!a.match)return{compositeKind:"qualCheck",qualCheckMiss:"unresolved",term:s,matches:[]};if(i){let d=nl(e,i,n.contextId);if(d.kind==="miss")return{compositeKind:"qualCheck",qualCheckMiss:"scope",term:s,scope:i,matches:[]};if(!rS(e,a.match,d))return{compositeKind:"qualCheck",qualCheckMiss:"outsideScope",term:s,scope:i,subjectLabel:a.match.label,scopeLabel:d.kind==="dir"?i:d.label,matches:[]}}let l=Js(e,a.match,Xe[o]),c=r?!l:l,u=[{kind:"entity",class:a.match.class,label:a.match.label,ids:[a.match.id],attrs:{},lane:"qualCheck"}];return{compositeKind:"qualCheck",subject:a.match,qualifier:o,negated:r,holds:c,matches:[a.match],referents:u}}function aS(e,t,n){let s=wn(e,t.object);if(!s||!s.match)return{compositeKind:"universal",universalMiss:"unresolved",object:t.object,matches:[]};let o=an(e,{node:"allOfClass",entityType:t.entityType},n),r=Tm(e,t.complement,n),i=r.length===0;return{compositeKind:"universal",entityType:t.entityType,kind:t.kind,object:s.match.label,holds:i,total:o.length,counter:r,matches:i?o:r}}function cS(e,t,n){if(t.node==="reverseSet"&&t.kind==="touches"&&t.entityType==="Commit")return new Set(an(e,t.inner,n).map(s=>s.id));if(t.node==="clause"&&t.clause?.shape==="reverse"&&t.clause.kind==="touches"&&t.clause.entityType==="Commit"){let{objMatch:s,ambiguous:o}=Wt(e,t.clause,n);return s&&!o?new Set([s.id]):null}return null}function lS(e,t,n={}){if(t.node==="miss")return{compositeMiss:!0,reason:t.reason||null,matches:[]};if(t.node==="exists")return oS(e,t);if(t.node==="qualCheck")return iS(e,t,n);if(t.node==="universal")return aS(e,t,n);if(t.node==="count"){let i=cS(e,t.base,n);return i?{compositeKind:"count",count:qE(e,i),entityType:t.entityType,matches:[]}:{compositeKind:"count",count:an(e,t.base,n).length,entityType:t.entityType,matches:[]}}if(t.node==="list")return{compositeKind:"list",matches:an(e,t.base,n),entityType:t.entityType,scoped:t.scoped};if(t.node==="worldRelation")return qS(e,t);if(t.node==="superlative")return sS(e,t);if(t.node==="temporal")return nS(e,t,n);if(t.node==="recentCommits")return ZE(e);if(t.node==="commitFilter")return tS(e,t);if(t.node==="anaphora")return Am(e,t,n);if(t.node==="membership"||t.node==="qualifier"&&t.inner.node==="membership")return Cm(e,t,n);if(t.node==="find"){let{narrow:i,broad:a}=Rm(e,t.entityType,t.term);return{compositeKind:"find",entityType:t.entityType,term:t.term,matches:i.length?i:a,broad:!i.length&&a.length>0}}if((t.node==="reverseSet"||t.node==="forwardSet")&&t.inner.node==="prevSet"&&!(Array.isArray(n.prev)&&n.prev.length))return{compositeMiss:!0,reason:"no-prev",matches:[]};let s=an(e,t,n),o=t.entityType||null,r=Lr(o,s,t.node==="qualifier"?"qualifierListing":"compositeSet");return{compositeKind:"set",matches:s,entityType:o,referents:r}}function Om(){return'compositional queries also work: "which functions call X and call Y", "what calls something that imports X", "public methods of X", "list functions" / "show me the classes", "how many classes", "which module has the most imports", "find me the payment class", or (after a listing) "which of those are tested"'}function uS(e){let t=["Function","Method"].includes(e.class)?`${e.label}()`:e.label;if(e.class==="Module")return t;let n=Or(e);return n?`${t} in ${n}`:t}function Kc(e){return!e||typeof e!="object"?!1:Array.isArray(e)?e.some(Kc):Array.isArray(e.filters)&&e.filters.some(t=>Xe[String(t).toLowerCase()]?.via==="tested")?!0:Object.values(e).some(Kc)}function dS(e,t){return!["Function","Method"].includes(t)||!Kc(e)?null:"This index records tests edges module to module, so it holds no function-grain coverage to filter on \u2014 ask whether the module a function lives in is tested instead."}function pS(e,t,n){if(t.compositeMiss)return t.reason==="no-prev"?{content:'"those"/"them" needs a previous answer to refer to \u2014 ask a listing question first, then follow up.',miss:!0,ambiguous:!1}:{content:`couldn't compile this compositional question${t.reason?` (${t.reason})`:""}. ${Om()}.`,miss:!0,ambiguous:!1};if(t.compositeKind==="exists"){if(t.scopeMiss)return{content:`no module matching "${t.scopeModule}" found in the index.`,miss:!0,ambiguous:!1};let s=Pe(t.entityType,1),o=Pe(t.entityType,2),r=t.scopeMatch?` in ${t.scopeMatch.label}`:"";if(t.term){if(!t.matches.length)return{content:`No \u2014 no ${s} named "${t.term}" found${r}.`,miss:!0,ambiguous:!1};let i=t.matches[0],a=Or(i),l=i.class==="Module"?"":a?`, ${Rr("defined-in",i.id,"defined in")} ${a}`:"";return{content:`Yes \u2014 ${i.label} is a ${s}${l}.`,miss:!1,ambiguous:!1,matches:t.matches}}return t.matches.length?{content:`Yes \u2014 ${gs(t.matches)}${r}.`,miss:!1,ambiguous:!1,matches:t.matches}:{content:`No \u2014 no ${o} found${r}.`,miss:!0,ambiguous:!1}}if(t.compositeKind==="qualCheck"){if(t.qualCheckMiss==="pronoun")return{content:`"${t.term}" needs a selected node to refer to \u2014 click a node first, or name it directly.`,miss:!0,ambiguous:!1};if(t.qualCheckMiss==="unresolved")return{content:`couldn't find "${t.term}" in the index to check.`,miss:!0,ambiguous:!1};if(t.qualCheckMiss==="scope")return{content:`couldn't find "${t.scope}" in the index to check inside.`,miss:!0,ambiguous:!1};if(t.qualCheckMiss==="outsideScope")return{content:`No \u2014 ${t.subjectLabel} isn't in ${t.scopeLabel}.`,miss:!0,ambiguous:!1};let s=t.subject.label,o=t.negated?`not ${t.qualifier}`:t.qualifier,r=t.negated?t.qualifier:`not ${t.qualifier}`;return{content:`${t.holds?"Yes":"No"} \u2014 ${s} is ${t.holds?o:r}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="universal"){if(t.universalMiss==="unresolved")return{content:`couldn't find "${t.object}" in the index to check.`,miss:!0,ambiguous:!1,matches:[]};let s=Pe(t.entityType,t.total),o=oE(t.kind);return t.holds?{content:`Yes \u2014 all ${t.total} ${s} ${o} ${t.object}.`,miss:!1,ambiguous:!1,matches:t.matches}:{content:`No \u2014 ${t.counter.length} of ${t.total} ${s} do not ${o} ${t.object}: ${gs(t.counter)}.`,miss:!1,ambiguous:!1,matches:t.counter}}if(t.compositeKind==="count"){let s=t.entityType?Pe(t.entityType,t.count):t.count===1?"result":"results";return{content:`${t.count} ${s}.`,miss:!1,ambiguous:!1,matches:[]}}if(t.compositeKind==="list"){if(!t.matches.length)return{content:`no ${Pe(t.entityType,2)} in this index.`,miss:!0,ambiguous:!1,matches:[]};let s=!["Module","Package","Commit","Fact","Utterance","Session","Source","Rule"].includes(t.entityType),o=!t.scoped&&s&&t.matches.length>He?` \u2014 narrow with "${Pe(t.entityType,2)} in <module>"`:"";return{content:`${gs(t.matches)}${o}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="worldRelation"){let s=gn(t.asked),o=Ds[t.relation].nouns[1];return t.pairs.length?{content:`${t.pairs.map(i=>`${i.subject.label||i.subject.id} ${i.reads} ${i.object}`).join("; ")}.`,miss:!1,ambiguous:!1,matches:t.matches}:{content:`no ${o} on record for ${s} in this graph.`,miss:!0,ambiguous:!1,matches:[]}}if(t.compositeKind==="membership"){if(!t.matches.length)return{content:`nothing in the index matches that${t.entityType?` (${Pe(t.entityType,2)})`:""}. ${bs(n)}`,miss:!0,ambiguous:!1,matches:[]};if(t.inheritedNotOwn){let s=Pe(t.entityType,2);return{content:`${t.ownerLabel?`${t.ownerLabel} has no own ${s}`:`no own ${s}`} \u2014 inherited from ${t.viaLabel}: ${gs(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches,inheritedNotOwn:!0}}return{content:`${gs(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="find"){let s=Pe(t.entityType,1);if(!t.matches.length)return{content:`no ${Pe(t.entityType,2)} found matching "${t.term}".`,miss:!0,ambiguous:!1,matches:[]};let o=t.matches.length===1?uS(t.matches[0]):gs(t.matches);return t.broad?{content:`no exact ${s} named "${t.term}", but found a related ${t.matches.length===1?s:Pe(t.entityType,2)}: ${o}.`,miss:!1,ambiguous:!1,matches:t.matches,relatedNotExact:!0}:{content:`${o}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="recentCommits"){if(!t.matches.length)return{content:"no commits recorded in this index.",miss:!0,ambiguous:!1,matches:[]};let s=i=>String((i.attributes||[]).find(a=>a.key==="date")?.value||""),o=t.matches.slice(0,Ut).map(i=>{let a=s(i).slice(0,10),l=(i.attributes||[]).find(c=>c.key==="message")?.value||"";return`${i.label}${a?` (${a})`:""}${l?` \u2014 ${l}`:""}`}),r=t.matches.length>Ut?` \u2026+${t.matches.length-Ut} more`:"";return{content:`${t.matches.length} recent commit(s): ${o.join(", ")}${r}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="commitFilter"){if(!t.pivotResolved)return{content:`"${t.pivotRaw}" isn't a recognized date (yyyy-mm-dd) or a known commit \u2014 try "what changed since 2026-06-01" or "what changed before <commit>".`,miss:!0,ambiguous:!1,matches:[]};if(!t.matches.length)return{content:`no commits recorded ${t.op} ${t.pivotRaw}.`,miss:!0,ambiguous:!1,matches:[]};let s=i=>String((i.attributes||[]).find(a=>a.key==="date")?.value||""),o=t.matches.slice(0,Ut).map(i=>{let a=s(i).slice(0,10),l=(i.attributes||[]).find(c=>c.key==="message")?.value||"";return`${i.label}${a?` (${a})`:""}${l?` \u2014 ${l}`:""}`}),r=t.matches.length>Ut?` \u2026+${t.matches.length-Ut} more`:"";return{content:`${t.matches.length} commit(s) changed ${t.op} ${t.pivotRaw}: ${o.join(", ")}${r}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="superlative"){if(!t.matches.length)return{content:`no ${Pe(t.entityType,2)} to rank in this index.`,miss:!0,ambiguous:!1};let s=t.extreme==="most"?"the most":"the fewest",o=t.matches.length>1?` (${t.matches.length}-way tie)`:"";return{content:`${gs(t.matches)} \u2014 ${s} ${t.metricNoun} (${t.score})${o}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="temporal"){let s=t.innerCount||0,o=t.entityType?Pe(t.entityType,s||2):s===1?"entity":"entities",r=s===1?"was":"were";if(!s)return{content:`nothing in the index matches the inner set, so there is no change history to date. ${bs(n)}`,miss:!0,ambiguous:!1,matches:[]};if(!t.matches.length)return{content:`no recorded commit touched the ${s} ${o} in that set in this index. ${bs(n)}`,miss:!0,ambiguous:!1,matches:[]};let i=t.matches[0],a=(i.attributes||[]).find(d=>d.key==="date")?.value||"";if(!a)return{content:`the ${o} in that set ${r} last touched by commit ${i.label}, but this index records no commit dates \u2014 regenerate the graph to attach mgx:commitDate.`,miss:!0,ambiguous:!1,matches:t.matches};let l=(i.attributes||[]).find(d=>d.key==="message")?.value||"",c=String(a).slice(0,10),u=t.matches.length-1;return{content:`the ${o} in that set ${r} last touched by commit ${i.label} on ${c}${l?` ("${l}")`:""}${u?`; ${u} earlier commit${u===1?"":"s"} recorded`:""}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(!t.matches.length){let s=dS(e,t.entityType)||bs(n);return{content:`nothing in the index matches that${t.entityType?` (${Pe(t.entityType,2)})`:""}. ${s}`,miss:!0,ambiguous:!1,matches:[]}}return{content:`${gs(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches}}function ol(){return`"which <functions|classes|modules> <imports|calls|uses|inherits from|tests> <name>" or "what does <name> <import|call|export>" or "what uses <name>" or "where is <name> defined" / "where is <name> mentioned" or "when did <name> change" or "which commits touched <name>" or "which changes touch commit <sha>"/"what did commit <sha> touch" (a commit's own changes) or plainly "what calls this" (about a selected node) or "what does <term> mean"/"what is a <ClassName>" (about the graph's own vocabulary). `+Om()}function bs(e=null){return e&&Ec(e)===0?"This store holds no code index, so it records no modules or commits to look through.":`Try "who touched <a module that actually has commits>" or "/describe <module>" to see what's in the index.`}function Qs(e){return new Set(String(e).toLowerCase().split(/[^a-z0-9]+/).filter(Boolean))}function Ki(e){if(e.length<5)return e;let t=e.replace(/(ing|ers|ors|er|or)$/,"");return t===e?e:t.length>=3&&t[t.length-1]===t[t.length-2]?t.slice(0,-1):t}function Lm(e){return String(e||"").replace(/\.[a-z0-9]+$/i,"").toLowerCase().replace(/[/\-_.]+/g,"")}function fS(e){return String(e||"").trim().replace(/^(?:the|a|an)\s+/i,"").toLowerCase().replace(/[\s\-_]+/g,"")}function Tr(e,t,{expectedClass:n=null}={}){let s=String(t||"").trim();if(!s)return{match:null,candidates:[],tier:null,ambiguous:!1};let o=s.toLowerCase(),r=n?e.individuals.filter(g=>g.class===n):e.individuals,i=o.match(/^(commit[:\s])?([0-9a-f]{7,40})$/);if(i){let g=i[2],b=r.filter(y=>y.class==="Commit"&&(String(y.id).toLowerCase().startsWith(`commit:${g}`)||String(y.label).toLowerCase().startsWith(g)));if(b.length===1)return{match:b[0],candidates:[],tier:1,ambiguous:!1};if(b.length>1)return{match:b[0],candidates:b.slice(1,5),tier:1,ambiguous:!0};if(i[1])return{match:null,candidates:[],tier:null,ambiguous:!1}}let a=r.find(g=>String(g.label).toLowerCase()===o||String(g.id).toLowerCase()===o);if(a)return{match:a,candidates:[],tier:1,ambiguous:!1};let l=`ext:${o}`,c=null;e:for(let g of e.relations)for(let b of g.edges)if(String(b.object).toLowerCase()===l){c=b.object;break e}if(c&&!n)return{match:{id:c,label:s,class:null},candidates:[],tier:2,ambiguous:!1};let u=s.split(/\s+and\s+/i).map(g=>g.trim()).filter(Boolean);if(u.length>1){let g=new Set;for(let b of u){let y=Tr(e,b,{expectedClass:n});y.match&&!y.ambiguous&&g.add(y.match.id)}if(g.size>1)return{match:null,candidates:[],tier:null,ambiguous:!1}}let d=[],f=!o.includes("/")&&/^[\w$]+(\.[\w$]+)+$/.test(o);if(f){let g=o.split(".").pop();for(let b of r){let y=String(b.label||"").toLowerCase();b.class==="Module"?y.split("/").pop()===o&&d.push({ind:b,score:1e3-Math.abs(y.length-o.length)}):y.includes(o)?d.push({ind:b,score:2e3-Math.abs(y.length-o.length)}):y.endsWith(`.${g}`)&&d.push({ind:b,score:1500-Math.abs(y.length-o.length)})}}else{let g=[...Qs(s)],b=o.split(/\s+/).find($=>$.includes("/")),y=b?b.split("/").pop().replace(/\.[a-z0-9]+$/,""):null,v=s.trim().replace(/^(?:the|a|an)\s+/i,"").trim().split(/\s+/).filter(Boolean).length>=2,_=v?fS(s):null;for(let $ of r){let x=String($.label||"").toLowerCase(),E=x.split("/").pop().replace(/\.[a-z0-9]+$/,"");if(E===o){d.push({ind:$,score:5e3});continue}if(o.length>=4&&(E.startsWith(o)||E.endsWith(o))){d.push({ind:$,score:4e3-Math.abs(E.length-o.length)});continue}if(v){let k=Lm($.label);if(k&&k===_){d.push({ind:$,score:5e3});continue}let A=/[/_-]/.test($.label)||/\.[a-z0-9]+$/i.test(String($.label||""));if(k&&A&&_.length>=4&&k.includes(_)){d.push({ind:$,score:2e3-Math.abs(k.length-_.length)});continue}}if($.class==="Module"){let k=Ki(o);if(k!==o&&k===Ki(E)){let A=Hn(o);if(Vn(E,o,A)>A){d.push({ind:$,score:3e3-Math.abs(E.length-o.length)});continue}}}if(o.length>=4&&x.includes(o)){d.push({ind:$,score:1e3-Math.abs(x.length-o.length)});continue}let S=Qs($.label),R=g.filter(k=>S.has(k)).length;R>0&&(!y||S.has(y))&&d.push({ind:$,score:R/g.length*Fc})}}if(d.sort((g,b)=>b.score-g.score),d.length){let[g,...b]=d,y=b.filter(v=>v.score===g.score),w=g.score>=Fc?b.filter(v=>v.score>=Fc):b;return{match:g.ind,candidates:w.slice(0,4).map(v=>v.ind),tier:3,ambiguous:y.length>0}}let p=f||o.includes("/"),m=null,h=!p&&typeof qs=="function"?qs(e.proseIndex,s).filter(g=>!n||e.byId.get(g.id)?.class===n):[];if(h.length){let[g,...b]=h,y=e.byId.get(g.id);if(y){let w=b.filter(v=>v.score===g.score);if(m={match:y,candidates:b.slice(0,4).map(v=>e.byId.get(v.id)).filter(Boolean),tier:4,ambiguous:w.length>0,matchedVia:"prose"},!m.ambiguous&&g.via!=="spell")return m}}if(!i&&o.length>=4){let g=Hn(o),b=g+1,y=[];for(let w of r){let v=Vn(String(w.label||"").toLowerCase(),o,g);if(v>0)for(let _ of Qs(w.label)){if(v<=0)break;v=Math.min(v,Vn(_,o,g))}v<b?(b=v,y=[w]):v===b&&v<=g&&y.push(w)}if(b<=g&&y.length===1)return{match:y[0],candidates:[],tier:5,ambiguous:!1,matchedVia:"fuzzy"};if(b<=g&&y.length>1&&!m){let[w,...v]=y;return{match:w,candidates:v.slice(0,4),tier:5,ambiguous:!0,matchedVia:"fuzzy"}}}return m||{match:null,candidates:[],tier:null,ambiguous:!1}}function Dc(e,t){let n=Lm(t),s=[...Qs(t)],o=[];for(let r of Qs(e))n.includes(r)||s.some(i=>Ki(i)===Ki(r))||Hi.has(r)||Pm.has(r)||o.push(r);return o}function Gi(e,t){if(!e?.match||e.tier!==3||e.matchedVia)return e;if(e.ambiguous){let s=[e.match,...e.candidates||[]],o=s.map(r=>new Set(Dc(t,r.label))).reduce((r,i)=>r.filter(a=>i.has(a)),Dc(t,s[0].label));return o.length?{match:null,candidates:[],tier:null,ambiguous:!1,unplacedWords:o,nearestLabel:gn(s.slice(0,4).map(r=>r.label))}:e}let n=Dc(t,e.match.label);return n.length?{match:null,candidates:[],tier:null,ambiguous:!1,unplacedWords:n,nearestLabel:e.match.label}:e}function wn(e,t,n={}){let{expectedClass:s=null}=n;if(!s){let o=String(t||"").trim(),r=o.replace(mS,"").trim(),i=r.match(hS);if(i){let a=r.slice(0,i.index).trim(),l=We[i[1].toLowerCase()];if(a&&l){let c=Gi(Tr(e,a,{expectedClass:l}),a);if(c?.match?.id&&!c.ambiguous)return c}}if(r&&r!==o){let a=Gi(Tr(e,r,n),r);if(a?.match?.id&&!a.ambiguous)return a}return Gi(Tr(e,t,n),t)}return Gi(Tr(e,t,n),t)}function Yn(e,t,n){if(Us.includes(String(t||"").trim().toLowerCase())){if(!n)return{match:null,candidates:[],tier:null,ambiguous:!1,unresolvedPronoun:!0};let s=e.byId.get(n);return s?{match:s,candidates:[],tier:1,ambiguous:!1}:{match:null,candidates:[],tier:null,ambiguous:!1,unresolvedPronoun:!0}}return wn(e,t)}function rl(e,t,n){let s=[];for(let o of Ke(e,"defines")){if(!t.has(o.subject))continue;let r=e.byId.get(o.object);r&&r.class===n&&s.push(r)}return s}function gS(e,t,n,s={}){let o=!n||n==="Change"||n==="Commit",r=o||n==="Module",i=o||ws.has(n),a=[...r?["touches"]:[],...i?["touchesSymbol"]:[]],l=a.flatMap(c=>Ke(e,c)).filter(c=>c.subject===t.id).map(c=>e.byId.get(c.object)).filter(Boolean);return n&&ws.has(n)&&(l=l.filter(c=>c.class===n)),{matches:l,objMatch:t,commitSubject:!0,ambiguous:!1,candidates:[],traversal:`${a.join("+")} edges where subject = commit ${t.label}`,...s}}function $S(e,t){let n=new Set(String(t||"").toLowerCase().split(/[\s-]+/).filter(Boolean));return(e.individuals||[]).filter(s=>s.class==="Module"&&il.has(am(s.label))).map(s=>({ind:s,named:n.has(am(s.label))?1:0,depth:String(s.label).split("/").length,fixture:yS(s.label)?1:0})).sort((s,o)=>o.named-s.named||s.depth-o.depth||s.fixture-o.fixture||String(s.ind.label).localeCompare(String(o.ind.label))).map(s=>s.ind)}function vS(e,t,n){return e==="reverse"&&(t==="imports"||t==="calls")&&(!n||n==="Module")}function al(e){return(e?.attributes||[]).find(t=>t.prop===xS)?.value||null}function ES(e){return e==="SchemaClass"?"a class in the graph's schema":e==="SchemaPredicate"?"a predicate (relation) in the graph's schema":`${No(e)} ${e} in this graph's vocabulary`}function Wt(e,t,{contextId:n=null,prev:s=null,pinnedObjMatch:o=null}={}){if(!t)return{matches:[],objMatch:null,candidates:[],traversal:null,ambiguous:!1};if(t.node)return lS(e,t,{contextId:n,prev:s});if(t.ambiguousParse){let T=t.candidates.map(P=>{let U=Wt(e,P,{contextId:n,prev:s});return{parsed:P,result:U,rendered:bn(P,U,e)}});return{matches:[],objMatch:null,candidates:t.candidates,traversal:null,ambiguous:!0,branches:T}}let{shape:r,kind:i,entityType:a}=t;if(r==="meta"){let T=String(t.object||"").trim(),P=T.toLowerCase(),U=(e.individuals||[]).find(Z=>{if(!al(Z))return!1;if(String(Z.label).toLowerCase()===P)return!0;let J=(Z.attributes||[]).find(ne=>ne.key==="token")?.value;return J&&String(J).toLowerCase()===P});if(!U){let Z=Sm(e,T);return Z?{matches:[Z.hit],objMatch:Z.hit,candidates:[],ambiguous:!1,metaCodeClass:!0,metaFallbackText:Z.text,traversal:`schema lookup for "${T}" (miss), then unique code-entity individual by label`}:{matches:[],objMatch:null,candidates:[],traversal:`schema lookup for "${T}"`,ambiguous:!1}}return{matches:[U],objMatch:U,candidates:[],traversal:`schema lookup for "${T}"`,ambiguous:!1}}if(r==="mentions"){let T=String(t.object||"").trim();return{matches:(typeof qs=="function"?qs(e.proseIndex,T):[]).map(Z=>e.byId.get(Z.id)).filter(Boolean),objMatch:null,candidates:[],ambiguous:!1,mentionsShape:!0,traversal:`proseIndex word lookup for "${T}"`}}if(r==="where"&&bS.test(String(t.object||"").trim())){let T=$S(e,t.object);return{matches:T,objMatch:T[0]||null,candidates:T.slice(1,5),ambiguous:!1,entryPointShape:!0,traversal:`Module individuals with an entry-point basename (${[...il].join("/")}), ranked query-named basename first, then shallower path, then non-test path`}}if(t.modifier&&t.modifier!=="direct"&&!vS(r,i,a))return{matches:[],objMatch:null,candidates:[],ambiguous:!1,unsupportedModifier:!0,traversal:`modifier "${t.modifier}" requested for a "${i}" query \u2014 no closure traversal exists for this combination yet`};if(r==="ask"){let T=Yn(e,t.subject,n),P=Yn(e,t.object,n);if(!T.match||!P.match||T.ambiguous||P.ambiguous)return{matches:[],objMatch:P.match,candidates:P.candidates,traversal:null,ambiguous:!1,answer:null,unresolvedPronoun:!!(T.unresolvedPronoun||P.unresolvedPronoun)};let[U,Z]=[T.match,P.match];i==="touches"&&Z.class==="Commit"&&U.class!=="Commit"&&([U,Z]=[Z,U]);let J=Po[i],ne=[...new Set(J?[...Lt(i),J]:Lt(i))],D=ne.flatMap(z=>Ke(e,z)).filter(z=>z.subject===U.id&&z.object===Z.id);return{matches:D,answer:t.negated?D.length===0:D.length>0,objMatch:P.match,subjMatch:T.match,candidates:[],traversal:`${ne.join("+")} edge from ${U.label} to ${Z.label}`,ambiguous:!1}}let l;if(o)l={match:o,candidates:[],ambiguous:!1,matchedVia:null};else{if(l=Yn(e,t.object,n),t.altObject&&t.altObject!==t.object){let T=Yn(e,t.altObject,n),P=!!l.match&&!l.ambiguous,U=!!T.match&&!T.ambiguous;!P&&U?l=T:P&&U&&l.match.id!==T.match.id&&(l={...l,ambiguous:!0,candidates:[T.match,...l.candidates||[]]})}if(t.kind==="tests"&&l.match&&!l.ambiguous&&!String(t.object||"").includes("/")){let T=Z=>Z.replace(/\.(?:test|spec|tests)(?=\.[^.]+$)/,""),P=T(String(t.object||"").trim().toLowerCase()),U=(e.individuals||[]).find(Z=>{if(Z.class!=="Module"||Z.id===l.match.id)return!1;let J=String(Z.label||"").toLowerCase().split("/").pop();return J!==T(J)&&T(J)===P});U&&(l={...l,ambiguous:!0,candidates:[U,...l.candidates||[]]})}}let{match:c,candidates:u,ambiguous:d,unresolvedPronoun:f,matchedVia:p,unplacedWords:m,nearestLabel:h}=l;if(!c)return{matches:[],objMatch:null,candidates:u,traversal:null,ambiguous:!1,unresolvedPronoun:f,unplacedWords:m,nearestLabel:h};if(d){let P=Xn([c,...u||[]]).slice(0,He).map(U=>{let Z=Wt(e,t,{contextId:n,prev:s,pinnedObjMatch:U});return{candidate:U,result:Z,rendered:bn(t,Z,e)}});return{matches:[],objMatch:c,candidates:u,traversal:null,ambiguous:!0,branches:P}}if(r==="where"){let T=(c.attributes||[]).find(P=>P.key==="site")?.value||null;return{matches:[c],objMatch:c,candidates:u,ambiguous:d,matchedVia:p,whereShape:!0,site:T,traversal:T?`site attribute of ${c.label}`:`class + defining module of ${c.label}`}}if(r==="when"){let T=Z=>String((Z.attributes||[]).find(J=>J.key==="date")?.value||""),P;if(c.class==="Commit")P=[c];else{let Z=["touches","touchesSymbol"].flatMap(ne=>Ke(e,ne)).filter(ne=>ne.object===c.id),J=new Set;P=[];for(let ne of Z){if(J.has(ne.subject))continue;J.add(ne.subject);let D=e.byId.get(ne.subject);D&&D.class==="Commit"&&P.push(D)}P.sort((ne,D)=>T(D).localeCompare(T(ne)))}let U=P.length&&T(P[0])?[{kind:"event",class:"Commit",label:P[0].label,ids:[P[0].id],attrs:{date:T(P[0]).slice(0,10)},lane:"when"}]:[];return{matches:P,objMatch:c,candidates:u,ambiguous:d,matchedVia:p,whenShape:!0,referents:U,traversal:`touches+touchesSymbol edges where object = ${c.label}, newest commit date first`}}if(r==="whoLast"){let T=ne=>String((ne.attributes||[]).find(D=>D.key==="date")?.value||""),P=["touches","touchesSymbol"].flatMap(ne=>Ke(e,ne)).filter(ne=>ne.object===c.id),U=new Set,Z=[];for(let ne of P){if(U.has(ne.subject))continue;U.add(ne.subject);let D=e.byId.get(ne.subject);D&&D.class==="Commit"&&Z.push(D)}Z.sort((ne,D)=>T(D).localeCompare(T(ne)));let J=Z.length&&T(Z[0])?[{kind:"event",class:"Commit",label:Z[0].label,ids:[Z[0].id],attrs:{date:T(Z[0]).slice(0,10)},lane:"whoLast"}]:[];return{matches:Z,objMatch:c,candidates:u,ambiguous:d,matchedVia:p,whoLastShape:!0,referents:J,traversal:`touches+touchesSymbol edges where object = ${c.label}, newest commit's author`}}if(i==="touches"&&c.class==="Commit")return gS(e,c,a,{candidates:u,ambiguous:d,matchedVia:p});if(r==="forward"){let T=Po[i],U=!!(T&&c.class&&ws.has(c.class))?[...new Set([...Lt(i),T])]:Lt(i);if(a&&a!=="Change"){let W=bm(e,U),I=Pc[a];if(W.size&&!W.has(a)&&!(I&&W.has(I)))return{matches:[],objMatch:c,candidates:u,ambiguous:d,matchedVia:p,forwardGrainMiss:!0,wantClasses:[...W],traversal:`${U.join("+")} edges where subject = ${c.label} (grain mismatch: this "${i}" relation never targets a ${Kn(a)})`}}let J=U.flatMap(W=>Ke(e,W)).filter(W=>W.subject===c.id).map(W=>e.byId.get(W.object)).filter(Boolean),ne=Xn(J),D=ne,z="";if(a&&a!=="Change"){D=ne.filter(I=>I.class===a);let W=Pc[a];if(!D.length&&W){let I=ne.filter(L=>L.class===W);I.length&&(D=I,z=`, widened to ${W} subjects (no ${a} recorded)`)}}return{matches:D,objMatch:c,candidates:u,traversal:`${U.join("+")} edges where subject = ${c.label}${z}`,ambiguous:d,matchedVia:p}}if(t.modifier==="transitive")return{matches:To(e,c,{maxDepth:cm}).flat().map(U=>e.byId.get(U.id)).filter(Boolean),objMatch:c,candidates:u,ambiguous:d,matchedVia:p,traversal:`reverse dependency closure over imports+calls edges from ${c.label} (impactClosure, maxDepth=${cm})`};let g=Po[i]||Lt(i).find(T=>pm.has(T))||null,b=!!(c.class&&ws.has(c.class));if(g&&(ws.has(a)||b)){let T=Ke(e,g).filter(z=>z.object===c.id),P=Xn(T.map(z=>e.byId.get(z.subject)).filter(Boolean)),U=!a||a==="Change"?P:P.filter(z=>z.class===a),Z="",J=Pc[a];if(!U.length&&J){let z=P.filter(W=>W.class===J);z.length&&(U=z,Z=`, widened to ${J} subjects (no ${a} recorded)`)}let ne=(i==="touches"||i==="calls"||i==="uses")&&c.class==="Class"&&!Ke(e,"contains").some(z=>z.subject===c.id),D=ne?e.byId.get(Fo(e,c)||""):null;if(U.length||!(ne&&D))return{matches:U,objMatch:c,candidates:u,traversal:`${g} edges where object = ${c.label}${Z}`,ambiguous:d,matchedVia:p}}let y=c,w=u,v=d,_=p,$="",x=wm(e,i);if(x&&y.class&&y.class!==x){let T=wn(e,t.object,{expectedClass:x});if(T.match&&!T.ambiguous)y=T.match,w=T.candidates,v=T.ambiguous,_=T.matchedVia;else if(x==="Module"){let P=Fo(e,y),U=P&&e.byId.get(P);if(U)$=`, refined from ${y.label} to its containing module`,y=U;else return{matches:[],objMatch:y,candidates:w,ambiguous:v,matchedVia:_,wrongGrainMiss:!0,wantClass:x,traversal:`"${t.object}" resolved to ${Kn(y.class)} ${y.label} (grain mismatch: this "${i}" question needs a ${Kn(x)}, and no containing module could be found to refine to)`}}else return{matches:[],objMatch:y,candidates:w,ambiguous:v,matchedVia:_,wrongGrainMiss:!0,wantClass:x,traversal:`"${t.object}" resolved to ${Kn(y.class)} ${y.label} (grain mismatch: this "${i}" question needs a ${Kn(x)})`}}let E=Lt(i).flatMap(T=>Ke(e,T)).filter(T=>T.object===y.id);i==="cochange"&&(E=E.concat(Lt(i).flatMap(T=>Ke(e,T)).filter(T=>T.subject===y.id).map(T=>({...T,subject:T.object,object:T.subject}))));let S="";if(!E.length&&y.class){let T=`ext:${String(y.label).toLowerCase()}`;E=Lt(i).flatMap(P=>Ke(e,P)).filter(P=>String(P.object).toLowerCase()===T),E.length&&(S=` (by name, via unresolved ${T} references)`)}let R=[],k=new Set;for(let T of E){let P=e.byId.get(T.subject);P&&!k.has(P.id)&&(k.add(P.id),R.push(P))}let A,M="";if(!a||a==="Change")A=R;else{let T=R.filter(P=>P.class===a);if(T.length)A=T;else if(a!=="Module"&&R.some(P=>P.class==="Module")){let P=new Set(R.filter(U=>U.class==="Module").map(U=>U.id));A=rl(e,P,a),M=`, then ${Kn(a)} defined in the matched module(s)`}else A=[]}return{matches:A,objMatch:y,candidates:w,traversal:`${Lt(i).join("+")} edges where object = ${y.label}${S}${M}${$}`,ambiguous:v,matchedVia:_}}function Or(e){if(e.class==="Module")return e.label;let t=(e.attributes||[]).find(s=>s.key==="site")?.value;if(t)return String(t).split(":")[0];let n=String(e.id||"").match(/^fn:(.+)#/);return n?n[1]:null}function zc(e){let t=String(e.label||e.id||"");return["Function","Method"].includes(e.class)?`function ${t}()`:t}function SS(e){let t=String(e.label||e.id||""),n=(e.attributes||[]).find(s=>s.key==="author")?.value;return n?`${t} (${n})`:t}function gn(e){return e.length>1?`${e.slice(0,-1).join(", ")} and ${e[e.length-1]}`:e[0]}function Ar(e){let t=e.object??e.subject??"?";return`${e.entityType?Pe(e.entityType,2)+" that ":""}${e.kind} "${t}"`}function Yc(e){return hr[e]?.bare||e}function kS(e){let t=Yc(e);return t.endsWith("e")?`${t}d`:`${t}ed`}function jS(e){if(!Array.isArray(e.atoms)||e.atoms.length!==2)return null;let[t,n]=e.atoms;if(t.op!=="seed"||t.ast?.node!=="allOfClass"||n.op!=="difference")return null;let s=Pe(e.entityType,2);if(n.kind==="qual")return`${s} that are not ${n.filters.join(" and not ")}`;if(n.kind!=="set"||!n.ast)return null;if(n.ast.node==="existsEdge")return`${s} that do not ${Yc(n.ast.kind)} anything`;let o=n.ast.node==="clause"?n.ast.clause:n.ast;if(!o||o.node||!o.kind)return null;let r=o.object??o.subject;return r==null?null:`${s} that do not ${Yc(o.kind)} ${JSON.stringify(String(r))}`}function Nm(e){if(!e)return null;if(e.ambiguousParse)return{english:`ambiguous: ${e.candidates.map(Ar).join(" \u2014 or \u2014 ")}`,machine:`ambiguousParse(${e.candidates.map(r=>Nm(r)?.machine).join(", ")})`};if(e.node)return{english:(e.node==="boolean"?jS(e):null)||`a compositional query (${e.node})`,machine:`composite(${e.node})`};let t=r=>JSON.stringify(String(r??"")),n=[];e.kind&&n.push(e.kind),e.negated&&n.push("negated"),e.entityType&&n.push(`entityType=${e.entityType}`),e.modifier&&e.modifier!=="direct"&&n.push(`modifier=${e.modifier}`),e.subject!=null&&n.push(`subject=${t(e.subject)}`),e.object!=null&&n.push(t(e.object));let s=`${e.shape}(${n.join(", ")})`,o;if(e.shape==="ask")o=`does "${e.subject}" ${e.negated?"not ":""}${Xs(e.kind)} "${e.object}"?`;else if(e.shape==="meta")o=`what does "${e.object}" mean, in this graph's own vocabulary?`;else if(e.shape==="mentions")o=`where is "${e.object}" mentioned?`;else if(e.shape==="where")o=`where is "${e.object}" defined?`;else{let r=e.entityType?Pe(e.entityType,2)+" that ":"";o=e.shape==="forward"?`what "${e.object}" itself ${Xs(e.kind)}`:`${r}${Xs(e.kind)} "${e.object}"`}return{english:o,machine:s}}function bn(e,t,n=null){let s=Mm(e,t,n);return t&&t.matchedVia==="fuzzy"&&t.objMatch&&!s.ambiguous&&(s.content=`assuming you meant ${t.objMatch.label}: ${s.content}`),s}function Mm(e,t,n){if(!e)return{content:`couldn't parse this as a graph question. Try: ${ol()}`,miss:!0,ambiguous:!1};if(e.node)return pS(e,t,n);if(e.ambiguousParse)return t.branches&&t.branches.length?{content:`this could mean more than one thing:
55
+ ${t.branches.map((l,c)=>`${c+1}) as ${Ar(l.parsed)}: ${l.rendered.content}`).join(`
56
56
  `)}
57
- (ask one of these directly, or try rephrasing more specifically, to get just that reading)`,miss:!1,ambiguous:!0,candidates:e.candidates.map(Tr),candidateParses:e.candidates}:{content:`this could mean more than one thing: ${e.candidates.map((a,l)=>`${l+1}) ${Tr(a)}`).join(" or ")} \u2014 try rephrasing more specifically.`,miss:!1,ambiguous:!0,candidates:e.candidates.map(Tr),candidateParses:e.candidates};if(t.unresolvedPronoun)return{content:`"${e.object??e.subject}" needs a selected node to refer to \u2014 click a node first, or name it directly.`,miss:!0,ambiguous:!1};if(t.unsupportedModifier)return{content:`the "${e.modifier}" modifier isn't supported for "${e.kind}" queries yet \u2014 only imports/calls (module-level) have a transitive closure today.`,miss:!0,ambiguous:!1};if(t.wrongGrainMiss){let i=t.objMatch.class?Me(t.objMatch.class,1):"term",a=Me(t.wantClass,1);return{content:`"${e.object}" resolved to the ${i} ${t.objMatch.label}, but this question needs a ${a} \u2014 no ${a} named "${e.object}" was found in the index.`,miss:!0,ambiguous:!1}}if(t.forwardGrainMiss){let i=t.wantClasses.map(a=>Me(a,2));return{content:`${t.objMatch.label}'s "${qs(e.kind)}" relation in this index never produces ${Me(e.entityType,2)} \u2014 only ${gn(i)}.`,miss:!0,ambiguous:!1}}if(e.shape==="meta"){if(!t.objMatch)return{content:`"${e.object}" isn't a term in this graph's own vocabulary (no matching class or predicate).`,miss:!0,ambiguous:!1};if(t.metaCodeClass)return{content:t.metaFallbackText,miss:!1,ambiguous:!1,matches:t.matches};let i=nl(t.objMatch)||"";return{content:`${t.objMatch.label} is ${lS(t.objMatch.class)}: ${i}`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.mentionsShape){if(!t.matches.length)return{content:`"${e.object}" is not mentioned in any indexed identifier or doc-comment prose.`,miss:!0,ambiguous:!1};let i=t.matches.slice(0,Ve).map(l=>`${l.label} (${Me(l.class,1)})`),a=t.matches.length>Ve?`, \u2026and ${t.matches.length-Ve} more`:"";return{content:`"${e.object}" is mentioned in the prose tokens of ${gn(i)}${a}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.entryPointShape){if(!t.matches.length)return{content:`no entry-point module found in the index \u2014 no module basename matches ${gn([...tl])}.`,miss:!0,ambiguous:!1,candidates:[]};let[i,...a]=t.matches,l=a.slice(0,Ve).map(d=>d.label),c=a.length>Ve?`, \u2026and ${a.length-Ve} more`:"",u=a.length?` \u2014 also matched: ${gn(l)}${c}`:"";return{content:`ranked ${t.matches.length} entry-point match${t.matches.length===1?"":"es"}; top: ${i.label}${u}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(!t.objMatch&&(!t.candidates||t.candidates.length===0)&&e.shape!=="ask"){let i=String(e.object||"").trim(),a=e.entityType&&Mc[e.entityType]?Me(e.entityType,1):"module",l=/^(?:commit[:\s])?[0-9a-f]{7,40}$/i.test(i)?"commit":!i.includes("/")&&/^[\w$]+(\.[\w$]+)+$/.test(i)?"symbol":a;if(t.unplacedWords?.length){let c=gn(t.unplacedWords.map(f=>`"${f}"`)),u=t.unplacedWords.length===1?"names":"name",d=t.nearestLabel?` Did you mean ${t.nearestLabel}?`:"";return{content:`no ${l} matching "${e.object}" found in the index. ${c} ${u} nothing here, and reading past ${t.unplacedWords.length===1?"it":"them"} would answer a different question.${d}`,miss:!0,ambiguous:!1,candidates:[]}}return{content:`no ${l} matching "${e.object}" found in the index. ${hs(n)}`,miss:!0,ambiguous:!1,candidates:[]}}if(t.ambiguous){let i=[t.objMatch,...t.candidates||[]].filter(Boolean),a=t.branches;if(e.kind&&e.kind!=="touches"&&!i.every(b=>b.class==="Commit")){let b=w=>!["Commit","Session","Source","Utterance"].includes(w?.class),y=i.filter(b);y.length&&(i=y,a?.length&&(a=a.filter(w=>b(w.candidate))))}if(n&&!/[/.]/.test(String(e.object||""))){let b=String(e.object||"").toLowerCase(),y=new Set(Sn(String(e.object||"")).filter(x=>x.length>=3)),w=new Set(i.map(x=>x.id)),$=null,_=0,v=1/0;if(y.size)for(let x of n.individuals){if(!["Function","Method","Class","GlobalVariable","Attribute"].includes(x.class)||w.has(x.id))continue;let E=Sn(String(x.label)).filter(R=>y.has(R)).length;if(!E||E<_)continue;let S=Vn(String(x.label).toLowerCase(),b,8);(E>_||S<v)&&($=x,_=E,v=S)}if($&&(i=[...i,$],a)){let x=Ut(n,e,{pinnedObjMatch:$});a=[...a,{candidate:$,result:x,rendered:bn(e,x,n)}]}}let l=i.length&&i.every(b=>b.class===i[0].class)?i[0].class:null,c=l?Mc[l]?Me(l,1):Kn(l):"module",u=i.slice(0,Ve).map(b=>b.label),d=i.length>Ve?`, \u2026and ${i.length-Ve} more`:"",f=`"${e.object}" matches more than one ${c} ambiguously \u2014 did you mean ${gn(u)}${d}? Try one of those. If you're not sure, narrow it to one name.`,p=String(e.object||""),m=p?new RegExp(`\\b${Je(p)}\\b`,"gi"):null,h=b=>{let y=String(b.candidate.label||"");return!m||!y?b.rendered.content:b.rendered.content.split(y).map(w=>w.replace(m,y)).join(y)};return{content:a&&a.length?`${f}
57
+ (ask one of these directly, or try rephrasing more specifically, to get just that reading)`,miss:!1,ambiguous:!0,candidates:e.candidates.map(Ar),candidateParses:e.candidates}:{content:`this could mean more than one thing: ${e.candidates.map((a,l)=>`${l+1}) ${Ar(a)}`).join(" or ")} \u2014 try rephrasing more specifically.`,miss:!1,ambiguous:!0,candidates:e.candidates.map(Ar),candidateParses:e.candidates};if(t.unresolvedPronoun)return{content:`"${e.object??e.subject}" needs a selected node to refer to \u2014 click a node first, or name it directly.`,miss:!0,ambiguous:!1};if(t.unsupportedModifier)return{content:`the "${e.modifier}" modifier isn't supported for "${e.kind}" queries yet \u2014 only imports/calls (module-level) have a transitive closure today.`,miss:!0,ambiguous:!1};if(t.wrongGrainMiss){let i=t.objMatch.class?Pe(t.objMatch.class,1):"term",a=Pe(t.wantClass,1);return{content:`"${e.object}" resolved to the ${i} ${t.objMatch.label}, but this question needs a ${a} \u2014 no ${a} named "${e.object}" was found in the index.`,miss:!0,ambiguous:!1}}if(t.forwardGrainMiss){let i=t.wantClasses.map(a=>Pe(a,2));return{content:`${t.objMatch.label}'s "${Xs(e.kind)}" relation in this index never produces ${Pe(e.entityType,2)} \u2014 only ${gn(i)}.`,miss:!0,ambiguous:!1}}if(e.shape==="meta"){if(!t.objMatch)return{content:`"${e.object}" isn't a term in this graph's own vocabulary (no matching class or predicate).`,miss:!0,ambiguous:!1};if(t.metaCodeClass)return{content:t.metaFallbackText,miss:!1,ambiguous:!1,matches:t.matches};let i=al(t.objMatch)||"";return{content:`${t.objMatch.label} is ${ES(t.objMatch.class)}: ${i}`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.mentionsShape){if(!t.matches.length)return{content:`"${e.object}" is not mentioned in any indexed identifier or doc-comment prose.`,miss:!0,ambiguous:!1};let i=t.matches.slice(0,He).map(l=>`${l.label} (${Pe(l.class,1)})`),a=t.matches.length>He?`, \u2026and ${t.matches.length-He} more`:"";return{content:`"${e.object}" is mentioned in the prose tokens of ${gn(i)}${a}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.entryPointShape){if(!t.matches.length)return{content:`no entry-point module found in the index \u2014 no module basename matches ${gn([...il])}.`,miss:!0,ambiguous:!1,candidates:[]};let[i,...a]=t.matches,l=a.slice(0,He).map(d=>d.label),c=a.length>He?`, \u2026and ${a.length-He} more`:"",u=a.length?` \u2014 also matched: ${gn(l)}${c}`:"";return{content:`ranked ${t.matches.length} entry-point match${t.matches.length===1?"":"es"}; top: ${i.label}${u}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(!t.objMatch&&(!t.candidates||t.candidates.length===0)&&e.shape!=="ask"){let i=String(e.object||"").trim(),a=e.entityType&&Bc[e.entityType]?Pe(e.entityType,1):"module",l=/^(?:commit[:\s])?[0-9a-f]{7,40}$/i.test(i)?"commit":!i.includes("/")&&/^[\w$]+(\.[\w$]+)+$/.test(i)?"symbol":a;if(t.unplacedWords?.length){let c=gn(t.unplacedWords.map(f=>`"${f}"`)),u=t.unplacedWords.length===1?"names":"name",d=t.nearestLabel?` Did you mean ${t.nearestLabel}?`:"";return{content:`no ${l} matching "${e.object}" found in the index. ${c} ${u} nothing here, and reading past ${t.unplacedWords.length===1?"it":"them"} would answer a different question.${d}`,miss:!0,ambiguous:!1,candidates:[]}}return{content:`no ${l} matching "${e.object}" found in the index. ${bs(n)}`,miss:!0,ambiguous:!1,candidates:[]}}if(t.ambiguous){let i=[t.objMatch,...t.candidates||[]].filter(Boolean),a=t.branches;if(e.kind&&e.kind!=="touches"&&!i.every(b=>b.class==="Commit")){let b=w=>!["Commit","Session","Source","Utterance"].includes(w?.class),y=i.filter(b);y.length&&(i=y,a?.length&&(a=a.filter(w=>b(w.candidate))))}if(n&&!/[/.]/.test(String(e.object||""))){let b=String(e.object||"").toLowerCase(),y=new Set(Sn(String(e.object||"")).filter(x=>x.length>=3)),w=new Set(i.map(x=>x.id)),v=null,_=0,$=1/0;if(y.size)for(let x of n.individuals){if(!["Function","Method","Class","GlobalVariable","Attribute"].includes(x.class)||w.has(x.id))continue;let E=Sn(String(x.label)).filter(R=>y.has(R)).length;if(!E||E<_)continue;let S=Vn(String(x.label).toLowerCase(),b,8);(E>_||S<$)&&(v=x,_=E,$=S)}if(v&&(i=[...i,v],a)){let x=Wt(n,e,{pinnedObjMatch:v});a=[...a,{candidate:v,result:x,rendered:bn(e,x,n)}]}}let l=i.length&&i.every(b=>b.class===i[0].class)?i[0].class:null,c=l?Bc[l]?Pe(l,1):Kn(l):"module",u=i.slice(0,He).map(b=>b.label),d=i.length>He?`, \u2026and ${i.length-He} more`:"",f=`"${e.object}" matches more than one ${c} ambiguously \u2014 did you mean ${gn(u)}${d}? Try one of those. If you're not sure, narrow it to one name.`,p=String(e.object||""),m=p?new RegExp(`\\b${Je(p)}\\b`,"gi"):null,h=b=>{let y=String(b.candidate.label||"");return!m||!y?b.rendered.content:b.rendered.content.split(y).map(w=>w.replace(m,y)).join(y)};return{content:a&&a.length?`${f}
58
58
  ${a.map((b,y)=>`${y+1}) ${b.candidate.label}: ${h(b)}`).join(`
59
- `)}`:f,miss:!1,ambiguous:!0,candidates:i.map(b=>b.label)}}if(t.whereShape){let i=t.objMatch;if(i.class==="Module")return{content:`${i.label} is a module \u2014 the label is its repo path.`,miss:!1,ambiguous:!1,matches:t.matches};if(i.class==="Commit")return{content:`${i.label} is a commit, not a code location \u2014 try "what did commit ${i.label} touch".`,miss:!0,ambiguous:!1};let a=String(t.site||"").match(/^(.*):(\d+)(?:-(\d+))?$/);if(a){let c=a[3]&&a[3]!==a[2]?`lines ${a[2]}-${a[3]}`:`line ${a[2]}`;return{content:`${Nc(i)} is defined in ${a[1]} at ${c}.`,miss:!1,ambiguous:!1,matches:t.matches}}let l=Or(i);return l?{content:`${Nc(i)} is defined in ${l} (no line span recorded in this index).`,miss:!1,ambiguous:!1,matches:t.matches}:{content:`${i.label} has no recorded code location in this index \u2014 it carries no source site, and nothing places it in a module.`,miss:!0,ambiguous:!1}}if(t.whenShape){let i=t.objMatch.label;if(!t.matches.length)return{content:`no recorded commit touches ${i} in this index. ${hs(n)}`,miss:!0,ambiguous:!1};let a=t.matches[0],l=(a.attributes||[]).find(f=>f.key==="date")?.value||"";if(!l)return{content:`commit ${a.label} touched ${i}, but this index records no commit dates \u2014 regenerate the graph to attach mgx:commitDate.`,miss:!0,ambiguous:!1};let c=(a.attributes||[]).find(f=>f.key==="message")?.value||"",u=String(l).slice(0,10);if(a.id===t.objMatch.id)return{content:`commit ${a.label} ${_r("is-dated",a.id,"is dated")} ${u}${c?` ("${c}")`:""}.`,miss:!1,ambiguous:!1,matches:t.matches};let d=t.matches.length-1;return{content:`${i} was last touched by commit ${a.label} on ${u}${c?` ("${c}")`:""}${d?`; ${d} earlier commit${d===1?"":"s"} recorded`:""}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.whoLastShape){let i=t.objMatch.label;if(!t.matches.length)return{content:`no recorded commit touches ${i} in this index. ${hs(n)}`,miss:!0,ambiguous:!1};let a=t.matches[0],l=(a.attributes||[]).find(u=>u.key==="author")?.value;if(!l)return{content:`commit ${a.label} last touched ${i}, but this index records no commit author \u2014 regenerate the graph to attach mgx:commitAuthor.`,miss:!0,ambiguous:!1};let c=t.matches.length-1;return{content:`${i} was last touched by ${l} (commit ${a.label})${c?`; ${c} earlier commit${c===1?"":"s"} recorded`:""}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.commitSubject){let i=`commit ${t.objMatch.label}`;if(!t.matches.length)return{content:`${i} touched nothing recorded in the index.`,miss:!0,ambiguous:!1};let a=new Map;for(let u of t.matches.slice(0,Ve)){let d=u.class||"Module";a.has(d)||a.set(d,[]),a.get(d).push(["Function","Method"].includes(d)?`${u.label}()`:u.label)}let l=[...a.entries()].map(([u,d])=>`${Me(u,d.length)} ${gn(d)}`),c=t.matches.length>Ve?`; \u2026and ${t.matches.length-Ve} more`:"";return{content:`${i} touched ${l.join("; ")}${c}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(e.shape==="ask"){if(!t.objMatch||!t.subjMatch)return{content:"couldn't resolve one of the terms in this question.",miss:!0,ambiguous:!1};let i=`${t.traversal}.`,a=`no ${e.kind} edge found from ${t.subjMatch.label} to ${t.objMatch.label}.`,l=e.negated?a:i,c=e.negated?i:a;return{content:`${t.answer?"Yes":"No"} \u2014 ${t.answer?l:c}`,miss:!t.matches.length,ambiguous:!1}}if(!t.matches.length){if(e.shape==="forward"){if(bo.includes(e.kind)&&n&&t.objMatch)for(let l of bo){if(l===e.kind)continue;let c={...e,kind:l},u=Ut(n,c,{pinnedObjMatch:t.objMatch});if(u?.matches?.length&&!u.ambiguous)return Rm(c,u,n)}return{content:`${t.objMatch.label} has no ${qs(e.kind)} edges in the index.`,miss:!0,ambiguous:!1}}if(e.kind==="tests"&&!e.entityType)return{content:`No tests cover ${String(e.object||"").replace(Hx,"").trim()||String(e.object||"").trim()}.`,miss:!0,ambiguous:!1};let i=Me(e.entityType||"Module",2),a=t.objMatch&&Ms.includes(String(e.object||"").toLowerCase())?t.objMatch.label:e.object;return{content:`No ${i} found whose module directly ${qs(e.kind)} ${a}. ${hs(n)}`,miss:!0,ambiguous:!1}}if(e.polar&&t.matches.length===1)return{content:`Yes \u2014 ${t.objMatch?.label||e.object} is ${dS(e.kind)} by ${t.matches[0].label}.`,miss:!1,ambiguous:!1,matches:t.matches};if(e.shape==="forward"||e.entityType==="Module"||t.matches.every(i=>!gs.has(i.class))){let i=t.matches.slice(0,Ve).map(l=>l.class==="Commit"?uS(l):l.label),a=t.matches.length>Ve?`, \u2026and ${t.matches.length-Ve} more`:"";return{content:i.join(" and ")+a+".",miss:!1,ambiguous:!1,matches:t.matches}}let s=new Map;for(let i of t.matches.slice(0,Ve)){let a=Or(i)||"no recorded module";s.has(a)||s.set(a,[]),s.get(a).push(Nc(i))}let o=[...s.entries()].map(([i,a],l)=>{let c=gn(a);return l===0?`in ${i} there is ${c}`:`there is ${c} in ${i}`}),r=t.matches.length>Ve?` \u2026and ${t.matches.length-Ve} more`:"";return{content:o.join(" and ")+r+".",miss:!1,ambiguous:!1,matches:t.matches}}function Am(e){if(e.length<4||hS.has(e))return null;let t=qn(e),n=t+1,s=null,o=!1;for(let r of mS){let i=Vn(e,r,Math.min(n,t));i<n?(n=i,s=r,o=!1):i===n&&i<=t&&r!==s&&(o=!0)}return n<=t&&!o?s:null}function tm(e,t){if(!e?.match||e.matchedVia!=="fuzzy"||e.ambiguous||!nl(e.match))return!1;let n=String(t||"").trim().toLowerCase(),s=Am(n);return!!s&&s!==n&&!!Ue[s]}function Cm(e,t,n){if(!t)return!1;if(t.ambiguousParse)return"ambiguous";if(t.node)return t.node!=="miss";if(t.shape==="meta"||t.shape==="mentions")return!0;let s=Yn(e,t.object,n);if(s.unresolvedPronoun)return"pronoun";if(!s.match||tm(s,t.object))return!1;if(t.shape==="ask"){let o=Yn(e,t.subject,n);return o.unresolvedPronoun?"pronoun":!!(o.match&&!tm(o,t.subject))}return!0}function gS(e){let t=String(e||"").trim().toLowerCase().replace(/[?.!\s]+$/,"");return Vd.includes(t)}function bS(e,t,{nlp:n=void 0,contextId:s=null,prev:o=null}={}){let r=Er(Vs(String(t||""))),i=Bt(r);if(!i.length)return null;let a=[],l=[],c=k=>{let A=wn(e,k);return!!A.match&&A.tier!=null&&A.tier<=2},u=k=>{let A=wn(e,k);return!!A.match&&A.tier!=null&&A.tier<=3},d=k=>{let A=String(k||"").trim().toLowerCase();return Ms.includes(A)?!0:Bt(A).some(P=>{let T=P.toLowerCase();return!Bi.has(T)&&!Hc.has(T)})},f=new Set(["reverse","forward","where","when","ask"]),p=k=>{let A=k.join(" "),P=Cr(A,{nlp:n});return Cm(e,P,s)!==!0||P&&!P.node&&f.has(P.shape)&&(P.object!=null&&!d(P.object)||P.shape==="ask"&&P.subject!=null&&!d(P.subject))||bn(P,Ut(e,P,{contextId:s,prev:o}),e).miss?null:{parsed:P,text:A}},m=k=>({parsed:k.parsed,from:r,to:k.text,dropped:[...a],steps:l}),h=0,g=Math.max(i.length,1)+12;for(;h<g;h+=1){let k=-1;for(let T=0;T<i.length;T+=1){let M=i[T].toLowerCase();if(sl.has(M)&&!Bi.has(M)&&!c(i[T])){k=T;break}}if(k<0)break;let A=i[k];i=i.filter((T,M)=>M!==k),a.push(A),l.push(`strip noise "${A}" \u2192 "${i.join(" ")}"`);let P=p(i);if(P)return m(P)}let b=Cr(i.join(" "),{nlp:n}),y=new Set;if(b&&!b.node&&f.has(b.shape))for(let k of[b.object,b.subject])for(let A of Bt(String(k||"").toLowerCase()))y.add(A);let w=[],$=[],_=[];for(let k of i){let A=k.toLowerCase();if(!/^[a-z]+$/.test(A)||Bi.has(A)||Hc.has(A)||u(k)){w.push(k);continue}let T=Am(A);if(T&&T!==A){w.push(T),_.push(`${k}\u2192${T}`);continue}if(y.has(A)){w.push(k);continue}$.push(k)}if((_.length||$.length)&&w.length){i=w,a.push(...$),_.length&&l.push(`fuzzy-correct ${JSON.stringify(_)} \u2192 "${i.join(" ")}"`),$.length&&l.push(`drop unmatched ${JSON.stringify($)} \u2192 "${i.join(" ")}"`);let k=p(i);if(k)return m(k)}let v=!1,x=i.map(k=>{let A=k.toLowerCase();return wo[A]&&!u(k)?(v=!0,wo[A]):k});if(v){l.push(`normalise synonyms \u2192 "${x.join(" ")}"`);let k=p(x);if(k)return m(k)}let E=Bt(r).map(k=>k.toLowerCase()),S=[],R=[];for(let k of E){if(Tm.has(k))continue;let A=Ue[k];A&&A!=="Change"?S.push(k):R.push(k)}if(S.length===1&&R.length===0){let k=p(["count",S[0]]);if(k)return l.push(`bare kind "${S[0]}" \u2192 count`),m(k)}return null}function yS(e,t){let n=String(t||"");if(!e||!nm.test(n))return n;let s=e.individuals.filter(l=>l.class==="Commit");if(!s.length)return n;let o=l=>String((l.attributes||[]).find(c=>c.key==="date")?.value||""),r=[...s].sort((l,c)=>o(c).localeCompare(o(l)))[0];if(!r)return n;let i=n.replace(nm,`commit ${r.label}`),a=i.trim().replace(/[?.!]+$/,"");return wS.test(a)?`${a} touched`:i}function vS(e){let t=String(e||"").toLowerCase(),n=new Set([t]);return t.endsWith("ies")&&n.add(`${t.slice(0,-3)}y`),(t.endsWith("ses")||t.endsWith("es"))&&n.add(t.slice(0,-2)),t.endsWith("s")&&t.length>1&&n.add(t.slice(0,-1)),[...n]}function ol(e,t){let n=vS(t);for(let s of e?.individuals||[])if(s?.class&&n.includes(String(s.class).toLowerCase()))return s.class;return null}function ES(e,t){let n=String(t||"").trim(),s=n.match($S),o=s?null:n.match(xS),r=s||o;if(!r||!rl.test(r[2]||"")||Ue[r[1].toLowerCase()])return null;let i=ol(e,r[1]);if(!i)return null;let a={node:"allOfClass",entityType:i};return s?{node:"list",entityType:i,base:a,scoped:!1}:{node:"count",entityType:i,base:a}}function SS(e,t){let n=String(t||"").split(/\s*,\s*|\s+and\s+/i).map(r=>r.trim()).filter(Boolean);if(!n.length)return null;let s=[],o=[];for(let r of n){let i=r.replace(/^(?:all\s+)?(?:the\s+)?/i,"").trim();if(!/^[a-z][a-z'-]*$/i.test(i))return null;let a=ol(e,i);if(!a)return null;s.push(i.toLowerCase()),o.push(a)}return{asked:[...new Set(s)],classes:[...new Set(o)]}}function RS(e,t){let n=String(t||"").trim().toLowerCase();if(!n)return null;let s=new Set;for(let o of e?.individuals||[])o?.id&&(String(o.id).toLowerCase()===n||String(o.label||"").toLowerCase()===n)&&s.add(o.id);return s.size===1?[...s][0]:null}function TS(e,t){let n=di(String(t||"").trim()),s=n.match(kS),o=s?Md[s[1].toLowerCase()]:"placement";if(!o)return null;let r=s?s[2]:n.match(jS)?.[1]||n.match(_S)?.[1];if(!r)return null;let i={node:"worldRelation",relation:o,predicate:Ns[o].predicate},a=SS(e,r);if(a)return{...i,classes:a.classes,asked:a.asked};let l=RS(e,r);return l?{...i,subjects:[l],asked:[l]}:null}function AS(e,t){return Ns[e].matchesLocativePredicates?ho(Wi(t.prop))||ho(Wi(t.predicate)):null}function CS(e,t){let n=t.classes?new Set(t.classes):null,s=t.subjects?new Set(t.subjects):null,o=Ns[t.relation],r=new Map,i=new Map;for(let l of e?.relations||[]){let c=Wi(l.prop),u=Wi(l.predicate),d=c===o.predicate||u===o.predicate,f=d?null:AS(t.relation,l);if(!(!d&&!f))for(let p of l.edges||[]){let m=e.byId?.get(p.subject);if(!m||!(s?s.has(p.subject):n.has(m.class)))continue;let g={subject:m,object:p.object,reads:d?o.reads:`is ${f}`};d?r.set(p.subject,g):i.set(`${c||u}\0${p.subject}`,g)}}let a=[...r.values(),...[...i.values()].filter(l=>!r.has(l.subject.id))].sort((l,c)=>String(l.subject.id).localeCompare(String(c.subject.id))||String(l.object).localeCompare(String(c.object)));return{compositeKind:"worldRelation",relation:t.relation,asked:t.asked,pairs:a,matches:a.map(l=>l.subject)}}function Pc(e){let t=OS.exec(String(e??""));return t?{base:t[1],stamp:Number(t[2])}:{base:String(e??""),stamp:0}}function IS(e,{classOf:t=()=>null}={}){let n=new Map;for(let a of e||[])a?.predicate==="rdf:type"&&a.subject&&a.object&&n.set(Pc(a.subject).base,String(a.object));let s=new Set(Fd),o=new Map,r=new Map;for(let a of e||[]){if(!a?.subject||!s.has(a.predicate))continue;let{base:l,stamp:c}=Pc(a.subject),u=n.get(l)||t(l);if(!u)continue;let d=`${a.predicate}\0${l}`,f=r.get(d);f&&f.stamp>c||(o.set(l,{id:l,label:l,class:u}),r.set(d,{stamp:c,predicate:a.predicate,subject:l,object:Pc(a.object).base}))}let i=new Map;for(let a of r.values())i.has(a.predicate)||i.set(a.predicate,{prop:a.predicate,predicate:a.predicate,examples:[]}),i.get(a.predicate).examples.push({subject:a.subject,object:a.object});return{individuals:[...o.values()],objectProperties:[...i.values()]}}function PS(e,t,n){let s=String(t?.object||"").trim();if(!s)return!1;let o=ol(e,s);if(!o)return!1;let r=[n.objMatch,...n.candidates||[]].filter(Boolean),i=new Set(r.map(l=>l.id));if(i.size<2)return!1;let a=new Map;for(let l of e?.individuals||[])l?.id&&(a.has(l.id)||a.set(l.id,new Set),a.get(l.id).add(l.class));return[...i].every(l=>l===o||a.get(l)?.has(o))}function bs(e,t,{contextId:n=null,nlp:s=void 0,prev:o=null}={}){if(gS(t))return{content:Zc(),tmct_ask:{mechanical:!0,parsed:null,canonical:null,matches:[],traversal:null,miss:!0,ambiguous:!1,matchedVia:null,help:!0,relaxed:null}};t=yS(e,t);let r=Vc(t,{nlp:s}),i=r.parsed,a=i,l=null;if(Cm(e,i,n)===!1){let f=bS(e,t,{nlp:s,contextId:n,prev:o});f&&(a=f.parsed,l={from:f.from,to:f.to,dropped:f.dropped,steps:f.steps})}let c=Ut(e,a,{contextId:n,prev:o}),u=bn(a,c,e);if(sm(e,a,c,u)){let f=ES(e,t);if(f){let p=Ut(e,f,{contextId:n,prev:o}),m=bn(f,p,e);m.miss||(a=f,c=p,u=m,l=null)}}if(sm(e,a,c,u)){let f=TS(e,t);if(f){let p=Ut(e,f,{contextId:n,prev:o}),m=bn(f,p,e);m.miss||(a=f,c=p,u=m,l=null)}}if(a===null&&u.miss&&!u.ambiguous){let p=_i(String(t||"")).trim().match(LS)?.[1]?.trim();if(p&&!/\s+(?:for|about)$/i.test(p)){let m=Cr(`what is a ${p}`,{nlp:s});m?.shape==="meta"&&(c=Ut(e,m,{contextId:n,prev:o}),u=bn(m,c,e))}}if(a===null&&u.miss&&!u.ambiguous){let p=Vs(String(t||"")).match(NS)?.[1]?.trim();if(p){let m=Cr(`what is a ${p}`,{nlp:s});if(m?.shape==="meta"){let h=Ut(e,m,{contextId:n,prev:o}),g=bn(m,h,e);!g.miss&&!g.ambiguous&&(c=h,u=g)}}}let d=l&&!u.miss&&l.to!==l.from?`read as "${l.to}" \u2014 ${u.content}`:u.content;if(!l&&!u.miss&&!u.ambiguous&&r.alternates.length){let f=r.alternates.map(p=>{let m=Ut(e,p.parsed,{contextId:n,prev:o}),h=bn(p.parsed,m,e);return h.miss?null:{a:p,text:h.content}}).filter(Boolean);if(f.length){let p=Df(f.map(m=>m.a),{answerFor:m=>f.find(h=>h.a===m)?.text||null});d=`${d}
59
+ `)}`:f,miss:!1,ambiguous:!0,candidates:i.map(b=>b.label)}}if(t.whereShape){let i=t.objMatch;if(i.class==="Module")return{content:`${i.label} is a module \u2014 the label is its repo path.`,miss:!1,ambiguous:!1,matches:t.matches};if(i.class==="Commit")return{content:`${i.label} is a commit, not a code location \u2014 try "what did commit ${i.label} touch".`,miss:!0,ambiguous:!1};let a=String(t.site||"").match(/^(.*):(\d+)(?:-(\d+))?$/);if(a){let c=a[3]&&a[3]!==a[2]?`lines ${a[2]}-${a[3]}`:`line ${a[2]}`;return{content:`${zc(i)} is defined in ${a[1]} at ${c}.`,miss:!1,ambiguous:!1,matches:t.matches}}let l=Or(i);return l?{content:`${zc(i)} is defined in ${l} (no line span recorded in this index).`,miss:!1,ambiguous:!1,matches:t.matches}:{content:`${i.label} has no recorded code location in this index \u2014 it carries no source site, and nothing places it in a module.`,miss:!0,ambiguous:!1}}if(t.whenShape){let i=t.objMatch.label;if(!t.matches.length)return{content:`no recorded commit touches ${i} in this index. ${bs(n)}`,miss:!0,ambiguous:!1};let a=t.matches[0],l=(a.attributes||[]).find(f=>f.key==="date")?.value||"";if(!l)return{content:`commit ${a.label} touched ${i}, but this index records no commit dates \u2014 regenerate the graph to attach mgx:commitDate.`,miss:!0,ambiguous:!1};let c=(a.attributes||[]).find(f=>f.key==="message")?.value||"",u=String(l).slice(0,10);if(a.id===t.objMatch.id)return{content:`commit ${a.label} ${Rr("is-dated",a.id,"is dated")} ${u}${c?` ("${c}")`:""}.`,miss:!1,ambiguous:!1,matches:t.matches};let d=t.matches.length-1;return{content:`${i} was last touched by commit ${a.label} on ${u}${c?` ("${c}")`:""}${d?`; ${d} earlier commit${d===1?"":"s"} recorded`:""}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.whoLastShape){let i=t.objMatch.label;if(!t.matches.length)return{content:`no recorded commit touches ${i} in this index. ${bs(n)}`,miss:!0,ambiguous:!1};let a=t.matches[0],l=(a.attributes||[]).find(u=>u.key==="author")?.value;if(!l)return{content:`commit ${a.label} last touched ${i}, but this index records no commit author \u2014 regenerate the graph to attach mgx:commitAuthor.`,miss:!0,ambiguous:!1};let c=t.matches.length-1;return{content:`${i} was last touched by ${l} (commit ${a.label})${c?`; ${c} earlier commit${c===1?"":"s"} recorded`:""}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.commitSubject){let i=`commit ${t.objMatch.label}`;if(!t.matches.length)return{content:`${i} touched nothing recorded in the index.`,miss:!0,ambiguous:!1};let a=new Map;for(let u of t.matches.slice(0,He)){let d=u.class||"Module";a.has(d)||a.set(d,[]),a.get(d).push(["Function","Method"].includes(d)?`${u.label}()`:u.label)}let l=[...a.entries()].map(([u,d])=>`${Pe(u,d.length)} ${gn(d)}`),c=t.matches.length>He?`; \u2026and ${t.matches.length-He} more`:"";return{content:`${i} touched ${l.join("; ")}${c}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(e.shape==="ask"){if(!t.objMatch||!t.subjMatch)return{content:"couldn't resolve one of the terms in this question.",miss:!0,ambiguous:!1};let i=`${t.traversal}.`,a=`no ${e.kind} edge found from ${t.subjMatch.label} to ${t.objMatch.label}.`,l=e.negated?a:i,c=e.negated?i:a;return{content:`${t.answer?"Yes":"No"} \u2014 ${t.answer?l:c}`,miss:!t.matches.length,ambiguous:!1}}if(!t.matches.length){if(e.shape==="forward"){if(vo.includes(e.kind)&&n&&t.objMatch)for(let l of vo){if(l===e.kind)continue;let c={...e,kind:l},u=Wt(n,c,{pinnedObjMatch:t.objMatch});if(u?.matches?.length&&!u.ambiguous)return Mm(c,u,n)}return{content:`${t.objMatch.label} has no ${Xs(e.kind)} edges in the index.`,miss:!0,ambiguous:!1}}if(e.kind==="tests"&&!e.entityType)return{content:`No tests cover ${String(e.object||"").replace(rE,"").trim()||String(e.object||"").trim()}.`,miss:!0,ambiguous:!1};let i=Pe(e.entityType||"Module",2),a=t.objMatch&&Us.includes(String(e.object||"").toLowerCase())?t.objMatch.label:e.object;return{content:`No ${i} found whose module directly ${Xs(e.kind)} ${a}. ${bs(n)}`,miss:!0,ambiguous:!1}}if(e.polar&&t.matches.length===1)return{content:`Yes \u2014 ${t.objMatch?.label||e.object} is ${kS(e.kind)} by ${t.matches[0].label}.`,miss:!1,ambiguous:!1,matches:t.matches};if(e.shape==="forward"||e.entityType==="Module"||t.matches.every(i=>!ws.has(i.class))){let i=t.matches.slice(0,He).map(l=>l.class==="Commit"?SS(l):l.label),a=t.matches.length>He?`, \u2026and ${t.matches.length-He} more`:"";return{content:i.join(" and ")+a+".",miss:!1,ambiguous:!1,matches:t.matches}}let s=new Map;for(let i of t.matches.slice(0,He)){let a=Or(i)||"no recorded module";s.has(a)||s.set(a,[]),s.get(a).push(zc(i))}let o=[...s.entries()].map(([i,a],l)=>{let c=gn(a);return l===0?`in ${i} there is ${c}`:`there is ${c} in ${i}`}),r=t.matches.length>He?` \u2026and ${t.matches.length-He} more`:"";return{content:o.join(" and ")+r+".",miss:!1,ambiguous:!1,matches:t.matches}}function Fm(e){if(e.length<4||TS.has(e))return null;let t=Hn(e),n=t+1,s=null,o=!1;for(let r of RS){let i=Vn(e,r,Math.min(n,t));i<n?(n=i,s=r,o=!1):i===n&&i<=t&&r!==s&&(o=!0)}return n<=t&&!o?s:null}function lm(e,t){if(!e?.match||e.matchedVia!=="fuzzy"||e.ambiguous||!al(e.match))return!1;let n=String(t||"").trim().toLowerCase(),s=Fm(n);return!!s&&s!==n&&!!We[s]}function Dm(e,t,n){if(!t)return!1;if(t.ambiguousParse)return"ambiguous";if(t.node)return t.node!=="miss";if(t.shape==="meta"||t.shape==="mentions")return!0;let s=Yn(e,t.object,n);if(s.unresolvedPronoun)return"pronoun";if(!s.match||lm(s,t.object))return!1;if(t.shape==="ask"){let o=Yn(e,t.subject,n);return o.unresolvedPronoun?"pronoun":!!(o.match&&!lm(o,t.subject))}return!0}function AS(e){let t=String(e||"").trim().toLowerCase().replace(/[?.!\s]+$/,"");return ep.includes(t)}function IS(e,t,{nlp:n=void 0,contextId:s=null,prev:o=null}={}){let r=Sr(Ys(String(t||""))),i=Bt(r);if(!i.length)return null;let a=[],l=[],c=k=>{let A=wn(e,k);return!!A.match&&A.tier!=null&&A.tier<=2},u=k=>{let A=wn(e,k);return!!A.match&&A.tier!=null&&A.tier<=3},d=k=>{let A=String(k||"").trim().toLowerCase();return Us.includes(A)?!0:Bt(A).some(M=>{let T=M.toLowerCase();return!Hi.has(T)&&!Xc.has(T)})},f=new Set(["reverse","forward","where","when","ask"]),p=k=>{let A=k.join(" "),M=Cr(A,{nlp:n});return Dm(e,M,s)!==!0||M&&!M.node&&f.has(M.shape)&&(M.object!=null&&!d(M.object)||M.shape==="ask"&&M.subject!=null&&!d(M.subject))||bn(M,Wt(e,M,{contextId:s,prev:o}),e).miss?null:{parsed:M,text:A}},m=k=>({parsed:k.parsed,from:r,to:k.text,dropped:[...a],steps:l}),h=0,g=Math.max(i.length,1)+12;for(;h<g;h+=1){let k=-1;for(let T=0;T<i.length;T+=1){let P=i[T].toLowerCase();if(cl.has(P)&&!Hi.has(P)&&!c(i[T])){k=T;break}}if(k<0)break;let A=i[k];i=i.filter((T,P)=>P!==k),a.push(A),l.push(`strip noise "${A}" \u2192 "${i.join(" ")}"`);let M=p(i);if(M)return m(M)}let b=Cr(i.join(" "),{nlp:n}),y=new Set;if(b&&!b.node&&f.has(b.shape))for(let k of[b.object,b.subject])for(let A of Bt(String(k||"").toLowerCase()))y.add(A);let w=[],v=[],_=[];for(let k of i){let A=k.toLowerCase();if(!/^[a-z]+$/.test(A)||Hi.has(A)||Xc.has(A)||u(k)){w.push(k);continue}let T=Fm(A);if(T&&T!==A){w.push(T),_.push(`${k}\u2192${T}`);continue}if(y.has(A)){w.push(k);continue}v.push(k)}if((_.length||v.length)&&w.length){i=w,a.push(...v),_.length&&l.push(`fuzzy-correct ${JSON.stringify(_)} \u2192 "${i.join(" ")}"`),v.length&&l.push(`drop unmatched ${JSON.stringify(v)} \u2192 "${i.join(" ")}"`);let k=p(i);if(k)return m(k)}let $=!1,x=i.map(k=>{let A=k.toLowerCase();return xo[A]&&!u(k)?($=!0,xo[A]):k});if($){l.push(`normalise synonyms \u2192 "${x.join(" ")}"`);let k=p(x);if(k)return m(k)}let E=Bt(r).map(k=>k.toLowerCase()),S=[],R=[];for(let k of E){if(Pm.has(k))continue;let A=We[k];A&&A!=="Change"?S.push(k):R.push(k)}if(S.length===1&&R.length===0){let k=p(["count",S[0]]);if(k)return l.push(`bare kind "${S[0]}" \u2192 count`),m(k)}return null}function OS(e,t){let n=String(t||"");if(!e||!um.test(n))return n;let s=e.individuals.filter(l=>l.class==="Commit");if(!s.length)return n;let o=l=>String((l.attributes||[]).find(c=>c.key==="date")?.value||""),r=[...s].sort((l,c)=>o(c).localeCompare(o(l)))[0];if(!r)return n;let i=n.replace(um,`commit ${r.label}`),a=i.trim().replace(/[?.!]+$/,"");return CS.test(a)?`${a} touched`:i}function LS(e){let t=String(e||"").toLowerCase(),n=new Set([t]);return t.endsWith("ies")&&n.add(`${t.slice(0,-3)}y`),(t.endsWith("ses")||t.endsWith("es"))&&n.add(t.slice(0,-2)),t.endsWith("s")&&t.length>1&&n.add(t.slice(0,-1)),[...n]}function ll(e,t){let n=LS(t);for(let s of e?.individuals||[])if(s?.class&&n.includes(String(s.class).toLowerCase()))return s.class;return null}function PS(e,t){let n=String(t||"").trim(),s=n.match(NS),o=s?null:n.match(MS),r=s||o;if(!r||!ul.test(r[2]||"")||We[r[1].toLowerCase()])return null;let i=ll(e,r[1]);if(!i)return null;let a={node:"allOfClass",entityType:i};return s?{node:"list",entityType:i,base:a,scoped:!1}:{node:"count",entityType:i,base:a}}function FS(e,t){let n=String(t||"").split(/\s*,\s*|\s+and\s+/i).map(r=>r.trim()).filter(Boolean);if(!n.length)return null;let s=[],o=[];for(let r of n){let i=r.replace(/^(?:all\s+)?(?:the\s+)?/i,"").trim();if(!/^[a-z][a-z'-]*$/i.test(i))return null;let a=ll(e,i);if(!a)return null;s.push(i.toLowerCase()),o.push(a)}return{asked:[...new Set(s)],classes:[...new Set(o)]}}function BS(e,t){let n=String(t||"").trim().toLowerCase();if(!n)return null;let s=new Set;for(let o of e?.individuals||[])o?.id&&(String(o.id).toLowerCase()===n||String(o.label||"").toLowerCase()===n)&&s.add(o.id);return s.size===1?[...s][0]:null}function WS(e,t){let n=hi(String(t||"").trim()),s=n.match(DS),o=s?qd[s[1].toLowerCase()]:"placement";if(!o)return null;let r=s?s[2]:n.match(zS)?.[1]||n.match(US)?.[1];if(!r)return null;let i={node:"worldRelation",relation:o,predicate:Ds[o].predicate},a=FS(e,r);if(a)return{...i,classes:a.classes,asked:a.asked};let l=BS(e,r);return l?{...i,subjects:[l],asked:[l]}:null}function GS(e,t){return Ds[e].matchesLocativePredicates?yo(Yi(t.prop))||yo(Yi(t.predicate)):null}function qS(e,t){let n=t.classes?new Set(t.classes):null,s=t.subjects?new Set(t.subjects):null,o=Ds[t.relation],r=new Map,i=new Map;for(let l of e?.relations||[]){let c=Yi(l.prop),u=Yi(l.predicate),d=c===o.predicate||u===o.predicate,f=d?null:GS(t.relation,l);if(!(!d&&!f))for(let p of l.edges||[]){let m=e.byId?.get(p.subject);if(!m||!(s?s.has(p.subject):n.has(m.class)))continue;let g={subject:m,object:p.object,reads:d?o.reads:`is ${f}`};d?r.set(p.subject,g):i.set(`${c||u}\0${p.subject}`,g)}}let a=[...r.values(),...[...i.values()].filter(l=>!r.has(l.subject.id))].sort((l,c)=>String(l.subject.id).localeCompare(String(c.subject.id))||String(l.object).localeCompare(String(c.object)));return{compositeKind:"worldRelation",relation:t.relation,asked:t.asked,pairs:a,matches:a.map(l=>l.subject)}}function Uc(e){let t=VS.exec(String(e??""));return t?{base:t[1],stamp:Number(t[2])}:{base:String(e??""),stamp:0}}function HS(e,{classOf:t=()=>null}={}){let n=new Map;for(let a of e||[])a?.predicate==="rdf:type"&&a.subject&&a.object&&n.set(Uc(a.subject).base,String(a.object));let s=new Set(Vd),o=new Map,r=new Map;for(let a of e||[]){if(!a?.subject||!s.has(a.predicate))continue;let{base:l,stamp:c}=Uc(a.subject),u=n.get(l)||t(l);if(!u)continue;let d=`${a.predicate}\0${l}`,f=r.get(d);f&&f.stamp>c||(o.set(l,{id:l,label:l,class:u}),r.set(d,{stamp:c,predicate:a.predicate,subject:l,object:Uc(a.object).base}))}let i=new Map;for(let a of r.values())i.has(a.predicate)||i.set(a.predicate,{prop:a.predicate,predicate:a.predicate,examples:[]}),i.get(a.predicate).examples.push({subject:a.subject,object:a.object});return{individuals:[...o.values()],objectProperties:[...i.values()]}}function XS(e,t,n){let s=String(t?.object||"").trim();if(!s)return!1;let o=ll(e,s);if(!o)return!1;let r=[n.objMatch,...n.candidates||[]].filter(Boolean),i=new Set(r.map(l=>l.id));if(i.size<2)return!1;let a=new Map;for(let l of e?.individuals||[])l?.id&&(a.has(l.id)||a.set(l.id,new Set),a.get(l.id).add(l.class));return[...i].every(l=>l===o||a.get(l)?.has(o))}function ys(e,t,{contextId:n=null,nlp:s=void 0,prev:o=null}={}){if(AS(t))return{content:ol(),tmct_ask:{mechanical:!0,parsed:null,canonical:null,matches:[],traversal:null,miss:!0,ambiguous:!1,matchedVia:null,help:!0,relaxed:null}};t=OS(e,t);let r=Jc(t,{nlp:s}),i=r.parsed,a=i,l=null;if(Dm(e,i,n)===!1){let f=IS(e,t,{nlp:s,contextId:n,prev:o});f&&(a=f.parsed,l={from:f.from,to:f.to,dropped:f.dropped,steps:f.steps})}let c=Wt(e,a,{contextId:n,prev:o}),u=bn(a,c,e);if(dm(e,a,c,u)){let f=PS(e,t);if(f){let p=Wt(e,f,{contextId:n,prev:o}),m=bn(f,p,e);m.miss||(a=f,c=p,u=m,l=null)}}if(dm(e,a,c,u)){let f=WS(e,t);if(f){let p=Wt(e,f,{contextId:n,prev:o}),m=bn(f,p,e);m.miss||(a=f,c=p,u=m,l=null)}}if(a===null&&u.miss&&!u.ambiguous){let p=Oi(String(t||"")).trim().match(KS)?.[1]?.trim();if(p&&!/\s+(?:for|about)$/i.test(p)){let m=Cr(`what is a ${p}`,{nlp:s});m?.shape==="meta"&&(c=Wt(e,m,{contextId:n,prev:o}),u=bn(m,c,e))}}if(a===null&&u.miss&&!u.ambiguous){let p=Ys(String(t||"")).match(YS)?.[1]?.trim();if(p){let m=Cr(`what is a ${p}`,{nlp:s});if(m?.shape==="meta"){let h=Wt(e,m,{contextId:n,prev:o}),g=bn(m,h,e);!g.miss&&!g.ambiguous&&(c=h,u=g)}}}let d=l&&!u.miss&&l.to!==l.from?`read as "${l.to}" \u2014 ${u.content}`:u.content;if(!l&&!u.miss&&!u.ambiguous&&r.alternates.length){let f=r.alternates.map(p=>{let m=Wt(e,p.parsed,{contextId:n,prev:o}),h=bn(p.parsed,m,e);return h.miss?null:{a:p,text:h.content}}).filter(Boolean);if(f.length){let p=Hf(f.map(m=>m.a),{answerFor:m=>f.find(h=>h.a===m)?.text||null});d=`${d}
60
60
  ${p.join(`
61
61
  `)}`}}if(!u.ambiguous&&c.objMatch&&Array.isArray(c.candidates)&&c.candidates.length){let f=new Set((c.matches||[]).map(m=>m&&m.id)),p=c.candidates.filter(m=>m&&m.id&&m.id!==c.objMatch.id&&!f.has(m.id));if(p.length){let m=p.slice(0,3).map(b=>b.label).filter(Boolean),h=p.length-m.length,g=m.join(", ")+(h>0?`, +${h} more`:"");d=`${d}
62
- (answering for ${c.objMatch.label} \u2014 ${p.length} other match${p.length===1?"":"es"}: ${g})`}}return!Array.isArray(c.referents)&&!u.miss&&!u.ambiguous&&(a?.shape==="reverse"||a?.shape==="forward")&&a.entityType&&Array.isArray(c.matches)&&c.matches.length&&c.matches.every(f=>f&&f.class===a.entityType)&&(c={...c,referents:Ir(a.entityType,c.matches,"relationListing")}),{content:d,tmct_ask:{mechanical:!0,parsed:a&&!a.ambiguousParse?a:null,canonical:_m(a),matches:(c.matches||[]).map(f=>({id:f.id,label:f.label,type:f.class,module:f.class?Or(f):void 0})),traversal:c.traversal||null,miss:!!u.miss,ambiguous:!!u.ambiguous,relaxed:l,matchedVia:c.matchedVia||null,...Array.isArray(c.referents)&&c.referents.length?{discourse:c.referents}:{},...u.ambiguous?{candidates:u.candidates,candidateParses:u.candidateParses}:{}}}}var Gf,Io,gs,Oc,Bx,It,om,Ve,Mc,Ux,Wx,Gx,Hx,Vx,Kx,Yx,rm,Fc,Jx,qc,im,Tt,am,Zx,tE,sE,rE,aE,cE,lE,uE,pE,mE,dm,Yc,pm,fm,EE,jE,Hf,AE,Vf,IE,Kf,Xf,PE,FE,zE,ms,Ic,eS,tS,sS,tl,oS,Zf,rS,em,cS,Bi,Hc,sl,Tm,fS,mS,hS,nm,wS,$S,xS,rl,kS,jS,_S,Wi,OS,LS,NS,sm,ws=I(()=>{Ie();lc();Bn();jn();_o();Ai();Ci();Wf();Tc();ls();Mi();Cc();Ao();Gf=new WeakMap;Io={calls:"callsSymbol",touches:"touchesSymbol"},gs=new Set(["Function","Method","Class","Attribute","GlobalVariable"]),Oc={Function:"Method",Method:"Function"},Bx={uses:["imports","calls","callsSymbol"]},It=e=>Bx[e]||[e],om=new Set(Object.values(Io)),Ve=12,Mc={Function:["function","functions"],Method:["method","methods"],Class:["class","classes"],Module:["module","modules"],Attribute:["attribute","attributes"],GlobalVariable:["variable","variables"],Commit:["commit","commits"],Change:["change","changes"],Package:["package","packages"],Fact:["fact","facts"],Utterance:["utterance","utterances"],Session:["session","sessions"],Source:["source","sources"],Rule:["rule","rules"]};Ux={cochange:"cochanges",reexports:"export"};Wx={imports:"import",calls:"call",callsSymbol:"call",inherits:"inherit from",contains:"contain",tests:"test",touches:"touch",cochange:"cochange",reexports:"export",uses:"use",serves:"serve",denotes:"denote"},Gx=e=>Wx[e]||qs(e),Hx=new RegExp(`^(?:${Object.keys(de).sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})(?:s|ing|ed)?\\s+`,"i"),Vx=new Set(["imports"]);Kx=/^where\s+(?:does|do|did)\s+/i,Yx=new Set(me(Jt));rm=4,Fc="zzinnerset",Jx=new Set(["that","which","who","are","is","was","were","do","does","also","still","both","and","then","though"]),qc=new Set(["which","what","who","list","show","find","give","me","us","all"]),im=new Set(["are","is","was","were"]);Tt=e=>Ue[e]?{entityType:Ue[e],placeholder:!1}:zn.includes(e)?{entityType:null,placeholder:!0}:null,am=e=>!!de[e]&&e.endsWith("ing");Zx=new Set(["which","the","all"]);tE=new Set(["all","every","each"]);sE=new Set(["what","which","thing","things","one","ones","stuff"]);rE=new Set(["those","them"]);aE=new Set(["did","was","were","do","does","has","have","had"]),cE=new Set(["change","changed","changes","update","updated","updates","modify","modified","modifies","touch","touched","touches","edit","edited","revise","revised"]),lE=new Set(["last","recently","ever","get","got","been","then","now","already"]),uE=new Set(["the","a","an","all","those","these","any"]);pE=new Set(["since","before","after","on"]);mE=/\b[\w-]+(?:[/.][\w-]+)+\b|\b[A-Z][A-Za-z0-9_]*\b|\b[a-z][a-z0-9]*[A-Z][A-Za-z0-9]*\b/;dm=new Set(["total","altogether","overall","exist","exists","existing","present","here","now","currently","graph","index","codebase","repo","repository","this","that"]);Yc=new Set(["the","a","an","all","me","us"]),pm=[...zs].sort((e,t)=>t.split(" ").length-e.split(" ").length),fm="functions, classes, methods, modules, packages, attributes, variables, or commits",EE=new Set(["in","inside","under"]);jE=new Set(["called","named","about","like","containing","matching","with"]);Hf=new Set(["recent","latest","newest"]);AE=/^git:(.+)$/i;Vf=new WeakMap;IE=new Set(["Class","Function","Method","GlobalVariable","Attribute"]);Kf=new WeakMap;Xf={label:3,chain:2,attr:1};PE=e=>e&&typeof e.value=="boolean"?{...e,value:!e.value}:null;FE=["imports","calls","callsSymbol","inherits","contains","tests"];zE=/^\d{4}-\d{2}-\d{2}$/;ms=e=>gn(e.slice(0,Ve).map(t=>["Function","Method"].includes(t.class)?`${t.label}()`:t.label))+(e.length>Ve?`, \u2026and ${e.length-Ve} more`:"");Ic=10;eS=/^(?:the|a|an)\s+/i,tS=new RegExp(`\\s+(${Object.keys(Ue).join("|")})$`,"i");sS=/^(?:the\s+)?(?:main\s+|primary\s+)?entry[\s-]?points?(?:\s+(?:of|to|for)\s+(?:this|the)\s+(?:codebase|code|repo|repository|project|app))?$/i,tl=new Set(["index","main","app","server","cli","__main__"]),oS=new Set(["test","tests","__tests__","fixture","fixtures","spec","specs","testdata"]),Zf=e=>String(e).toLowerCase().split("/").pop().replace(/\.[a-z0-9]+$/,""),rS=e=>String(e).toLowerCase().split("/").slice(0,-1).some(t=>oS.has(t));em=8,cS="mgx:schemaDoc";Bi=new Set([...me(Object.keys(de)),...me(Object.keys(Ue)),...me(Object.keys(Qt)),...me(Object.keys(Xe)),...me(Ds),...me(Object.keys(cs)),...me(Object.keys(En)),...me(Object.keys(go)),...me(zn),...me(wr),...me(Fs),...me(Jt),...me(hn),...me(Dn),...me(Object.keys(wo))]),Hc=new Set([...et,...qc,...Ms]),sl=new Set(me(pi)),Tm=new Set([...sl,...Hc]),fS=["many","count","number","quantity","total","tally","list","show","display","print","dump","enumerate","name"],mS=[...new Set([...me(Object.keys(de)),...Object.keys(Ue),...fS])].filter(e=>/^[a-z]+$/.test(e)&&e.length>=4&&!et.has(e)),hS=new Set(["impact","impacts","impacted"]);nm=/\b(?:the\s+)?(?:last|latest|most\s+recent)\s+commit\b/i,wS=/^when\s+(?:was|were|is|did|does|do)\s+commit\s+[0-9a-fA-F:]+$/i;$S=/^(?:list|show(?:\s+me)?)\s+(?:all\s+|the\s+)?([a-z][a-z'-]*)\s*(.*)$/i,xS=/^(?:how\s+many|number\s+of|count(?:\s+the)?)\s+([a-z][a-z'-]*)\s*(.*)$/i,rl=/^(?:are there(?:\s+in\s+total)?|is there|do you know(?:\s+about)?|do you have|exist(?:s)?|are known|in (?:the |a )?(?:graph|memory)|you know(?:\s+about)?)?[?.!\s]*$/i;kS=new RegExp(`^(?:${pm.map(Je).join("|")})\\s+(?:all\\s+)?(?:the\\s+)?([a-z][a-z'-]*)\\s+(?:of|for)\\s+(.+?)[?.!\\s]*$`,"i"),jS=/^where(?:'s|\s+is|\s+are)\s+(?:all\s+)?(?:the\s+)?(.+?)[?.!\s]*$/i,_S=/^where\s+(?:does|do|did)\s+(?:all\s+)?(?:the\s+)?(.+?)\s+[a-z][a-z'-]*[?.!\s]*$/i;Wi=e=>String(e||"").toLowerCase();OS=/^(.+)@(?:turn|step)(\d+)$/;LS=/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,NS=/^what\s+is\s+(?:the\s+)?(?!(?:an?|it|this|that|these|those)\s)(.+?)\s+(?:used\s+)?for[?.!\s]*$/i;sm=(e,t,n,s)=>s.ambiguous?PS(e,t,n):!!s.miss});function ys(e,t,n,s){let o=Math.max(1,t),r=Math.min(e.length,n),i=!1;s!=null&&r-o+1>s&&(r=o+s-1,i=!0);let a=e.slice(o-1,r).map((l,c)=>`${o+c} ${l}`).join(`
63
- `);return{start:o,end:r,text:a,truncated:i}}async function Jn({readFile:e,repoRoot:t,path:n,start:s,end:o,maxLines:r}){let i=Xt(t),a=Xt(i,n);if(a!==i&&!a.startsWith(i+Ld))throw new Re(`refusing to read outside the repository root: ${n}`);let c=(await e(a,"utf8")).split(`
64
- `);return s==null||o==null?{lines:c}:{lines:c,...ys(c,s,o,r)}}var Gi=I(()=>{Be();Dt()});function yt(e){return{ok:!0,value:e}}function vt(e,{detail:t="",term:n=null}={}){if(!ot[e])throw new TypeError(`miss(): unknown reason "${e}" (not in MISS_REASONS)`);return{ok:!1,miss:{reason:e,detail:t,term:n}}}function _n(e){return!e||!e.id?null:{id:String(e.id),label:e.label!=null?String(e.label):String(e.id),class:e.class||"Entity",attributes:(Array.isArray(e.attributes)?e.attributes:[]).map(t=>({key:t.key,value:t.value,prop:t.prop||null}))}}function Hi(e,{predicate:t="",prop:n=null}={}){let s={subject:e.subject,object:e.object,predicate:t,prop:n||null};return e.subjectLabel!=null&&(s.subjectLabel=e.subjectLabel),e.objectLabel!=null&&(s.objectLabel=e.objectLabel),e.weight!=null&&(s.weight=e.weight),s}var al,MS,ot,cl,CI,Im,ll,FS,yn,il,At,OI,Lm=I(()=>{al="1.1.0",MS="urn:tmct:core",ot=Object.freeze({UNRESOLVED_TERM:"UNRESOLVED_TERM",CAPABILITY_ABSENT:"CAPABILITY_ABSENT",TRUNCATED_GRAPH:"TRUNCATED_GRAPH",NO_SOURCE:"NO_SOURCE"}),cl=Object.freeze(["imports","calls","callsSymbol","defines","tests","touches","touchesSymbol","contains","inherits","cochange","reexports","serves","denotes"]),CI=Object.freeze({imports:"tmct:imports",calls:"tmct:calls",callsSymbol:"tmct:calls",defines:"tmct:defines",tests:"tmct:covers",touches:"tmct:touches",touchesSymbol:"tmct:touches",contains:"tmct:contains",inherits:"tmct:extends",cochange:"tmct:dependsOn",reexports:"tmct:exports",serves:"tmct:serves",denotes:"tmct:denotes"}),Im=Object.freeze({resolution:["resolve","describe","members","subclasses","exports","signature"],traversal:["edges","impact"],source:["snippet","context"],aggregate:["architecture","untested","stats"],temporal:["history"],search:["search","ask"]}),ll=Object.freeze(Object.values(Im).flat()),FS=Object.freeze(new Set(Im.source));yn="Individual",il="Edge",At="concurrent-safe: reads immutable graph truth; no shared mutable state",OI=Object.freeze({version:al,ontology:MS,missReasons:Object.values(ot),edgeKinds:[...cl],types:{Individual:{fields:{id:"string (opaque provider id)",label:"string (human/display name)",class:"string \u2014 a tmct: class token (module|class|function|method|attribute|variable|commit|test|\u2026)",attributes:"Array<{ key: string, value: string, prop: string|null }> \u2014 prop is the SEON/mgx token grounding the value"}},Edge:{fields:{subject:"string (individual id)",object:"string (individual id)",predicate:"string \u2014 the relation predicate",prop:"string|null \u2014 the SEON/mgx property token; see edgeKinds \u2192 tmct: mapping",subjectLabel:"string? (additive)",objectLabel:"string? (additive)",weight:"number? (additive; e.g. cochange coupling)"}},Result:{shape:"{ ok: true, value: T } | { ok: false, miss: Miss }"},Miss:{shape:"{ reason: MISS_REASONS, detail: string, term: string|null }"}},capabilitiesModel:"A provider advertises `capabilities: string[]` (service names it implements). A service outside the set is negotiated away to miss(CAPABILITY_ABSENT) \u2014 never an error. snippet may be advertised yet answer miss(NO_SOURCE) when no working tree exists (it has nothing useful without fs); context is graph-only-capable since INTERFACE_VERSION 1.1.0 \u2014 it returns a real hit (graph-only bundle) for any resolvable symbol even with no working tree, only escalating NO_SOURCE-style behavior to richer body text when source-capable.",services:{resolve:{group:"resolution",args:{term:"string"},result:`{ match: ${yn}, candidates: ${yn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:At,purpose:"The resolveSymbol seam: map a free term to an individual + runner-up candidates. Every id-taking service consumes a resolved id."},describe:{group:"resolution",args:{id:"string"},result:`{ individual: ${yn}, out: ${il}[], incoming: ${il}[] }`,misses:["UNRESOLVED_TERM"],concurrency:At,purpose:"Full typed portrait of one individual: its attributes and its outgoing/incoming edges."},members:{group:"resolution",args:{classId:"string"},result:`{ methods: ${yn}[], attributes: ${yn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:At,purpose:"A class's methods + attributes (via the contains relation) \u2014 replaces reading the class body."},subclasses:{group:"resolution",args:{classId:"string"},result:`{ bases: ${yn}[], subclasses: ${yn}[], levels: Array<${yn}[]> }`,misses:["UNRESOLVED_TERM"],concurrency:At,purpose:"Forward bases + the transitive reverse inheritance closure (who extends this). `subclasses` is the flat closure; `levels` groups the same individuals by inheritance depth (direct children first), mirroring `impact`'s leveled shape."},exports:{group:"resolution",args:{moduleId:"string"},result:`{ exports: ${yn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:At,purpose:"A module's curated public API (resolved __all__ / re-exports)."},signature:{group:"resolution",args:{id:"string"},result:"{ id, label, class, params, returns, raises, decorators, doc, selfFields, flags }",misses:["UNRESOLVED_TERM"],concurrency:At,purpose:"The compact API surface of a symbol without its body."},edges:{group:"traversal",args:{id:"string",kind:"EDGE_KINDS member"},result:`{ kind: string, edges: ${il}[] }`,misses:["UNRESOLVED_TERM"],concurrency:At,purpose:"Outgoing edges of one closed kind from an individual (an honest empty array is not a miss).",note:"An unknown kind (outside EDGE_KINDS) is a programming error and throws TypeError, not a miss."},impact:{group:"traversal",args:{moduleId:"string"},result:"{ total: number, levels: Array<Array<{ id, label, via, tests }>> }",misses:["UNRESOLVED_TERM"],concurrency:At,purpose:"The transitive dependent closure the interpreter cannot compute without provider truth."},snippet:{group:"source",args:{id:"string"},result:"{ path: string, span: { start, end }, body: string|null } \u2014 Promise<Result>",misses:["UNRESOLVED_TERM","NO_SOURCE"],concurrency:At,purpose:"The exact source span of a symbol. A provider with no working tree returns miss(NO_SOURCE) honestly \u2014 snippet has nothing useful without fs.",note:"ASYNC (returns Promise<Result>) \u2014 a real body read is inherently fs I/O; callers should always await it. A graph-only provider still resolves synchronously-in-spirit (the promise settles on the same tick) but the return type is uniformly a Promise regardless of sourceAccess."},context:{group:"source",args:{symbol:"string",depth:"min|auto|full?"},result:"{ text: string, tier: string } (a sized edit bundle) \u2014 Promise<Result>",misses:["UNRESOLVED_TERM"],concurrency:At,purpose:"The composed edit bundle (exemplar, siblings, registration, insertion region). A graph-only provider returns the graph-only sections as a real hit; a source-capable provider (sourceAccess:true, repoRoot, readFile) additionally includes the anchor/exemplar/inlined-callee body text.",note:"ASYNC (returns Promise<Result>) \u2014 see snippet's note; source-capable rendering is fs I/O."},architecture:{group:"aggregate",args:{package:"string?"},result:"{ modules: number, packages: Array<[dir, count]>, hubs: Array<{ id, label, importers }> }",misses:[],concurrency:At,purpose:"Package/module shape + the most-imported hub modules. Optional package prefix scopes it."},untested:{group:"aggregate",args:{},result:`{ modules: ${yn}[] }`,misses:[],concurrency:At,purpose:"Modules with no covering test module (via the tests relation)."},stats:{group:"aggregate",args:{},result:"{ total: number, classes: Array<{ class: string, count: number }>, truncated: boolean }",misses:[],concurrency:At,purpose:"Per-tmct:class individual counts, read straight from the payload."},history:{group:"temporal",args:{id:"string"},result:"{ commits: Array<{ id, label, author, date, message }> }",misses:["UNRESOLVED_TERM"],concurrency:At,purpose:"The commits that touched an individual (tmct:commit individuals via tmct:touches)."},search:{group:"search",args:{query:"string",kind:"string?",name:"string?",decorator:"string?"},result:`{ results: ${yn}[] }`,misses:[],concurrency:At,purpose:"Lexical, provider-local locate. An empty result set is honest, not a miss."},ask:{group:"search",args:{query:"string"},result:"{ content: string, tmct_ask: object } (the composed NL round-trip envelope)",misses:[],concurrency:At,purpose:"The mechanical, zero-model NL query over the graph \u2014 tmct's whole reason to exist."}}})});function DS(e,t){let n=[],s=[];for(let o of e.relations)for(let r of o.edges)r.subject===t&&n.push(Hi(r,{predicate:o.predicate,prop:o.prop})),r.object===t&&s.push(Hi(r,{predicate:o.predicate,prop:o.prop}));return{out:n,incoming:s}}function zS(e,t){for(let n of e.relations)if(Hn(n)===t)return{predicate:n.predicate,prop:n.prop};return{predicate:t,prop:null}}async function US(e,t,{readFile:n,repoRoot:s}){if(!e.moduleLabel)return"";let o=null;try{({lines:o}=await Jn({readFile:n,repoRoot:s,path:e.moduleLabel}))}catch{o=null}if(!o)return"";let r=[];if(t.anchor&&e.anchor?.site){let{start:i,end:a}=e.anchor.site;r.push(`
65
- ## anchor: ${e.anchor.label} (${e.anchor.class}) @ ${e.moduleLabel}:${i}-${a}`),r.push(ys(o,i,a,ul).text),e.callHint&&r.push(e.callHint)}if(t.exemplar&&e.exemplar?.site){let{start:i,end:a}=e.exemplar.site,l=e.exemplar.decorators?` @${e.exemplar.decorators}`:"";r.push(`
66
- ## closest example (full body) \u2014 copy this style: ${e.exemplar.label} (${e.exemplar.class})${l} @ ${e.moduleLabel}:${i}-${a}`),r.push(ys(o,i,a,ul).text),e.callHint&&r.push(e.callHint)}if(t.inlinedCallees&&e.calleeBodies.length){let i=BS;for(let a of e.calleeBodies){if(i<=0)break;let l=a.site.start,u=a.site.path===e.moduleLabel?o:null;if(!u)try{({lines:u}=await Jn({readFile:n,repoRoot:s,path:a.site.path}))}catch{u=null}if(!u)continue;let d=ys(u,l,a.site.end,i);r.push(`
62
+ (answering for ${c.objMatch.label} \u2014 ${p.length} other match${p.length===1?"":"es"}: ${g})`}}return!Array.isArray(c.referents)&&!u.miss&&!u.ambiguous&&(a?.shape==="reverse"||a?.shape==="forward")&&a.entityType&&Array.isArray(c.matches)&&c.matches.length&&c.matches.every(f=>f&&f.class===a.entityType)&&(c={...c,referents:Lr(a.entityType,c.matches,"relationListing")}),{content:d,tmct_ask:{mechanical:!0,parsed:a&&!a.ambiguousParse?a:null,canonical:Nm(a),matches:(c.matches||[]).map(f=>({id:f.id,label:f.label,type:f.class,module:f.class?Or(f):void 0})),traversal:c.traversal||null,miss:!!u.miss,ambiguous:!!u.ambiguous,relaxed:l,matchedVia:c.matchedVia||null,...Array.isArray(c.referents)&&c.referents.length?{discourse:c.referents}:{},...u.ambiguous?{candidates:u.candidates,candidateParses:u.candidateParses}:{}}}}var Qf,Po,ws,Pc,tE,Lt,pm,He,Bc,nE,sE,oE,rE,iE,cE,lE,fm,Wc,dE,Qc,mm,At,hm,fE,hE,bE,yE,vE,xE,EE,SE,jE,RE,ym,el,$m,vm,PE,zE,Zf,GE,em,HE,nm,om,XE,QE,eS,gs,Fc,mS,hS,bS,il,wS,am,yS,cm,xS,Hi,Xc,cl,Pm,_S,RS,TS,um,CS,NS,MS,ul,DS,zS,US,Yi,VS,KS,YS,dm,$s=O(()=>{Oe();gc();Un();jn();Io();Mi();Pi();Jf();Lc();us();Wi();Mc();Lo();Qf=new WeakMap;Po={calls:"callsSymbol",touches:"touchesSymbol"},ws=new Set(["Function","Method","Class","Attribute","GlobalVariable"]),Pc={Function:"Method",Method:"Function"},tE={uses:["imports","calls","callsSymbol"]},Lt=e=>tE[e]||[e],pm=new Set(Object.values(Po)),He=12,Bc={Function:["function","functions"],Method:["method","methods"],Class:["class","classes"],Module:["module","modules"],Attribute:["attribute","attributes"],GlobalVariable:["variable","variables"],Commit:["commit","commits"],Change:["change","changes"],Package:["package","packages"],Fact:["fact","facts"],Utterance:["utterance","utterances"],Session:["session","sessions"],Source:["source","sources"],Rule:["rule","rules"]};nE={cochange:"cochanges",reexports:"export"};sE={imports:"import",calls:"call",callsSymbol:"call",inherits:"inherit from",contains:"contain",tests:"test",touches:"touch",cochange:"cochange",reexports:"export",uses:"use",serves:"serve",denotes:"denote"},oE=e=>sE[e]||Xs(e),rE=new RegExp(`^(?:${Object.keys(de).sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})(?:s|ing|ed)?\\s+`,"i"),iE=new Set(["imports"]);cE=/^where\s+(?:does|do|did)\s+/i,lE=new Set(me(Qt));fm=4,Wc="zzinnerset",dE=new Set(["that","which","who","are","is","was","were","do","does","also","still","both","and","then","though"]),Qc=new Set(["which","what","who","list","show","find","give","me","us","all"]),mm=new Set(["are","is","was","were"]);At=e=>We[e]?{entityType:We[e],placeholder:!1}:zn.includes(e)?{entityType:null,placeholder:!0}:null,hm=e=>!!de[e]&&e.endsWith("ing");fE=new Set(["which","the","all"]);hE=new Set(["all","every","each"]);bE=new Set(["what","which","thing","things","one","ones","stuff"]);yE=new Set(["those","them"]);vE=new Set(["did","was","were","do","does","has","have","had"]),xE=new Set(["change","changed","changes","update","updated","updates","modify","modified","modifies","touch","touched","touches","edit","edited","revise","revised"]),EE=new Set(["last","recently","ever","get","got","been","then","now","already"]),SE=new Set(["the","a","an","all","those","these","any"]);jE=new Set(["since","before","after","on"]);RE=/\b[\w-]+(?:[/.][\w-]+)+\b|\b[A-Z][A-Za-z0-9_]*\b|\b[a-z][a-z0-9]*[A-Z][A-Za-z0-9]*\b/;ym=new Set(["total","altogether","overall","exist","exists","existing","present","here","now","currently","graph","index","codebase","repo","repository","this","that"]);el=new Set(["the","a","an","all","me","us"]),$m=[...Gs].sort((e,t)=>t.split(" ").length-e.split(" ").length),vm="functions, classes, methods, modules, packages, attributes, variables, or commits",PE=new Set(["in","inside","under"]);zE=new Set(["called","named","about","like","containing","matching","with"]);Zf=new Set(["recent","latest","newest"]);GE=/^git:(.+)$/i;em=new WeakMap;HE=new Set(["Class","Function","Method","GlobalVariable","Attribute"]);nm=new WeakMap;om={label:3,chain:2,attr:1};XE=e=>e&&typeof e.value=="boolean"?{...e,value:!e.value}:null;QE=["imports","calls","callsSymbol","inherits","contains","tests"];eS=/^\d{4}-\d{2}-\d{2}$/;gs=e=>gn(e.slice(0,He).map(t=>["Function","Method"].includes(t.class)?`${t.label}()`:t.label))+(e.length>He?`, \u2026and ${e.length-He} more`:"");Fc=10;mS=/^(?:the|a|an)\s+/i,hS=new RegExp(`\\s+(${Object.keys(We).join("|")})$`,"i");bS=/^(?:the\s+)?(?:main\s+|primary\s+)?entry[\s-]?points?(?:\s+(?:of|to|for)\s+(?:this|the)\s+(?:codebase|code|repo|repository|project|app))?$/i,il=new Set(["index","main","app","server","cli","__main__"]),wS=new Set(["test","tests","__tests__","fixture","fixtures","spec","specs","testdata"]),am=e=>String(e).toLowerCase().split("/").pop().replace(/\.[a-z0-9]+$/,""),yS=e=>String(e).toLowerCase().split("/").slice(0,-1).some(t=>wS.has(t));cm=8,xS="mgx:schemaDoc";Hi=new Set([...me(Object.keys(de)),...me(Object.keys(We)),...me(Object.keys(Zt)),...me(Object.keys(Xe)),...me(Ws),...me(Object.keys(ls)),...me(Object.keys(En)),...me(Object.keys($o)),...me(zn),...me(yr),...me(Bs),...me(Qt),...me(hn),...me(Dn),...me(Object.keys(xo))]),Xc=new Set([...et,...Qc,...Us]),cl=new Set(me(gi)),Pm=new Set([...cl,...Xc]),_S=["many","count","number","quantity","total","tally","list","show","display","print","dump","enumerate","name"],RS=[...new Set([...me(Object.keys(de)),...Object.keys(We),..._S])].filter(e=>/^[a-z]+$/.test(e)&&e.length>=4&&!et.has(e)),TS=new Set(["impact","impacts","impacted"]);um=/\b(?:the\s+)?(?:last|latest|most\s+recent)\s+commit\b/i,CS=/^when\s+(?:was|were|is|did|does|do)\s+commit\s+[0-9a-fA-F:]+$/i;NS=/^(?:list|show(?:\s+me)?)\s+(?:all\s+|the\s+)?([a-z][a-z'-]*)\s*(.*)$/i,MS=/^(?:how\s+many|number\s+of|count(?:\s+the)?)\s+([a-z][a-z'-]*)\s*(.*)$/i,ul=/^(?:are there(?:\s+in\s+total)?|is there|do you know(?:\s+about)?|do you have|exist(?:s)?|are known|in (?:the |a )?(?:graph|memory)|you know(?:\s+about)?)?[?.!\s]*$/i;DS=new RegExp(`^(?:${$m.map(Je).join("|")})\\s+(?:all\\s+)?(?:the\\s+)?([a-z][a-z'-]*)\\s+(?:of|for)\\s+(.+?)[?.!\\s]*$`,"i"),zS=/^where(?:'s|\s+is|\s+are)\s+(?:all\s+)?(?:the\s+)?(.+?)[?.!\s]*$/i,US=/^where\s+(?:does|do|did)\s+(?:all\s+)?(?:the\s+)?(.+?)\s+[a-z][a-z'-]*[?.!\s]*$/i;Yi=e=>String(e||"").toLowerCase();VS=/^(.+)@(?:turn|step)(\d+)$/;KS=/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,YS=/^what\s+is\s+(?:the\s+)?(?!(?:an?|it|this|that|these|those)\s)(.+?)\s+(?:used\s+)?for[?.!\s]*$/i;dm=(e,t,n,s)=>s.ambiguous?XS(e,t,n):!!s.miss});function vs(e,t,n,s){let o=Math.max(1,t),r=Math.min(e.length,n),i=!1;s!=null&&r-o+1>s&&(r=o+s-1,i=!0);let a=e.slice(o-1,r).map((l,c)=>`${o+c} ${l}`).join(`
63
+ `);return{start:o,end:r,text:a,truncated:i}}async function Jn({readFile:e,repoRoot:t,path:n,start:s,end:o,maxLines:r}){let i=Jt(t),a=Jt(i,n);if(a!==i&&!a.startsWith(i+Bd))throw new Re(`refusing to read outside the repository root: ${n}`);let c=(await e(a,"utf8")).split(`
64
+ `);return s==null||o==null?{lines:c}:{lines:c,...vs(c,s,o,r)}}var Xi=O(()=>{Ue();zt()});function yt(e){return{ok:!0,value:e}}function $t(e,{detail:t="",term:n=null}={}){if(!ot[e])throw new TypeError(`miss(): unknown reason "${e}" (not in MISS_REASONS)`);return{ok:!1,miss:{reason:e,detail:t,term:n}}}function _n(e){return!e||!e.id?null:{id:String(e.id),label:e.label!=null?String(e.label):String(e.id),class:e.class||"Entity",attributes:(Array.isArray(e.attributes)?e.attributes:[]).map(t=>({key:t.key,value:t.value,prop:t.prop||null}))}}function Ji(e,{predicate:t="",prop:n=null}={}){let s={subject:e.subject,object:e.object,predicate:t,prop:n||null};return e.subjectLabel!=null&&(s.subjectLabel=e.subjectLabel),e.objectLabel!=null&&(s.objectLabel=e.objectLabel),e.weight!=null&&(s.weight=e.weight),s}var pl,JS,ot,fl,cL,Um,ml,QS,yn,dl,It,lL,Bm=O(()=>{pl="1.1.0",JS="urn:tmct:core",ot=Object.freeze({UNRESOLVED_TERM:"UNRESOLVED_TERM",CAPABILITY_ABSENT:"CAPABILITY_ABSENT",TRUNCATED_GRAPH:"TRUNCATED_GRAPH",NO_SOURCE:"NO_SOURCE"}),fl=Object.freeze(["imports","calls","callsSymbol","defines","tests","touches","touchesSymbol","contains","inherits","cochange","reexports","serves","denotes"]),cL=Object.freeze({imports:"tmct:imports",calls:"tmct:calls",callsSymbol:"tmct:calls",defines:"tmct:defines",tests:"tmct:covers",touches:"tmct:touches",touchesSymbol:"tmct:touches",contains:"tmct:contains",inherits:"tmct:extends",cochange:"tmct:dependsOn",reexports:"tmct:exports",serves:"tmct:serves",denotes:"tmct:denotes"}),Um=Object.freeze({resolution:["resolve","describe","members","subclasses","exports","signature"],traversal:["edges","impact"],source:["snippet","context"],aggregate:["architecture","untested","stats"],temporal:["history"],search:["search","ask"]}),ml=Object.freeze(Object.values(Um).flat()),QS=Object.freeze(new Set(Um.source));yn="Individual",dl="Edge",It="concurrent-safe: reads immutable graph truth; no shared mutable state",lL=Object.freeze({version:pl,ontology:JS,missReasons:Object.values(ot),edgeKinds:[...fl],types:{Individual:{fields:{id:"string (opaque provider id)",label:"string (human/display name)",class:"string \u2014 a tmct: class token (module|class|function|method|attribute|variable|commit|test|\u2026)",attributes:"Array<{ key: string, value: string, prop: string|null }> \u2014 prop is the SEON/mgx token grounding the value"}},Edge:{fields:{subject:"string (individual id)",object:"string (individual id)",predicate:"string \u2014 the relation predicate",prop:"string|null \u2014 the SEON/mgx property token; see edgeKinds \u2192 tmct: mapping",subjectLabel:"string? (additive)",objectLabel:"string? (additive)",weight:"number? (additive; e.g. cochange coupling)"}},Result:{shape:"{ ok: true, value: T } | { ok: false, miss: Miss }"},Miss:{shape:"{ reason: MISS_REASONS, detail: string, term: string|null }"}},capabilitiesModel:"A provider advertises `capabilities: string[]` (service names it implements). A service outside the set is negotiated away to miss(CAPABILITY_ABSENT) \u2014 never an error. snippet may be advertised yet answer miss(NO_SOURCE) when no working tree exists (it has nothing useful without fs); context is graph-only-capable since INTERFACE_VERSION 1.1.0 \u2014 it returns a real hit (graph-only bundle) for any resolvable symbol even with no working tree, only escalating NO_SOURCE-style behavior to richer body text when source-capable.",services:{resolve:{group:"resolution",args:{term:"string"},result:`{ match: ${yn}, candidates: ${yn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:It,purpose:"The resolveSymbol seam: map a free term to an individual + runner-up candidates. Every id-taking service consumes a resolved id."},describe:{group:"resolution",args:{id:"string"},result:`{ individual: ${yn}, out: ${dl}[], incoming: ${dl}[] }`,misses:["UNRESOLVED_TERM"],concurrency:It,purpose:"Full typed portrait of one individual: its attributes and its outgoing/incoming edges."},members:{group:"resolution",args:{classId:"string"},result:`{ methods: ${yn}[], attributes: ${yn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:It,purpose:"A class's methods + attributes (via the contains relation) \u2014 replaces reading the class body."},subclasses:{group:"resolution",args:{classId:"string"},result:`{ bases: ${yn}[], subclasses: ${yn}[], levels: Array<${yn}[]> }`,misses:["UNRESOLVED_TERM"],concurrency:It,purpose:"Forward bases + the transitive reverse inheritance closure (who extends this). `subclasses` is the flat closure; `levels` groups the same individuals by inheritance depth (direct children first), mirroring `impact`'s leveled shape."},exports:{group:"resolution",args:{moduleId:"string"},result:`{ exports: ${yn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:It,purpose:"A module's curated public API (resolved __all__ / re-exports)."},signature:{group:"resolution",args:{id:"string"},result:"{ id, label, class, params, returns, raises, decorators, doc, selfFields, flags }",misses:["UNRESOLVED_TERM"],concurrency:It,purpose:"The compact API surface of a symbol without its body."},edges:{group:"traversal",args:{id:"string",kind:"EDGE_KINDS member"},result:`{ kind: string, edges: ${dl}[] }`,misses:["UNRESOLVED_TERM"],concurrency:It,purpose:"Outgoing edges of one closed kind from an individual (an honest empty array is not a miss).",note:"An unknown kind (outside EDGE_KINDS) is a programming error and throws TypeError, not a miss."},impact:{group:"traversal",args:{moduleId:"string"},result:"{ total: number, levels: Array<Array<{ id, label, via, tests }>> }",misses:["UNRESOLVED_TERM"],concurrency:It,purpose:"The transitive dependent closure the interpreter cannot compute without provider truth."},snippet:{group:"source",args:{id:"string"},result:"{ path: string, span: { start, end }, body: string|null } \u2014 Promise<Result>",misses:["UNRESOLVED_TERM","NO_SOURCE"],concurrency:It,purpose:"The exact source span of a symbol. A provider with no working tree returns miss(NO_SOURCE) honestly \u2014 snippet has nothing useful without fs.",note:"ASYNC (returns Promise<Result>) \u2014 a real body read is inherently fs I/O; callers should always await it. A graph-only provider still resolves synchronously-in-spirit (the promise settles on the same tick) but the return type is uniformly a Promise regardless of sourceAccess."},context:{group:"source",args:{symbol:"string",depth:"min|auto|full?"},result:"{ text: string, tier: string } (a sized edit bundle) \u2014 Promise<Result>",misses:["UNRESOLVED_TERM"],concurrency:It,purpose:"The composed edit bundle (exemplar, siblings, registration, insertion region). A graph-only provider returns the graph-only sections as a real hit; a source-capable provider (sourceAccess:true, repoRoot, readFile) additionally includes the anchor/exemplar/inlined-callee body text.",note:"ASYNC (returns Promise<Result>) \u2014 see snippet's note; source-capable rendering is fs I/O."},architecture:{group:"aggregate",args:{package:"string?"},result:"{ modules: number, packages: Array<[dir, count]>, hubs: Array<{ id, label, importers }> }",misses:[],concurrency:It,purpose:"Package/module shape + the most-imported hub modules. Optional package prefix scopes it."},untested:{group:"aggregate",args:{},result:`{ modules: ${yn}[] }`,misses:[],concurrency:It,purpose:"Modules with no covering test module (via the tests relation)."},stats:{group:"aggregate",args:{},result:"{ total: number, classes: Array<{ class: string, count: number }>, truncated: boolean }",misses:[],concurrency:It,purpose:"Per-tmct:class individual counts, read straight from the payload."},history:{group:"temporal",args:{id:"string"},result:"{ commits: Array<{ id, label, author, date, message }> }",misses:["UNRESOLVED_TERM"],concurrency:It,purpose:"The commits that touched an individual (tmct:commit individuals via tmct:touches)."},search:{group:"search",args:{query:"string",kind:"string?",name:"string?",decorator:"string?"},result:`{ results: ${yn}[] }`,misses:[],concurrency:It,purpose:"Lexical, provider-local locate. An empty result set is honest, not a miss."},ask:{group:"search",args:{query:"string"},result:"{ content: string, tmct_ask: object } (the composed NL round-trip envelope)",misses:[],concurrency:It,purpose:"The mechanical, zero-model NL query over the graph \u2014 tmct's whole reason to exist."}}})});function ZS(e,t){let n=[],s=[];for(let o of e.relations)for(let r of o.edges)r.subject===t&&n.push(Ji(r,{predicate:o.predicate,prop:o.prop})),r.object===t&&s.push(Ji(r,{predicate:o.predicate,prop:o.prop}));return{out:n,incoming:s}}function ek(e,t){for(let n of e.relations)if(qn(n)===t)return{predicate:n.predicate,prop:n.prop};return{predicate:t,prop:null}}async function nk(e,t,{readFile:n,repoRoot:s}){if(!e.moduleLabel)return"";let o=null;try{({lines:o}=await Jn({readFile:n,repoRoot:s,path:e.moduleLabel}))}catch{o=null}if(!o)return"";let r=[];if(t.anchor&&e.anchor?.site){let{start:i,end:a}=e.anchor.site;r.push(`
65
+ ## anchor: ${e.anchor.label} (${e.anchor.class}) @ ${e.moduleLabel}:${i}-${a}`),r.push(vs(o,i,a,hl).text),e.callHint&&r.push(e.callHint)}if(t.exemplar&&e.exemplar?.site){let{start:i,end:a}=e.exemplar.site,l=e.exemplar.decorators?` @${e.exemplar.decorators}`:"";r.push(`
66
+ ## closest example (full body) \u2014 copy this style: ${e.exemplar.label} (${e.exemplar.class})${l} @ ${e.moduleLabel}:${i}-${a}`),r.push(vs(o,i,a,hl).text),e.callHint&&r.push(e.callHint)}if(t.inlinedCallees&&e.calleeBodies.length){let i=tk;for(let a of e.calleeBodies){if(i<=0)break;let l=a.site.start,u=a.site.path===e.moduleLabel?o:null;if(!u)try{({lines:u}=await Jn({readFile:n,repoRoot:s,path:a.site.path}))}catch{u=null}if(!u)continue;let d=vs(u,l,a.site.end,i);r.push(`
67
67
  ## inlined callee body (depth-1 in-repo call): ${a.label} @ ${a.site.path}:${l}-${a.site.end}`),r.push(d.text),i-=d.end-l+1}}return r.join(`
68
- `)}function Vi(e,{sourceAccess:t=!1,repoRoot:n=null,readFile:s=null,tel:o=null,ask:r=null}={}){let i=e.byId;if(t&&(!n||typeof s!="function"))throw new TypeError("createGraphService({ sourceAccess: true }) requires both repoRoot and readFile \u2014 fs access is an injected capability, not an ambient import.");let a=c=>i.get(c)||null,l={version:al,capabilities:[...ll],sourceAccess:!!t,graph:e,resolve(c){let{match:u,candidates:d}=Zt(e,String(c??""));return u?yt({match:_n(u),candidates:d.map(_n)}):vt(ot.UNRESOLVED_TERM,{term:String(c??"")})},describe(c){let u=a(c);if(!u)return vt(ot.UNRESOLVED_TERM,{term:c});let{out:d,incoming:f}=DS(e,c);return yt({individual:_n(u),out:d,incoming:f})},members(c){if(!a(c))return vt(ot.UNRESOLVED_TERM,{term:c});let d=ke(e,"contains").filter(m=>m.subject===c),f=[],p=[];for(let m of d){let h=i.get(m.object),g=h?_n(h):{id:m.object,label:m.objectLabel||m.object,class:"Entity",attributes:[]};(h?.class||"")==="Attribute"?p.push(g):f.push(g)}return yt({methods:f,attributes:p})},subclasses(c){if(!a(c))return vt(ot.UNRESOLVED_TERM,{term:c});let d=ke(e,"inherits"),f=d.filter(y=>y.subject===c).map(y=>i.get(y.object)?_n(i.get(y.object)):{id:y.object,label:y.objectLabel||y.object,class:"Class",attributes:[]}),p=new Map;for(let y of d)p.has(y.object)||p.set(y.object,[]),p.get(y.object).push(y.subject);let m=new Set([c]),h=[],g=[],b=[c];for(let y=0;y<8&&b.length;y+=1){let w=[],$=[];for(let _ of b)for(let v of p.get(_)||[]){if(m.has(v))continue;m.add(v);let x=i.get(v),E=x?_n(x):{id:v,label:v,class:"Class",attributes:[]};h.push(E),$.push(E),w.push(v)}$.length&&g.push($),b=w}return yt({bases:f,subclasses:h,levels:g})},exports(c){if(!a(c))return vt(ot.UNRESOLVED_TERM,{term:c});let f=ke(e,"reexports").filter(p=>p.subject===c).map(p=>i.get(p.object)?_n(i.get(p.object)):{id:p.object,label:p.objectLabel||p.object,class:"Entity",attributes:[]});return yt({exports:f})},signature(c){let u=a(c);if(!u)return vt(ot.UNRESOLVED_TERM,{term:c});let d=[];for(let[p,m]of[["isStatic","static"],["isAbstract","abstract"],["isConstant","constant"]])Wt(u,p)&&d.push(m);let f=Wt(u,"visibility");return f&&d.push(f),yt({id:u.id,label:u.label,class:u.class||"Entity",params:Wt(u,"params"),returns:Wt(u,"returns"),raises:Wt(u,"raises"),decorators:Wt(u,"decorators"),doc:Wt(u,"doc"),selfFields:Wt(u,"self_fields"),flags:d})},edges(c,u,{limit:d,offset:f=0}={}){if(!cl.includes(u))throw new TypeError(`edges(): unknown kind "${u}" (not in EDGE_KINDS)`);if(!a(c))return vt(ot.UNRESOLVED_TERM,{term:c});let m=zS(e,u),h=ke(e,u).filter(g=>g.subject===c).map(g=>Hi(g,m));return h=d==null?h.slice(f):h.slice(f,f+d),yt({kind:u,edges:h})},impact(c,{maxDepth:u}={}){let d=a(c);if(!d)return vt(ot.UNRESOLVED_TERM,{term:c});let f=u==null?ko(e,d):ko(e,d,{maxDepth:u}),p=f.reduce((m,h)=>m+h.length,0);return yt({total:p,levels:f})},async snippet(c){let u=a(c);if(!u)return vt(ot.UNRESOLVED_TERM,{term:c});let d=_t(u);if(!l.sourceAccess)return vt(ot.NO_SOURCE,{term:c,detail:d?`span is ${d.path}:${d.start}-${d.end}; this provider exposes no working tree`:"no source span in the graph"});if(!d)return vt(ot.NO_SOURCE,{term:c,detail:"no source span in the graph (likely a module)"});try{let f=await Jn({readFile:s,repoRoot:n,path:d.path,start:d.start,end:d.end,maxLines:ul});return yt({path:d.path,span:{start:d.start,end:d.end},body:f.text})}catch(f){return vt(ot.NO_SOURCE,{term:c,detail:`could not read ${d.path}: ${f?.message||f}`})}},async context(c,{depth:u="auto"}={}){let{match:d}=Zt(e,String(c??""));if(!d)return vt(ot.UNRESOLVED_TERM,{term:String(c??"")});let f=jo(e,d),p=String(u||"auto").trim().toLowerCase(),m,h;p==="min"?(m="TINY",h=Hs("TINY")):p==="full"?(m="FULL",h=Hs("FULL")):{tier:m,mask:h}=ji(f,e,{});let g=lf(f,h);if(!l.sourceAccess)return yt({text:g,tier:m});let b=await US(f,h,{readFile:s,repoRoot:n});return yt({text:b?`${g}
69
- ${b}`:g,tier:m})},architecture({package:c=""}={}){let u=String(c||"").trim().toLowerCase().replace(/^\.?\//,""),d=e.individuals.filter(b=>(b.class||"")==="Module"&&(!u||String(b.label||"").toLowerCase().startsWith(u))),f=new Map;for(let b of d){let y=b.label.includes("/")?b.label.slice(0,b.label.lastIndexOf("/")):"(root)";f.set(y,(f.get(y)||0)+1)}let p=new Set(d.map(b=>b.id)),m=new Map;for(let b of ke(e,"imports"))p.has(b.object)&&m.set(b.object,(m.get(b.object)||0)+1);let h=[...m.entries()].sort((b,y)=>y[1]-b[1]).map(([b,y])=>({id:b,label:i.get(b)?.label||b,importers:y})),g=[...f.entries()].sort((b,y)=>y[1]-b[1]);return yt({modules:d.length,packages:g,hubs:h})},untested(){let c=new Set(ke(e,"tests").map(d=>d.object)),u=e.individuals.filter(d=>(d.class||"")==="Module"&&!c.has(d.id)&&!/\.test\./.test(d.label||"")).map(_n);return yt({modules:u})},stats(){let c=new Map;for(let d of e.individuals){let f=d.class||"Entity";c.set(f,(c.get(f)||0)+1)}let u=[...c.entries()].map(([d,f])=>({class:d,count:f})).sort((d,f)=>f.count-d.count||d.class.localeCompare(f.class));return yt({total:e.individuals.length,classes:u,truncated:(e.truncated||[]).length>0})},history(c){if(!a(c))return vt(ot.UNRESOLVED_TERM,{term:c});let d=[...ke(e,"touches"),...ke(e,"touchesSymbol")].filter(m=>m.object===c),f=new Set,p=[];for(let m of d){if(f.has(m.subject))continue;f.add(m.subject);let h=i.get(m.subject);p.push({id:m.subject,label:m.subjectLabel||h?.label||m.subject,author:h?Wt(h,"author")??Wt(h,"commitAuthor"):null,date:h?Wt(h,"date")??Wt(h,"commitDate"):null,message:h?Wt(h,"message")??Wt(h,"commitMessage"):null})}return yt({commits:p})},search(c,{kind:u="",name:d="",decorator:f="",limit:p=xi,offset:m=0}={}){let h=String(c||""),g=String(u||"").trim().toLowerCase(),b=String(d||"").trim(),y=String(f||"").trim().toLowerCase(),w;if(g&&g!=="module"){let _=null;if(b){let x=vc(b);if(x.error)return vt(ot.UNRESOLVED_TERM,{term:b,detail:x.error});_=x}let v=h.toLowerCase().split(/[^a-z0-9_]+/).filter(Boolean);try{w=Ec(e,v,{kind:g,decFilter:y,nameRe:_}).map(x=>x.ind)}catch(x){return vt(ot.UNRESOLVED_TERM,{term:b,detail:String(x?.message||x)})}}else{let _=new Map;for(let v of e.individuals)(v.class||"")==="Module"&&_.set(v.label,v);w=Dp(e,h).map(({path:v})=>_.get(v)).filter(Boolean)}let $=w.slice(m,m+p).map(_n);return yt({results:$})},ask(c){if(typeof r!="function")return vt(ot.CAPABILITY_ABSENT,"this provider was constructed without an ask answerer");let{content:u,tmct_ask:d}=r(e,String(c||""));return yt({content:u,tmct_ask:d})}};if(o)for(let c of ll){let u=l[c];typeof u=="function"&&(l[c]=(...d)=>{let f=performance.now(),p=u.apply(l,d);return p&&typeof p.then=="function"?p.then(m=>(Nm(o,c,performance.now()-f,m),m)):(Nm(o,c,performance.now()-f,p),p)})}return l}function Nm(e,t,n,s){try{e.record({tool:`ri.${t}`,perf:{ms_total:n},response:WS(s)})}catch{}}function WS(e){if(!e||typeof e!="object"||e.ok!==!0)return{ok:!1,reason:e?.miss?.reason||null};let t=0,n=e.value;if(Array.isArray(n))t=n.length;else if(n&&typeof n=="object")for(let s of Object.values(n))Array.isArray(s)&&(t+=s.length);return{ok:!0,count:t}}var Wt,ul,BS,qi=I(()=>{Ie();Gi();Lm();Wt=(e,t)=>(e?.attributes||[]).find(n=>n.key===t)?.value??null;ul=200,BS=120});async function Lr(e,t){let n=await t.fetchEntities(e),s=$i(n);if(!s.individuals.length){let o=new Re(`the graph at ${e.graphFile} is empty \u2014 no entities to answer from yet (this repo starts with no graph; the chat session folds the conversation into one).`);throw o.emptyGraph=!0,o}return s}var Ki=I(()=>{Dt();Ie()});function vs({content:e,data:t,text:n=null}){return{content:e,data:t,text:n??e}}function tt(e,t){let n=String(e?.[t]||"").trim();if(!n)throw new Re(`${t} is required`);return n}function $t(e,t,n){let{match:s,candidates:o}=Zt(e.graph,t);if(!s)throw new Re(`no entity matching ${n} "${t}" in the code-map graph. Try a repo-relative path (e.g. path/to/module), a basename, or tmct_search for a fuzzy lookup.`);return{match:s,candidates:o}}var Nr,rt,Ge=I(()=>{Dt();Ie();Nr=200;rt=e=>(t,{graph:n,svc:s,config:o})=>{let{match:r}=$t(s,tt(t,"symbol"),"symbol");return e(n,r,{toolNamePrefix:o?.toolNamePrefix})}});async function Pm(e,{config:t,source:n=$o,trim:s=!1,tel:o=null}={}){let r=String(e?.symbol||"").trim();if(!r)throw new Re("symbol is required");let i=String(e?.depth||"auto").trim().toLowerCase(),a=!!e?.min,l=!!e?.untuned,c=!!e?.max,u=t?.toolNamePrefix||"tmct_",d=await Lr(t,n),f=$e($e(t.graphFile)),p=Vi(d,{sourceAccess:!0,repoRoot:f,readFile:ze,tel:o,ask:bs}),{match:m}=$t(p,r,"symbol"),h=jo(d,m),g,b,y=!1;a||i==="min"?(g="TINY",b=Hs("TINY")):c||i==="full"?(g="FULL",b=Hs("FULL"),y=!0):{tier:g,mask:b,topup:y}=ji(h,d,{untuned:l}),s&&!c&&(b=af(b));let w=null;if(h.moduleLabel)try{({lines:w}=await Jn({readFile:ze,repoRoot:f,path:h.moduleLabel}))}catch{w=null}let $=x=>w&&w[x-1]!=null?w[x-1].trim():"",_=(x,E)=>ys(w,x,E,Nr).text,v=[`Edit context for ${h.moduleLabel} [${g}${s?" secondary":""}] \u2014 assembled from the typed graph + that file. You do NOT need to Read it; write the new code directly after reviewing this.`];if(b.anchor&&h.anchor?.site&&w){let{start:x,end:E}=h.anchor.site;v.push(`
70
- ## anchor: ${h.anchor.label} (${h.anchor.class}) @ ${h.moduleLabel}:${x}-${E}`),v.push(_(x,E)),h.callHint&&v.push(h.callHint)}if(b.registration&&h.globals.length){v.push(`
71
- ## registration / module globals (replicate this pattern):`);for(let x of h.globals)v.push(` ${x.label} = ${x.value}${x.site?` [:${x.site.start}]`:""}`)}if(b.exemplar&&h.exemplar?.site&&w){let{start:x,end:E}=h.exemplar.site,S=h.exemplar.decorators?` @${h.exemplar.decorators}`:"";v.push(`
72
- ## closest example (full body) \u2014 copy this style: ${h.exemplar.label} (${h.exemplar.class})${S} @ ${h.moduleLabel}:${x}-${E}`),v.push(_(x,E)),h.callHint&&v.push(h.callHint)}if(b.inlinedCallees&&h.calleeBodies.length&&w){let x=120;for(let E of h.calleeBodies){if(x<=0)break;let S=E.site.start,k=E.site.path===h.moduleLabel&&w?w:await Jn({readFile:ze,repoRoot:f,path:E.site.path}).then(P=>P.lines).catch(()=>null);if(!k)continue;let A=ys(k,S,E.site.end,x);v.push(`
73
- ## inlined callee body (depth-1 in-repo call): ${E.label} @ ${E.site.path}:${S}-${E.site.end}`),v.push(A.text),x-=A.end-S+1}}if(b.classMembers&&h.classMembers&&h.classMembers.members.length){v.push(`
74
- ## members of ${h.classMembers.className} (the edit likely lives INSIDE this class \u2014 copy a member's shape, do not read the class body):`);for(let x of h.classMembers.members){let E=String(x.label).split(".").pop(),S=x.params!=null&&x.params!==""?`(${x.params})${x.returns?` -> ${x.returns}`:""}`:"",R=x.decorators?`@${x.decorators} `:"",k=x.raises?` raises=${x.raises}`:"";v.push(` ${x.class} ${E}${x.site?` :${x.site.start}`:""} ${R}${E}${S}${k}`)}}if(b.siblings&&h.siblings.length){v.push(`
75
- ## sibling symbols to copy the style of (most relevant first; ${h.siblings.length} total):`);for(let x of h.siblings.slice(0,h.siblingCap)){let E=x.site?$(x.site.start):"",S=x.decorators?`@${x.decorators} `:"",R=x.raises?` raises=${x.raises}`:"";v.push(` ${x.class} ${x.label}${x.site?` :${x.site.start}`:""} ${S}${E}${R}`)}h.siblings.length>h.siblingCap&&v.push(` \u2026+${h.siblings.length-h.siblingCap} more (use ${u}search kind=function or ${u}snippet <name> for any of them)`)}if(b.allExports&&h.allExports&&v.push(`
68
+ `)}function Qi(e,{sourceAccess:t=!1,repoRoot:n=null,readFile:s=null,tel:o=null,ask:r=null}={}){let i=e.byId;if(t&&(!n||typeof s!="function"))throw new TypeError("createGraphService({ sourceAccess: true }) requires both repoRoot and readFile \u2014 fs access is an injected capability, not an ambient import.");let a=c=>i.get(c)||null,l={version:pl,capabilities:[...ml],sourceAccess:!!t,graph:e,resolve(c){let{match:u,candidates:d}=en(e,String(c??""));return u?yt({match:_n(u),candidates:d.map(_n)}):$t(ot.UNRESOLVED_TERM,{term:String(c??"")})},describe(c){let u=a(c);if(!u)return $t(ot.UNRESOLVED_TERM,{term:c});let{out:d,incoming:f}=ZS(e,c);return yt({individual:_n(u),out:d,incoming:f})},members(c){if(!a(c))return $t(ot.UNRESOLVED_TERM,{term:c});let d=ke(e,"contains").filter(m=>m.subject===c),f=[],p=[];for(let m of d){let h=i.get(m.object),g=h?_n(h):{id:m.object,label:m.objectLabel||m.object,class:"Entity",attributes:[]};(h?.class||"")==="Attribute"?p.push(g):f.push(g)}return yt({methods:f,attributes:p})},subclasses(c){if(!a(c))return $t(ot.UNRESOLVED_TERM,{term:c});let d=ke(e,"inherits"),f=d.filter(y=>y.subject===c).map(y=>i.get(y.object)?_n(i.get(y.object)):{id:y.object,label:y.objectLabel||y.object,class:"Class",attributes:[]}),p=new Map;for(let y of d)p.has(y.object)||p.set(y.object,[]),p.get(y.object).push(y.subject);let m=new Set([c]),h=[],g=[],b=[c];for(let y=0;y<8&&b.length;y+=1){let w=[],v=[];for(let _ of b)for(let $ of p.get(_)||[]){if(m.has($))continue;m.add($);let x=i.get($),E=x?_n(x):{id:$,label:$,class:"Class",attributes:[]};h.push(E),v.push(E),w.push($)}v.length&&g.push(v),b=w}return yt({bases:f,subclasses:h,levels:g})},exports(c){if(!a(c))return $t(ot.UNRESOLVED_TERM,{term:c});let f=ke(e,"reexports").filter(p=>p.subject===c).map(p=>i.get(p.object)?_n(i.get(p.object)):{id:p.object,label:p.objectLabel||p.object,class:"Entity",attributes:[]});return yt({exports:f})},signature(c){let u=a(c);if(!u)return $t(ot.UNRESOLVED_TERM,{term:c});let d=[];for(let[p,m]of[["isStatic","static"],["isAbstract","abstract"],["isConstant","constant"]])Gt(u,p)&&d.push(m);let f=Gt(u,"visibility");return f&&d.push(f),yt({id:u.id,label:u.label,class:u.class||"Entity",params:Gt(u,"params"),returns:Gt(u,"returns"),raises:Gt(u,"raises"),decorators:Gt(u,"decorators"),doc:Gt(u,"doc"),selfFields:Gt(u,"self_fields"),flags:d})},edges(c,u,{limit:d,offset:f=0}={}){if(!fl.includes(u))throw new TypeError(`edges(): unknown kind "${u}" (not in EDGE_KINDS)`);if(!a(c))return $t(ot.UNRESOLVED_TERM,{term:c});let m=ek(e,u),h=ke(e,u).filter(g=>g.subject===c).map(g=>Ji(g,m));return h=d==null?h.slice(f):h.slice(f,f+d),yt({kind:u,edges:h})},impact(c,{maxDepth:u}={}){let d=a(c);if(!d)return $t(ot.UNRESOLVED_TERM,{term:c});let f=u==null?To(e,d):To(e,d,{maxDepth:u}),p=f.reduce((m,h)=>m+h.length,0);return yt({total:p,levels:f})},async snippet(c){let u=a(c);if(!u)return $t(ot.UNRESOLVED_TERM,{term:c});let d=Rt(u);if(!l.sourceAccess)return $t(ot.NO_SOURCE,{term:c,detail:d?`span is ${d.path}:${d.start}-${d.end}; this provider exposes no working tree`:"no source span in the graph"});if(!d)return $t(ot.NO_SOURCE,{term:c,detail:"no source span in the graph (likely a module)"});try{let f=await Jn({readFile:s,repoRoot:n,path:d.path,start:d.start,end:d.end,maxLines:hl});return yt({path:d.path,span:{start:d.start,end:d.end},body:f.text})}catch(f){return $t(ot.NO_SOURCE,{term:c,detail:`could not read ${d.path}: ${f?.message||f}`})}},async context(c,{depth:u="auto"}={}){let{match:d}=en(e,String(c??""));if(!d)return $t(ot.UNRESOLVED_TERM,{term:String(c??"")});let f=Ao(e,d),p=String(u||"auto").trim().toLowerCase(),m,h;p==="min"?(m="TINY",h=Ks("TINY")):p==="full"?(m="FULL",h=Ks("FULL")):{tier:m,mask:h}=Ci(f,e,{});let g=bf(f,h);if(!l.sourceAccess)return yt({text:g,tier:m});let b=await nk(f,h,{readFile:s,repoRoot:n});return yt({text:b?`${g}
69
+ ${b}`:g,tier:m})},architecture({package:c=""}={}){let u=String(c||"").trim().toLowerCase().replace(/^\.?\//,""),d=e.individuals.filter(b=>(b.class||"")==="Module"&&(!u||String(b.label||"").toLowerCase().startsWith(u))),f=new Map;for(let b of d){let y=b.label.includes("/")?b.label.slice(0,b.label.lastIndexOf("/")):"(root)";f.set(y,(f.get(y)||0)+1)}let p=new Set(d.map(b=>b.id)),m=new Map;for(let b of ke(e,"imports"))p.has(b.object)&&m.set(b.object,(m.get(b.object)||0)+1);let h=[...m.entries()].sort((b,y)=>y[1]-b[1]).map(([b,y])=>({id:b,label:i.get(b)?.label||b,importers:y})),g=[...f.entries()].sort((b,y)=>y[1]-b[1]);return yt({modules:d.length,packages:g,hubs:h})},untested(){let c=new Set(ke(e,"tests").map(d=>d.object)),u=e.individuals.filter(d=>(d.class||"")==="Module"&&!c.has(d.id)&&!/\.test\./.test(d.label||"")).map(_n);return yt({modules:u})},stats(){let c=new Map;for(let d of e.individuals){let f=d.class||"Entity";c.set(f,(c.get(f)||0)+1)}let u=[...c.entries()].map(([d,f])=>({class:d,count:f})).sort((d,f)=>f.count-d.count||d.class.localeCompare(f.class));return yt({total:e.individuals.length,classes:u,truncated:(e.truncated||[]).length>0})},history(c){if(!a(c))return $t(ot.UNRESOLVED_TERM,{term:c});let d=[...ke(e,"touches"),...ke(e,"touchesSymbol")].filter(m=>m.object===c),f=new Set,p=[];for(let m of d){if(f.has(m.subject))continue;f.add(m.subject);let h=i.get(m.subject);p.push({id:m.subject,label:m.subjectLabel||h?.label||m.subject,author:h?Gt(h,"author")??Gt(h,"commitAuthor"):null,date:h?Gt(h,"date")??Gt(h,"commitDate"):null,message:h?Gt(h,"message")??Gt(h,"commitMessage"):null})}return yt({commits:p})},search(c,{kind:u="",name:d="",decorator:f="",limit:p=Ri,offset:m=0}={}){let h=String(c||""),g=String(u||"").trim().toLowerCase(),b=String(d||"").trim(),y=String(f||"").trim().toLowerCase(),w;if(g&&g!=="module"){let _=null;if(b){let x=kc(b);if(x.error)return $t(ot.UNRESOLVED_TERM,{term:b,detail:x.error});_=x}let $=h.toLowerCase().split(/[^a-z0-9_]+/).filter(Boolean);try{w=Rc(e,$,{kind:g,decFilter:y,nameRe:_}).map(x=>x.ind)}catch(x){return $t(ot.UNRESOLVED_TERM,{term:b,detail:String(x?.message||x)})}}else{let _=new Map;for(let $ of e.individuals)($.class||"")==="Module"&&_.set($.label,$);w=Hp(e,h).map(({path:$})=>_.get($)).filter(Boolean)}let v=w.slice(m,m+p).map(_n);return yt({results:v})},ask(c){if(typeof r!="function")return $t(ot.CAPABILITY_ABSENT,"this provider was constructed without an ask answerer");let{content:u,tmct_ask:d}=r(e,String(c||""));return yt({content:u,tmct_ask:d})}};if(o)for(let c of ml){let u=l[c];typeof u=="function"&&(l[c]=(...d)=>{let f=performance.now(),p=u.apply(l,d);return p&&typeof p.then=="function"?p.then(m=>(Wm(o,c,performance.now()-f,m),m)):(Wm(o,c,performance.now()-f,p),p)})}return l}function Wm(e,t,n,s){try{e.record({tool:`ri.${t}`,perf:{ms_total:n},response:sk(s)})}catch{}}function sk(e){if(!e||typeof e!="object"||e.ok!==!0)return{ok:!1,reason:e?.miss?.reason||null};let t=0,n=e.value;if(Array.isArray(n))t=n.length;else if(n&&typeof n=="object")for(let s of Object.values(n))Array.isArray(s)&&(t+=s.length);return{ok:!0,count:t}}var Gt,hl,tk,Zi=O(()=>{Oe();Xi();Bm();Gt=(e,t)=>(e?.attributes||[]).find(n=>n.key===t)?.value??null;hl=200,tk=120});async function Nr(e,t){let n=await t.fetchEntities(e),s=_i(n);if(!s.individuals.length){let o=new Re(`the graph at ${e.graphFile} is empty \u2014 no entities to answer from yet (this repo starts with no graph; the chat session folds the conversation into one).`);throw o.emptyGraph=!0,o}return s}var ea=O(()=>{zt();Oe()});function xs({content:e,data:t,text:n=null}){return{content:e,data:t,text:n??e}}function tt(e,t){let n=String(e?.[t]||"").trim();if(!n)throw new Re(`${t} is required`);return n}function xt(e,t,n){let{match:s,candidates:o}=en(e.graph,t);if(!s)throw new Re(`no entity matching ${n} "${t}" in the code-map graph. Try a repo-relative path (e.g. path/to/module), a basename, or tmct_search for a fuzzy lookup.`);return{match:s,candidates:o}}var Mr,rt,qe=O(()=>{zt();Oe();Mr=200;rt=e=>(t,{graph:n,svc:s,config:o})=>{let{match:r}=xt(s,tt(t,"symbol"),"symbol");return e(n,r,{toolNamePrefix:o?.toolNamePrefix})}});async function Gm(e,{config:t,source:n=ko,trim:s=!1,tel:o=null}={}){let r=String(e?.symbol||"").trim();if(!r)throw new Re("symbol is required");let i=String(e?.depth||"auto").trim().toLowerCase(),a=!!e?.min,l=!!e?.untuned,c=!!e?.max,u=t?.toolNamePrefix||"tmct_",d=await Nr(t,n),f=ve(ve(t.graphFile)),p=Qi(d,{sourceAccess:!0,repoRoot:f,readFile:ze,tel:o,ask:ys}),{match:m}=xt(p,r,"symbol"),h=Ao(d,m),g,b,y=!1;a||i==="min"?(g="TINY",b=Ks("TINY")):c||i==="full"?(g="FULL",b=Ks("FULL"),y=!0):{tier:g,mask:b,topup:y}=Ci(h,d,{untuned:l}),s&&!c&&(b=hf(b));let w=null;if(h.moduleLabel)try{({lines:w}=await Jn({readFile:ze,repoRoot:f,path:h.moduleLabel}))}catch{w=null}let v=x=>w&&w[x-1]!=null?w[x-1].trim():"",_=(x,E)=>vs(w,x,E,Mr).text,$=[`Edit context for ${h.moduleLabel} [${g}${s?" secondary":""}] \u2014 assembled from the typed graph + that file. You do NOT need to Read it; write the new code directly after reviewing this.`];if(b.anchor&&h.anchor?.site&&w){let{start:x,end:E}=h.anchor.site;$.push(`
70
+ ## anchor: ${h.anchor.label} (${h.anchor.class}) @ ${h.moduleLabel}:${x}-${E}`),$.push(_(x,E)),h.callHint&&$.push(h.callHint)}if(b.registration&&h.globals.length){$.push(`
71
+ ## registration / module globals (replicate this pattern):`);for(let x of h.globals)$.push(` ${x.label} = ${x.value}${x.site?` [:${x.site.start}]`:""}`)}if(b.exemplar&&h.exemplar?.site&&w){let{start:x,end:E}=h.exemplar.site,S=h.exemplar.decorators?` @${h.exemplar.decorators}`:"";$.push(`
72
+ ## closest example (full body) \u2014 copy this style: ${h.exemplar.label} (${h.exemplar.class})${S} @ ${h.moduleLabel}:${x}-${E}`),$.push(_(x,E)),h.callHint&&$.push(h.callHint)}if(b.inlinedCallees&&h.calleeBodies.length&&w){let x=120;for(let E of h.calleeBodies){if(x<=0)break;let S=E.site.start,k=E.site.path===h.moduleLabel&&w?w:await Jn({readFile:ze,repoRoot:f,path:E.site.path}).then(M=>M.lines).catch(()=>null);if(!k)continue;let A=vs(k,S,E.site.end,x);$.push(`
73
+ ## inlined callee body (depth-1 in-repo call): ${E.label} @ ${E.site.path}:${S}-${E.site.end}`),$.push(A.text),x-=A.end-S+1}}if(b.classMembers&&h.classMembers&&h.classMembers.members.length){$.push(`
74
+ ## members of ${h.classMembers.className} (the edit likely lives INSIDE this class \u2014 copy a member's shape, do not read the class body):`);for(let x of h.classMembers.members){let E=String(x.label).split(".").pop(),S=x.params!=null&&x.params!==""?`(${x.params})${x.returns?` -> ${x.returns}`:""}`:"",R=x.decorators?`@${x.decorators} `:"",k=x.raises?` raises=${x.raises}`:"";$.push(` ${x.class} ${E}${x.site?` :${x.site.start}`:""} ${R}${E}${S}${k}`)}}if(b.siblings&&h.siblings.length){$.push(`
75
+ ## sibling symbols to copy the style of (most relevant first; ${h.siblings.length} total):`);for(let x of h.siblings.slice(0,h.siblingCap)){let E=x.site?v(x.site.start):"",S=x.decorators?`@${x.decorators} `:"",R=x.raises?` raises=${x.raises}`:"";$.push(` ${x.class} ${x.label}${x.site?` :${x.site.start}`:""} ${S}${E}${R}`)}h.siblings.length>h.siblingCap&&$.push(` \u2026+${h.siblings.length-h.siblingCap} more (use ${u}search kind=function or ${u}snippet <name> for any of them)`)}if(b.allExports&&h.allExports&&$.push(`
76
76
  ## module __all__ \u2014 this module curates its public API; ADD your new public symbol to this list so it is importable:
77
- ${h.allExports}`),b.reexports&&h.exports&&h.exports.length&&v.push(`
78
- ## re-exported symbols (resolved __all__ \u2192 defining module): ${h.exports.join(", ")}`),b.insertionRegion&&h.insertionRegion&&w){let x=h.insertionRegion.start,E=Math.min(w.length,x+40-1);v.push(`
79
- ## insertion region (write your new sibling here) \u2014 ${h.moduleLabel}:${x}-${E}`),v.push(w.slice(x-1,E).map((S,R)=>`${x+R} ${S}`).join(`
80
- `))}else h.insertion&&v.push(`
81
- ## insert the new sibling after line ~${h.insertion} (end of the last top-level definition).`);return b.tests&&h.tests.length&&v.push(`
82
- ## covering tests: ${h.tests.join(", ")}`),b.cochange&&h.cochange&&h.cochange.length&&v.push(`
83
- ## usually changed together (consider editing these too): ${h.cochange.map(x=>`${x.label} (\xD7${x.weight})`).join(", ")}`),v.push(`
84
- You now have the snippet, the sibling style, the registration anchor and the tests. Write the new code with Edit/Write \u2014 do NOT Read ${h.moduleLabel}.`),g!=="FULL"&&v.push(`(bundle tier ${g}; for any omitted sections run ${u}context_more {"symbol":"${r}"}, or ${u}context with depth="full".)`),{text:v.join(`
85
- `),tier:g,topup:y}}async function dl(e,{config:t,source:n,tel:s}){return(await Pm(e,{config:t,source:n,tel:s})).text}var pl=I(()=>{jt();Be();Dt();Gi();vr();Ie();ws();qi();Ki();Ge();dl.ownsGraphLoad=!0});function Mm(e,{graph:t,svc:n}){let{match:s}=$t(n,tt(e,"symbol"),"symbol");return cf(jo(t,s))}var Fm=I(()=>{Ie();Ge()});function Yi(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function Pr(e){return Yi(e).toString(16).padStart(8,"0")}function HS(e){let t=new TextEncoder().encode(String(e)),n=t.length*8,s=new Uint8Array((t.length+8>>6)+1<<6);s.set(t),s[t.length]=128;let o=new DataView(s.buffer);o.setUint32(s.length-8,Math.floor(n/4294967296)),o.setUint32(s.length-4,n>>>0);let r=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),i=new Uint32Array(64),a=(u,d)=>u>>>d|u<<32-d;for(let u=0;u<s.length;u+=64){for(let w=0;w<16;w+=1)i[w]=o.getUint32(u+w*4);for(let w=16;w<64;w+=1){let $=a(i[w-15],7)^a(i[w-15],18)^i[w-15]>>>3,_=a(i[w-2],17)^a(i[w-2],19)^i[w-2]>>>10;i[w]=i[w-16]+$+i[w-7]+_>>>0}let[d,f,p,m,h,g,b,y]=r;for(let w=0;w<64;w+=1){let $=a(h,6)^a(h,11)^a(h,25),_=h&g^~h&b,v=y+$+_+GS[w]+i[w]>>>0,x=a(d,2)^a(d,13)^a(d,22),E=d&f^d&p^f&p,S=x+E>>>0;y=b,b=g,g=h,h=m+v>>>0,m=p,p=f,f=d,d=v+S>>>0}r[0]=r[0]+d>>>0,r[1]=r[1]+f>>>0,r[2]=r[2]+p>>>0,r[3]=r[3]+m>>>0,r[4]=r[4]+h>>>0,r[5]=r[5]+g>>>0,r[6]=r[6]+b>>>0,r[7]=r[7]+y>>>0}let l=new Uint8Array(32),c=new DataView(l.buffer);for(let u=0;u<8;u+=1)c.setUint32(u*4,r[u]);return l}function VS(e,t){let n=HS(e),s="";for(let o=0;o<t;o+=1)s+=n[o].toString(16).padStart(2,"0");return s}function X(e){let t=Qn(e);return t=t.replace(/^\/c\/[a-z]{2,3}\//i,""),t=t.replace(/^[a-z][\w.-]*:/i,""),t=t.replace(/_/g," ").replace(/\s+/g," ").trim(),t=t.replace(/^(?:the|an?)\s+/i,""),t.toLowerCase()}function Zn(e){let t=Qn(e);return KS.get(t)??t}function ge(e,t,n){return Mo(X(e),Zn(t),X(n))}var GS,qS,Qn,KS,Mo,en=I(()=>{GS=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);qS=2e3,Qn=e=>String(e??"").replace(/\s+/g," ").trim().slice(0,qS);KS=new Map([["mgx:cause","mgx:causes"],["mgx:desire","mgx:desires"],["mgx:want","mgx:desires"],["mgx:require","mgx:hasPrerequisite"],["mgx:involve","mgx:hasSubevent"],["mgx:used-for","mgx:usedFor"],["mgx:made-of","mgx:madeOf"]]);Mo=(e,t,n)=>`fact:${VS(`${e}\0${t}\0${n}`,8)}`});var cn={};Fn(cn,{CARDINALITY_RULE_CONFIDENCE:()=>tk,CAX_DW_RULE:()=>ml,CAX_DW_RULE_CONFIDENCE:()=>gl,CAX_MAXC0_RULE_CONFIDENCE:()=>sk,CLS_SVF1_RULE:()=>bl,CLS_SVF1_RULE_CONFIDENCE:()=>yl,DEFAULT_MAX_ENVIRONMENTS:()=>Xi,DISJOINT_PREDICATE:()=>Fo,ENTAILED_DISJOINT_PROVENANCE:()=>hl,ENTAILED_PROVENANCE:()=>Bm,ENTAILED_SCM_SVF_PROVENANCE:()=>xl,ENTAILED_SVF1_PROVENANCE:()=>wl,ENTAILED_TYPE_PROVENANCE:()=>Wm,ON_PROPERTY_PREDICATE:()=>Rn,SCM_SVF_RULE:()=>$l,SCM_SVF_RULE_CONFIDENCE:()=>El,SOME_VALUES_FROM_PREDICATE:()=>Tn,SUBCLASS_PREDICATE:()=>Fe,TYPE_PREDICATE:()=>Lt,buildCardinalityRestrictions:()=>ek,buildRelevanceFrontier:()=>fl,deriveDisjointViolations:()=>qm,deriveSomeValuesFromApplication:()=>Km,deriveSomeValuesFromSubsumption:()=>Ym,deriveSubClassClosure:()=>Gm,deriveSubClassClosureDelta:()=>Hm,deriveTypePropagation:()=>Vm,entailedTrustFrom:()=>XS,findConsistencyViolations:()=>rk,findIsaChain:()=>Sl,proveCardinalityAtLeast:()=>nk,proveMaxCardinalityZeroDenial:()=>ok,retractSubClassOf:()=>uk,syllogise:()=>ik});function Dm(e,t,n){for(let s of t)if(typeof e?.[s]!="function")throw new TypeError(`${n} needs a store option carrying { ${t.join(", ")} } (memory/core.mjs's read/write functions) \u2014 missing ${s}`);return e}function XS(e,t=1){let n=(Array.isArray(e)?e:[]).filter(o=>typeof o=="number");if(!n.length)return null;let s=Math.max(0,Math.min(1,Math.min(...n)*t));return Number(s.toFixed(6))}function es(e){if(!e)return null;let t=e instanceof Set?[...e]:Array.isArray(e)?e:[],n=new Set;for(let s of t){let o=X(s);o&&n.add(o)}return n.size?n:null}function Gm(e,{depth:t=32,budget:n=50,focus:s=null}={}){let o=new Set,r=new Map;for(let[u,d]of e||[])!u||!d||u===d||(o.add(`${u}${Le}${d}`),r.has(u)||r.set(u,new Set),r.get(u).add(d));let i=s instanceof Set?s.size?s:null:es(s),a=(u,d,f)=>!i||i.has(u)||i.has(d)||i.has(f),l=[],c=new Set;for(let u=0;u<t;u+=1){let d=[];for(let[p,m]of r)for(let h of m){let g=r.get(h);if(g)for(let b of g){if(p===b)continue;let y=`${p}${Le}${b}`;o.has(y)||c.has(y)||a(p,h,b)&&d.push([p,h,b,y])}}if(!d.length)break;d.sort((p,m)=>p[0].localeCompare(m[0])||p[2].localeCompare(m[2])||p[1].localeCompare(m[1]));let f=!1;for(let[p,m,h,g]of d)if(!c.has(g)){if(l.length>=n)break;c.add(g),l.push({subject:p,object:h,via:m}),r.has(p)||r.set(p,new Set),r.get(p).add(h),f=!0}if(l.length>=n||!f)break}return l}function Hm(e,t,{depth:n=32,budget:s=50,focus:o=null}={}){let r=new Set,i=new Map,a=new Map;for(let[m,h]of e||[])!m||!h||m===h||(r.add(`${m}${Le}${h}`),i.has(m)||i.set(m,new Set),i.get(m).add(h),a.has(h)||a.set(h,new Set),a.get(h).add(m));let l=[],c=new Set;for(let[m,h]of t||[]){if(!m||!h||m===h)continue;let g=`${m}${Le}${h}`;c.has(g)||(c.add(g),l.push([m,h]))}let u=o instanceof Set?o.size?o:null:es(o),d=(m,h,g)=>!u||u.has(m)||u.has(h)||u.has(g),f=[],p=new Set;for(let m=0;m<n&&l.length;m+=1){let h=[],g=(w,$,_)=>{if(w===_)return;let v=`${w}${Le}${_}`;r.has(v)||p.has(v)||d(w,$,_)&&h.push([w,$,_,v])};for(let[w,$]of l){for(let _ of i.get($)||[])g(w,$,_);for(let _ of a.get(w)||[])g(_,w,$)}if(!h.length)break;h.sort((w,$)=>w[0].localeCompare($[0])||w[2].localeCompare($[2])||w[1].localeCompare($[1]));let b=!1,y=[];for(let[w,$,_,v]of h)if(!p.has(v)){if(f.length>=s)break;p.add(v),f.push({subject:w,object:_,via:$}),i.has(w)||i.set(w,new Set),i.get(w).add(_),a.has(_)||a.set(_,new Set),a.get(_).add(w),y.push([w,_]),b=!0}if(f.length>=s||!b)break;l=y}return f}function An(e){let t=new Map;for(let[s,o]of e||[])!s||!o||s===o||(t.has(s)||t.set(s,new Set),t.get(s).add(o));let n=new Map;return s=>{if(n.has(s))return n.get(s);let o=new Set,r=[...t.get(s)||[]];for(;r.length;){let i=r.pop();if(!o.has(i)){o.add(i);for(let a of t.get(i)||[])o.has(a)||r.push(a)}}return n.set(s,o),o}}function JS(e){return An((e||[]).map(([t,n])=>[n,t]))}function fl(e,t){let n=[],s=[],o=new Map,r=new Map;for(let c of e||[])!c||!c.subject||!c.predicate||!c.object||($s(c.predicate)?n.push([c.subject,c.object]):Js(c.predicate)?s.push([c.subject,c.object]):Do(c.predicate)?o.set(c.subject,c.object):Fr(c.predicate)&&r.set(c.subject,c.object));let i=JS(n),a=new Set;for(let c of t||[]){let u=X(c);if(u){a.add(u);for(let d of i(u))a.add(d)}}let l=new Set(a);for(let[c,u]of s)a.has(u)&&l.add(c);for(let[c,u]of r)o.has(c)&&a.has(u)&&l.add(c);return l}function Vm(e,t,{budget:n=50,focus:s=null,presentTypeEdges:o=e}={}){let r=An(t),i=new Set,a=new Set;for(let[p,m]of o||[])p&&m&&i.add(`${p}${Le}${m}`);let l=s instanceof Set?s.size?s:null:es(s),c=(p,m,h)=>!l||l.has(p)||l.has(m)||l.has(h),u=[];for(let[p,m]of e||[]){if(!p||!m)continue;let h=`${p}${Le}${m}`;if(!a.has(h)){a.add(h);for(let g of r(m)){if(g===m||g===p)continue;let b=`${p}${Le}${g}`;i.has(b)||c(p,m,g)&&u.push([p,m,g,b])}}}u.sort((p,m)=>p[0].localeCompare(m[0])||p[2].localeCompare(m[2])||p[1].localeCompare(m[1]));let d=[],f=new Set;for(let[p,m,h,g]of u)if(!f.has(g)){if(d.length>=n)break;f.add(g),d.push({subject:p,object:h,via:m})}return d}function qm(e,t,n,{budget:s=50,focus:o=null}={}){let r=An(t),i=new Map,a=new Set;for(let[m,h]of n||[])!m||!h||m===h||(a.add(`${m}${Le}${h}`),a.add(`${h}${Le}${m}`),i.has(m)||i.set(m,new Set),i.get(m).add(h),i.has(h)||i.set(h,new Set),i.get(h).add(m));if(!i.size)return[];let l=new Set,c=o instanceof Set?o.size?o:null:es(o),u=(m,h,g)=>!c||c.has(m)||c.has(h)||c.has(g),d=[];for(let[m,h]of e||[]){if(!m||!h)continue;let g=`${m}${Le}${h}`;if(!l.has(g)){l.add(g);for(let b of[h,...r(h)]){let y=i.get(b);if(y)for(let w of y){if(w===m)continue;let $=`${m}${Le}${w}`;a.has($)||u(m,h,w)&&d.push([m,h,b,w,$])}}}}d.sort((m,h)=>m[0].localeCompare(h[0])||m[3].localeCompare(h[3])||m[2].localeCompare(h[2])||m[1].localeCompare(h[1]));let f=[],p=new Set;for(let[m,h,g,b,y]of d)if(!p.has(y)){if(f.length>=s)break;p.add(y),f.push({subject:m,object:b,viaType:h,viaClass:g})}return f}function Km(e,t,n,s,{budget:o=50,focus:r=null}={}){let i=An(n),a=new Map;for(let g of s||[]){if(!g||!g.restriction||!g.property||!g.target)continue;let b=`${g.property}${Le}${g.target}`;a.has(b)||a.set(b,new Set),a.get(b).add(g.restriction)}if(!a.size)return[];let l=new Set,c=new Map;for(let[g,b]of t||[])!g||!b||(l.add(`${g}${Le}${b}`),c.has(g)||c.set(g,new Set),c.get(g).add(b));let u=r instanceof Set?r.size?r:null:es(r),d=(g,b,y)=>!u||u.has(g)||u.has(b)||u.has(y),f=new Set,p=[];for(let[g,b,y]of e||[]){if(!g||!b||!y)continue;let w=X(b),$=`${g}${Le}${w}${Le}${y}`;if(f.has($))continue;f.add($);let _=c.get(y);if(_)for(let v of _)for(let x of[v,...i(v)]){let E=a.get(`${w}${Le}${x}`);if(E)for(let S of E){if(g===S)continue;let R=`${g}${Le}${S}`;l.has(R)||d(g,y,S)&&p.push([g,b,w,y,v,x,S,R])}}}p.sort((g,b)=>g[0].localeCompare(b[0])||g[6].localeCompare(b[6])||g[1].localeCompare(b[1])||g[3].localeCompare(b[3]));let m=[],h=new Set;for(let[g,b,y,w,$,_,v,x]of p)if(!h.has(x)){if(m.length>=o)break;h.add(x),m.push({subject:g,object:v,viaProperty:b,viaPropertyKey:y,viaValue:w,viaType:$,viaTarget:_})}return m}function ek(e){let t=new Map,n=new Map,s=new Map;for(let r of e||[])if(!(!r||!r.subject||!r.predicate))if(Do(r.predicate))t.set(r.subject,r.object);else if(YS(r.predicate))s.set(r.subject,r.object);else{let i=ZS[String(r.predicate).trim().toLowerCase()];if(!i)continue;let a=Number(r.object);Number.isFinite(a)&&n.set(r.subject,{kind:i,n:a})}let o=[];for(let[r,{kind:i,n:a}]of n){if(t.get(r)!==QS)continue;let l=s.get(r);l&&o.push({restriction:r,kind:i,n:a,onClass:l})}return o.sort((r,i)=>r.restriction.localeCompare(i.restriction)),o}function Ym(e,t,{budget:n=50,focus:s=null}={}){let o=An(t),r=new Map;for(let f of e||[]){if(!f||!f.restriction||!f.property||!f.target)continue;let p=X(f.property);r.has(p)||r.set(p,[]),r.get(p).push({restriction:f.restriction,target:f.target})}let i=new Set;for(let[f,p]of t||[])f&&p&&i.add(`${f}${Le}${p}`);let a=s instanceof Set?s.size?s:null:es(s),l=(f,p)=>!a||a.has(f)||a.has(p),c=[];for(let[,f]of r)if(!(f.length<2))for(let p of f)for(let m of f){if(p.restriction===m.restriction||p.target===m.target||!o(p.target).has(m.target))continue;let h=`${p.restriction}${Le}${m.restriction}`;i.has(h)||l(p.restriction,m.restriction)&&c.push([p.restriction,m.restriction,p.target,m.target,h])}c.sort((f,p)=>f[0].localeCompare(p[0])||f[1].localeCompare(p[1]));let u=[],d=new Set;for(let[f,p,m,h,g]of c)if(!d.has(g)){if(u.length>=n)break;d.add(g),u.push({subject:f,object:p,viaY1:m,viaY2:h})}return u}function Xm(e,t,n,s,{budget:o=20,focus:r=null}={}){if(!n)return null;let i=An(e),a=r instanceof Set?r.size?r:null:es(r),l=f=>!a||a.has(n)||a.has(f),c=new Map;for(let[f,p]of e||[])!f||!p||(c.has(f)||c.set(f,new Set),c.get(f).add(p));let u=new Map((t||[]).map(f=>[f.restriction,f])),d=0;for(let f of[n,...i(n)]){if(d>=o)break;if(d+=1,!!l(f))for(let p of c.get(f)||[]){let m=u.get(p);if(m&&s(m))return{viaClass:f,viaRestriction:p,record:m}}}return null}function nk(e,t,n,s,o,r={}){if(!s||!Number.isFinite(o))return null;let i=Xm(e,t,n,a=>a.onClass===s&&(a.kind==="exactly"||a.kind==="min")&&a.n>=o,r);return i?{subject:n,object:s,m:o,n:i.record.n,kind:i.record.kind,viaClass:i.viaClass,viaRestriction:i.viaRestriction}:null}function ok(e,t,n,s,o={}){if(!s)return null;let r=Xm(e,t,n,i=>i.onClass===s&&i.kind==="max"&&i.n===0,o);return r?{subject:n,object:s,viaClass:r.viaClass,viaRestriction:r.viaRestriction}:null}function rk(e,t,n,{budget:s=50,focus:o=null}={}){let r=An(t),i=new Map;for(let[p,m]of n||[])!p||!m||p===m||(i.has(p)||i.set(p,new Set),i.get(p).add(m),i.has(m)||i.set(m,new Set),i.get(m).add(p));if(!i.size)return[];let a=new Map;for(let[p,m]of e||[])!p||!m||(a.has(p)||a.set(p,new Set),a.get(p).add(m));let l=o instanceof Set?o.size?o:null:es(o),c=p=>!l||l.has(p),u=[],d=new Set;for(let[p,m]of a){if(!c(p))continue;let h=[...m].sort();for(let g=0;g<h.length;g+=1)for(let b=g+1;b<h.length;b+=1){let[y,w]=[h[g],h[b]],$=[y,...r(y)],_=[w,...r(w)],v=null;for(let E of $){let S=i.get(E);if(S){for(let R of _)if(S.has(R)){v=[E,R];break}if(v)break}}if(!v)continue;let x=`${p}${Le}${y}${Le}${w}`;d.has(x)||(d.add(x),u.push([p,y,w,v[0],v[1]]))}}u.sort((p,m)=>p[0].localeCompare(m[0])||p[1].localeCompare(m[1])||p[2].localeCompare(m[2]));let f=[];for(let[p,m,h,g,b]of u){if(f.length>=s)break;f.push({subject:p,classA:m,classB:h,viaA:g,viaB:b})}return f}async function ik(e,{depth:t=32,budget:n=50,focus:s=null,expandFocus:o=!1,maxEnvironments:r=Xi,full:i=!1,store:a}={}){let{loadMemory:l,readFactRows:c,appendFacts:u}=Dm(a,["loadMemory","readFactRows","appendFacts"],"syllogise"),d=typeof a?.loadSyllogiseState=="function"&&typeof a?.saveSyllogiseState=="function",f=await l(e),p=c(f),m=p.filter(j=>$s(j.predicate)).map(j=>[j.subject,j.object]),h=p.filter(j=>Js(j.predicate)).map(j=>[j.subject,j.object]),g=p.filter(j=>Xs(j.predicate)).map(j=>[j.subject,j.object]),b=new Map,y=new Map,w=[];for(let j of p){let le=String(j.predicate||"").trim().toLowerCase();Do(j.predicate)?b.set(j.subject,j.object):Fr(j.predicate)?y.set(j.subject,j.object):vl.has(le)||w.push([j.subject,j.predicate,j.object])}let $=[];for(let[j,le]of b){let Te=y.get(j);Te&&$.push({restriction:j,property:le,target:Te})}let _=es(s),v=o&&_?fl(p,[..._]):_,x=v===null&&d?await a.loadSyllogiseState(e):null,E=new Set(p.map(j=>j.id)),S=Array.isArray(x?.factIds)?x.factIds.filter(j=>!E.has(j)):[],R=x&&Array.isArray(x.factIds)&&!S.length&&!i?"delta":"full",k=R==="delta"?new Set(x.factIds):null,A=R==="delta"?p.filter(j=>!k.has(j.id)):p,P=A.length,T=new Map;for(let j of p)T.set(`${j.subject}${Le}${j.predicate}${Le}${j.object}`,j.trust);let M=(j,le,Te)=>T.get(`${j}${Le}${le}${Le}${Te}`),B=(j,le,Te)=>T.has(`${j}${Le}${le}${Le}${Te}`),Z=j=>j.filter(le=>typeof le=="number"),J=R==="delta"&&!A.length,ne=R==="delta"?A.filter(j=>$s(j.predicate)).map(j=>[j.subject,j.object]):[],D=R==="delta"?ne.length?Hm(m,ne,{depth:t,budget:n,focus:v}):[]:Gm(m,{depth:t,budget:n,focus:v}),z=m.concat(D.map(j=>[j.subject,j.object])),W=v,C=null;if(R==="delta"&&!J){let j=p.concat(D.map(Te=>({subject:Te.subject,predicate:Fe,object:Te.object}))),le=[];for(let Te of A)le.push(Te.subject,Te.object);C=fl(j,le),W=C}let L=j=>!C||C.has(j),O=C?h.filter(([j,le])=>L(j)||L(le)):h,N=new Set;if(C)for(let j of A)Xs(j.predicate)&&(N.add(j.subject),N.add(j.object));let F=C&&N.size?An(z):null,G=C?h.filter(([j,le])=>L(j)||L(le)||F&&[...F(le)].some(Te=>N.has(Te))):h,q=new Set;if(C){for(let j of A)if(Do(j.predicate)||Fr(j.predicate)){let le=b.get(j.subject);le&&q.add(X(le))}}let ae=C?w.filter(([j,le,Te])=>L(j)||L(Te)||q.has(X(le))):w,ce=Math.max(0,n-D.length),K=ce>0&&!J?Vm(O,z,{budget:ce,focus:W,presentTypeEdges:h}):[],ee=Math.max(0,n-D.length-K.length),H=ee>0&&!J?qm(G,z,g,{budget:ee,focus:W}):[],se=Math.max(0,n-D.length-K.length-H.length),te=se>0&&$.length&&!J?Km(ae,h,z,$,{budget:se,focus:W}):[],xe=Math.max(0,n-D.length-K.length-H.length-te.length),Ae=xe>0&&$.length>1&&!J?Ym($,z,{budget:xe,focus:W}):[],pe=new Map($.map(j=>[j.restriction,j])),ie=[...D.map(j=>({subject:j.subject,predicate:Fe,object:j.object,provenance:Bm,justification:[[ge(j.subject,Fe,j.via),ge(j.via,Fe,j.object)]]})),...K.map(j=>({subject:j.subject,predicate:Lt,object:j.object,provenance:Wm,justification:[[ge(j.subject,Lt,j.via),ge(j.via,Fe,j.object)]]})),...H.map(j=>{let le=B(j.viaClass,Fo,j.object),[Te,Mn]=le?[j.viaClass,j.object]:[j.object,j.viaClass],mo=Z([M(j.subject,Lt,j.viaType),M(Te,Fo,Mn),...j.viaClass!==j.viaType?[M(j.viaType,Fe,j.viaClass)]:[]]);return{subject:j.subject,predicate:Fo,object:j.object,provenance:hl,justification:[[ge(j.subject,Lt,j.viaType),ge(Te,Fo,Mn),...j.viaClass!==j.viaType?[ge(j.viaType,Fe,j.viaClass)]:[]]],...mo.length?{premiseTrusts:mo,ruleConfidence:gl}:{}}}),...te.map(j=>{let le=Z([M(j.subject,j.viaProperty,j.viaValue),M(j.viaValue,Lt,j.viaType),M(j.object,Rn,j.viaPropertyKey),M(j.object,Tn,j.viaTarget),...j.viaType!==j.viaTarget?[M(j.viaType,Fe,j.viaTarget)]:[]]);return{subject:j.subject,predicate:Lt,object:j.object,provenance:wl,justification:[[ge(j.subject,j.viaProperty,j.viaValue),ge(j.viaValue,Lt,j.viaType),ge(j.object,Rn,j.viaPropertyKey),ge(j.object,Tn,j.viaTarget),...j.viaType!==j.viaTarget?[ge(j.viaType,Fe,j.viaTarget)]:[]]],...le.length?{premiseTrusts:le,ruleConfidence:yl}:{}}}),...Ae.map(j=>{let le=pe.get(j.subject),Te=pe.get(j.object),Mn=Z([le&&M(j.subject,Rn,le.property),M(j.subject,Tn,j.viaY1),Te&&M(j.object,Rn,Te.property),M(j.object,Tn,j.viaY2),M(j.viaY1,Fe,j.viaY2)]);return{subject:j.subject,predicate:Fe,object:j.object,provenance:xl,justification:[[...le?[ge(j.subject,Rn,le.property)]:[],ge(j.subject,Tn,j.viaY1),...Te?[ge(j.object,Rn,Te.property)]:[],ge(j.object,Tn,j.viaY2),ge(j.viaY1,Fe,j.viaY2)]],...Mn.length?{premiseTrusts:Mn,ruleConfidence:El}:{}}})],fe=ie.map(j=>({id:ge(j.subject,j.predicate,j.object),subject:j.subject,predicate:j.predicate,object:j.object,environments:j.justification,write:j})),be=Qm(p.concat(fe.map(j=>({id:j.id,subject:j.subject,predicate:j.predicate,object:j.object})))),Ce=new Map(p.map(j=>[j.id,j])),ue=j=>$s(j)||Js(j)||Xs(j),V=j=>R!=="delta"||C!==null&&(C.has(j.subject)||C.has(j.object)),oe=p.filter(j=>ue(j.predicate)&&Jm(j.provenance)&&Mr(j).length<r&&V(j)).map(j=>({id:j.id,subject:j.subject,predicate:j.predicate,object:j.object,environments:Mr(j),provenance:j.provenance})),Ze=[...fe,...oe].sort((j,le)=>j.subject.localeCompare(le.subject)||j.predicate.localeCompare(le.predicate)||j.object.localeCompare(le.object)),De=0,He=!1,nn=0;for(let j of Ze){if(nn>=n){He=!0;break}nn+=1;let le=be(j,{maxEnvironments:r+1}),{kept:Te,truncated:Mn}=ck(j.environments,le,r);if(Mn&&(He=!0),!(Te.length<=j.environments.length)){if(De+=Te.length-j.environments.length,j.write){j.write.justification=Te;continue}ie.push({subject:j.subject,predicate:j.predicate,object:j.object,justification:Te,...Zm(j.provenance,Te,mo=>Ce.get(mo)?.trust)||{}})}}let{ids:sn}=await u(e,ie),Kt=[],Mt=0;for(let j of D)Kt.push({id:sn[Mt],subject:j.subject,object:j.object,via:j.via,rule:zm}),Mt+=1;for(let j of K)Kt.push({id:sn[Mt],subject:j.subject,object:j.object,via:j.via,rule:Um}),Mt+=1;for(let j of H)Kt.push({id:sn[Mt],subject:j.subject,object:j.object,via:j.viaClass,rule:ml}),Mt+=1;for(let j of te)Kt.push({id:sn[Mt],subject:j.subject,object:j.object,via:j.viaValue,rule:bl}),Mt+=1;for(let j of Ae)Kt.push({id:sn[Mt],subject:j.subject,object:j.object,via:j.viaY1,rule:$l}),Mt+=1;let ai=Kt.length>=n;if(v===null&&d&&!ai){let j=new Set(E);for(let le of sn)j.add(le);await a.saveSyllogiseState(e,{version:1,factIds:[...j].sort(),completedAt:new Date().toISOString()})}return{derived:Kt,count:Kt.length,budget:n,depth:t,truncated:ai,mode:R,deltaSize:P,environmentsAdded:De,alternatesTruncated:He}}function Jm(e){let t=String(e||"").split(" | ").filter(Boolean);return t.length>0&&t.every(n=>n.startsWith("entailed:"))}function ak(e){let t=[],n=new Map,s=new Map,o=new Map,r=new Map,i=new Map;for(let u of e){let d=String(u.predicate||"").trim().toLowerCase();$s(u.predicate)?t.push([u.subject,u.object]):Js(u.predicate)?(n.has(u.subject)||n.set(u.subject,new Set),n.get(u.subject).add(u.object)):Xs(u.predicate)?(s.has(u.subject)||s.set(u.subject,new Set),s.get(u.subject).add(u.object),s.has(u.object)||s.set(u.object,new Set),s.get(u.object).add(u.subject)):Do(u.predicate)?o.set(u.subject,u.object):Fr(u.predicate)?r.set(u.subject,u.object):vl.has(d)||(i.has(u.subject)||i.set(u.subject,[]),i.get(u.subject).push([X(u.predicate),u.object]))}let a=An(t),l=(u,d)=>u!==d&&a(u).has(d),c=u=>{let d=o.get(u),f=r.get(u);return d&&f?{property:X(d),target:f}:null};return u=>{if($s(u.predicate)){if(l(u.subject,u.object))return!0;let d=c(u.subject),f=c(u.object);return!!(d&&f&&d.property===f.property&&l(d.target,f.target))}if(Js(u.predicate)){for(let f of n.get(u.subject)||[])if(l(f,u.object))return!0;let d=c(u.object);if(d){for(let[f,p]of i.get(u.subject)||[])if(f===d.property){for(let m of n.get(p)||[])if(m===d.target||l(m,d.target))return!0}}return!1}if(Xs(u.predicate)){for(let d of n.get(u.subject)||[])for(let f of[d,...a(d)])if(s.get(f)?.has(u.object))return!0;return!1}return!0}}function Qm(e){let t=new Set,n=[],s=new Map,o=new Map,r=new Set,i=new Map,a=new Map,l=new Map,c=new Map;for(let p of e){if(!p||!p.subject||!p.predicate||!p.object)continue;p.id&&t.add(p.id);let m=String(p.predicate||"").trim().toLowerCase();$s(p.predicate)?(n.push([p.subject,p.object]),s.has(p.subject)||s.set(p.subject,new Set),s.get(p.subject).add(p.object)):Js(p.predicate)?(o.has(p.subject)||o.set(p.subject,new Set),o.get(p.subject).add(p.object)):Xs(p.predicate)?(r.add(`${p.subject}${Le}${p.object}`),i.has(p.subject)||i.set(p.subject,new Set),i.get(p.subject).add(p.object),i.has(p.object)||i.set(p.object,new Set),i.get(p.object).add(p.subject)):Do(p.predicate)?a.set(p.subject,p.object):Fr(p.predicate)?l.set(p.subject,p.object):vl.has(m)||(c.has(p.subject)||c.set(p.subject,[]),c.get(p.subject).push([p.predicate,p.object]))}let u=An(n),d=p=>s.get(p)||new Set,f=p=>{let m=a.get(p),h=l.get(p);return m&&h?{property:m,propertyKey:X(m),target:h}:null};return(p,{maxEnvironments:m=Xi}={})=>{let h=[],g=new Set,b=y=>{if(h.length>=m||p.id&&y.includes(p.id)||!y.every($=>t.has($)))return;let w=[...y].sort().join(" ");g.has(w)||(g.add(w),h.push(y))};if($s(p.predicate)){for(let y of[...d(p.subject)].sort()){if(h.length>=m)break;y===p.subject||y===p.object||d(y).has(p.object)&&b([ge(p.subject,Fe,y),ge(y,Fe,p.object)])}if(h.length<m){let y=f(p.subject),w=f(p.object);y&&w&&y.propertyKey===w.propertyKey&&y.target!==w.target&&d(y.target).has(w.target)&&b([ge(p.subject,Rn,y.property),ge(p.subject,Tn,y.target),ge(p.object,Rn,w.property),ge(p.object,Tn,w.target),ge(y.target,Fe,w.target)])}return h}if(Js(p.predicate)){for(let w of[...o.get(p.subject)||[]].sort()){if(h.length>=m)break;w!==p.object&&d(w).has(p.object)&&b([ge(p.subject,Lt,w),ge(w,Fe,p.object)])}let y=f(p.object);if(y){let w=[...c.get(p.subject)||[]].filter(([$])=>X($)===y.propertyKey).sort(($,_)=>$[0].localeCompare(_[0])||$[1].localeCompare(_[1]));for(let[$,_]of w){if(h.length>=m)break;for(let v of[...o.get(_)||[]].sort()){if(h.length>=m)break;v!==y.target&&!d(v).has(y.target)||b([ge(p.subject,$,_),ge(_,Lt,v),ge(p.object,Rn,y.propertyKey),ge(p.object,Tn,y.target),...v!==y.target?[ge(v,Fe,y.target)]:[]])}}}return h}if(Xs(p.predicate)){let y=[];for(let w of o.get(p.subject)||[])for(let $ of[w,...u(w)])(i.get($)||new Set).has(p.object)&&y.push([w,$]);y.sort((w,$)=>w[0].localeCompare($[0])||w[1].localeCompare($[1]));for(let[w,$]of y){if(h.length>=m)break;let _=r.has(`${$}${Le}${p.object}`),[v,x]=_?[$,p.object]:[p.object,$];b([ge(p.subject,Lt,w),ge(v,Fo,x),...$!==w?[ge(w,Fe,$)]:[]])}return h}return h}}function ck(e,t,n){let s=[],o=new Set,r=!1;for(let i of[...e||[],...t||[]]){if(!Array.isArray(i)||!i.length)continue;let a=[...i].sort().join(" ");if(!o.has(a)){if(s.length>=n){r=!0;continue}o.add(a),s.push(i)}}return{kept:s,truncated:r}}function Zm(e,t,n){let s;for(let i of String(e||"").split(" | ")){let a=lk.get(i);if(a!==void 0){s=a;break}}if(s===void 0)return null;let o=null,r=-1;for(let i of t||[]){let a=i.map(c=>n(c)).filter(c=>typeof c=="number");if(a.length!==i.length)continue;let l=Math.min(...a);l>r&&(r=l,o=a)}return o?{premiseTrusts:o,ruleConfidence:s}:null}async function uk(e,t,n,{budget:s=50,depth:o=32,maxEnvironments:r=Xi,store:i}={}){let{loadMemory:a,readFactRows:l,removeFacts:c}=Dm(i,["loadMemory","readFactRows","removeFacts"],"retractSubClassOf"),u=typeof i?.appendFacts=="function"?i.appendFacts:null,d=X(t),f=X(n),p=ge(d,Fe,f),m=await a(e),h=l(m),g=new Map(h.map(R=>[R.id,R]));if(!g.has(p))return{retracted:[],count:0,budget:s,depth:o,truncated:!1,found:!1};let b=h.filter(R=>Mr(R).length&&Jm(R.provenance)),y=new Map;for(let R of b)for(let k of Mr(R))for(let A of k)y.has(A)||y.set(A,new Set),y.get(A).add(R.id);let w=new Set([p]),$=[p],_=new Map,v=!1,x=0,E=[p];for(;x<o;x+=1){let R=new Set;for(let J of E)for(let ne of y.get(J)||[])w.has(ne)||R.add(ne);let k=[...R].map(J=>g.get(J)).sort((J,ne)=>J.subject.localeCompare(ne.subject)||J.predicate.localeCompare(ne.predicate)||J.object.localeCompare(ne.object));if(!k.length)break;let A=h.filter(J=>!w.has(J.id)&&!R.has(J.id)),P=new Set(A.map(J=>J.id)),T=Qm(A),M=ak(A),B=!1,Z=!1;E=[];for(let J of k){if(w.size>=s){Z=!0;break}let ne=Mr(J),D=ne.filter(W=>W.every(C=>P.has(C)));if(D.length){D.length!==ne.length&&_.set(J.id,D);continue}let z=T(J,{maxEnvironments:r});if(z.length){_.set(J.id,z);continue}M(J)||(w.add(J.id),$.push(J.id),E.push(J.id),B=!0)}if(Z){v=!0;break}if(!B)break}!v&&x>=o&&(v=b.some(R=>!w.has(R.id)&&R.justification.some(k=>w.has(k))));let{removed:S}=await c(e,$);if(u){let R=[..._.entries()].filter(([k])=>!w.has(k)).sort((k,A)=>k[0].localeCompare(A[0])).map(([k,A])=>{let P=g.get(k);return{subject:P.subject,predicate:P.predicate,object:P.object,justification:A,...Zm(P.provenance,A,T=>g.get(T)?.trust)||{}}});R.length&&await u(e,R)}return{retracted:S,count:S.length,budget:s,depth:o,truncated:v,found:!0}}function Sl(e,t,n,s,{maxHops:o=6}={}){let r=t instanceof Set?t:new Set(t||[]),i=new Map;for(let[c,u]of s||[])!c||!u||c===u||(i.has(c)||i.set(c,new Set),i.get(c).add(u));let a=[];for(let[c,u]of n||[])c===e&&u&&a.push({node:u,path:[{subject:c,predicate:Lt,object:u}]});for(let c of i.get(e)||[])a.push({node:c,path:[{subject:e,predicate:Fe,object:c}]});let l=new Set([e]);for(let c=1;c<=o&&a.length;c+=1){for(let{node:d,path:f}of a)if(r.has(d))return f;if(c===o)break;let u=[];for(let{node:d,path:f}of a)if(!l.has(d)){l.add(d);for(let p of i.get(d)||[])l.has(p)||u.push({node:p,path:[...f,{subject:d,predicate:Fe,object:p}]})}a=u}return null}var Fe,zm,Bm,Lt,Um,Wm,Fo,ml,hl,gl,Rn,Tn,bl,wl,yl,Xi,Le,$s,Js,Xs,Do,Fr,YS,vl,QS,ZS,$l,xl,El,tk,sk,Mr,lk,Gt=I(()=>{en();Fe="rdfs:subClassOf",zm="subClassOf",Bm=`entailed:${zm}`,Lt="rdf:type",Um="type",Wm=`entailed:${Um}`,Fo="owl:disjointWith",ml="disjointWith",hl=`entailed:${ml}`,gl=.95,Rn="owl:onProperty",Tn="owl:someValuesFrom",bl="someValuesFrom",wl=`entailed:${bl}`,yl=.95,Xi=4,Le="\u241F",$s=e=>String(e||"").trim().toLowerCase()==="rdfs:subclassof",Js=e=>String(e||"").trim().toLowerCase()==="rdf:type",Xs=e=>String(e||"").trim().toLowerCase()==="owl:disjointwith",Do=e=>String(e||"").trim().toLowerCase()==="owl:onproperty",Fr=e=>String(e||"").trim().toLowerCase()==="owl:somevaluesfrom",YS=e=>String(e||"").trim().toLowerCase()==="owl:onclass",vl=new Set(["rdfs:subclassof","rdf:type","owl:disjointwith","owl:onproperty","owl:somevaluesfrom","owl:intersectionof"]);QS="has",ZS={"owl:cardinality":"exactly","owl:mincardinality":"min","owl:maxcardinality":"max"};$l="someValuesFromSubsumption",xl=`entailed:${$l}`,El=.95;tk=.95;sk=.95;Mr=e=>e.environments||(Array.isArray(e.justification)&&e.justification.length?[e.justification]:[]);lk=new Map([[hl,gl],[wl,yl],[xl,El]])});function Wo(e){let t=String(e||""),n=eh.get(t);return n||(t.startsWith(kl)?zo+t.slice(kl.length):t)}function th(e){let t=String(e||""),n=dk.get(t);return n||(t.startsWith(zo)?kl+t.slice(zo.length):null)}function oh(e,t,n,s,o){let r=null;for(let i of e){if(i===t)return[];let a=Sl(i,new Set([t]),n,s,{maxHops:o});a&&(!r||a.length<r.length)&&(r=a)}return r}function Zi(e,t,n,{maxHops:s=3}={}){let o=Uo(e),r=Uo(t),i=Array.isArray(n)?n:[],{typeEdges:a,subClassEdges:l}=sh(i),c=i.filter(b=>(b.predicate===Qi||b.predicate===Bo)&&r.has(b.object)),u=[];for(let b of c){let y=b.predicate===Bo?"negative":"positive";if(o.has(b.subject)){u.push({fact:b,polarity:y,hops:0,chain:null});continue}let w=oh(o,b.subject,a,l,s);w&&w.length&&u.push({fact:b,polarity:y,hops:w.length,chain:w})}if(!u.length)return{verdict:"none",hops:0,positive:[],negative:[],chain:null,overrides:null,baseRate:_l(o,r,i,{maxHops:s})};u.sort((b,y)=>b.hops-y.hops||(y.fact.trust||0)-(b.fact.trust||0));let d=u[0].hops,f=u.filter(b=>b.hops===d),p=f.filter(b=>b.polarity==="positive").map(b=>b.fact),m=f.filter(b=>b.polarity==="negative").map(b=>b.fact),h=m.length&&!p.length?"negative":"positive",g=u.find(b=>b.hops>d&&b.polarity!==h)||null;return{verdict:p.length&&m.length?"both":m.length?"no":"yes",hops:d,positive:p,negative:m,chain:u[0].chain,overrides:g?{fact:g.fact,chain:g.chain}:null,baseRate:null}}function _l(e,t,n,{maxHops:s=3}={}){let o=Uo(e),r=Uo(t),i=Array.isArray(n)?n:[],a=i.filter(h=>h.predicate===Fe||h.predicate===Lt),l=a.filter(h=>o.has(h.subject)).map(h=>h.object);if(!l.length)return null;let c=l[0],u=[...new Set(a.filter(h=>h.object===c&&!o.has(h.subject)).map(h=>h.subject))],d=h=>{let g=i.find(b=>b.subject===h&&r.has(b.object)&&(b.predicate===Qi||b.predicate===Bo));return g?{name:h,polarity:g.predicate===Bo?"negative":"positive",fact:g}:{name:h,polarity:"unknown",fact:null}},f=u.map(d),{typeEdges:p,subClassEdges:m}=sh(i);return{klass:c,kinds:u.length,positive:f.filter(h=>h.polarity==="positive"),negative:f.filter(h=>h.polarity==="negative"),unknown:f.filter(h=>h.polarity==="unknown"),chain:oh(o,c,p,m,s)}}function Rl(e,t,{exclude:n=[],maxHops:s=3}={}){let o=Uo(e),r=Uo(n),i=Array.isArray(t)?t:[],a=new Set,l=[];for(let c of i)c.predicate!==Qi||!o.has(c.object)||r.has(c.subject)||a.has(c.subject)||(a.add(c.subject),Zi(new Set([c.subject]),o,i,{maxHops:s}).verdict==="yes"&&l.push(c));return l.sort(pk)}var zo,kl,Ji,eh,dk,nh,Qi,Bo,jl,pk,Uo,sh,ea=I(()=>{Gt();zo="mgxneg:",kl="mgx:",Ji="mgxneg:subClassOf",eh=new Map([[Fe,Ji]]),dk=new Map([...eh].map(([e,t])=>[t,e]));nh=e=>String(e||"").startsWith(zo),Qi="mgx:capableOf",Bo=Wo(Qi),jl=6,pk=(e,t)=>(t.trust||0)-(e.trust||0)||String(e.subject).localeCompare(String(t.subject)),Uo=e=>e instanceof Set?e:new Set(Array.isArray(e)?e:[e]),sh=e=>({typeEdges:e.filter(t=>t.predicate===Lt).map(t=>[t.subject,t.object]),subClassEdges:e.filter(t=>t.predicate===Fe).map(t=>[t.subject,t.object])})});function ta(e){let t=String(e||"");return Cl.has(t)?Tl:mk.has(t)||hk.test(t)?Dr:gk.has(t)?rh:Al}function bk(e){let t=e?.observedAt;if(t&&Number.isFinite(Date.parse(t)))return String(t);if(cp.has(e?.sourceType)){for(let n of[e?.assertedAt,e?.createdAt])if(n&&Number.isFinite(Date.parse(n)))return String(n)}}function wk(e,t){let n=null;for(let s of e?.assertions||[]){let o=Date.parse(bk(s)??"");Number.isFinite(o)&&(n===null||(t?o<n:o>n))&&(n=o)}return n}function Ol(e,t){let n=t===rh;if(!n&&t!==Dr)return null;let s=(e||[]).map(r=>({row:r,at:wk(r,n)}));s.sort((r,i)=>{if(r.at!==i.at)return r.at===null?1:i.at===null?-1:n?r.at-i.at:i.at-r.at;let a=(i.row.trust||0)-(r.row.trust||0);if(a)return a;let[l,c]=[String(r.row.object),String(i.row.object)];return l<c?-1:l>c?1:0});let o=s.map(r=>r.row);return{winner:o[0]||null,ranked:o,contested:s.length>1&&s[0].at===s[1].at}}var Tl,Dr,rh,Al,fk,Cl,mk,hk,gk,ih=I(()=>{ea();ps();Tl="merge",Dr="latest-observation-wins",rh="first-claim-wins",Al="contradiction",fk=["mgx:hasA","mgx:capableOf","rdfs:subClassOf","rdf:type","owl:disjointWith","mgx:partOf","mgx:usedFor","mgx:receivesAction","mgx:causes","mgx:causesDesire","mgx:hasSubevent","mgx:hasPrerequisite","mgx:motivatedByGoal","mgx:obstructedBy","mgx:desires","mgx:hasProperty","mgx:madeOf","mgx:atLocation","mgx:locatedNear","mgx:createdBy","mgx:mannerOf","mgx:relatedTo","mgx:synonym","mgx:antonym","mgx:similarTo","mgx:symbolOf","mgx:knows-about"],Cl=new Set(fk.flatMap(e=>[e,Wo(e)])),mk=new Set(["mgx:currently-in","mgx:located-in","mgx:fixed-in","mgx:stands-locked-in","mgx:hidden-in","mgx:on-top-of","mgx:on-plane","mgx:under","mgx:is-open","mgx:hasMass","mgx:feels","mgx:faces","mgx:pose","mgx:display-name","mgx:nodeName","mgx:worldName"]),hk=/^mgx:has-exit-([a-z]+)$/,gk=new Set(["mgx:playedBy"])});function Ur(e){let t=String(e||""),n=t.indexOf(na);return n<0?"":t.slice(n+na.length)}function Ek(e){let t=1,n=0;for(let s of e)t*=1-$k(s),n+=1;return n?xk(Math.min(1,1-t)):0}function dh(e,t,n){let s=Date.parse(e),o=Date.parse(t);return Number.isFinite(s)?Number.isFinite(o)?n(s,o)===s?String(e):String(t):String(e):Number.isFinite(o)?String(t):""}function mh(e,t){let n=Date.parse(e.assertedAt),s=Date.parse(t.assertedAt),o=Number.isFinite(n)?n:-1/0,r=Number.isFinite(s)?s:-1/0;return o!==r?r-o:e.id<t.id?-1:e.id>t.id?1:0}function hh(e,t="",n=""){let s=t,o=n;for(let r of e)s=ph(s,r.assertedAt),o=fh(o,r.assertedAt);return{earliest:s,latest:o}}function Pl({id:e,sourceKey:t,template:n,idsProp:s,ids:o,earliest:r,latest:i,priorFor:a}){let l=[...new Set(o)].filter(Boolean).sort(),c=a?Ek(l.map(u=>a(u))):void 0;return{id:e,label:n?.label||"",class:yk,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"rdf:Statement"},{prop:"rdf:subject",key:"subject",value:n?.subject||""},{prop:"rdf:predicate",key:"predicate",value:n?.predicate||""},{prop:"rdf:object",key:"object",value:n?.object||""},{prop:"mgx:createdAt",key:"createdAt",value:r},{prop:"mgx:sourceId",key:"sourceId",value:t},{prop:s,key:s===Go?"rollupSourceIds":"rollupRecordIds",value:l.join(" ")},{prop:Br,key:"rollupCount",value:String(l.length)},{prop:Cn,key:"rollupEarliest",value:r},{prop:On,key:"rollupLatest",value:i},...c===void 0?[]:[{prop:Ho,key:"rollupPrior",value:String(c)}]]}}function gh({groupId:e,sourceType:t,heads:n=[],existing:s=null,priorFor:o}){if(!e||!t||n.length<64||n.length<=8)return null;let i=n.slice().sort(mh).slice(8);if(!i.length)return null;let{earliest:a,latest:l}=hh(i,xt(s,Cn),xt(s,On));return{rollup:Pl({id:Il(e,t),sourceKey:`rollup:${t}`,template:Ml(i[0].record||s),idsProp:Go,ids:[...ra(s),...i.map(u=>u.sourceId)],earliest:a,latest:l,priorFor:o}),absorbed:i.map(u=>u.id),absorbedSourceIds:i.map(u=>u.sourceId)}}function bh({groupId:e,sourceId:t,leaves:n=[],existing:s=null}){if(!e||!t||n.length<8||n.length<=2)return null;let o=n.slice().sort(mh),r=o.slice(0,2),i=o.slice(2);if(!i.length)return null;let{earliest:a,latest:l}=hh(i,xt(s,Cn),xt(s,On));return{rollup:Pl({id:Ll(e,t),sourceKey:t,template:Ml(i[0].record||s),idsProp:zr,ids:[...vk(s),...i.map(u=>u.id)],earliest:a,latest:l}),absorbed:i.map(u=>u.id),rewire:r[r.length-1]?.id||""}}function Fl(e,t,{priorFor:n}={}){let s=e?.id||t?.id,o=xs(s),r=o?Go:zr,i=a=>Nl(xt(a,r));return Pl({id:s,sourceKey:xt(e,"mgx:sourceId")||xt(t,"mgx:sourceId"),template:Ml(xt(e,"rdf:subject")?e:t),idsProp:r,ids:[...i(e),...i(t)],earliest:ph(xt(e,Cn),xt(t,Cn)),latest:fh(xt(e,On),xt(t,On)),priorFor:o?n:void 0})}function wh(e,t){if(!t)return!1;for(let n of e||[])if(ra(n).includes(t))return!0;return!1}var yk,ah,ch,sa,lh,Go,zr,Br,Cn,On,Ho,na,uh,Il,Ll,xs,Vo,oa,xt,Nl,ra,vk,$k,xk,ph,fh,Ml,Dl=I(()=>{yk="Fact",ah=64,ch=8,sa=8,lh=2,Go="mgx:rollupSourceIds",zr="mgx:rollupRecordIds",Br="mgx:rollupCount",Cn="mgx:rollupEarliest",On="mgx:rollupLatest",Ho="mgx:rollupPrior",na="@rollup:",uh="#rollup",Il=(e,t)=>`${e}${na}${t}`,Ll=(e,t)=>`${e}@${t}${uh}`,xs=e=>String(e||"").includes(na),Vo=e=>String(e||"").endsWith(uh),oa=e=>xs(e)||Vo(e);xt=(e,t)=>(e?.attributes||[]).find(n=>n?.prop===t)?.value||"",Nl=e=>String(e||"").split(" ").filter(Boolean),ra=e=>Nl(xt(e,Go)),vk=e=>Nl(xt(e,zr)),$k=e=>Math.max(0,Math.min(1,Number(e)||0)),xk=e=>Number(e.toFixed(6));ph=(e,t)=>dh(e,t,Math.min),fh=(e,t)=>dh(e,t,Math.max);Ml=e=>({label:e?.label||"",subject:xt(e,"rdf:subject"),predicate:xt(e,"rdf:predicate"),object:xt(e,"rdf:object")})});function ts(e,t){let n=(e?.attributes||[]).find(s=>s?.prop===t);return n?String(n.value??""):void 0}function Tk(e,t){(!e?.class||!Sk.has(e.class))&&t.push(`must have a class from the closed vocabulary Utterance | Fact | Session | Source | Rule (got ${JSON.stringify(e?.class)})`)}function Ak(e,t){for(let i of["rdf:subject","rdf:predicate","rdf:object"])Wr(ts(e,i))||t.push(`a Fact needs a non-empty ${i}`);for(let i of["rdf:subject","rdf:object"]){let a=ts(e,i);a!==void 0&&jk.test(a)&&t.push(`a Fact's ${i} must be a single term, not text spanning a sentence boundary (got ${JSON.stringify(a)})`)}let n=ts(e,"mgx:factProvenance");n!==void 0&&!Wr(n)&&t.push("mgx:factProvenance, when present, must be non-empty");let s=typeof e?.id=="string"?e.id:"";_k(s)&&!vh.test(s)&&t.push(`a Fact record id must read <groupId>@<sourceId>, optionally suffixed #v<n> once superseded (got ${JSON.stringify(s)})`);let o=ts(e,"mgx:sourceId");o!==void 0&&!Wr(o)&&t.push("mgx:sourceId, when present, must be non-empty (every assertion record has a key, src:none included)");let r=ts(e,"mgx:observedAt");r!==void 0&&!Number.isFinite(Date.parse(r))&&t.push(`mgx:observedAt, when present, must be a parseable instant (got ${JSON.stringify(r)})`);for(let i of Rk){let a=ts(e,i);if(a===void 0)continue;let l=a.split(" ").filter(Boolean);l.length||t.push(`${i}, when present, must name at least one record id`);for(let c of l)vh.test(c)||t.push(`${i} must name Fact record ids (got ${JSON.stringify(c)})`)}}function Ck(e,t){Wr(ts(e,"mgx:ruleName"))||t.push("a Rule needs a non-empty mgx:ruleName");let n=ts(e,"mgx:ruleKind");if(!n||!yh.has(n)){t.push(`a Rule's mgx:ruleKind must be one of ${[...yh].join(" | ")} (got ${JSON.stringify(n)})`);return}for(let s of kk[n])Wr(ts(e,s))||t.push(`a ${n} Rule needs a non-empty ${s}`)}function Ok(e){let t=[];return Tk(e,t),e?.class==="Fact"&&Ak(e,t),e?.class==="Rule"&&Ck(e,t),{ok:t.length===0,violations:t}}function zl(e){let t=Ok(e);if(!t.ok){let n=new Error(`SHACL validation failed for ${e?.class} "${e?.id}": ${t.violations.join(" | ")}`);throw n.violations=t.violations,n}}var Sk,yh,kk,jk,vh,_k,Rk,Wr,$h=I(()=>{Sk=new Set(["Utterance","Fact","Session","Source","Rule"]),yh=new Set(["compose2","filter","recursive","action-signature","action-precond","action-effect","action-constraint"]),kk={compose2:["mgx:ruleBase1","mgx:ruleBase2"],filter:["mgx:ruleBase1","mgx:ruleFilterProperty"],recursive:["mgx:ruleBaseCase","mgx:ruleRecStep"],"action-signature":["mgx:ruleActionSubjectClass","mgx:ruleActionTargetClass"],"action-precond":["mgx:ruleActionPrecondShape","mgx:ruleActionPrecondPredicate","mgx:ruleActionPrecondRole","mgx:ruleActionPrecondScope"],"action-effect":["mgx:ruleActionEffectPredicate","mgx:ruleActionEffectSubject"],"action-constraint":["mgx:ruleActionConstraintLeft","mgx:ruleActionConstraintRight","mgx:ruleActionConstraintGuard"]},jk=/[.!?]\s+\w/,vh=/^[^@]+@(.+?)(#v[1-9][0-9]*)?$/,_k=e=>e.includes("@")||/#v\d/.test(e),Rk=["mgx:supersedes","mgx:supersededBy"];Wr=e=>typeof e=="string"&&e.trim().length>0});var xh={};Fn(xh,{access:()=>Nk,appendFile:()=>Fk,basename:()=>ej,copyFile:()=>Hk,createInterface:()=>rj,createReadStream:()=>qk,createRequire:()=>Ik,createWriteStream:()=>Kk,default:()=>aj,dirname:()=>Jk,existsSync:()=>Yk,fileURLToPath:()=>nj,isAbsolute:()=>Zk,join:()=>Xk,mkdir:()=>Dk,mkdtemp:()=>zk,randomBytes:()=>sj,readFile:()=>Pk,readFileSync:()=>Lk,readdir:()=>Vk,rename:()=>Bk,resolve:()=>Qk,rm:()=>Wk,sep:()=>tj,spawnSync:()=>oj,stat:()=>Gk,tmpdir:()=>ij,unlink:()=>Uk,writeFile:()=>Mk});var dt,Ik,Lk,Nk,Pk,Mk,Fk,Dk,zk,Bk,Uk,Wk,Gk,Hk,Vk,qk,Kk,Yk,Xk,Jk,Qk,Zk,ej,tj,nj,sj,oj,rj,ij,aj,Eh=I(()=>{dt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},Ik=dt("createRequire"),Lk=dt("readFileSync"),Nk=dt("access"),Pk=dt("readFile"),Mk=dt("writeFile"),Fk=dt("appendFile"),Dk=dt("mkdir"),zk=dt("mkdtemp"),Bk=dt("rename"),Uk=dt("unlink"),Wk=dt("rm"),Gk=dt("stat"),Hk=dt("copyFile"),Vk=dt("readdir"),qk=dt("createReadStream"),Kk=dt("createWriteStream"),Yk=()=>!1,Xk=(...e)=>e.join("/"),Jk=e=>String(e).replace(/\/[^/]*$/,""),Qk=(...e)=>e.join("/"),Zk=e=>String(e).startsWith("/"),ej=e=>String(e).split("/").pop(),tj="/",nj=e=>String(e),sj=dt("randomBytes"),oj=dt("spawnSync"),rj=dt("createInterface"),ij=()=>"/tmp",aj={}});var cj,Gr,Bl=I(()=>{cj=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i,Gr=class e extends Date{#t=!1;#n=!1;#e=null;constructor(t){let n=!0,s=!0,o="Z";if(typeof t=="string"){let r=t.match(cj);r?(r[1]||(n=!1,t=`0000-01-01T${t}`),s=!!r[2],s&&t[10]===" "&&(t=t.replace(" ","T")),r[2]&&+r[2]>23?t="":(o=r[3]||null,t=t.toUpperCase(),!o&&s&&(t+="Z"))):t=""}super(t),isNaN(this.getTime())||(this.#t=n,this.#n=s,this.#e=o)}isDateTime(){return this.#t&&this.#n}isLocal(){return!this.#t||!this.#n||!this.#e}isDate(){return this.#t&&!this.#n}isTime(){return this.#n&&!this.#t}isValid(){return this.#t||this.#n}toISOString(){let t=super.toISOString();if(this.isDate())return t.slice(0,10);if(this.isTime())return t.slice(11,23);if(this.#e===null)return t.slice(0,-1);if(this.#e==="Z")return t;let n=+this.#e.slice(1,3)*60+ +this.#e.slice(4,6);return n=this.#e[0]==="-"?n:-n,new Date(this.getTime()-n*6e4).toISOString().slice(0,-1)+this.#e}static wrapAsOffsetDateTime(t,n="Z"){let s=new e(t);return s.#e=n,s}static wrapAsLocalDateTime(t){let n=new e(t);return n.#e=null,n}static wrapAsLocalDate(t){let n=new e(t);return n.#n=!1,n.#e=null,n}static wrapAsLocalTime(t){let n=new e(t);return n.#t=!1,n.#e=null,n}}});function lj(e,t){let n=e.slice(0,t).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function uj(e,t,n){let s=e.split(/\r\n|\n|\r/g),o="",r=(Math.log10(t+1)|0)+1;for(let i=t-1;i<=t+1;i++){let a=s[i-1];a&&(o+=i.toString().padEnd(r," "),o+=": ",o+=a,o+=`
77
+ ${h.allExports}`),b.reexports&&h.exports&&h.exports.length&&$.push(`
78
+ ## re-exported symbols (resolved __all__ \u2192 defining module): ${h.exports.join(", ")}`),b.insertionRegion&&h.insertionRegion&&w){let x=h.insertionRegion.start,E=Math.min(w.length,x+40-1);$.push(`
79
+ ## insertion region (write your new sibling here) \u2014 ${h.moduleLabel}:${x}-${E}`),$.push(w.slice(x-1,E).map((S,R)=>`${x+R} ${S}`).join(`
80
+ `))}else h.insertion&&$.push(`
81
+ ## insert the new sibling after line ~${h.insertion} (end of the last top-level definition).`);return b.tests&&h.tests.length&&$.push(`
82
+ ## covering tests: ${h.tests.join(", ")}`),b.cochange&&h.cochange&&h.cochange.length&&$.push(`
83
+ ## usually changed together (consider editing these too): ${h.cochange.map(x=>`${x.label} (\xD7${x.weight})`).join(", ")}`),$.push(`
84
+ You now have the snippet, the sibling style, the registration anchor and the tests. Write the new code with Edit/Write \u2014 do NOT Read ${h.moduleLabel}.`),g!=="FULL"&&$.push(`(bundle tier ${g}; for any omitted sections run ${u}context_more {"symbol":"${r}"}, or ${u}context with depth="full".)`),{text:$.join(`
85
+ `),tier:g,topup:y}}async function gl(e,{config:t,source:n,tel:s}){return(await Gm(e,{config:t,source:n,tel:s})).text}var bl=O(()=>{_t();Ue();zt();Xi();vr();Oe();$s();Zi();ea();qe();gl.ownsGraphLoad=!0});function qm(e,{graph:t,svc:n}){let{match:s}=xt(n,tt(e,"symbol"),"symbol");return gf(Ao(t,s))}var Vm=O(()=>{Oe();qe()});function Pr(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function Fr(e){return Pr(e).toString(16).padStart(8,"0")}function rk(e){let t=new TextEncoder().encode(String(e)),n=t.length*8,s=new Uint8Array((t.length+8>>6)+1<<6);s.set(t),s[t.length]=128;let o=new DataView(s.buffer);o.setUint32(s.length-8,Math.floor(n/4294967296)),o.setUint32(s.length-4,n>>>0);let r=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),i=new Uint32Array(64),a=(u,d)=>u>>>d|u<<32-d;for(let u=0;u<s.length;u+=64){for(let w=0;w<16;w+=1)i[w]=o.getUint32(u+w*4);for(let w=16;w<64;w+=1){let v=a(i[w-15],7)^a(i[w-15],18)^i[w-15]>>>3,_=a(i[w-2],17)^a(i[w-2],19)^i[w-2]>>>10;i[w]=i[w-16]+v+i[w-7]+_>>>0}let[d,f,p,m,h,g,b,y]=r;for(let w=0;w<64;w+=1){let v=a(h,6)^a(h,11)^a(h,25),_=h&g^~h&b,$=y+v+_+ok[w]+i[w]>>>0,x=a(d,2)^a(d,13)^a(d,22),E=d&f^d&p^f&p,S=x+E>>>0;y=b,b=g,g=h,h=m+$>>>0,m=p,p=f,f=d,d=$+S>>>0}r[0]=r[0]+d>>>0,r[1]=r[1]+f>>>0,r[2]=r[2]+p>>>0,r[3]=r[3]+m>>>0,r[4]=r[4]+h>>>0,r[5]=r[5]+g>>>0,r[6]=r[6]+b>>>0,r[7]=r[7]+y>>>0}let l=new Uint8Array(32),c=new DataView(l.buffer);for(let u=0;u<8;u+=1)c.setUint32(u*4,r[u]);return l}function ik(e,t){let n=rk(e),s="";for(let o=0;o<t;o+=1)s+=n[o].toString(16).padStart(2,"0");return s}function X(e){let t=Qn(e);return t=t.replace(/^\/c\/[a-z]{2,3}\//i,""),t=t.replace(/^[a-z][\w.-]*:/i,""),t=t.replace(/_/g," ").replace(/\s+/g," ").trim(),t=t.replace(/^(?:the|an?)\s+/i,""),t.toLowerCase()}function Zn(e){let t=Qn(e);return ck.get(t)??t}function ge(e,t,n){return Uo(X(e),Zn(t),X(n))}var ok,ak,Qn,ck,Uo,qt=O(()=>{ok=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);ak=2e3,Qn=e=>String(e??"").replace(/\s+/g," ").trim().slice(0,ak);ck=new Map([["mgx:cause","mgx:causes"],["mgx:desire","mgx:desires"],["mgx:want","mgx:desires"],["mgx:require","mgx:hasPrerequisite"],["mgx:involve","mgx:hasSubevent"],["mgx:used-for","mgx:usedFor"],["mgx:made-of","mgx:madeOf"]]);Uo=(e,t,n)=>`fact:${ik(`${e}\0${t}\0${n}`,8)}`});var cn={};Fn(cn,{CARDINALITY_RULE_CONFIDENCE:()=>hk,CAX_DW_RULE:()=>yl,CAX_DW_RULE_CONFIDENCE:()=>vl,CAX_MAXC0_RULE_CONFIDENCE:()=>bk,CLS_SVF1_RULE:()=>xl,CLS_SVF1_RULE_CONFIDENCE:()=>Sl,DEFAULT_MAX_ENVIRONMENTS:()=>ta,DISJOINT_PREDICATE:()=>Bo,ENTAILED_DISJOINT_PROVENANCE:()=>$l,ENTAILED_PROVENANCE:()=>Ym,ENTAILED_SCM_SVF_PROVENANCE:()=>_l,ENTAILED_SVF1_PROVENANCE:()=>El,ENTAILED_TYPE_PROVENANCE:()=>Jm,ON_PROPERTY_PREDICATE:()=>Rn,SCM_SVF_RULE:()=>jl,SCM_SVF_RULE_CONFIDENCE:()=>Rl,SOME_VALUES_FROM_PREDICATE:()=>Tn,SUBCLASS_PREDICATE:()=>Fe,TYPE_PREDICATE:()=>Nt,buildCardinalityRestrictions:()=>mk,buildRelevanceFrontier:()=>wl,deriveDisjointViolations:()=>th,deriveSomeValuesFromApplication:()=>nh,deriveSomeValuesFromSubsumption:()=>sh,deriveSubClassClosure:()=>Qm,deriveSubClassClosureDelta:()=>Zm,deriveTypePropagation:()=>eh,entailedTrustFrom:()=>uk,findConsistencyViolations:()=>yk,findIsaChain:()=>Tl,proveCardinalityAtLeast:()=>gk,proveMaxCardinalityZeroDenial:()=>wk,retractSubClassOf:()=>Sk,syllogise:()=>$k});function Hm(e,t,n){for(let s of t)if(typeof e?.[s]!="function")throw new TypeError(`${n} needs a store option carrying { ${t.join(", ")} } (memory/core.mjs's read/write functions) \u2014 missing ${s}`);return e}function uk(e,t=1){let n=(Array.isArray(e)?e:[]).filter(o=>typeof o=="number");if(!n.length)return null;let s=Math.max(0,Math.min(1,Math.min(...n)*t));return Number(s.toFixed(6))}function es(e){if(!e)return null;let t=e instanceof Set?[...e]:Array.isArray(e)?e:[],n=new Set;for(let s of t){let o=X(s);o&&n.add(o)}return n.size?n:null}function Qm(e,{depth:t=32,budget:n=50,focus:s=null}={}){let o=new Set,r=new Map;for(let[u,d]of e||[])!u||!d||u===d||(o.add(`${u}${Le}${d}`),r.has(u)||r.set(u,new Set),r.get(u).add(d));let i=s instanceof Set?s.size?s:null:es(s),a=(u,d,f)=>!i||i.has(u)||i.has(d)||i.has(f),l=[],c=new Set;for(let u=0;u<t;u+=1){let d=[];for(let[p,m]of r)for(let h of m){let g=r.get(h);if(g)for(let b of g){if(p===b)continue;let y=`${p}${Le}${b}`;o.has(y)||c.has(y)||a(p,h,b)&&d.push([p,h,b,y])}}if(!d.length)break;d.sort((p,m)=>p[0].localeCompare(m[0])||p[2].localeCompare(m[2])||p[1].localeCompare(m[1]));let f=!1;for(let[p,m,h,g]of d)if(!c.has(g)){if(l.length>=n)break;c.add(g),l.push({subject:p,object:h,via:m}),r.has(p)||r.set(p,new Set),r.get(p).add(h),f=!0}if(l.length>=n||!f)break}return l}function Zm(e,t,{depth:n=32,budget:s=50,focus:o=null}={}){let r=new Set,i=new Map,a=new Map;for(let[m,h]of e||[])!m||!h||m===h||(r.add(`${m}${Le}${h}`),i.has(m)||i.set(m,new Set),i.get(m).add(h),a.has(h)||a.set(h,new Set),a.get(h).add(m));let l=[],c=new Set;for(let[m,h]of t||[]){if(!m||!h||m===h)continue;let g=`${m}${Le}${h}`;c.has(g)||(c.add(g),l.push([m,h]))}let u=o instanceof Set?o.size?o:null:es(o),d=(m,h,g)=>!u||u.has(m)||u.has(h)||u.has(g),f=[],p=new Set;for(let m=0;m<n&&l.length;m+=1){let h=[],g=(w,v,_)=>{if(w===_)return;let $=`${w}${Le}${_}`;r.has($)||p.has($)||d(w,v,_)&&h.push([w,v,_,$])};for(let[w,v]of l){for(let _ of i.get(v)||[])g(w,v,_);for(let _ of a.get(w)||[])g(_,w,v)}if(!h.length)break;h.sort((w,v)=>w[0].localeCompare(v[0])||w[2].localeCompare(v[2])||w[1].localeCompare(v[1]));let b=!1,y=[];for(let[w,v,_,$]of h)if(!p.has($)){if(f.length>=s)break;p.add($),f.push({subject:w,object:_,via:v}),i.has(w)||i.set(w,new Set),i.get(w).add(_),a.has(_)||a.set(_,new Set),a.get(_).add(w),y.push([w,_]),b=!0}if(f.length>=s||!b)break;l=y}return f}function An(e){let t=new Map;for(let[s,o]of e||[])!s||!o||s===o||(t.has(s)||t.set(s,new Set),t.get(s).add(o));let n=new Map;return s=>{if(n.has(s))return n.get(s);let o=new Set,r=[...t.get(s)||[]];for(;r.length;){let i=r.pop();if(!o.has(i)){o.add(i);for(let a of t.get(i)||[])o.has(a)||r.push(a)}}return n.set(s,o),o}}function dk(e){return An((e||[]).map(([t,n])=>[n,t]))}function wl(e,t){let n=[],s=[],o=new Map,r=new Map;for(let c of e||[])!c||!c.subject||!c.predicate||!c.object||(Es(c.predicate)?n.push([c.subject,c.object]):eo(c.predicate)?s.push([c.subject,c.object]):Wo(c.predicate)?o.set(c.subject,c.object):zr(c.predicate)&&r.set(c.subject,c.object));let i=dk(n),a=new Set;for(let c of t||[]){let u=X(c);if(u){a.add(u);for(let d of i(u))a.add(d)}}let l=new Set(a);for(let[c,u]of s)a.has(u)&&l.add(c);for(let[c,u]of r)o.has(c)&&a.has(u)&&l.add(c);return l}function eh(e,t,{budget:n=50,focus:s=null,presentTypeEdges:o=e}={}){let r=An(t),i=new Set,a=new Set;for(let[p,m]of o||[])p&&m&&i.add(`${p}${Le}${m}`);let l=s instanceof Set?s.size?s:null:es(s),c=(p,m,h)=>!l||l.has(p)||l.has(m)||l.has(h),u=[];for(let[p,m]of e||[]){if(!p||!m)continue;let h=`${p}${Le}${m}`;if(!a.has(h)){a.add(h);for(let g of r(m)){if(g===m||g===p)continue;let b=`${p}${Le}${g}`;i.has(b)||c(p,m,g)&&u.push([p,m,g,b])}}}u.sort((p,m)=>p[0].localeCompare(m[0])||p[2].localeCompare(m[2])||p[1].localeCompare(m[1]));let d=[],f=new Set;for(let[p,m,h,g]of u)if(!f.has(g)){if(d.length>=n)break;f.add(g),d.push({subject:p,object:h,via:m})}return d}function th(e,t,n,{budget:s=50,focus:o=null}={}){let r=An(t),i=new Map,a=new Set;for(let[m,h]of n||[])!m||!h||m===h||(a.add(`${m}${Le}${h}`),a.add(`${h}${Le}${m}`),i.has(m)||i.set(m,new Set),i.get(m).add(h),i.has(h)||i.set(h,new Set),i.get(h).add(m));if(!i.size)return[];let l=new Set,c=o instanceof Set?o.size?o:null:es(o),u=(m,h,g)=>!c||c.has(m)||c.has(h)||c.has(g),d=[];for(let[m,h]of e||[]){if(!m||!h)continue;let g=`${m}${Le}${h}`;if(!l.has(g)){l.add(g);for(let b of[h,...r(h)]){let y=i.get(b);if(y)for(let w of y){if(w===m)continue;let v=`${m}${Le}${w}`;a.has(v)||u(m,h,w)&&d.push([m,h,b,w,v])}}}}d.sort((m,h)=>m[0].localeCompare(h[0])||m[3].localeCompare(h[3])||m[2].localeCompare(h[2])||m[1].localeCompare(h[1]));let f=[],p=new Set;for(let[m,h,g,b,y]of d)if(!p.has(y)){if(f.length>=s)break;p.add(y),f.push({subject:m,object:b,viaType:h,viaClass:g})}return f}function nh(e,t,n,s,{budget:o=50,focus:r=null}={}){let i=An(n),a=new Map;for(let g of s||[]){if(!g||!g.restriction||!g.property||!g.target)continue;let b=`${g.property}${Le}${g.target}`;a.has(b)||a.set(b,new Set),a.get(b).add(g.restriction)}if(!a.size)return[];let l=new Set,c=new Map;for(let[g,b]of t||[])!g||!b||(l.add(`${g}${Le}${b}`),c.has(g)||c.set(g,new Set),c.get(g).add(b));let u=r instanceof Set?r.size?r:null:es(r),d=(g,b,y)=>!u||u.has(g)||u.has(b)||u.has(y),f=new Set,p=[];for(let[g,b,y]of e||[]){if(!g||!b||!y)continue;let w=X(b),v=`${g}${Le}${w}${Le}${y}`;if(f.has(v))continue;f.add(v);let _=c.get(y);if(_)for(let $ of _)for(let x of[$,...i($)]){let E=a.get(`${w}${Le}${x}`);if(E)for(let S of E){if(g===S)continue;let R=`${g}${Le}${S}`;l.has(R)||d(g,y,S)&&p.push([g,b,w,y,$,x,S,R])}}}p.sort((g,b)=>g[0].localeCompare(b[0])||g[6].localeCompare(b[6])||g[1].localeCompare(b[1])||g[3].localeCompare(b[3]));let m=[],h=new Set;for(let[g,b,y,w,v,_,$,x]of p)if(!h.has(x)){if(m.length>=o)break;h.add(x),m.push({subject:g,object:$,viaProperty:b,viaPropertyKey:y,viaValue:w,viaType:v,viaTarget:_})}return m}function mk(e){let t=new Map,n=new Map,s=new Map;for(let r of e||[])if(!(!r||!r.subject||!r.predicate))if(Wo(r.predicate))t.set(r.subject,r.object);else if(lk(r.predicate))s.set(r.subject,r.object);else{let i=fk[String(r.predicate).trim().toLowerCase()];if(!i)continue;let a=Number(r.object);Number.isFinite(a)&&n.set(r.subject,{kind:i,n:a})}let o=[];for(let[r,{kind:i,n:a}]of n){if(t.get(r)!==pk)continue;let l=s.get(r);l&&o.push({restriction:r,kind:i,n:a,onClass:l})}return o.sort((r,i)=>r.restriction.localeCompare(i.restriction)),o}function sh(e,t,{budget:n=50,focus:s=null}={}){let o=An(t),r=new Map;for(let f of e||[]){if(!f||!f.restriction||!f.property||!f.target)continue;let p=X(f.property);r.has(p)||r.set(p,[]),r.get(p).push({restriction:f.restriction,target:f.target})}let i=new Set;for(let[f,p]of t||[])f&&p&&i.add(`${f}${Le}${p}`);let a=s instanceof Set?s.size?s:null:es(s),l=(f,p)=>!a||a.has(f)||a.has(p),c=[];for(let[,f]of r)if(!(f.length<2))for(let p of f)for(let m of f){if(p.restriction===m.restriction||p.target===m.target||!o(p.target).has(m.target))continue;let h=`${p.restriction}${Le}${m.restriction}`;i.has(h)||l(p.restriction,m.restriction)&&c.push([p.restriction,m.restriction,p.target,m.target,h])}c.sort((f,p)=>f[0].localeCompare(p[0])||f[1].localeCompare(p[1]));let u=[],d=new Set;for(let[f,p,m,h,g]of c)if(!d.has(g)){if(u.length>=n)break;d.add(g),u.push({subject:f,object:p,viaY1:m,viaY2:h})}return u}function oh(e,t,n,s,{budget:o=20,focus:r=null}={}){if(!n)return null;let i=An(e),a=r instanceof Set?r.size?r:null:es(r),l=f=>!a||a.has(n)||a.has(f),c=new Map;for(let[f,p]of e||[])!f||!p||(c.has(f)||c.set(f,new Set),c.get(f).add(p));let u=new Map((t||[]).map(f=>[f.restriction,f])),d=0;for(let f of[n,...i(n)]){if(d>=o)break;if(d+=1,!!l(f))for(let p of c.get(f)||[]){let m=u.get(p);if(m&&s(m))return{viaClass:f,viaRestriction:p,record:m}}}return null}function gk(e,t,n,s,o,r={}){if(!s||!Number.isFinite(o))return null;let i=oh(e,t,n,a=>a.onClass===s&&(a.kind==="exactly"||a.kind==="min")&&a.n>=o,r);return i?{subject:n,object:s,m:o,n:i.record.n,kind:i.record.kind,viaClass:i.viaClass,viaRestriction:i.viaRestriction}:null}function wk(e,t,n,s,o={}){if(!s)return null;let r=oh(e,t,n,i=>i.onClass===s&&i.kind==="max"&&i.n===0,o);return r?{subject:n,object:s,viaClass:r.viaClass,viaRestriction:r.viaRestriction}:null}function yk(e,t,n,{budget:s=50,focus:o=null}={}){let r=An(t),i=new Map;for(let[p,m]of n||[])!p||!m||p===m||(i.has(p)||i.set(p,new Set),i.get(p).add(m),i.has(m)||i.set(m,new Set),i.get(m).add(p));if(!i.size)return[];let a=new Map;for(let[p,m]of e||[])!p||!m||(a.has(p)||a.set(p,new Set),a.get(p).add(m));let l=o instanceof Set?o.size?o:null:es(o),c=p=>!l||l.has(p),u=[],d=new Set;for(let[p,m]of a){if(!c(p))continue;let h=[...m].sort();for(let g=0;g<h.length;g+=1)for(let b=g+1;b<h.length;b+=1){let[y,w]=[h[g],h[b]],v=[y,...r(y)],_=[w,...r(w)],$=null;for(let E of v){let S=i.get(E);if(S){for(let R of _)if(S.has(R)){$=[E,R];break}if($)break}}if(!$)continue;let x=`${p}${Le}${y}${Le}${w}`;d.has(x)||(d.add(x),u.push([p,y,w,$[0],$[1]]))}}u.sort((p,m)=>p[0].localeCompare(m[0])||p[1].localeCompare(m[1])||p[2].localeCompare(m[2]));let f=[];for(let[p,m,h,g,b]of u){if(f.length>=s)break;f.push({subject:p,classA:m,classB:h,viaA:g,viaB:b})}return f}async function $k(e,{depth:t=32,budget:n=50,focus:s=null,expandFocus:o=!1,maxEnvironments:r=ta,full:i=!1,store:a}={}){let{loadMemory:l,readFactRows:c,appendFacts:u}=Hm(a,["loadMemory","readFactRows","appendFacts"],"syllogise"),d=typeof a?.loadSyllogiseState=="function"&&typeof a?.saveSyllogiseState=="function",f=await l(e),p=c(f),m=p.filter(j=>Es(j.predicate)).map(j=>[j.subject,j.object]),h=p.filter(j=>eo(j.predicate)).map(j=>[j.subject,j.object]),g=p.filter(j=>Zs(j.predicate)).map(j=>[j.subject,j.object]),b=new Map,y=new Map,w=[];for(let j of p){let le=String(j.predicate||"").trim().toLowerCase();Wo(j.predicate)?b.set(j.subject,j.object):zr(j.predicate)?y.set(j.subject,j.object):kl.has(le)||w.push([j.subject,j.predicate,j.object])}let v=[];for(let[j,le]of b){let Te=y.get(j);Te&&v.push({restriction:j,property:le,target:Te})}let _=es(s),$=o&&_?wl(p,[..._]):_,x=$===null&&d?await a.loadSyllogiseState(e):null,E=new Set(p.map(j=>j.id)),S=Array.isArray(x?.factIds)?x.factIds.filter(j=>!E.has(j)):[],R=x&&Array.isArray(x.factIds)&&!S.length&&!i?"delta":"full",k=R==="delta"?new Set(x.factIds):null,A=R==="delta"?p.filter(j=>!k.has(j.id)):p,M=A.length,T=new Map;for(let j of p)T.set(`${j.subject}${Le}${j.predicate}${Le}${j.object}`,j.trust);let P=(j,le,Te)=>T.get(`${j}${Le}${le}${Le}${Te}`),U=(j,le,Te)=>T.has(`${j}${Le}${le}${Le}${Te}`),Z=j=>j.filter(le=>typeof le=="number"),J=R==="delta"&&!A.length,ne=R==="delta"?A.filter(j=>Es(j.predicate)).map(j=>[j.subject,j.object]):[],D=R==="delta"?ne.length?Zm(m,ne,{depth:t,budget:n,focus:$}):[]:Qm(m,{depth:t,budget:n,focus:$}),z=m.concat(D.map(j=>[j.subject,j.object])),W=$,I=null;if(R==="delta"&&!J){let j=p.concat(D.map(Te=>({subject:Te.subject,predicate:Fe,object:Te.object}))),le=[];for(let Te of A)le.push(Te.subject,Te.object);I=wl(j,le),W=I}let L=j=>!I||I.has(j),C=I?h.filter(([j,le])=>L(j)||L(le)):h,N=new Set;if(I)for(let j of A)Zs(j.predicate)&&(N.add(j.subject),N.add(j.object));let F=I&&N.size?An(z):null,G=I?h.filter(([j,le])=>L(j)||L(le)||F&&[...F(le)].some(Te=>N.has(Te))):h,H=new Set;if(I){for(let j of A)if(Wo(j.predicate)||zr(j.predicate)){let le=b.get(j.subject);le&&H.add(X(le))}}let ae=I?w.filter(([j,le,Te])=>L(j)||L(Te)||H.has(X(le))):w,ce=Math.max(0,n-D.length),K=ce>0&&!J?eh(C,z,{budget:ce,focus:W,presentTypeEdges:h}):[],ee=Math.max(0,n-D.length-K.length),q=ee>0&&!J?th(G,z,g,{budget:ee,focus:W}):[],se=Math.max(0,n-D.length-K.length-q.length),te=se>0&&v.length&&!J?nh(ae,h,z,v,{budget:se,focus:W}):[],xe=Math.max(0,n-D.length-K.length-q.length-te.length),Ae=xe>0&&v.length>1&&!J?sh(v,z,{budget:xe,focus:W}):[],pe=new Map(v.map(j=>[j.restriction,j])),ie=[...D.map(j=>({subject:j.subject,predicate:Fe,object:j.object,provenance:Ym,justification:[[ge(j.subject,Fe,j.via),ge(j.via,Fe,j.object)]]})),...K.map(j=>({subject:j.subject,predicate:Nt,object:j.object,provenance:Jm,justification:[[ge(j.subject,Nt,j.via),ge(j.via,Fe,j.object)]]})),...q.map(j=>{let le=U(j.viaClass,Bo,j.object),[Te,Pn]=le?[j.viaClass,j.object]:[j.object,j.viaClass],wo=Z([P(j.subject,Nt,j.viaType),P(Te,Bo,Pn),...j.viaClass!==j.viaType?[P(j.viaType,Fe,j.viaClass)]:[]]);return{subject:j.subject,predicate:Bo,object:j.object,provenance:$l,justification:[[ge(j.subject,Nt,j.viaType),ge(Te,Bo,Pn),...j.viaClass!==j.viaType?[ge(j.viaType,Fe,j.viaClass)]:[]]],...wo.length?{premiseTrusts:wo,ruleConfidence:vl}:{}}}),...te.map(j=>{let le=Z([P(j.subject,j.viaProperty,j.viaValue),P(j.viaValue,Nt,j.viaType),P(j.object,Rn,j.viaPropertyKey),P(j.object,Tn,j.viaTarget),...j.viaType!==j.viaTarget?[P(j.viaType,Fe,j.viaTarget)]:[]]);return{subject:j.subject,predicate:Nt,object:j.object,provenance:El,justification:[[ge(j.subject,j.viaProperty,j.viaValue),ge(j.viaValue,Nt,j.viaType),ge(j.object,Rn,j.viaPropertyKey),ge(j.object,Tn,j.viaTarget),...j.viaType!==j.viaTarget?[ge(j.viaType,Fe,j.viaTarget)]:[]]],...le.length?{premiseTrusts:le,ruleConfidence:Sl}:{}}}),...Ae.map(j=>{let le=pe.get(j.subject),Te=pe.get(j.object),Pn=Z([le&&P(j.subject,Rn,le.property),P(j.subject,Tn,j.viaY1),Te&&P(j.object,Rn,Te.property),P(j.object,Tn,j.viaY2),P(j.viaY1,Fe,j.viaY2)]);return{subject:j.subject,predicate:Fe,object:j.object,provenance:_l,justification:[[...le?[ge(j.subject,Rn,le.property)]:[],ge(j.subject,Tn,j.viaY1),...Te?[ge(j.object,Rn,Te.property)]:[],ge(j.object,Tn,j.viaY2),ge(j.viaY1,Fe,j.viaY2)]],...Pn.length?{premiseTrusts:Pn,ruleConfidence:Rl}:{}}})],fe=ie.map(j=>({id:ge(j.subject,j.predicate,j.object),subject:j.subject,predicate:j.predicate,object:j.object,environments:j.justification,write:j})),be=ih(p.concat(fe.map(j=>({id:j.id,subject:j.subject,predicate:j.predicate,object:j.object})))),Ie=new Map(p.map(j=>[j.id,j])),ue=j=>Es(j)||eo(j)||Zs(j),V=j=>R!=="delta"||I!==null&&(I.has(j.subject)||I.has(j.object)),oe=p.filter(j=>ue(j.predicate)&&rh(j.provenance)&&Dr(j).length<r&&V(j)).map(j=>({id:j.id,subject:j.subject,predicate:j.predicate,object:j.object,environments:Dr(j),provenance:j.provenance})),Ze=[...fe,...oe].sort((j,le)=>j.subject.localeCompare(le.subject)||j.predicate.localeCompare(le.predicate)||j.object.localeCompare(le.object)),De=0,Ve=!1,nn=0;for(let j of Ze){if(nn>=n){Ve=!0;break}nn+=1;let le=be(j,{maxEnvironments:r+1}),{kept:Te,truncated:Pn}=xk(j.environments,le,r);if(Pn&&(Ve=!0),!(Te.length<=j.environments.length)){if(De+=Te.length-j.environments.length,j.write){j.write.justification=Te;continue}ie.push({subject:j.subject,predicate:j.predicate,object:j.object,justification:Te,...ah(j.provenance,Te,wo=>Ie.get(wo)?.trust)||{}})}}let{ids:sn}=await u(e,ie),Yt=[],Ft=0;for(let j of D)Yt.push({id:sn[Ft],subject:j.subject,object:j.object,via:j.via,rule:Km}),Ft+=1;for(let j of K)Yt.push({id:sn[Ft],subject:j.subject,object:j.object,via:j.via,rule:Xm}),Ft+=1;for(let j of q)Yt.push({id:sn[Ft],subject:j.subject,object:j.object,via:j.viaClass,rule:yl}),Ft+=1;for(let j of te)Yt.push({id:sn[Ft],subject:j.subject,object:j.object,via:j.viaValue,rule:xl}),Ft+=1;for(let j of Ae)Yt.push({id:sn[Ft],subject:j.subject,object:j.object,via:j.viaY1,rule:jl}),Ft+=1;let di=Yt.length>=n;if($===null&&d&&!di){let j=new Set(E);for(let le of sn)j.add(le);await a.saveSyllogiseState(e,{version:1,factIds:[...j].sort(),completedAt:new Date().toISOString()})}return{derived:Yt,count:Yt.length,budget:n,depth:t,truncated:di,mode:R,deltaSize:M,environmentsAdded:De,alternatesTruncated:Ve}}function rh(e){let t=String(e||"").split(" | ").filter(Boolean);return t.length>0&&t.every(n=>n.startsWith("entailed:"))}function vk(e){let t=[],n=new Map,s=new Map,o=new Map,r=new Map,i=new Map;for(let u of e){let d=String(u.predicate||"").trim().toLowerCase();Es(u.predicate)?t.push([u.subject,u.object]):eo(u.predicate)?(n.has(u.subject)||n.set(u.subject,new Set),n.get(u.subject).add(u.object)):Zs(u.predicate)?(s.has(u.subject)||s.set(u.subject,new Set),s.get(u.subject).add(u.object),s.has(u.object)||s.set(u.object,new Set),s.get(u.object).add(u.subject)):Wo(u.predicate)?o.set(u.subject,u.object):zr(u.predicate)?r.set(u.subject,u.object):kl.has(d)||(i.has(u.subject)||i.set(u.subject,[]),i.get(u.subject).push([X(u.predicate),u.object]))}let a=An(t),l=(u,d)=>u!==d&&a(u).has(d),c=u=>{let d=o.get(u),f=r.get(u);return d&&f?{property:X(d),target:f}:null};return u=>{if(Es(u.predicate)){if(l(u.subject,u.object))return!0;let d=c(u.subject),f=c(u.object);return!!(d&&f&&d.property===f.property&&l(d.target,f.target))}if(eo(u.predicate)){for(let f of n.get(u.subject)||[])if(l(f,u.object))return!0;let d=c(u.object);if(d){for(let[f,p]of i.get(u.subject)||[])if(f===d.property){for(let m of n.get(p)||[])if(m===d.target||l(m,d.target))return!0}}return!1}if(Zs(u.predicate)){for(let d of n.get(u.subject)||[])for(let f of[d,...a(d)])if(s.get(f)?.has(u.object))return!0;return!1}return!0}}function ih(e){let t=new Set,n=[],s=new Map,o=new Map,r=new Set,i=new Map,a=new Map,l=new Map,c=new Map;for(let p of e){if(!p||!p.subject||!p.predicate||!p.object)continue;p.id&&t.add(p.id);let m=String(p.predicate||"").trim().toLowerCase();Es(p.predicate)?(n.push([p.subject,p.object]),s.has(p.subject)||s.set(p.subject,new Set),s.get(p.subject).add(p.object)):eo(p.predicate)?(o.has(p.subject)||o.set(p.subject,new Set),o.get(p.subject).add(p.object)):Zs(p.predicate)?(r.add(`${p.subject}${Le}${p.object}`),i.has(p.subject)||i.set(p.subject,new Set),i.get(p.subject).add(p.object),i.has(p.object)||i.set(p.object,new Set),i.get(p.object).add(p.subject)):Wo(p.predicate)?a.set(p.subject,p.object):zr(p.predicate)?l.set(p.subject,p.object):kl.has(m)||(c.has(p.subject)||c.set(p.subject,[]),c.get(p.subject).push([p.predicate,p.object]))}let u=An(n),d=p=>s.get(p)||new Set,f=p=>{let m=a.get(p),h=l.get(p);return m&&h?{property:m,propertyKey:X(m),target:h}:null};return(p,{maxEnvironments:m=ta}={})=>{let h=[],g=new Set,b=y=>{if(h.length>=m||p.id&&y.includes(p.id)||!y.every(v=>t.has(v)))return;let w=[...y].sort().join(" ");g.has(w)||(g.add(w),h.push(y))};if(Es(p.predicate)){for(let y of[...d(p.subject)].sort()){if(h.length>=m)break;y===p.subject||y===p.object||d(y).has(p.object)&&b([ge(p.subject,Fe,y),ge(y,Fe,p.object)])}if(h.length<m){let y=f(p.subject),w=f(p.object);y&&w&&y.propertyKey===w.propertyKey&&y.target!==w.target&&d(y.target).has(w.target)&&b([ge(p.subject,Rn,y.property),ge(p.subject,Tn,y.target),ge(p.object,Rn,w.property),ge(p.object,Tn,w.target),ge(y.target,Fe,w.target)])}return h}if(eo(p.predicate)){for(let w of[...o.get(p.subject)||[]].sort()){if(h.length>=m)break;w!==p.object&&d(w).has(p.object)&&b([ge(p.subject,Nt,w),ge(w,Fe,p.object)])}let y=f(p.object);if(y){let w=[...c.get(p.subject)||[]].filter(([v])=>X(v)===y.propertyKey).sort((v,_)=>v[0].localeCompare(_[0])||v[1].localeCompare(_[1]));for(let[v,_]of w){if(h.length>=m)break;for(let $ of[...o.get(_)||[]].sort()){if(h.length>=m)break;$!==y.target&&!d($).has(y.target)||b([ge(p.subject,v,_),ge(_,Nt,$),ge(p.object,Rn,y.propertyKey),ge(p.object,Tn,y.target),...$!==y.target?[ge($,Fe,y.target)]:[]])}}}return h}if(Zs(p.predicate)){let y=[];for(let w of o.get(p.subject)||[])for(let v of[w,...u(w)])(i.get(v)||new Set).has(p.object)&&y.push([w,v]);y.sort((w,v)=>w[0].localeCompare(v[0])||w[1].localeCompare(v[1]));for(let[w,v]of y){if(h.length>=m)break;let _=r.has(`${v}${Le}${p.object}`),[$,x]=_?[v,p.object]:[p.object,v];b([ge(p.subject,Nt,w),ge($,Bo,x),...v!==w?[ge(w,Fe,v)]:[]])}return h}return h}}function xk(e,t,n){let s=[],o=new Set,r=!1;for(let i of[...e||[],...t||[]]){if(!Array.isArray(i)||!i.length)continue;let a=[...i].sort().join(" ");if(!o.has(a)){if(s.length>=n){r=!0;continue}o.add(a),s.push(i)}}return{kept:s,truncated:r}}function ah(e,t,n){let s;for(let i of String(e||"").split(" | ")){let a=Ek.get(i);if(a!==void 0){s=a;break}}if(s===void 0)return null;let o=null,r=-1;for(let i of t||[]){let a=i.map(c=>n(c)).filter(c=>typeof c=="number");if(a.length!==i.length)continue;let l=Math.min(...a);l>r&&(r=l,o=a)}return o?{premiseTrusts:o,ruleConfidence:s}:null}async function Sk(e,t,n,{budget:s=50,depth:o=32,maxEnvironments:r=ta,store:i}={}){let{loadMemory:a,readFactRows:l,removeFacts:c}=Hm(i,["loadMemory","readFactRows","removeFacts"],"retractSubClassOf"),u=typeof i?.appendFacts=="function"?i.appendFacts:null,d=X(t),f=X(n),p=ge(d,Fe,f),m=await a(e),h=l(m),g=new Map(h.map(R=>[R.id,R]));if(!g.has(p))return{retracted:[],count:0,budget:s,depth:o,truncated:!1,found:!1};let b=h.filter(R=>Dr(R).length&&rh(R.provenance)),y=new Map;for(let R of b)for(let k of Dr(R))for(let A of k)y.has(A)||y.set(A,new Set),y.get(A).add(R.id);let w=new Set([p]),v=[p],_=new Map,$=!1,x=0,E=[p];for(;x<o;x+=1){let R=new Set;for(let J of E)for(let ne of y.get(J)||[])w.has(ne)||R.add(ne);let k=[...R].map(J=>g.get(J)).sort((J,ne)=>J.subject.localeCompare(ne.subject)||J.predicate.localeCompare(ne.predicate)||J.object.localeCompare(ne.object));if(!k.length)break;let A=h.filter(J=>!w.has(J.id)&&!R.has(J.id)),M=new Set(A.map(J=>J.id)),T=ih(A),P=vk(A),U=!1,Z=!1;E=[];for(let J of k){if(w.size>=s){Z=!0;break}let ne=Dr(J),D=ne.filter(W=>W.every(I=>M.has(I)));if(D.length){D.length!==ne.length&&_.set(J.id,D);continue}let z=T(J,{maxEnvironments:r});if(z.length){_.set(J.id,z);continue}P(J)||(w.add(J.id),v.push(J.id),E.push(J.id),U=!0)}if(Z){$=!0;break}if(!U)break}!$&&x>=o&&($=b.some(R=>!w.has(R.id)&&R.justification.some(k=>w.has(k))));let{removed:S}=await c(e,v);if(u){let R=[..._.entries()].filter(([k])=>!w.has(k)).sort((k,A)=>k[0].localeCompare(A[0])).map(([k,A])=>{let M=g.get(k);return{subject:M.subject,predicate:M.predicate,object:M.object,justification:A,...ah(M.provenance,A,T=>g.get(T)?.trust)||{}}});R.length&&await u(e,R)}return{retracted:S,count:S.length,budget:s,depth:o,truncated:$,found:!0}}function Tl(e,t,n,s,{maxHops:o=6}={}){let r=t instanceof Set?t:new Set(t||[]),i=new Map;for(let[c,u]of s||[])!c||!u||c===u||(i.has(c)||i.set(c,new Set),i.get(c).add(u));let a=[];for(let[c,u]of n||[])c===e&&u&&a.push({node:u,path:[{subject:c,predicate:Nt,object:u}]});for(let c of i.get(e)||[])a.push({node:c,path:[{subject:e,predicate:Fe,object:c}]});let l=new Set([e]);for(let c=1;c<=o&&a.length;c+=1){for(let{node:d,path:f}of a)if(r.has(d))return f;if(c===o)break;let u=[];for(let{node:d,path:f}of a)if(!l.has(d)){l.add(d);for(let p of i.get(d)||[])l.has(p)||u.push({node:p,path:[...f,{subject:d,predicate:Fe,object:p}]})}a=u}return null}var Fe,Km,Ym,Nt,Xm,Jm,Bo,yl,$l,vl,Rn,Tn,xl,El,Sl,ta,Le,Es,eo,Zs,Wo,zr,lk,kl,pk,fk,jl,_l,Rl,hk,bk,Dr,Ek,Vt=O(()=>{qt();Fe="rdfs:subClassOf",Km="subClassOf",Ym=`entailed:${Km}`,Nt="rdf:type",Xm="type",Jm=`entailed:${Xm}`,Bo="owl:disjointWith",yl="disjointWith",$l=`entailed:${yl}`,vl=.95,Rn="owl:onProperty",Tn="owl:someValuesFrom",xl="someValuesFrom",El=`entailed:${xl}`,Sl=.95,ta=4,Le="\u241F",Es=e=>String(e||"").trim().toLowerCase()==="rdfs:subclassof",eo=e=>String(e||"").trim().toLowerCase()==="rdf:type",Zs=e=>String(e||"").trim().toLowerCase()==="owl:disjointwith",Wo=e=>String(e||"").trim().toLowerCase()==="owl:onproperty",zr=e=>String(e||"").trim().toLowerCase()==="owl:somevaluesfrom",lk=e=>String(e||"").trim().toLowerCase()==="owl:onclass",kl=new Set(["rdfs:subclassof","rdf:type","owl:disjointwith","owl:onproperty","owl:somevaluesfrom","owl:intersectionof"]);pk="has",fk={"owl:cardinality":"exactly","owl:mincardinality":"min","owl:maxcardinality":"max"};jl="someValuesFromSubsumption",_l=`entailed:${jl}`,Rl=.95;hk=.95;bk=.95;Dr=e=>e.environments||(Array.isArray(e.justification)&&e.justification.length?[e.justification]:[]);Ek=new Map([[$l,vl],[El,Sl],[_l,Rl]])});function Ho(e){let t=String(e||""),n=ch.get(t);return n||(t.startsWith(Al)?Go+t.slice(Al.length):t)}function lh(e){let t=String(e||""),n=kk.get(t);return n||(t.startsWith(Go)?Al+t.slice(Go.length):null)}function ph(e,t,n,s,o){let r=null;for(let i of e){if(i===t)return[];let a=Tl(i,new Set([t]),n,s,{maxHops:o});a&&(!r||a.length<r.length)&&(r=a)}return r}function oa(e,t,n,{maxHops:s=3}={}){let o=Vo(e),r=Vo(t),i=Array.isArray(n)?n:[],{typeEdges:a,subClassEdges:l}=dh(i),c=i.filter(b=>(b.predicate===sa||b.predicate===qo)&&r.has(b.object)),u=[];for(let b of c){let y=b.predicate===qo?"negative":"positive";if(o.has(b.subject)){u.push({fact:b,polarity:y,hops:0,chain:null});continue}let w=ph(o,b.subject,a,l,s);w&&w.length&&u.push({fact:b,polarity:y,hops:w.length,chain:w})}if(!u.length)return{verdict:"none",hops:0,positive:[],negative:[],chain:null,overrides:null,baseRate:Cl(o,r,i,{maxHops:s})};u.sort((b,y)=>b.hops-y.hops||(y.fact.trust||0)-(b.fact.trust||0));let d=u[0].hops,f=u.filter(b=>b.hops===d),p=f.filter(b=>b.polarity==="positive").map(b=>b.fact),m=f.filter(b=>b.polarity==="negative").map(b=>b.fact),h=m.length&&!p.length?"negative":"positive",g=u.find(b=>b.hops>d&&b.polarity!==h)||null;return{verdict:p.length&&m.length?"both":m.length?"no":"yes",hops:d,positive:p,negative:m,chain:u[0].chain,overrides:g?{fact:g.fact,chain:g.chain}:null,baseRate:null}}function Cl(e,t,n,{maxHops:s=3}={}){let o=Vo(e),r=Vo(t),i=Array.isArray(n)?n:[],a=i.filter(h=>h.predicate===Fe||h.predicate===Nt),l=a.filter(h=>o.has(h.subject)).map(h=>h.object);if(!l.length)return null;let c=l[0],u=[...new Set(a.filter(h=>h.object===c&&!o.has(h.subject)).map(h=>h.subject))],d=h=>{let g=i.find(b=>b.subject===h&&r.has(b.object)&&(b.predicate===sa||b.predicate===qo));return g?{name:h,polarity:g.predicate===qo?"negative":"positive",fact:g}:{name:h,polarity:"unknown",fact:null}},f=u.map(d),{typeEdges:p,subClassEdges:m}=dh(i);return{klass:c,kinds:u.length,positive:f.filter(h=>h.polarity==="positive"),negative:f.filter(h=>h.polarity==="negative"),unknown:f.filter(h=>h.polarity==="unknown"),chain:ph(o,c,p,m,s)}}function Ol(e,t,{exclude:n=[],maxHops:s=3}={}){let o=Vo(e),r=Vo(n),i=Array.isArray(t)?t:[],a=new Set,l=[];for(let c of i)c.predicate!==sa||!o.has(c.object)||r.has(c.subject)||a.has(c.subject)||(a.add(c.subject),oa(new Set([c.subject]),o,i,{maxHops:s}).verdict==="yes"&&l.push(c));return l.sort(jk)}var Go,Al,na,ch,kk,uh,sa,qo,Il,jk,Vo,dh,ra=O(()=>{Vt();Go="mgxneg:",Al="mgx:",na="mgxneg:subClassOf",ch=new Map([[Fe,na]]),kk=new Map([...ch].map(([e,t])=>[t,e]));uh=e=>String(e||"").startsWith(Go),sa="mgx:capableOf",qo=Ho(sa),Il=6,jk=(e,t)=>(t.trust||0)-(e.trust||0)||String(e.subject).localeCompare(String(t.subject)),Vo=e=>e instanceof Set?e:new Set(Array.isArray(e)?e:[e]),dh=e=>({typeEdges:e.filter(t=>t.predicate===Nt).map(t=>[t.subject,t.object]),subClassEdges:e.filter(t=>t.predicate===Fe).map(t=>[t.subject,t.object])})});function ia(e){let t=String(e||"");return Ml.has(t)?Ll:Rk.has(t)||Tk.test(t)?Ur:Ak.has(t)?fh:Nl}function Ik(e){let t=e?.observedAt;if(t&&Number.isFinite(Date.parse(t)))return String(t);if(gp.has(e?.sourceType)){for(let n of[e?.assertedAt,e?.createdAt])if(n&&Number.isFinite(Date.parse(n)))return String(n)}}function Ck(e,t){let n=null;for(let s of e?.assertions||[]){let o=Date.parse(Ik(s)??"");Number.isFinite(o)&&(n===null||(t?o<n:o>n))&&(n=o)}return n}function Pl(e,t){let n=t===fh;if(!n&&t!==Ur)return null;let s=(e||[]).map(r=>({row:r,at:Ck(r,n)}));s.sort((r,i)=>{if(r.at!==i.at)return r.at===null?1:i.at===null?-1:n?r.at-i.at:i.at-r.at;let a=(i.row.trust||0)-(r.row.trust||0);if(a)return a;let[l,c]=[String(r.row.object),String(i.row.object)];return l<c?-1:l>c?1:0});let o=s.map(r=>r.row);return{winner:o[0]||null,ranked:o,contested:s.length>1&&s[0].at===s[1].at}}var Ll,Ur,fh,Nl,_k,Ml,Rk,Tk,Ak,mh=O(()=>{ra();fs();Ll="merge",Ur="latest-observation-wins",fh="first-claim-wins",Nl="contradiction",_k=["mgx:hasA","mgx:capableOf","rdfs:subClassOf","rdf:type","owl:disjointWith","mgx:partOf","mgx:usedFor","mgx:receivesAction","mgx:causes","mgx:causesDesire","mgx:hasSubevent","mgx:hasPrerequisite","mgx:motivatedByGoal","mgx:obstructedBy","mgx:desires","mgx:hasProperty","mgx:madeOf","mgx:atLocation","mgx:locatedNear","mgx:createdBy","mgx:mannerOf","mgx:relatedTo","mgx:synonym","mgx:antonym","mgx:similarTo","mgx:symbolOf","mgx:knows-about"],Ml=new Set(_k.flatMap(e=>[e,Ho(e)])),Rk=new Set(["mgx:currently-in","mgx:located-in","mgx:fixed-in","mgx:stands-locked-in","mgx:hidden-in","mgx:on-top-of","mgx:on-plane","mgx:under","mgx:is-open","mgx:hasMass","mgx:feels","mgx:faces","mgx:pose","mgx:display-name","mgx:nodeName","mgx:worldName"]),Tk=/^mgx:has-exit-([a-z]+)$/,Ak=new Set(["mgx:playedBy"])});function Gr(e){let t=String(e||""),n=t.indexOf(aa);return n<0?"":t.slice(n+aa.length)}function Pk(e){let t=1,n=0;for(let s of e)t*=1-Nk(s),n+=1;return n?Mk(Math.min(1,1-t)):0}function yh(e,t,n){let s=Date.parse(e),o=Date.parse(t);return Number.isFinite(s)?Number.isFinite(o)?n(s,o)===s?String(e):String(t):String(e):Number.isFinite(o)?String(t):""}function xh(e,t){let n=Date.parse(e.assertedAt),s=Date.parse(t.assertedAt),o=Number.isFinite(n)?n:-1/0,r=Number.isFinite(s)?s:-1/0;return o!==r?r-o:e.id<t.id?-1:e.id>t.id?1:0}function Eh(e,t="",n=""){let s=t,o=n;for(let r of e)s=$h(s,r.assertedAt),o=vh(o,r.assertedAt);return{earliest:s,latest:o}}function Ul({id:e,sourceKey:t,template:n,idsProp:s,ids:o,earliest:r,latest:i,priorFor:a}){let l=[...new Set(o)].filter(Boolean).sort(),c=a?Pk(l.map(u=>a(u))):void 0;return{id:e,label:n?.label||"",class:Ok,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"rdf:Statement"},{prop:"rdf:subject",key:"subject",value:n?.subject||""},{prop:"rdf:predicate",key:"predicate",value:n?.predicate||""},{prop:"rdf:object",key:"object",value:n?.object||""},{prop:"mgx:createdAt",key:"createdAt",value:r},{prop:"mgx:sourceId",key:"sourceId",value:t},{prop:s,key:s===Ko?"rollupSourceIds":"rollupRecordIds",value:l.join(" ")},{prop:Wr,key:"rollupCount",value:String(l.length)},{prop:In,key:"rollupEarliest",value:r},{prop:Cn,key:"rollupLatest",value:i},...c===void 0?[]:[{prop:Yo,key:"rollupPrior",value:String(c)}]]}}function Sh({groupId:e,sourceType:t,heads:n=[],existing:s=null,priorFor:o}){if(!e||!t||n.length<64||n.length<=8)return null;let i=n.slice().sort(xh).slice(8);if(!i.length)return null;let{earliest:a,latest:l}=Eh(i,Et(s,In),Et(s,Cn));return{rollup:Ul({id:Fl(e,t),sourceKey:`rollup:${t}`,template:Bl(i[0].record||s),idsProp:Ko,ids:[...ua(s),...i.map(u=>u.sourceId)],earliest:a,latest:l,priorFor:o}),absorbed:i.map(u=>u.id),absorbedSourceIds:i.map(u=>u.sourceId)}}function kh({groupId:e,sourceId:t,leaves:n=[],existing:s=null}){if(!e||!t||n.length<8||n.length<=2)return null;let o=n.slice().sort(xh),r=o.slice(0,2),i=o.slice(2);if(!i.length)return null;let{earliest:a,latest:l}=Eh(i,Et(s,In),Et(s,Cn));return{rollup:Ul({id:Dl(e,t),sourceKey:t,template:Bl(i[0].record||s),idsProp:Br,ids:[...Lk(s),...i.map(u=>u.id)],earliest:a,latest:l}),absorbed:i.map(u=>u.id),rewire:r[r.length-1]?.id||""}}function Wl(e,t,{priorFor:n}={}){let s=e?.id||t?.id,o=Ss(s),r=o?Ko:Br,i=a=>zl(Et(a,r));return Ul({id:s,sourceKey:Et(e,"mgx:sourceId")||Et(t,"mgx:sourceId"),template:Bl(Et(e,"rdf:subject")?e:t),idsProp:r,ids:[...i(e),...i(t)],earliest:$h(Et(e,In),Et(t,In)),latest:vh(Et(e,Cn),Et(t,Cn)),priorFor:o?n:void 0})}function jh(e,t){if(!t)return!1;for(let n of e||[])if(ua(n).includes(t))return!0;return!1}var Ok,hh,gh,ca,bh,Ko,Br,Wr,In,Cn,Yo,aa,wh,Fl,Dl,Ss,Xo,la,Et,zl,ua,Lk,Nk,Mk,$h,vh,Bl,Gl=O(()=>{Ok="Fact",hh=64,gh=8,ca=8,bh=2,Ko="mgx:rollupSourceIds",Br="mgx:rollupRecordIds",Wr="mgx:rollupCount",In="mgx:rollupEarliest",Cn="mgx:rollupLatest",Yo="mgx:rollupPrior",aa="@rollup:",wh="#rollup",Fl=(e,t)=>`${e}${aa}${t}`,Dl=(e,t)=>`${e}@${t}${wh}`,Ss=e=>String(e||"").includes(aa),Xo=e=>String(e||"").endsWith(wh),la=e=>Ss(e)||Xo(e);Et=(e,t)=>(e?.attributes||[]).find(n=>n?.prop===t)?.value||"",zl=e=>String(e||"").split(" ").filter(Boolean),ua=e=>zl(Et(e,Ko)),Lk=e=>zl(Et(e,Br)),Nk=e=>Math.max(0,Math.min(1,Number(e)||0)),Mk=e=>Number(e.toFixed(6));$h=(e,t)=>yh(e,t,Math.min),vh=(e,t)=>yh(e,t,Math.max);Bl=e=>({label:e?.label||"",subject:Et(e,"rdf:subject"),predicate:Et(e,"rdf:predicate"),object:Et(e,"rdf:object")})});function ts(e,t){let n=(e?.attributes||[]).find(s=>s?.prop===t);return n?String(n.value??""):void 0}function Wk(e,t){(!e?.class||!Fk.has(e.class))&&t.push(`must have a class from the closed vocabulary Utterance | Fact | Session | Source | Rule (got ${JSON.stringify(e?.class)})`)}function Gk(e,t){for(let i of["rdf:subject","rdf:predicate","rdf:object"])qr(ts(e,i))||t.push(`a Fact needs a non-empty ${i}`);for(let i of["rdf:subject","rdf:object"]){let a=ts(e,i);a!==void 0&&zk.test(a)&&t.push(`a Fact's ${i} must be a single term, not text spanning a sentence boundary (got ${JSON.stringify(a)})`)}let n=ts(e,"mgx:factProvenance");n!==void 0&&!qr(n)&&t.push("mgx:factProvenance, when present, must be non-empty");let s=typeof e?.id=="string"?e.id:"";Uk(s)&&!Rh.test(s)&&t.push(`a Fact record id must read <groupId>@<sourceId>, optionally suffixed #v<n> once superseded (got ${JSON.stringify(s)})`);let o=ts(e,"mgx:sourceId");o!==void 0&&!qr(o)&&t.push("mgx:sourceId, when present, must be non-empty (every assertion record has a key, src:none included)");let r=ts(e,"mgx:observedAt");r!==void 0&&!Number.isFinite(Date.parse(r))&&t.push(`mgx:observedAt, when present, must be a parseable instant (got ${JSON.stringify(r)})`);for(let i of Bk){let a=ts(e,i);if(a===void 0)continue;let l=a.split(" ").filter(Boolean);l.length||t.push(`${i}, when present, must name at least one record id`);for(let c of l)Rh.test(c)||t.push(`${i} must name Fact record ids (got ${JSON.stringify(c)})`)}}function qk(e,t){qr(ts(e,"mgx:ruleName"))||t.push("a Rule needs a non-empty mgx:ruleName");let n=ts(e,"mgx:ruleKind");if(!n||!_h.has(n)){t.push(`a Rule's mgx:ruleKind must be one of ${[..._h].join(" | ")} (got ${JSON.stringify(n)})`);return}for(let s of Dk[n])qr(ts(e,s))||t.push(`a ${n} Rule needs a non-empty ${s}`)}function Vk(e){let t=[];return Wk(e,t),e?.class==="Fact"&&Gk(e,t),e?.class==="Rule"&&qk(e,t),{ok:t.length===0,violations:t}}function ql(e){let t=Vk(e);if(!t.ok){let n=new Error(`SHACL validation failed for ${e?.class} "${e?.id}": ${t.violations.join(" | ")}`);throw n.violations=t.violations,n}}var Fk,_h,Dk,zk,Rh,Uk,Bk,qr,Th=O(()=>{Fk=new Set(["Utterance","Fact","Session","Source","Rule"]),_h=new Set(["compose2","filter","recursive","action-signature","action-precond","action-effect","action-constraint"]),Dk={compose2:["mgx:ruleBase1","mgx:ruleBase2"],filter:["mgx:ruleBase1","mgx:ruleFilterProperty"],recursive:["mgx:ruleBaseCase","mgx:ruleRecStep"],"action-signature":["mgx:ruleActionSubjectClass","mgx:ruleActionTargetClass"],"action-precond":["mgx:ruleActionPrecondShape","mgx:ruleActionPrecondPredicate","mgx:ruleActionPrecondRole","mgx:ruleActionPrecondScope"],"action-effect":["mgx:ruleActionEffectPredicate","mgx:ruleActionEffectSubject"],"action-constraint":["mgx:ruleActionConstraintLeft","mgx:ruleActionConstraintRight","mgx:ruleActionConstraintGuard"]},zk=/[.!?]\s+\w/,Rh=/^[^@]+@(.+?)(#v[1-9][0-9]*)?$/,Uk=e=>e.includes("@")||/#v\d/.test(e),Bk=["mgx:supersedes","mgx:supersededBy"];qr=e=>typeof e=="string"&&e.trim().length>0});var Ah={};Fn(Ah,{access:()=>Yk,appendFile:()=>Qk,basename:()=>mj,copyFile:()=>rj,createInterface:()=>yj,createReadStream:()=>aj,createRequire:()=>Hk,createWriteStream:()=>cj,default:()=>vj,dirname:()=>dj,existsSync:()=>lj,fileURLToPath:()=>gj,isAbsolute:()=>fj,join:()=>uj,mkdir:()=>Zk,mkdtemp:()=>ej,randomBytes:()=>bj,readFile:()=>Xk,readFileSync:()=>Kk,readdir:()=>ij,rename:()=>tj,resolve:()=>pj,rm:()=>sj,sep:()=>hj,spawnSync:()=>wj,stat:()=>oj,tmpdir:()=>$j,unlink:()=>nj,writeFile:()=>Jk});var dt,Hk,Kk,Yk,Xk,Jk,Qk,Zk,ej,tj,nj,sj,oj,rj,ij,aj,cj,lj,uj,dj,pj,fj,mj,hj,gj,bj,wj,yj,$j,vj,Ih=O(()=>{dt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},Hk=dt("createRequire"),Kk=dt("readFileSync"),Yk=dt("access"),Xk=dt("readFile"),Jk=dt("writeFile"),Qk=dt("appendFile"),Zk=dt("mkdir"),ej=dt("mkdtemp"),tj=dt("rename"),nj=dt("unlink"),sj=dt("rm"),oj=dt("stat"),rj=dt("copyFile"),ij=dt("readdir"),aj=dt("createReadStream"),cj=dt("createWriteStream"),lj=()=>!1,uj=(...e)=>e.join("/"),dj=e=>String(e).replace(/\/[^/]*$/,""),pj=(...e)=>e.join("/"),fj=e=>String(e).startsWith("/"),mj=e=>String(e).split("/").pop(),hj="/",gj=e=>String(e),bj=dt("randomBytes"),wj=dt("spawnSync"),yj=dt("createInterface"),$j=()=>"/tmp",vj={}});var xj,Vr,Vl=O(()=>{xj=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i,Vr=class e extends Date{#t=!1;#n=!1;#e=null;constructor(t){let n=!0,s=!0,o="Z";if(typeof t=="string"){let r=t.match(xj);r?(r[1]||(n=!1,t=`0000-01-01T${t}`),s=!!r[2],s&&t[10]===" "&&(t=t.replace(" ","T")),r[2]&&+r[2]>23?t="":(o=r[3]||null,t=t.toUpperCase(),!o&&s&&(t+="Z"))):t=""}super(t),isNaN(this.getTime())||(this.#t=n,this.#n=s,this.#e=o)}isDateTime(){return this.#t&&this.#n}isLocal(){return!this.#t||!this.#n||!this.#e}isDate(){return this.#t&&!this.#n}isTime(){return this.#n&&!this.#t}isValid(){return this.#t||this.#n}toISOString(){let t=super.toISOString();if(this.isDate())return t.slice(0,10);if(this.isTime())return t.slice(11,23);if(this.#e===null)return t.slice(0,-1);if(this.#e==="Z")return t;let n=+this.#e.slice(1,3)*60+ +this.#e.slice(4,6);return n=this.#e[0]==="-"?n:-n,new Date(this.getTime()-n*6e4).toISOString().slice(0,-1)+this.#e}static wrapAsOffsetDateTime(t,n="Z"){let s=new e(t);return s.#e=n,s}static wrapAsLocalDateTime(t){let n=new e(t);return n.#e=null,n}static wrapAsLocalDate(t){let n=new e(t);return n.#n=!1,n.#e=null,n}static wrapAsLocalTime(t){let n=new e(t);return n.#t=!1,n.#e=null,n}}});function Ej(e,t){let n=e.slice(0,t).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function Sj(e,t,n){let s=e.split(/\r\n|\n|\r/g),o="",r=(Math.log10(t+1)|0)+1;for(let i=t-1;i<=t+1;i++){let a=s[i-1];a&&(o+=i.toString().padEnd(r," "),o+=": ",o+=a,o+=`
86
86
  `,i===t&&(o+=" ".repeat(r+n+2),o+=`^
87
- `))}return o}var he,Qs=I(()=>{he=class extends Error{line;column;codeblock;constructor(t,n){let[s,o]=lj(n.toml,n.ptr),r=uj(n.toml,s,o);super(`Invalid TOML document: ${t}
87
+ `))}return o}var he,to=O(()=>{he=class extends Error{line;column;codeblock;constructor(t,n){let[s,o]=Ej(n.toml,n.ptr),r=Sj(n.toml,s,o);super(`Invalid TOML document: ${t}
88
88
 
89
- ${r}`,n),this.line=s,this.column=o,this.codeblock=r}}});function ia(e,t){let n=e[t++],s=n,o=n==="'",r=n===e[t]&&n===e[t+1];r&&(e[t+=2]===`
89
+ ${r}`,n),this.line=s,this.column=o,this.codeblock=r}}});function da(e,t){let n=e[t++],s=n,o=n==="'",r=n===e[t]&&n===e[t+1];r&&(e[t+=2]===`
90
90
  `?t++:e[t]==="\r"&&e[t+1]===`
91
91
  `&&(t+=2));let i="",a=t,l=0;for(let c=t;c<e.length;c++)if(n=e[c],r&&(n===`
92
92
  `||n==="\r"&&e[c+1]===`
93
93
  `))l=l&&3;else{if(n<" "&&n!==" "||n==="\x7F")throw new he("control characters are not allowed in strings",{toml:e,ptr:c});if((!l||l===3)&&n===s&&(!r||e[c+1]===s&&e[c+2]===s))return r&&(e[c+3]===s&&c++,e[c+3]===s&&c++),[l?i:i+e.slice(a,c),c+(r?3:1)];if(!l)!o&&n==="\\"&&(i+=e.slice(a,a=c),l=1);else if(l===1)if(n==="x"||n==="u"||n==="U"){let u=0,d=n==="x"?2:n==="u"?4:8;for(let f=0;f<d;f++,c++){let p=e.charCodeAt(c+1),m=p>=48&&p<=57?p-48:p>=65&&p<=70?p-65+10:p>=97&&p<=102?p-97+10:-1;if(m<0)throw new he("invalid non-hex character in unicode escape",{toml:e,ptr:c+1});u=u<<4|m}if(u<0||u>1114111||u>=55296&&u<=57343)throw new he("invalid unicode escape",{toml:e,ptr:c});i+=String.fromCodePoint(u),a=c+1,l=0}else if(n===" "||n===" ")l=2;else{if(n==="b")i+="\b";else if(n==="t")i+=" ";else if(n==="n")i+=`
94
- `;else if(n==="f")i+="\f";else if(n==="r")i+="\r";else if(n==="e")i+="\x1B";else if(n==='"')i+='"';else if(n==="\\")i+="\\";else throw new he("unrecognized escape sequence",{toml:e,ptr:c});a=c+1,l=0}else if(n!==" "&&n!==" "){if(l===2)throw new he("invalid escape: only line-ending whitespace may be escaped",{toml:e,ptr:a});l=!o&&n==="\\"?1:0,a=c}}throw new he("unfinished string",{toml:e,ptr:t})}function Sh(e,t,n,s){if(e==="true")return!0;if(e==="false")return!1;if(e==="-inf")return-1/0;if(e==="inf"||e==="+inf")return 1/0;if(e==="nan"||e==="+nan"||e==="-nan")return NaN;if(e==="-0")return s?0n:0;let o=dj.test(e);if(o||pj.test(e)){if(fj.test(e))throw new he("leading zeroes are not allowed",{toml:t,ptr:n});e=e.replace(/_/g,"");let i=+e;if(isNaN(i))throw new he("invalid number",{toml:t,ptr:n});if(o){if((o=!Number.isSafeInteger(i))&&!s)throw new he("integer value cannot be represented losslessly",{toml:t,ptr:n});(o||s===!0)&&(i=BigInt(e))}return i}let r=new Gr(e);if(!r.isValid())throw new he("invalid value",{toml:t,ptr:n});return r}var dj,pj,fj,Ul=I(()=>{Bl();Qs();dj=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,pj=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,fj=/^[+-]?0[0-9_]/});function aa(e,t=0,n=e.length){let s=e.indexOf(`
95
- `,t);return e[s-1]==="\r"&&s--,s<=n?s:-1}function qo(e,t){for(let n=t;n<e.length;n++){let s=e[n];if(s===`
94
+ `;else if(n==="f")i+="\f";else if(n==="r")i+="\r";else if(n==="e")i+="\x1B";else if(n==='"')i+='"';else if(n==="\\")i+="\\";else throw new he("unrecognized escape sequence",{toml:e,ptr:c});a=c+1,l=0}else if(n!==" "&&n!==" "){if(l===2)throw new he("invalid escape: only line-ending whitespace may be escaped",{toml:e,ptr:a});l=!o&&n==="\\"?1:0,a=c}}throw new he("unfinished string",{toml:e,ptr:t})}function Ch(e,t,n,s){if(e==="true")return!0;if(e==="false")return!1;if(e==="-inf")return-1/0;if(e==="inf"||e==="+inf")return 1/0;if(e==="nan"||e==="+nan"||e==="-nan")return NaN;if(e==="-0")return s?0n:0;let o=kj.test(e);if(o||jj.test(e)){if(_j.test(e))throw new he("leading zeroes are not allowed",{toml:t,ptr:n});e=e.replace(/_/g,"");let i=+e;if(isNaN(i))throw new he("invalid number",{toml:t,ptr:n});if(o){if((o=!Number.isSafeInteger(i))&&!s)throw new he("integer value cannot be represented losslessly",{toml:t,ptr:n});(o||s===!0)&&(i=BigInt(e))}return i}let r=new Vr(e);if(!r.isValid())throw new he("invalid value",{toml:t,ptr:n});return r}var kj,jj,_j,Hl=O(()=>{Vl();to();kj=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,jj=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,_j=/^[+-]?0[0-9_]/});function pa(e,t=0,n=e.length){let s=e.indexOf(`
95
+ `,t);return e[s-1]==="\r"&&s--,s<=n?s:-1}function Jo(e,t){for(let n=t;n<e.length;n++){let s=e[n];if(s===`
96
96
  `)return n;if(s==="\r"&&e[n+1]===`
97
- `)return n+1;if(s<" "&&s!==" "||s==="\x7F")throw new he("control characters are not allowed in comments",{toml:e,ptr:t})}return e.length}function In(e,t,n,s){let o;for(;;){for(;(o=e[t])===" "||o===" "||!n&&(o===`
97
+ `)return n+1;if(s<" "&&s!==" "||s==="\x7F")throw new he("control characters are not allowed in comments",{toml:e,ptr:t})}return e.length}function On(e,t,n,s){let o;for(;;){for(;(o=e[t])===" "||o===" "||!n&&(o===`
98
98
  `||o==="\r"&&e[t+1]===`
99
- `);)t++;if(s||o!=="#")break;t=qo(e,t)}return t}function kh(e,t,n,s,o=!1){if(!s)return t=aa(e,t),t<0?e.length:t;for(let r=t;r<e.length;r++){let i=e[r];if(i==="#")r=aa(e,r);else{if(i===n)return r+1;if(i===s||o&&(i===`
99
+ `);)t++;if(s||o!=="#")break;t=Jo(e,t)}return t}function Oh(e,t,n,s,o=!1){if(!s)return t=pa(e,t),t<0?e.length:t;for(let r=t;r<e.length;r++){let i=e[r];if(i==="#")r=pa(e,r);else{if(i===n)return r+1;if(i===s||o&&(i===`
100
100
  `||i==="\r"&&e[r+1]===`
101
- `))return r}}throw new he("cannot find end of structure",{toml:e,ptr:t})}var ca=I(()=>{Qs();});function mj(e,t,n){let s=e.slice(t,n),o=s.indexOf("#");return o>-1&&(qo(e,o),s=s.slice(0,o)),[s.trimEnd(),o]}function Hr(e,t,n,s,o){if(s===0)throw new he("document contains excessively nested structures. aborting.",{toml:e,ptr:t});let r=e[t];if(r==="["||r==="{"){let[l,c]=r==="["?_h(e,t,s,o):jh(e,t,s,o);if(n){if(c=In(e,c),e[c]===",")c++;else if(e[c]!==n)throw new he("expected comma or end of structure",{toml:e,ptr:c})}return[l,c]}if(r==='"'||r==="'"){let[l,c]=ia(e,t);if(n){if(c=In(e,c),e[c]&&e[c]!==","&&e[c]!==n&&e[c]!==`
102
- `&&e[c]!=="\r")throw new he("unexpected character encountered",{toml:e,ptr:c});e[c]===","&&c++}return[l,c]}let i=kh(e,t,",",n),a=mj(e,t,i-(e[i-1]===","?1:0));if(!a[0])throw new he("incomplete key-value declaration: no value specified",{toml:e,ptr:t});return n&&a[1]>-1&&(i=In(e,t+a[1]),e[i]===","&&i++),[Sh(a[0],e,t,o),i]}var Wl=I(()=>{Ul();Gl();ca();Qs();});function la(e,t,n="="){let s=t-1,o=[],r=e.indexOf(n,t);if(r<0)throw new he("incomplete key-value: cannot find end of key",{toml:e,ptr:t});do{let i=e[t=++s];if(i!==" "&&i!==" ")if(i==='"'||i==="'"){if(i===e[t+1]&&i===e[t+2])throw new he("multiline strings are not allowed in keys",{toml:e,ptr:t});let[a,l]=ia(e,t);s=e.indexOf(".",l);let c=e.slice(l,s<0||s>r?r:s),u=aa(c);if(u>-1)throw new he("newlines are not allowed in keys",{toml:e,ptr:t+s+u});if(c.trimStart())throw new he("found extra tokens after the string part",{toml:e,ptr:l});if(r<l&&(r=e.indexOf(n,l),r<0))throw new he("incomplete key-value: cannot find end of key",{toml:e,ptr:t});o.push(a)}else{s=e.indexOf(".",t);let a=e.slice(t,s<0||s>r?r:s);if(!hj.test(a))throw new he("only letter, numbers, dashes and underscores are allowed in keys",{toml:e,ptr:t});o.push(a.trimEnd())}}while(s+1&&s<r);return[o,In(e,r+1,!0,!0)]}function jh(e,t,n,s){let o={},r=new Set,i;for(t++;(i=e[t++])!=="}"&&i;){if(i===",")throw new he("expected value, found comma",{toml:e,ptr:t-1});if(i==="#")t=qo(e,t);else if(i!==" "&&i!==" "&&i!==`
103
- `&&i!=="\r"){let a,l=o,c=!1,[u,d]=la(e,t-1);for(let m=0;m<u.length;m++){if(m&&(l=c?l[a]:l[a]={}),a=u[m],(c=Object.hasOwn(l,a))&&(typeof l[a]!="object"||r.has(l[a])))throw new he("trying to redefine an already defined value",{toml:e,ptr:t});!c&&a==="__proto__"&&Object.defineProperty(l,a,{enumerable:!0,configurable:!0,writable:!0})}if(c)throw new he("trying to redefine an already defined value",{toml:e,ptr:t});let[f,p]=Hr(e,d,"}",n-1,s);r.add(f),l[a]=f,t=p}}if(!i)throw new he("unfinished table encountered",{toml:e,ptr:t});return[o,t]}function _h(e,t,n,s){let o=[],r;for(t++;(r=e[t++])!=="]"&&r;){if(r===",")throw new he("expected value, found comma",{toml:e,ptr:t-1});if(r==="#")t=qo(e,t);else if(r!==" "&&r!==" "&&r!==`
104
- `&&r!=="\r"){let i=Hr(e,t-1,"]",n-1,s);o.push(i[0]),t=i[1]}}if(!r)throw new he("unfinished array encountered",{toml:e,ptr:t});return[o,t]}var hj,Gl=I(()=>{Ul();Wl();ca();Qs();hj=/^[a-zA-Z0-9-_]+[ \t]*$/});function Rh(e,t,n,s){let o=t,r=n,i,a=!1,l;for(let c=0;c<e.length;c++){if(c){if(o=a?o[i]:o[i]={},r=(l=r[i]).c,s===0&&(l.t===1||l.t===2))return null;if(l.t===2){let u=o.length-1;o=o[u],r=r[u].c}}if(i=e[c],(a=Object.hasOwn(o,i))&&r[i]?.t===0&&r[i]?.d)return null;a||(i==="__proto__"&&(Object.defineProperty(o,i,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(r,i,{enumerable:!0,configurable:!0,writable:!0})),r[i]={t:c<e.length-1&&s===2?3:s,d:!1,i:0,c:{}})}if(l=r[i],l.t!==s&&!(s===1&&l.t===3)||(s===2&&(l.d||(l.d=!0,o[i]=[]),o[i].push(o={}),l.c[l.i++]=l={t:1,d:!1,i:0,c:{}}),l.d))return null;if(l.d=!0,s===1)o=a?o[i]:o[i]={};else if(s===0&&a)return null;return[i,o,l.c]}function Ko(e,{maxDepth:t=1e3,integersAsBigInt:n}={}){let s={},o={},r=s,i=o;for(let a=In(e,0);a<e.length;){if(e[a]==="["){let l=e[++a]==="[",c=la(e,a+=+l,"]");if(l){if(e[c[1]-1]!=="]")throw new he("expected end of table declaration",{toml:e,ptr:c[1]-1});c[1]++}let u=Rh(c[0],s,o,l?2:1);if(!u)throw new he("trying to redefine an already defined table or value",{toml:e,ptr:a});i=u[2],r=u[1],a=c[1]}else{let l=la(e,a),c=Rh(l[0],r,i,0);if(!c)throw new he("trying to redefine an already defined table or value",{toml:e,ptr:a});let u=Hr(e,l[1],void 0,t,n);c[1][c[0]]=u[0],a=u[1]}if(a=In(e,a,!0),e[a]&&e[a]!==`
105
- `&&e[a]!=="\r")throw new he("each key-value declaration must be followed by an end-of-line",{toml:e,ptr:a});a=In(e,a)}return s}var Th=I(()=>{Gl();Wl();ca();Qs();});var Ah=I(()=>{});var ua=I(()=>{Th();Ah();Bl();Qs();});var Ih={};Fn(Ih,{CONFIG_FILE:()=>pa,loadTomlConfig:()=>Hl,mergeEffective:()=>Oh,normalizeConfig:()=>Ch});async function Hl(e,{file:t}={}){let n=t||Q(e,pa),s;try{s=await ze(n,"utf8")}catch(o){if(o&&o.code==="ENOENT")return null;throw o}try{return Ko(s)}catch(o){throw new Error(`Invalid ${pa} at ${n}: ${o&&o.message?o.message:o}`)}}async function gj(e,t){let n;if(Array.isArray(e))n=e;else{let o=Xt(t,String(e));n=(await ze(o,"utf8")).split(`
106
- `)}let s=[];for(let o of n){let r=String(o).trim();!r||r.startsWith("#")||s.push(Xt(t,r))}return s}async function Ch(e,{configDir:t}={}){let n=e||{},s=t||process.cwd(),o={};if(n.repositories!==void 0&&(o.repositories=await gj(n.repositories,s)),n.out_root!==void 0&&(o.outRoot=Xt(s,String(n.out_root))),n.graph_file!==void 0&&(o.graphFile=Xt(s,String(n.graph_file))),n.graph_files!==void 0){let w=Array.isArray(n.graph_files)?n.graph_files:[n.graph_files];o.graphFiles=w.map($=>Xt(s,String($)))}let r=n.graph||{};r.read_only!==void 0&&(o.graph={readOnly:r.read_only});let i=n.corpus||{};i.tier!==void 0&&(o.corpus={tier:i.tier});let a=n.seed||{},l={};a.enabled!==void 0&&(l.enabled=a.enabled),a.limit!==void 0&&(l.limit=a.limit),a.capture_unknown_context!==void 0&&(l.captureUnknownContext=a.capture_unknown_context),a.unknown_context_limit!==void 0&&(l.unknownContextLimit=a.unknown_context_limit),Object.keys(l).length&&(o.seed=l),n.extensions!==void 0&&(o.extensions=n.extensions),n.bias!==void 0&&(o.bias=n.bias),n.games!==void 0&&(o.games=n.games),n.planning!==void 0&&(o.planning=n.planning),n.research!==void 0&&(o.research=n.research),n.discourse!==void 0&&(o.discourse=n.discourse);let c=n.index||{},u={};c.languages!==void 0&&(u.languages=c.languages),c.exclude!==void 0&&(u.exclude=c.exclude),c.secret_exclude!==void 0&&(u.secretExclude=c.secret_exclude),c.history_depth!==void 0&&(u.historyDepth=c.history_depth),c.include_text!==void 0&&(u.includeText=c.include_text),c.include_structure!==void 0&&(u.includeStructure=c.include_structure),c.respect_gitignore!==void 0&&(u.respectGitignore=c.respect_gitignore),c.markdown_sections!==void 0&&(u.markdownSections=c.markdown_sections),c.vue!==void 0&&(u.vue=c.vue),Object.keys(u).length&&(o.index=u);let d=n.tune||{},f={};d.score_gap_k!==void 0&&(f.scoreGapK=d.score_gap_k),d.literal_mention!==void 0&&(f.literalMention=d.literal_mention),d.demote_non_prod!==void 0&&(f.demoteNonProd=d.demote_non_prod),d.call_adjacency!==void 0&&(f.callAdjacency=d.call_adjacency),d.impl_of_interface!==void 0&&(f.implOfInterface=d.impl_of_interface),d.beam_search!==void 0&&(f.beamSearch=d.beam_search),d.beam_width!==void 0&&(f.beamWidth=d.beam_width),d.prose_layers!==void 0&&(f.proseLayers=d.prose_layers);let p=d.expansion||{},m={};p.strategy!==void 0&&(m.strategy=p.strategy),p.nodes!==void 0&&(m.nodes=p.nodes),p.q!==void 0&&(m.q=p.q),p.depth!==void 0&&(m.depth=p.depth),Object.keys(m).length&&(f.expansion=m),Object.keys(f).length&&(o.tune=f);let h=n.telemetry||{};h.enabled!==void 0&&(o.telemetry={enabled:h.enabled});let g=n.memory||{},b={};g.retention_versions!==void 0&&(b.retentionVersions=g.retention_versions),g.backend!==void 0&&(b.backend=g.backend),Object.keys(b).length&&(o.memory=b);let y=[];for(let[w,$]of bj)n[w]&&n[w][$]!==void 0&&y.push(`${w}.${$}`);return o.unwired=y,o}function da(e,t="",n={}){for(let[s,o]of Object.entries(e||{})){if(o==null)continue;let r=t?`${t}.${s}`:s;Array.isArray(o)||typeof o!="object"?n[r]=o:da(o,r,n)}return n}function Oh({args:e={},toml:t=null,defaults:n={}}={}){let s=da(n),o=null;if(t){let{unwired:u,...d}=t;o=d}let r=o?da(o):{},i=da(e),a=[...new Set([...Object.keys(s),...Object.keys(r),...Object.keys(i)])].sort(),l={},c={};for(let u of a)u in i?(l[u]=i[u],c[u]="arg"):u in r?(l[u]=r[u],c[u]="tmct.toml"):(l[u]=s[u],c[u]="default");return{effective:l,sources:c}}var pa,bj,fa=I(()=>{jt();Be();ua();pa="tmct.toml";bj=[["index","include_text"],["index","include_structure"],["index","respect_gitignore"],["index","markdown_sections"],["index","vue"]]});var _s={};Fn(_s,{CANONICALISED_FROM_PROP:()=>ou,CAPABLE_OF_PREDICATE:()=>$_,CHAIN_KEEP_DEPTH:()=>lh,CHAIN_ROLLUP_THRESHOLD:()=>sa,CREATED_AT_PROP:()=>st,DEFAULT_RETENTION:()=>Jl,FACT_CLASS:()=>Et,GROUP_ROLLUP_THRESHOLD:()=>ah,HAS_A_PREDICATE:()=>sr,IN_REPLY_TO_PROP:()=>su,MEMORY_DIR_REL:()=>Jo,MEMORY_GRAPH_REL:()=>Zl,MEMORY_MANIFEST_REL:()=>Zh,MEMORY_SESSION_CLASS:()=>tu,MULTI_VALUED_PREDICATES:()=>x_,NODE_ID_REL:()=>lu,OPERATOR_SOURCE_ID:()=>ma,ROLLUP_COUNT_PROP:()=>Br,ROLLUP_EARLIEST_PROP:()=>Cn,ROLLUP_KEEP_PER_TYPE:()=>ch,ROLLUP_LATEST_PROP:()=>On,ROLLUP_PRIOR_PROP:()=>Ho,ROLLUP_RECORD_IDS_PROP:()=>zr,ROLLUP_SOURCE_IDS_PROP:()=>Go,RULE_CLASS:()=>Zo,RULE_KIND_ACTION_CONSTRAINT:()=>hu,RULE_KIND_ACTION_EFFECT:()=>Zr,RULE_KIND_ACTION_PRECOND:()=>$a,RULE_KIND_ACTION_SIGNATURE:()=>mu,RULE_KIND_COMPOSE2:()=>Jr,RULE_KIND_FILTER:()=>Qr,RULE_KIND_PROP:()=>nr,RULE_KIND_RECURSIVE:()=>fu,SAID_IN_SESSION_PROP:()=>nu,SOURCE_CLASS:()=>Qo,SOURCE_RELIABILITY_PROP:()=>Mh,STATED_BY_PROP:()=>ln,SYLLOGISE_STATE_REL:()=>cu,UPDATED_AT_PROP:()=>us,UTTERANCE_CLASS:()=>eu,appendCanonicalisedFromEdges:()=>l_,appendFact:()=>f_,appendFacts:()=>tr,appendRule:()=>gu,appendUtterance:()=>c_,appendUtterances:()=>ig,applySeedPayload:()=>$j,attachFactHeads:()=>Hh,chainRollupIdFor:()=>Ll,cloneMemoryPayload:()=>xj,closeSqliteMemoryStore:()=>Yh,createInMemoryStore:()=>ba,createSqliteMemoryStore:()=>Kh,emptyMemory:()=>Yr,factGroupId:()=>Nn,factHeadsOf:()=>Vh,factIdForTriple:()=>ge,factRecordIdsFor:()=>er,findContradictions:()=>hg,findRuleByName:()=>bu,findRulesByName:()=>w_,headRollupIdFor:()=>Il,isChainRollupId:()=>Vo,isHeadRollupId:()=>xs,isMemoryOrSqliteHandle:()=>iu,isRollupId:()=>oa,loadMemory:()=>Ht,loadNodeId:()=>Qj,loadSyllogiseState:()=>Xj,normFactPredicate:()=>Zn,normFactTerm:()=>X,openConfiguredMemoryBackend:()=>ks,openMemoryBackend:()=>Xh,provSourceClassFor:()=>e_,provenanceTagToSource:()=>ds,readFactRows:()=>Ct,readObjectSupersessions:()=>Ij,readRuleRows:()=>wu,removeFacts:()=>y_,resolveMemoryGraphFile:()=>Vr,resolveRelationChase:()=>yu,resolveRelationChaseReverse:()=>mg,saveNodeId:()=>Zj,saveSyllogiseState:()=>Jj,snapshotMemory:()=>Hj});function Yr(){return{generated_at:"",memory:!0,prefixes:{owl:"http://www.w3.org/2002/07/owl#",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",mgx:"urn:tmct:mgx#",mgxneg:"urn:tmct:mgxneg#"},vocabulary:vj.map(e=>({...e})),classes:[],objectProperties:[],individuals:[],proseIndex:{}}}function Vr(e,t=null){if(Ss(e)||Ln(e))throw new Error("resolveMemoryGraphFile: dir is a memory/sqlite handle, not a file path (Backend A only)");return t===null?Q(e,Zl):Q(e,Jo,`graph.v${t}.json`)}function Ss(e){return!!e&&typeof e=="object"&&e.backend===ru}function Ln(e){return!!e&&typeof e=="object"&&e.backend===Dh}function iu(e){return Ss(e)||Ln(e)}function ba(){return{backend:ru,payload:Yr()}}function $j(e,t){t&&(e.payload={...e.payload,...t})}function xj(e){if(!e)return null;try{return structuredClone(e)}catch{return JSON.parse(JSON.stringify(e))}}function zh(e){for(let t of String(e||"").split(" | ")){if(!t)continue;let n=du(ds(t));if(n)return n}return{id:ns,type:""}}function Nn(e){let t=String(e||""),n=t.indexOf("@");return n<0?t:t.slice(0,n)}function Sj(e){return du(ds(e))||{id:ns,type:""}}function Bh(e){let t=new Map;for(let n of String(e||"").split(" | ")){let s=n.trim();if(!s)continue;let{id:o,type:r}=Sj(s),i=t.get(o)||{sourceId:o,sourceType:r,tags:[]};i.tags.includes(s)||i.tags.push(s),t.set(o,i)}return t.size||t.set(ns,{sourceId:ns,sourceType:"",tags:[]}),[...t.values()]}function Yl(e,t=Math.max){let n="",s=null;for(let o of e||[]){let r=ds(o)?.createdAt||"",i=Date.parse(r);Number.isFinite(i)&&(s===null||t(i,s)===i)&&(n=r,s=i)}return n}function au(e,t="",n=Math.max){return Yl(e,n)||(Number.isFinite(Date.parse(t))?String(t):"")}function kj(e,t){let n=Date.parse(e.assertedAt),s=Date.parse(t.assertedAt);return!Number.isFinite(n)||!Number.isFinite(s)?!1:n>s?!0:n===s&&!!e.observedAt&&!t.observedAt}function Uh(e,t){let n=i=>(e.attributes||[]).find(a=>a?.prop===i)?.value||"",s=zh(n("mgx:factProvenance")),o=n(Xr).split(" ").filter(Boolean)[0]||null,r=Ur(e.id);return[e.id,Nn(e.id),n("rdf:subject"),n("rdf:predicate"),n("rdf:object"),n(Yo)||s.id,r||s.type,Number(n(r?Ho:Eo))||0,n(st),n(qr)||null,o,t]}function jj(e){if(e.prepare("SELECT id FROM facts LIMIT 1").get()||!e.prepare("SELECT id FROM individuals WHERE class = ? LIMIT 1").get(Et))return;let t=e.prepare(Wh);e.exec("BEGIN IMMEDIATE");try{for(let n of e.prepare("SELECT json FROM individuals WHERE class = ?").all(Et))t.run(...Uh(JSON.parse(n.json),n.json));e.exec("COMMIT")}catch(n){throw e.exec("ROLLBACK"),n}}function Rj(e){return(e||[]).map(t=>({sourceId:t.sourceId||"",sourceType:t.sourceType||"",ownTrust:t.ownTrust,assertedAt:t.assertedAt||""}))}function Hh(e,t){return e&&t&&(e[Gh]=t),e}function Aj(e){let t=new Map;for(let n of e.prepare("SELECT triple_hash, trust_base, inputs_json FROM fact_heads").all())t.set(n.triple_hash,{trustBase:n.trust_base,inputs:JSON.parse(n.inputs_json)});return t}function qh(e,t,n,s){let o=e.prepare(Tj),r=e.prepare("DELETE FROM fact_heads WHERE triple_hash = ?"),i=Es();for(let a of n){let l=t.groups.get(a);if(!l?.length){r.run(a),s?.delete(a);continue}let c=Rj($u(a,l,t).assertions),u=fp(c).score;o.run(a,u,JSON.stringify(c),i),s?.set(a,{trustBase:u,inputs:c})}}function Cj(e){let t=e.db;if(t.prepare("SELECT triple_hash FROM fact_heads LIMIT 1").get()||!t.prepare("SELECT id FROM individuals WHERE class = ? LIMIT 1").get(Et))return;let n=vu(Jh(e));t.exec("BEGIN IMMEDIATE");try{qh(t,n,n.groups.keys(),null),t.exec("COMMIT")}catch(s){throw t.exec("ROLLBACK"),s}}function Oj(e,t,n){let s=e.prepare("SELECT ord, to_id FROM fact_object_supersessions WHERE subject = ? AND predicate = ? ORDER BY ord DESC LIMIT 1"),o=e.prepare("INSERT INTO fact_object_supersessions(subject, predicate, ord, from_id, to_id, recorded_at) VALUES (?, ?, ?, ?, ?, ?)"),r=Es();for(let i of n){let[a,l]=i.split("\0");if(ta(l)!==Dr)continue;let c=t.groupsByPair.get(i)||[];if(c.length<2)continue;let u=c.map(p=>{let m=$u(p,t.groups.get(p),t);return m.trust=bi(m.assertions).score,m});if(new Set(u.map(p=>p.object)).size<2)continue;let d=Ol(u,Dr)?.winner?.id;if(!d)continue;let f=s.get(a,l);f?.to_id!==d&&o.run(a,l,(f?.ord??-1)+1,f?.to_id||"",d,r)}}function Ij(e,{subject:t,predicate:n}={}){if(!Ln(e))return[];let s=t&&n?" WHERE subject = ? AND predicate = ?":"",o=s?[t,n]:[];return e.db.prepare(`SELECT subject, predicate, ord, from_id, to_id, recorded_at FROM fact_object_supersessions${s} ORDER BY subject, predicate, ord`).all(...o).map(r=>({subject:r.subject,predicate:r.predicate,ord:r.ord,fromId:r.from_id,toId:r.to_id,recordedAt:r.recorded_at}))}function Nj(){if(Nh)return;Nh=!0;let e=process.listeners("warning").slice();process.removeAllListeners("warning"),process.on("warning",t=>{if(!(t?.name==="ExperimentalWarning"&&/sqlite/i.test(String(t?.message))))if(e.length)for(let n of e)n(t);else console.error(t.stack||String(t))})}async function Kh(e){Nj();let{DatabaseSync:t}=await Promise.resolve().then(()=>(Eh(),xh)),n=new t(e);n.exec("PRAGMA journal_mode = WAL"),n.exec("PRAGMA synchronous = NORMAL"),n.exec(Ej),jj(n);let s={backend:Dh,db:n,dbPath:e};return Cj(s),s}function Yh(e){Ln(e)&&e.db.close()}async function Xh(e,t){if(t===ru)return{dir:ba(),close:async()=>{}};let n=Q(e,".tmct","memory","graph.sqlite"),s=r=>Nd(r).then(()=>!0,()=>!1);!await s(n)&&await s(Q(e,Zl))&&process.stderr.write(`found .tmct/memory/graph.json \u2014 the flat-file memory backend is retired; starting a fresh sqlite store (the old file is left untouched)
107
- `),await xn($e(n),{recursive:!0});let o=await Kh(n);return{dir:o,close:async()=>Yh(o)}}async function ks(e,t=process.env){let n=String(t?.TMCT_MEMORY_BACKEND||"").trim().toLowerCase();if(!n)try{let{loadTomlConfig:s}=await Promise.resolve().then(()=>(fa(),Ih));n=String((await s(e))?.memory?.backend||"").trim().toLowerCase()}catch{n=""}return Xh(e,n)}function Pj(e){let t=e.db.prepare("PRAGMA data_version").get()?.data_version;return e.cachedPayload&&e.cachedDataVersion!==t&&(e.cachedPayload=null),e.cachedPayload||(e.cachedPayload=Jh(e),e.cachedFactHeads=Aj(e.db),e.cachedDataVersion=t),Hh(vn(e.cachedPayload),e.cachedFactHeads)}function Jh(e){let t=e.db,n=Yr(),s=(a,l)=>{let c=t.prepare("SELECT v FROM meta WHERE k = ?").get(a);return c?JSON.parse(c.v):l},o=t.prepare("SELECT json FROM individuals ORDER BY ord").all().map(a=>JSON.parse(a.json)),r=t.prepare("SELECT subject, object, subject_label, object_label, extra FROM edges WHERE prop = ? ORDER BY rowid"),i=t.prepare("SELECT prop, predicate, count FROM relations ORDER BY ord").all().map(a=>({predicate:a.predicate,prop:a.prop,count:a.count,examples:r.all(a.prop).map(l=>{let c={subject:l.subject,object:l.object,subjectLabel:l.subject_label,objectLabel:l.object_label};return l.extra&&Object.assign(c,JSON.parse(l.extra)),c})}));return{generated_at:s("generated_at",n.generated_at),memory:s("memory",n.memory),prefixes:s("prefixes",n.prefixes),vocabulary:s("vocabulary",n.vocabulary),classes:s("classes",n.classes),objectProperties:i,individuals:o,proseIndex:s("proseIndex",n.proseIndex)}}function Mj(e,t){let n=vn(t),s=e.individuals.findIndex(o=>o?.id===t.id);s>=0?e.individuals[s]=n:e.individuals.push(n)}function Fj(e,t){e.individuals=e.individuals.filter(n=>t.has(n?.id))}function Dj(e,t){let n=e.objectProperties.find(s=>s?.prop===t);return n||(n={predicate:null,prop:t,count:0,examples:[]},e.objectProperties.push(n)),n}function zj(e,t,n){let s=`${t.subject}\0${t.object}`;e.examples=e.examples.filter(r=>`${r.subject}\0${r.object}`!==s);let o={subject:t.subject,object:t.object,subjectLabel:t.subjectLabel??null,objectLabel:t.objectLabel??null};n.length&&Object.assign(o,vn(Object.fromEntries(n.map(r=>[r,t[r]])))),e.examples.push(o)}function Bj(e,t){e.examples=e.examples.filter(n=>t.has(`${n.subject}\0${n.object}`))}function Uj(e,t){e.objectProperties=e.objectProperties.filter(n=>t.has(n?.prop))}function Wj(e,t){let n=e.db,s=Yr(),o=e.cachedPayload||null;n.exec("BEGIN IMMEDIATE");try{let r=n.prepare("INSERT OR REPLACE INTO meta(k, v) VALUES (?, ?)");r.run("generated_at",JSON.stringify(t.generated_at??s.generated_at)),r.run("memory",JSON.stringify(t.memory??s.memory)),r.run("prefixes",JSON.stringify(t.prefixes??s.prefixes)),r.run("vocabulary",JSON.stringify(t.vocabulary??s.vocabulary)),r.run("classes",JSON.stringify(t.classes??s.classes)),r.run("proseIndex",JSON.stringify(t.proseIndex??s.proseIndex)),o&&(o.generated_at=vn(t.generated_at??s.generated_at),o.memory=vn(t.memory??s.memory),o.prefixes=vn(t.prefixes??s.prefixes),o.vocabulary=vn(t.vocabulary??s.vocabulary),o.classes=vn(t.classes??s.classes),o.proseIndex=vn(t.proseIndex??s.proseIndex));let i=n.prepare("SELECT ord, json FROM individuals WHERE id = ?"),l=n.prepare("SELECT COALESCE(MAX(ord), -1) AS m FROM individuals").get().m+1,c=n.prepare("INSERT OR REPLACE INTO individuals(id, ord, class, label, json) VALUES (?, ?, ?, ?, ?)"),u=n.prepare(Wh),d=new Set,f=new Set,p=new Set;for(let S of t.individuals||[]){d.add(S.id);let R=JSON.stringify(S),k=i.get(S.id);if(k&&k.json===R)continue;let A=k?k.ord:l++;c.run(S.id,A,S.class??null,S.label??null,R),S.class===Et&&(u.run(...Uh(S,R)),f.add(Nn(S.id)),p.add(Xl(Kr(S,"subject"),Kr(S,"predicate")))),o&&Mj(o,S)}let m=n.prepare("DELETE FROM individuals WHERE id = ?"),h=n.prepare("DELETE FROM facts WHERE id = ?"),g=n.prepare("SELECT triple_hash, subject, predicate FROM facts WHERE id = ?");for(let S of n.prepare("SELECT id FROM individuals").all()){if(d.has(S.id))continue;let R=g.get(S.id);R&&(f.add(R.triple_hash),p.add(Xl(R.subject,R.predicate))),m.run(S.id),h.run(S.id)}o&&Fj(o,d);let b=n.prepare("SELECT ord FROM relations WHERE prop = ?"),w=n.prepare("SELECT COALESCE(MAX(ord), -1) AS m FROM relations").get().m+1,$=n.prepare("INSERT OR REPLACE INTO relations(prop, ord, predicate, count) VALUES (?, ?, ?, ?)"),_=n.prepare("SELECT subject, object, subject_label, object_label, extra FROM edges WHERE prop = ?"),v=n.prepare("INSERT OR REPLACE INTO edges(prop, subject, object, subject_label, object_label, extra) VALUES (?, ?, ?, ?, ?, ?)"),x=n.prepare("DELETE FROM edges WHERE prop = ? AND subject = ? AND object = ?"),E=new Set;for(let S of t.objectProperties||[]){E.add(S.prop);let R=_.all(S.prop),k=new Map(R.map(B=>[`${B.subject}\0${B.object}`,B])),A=new Set,P=o?Dj(o,S.prop):null;for(let B of S.examples||[]){let Z=`${B.subject}\0${B.object}`;A.add(Z);let J=Object.keys(B).filter(W=>!Lj.has(W)),ne=J.length?JSON.stringify(Object.fromEntries(J.map(W=>[W,B[W]]))):null,D=k.get(Z);D&&(D.subject_label??null)===(B.subjectLabel??null)&&(D.object_label??null)===(B.objectLabel??null)&&(D.extra??null)===(ne??null)||(v.run(S.prop,B.subject,B.object,B.subjectLabel??null,B.objectLabel??null,ne),P&&zj(P,B,J))}for(let B of k.keys()){if(A.has(B))continue;let[Z,J]=B.split("\0");x.run(S.prop,Z,J)}P&&Bj(P,A);let T=Number.isFinite(S.count)?S.count:(S.examples||[]).length,M=b.get(S.prop)?.ord??w++;$.run(S.prop,M,S.predicate??null,T),P&&(P.predicate=S.predicate??null,P.count=T)}for(let S of n.prepare("SELECT prop FROM relations").all())E.has(S.prop)||(n.prepare("DELETE FROM edges WHERE prop = ?").run(S.prop),n.prepare("DELETE FROM relations WHERE prop = ?").run(S.prop));if(o&&Uj(o,E),f.size){let S=vu(t);qh(n,S,f,e.cachedFactHeads),Oj(n,S,p)}n.exec("COMMIT")}catch(r){throw n.exec("ROLLBACK"),e.cachedPayload=void 0,e.cachedFactHeads=void 0,r}}async function Qh(e,t){let n=`${e}.tmp-${process.pid}-${Math.random().toString(36).slice(2,10)}`;await fr(n,t),await ui(n,e)}async function wa(e,t){await Qh(e,JSON.stringify(t))}async function Hj(e,{retentionVersions:t}={}){if(iu(e))throw new Error("snapshotMemory only supports the flat-JSON backend (Backend A) \u2014 a memory/sqlite handle has no on-disk graph.json to snapshot");let n=Vr(e),s;try{s=await ze(n,"utf8")}catch(u){if(u?.code==="ENOENT")return{skipped:!0,version:null,prunedVersion:null};throw u}let o=Gj(e),r;try{r=JSON.parse(await ze(o,"utf8"))}catch(u){if(u?.code!=="ENOENT")throw u;r={version:0,retentionVersions:t??Jl}}Number.isInteger(r.version)||(r.version=0),Number.isInteger(r.retentionVersions)||(r.retentionVersions=t??Jl);let i=r.version,a=Vr(e,i);await xn($e(a),{recursive:!0}),await Qh(a,s),r.version=i+1;let l=null,c=i-r.retentionVersions;if(c>=0)try{await Ja(Vr(e,c)),l=c}catch(u){if(u?.code!=="ENOENT")throw u}return await wa(o,r),{skipped:!1,version:i,prunedVersion:l}}async function Ht(e){if(Ss(e))return Vl(e.payload);if(Ln(e))return Vl(Pj(e));let t;try{t=await ze(Kl(e),"utf8")}catch(n){if(n?.code==="ENOENT")return Yr();throw n}return Vl(JSON.parse(t))}function qj(e){if(!Array.isArray(e?.individuals))return e;let t=new Map;for(let s of e.individuals){if(s?.class!==Et||!Vj.test(s.id||""))continue;let o=i=>(s.attributes||[]).find(a=>a?.key===i)?.value||"",r=Mo(o("subject"),o("predicate"),o("object"));r!==s.id&&(t.set(s.id,r),s.id=r)}if(!t.size)return e;let n=s=>t.get(s)||s;for(let s of e.objectProperties||[])for(let o of s.examples||[])o&&(t.has(o.subject)&&(o.subject=t.get(o.subject)),t.has(o.object)&&(o.object=t.get(o.object)));for(let s of e.individuals){Array.isArray(s?.derived_from)&&s.derived_from.length&&(s.derived_from=s.derived_from.map(n));let o=(s?.attributes||[]).find(r=>r?.prop==="mgx:factJustification");o?.value&&(o.value=o.value.split(" | ").map(r=>r.split(" ").filter(Boolean).map(n).join(" ")).filter(Boolean).join(" | "))}return e}function Kj(e){if(!Array.isArray(e?.individuals))return e;let t=(e.objectProperties||[]).find(l=>l?.prop===ln),n=new Map;for(let l of t?.examples||[]){if(!l?.subject)continue;let c=n.get(l.subject);c?c.push(l):n.set(l.subject,[l])}let s=new Set,o=new Map,r=[],i=[],a=[];for(let l of e.individuals){if(l?.class!==Et||String(l.id||"").includes("@")){a.push(l);continue}let c=w=>(l.attributes||[]).find($=>$?.prop===w)?.value||"",u=c("rdf:subject"),d=c("rdf:predicate"),f=c("rdf:object");if(!u||!d||!f){a.push(l);continue}let p=Mo(u,d,f),m=c(st),h=c("mgx:factProvenance"),g=n.get(l.id)||[],b=h?Bh(h):[];for(let w of g)b.some($=>$.sourceId===w.object)||b.push({sourceId:w.object,sourceType:"",tags:[]});b.length||b.push({sourceId:ns,sourceType:"",tags:[]});let y=[];for(let w of b){let $={id:`${p}@${w.sourceId}`,label:l.label,class:Et,derived_from:vn(l.derived_from)||[],mentions:vn(l.mentions)||[],attributes:[{prop:"rdf:type",key:"type",value:"rdf:Statement"},{prop:"rdf:subject",key:"subject",value:u},{prop:"rdf:predicate",key:"predicate",value:d},{prop:"rdf:object",key:"object",value:f},{prop:st,key:"createdAt",value:au(w.tags,m,Math.min)||m||Es()},{prop:Yo,key:"sourceId",value:w.sourceId},...w.tags.length?[{prop:"mgx:factProvenance",key:"provenance",value:w.tags.join(" | ")}]:[],...c("mgx:hasProseTokens")?[{prop:"mgx:hasProseTokens",key:"prose_tokens",value:c("mgx:hasProseTokens")}]:[],...c("mgx:factQuantifier")?[{prop:"mgx:factQuantifier",key:"quantifier",value:c("mgx:factQuantifier")}]:[],...w.sourceType==="entailed"&&c("mgx:factJustification")?[{prop:"mgx:factJustification",key:"justification",value:c("mgx:factJustification")}]:[]]};if(a.push($),r.push($),y.push($.id),w.sourceId!==ns){let _=g.find(v=>v?.object===w.sourceId);i.push({..._||{},subject:$.id,object:w.sourceId,subjectLabel:$.label,objectLabel:pu(w.sourceId)})}}s.add(l.id),o.set(l.id,y)}if(!s.size)return e;t?(t.examples=(t.examples||[]).filter(l=>!s.has(l?.subject)),t.examples.push(...i),t.count=t.examples.length):i.length&&(e.objectProperties=e.objectProperties||[],e.objectProperties.push({predicate:"statedBy",prop:ln,count:i.length,examples:i}));for(let l of e.objectProperties||[]){if(l?.prop===ln||!l?.examples?.length)continue;let c=[];for(let u of l.examples){let d=s.has(u?.subject)?o.get(u.subject)||[]:[u?.subject],f=s.has(u?.object)?o.get(u.object)||[]:[u?.object];for(let p of d)for(let m of f)c.push({...u,subject:p,object:m})}l.examples=c,l.count=c.length}e.individuals=a,ng(e);for(let l of r)Xo(e,l);return js(e),e}async function Yj(e,t){if(Ss(e)){e.payload=t;return}if(Ln(e)){Wj(e,t);return}await xn($e(Kl(e)),{recursive:!0}),await wa(Kl(e),t)}async function Xj(e){if(Ss(e))return e.syllogiseState?structuredClone(e.syllogiseState):null;if(Ln(e)){let t=e.db.prepare("SELECT v FROM meta WHERE k = ?").get(eg);return t?.v?JSON.parse(t.v):null}try{return JSON.parse(await ze(Q(e,cu),"utf8"))}catch(t){if(t?.code==="ENOENT")return null;throw t}}async function Jj(e,t){if(Ss(e)){e.syllogiseState=structuredClone(t);return}if(Ln(e)){e.db.prepare("INSERT OR REPLACE INTO meta(k, v) VALUES (?, ?)").run(eg,JSON.stringify(t));return}let n=Q(e,cu);await xn($e(n),{recursive:!0}),await wa(n,t)}async function Qj(e){if(Ss(e))return e.nodeId||null;if(Ln(e)){let t=e.db.prepare("SELECT v FROM meta WHERE k = ?").get(tg);return t?.v&&JSON.parse(t.v).nodeId||null}try{return JSON.parse(await ze(Q(e,lu),"utf8")).nodeId||null}catch(t){if(t?.code==="ENOENT")return null;throw t}}async function Zj(e,t){if(Ss(e)){e.nodeId=t;return}if(Ln(e)){e.db.prepare("INSERT OR REPLACE INTO meta(k, v) VALUES (?, ?)").run(tg,JSON.stringify({nodeId:t}));return}let n=Q(e,lu);await xn($e(n),{recursive:!0}),await wa(n,{nodeId:t})}function ng(e){let t=new Map,n=new Map,s=new Map,o=new Map;for(let i of e.individuals||[])if(i?.id&&(t.set(i.id,i),i.class===Qo&&n.set(i.id,i),i.class===Et)){let a=Nn(i.id),l=o.get(a);l?l.push(i.id):o.set(a,[i.id])}let r=(e.objectProperties||[]).find(i=>i?.prop===ln);for(let i of r?.examples||[]){if(!i?.subject)continue;let a=s.get(i.subject);a?a.push(i.object):s.set(i.subject,[i.object])}return e[Ql]={individualsById:t,sourcesById:n,statedByBySubject:s,factRecordsByGroup:o},e[Ql]}async function to(e,t){let n=await Ht(e);ng(n);let s=await t(n)??n;return o_(s),i_(s),s.proseIndex=tp(s.individuals),await Yj(e,s),s}function uu(e,t){return e?.attributes?.find(n=>n?.prop===st)?.value||t||Es()}function un(e,t,n,s){e.attributes=(e.attributes||[]).filter(o=>o?.prop!==t),e.attributes.push({prop:t,key:n,value:s})}function du(e){switch(e?.kind){case"operator":return{id:e.sessionId?`${ma}:${e.sessionId}`:ma,type:"operator"};case"teach":return{id:e.sessionId?`${ql}:${e.sessionId}`:ql,type:"teach"};case"teachNode":return{id:`${Fh}:${e.nodeId}`,type:"teach"};case"provider":return{id:`src:provider:${e.name}`,type:"provider"};case"corpus":return{id:`src:corpus:${e.name}`,type:"corpus"};case"corpusWeak":return{id:`src:corpus-weak:${e.name}`,type:"corpusWeak"};case"reference":return{id:`src:reference:${e.pack}:${e.article}`,type:"reference"};case"referenceLive":return{id:`src:reference:${e.pack}:${e.article}`,type:"referenceLive"};case"extracted":return{id:`src:extracted:${e.name}`,type:"extracted"};case"optimisticExtract":return{id:`src:optimistic-extract:${e.name}`,type:"optimisticExtract"};case"web":return{id:`src:learned:web:${Pr(String(e.url||""))}`,type:"web",url:String(e.url||"")};case"entailed":return{id:`src:entailed:${e.rule}`,type:"entailed",rule:String(e.rule||"")};default:return null}}function e_(e){return cc[e]||null}function t_(e,t,n){let s=du(t);if(!s)return null;let o=tn(e),r=o?o.individualsById.get(s.id):e.individuals.find(c=>c?.id===s.id),i=uu(r,t?.createdAt||n),a={id:s.id,label:pu(s.id),class:Qo,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:"mgx:sourceType",key:"sourceType",value:s.type},{prop:st,key:"createdAt",value:i},...s.url?[{prop:"mgx:sourceUrl",key:"sourceUrl",value:s.url}]:[],...s.rule?[{prop:"mgx:sourceRule",key:"sourceRule",value:s.rule}]:[]]},l=Zs(e,a);return o&&o.sourcesById.set(s.id,l),s.id}function va(e){let t=tn(e),n={};if(t){for(let[s,o]of t.sourcesById)n[s]=o;return n}for(let s of e.individuals)s?.class===Qo&&(n[s.id]=s);return n}function sg(e,t){let n=tn(e);return n?(n.statedByBySubject.get(t)||[]).slice():(e.objectProperties.find(o=>o?.prop===ln)?.examples||[]).filter(o=>o?.subject===t).map(o=>o.object)}function n_(e,t,n=Date.now(),s={}){let o=sg(e,t.id),r=(t.attributes||[]).find(l=>l?.prop===st)?.value||"",{score:i,inputs:a}=pp({sourceIds:o,createdAt:r},va(e),{now:n,...Array.isArray(s?.premiseTrusts)?{premiseTrusts:s.premiseTrusts}:{},...typeof s?.ruleConfidence=="number"?{ruleConfidence:s.ruleConfidence}:{}});un(t,Eo,"trustScore",String(i)),un(t,hi,"trustInputs",JSON.stringify(a)),un(t,us,"updatedAt",new Date(n).toISOString())}function s_(e,t,n=Date.now(),s={}){let[o]=sg(e,t.id),r=o?va(e)[o]:null,i=(r?.attributes||[]).find(c=>c?.prop==="mgx:sourceType")?.value||"",a=gi(i,r);if(i==="entailed"&&Array.isArray(s?.premiseTrusts)&&s.premiseTrusts.length){let c=typeof s.ruleConfidence=="number"?s.ruleConfidence:1;a=Math.max(0,Math.min(1,Math.min(...s.premiseTrusts)*c))}let l=(t.attributes||[]).find(c=>c?.prop===st)?.value||"";un(t,Eo,"trustScore",String(a)),un(t,hi,"trustInputs",JSON.stringify({sourceType:i,sourceId:o||"",createdAt:l})),un(t,us,"updatedAt",new Date(n).toISOString())}function og(e,t,n,s){t?.class===Et?s_(e,t,n,s):n_(e,t,n,s)}function Xo(e,t,n=Date.now(),s={}){let o=(t.attributes||[]).find(i=>i?.prop==="mgx:factProvenance")?.value||"",r=(t.attributes||[]).find(i=>i?.prop===st)?.value||new Date(n).toISOString();for(let i of o.split(" | ").filter(Boolean)){let a=ds(i);if(!a)continue;let l=t_(e,a,r);l&&ga(e,{predicate:"statedBy",prop:ln},{subject:t.id,object:l,subjectLabel:t.label,objectLabel:pu(l)})}og(e,t,n,s)}function o_(e){if(!Array.isArray(e?.individuals)||!Array.isArray(e?.objectProperties))return;let t=e.objectProperties.find(r=>r?.prop===ln),n=new Set((t?.examples||[]).map(r=>r.subject)),s=!1,o=Date.now();for(let r of e.individuals)r?.class!==Et||n.has(r.id)||!(r.attributes||[]).find(a=>a?.prop==="mgx:factProvenance")?.value||(Xo(e,r,o),s=!0);s&&js(e)}function i_(e){if(!Array.isArray(e?.individuals)||!Array.isArray(e?.objectProperties))return;let t=Ct(e),n=new Set;for(let a of hg(e))for(let l of a)n.add(l.id);let s=new Map;for(let a of t)for(let l of a.sourceIds){if(!r_(l))continue;let c=s.get(l)||{factsAsserted:0,factsContradicted:0};c.factsAsserted+=1,n.has(a.id)&&(c.factsContradicted+=1),s.set(l,c)}if(!s.size)return;let o=tn(e);for(let[a,l]of s){let c=o?o.individualsById.get(a):e.individuals.find(u=>u?.id===a);c&&(un(c,Mh,"sourceReliability",String(mp(l))),un(c,us,"updatedAt",new Date().toISOString()))}let r=e.objectProperties.find(a=>a?.prop===ln),i=new Set;for(let a of r?.examples||[])s.has(a?.object)&&i.add(a.subject);for(let a of i){let l=o?o.individualsById.get(a):e.individuals.find(c=>c?.id===a);l&&og(e,l)}}function Ph(e,t,n){if(!oa(n?.id))return n;let s=Ur(n.id);if(!s)return Fl(t,n);let o=va(e);return Fl(t,n,{priorFor:r=>gi(s,o[r])})}function Zs(e,t){let n=tn(e);if(n){let o=n.individualsById.get(t.id);if(o)return Object.assign(o,Ph(e,o,t)),o;if(e.individuals.push(t),n.individualsById.set(t.id,t),t.class===Et){let r=Nn(t.id),i=n.factRecordsByGroup.get(r);i?i.push(t.id):n.factRecordsByGroup.set(r,[t.id])}return t}let s=e.individuals.findIndex(o=>o?.id===t.id);return s>=0?(e.individuals[s]=Ph(e,e.individuals[s],t),e.individuals[s]):(e.individuals.push(t),t)}function ga(e,{predicate:t,prop:n},s){let o=e.objectProperties.find(l=>l?.prop===n);o||(o={predicate:t,prop:n,count:0,examples:[]},e.objectProperties.push(o));let r=n===ln?tn(e):null;if(r){let l=r.statedByBySubject.get(s.subject);if(!l||!l.includes(s.object)){o.examples.push({...s,createdAt:s.createdAt||Es()}),o.count=o.examples.length,l?l.push(s.object):r.statedByBySubject.set(s.subject,[s.object]);return}}let a=(o.examples||[]).find(l=>l?.subject===s.subject&&l?.object===s.object)?.createdAt||s.createdAt||Es();if(o.examples=(o.examples||[]).filter(l=>!(l?.subject===s.subject&&l?.object===s.object)),o.examples.push({...s,createdAt:a}),o.count=o.examples.length,r){let l=r.statedByBySubject.get(s.subject)||[];l.includes(s.object)||l.push(s.object),r.statedByBySubject.set(s.subject,l)}}function js(e){let t=[tu,eu,Et,Qo,Zo];e.classes=(e.classes||[]).filter(n=>!t.includes(n?.name));for(let n of t){let s=e.individuals.filter(o=>o?.class===n);s.length&&e.classes.push({name:n,count:s.length,sample:s.slice(0,3).map(o=>o.label)})}}function a_(e,t,n=""){let s=`session:${t}`;return e.individuals.some(o=>o?.id===s)||e.individuals.push({id:s,label:String(t).slice(0,8),class:tu,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:st,key:"createdAt",value:n||Es()},...n?[{prop:"mgx:sessionStarted",key:"started",value:n}]:[]]}),s}function rg(e,{role:t,text:n,ts:s,sessionId:o,sessionStarted:r="",parsed:i=null,replyTo:a=null,createdAt:l=""}){if(!yj.has(t))throw new Error(`utterance role must be "visitor" or "tmct", got ${JSON.stringify(t)}`);if(!o)throw new Error("utterance needs a sessionId");let c=String(s||""),u=Qn(n),d=`utt:${o}#${c}#${t}`,f=ya(u)||(t==="visitor"?"a-visitor-said":"a-tmct-said"),p=mi({doc:u}),m=e.individuals.find(y=>y?.id===d),h=uu(m,l||c),g={id:d,label:f,class:eu,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:"mgx:utteranceRole",key:"role",value:t},{prop:"mgx:utteranceText",key:"text",value:u},{prop:"mgx:utteranceTs",key:"ts",value:c},{prop:st,key:"createdAt",value:h},...i!=null?[{prop:"mgx:utteranceParsed",key:"parsed",value:JSON.stringify(i)}]:[],...p.length?[{prop:"mgx:hasProseTokens",key:"prose_tokens",value:p.join(" ")}]:[]]};Zs(e,g);let b=a_(e,o,r);if(ga(e,{predicate:"saidInSession",prop:nu},{subject:d,object:b,subjectLabel:f,objectLabel:String(o).slice(0,8)}),a){let y=e.individuals.find(w=>w?.id===a);y&&ga(e,{predicate:"inReplyTo",prop:su},{subject:d,object:a,subjectLabel:f,objectLabel:y.label})}return c&&c>String(e.generated_at||"")&&(e.generated_at=c),d}async function c_(e,t){let n;return await to(e,s=>{n=rg(s,t),js(s)}),{id:n}}async function ig(e,t){let n=[];return t?.length?(await to(e,s=>{for(let o of t)n.push(rg(s,o));js(s)}),{ids:n}):{ids:n}}async function l_(e,t){t?.length&&await to(e,n=>{for(let s of t)for(let o of er(n,s.factId))ga(n,{predicate:"canonicalisedFrom",prop:ou},{subject:o,object:s.uttId,subjectLabel:s.factLabel,objectLabel:s.uttLabel})})}function er(e,t){let n=tn(e);return n?(n.factRecordsByGroup.get(t)||[]).slice():(e?.individuals||[]).filter(s=>s?.class===Et&&Nn(s.id)===t).map(s=>s.id)}function ag(e,t,n){let s=Bh(n);if(s.length===1&&s[0].sourceId===ns&&er(e,t).length)return[];let o=u_(e,t);return o.length?s.filter(r=>!wh(o,r.sourceId)):s}function u_(e,t){let n=tn(e),s=n?n.factRecordsByGroup.get(t):er(e,t),o=[];for(let r of s||[]){if(!xs(r))continue;let i=eo(e,r);i&&o.push(i)}return o}function cg(e,t,{quantifier:n,environments:s}){let o=er(e,t).map(i=>eo(e,i)).filter(i=>i&&!(i.attributes||[]).some(a=>a?.prop===Xr)),r=new Set;if(s){let i=o.filter(a=>(a.attributes||[]).some(l=>l?.prop==="mgx:factJustification"));for(let a of i.length?i:o)un(a,"mgx:factJustification","justification",s.map(l=>l.join(" ")).join(" | ")),r.add(a.id)}if(n)for(let i of o)(i.attributes||[]).some(a=>a?.prop==="mgx:factQuantifier")||(un(i,"mgx:factQuantifier","quantifier",n),r.add(i.id));return[...r]}function d_(e){let t=0,n=(e.attributes||[]).find(s=>s?.prop===ha)?.value||"";for(let s of n.split(" ").filter(Boolean)){let o=/#v([1-9][0-9]*)$/.exec(s);o&&(t=Math.max(t,Number(o[1])))}return t+1}function lg(e,t){let{groupId:n,s,p:o,o:r,label:i,tokens:a,group:l,createdAt:c,observedAt:u,quantifier:d,environments:f}=t,p=`${n}@${l.sourceId}`,m=tn(e),h=m?m.individualsById.get(p):e.individuals.find(R=>R?.id===p),g=R=>(h?.attributes||[]).find(k=>k?.prop===R)?.value||"",b=g("mgx:factProvenance").split(" | ").filter(Boolean),y={assertedAt:Yl(l.tags),observedAt:u},w=null,$=l.tags,_=y.assertedAt||c||Es(),v=u,x=[],E=d;if(h){let R={assertedAt:Yl(b),observedAt:g(qr)};kj(y,R)?(w={head:h,id:`${p}#v${d_(h)}`},x=[w.id]):($=[...new Set([...b,...l.tags])],_=g(st)||_,v=u||g(qr),x=g(ha).split(" ").filter(Boolean)),E=d||g("mgx:factQuantifier")}return{candidate:{id:p,label:i,class:Et,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"rdf:Statement"},{prop:"rdf:subject",key:"subject",value:s},{prop:"rdf:predicate",key:"predicate",value:o},{prop:"rdf:object",key:"object",value:r},{prop:st,key:"createdAt",value:_},{prop:Yo,key:"sourceId",value:l.sourceId},...$.length?[{prop:"mgx:factProvenance",key:"provenance",value:$.join(" | ")}]:[],...v?[{prop:qr,key:"observedAt",value:v}]:[],...a.length?[{prop:"mgx:hasProseTokens",key:"prose_tokens",value:a.join(" ")}]:[],...E?[{prop:"mgx:factQuantifier",key:"quantifier",value:E}]:[],...f?[{prop:"mgx:factJustification",key:"justification",value:f.map(R=>R.join(" ")).join(" | ")}]:[],...x.length?[{prop:ha,key:"supersedes",value:x.join(" ")}]:[]]},demote:w}}function p_(e,t){let n=`${t}@${ns}`,s=tn(e);if((s?!s.individualsById.has(n):!e.individuals.some(r=>r?.id===n))||(e.individuals=e.individuals.filter(r=>r?.id!==n),!s))return;s.individualsById.delete(n);let o=(s.factRecordsByGroup.get(t)||[]).filter(r=>r!==n);o.length?s.factRecordsByGroup.set(t,o):s.factRecordsByGroup.delete(t)}function ug(e,{candidate:t,demote:n}){let s=[];if(t.id.endsWith(`@${ns}`)||p_(e,Nn(t.id)),n){let o={...n.head,id:n.id,attributes:(n.head.attributes||[]).map(r=>({...r}))};un(o,Xr,"supersededBy",t.id),Zs(e,o),s.push(o.id)}return Zs(e,t),s.push(t.id),s}function eo(e,t){let n=tn(e);return n?n.individualsById.get(t):e.individuals.find(s=>s?.id===t)}function dg(e,t){let n=new Set(t);if(!n.size)return;e.individuals=(e.individuals||[]).filter(o=>!n.has(o?.id));for(let o of e.objectProperties||[]){let r=o.examples||[],i=r.filter(a=>!n.has(a?.subject)&&!n.has(a?.object));i.length!==r.length&&(o.examples=i,o.count=i.length)}let s=tn(e);if(s)for(let o of n){s.individualsById.delete(o),s.statedByBySubject.delete(o);let r=Nn(o),i=(s.factRecordsByGroup.get(r)||[]).filter(a=>a!==o);i.length?s.factRecordsByGroup.set(r,i):s.factRecordsByGroup.delete(r)}}function pg(e,t){let n=tn(e),s=(n?n.factRecordsByGroup.get(t):er(e,t))||[];if(s.length<8)return[];let o=new Map,r=new Map,i=new Map,a=new Map;for(let u of s.slice()){let d=eo(e,u);if(!d)continue;let f=y=>(d.attributes||[]).find(w=>w?.prop===y)?.value||"";if(xs(u)){i.set(Ur(u),d);continue}if(Vo(u)){a.set(f(Yo),d);continue}let p=f("mgx:factProvenance"),m=zh(p),h=p.split(" | ").filter(Boolean),g={id:u,sourceId:f(Yo)||m.id,assertedAt:au(h,f(st)),record:d};if(f(Xr)){let y=r.get(g.sourceId);y?y.push(g):r.set(g.sourceId,[g]);continue}if(!m.type)continue;let b=o.get(m.type);b?b.push(g):o.set(m.type,[g])}let l=va(e),c=[];for(let[u,d]of o){let f=gh({groupId:t,sourceType:u,heads:d,existing:i.get(u)||null,priorFor:p=>gi(u,l[p])});if(f){Zs(e,f.rollup),c.push(...f.absorbed);for(let p of f.absorbedSourceIds){for(let h of r.get(p)||[])c.push(h.id);r.delete(p);let m=a.get(p);m&&c.push(m.id),a.delete(p)}}}for(let[u,d]of r){let f=bh({groupId:t,sourceId:u,leaves:d,existing:a.get(u)||null});if(!f)continue;Zs(e,f.rollup),c.push(...f.absorbed);let p=eo(e,f.rewire);p&&un(p,ha,"supersedes",f.rollup.id)}return c}async function f_(e,{subject:t,predicate:n,object:s,provenance:o="",createdAt:r="",observedAt:i="",quantifier:a="",premiseTrusts:l,ruleConfidence:c}={}){let u=X(t),d=Zn(n),f=X(s);if(!u||!d||!f)throw new Error("a fact needs subject, predicate and object");let p=Mo(u,d,f),m=`${u} ${d} ${f}`,h=mi({doc:m}),g=Qn(a);return await to(e,async b=>{let y=ag(b,p,Qn(o));for(let w of y.length?[]:cg(b,p,{quantifier:g}))Xo(b,eo(b,w),void 0,{premiseTrusts:l,ruleConfidence:c});for(let w of y){let $=lg(b,{groupId:p,s:u,p:d,o:f,label:ya(m),tokens:h,group:w,createdAt:r,observedAt:i,quantifier:g});await zl($.candidate);for(let _ of ug(b,$))Xo(b,eo(b,_),void 0,_===$.candidate.id?{premiseTrusts:l,ruleConfidence:c}:void 0)}dg(b,pg(b,p)),js(b)}),{id:p}}function m_(e){if(!Array.isArray(e))return;let t=e.some(Array.isArray)?e.filter(Array.isArray):[e],n=[],s=new Set;for(let o of t){let r=o.filter(a=>typeof a=="string"&&a);if(!r.length)continue;let i=[...r].sort().join(" ");s.has(i)||(s.add(i),n.push(r))}return n.length?n:void 0}async function tr(e,t){let n=[],s=0;for(let r of t||[]){let i=X(r?.subject),a=Zn(r?.predicate),l=X(r?.object);if(!i||!a||!l){s+=1;continue}let c=`${i} ${a} ${l}`;n.push({id:Mo(i,a,l),s:i,p:a,o:l,text:c,tokens:mi({doc:c}),provenance:Qn(r?.provenance),createdAt:r?.createdAt||"",observedAt:r?.observedAt||"",quantifier:Qn(r?.quantifier),premiseTrusts:Array.isArray(r?.premiseTrusts)?r.premiseTrusts:void 0,ruleConfidence:typeof r?.ruleConfidence=="number"?r.ruleConfidence:void 0,environments:m_(r?.justification)})}let o=[];return n.length?(await to(e,r=>{let i=[],a=new Set,l=new Map;for(let u of n){let d=ag(r,u.id,u.provenance);for(let f of d.length?[]:cg(r,u.id,{quantifier:u.quantifier,environments:u.environments}))a.has(f)||(a.add(f),i.push(f)),(u.premiseTrusts!==void 0||u.ruleConfidence!==void 0)&&l.set(f,{premiseTrusts:u.premiseTrusts,ruleConfidence:u.ruleConfidence});for(let f of d){let p=lg(r,{groupId:u.id,s:u.s,p:u.p,o:u.o,label:ya(u.text),tokens:u.tokens,group:f,createdAt:u.createdAt,observedAt:u.observedAt,quantifier:u.quantifier,environments:u.environments});for(let m of ug(r,p))a.has(m)||(a.add(m),i.push(m));(u.premiseTrusts!==void 0||u.ruleConfidence!==void 0)&&l.set(p.candidate.id,{premiseTrusts:u.premiseTrusts,ruleConfidence:u.ruleConfidence})}o.push(u.id)}for(let u of i)Xo(r,eo(r,u),void 0,l.get(u));let c=[];for(let u of new Set(o))c.push(...pg(r,u));dg(r,c),js(r)}),{ids:o,appended:o.length,skipped:s}):{ids:o,appended:0,skipped:s}}async function gu(e,{name:t,kind:n,slots:s,provenance:o="",createdAt:r=""}={}){let i=fg[n];if(!i)throw new Error(`a rule kind must be one of ${h_.join(", ")}, got ${JSON.stringify(n)}`);let a=X(t);if(!a)throw new Error("a rule needs a name");let l=g_[n]||new Set,c=i.map(([p])=>X(s?.[p])),u=i.filter(([p],m)=>!l.has(p)&&!c[m]);if(u.length)throw new Error(`a ${n} rule needs ${u.map(([p])=>p).join(" + ")}`);if(n===Zr){let p=c[i.findIndex(([h])=>h==="objectRole")],m=c[i.findIndex(([h])=>h==="value")];if(!p&&!m)throw new Error(`a ${n} rule needs an objectRole or a value`)}let d=b_(n,a,c),f=ya(`${a} = ${n}(${c.join(", ")})`);return await to(e,async p=>{let m=p.individuals.find(w=>w?.id===d),h=m?.attributes?.find(w=>w?.prop==="mgx:factProvenance")?.value||"",g=[...new Set([...h.split(" | "),Qn(o)].filter(Boolean))],b=uu(m,r),y={id:d,label:f,class:Zo,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:xa,key:"ruleName",value:a},{prop:nr,key:"ruleKind",value:n},...i.map(([w,$],_)=>({prop:$,key:w,value:c[_],skip:!c[_]&&l.has(w)})).filter(w=>!w.skip).map(({skip:w,...$})=>$),{prop:st,key:"createdAt",value:b},...g.length?[{prop:"mgx:factProvenance",key:"provenance",value:g.join(" | ")}]:[]]};await zl(y),Zs(p,y),Xo(p,p.individuals.find(w=>w?.id===d)),js(p)}),{id:d}}function bu(e,t){let n=X(t);return(e?.individuals||[]).find(s=>s?.class===Zo&&(s.attributes||[]).find(o=>o?.prop===xa)?.value===n)}function w_(e,t){let n=X(t),s=o=>(o.attributes||[]).find(r=>r?.prop===nr)?.value||"";return(e?.individuals||[]).filter(o=>o?.class===Zo&&(o.attributes||[]).find(r=>r?.prop===xa)?.value===n).sort((o,r)=>s(o).localeCompare(s(r))||String(o.id).localeCompare(String(r.id)))}function wu(e){let t=[];for(let n of e?.individuals||[]){if(n?.class!==Zo)continue;let s=a=>(n.attributes||[]).find(l=>l?.prop===a)?.value,o=s(nr),r=fg[o];if(!r)continue;let i={};for(let[a,l]of r)i[a]=s(l)??"";t.push({id:n.id,name:s(xa)||"",kind:o,slots:i,provenance:s("mgx:factProvenance")||""})}return t.sort((n,s)=>n.name.localeCompare(s.name)||n.kind.localeCompare(s.kind)||String(n.id).localeCompare(String(s.id))),t}async function yu(e,t,n,s,o){let{relationFactsFor:r,renderFactLine:i,factPhrase:a,factTermVariants:l,byTrust:c,rows:u,HAS_PROPERTY_PREDICATE:d,findActionPath:f}=o,p=String(t||"").trim().toLowerCase(),m=l(X,n),h=l(X,s),g=r(p).filter(w=>m.has(w.fact.subject)&&h.has(w.fact.object));if(g.length){let w=g.slice().sort(($,_)=>c($.fact,_.fact))[0];return{citation:[i(w.fact),...w.aliasFacts.map($=>`${a($)}${$.provenance?` (source: ${$.provenance})`:""}`)]}}let b=bu(e,p),y=b?.attributes?.find(w=>w.prop===nr)?.value;if(b&&y===Jr){let w=b.attributes.find(P=>P.prop==="mgx:ruleBase1")?.value,$=b.attributes.find(P=>P.prop==="mgx:ruleBase2")?.value,_=X(n),v=X(s);if(!w||!$||!_||!v)return null;let R=f({entity:_,hopsTaken:0},P=>P.hopsTaken===2&&P.entity===v,P=>{if(P.hopsTaken>=2)return[];let T=P.hopsTaken===0?w:$;return r(T).filter(M=>M.fact.subject===P.entity).map(M=>({action:M,nextState:{entity:M.fact.object,hopsTaken:P.hopsTaken+1}}))},{maxDepth:2,stateKey:P=>`${P.entity}#${P.hopsTaken}`});if(!R)return null;let k=new Set,A=[];for(let P of R.actions){A.push(i(P.fact));for(let T of P.aliasFacts){let M=T.id||`${T.subject}|${T.predicate}|${T.object}`;k.has(M)||(k.add(M),A.push(`${a(T)}${T.provenance?` (source: ${T.provenance})`:""}`))}}return{citation:A}}if(b&&y===Qr){let w=b.attributes.find(S=>S.prop==="mgx:ruleBase1")?.value,$=b.attributes.find(S=>S.prop==="mgx:ruleFilterProperty")?.value;if(!w||!$)return null;let _=await yu(e,w,n,s,o);if(!_)return null;let v=X(n),x=X($),E=u.find(S=>S.predicate===d&&S.subject===v&&X(S.object)===x);return E?{citation:[..._.citation,i(E)]}:null}return null}async function mg(e,t,n,s){let{relationFactsFor:o,renderFactLine:r,factPhrase:i,factTermVariants:a,byTrust:l,rows:c,HAS_PROPERTY_PREDICATE:u,findReachableSet:d}=s,f=String(t||"").trim().toLowerCase(),p=a(X,n),m=o(f).filter(b=>p.has(b.fact.object));if(m.length){let b=new Map;for(let y of m)b.has(y.fact.subject)||b.set(y.fact.subject,[]),b.get(y.fact.subject).push(y);return[...b.entries()].map(([y,w])=>{let $=w.slice().sort((_,v)=>l(_.fact,v.fact))[0];return{subject:y,citation:[r($.fact),...$.aliasFacts.map(_=>`${i(_)}${_.provenance?` (source: ${_.provenance})`:""}`)]}})}let h=bu(e,f),g=h?.attributes?.find(b=>b.prop===nr)?.value;if(h&&g===Jr){let b=h.attributes.find(x=>x.prop==="mgx:ruleBase1")?.value,y=h.attributes.find(x=>x.prop==="mgx:ruleBase2")?.value,w=X(n);return!b||!y||!w?[]:d({entity:w,hopsTaken:0},x=>{if(x.hopsTaken>=2)return[];let E=x.hopsTaken===0?y:b;return o(E).filter(S=>S.fact.object===x.entity).map(S=>({action:S,nextState:{entity:S.fact.subject,hopsTaken:x.hopsTaken+1}}))},{maxDepth:2,stateKey:x=>`${x.entity}#${x.hopsTaken}`}).filter(x=>x.node.hopsTaken===2).map(({node:x,path:E})=>{let S=new Set,R=[];for(let k of E.actions.slice().reverse()){R.push(r(k.fact));for(let A of k.aliasFacts){let P=A.id||`${A.subject}|${A.predicate}|${A.object}`;S.has(P)||(S.add(P),R.push(`${i(A)}${A.provenance?` (source: ${A.provenance})`:""}`))}}return{subject:x.entity,citation:R}})}if(h&&g===Qr){let b=h.attributes.find(v=>v.prop==="mgx:ruleBase1")?.value,y=h.attributes.find(v=>v.prop==="mgx:ruleFilterProperty")?.value;if(!b||!y)return[];let w=await mg(e,b,n,s),$=X(y),_=[];for(let v of w){let x=X(v.subject),E=c.find(S=>S.predicate===u&&S.subject===x&&X(S.object)===$);E&&_.push({subject:v.subject,citation:[...v.citation,r(E)]})}return _}return[]}function Ct(e,t={}){let n=vu(e),s=Vh(e),o=[];for(let[r,i]of n.groups){let a=$u(r,i,n),l=s?.get(r);a.trust=bi(l?l.inputs:a.assertions,t).score,o.push(a)}return o}function vu(e){let t=e?.individuals||[],n=new Map(t.filter(a=>a?.class===Qo).map(a=>[a.id,a])),s=(e?.objectProperties||[]).find(a=>a?.prop===ln),o=new Map;for(let a of s?.examples||[])o.has(a.subject)||o.set(a.subject,[]),o.get(a.subject).push(a.object);let r=new Map;for(let a of t){if(a?.class!==Et||(a.attributes||[]).some(u=>u?.prop===Xr)||Vo(a.id))continue;let l=Nn(a.id),c=r.get(l);c?c.push(a):r.set(l,[a])}let i=new Map;for(let[a,l]of r){l.sort((d,f)=>d.id<f.id?-1:d.id>f.id?1:0);let c=Xl(Kr(l[0],"subject"),Kr(l[0],"predicate")),u=i.get(c);u?u.push(a):i.set(c,[a])}return{groups:r,groupsByPair:i,statedByRecord:o,sourceTypeOf:a=>(n.get(a)?.attributes||[]).find(l=>l?.prop==="mgx:sourceType")?.value||""}}function $u(e,t,n){let{statedByRecord:s,sourceTypeOf:o}=n,r=_j,i=Kr,a=[],l=[],c=[],u=new Set,d=[],f=new Set,p="";for(let g of t){if(xs(g.id)){let x=Ur(g.id),E=ra(g);for(let S of E)l.includes(S)||(l.push(S),x&&c.push(x));a.push({id:g.id,sourceId:"",sourceType:x,provenance:"",createdAt:r(g,Cn),ownTrust:Number(r(g,Ho))||0,assertedAt:r(g,On),rollup:{count:Number(r(g,Br))||E.length,sourceIds:E,earliest:r(g,Cn),latest:r(g,On)}});continue}let b=r(g,"mgx:factProvenance").split(" | ").filter(Boolean);for(let x of b)u.add(x);let[y]=s.get(g.id)||[],w=y||r(g,Yo),$=o(w);y&&!l.includes(y)&&(l.push(y),$&&c.push($));let _=r(g,st),v=r(g,qr);a.push({id:g.id,sourceId:w,sourceType:$,provenance:b.join(" | "),createdAt:_,...v?{observedAt:v}:{},ownTrust:Number(r(g,Eo))||0,assertedAt:au(b,_)}),p=p||i(g,"quantifier");for(let x of i(g,"justification").split(" | ")){let E=x.split(" ").filter(Boolean);if(!E.length)continue;let S=E.join(" ");f.has(S)||(f.add(S),d.push(E))}}let m=[],h=new Set;for(let g of d)for(let b of g)h.has(b)||(h.add(b),m.push(b));return{id:e,subject:i(t[0],"subject"),predicate:i(t[0],"predicate"),object:i(t[0],"object"),provenance:[...u].sort().join(" | "),quantifier:p,sourceIds:l,sourceTypes:c,environments:d,justification:m,assertions:a}}async function y_(e,t){let n=new Set((t||[]).filter(Boolean)),s=[];return n.size?(await to(e,o=>{let r=new Set,i=new Set;o.individuals=(o.individuals||[]).filter(a=>{if(a?.class!==Et)return!0;let l=Nn(a.id),c=n.has(a.id)?a.id:n.has(l)?l:"";return c?(i.add(c),r.add(a.id),!1):!0});for(let a of i)s.push(a);if(s.length){for(let a of o.objectProperties||[]){let l=a.examples||[];a.examples=l.filter(c=>!r.has(c?.subject)&&!r.has(c?.object)),a.count=a.examples.length}js(o)}}),{removed:s}):{removed:s}}function hg(e,{floor:t=v_}={}){let n=Ct(e).filter(r=>r.trust>=t),s=new Map;for(let r of n){if(ta(r.predicate)===Tl)continue;let i=`${r.subject} ${r.predicate}`;s.has(i)||s.set(i,[]),s.get(i).push(r)}let o=[];for(let r of s.values()){if(new Set(r.map(a=>a.object)).size<2)continue;let i=ta(r[0].predicate);i!==Al&&!Ol(r,i).contested||o.push(r.slice().sort((a,l)=>l.trust-a.trust||a.object.localeCompare(l.object)))}return o.sort((r,i)=>`${r[0].subject} ${r[0].predicate}`.localeCompare(`${i[0].subject} ${i[0].predicate}`))}var Jo,Zl,eu,Et,tu,Qo,Zo,nu,su,wj,ln,ou,Mh,ma,ql,Fh,yj,Lh,vj,Kl,ru,Dh,Ej,ns,qr,Yo,ha,Xr,Wh,_j,Kr,Xl,Gh,Vh,Tj,Lj,Nh,vn,Zh,Jl,Gj,Vl,Vj,cu,eg,lu,tg,Ql,tn,ya,Es,pu,r_,Jr,Qr,fu,mu,$a,Zr,hu,h_,xa,nr,fg,g_,b_,v_,sr,$_,x_,Ke=I(()=>{jt();Be();ls();en();en();ps();ih();ps();ea();Dl();$h();Dl();Jo=Q(".tmct","memory"),Zl=Q(Jo,"graph.json"),eu="Utterance",Et="Fact",tu="Session",Qo="Source",Zo="Rule",nu="mgx:saidInSession",su="mgx:inReplyTo",wj="mgx:derivedFrom",ln="mgx:statedBy",ou="mgx:canonicalisedFrom",Mh="mgx:sourceReliability",ma="src:operator-chat",ql="src:teach-chat",Fh="src:teach-node",yj=new Set(["visitor","tmct"]),Lh=48,vj=[{prop:"rdf:type",note:"rdf-ish typing attribute: owl:NamedIndividual (utterances/sessions) or rdf:Statement (reified facts)"},{prop:"mgx:utteranceRole",note:"who said it: visitor (an a-visitor-said item) or tmct (the response alongside it)"},{prop:"mgx:utteranceText",note:"the utterance's normalized text (capped)"},{prop:"mgx:utteranceTs",note:"when it was said, ISO-8601 (the chat turn timestamp)"},{prop:"mgx:utteranceParsed",note:"optional JSON of the parse the interpretation pipeline produced for this request"},{prop:nu,predicate:"saidInSession",note:"Utterance \u2192 Session it was said in; runtime observation, owned (no SEON term)"},{prop:su,predicate:"inReplyTo",note:"tmct Utterance \u2192 the visitor Utterance it answers (the Q/A pairing)"},{prop:"rdf:subject",note:"reified fact: the triple's subject term"},{prop:"rdf:predicate",note:"reified fact: the triple's predicate term"},{prop:"rdf:object",note:"reified fact: the triple's object term"},{prop:"mgx:factProvenance",note:"LEGACY COMPAT SHIM: the ' | '-joined provenance tag string a fact came from; the source-of-truth is now the mgx:statedBy edges derived from it"},{prop:"mgx:sourceId",note:"the assertion key a Fact record is filed under \u2014 the Source id of the ONE party asserting it, which is also the @-suffix of the record's own id. `src:none` when no tag names a Source, so every record has a key rather than a hole"},{prop:"mgx:observedAt",note:"OPTIONAL valid time: when the asserting party WITNESSED the claim, as against mgx:createdAt's transaction time (when this store recorded it). A stale article read today loses to an eyewitness report from yesterday. Stored only when a caller supplies one \u2014 never fabricated, never backfilled"},{prop:"mgx:supersedes",note:"the record id(s) this one replaced when its own source re-asserted the triple with a newer embedded timestamp. A space-joined LIST; absent, never empty, until the first supersession"},{prop:"mgx:supersededBy",note:"the record id(s) that replaced this one. Its presence is what makes a record a demoted leaf rather than a live head, and the group fold skips it: a source's past belief is not a second vote for the present one. A LIST, because one source with two live replicas can fork before they sync"},{prop:"mgx:factQuantifier",note:"OPTIONAL: the quantifier word a plural class-membership teach used ('every'/'some'/'a few'), for literal recall by 'how many Xs are Ys' \u2014 never real cardinality counting"},{prop:"mgx:factJustification",note:"an entailed Fact's supporting premise fact ids: ' | '-separated environments, one space-separated premise-id list per independent derivation, capped by syllogise's maxEnvironments knob; a value with no ' | ' is a single environment"},{prop:"mgx:ruleName",note:"a taught Rule's own name (e.g. 'grandparent') \u2014 the query-dispatcher's lookup key, PLAN_TAUGHT_RELATIONS.md \xA72/\xA73"},{prop:"mgx:ruleKind",note:"a taught Rule's SHAPE tag \u2014 the closed vocabulary compose2 | filter | recursive (structural, like 'Fact'/'Rule' themselves, never a domain word)"},{prop:"mgx:ruleBase1",note:"compose2: the first hop's base relation name; filter: the base rule/relation being filtered (same 'base relation' role in both kinds, so the name is shared)"},{prop:"mgx:ruleBase2",note:"compose2 only: the second hop's base relation name"},{prop:"mgx:ruleFilterProperty",note:"filter only: the property literal candidates are filtered by (an mgx:hasProperty-shaped Fact lookup)"},{prop:"mgx:ruleBaseCase",note:"recursive only: the base-case relation name (hop zero)"},{prop:"mgx:ruleRecStep",note:"recursive only: the self-referential recursive-step relation name"},{prop:st,note:"when an individual was FIRST written, ISO-8601 (first-write-wins on upsert); the audit 'when', the recency input to trust, the novelty signal"},{prop:us,note:"an audit / last-modified stamp: when an individual's OWN attributes were last mutated in place (upsertSession, recomputeFactTrust, recomputeSourceReliability) \u2014 most individuals never carry it at all. NOT transaction time: a mutable stamp cannot record when the previous version stopped being current, so tmct is not bitemporal"},{prop:wj,predicate:"derivedFrom",note:"umbrella: a Fact derived from a Source (or another Fact). ext ref prov:wasDerivedFrom (UNVERIFIED-pending-web-check)"},{prop:ln,predicate:"statedBy",note:"subPropertyOf derivedFrom: a Source directly asserts this Fact (one edge per independent source \u2014 replaces the factProvenance union)"},{prop:ou,predicate:"canonicalisedFrom",note:"subPropertyOf derivedFrom: a canonical Fact cleaned from a raw Block/Source, never replacing it"},{prop:"mgx:sourceType",note:"a Source's kind: operator | teach | provider | corpus | corpusWeak | reference | referenceLive | extracted | optimisticExtract | web | entailed (the trust-prior key)"},{prop:"mgx:sourceUrl",note:"a web Source's URL"},{prop:"mgx:sourceRule",note:"an entailed Source's rule id"},{prop:"mgx:sourceReliability",note:"actor-level (session-scoped) trust nudge in [0.5,1.5], neutral 1.0 when absent \u2014 materialised by recomputeSourceReliability from a session's asserted-vs-contradicted track record (memory/trust.mjs's sessionReliabilityFrom); folds into computeTrust's per-source prior"},{prop:Eo,note:"materialised trust cache in [0,1] \u2014 pure function of a fact's Sources + createdAt (memory/trust.mjs); invalidated when a statedBy edge is added"},{prop:hi,note:"JSON of the inputs the trust score was computed from (source-type multiset, corroboration count, createdAt, recency) \u2014 makes the score auditable"},{prop:"mgx:hasProseTokens",note:"prose tokens (prose.mjs tokenizer) backing the payload's proseIndex"},{prop:"mgx:sessionStarted",note:"session anchor: when the session started, ISO-8601"},{prop:"rdf:predicate",prefix:zo,note:"a reified fact's predicate carries its POLARITY: mgxneg:capableOf is the negative twin of mgx:capableOf ('a penguin cannot fly'). Polarity cannot be a separate property \u2014 the fact id hashes (subject, predicate, object), so both polarities would share one id and union their statedBy edges (memory/capability.mjs)"}];Kl=e=>Vr(e),ru="memory",Dh="sqlite";Ej=`
101
+ `))return r}}throw new he("cannot find end of structure",{toml:e,ptr:t})}var fa=O(()=>{to();});function Rj(e,t,n){let s=e.slice(t,n),o=s.indexOf("#");return o>-1&&(Jo(e,o),s=s.slice(0,o)),[s.trimEnd(),o]}function Hr(e,t,n,s,o){if(s===0)throw new he("document contains excessively nested structures. aborting.",{toml:e,ptr:t});let r=e[t];if(r==="["||r==="{"){let[l,c]=r==="["?Nh(e,t,s,o):Lh(e,t,s,o);if(n){if(c=On(e,c),e[c]===",")c++;else if(e[c]!==n)throw new he("expected comma or end of structure",{toml:e,ptr:c})}return[l,c]}if(r==='"'||r==="'"){let[l,c]=da(e,t);if(n){if(c=On(e,c),e[c]&&e[c]!==","&&e[c]!==n&&e[c]!==`
102
+ `&&e[c]!=="\r")throw new he("unexpected character encountered",{toml:e,ptr:c});e[c]===","&&c++}return[l,c]}let i=Oh(e,t,",",n),a=Rj(e,t,i-(e[i-1]===","?1:0));if(!a[0])throw new he("incomplete key-value declaration: no value specified",{toml:e,ptr:t});return n&&a[1]>-1&&(i=On(e,t+a[1]),e[i]===","&&i++),[Ch(a[0],e,t,o),i]}var Kl=O(()=>{Hl();Yl();fa();to();});function ma(e,t,n="="){let s=t-1,o=[],r=e.indexOf(n,t);if(r<0)throw new he("incomplete key-value: cannot find end of key",{toml:e,ptr:t});do{let i=e[t=++s];if(i!==" "&&i!==" ")if(i==='"'||i==="'"){if(i===e[t+1]&&i===e[t+2])throw new he("multiline strings are not allowed in keys",{toml:e,ptr:t});let[a,l]=da(e,t);s=e.indexOf(".",l);let c=e.slice(l,s<0||s>r?r:s),u=pa(c);if(u>-1)throw new he("newlines are not allowed in keys",{toml:e,ptr:t+s+u});if(c.trimStart())throw new he("found extra tokens after the string part",{toml:e,ptr:l});if(r<l&&(r=e.indexOf(n,l),r<0))throw new he("incomplete key-value: cannot find end of key",{toml:e,ptr:t});o.push(a)}else{s=e.indexOf(".",t);let a=e.slice(t,s<0||s>r?r:s);if(!Tj.test(a))throw new he("only letter, numbers, dashes and underscores are allowed in keys",{toml:e,ptr:t});o.push(a.trimEnd())}}while(s+1&&s<r);return[o,On(e,r+1,!0,!0)]}function Lh(e,t,n,s){let o={},r=new Set,i;for(t++;(i=e[t++])!=="}"&&i;){if(i===",")throw new he("expected value, found comma",{toml:e,ptr:t-1});if(i==="#")t=Jo(e,t);else if(i!==" "&&i!==" "&&i!==`
103
+ `&&i!=="\r"){let a,l=o,c=!1,[u,d]=ma(e,t-1);for(let m=0;m<u.length;m++){if(m&&(l=c?l[a]:l[a]={}),a=u[m],(c=Object.hasOwn(l,a))&&(typeof l[a]!="object"||r.has(l[a])))throw new he("trying to redefine an already defined value",{toml:e,ptr:t});!c&&a==="__proto__"&&Object.defineProperty(l,a,{enumerable:!0,configurable:!0,writable:!0})}if(c)throw new he("trying to redefine an already defined value",{toml:e,ptr:t});let[f,p]=Hr(e,d,"}",n-1,s);r.add(f),l[a]=f,t=p}}if(!i)throw new he("unfinished table encountered",{toml:e,ptr:t});return[o,t]}function Nh(e,t,n,s){let o=[],r;for(t++;(r=e[t++])!=="]"&&r;){if(r===",")throw new he("expected value, found comma",{toml:e,ptr:t-1});if(r==="#")t=Jo(e,t);else if(r!==" "&&r!==" "&&r!==`
104
+ `&&r!=="\r"){let i=Hr(e,t-1,"]",n-1,s);o.push(i[0]),t=i[1]}}if(!r)throw new he("unfinished array encountered",{toml:e,ptr:t});return[o,t]}var Tj,Yl=O(()=>{Hl();Kl();fa();to();Tj=/^[a-zA-Z0-9-_]+[ \t]*$/});function Mh(e,t,n,s){let o=t,r=n,i,a=!1,l;for(let c=0;c<e.length;c++){if(c){if(o=a?o[i]:o[i]={},r=(l=r[i]).c,s===0&&(l.t===1||l.t===2))return null;if(l.t===2){let u=o.length-1;o=o[u],r=r[u].c}}if(i=e[c],(a=Object.hasOwn(o,i))&&r[i]?.t===0&&r[i]?.d)return null;a||(i==="__proto__"&&(Object.defineProperty(o,i,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(r,i,{enumerable:!0,configurable:!0,writable:!0})),r[i]={t:c<e.length-1&&s===2?3:s,d:!1,i:0,c:{}})}if(l=r[i],l.t!==s&&!(s===1&&l.t===3)||(s===2&&(l.d||(l.d=!0,o[i]=[]),o[i].push(o={}),l.c[l.i++]=l={t:1,d:!1,i:0,c:{}}),l.d))return null;if(l.d=!0,s===1)o=a?o[i]:o[i]={};else if(s===0&&a)return null;return[i,o,l.c]}function Qo(e,{maxDepth:t=1e3,integersAsBigInt:n}={}){let s={},o={},r=s,i=o;for(let a=On(e,0);a<e.length;){if(e[a]==="["){let l=e[++a]==="[",c=ma(e,a+=+l,"]");if(l){if(e[c[1]-1]!=="]")throw new he("expected end of table declaration",{toml:e,ptr:c[1]-1});c[1]++}let u=Mh(c[0],s,o,l?2:1);if(!u)throw new he("trying to redefine an already defined table or value",{toml:e,ptr:a});i=u[2],r=u[1],a=c[1]}else{let l=ma(e,a),c=Mh(l[0],r,i,0);if(!c)throw new he("trying to redefine an already defined table or value",{toml:e,ptr:a});let u=Hr(e,l[1],void 0,t,n);c[1][c[0]]=u[0],a=u[1]}if(a=On(e,a,!0),e[a]&&e[a]!==`
105
+ `&&e[a]!=="\r")throw new he("each key-value declaration must be followed by an end-of-line",{toml:e,ptr:a});a=On(e,a)}return s}var Ph=O(()=>{Yl();Kl();fa();to();});var Fh=O(()=>{});var ha=O(()=>{Ph();Fh();Vl();to();});var Uh={};Fn(Uh,{CONFIG_FILE:()=>ba,loadTomlConfig:()=>Xl,mergeEffective:()=>zh,normalizeConfig:()=>Dh});async function Xl(e,{file:t}={}){let n=t||Q(e,ba),s;try{s=await ze(n,"utf8")}catch(o){if(o&&o.code==="ENOENT")return null;throw o}try{return Qo(s)}catch(o){throw new Error(`Invalid ${ba} at ${n}: ${o&&o.message?o.message:o}`)}}async function Aj(e,t){let n;if(Array.isArray(e))n=e;else{let o=Jt(t,String(e));n=(await ze(o,"utf8")).split(`
106
+ `)}let s=[];for(let o of n){let r=String(o).trim();!r||r.startsWith("#")||s.push(Jt(t,r))}return s}async function Dh(e,{configDir:t}={}){let n=e||{},s=t||process.cwd(),o={};if(n.repositories!==void 0&&(o.repositories=await Aj(n.repositories,s)),n.out_root!==void 0&&(o.outRoot=Jt(s,String(n.out_root))),n.graph_file!==void 0&&(o.graphFile=Jt(s,String(n.graph_file))),n.graph_files!==void 0){let w=Array.isArray(n.graph_files)?n.graph_files:[n.graph_files];o.graphFiles=w.map(v=>Jt(s,String(v)))}let r=n.graph||{};r.read_only!==void 0&&(o.graph={readOnly:r.read_only});let i=n.corpus||{};i.tier!==void 0&&(o.corpus={tier:i.tier});let a=n.seed||{},l={};a.enabled!==void 0&&(l.enabled=a.enabled),a.limit!==void 0&&(l.limit=a.limit),a.capture_unknown_context!==void 0&&(l.captureUnknownContext=a.capture_unknown_context),a.unknown_context_limit!==void 0&&(l.unknownContextLimit=a.unknown_context_limit),Object.keys(l).length&&(o.seed=l),n.extensions!==void 0&&(o.extensions=n.extensions),n.bias!==void 0&&(o.bias=n.bias),n.games!==void 0&&(o.games=n.games),n.planning!==void 0&&(o.planning=n.planning),n.research!==void 0&&(o.research=n.research),n.discourse!==void 0&&(o.discourse=n.discourse);let c=n.index||{},u={};c.languages!==void 0&&(u.languages=c.languages),c.exclude!==void 0&&(u.exclude=c.exclude),c.secret_exclude!==void 0&&(u.secretExclude=c.secret_exclude),c.history_depth!==void 0&&(u.historyDepth=c.history_depth),c.include_text!==void 0&&(u.includeText=c.include_text),c.include_structure!==void 0&&(u.includeStructure=c.include_structure),c.respect_gitignore!==void 0&&(u.respectGitignore=c.respect_gitignore),c.markdown_sections!==void 0&&(u.markdownSections=c.markdown_sections),c.vue!==void 0&&(u.vue=c.vue),Object.keys(u).length&&(o.index=u);let d=n.tune||{},f={};d.score_gap_k!==void 0&&(f.scoreGapK=d.score_gap_k),d.literal_mention!==void 0&&(f.literalMention=d.literal_mention),d.demote_non_prod!==void 0&&(f.demoteNonProd=d.demote_non_prod),d.call_adjacency!==void 0&&(f.callAdjacency=d.call_adjacency),d.impl_of_interface!==void 0&&(f.implOfInterface=d.impl_of_interface),d.beam_search!==void 0&&(f.beamSearch=d.beam_search),d.beam_width!==void 0&&(f.beamWidth=d.beam_width),d.prose_layers!==void 0&&(f.proseLayers=d.prose_layers);let p=d.expansion||{},m={};p.strategy!==void 0&&(m.strategy=p.strategy),p.nodes!==void 0&&(m.nodes=p.nodes),p.q!==void 0&&(m.q=p.q),p.depth!==void 0&&(m.depth=p.depth),Object.keys(m).length&&(f.expansion=m),Object.keys(f).length&&(o.tune=f);let h=n.telemetry||{};h.enabled!==void 0&&(o.telemetry={enabled:h.enabled});let g=n.memory||{},b={};g.retention_versions!==void 0&&(b.retentionVersions=g.retention_versions),g.backend!==void 0&&(b.backend=g.backend),Object.keys(b).length&&(o.memory=b);let y=[];for(let[w,v]of Ij)n[w]&&n[w][v]!==void 0&&y.push(`${w}.${v}`);return o.unwired=y,o}function ga(e,t="",n={}){for(let[s,o]of Object.entries(e||{})){if(o==null)continue;let r=t?`${t}.${s}`:s;Array.isArray(o)||typeof o!="object"?n[r]=o:ga(o,r,n)}return n}function zh({args:e={},toml:t=null,defaults:n={}}={}){let s=ga(n),o=null;if(t){let{unwired:u,...d}=t;o=d}let r=o?ga(o):{},i=ga(e),a=[...new Set([...Object.keys(s),...Object.keys(r),...Object.keys(i)])].sort(),l={},c={};for(let u of a)u in i?(l[u]=i[u],c[u]="arg"):u in r?(l[u]=r[u],c[u]="tmct.toml"):(l[u]=s[u],c[u]="default");return{effective:l,sources:c}}var ba,Ij,wa=O(()=>{_t();Ue();ha();ba="tmct.toml";Ij=[["index","include_text"],["index","include_structure"],["index","respect_gitignore"],["index","markdown_sections"],["index","vue"]]});var As={};Fn(As,{CANONICALISED_FROM_PROP:()=>lu,CAPABLE_OF_PREDICATE:()=>N_,CHAIN_KEEP_DEPTH:()=>bh,CHAIN_ROLLUP_THRESHOLD:()=>ca,CREATED_AT_PROP:()=>st,DEFAULT_RETENTION:()=>nu,FACT_CLASS:()=>St,GROUP_ROLLUP_THRESHOLD:()=>hh,HAS_A_PREDICATE:()=>ir,IN_REPLY_TO_PROP:()=>cu,MEMORY_DIR_REL:()=>tr,MEMORY_GRAPH_REL:()=>ou,MEMORY_MANIFEST_REL:()=>ag,MEMORY_SESSION_CLASS:()=>iu,MULTI_VALUED_PREDICATES:()=>M_,NODE_ID_REL:()=>mu,OPERATOR_SOURCE_ID:()=>ya,ROLLUP_COUNT_PROP:()=>Wr,ROLLUP_EARLIEST_PROP:()=>In,ROLLUP_KEEP_PER_TYPE:()=>gh,ROLLUP_LATEST_PROP:()=>Cn,ROLLUP_PRIOR_PROP:()=>Yo,ROLLUP_RECORD_IDS_PROP:()=>Br,ROLLUP_SOURCE_IDS_PROP:()=>Ko,RULE_CLASS:()=>sr,RULE_KIND_ACTION_CONSTRAINT:()=>$u,RULE_KIND_ACTION_EFFECT:()=>ti,RULE_KIND_ACTION_PRECOND:()=>ja,RULE_KIND_ACTION_SIGNATURE:()=>yu,RULE_KIND_COMPOSE2:()=>Zr,RULE_KIND_FILTER:()=>ei,RULE_KIND_PROP:()=>rr,RULE_KIND_RECURSIVE:()=>wu,SAID_IN_SESSION_PROP:()=>au,SOURCE_CLASS:()=>nr,SOURCE_RELIABILITY_PROP:()=>qh,STATED_BY_PROP:()=>ln,SYLLOGISE_STATE_REL:()=>fu,UPDATED_AT_PROP:()=>ds,UTTERANCE_CLASS:()=>ru,appendCanonicalisedFromEdges:()=>E_,appendFact:()=>__,appendFacts:()=>Ts,appendRule:()=>Ra,appendUtterance:()=>x_,appendUtterances:()=>mg,applySeedPayload:()=>Nj,attachFactHeads:()=>Zh,chainRollupIdFor:()=>Dl,cloneMemoryPayload:()=>Mj,closeSqliteMemoryStore:()=>sg,createInMemoryStore:()=>xa,createSqliteMemoryStore:()=>ng,emptyMemory:()=>Jr,factGroupId:()=>Nn,factHeadsOf:()=>eg,factIdForTriple:()=>ge,factRecordIdsFor:()=>or,findContradictions:()=>Eg,findRuleByName:()=>vu,findRulesByName:()=>C_,headRollupIdFor:()=>Fl,isChainRollupId:()=>Xo,isHeadRollupId:()=>Ss,isMemoryOrSqliteHandle:()=>du,isRollupId:()=>la,loadMemory:()=>Ct,loadNodeId:()=>p_,loadSyllogiseState:()=>u_,normFactPredicate:()=>Zn,normFactTerm:()=>X,openConfiguredMemoryBackend:()=>_s,openMemoryBackend:()=>og,provSourceClassFor:()=>m_,provenanceTagToSource:()=>ps,readFactRows:()=>vt,readObjectSupersessions:()=>Hj,readRuleRows:()=>xu,removeFacts:()=>O_,resolveMemoryGraphFile:()=>Kr,resolveRelationChase:()=>Eu,resolveRelationChaseReverse:()=>xg,saveNodeId:()=>f_,saveSyllogiseState:()=>d_,snapshotMemory:()=>r_});function Jr(){return{generated_at:"",memory:!0,prefixes:{owl:"http://www.w3.org/2002/07/owl#",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",mgx:"urn:tmct:mgx#",mgxneg:"urn:tmct:mgxneg#"},vocabulary:Lj.map(e=>({...e})),classes:[],objectProperties:[],individuals:[],proseIndex:{}}}function Kr(e,t=null){if(js(e)||Ln(e))throw new Error("resolveMemoryGraphFile: dir is a memory/sqlite handle, not a file path (Backend A only)");return t===null?Q(e,ou):Q(e,tr,`graph.v${t}.json`)}function js(e){return!!e&&typeof e=="object"&&e.backend===uu}function Ln(e){return!!e&&typeof e=="object"&&e.backend===Hh}function du(e){return js(e)||Ln(e)}function xa(){return{backend:uu,payload:Jr()}}function Nj(e,t){t&&(e.payload={...e.payload,...t})}function Mj(e){if(!e)return null;try{return structuredClone(e)}catch{return JSON.parse(JSON.stringify(e))}}function Kh(e){for(let t of String(e||"").split(" | ")){if(!t)continue;let n=gu(ps(t));if(n)return n}return{id:ns,type:""}}function Nn(e){let t=String(e||""),n=t.indexOf("@");return n<0?t:t.slice(0,n)}function Fj(e){return gu(ps(e))||{id:ns,type:""}}function Yh(e){let t=new Map;for(let n of String(e||"").split(" | ")){let s=n.trim();if(!s)continue;let{id:o,type:r}=Fj(s),i=t.get(o)||{sourceId:o,sourceType:r,tags:[]};i.tags.includes(s)||i.tags.push(s),t.set(o,i)}return t.size||t.set(ns,{sourceId:ns,sourceType:"",tags:[]}),[...t.values()]}function eu(e,t=Math.max){let n="",s=null;for(let o of e||[]){let r=ps(o)?.createdAt||"",i=Date.parse(r);Number.isFinite(i)&&(s===null||t(i,s)===i)&&(n=r,s=i)}return n}function pu(e,t="",n=Math.max){return eu(e,n)||(Number.isFinite(Date.parse(t))?String(t):"")}function Dj(e,t){let n=Date.parse(e.assertedAt),s=Date.parse(t.assertedAt);return!Number.isFinite(n)||!Number.isFinite(s)?!1:n>s?!0:n===s&&!!e.observedAt&&!t.observedAt}function Xh(e,t){let n=i=>(e.attributes||[]).find(a=>a?.prop===i)?.value||"",s=Kh(n("mgx:factProvenance")),o=n(Qr).split(" ").filter(Boolean)[0]||null,r=Gr(e.id);return[e.id,Nn(e.id),n("rdf:subject"),n("rdf:predicate"),n("rdf:object"),n(Zo)||s.id,r||s.type,Number(n(r?Yo:_o))||0,n(st),n(Yr)||null,o,t]}function zj(e){if(e.prepare("SELECT id FROM facts LIMIT 1").get()||!e.prepare("SELECT id FROM individuals WHERE class = ? LIMIT 1").get(St))return;let t=e.prepare(Jh);e.exec("BEGIN IMMEDIATE");try{for(let n of e.prepare("SELECT json FROM individuals WHERE class = ?").all(St))t.run(...Xh(JSON.parse(n.json),n.json));e.exec("COMMIT")}catch(n){throw e.exec("ROLLBACK"),n}}function Bj(e){return(e||[]).map(t=>({sourceId:t.sourceId||"",sourceType:t.sourceType||"",ownTrust:t.ownTrust,assertedAt:t.assertedAt||""}))}function Zh(e,t){return e&&t&&(e[Qh]=t),e}function Gj(e){let t=new Map;for(let n of e.prepare("SELECT triple_hash, trust_base, inputs_json FROM fact_heads").all())t.set(n.triple_hash,{trustBase:n.trust_base,inputs:JSON.parse(n.inputs_json)});return t}function tg(e,t,n,s){let o=e.prepare(Wj),r=e.prepare("DELETE FROM fact_heads WHERE triple_hash = ?"),i=ks();for(let a of n){let l=t.groups.get(a);if(!l?.length){r.run(a),s?.delete(a);continue}let c=Bj(ku(a,l,t).assertions),u=vp(c).score;o.run(a,u,JSON.stringify(c),i),s?.set(a,{trustBase:u,inputs:c})}}function qj(e){let t=e.db;if(t.prepare("SELECT triple_hash FROM fact_heads LIMIT 1").get()||!t.prepare("SELECT id FROM individuals WHERE class = ? LIMIT 1").get(St))return;let n=Su(rg(e));t.exec("BEGIN IMMEDIATE");try{tg(t,n,n.groups.keys(),null),t.exec("COMMIT")}catch(s){throw t.exec("ROLLBACK"),s}}function Vj(e,t,n){let s=e.prepare("SELECT ord, to_id FROM fact_object_supersessions WHERE subject = ? AND predicate = ? ORDER BY ord DESC LIMIT 1"),o=e.prepare("INSERT INTO fact_object_supersessions(subject, predicate, ord, from_id, to_id, recorded_at) VALUES (?, ?, ?, ?, ?, ?)"),r=ks();for(let i of n){let[a,l]=i.split("\0");if(ia(l)!==Ur)continue;let c=t.groupsByPair.get(i)||[];if(c.length<2)continue;let u=c.map(p=>{let m=ku(p,t.groups.get(p),t);return m.trust=vi(m.assertions).score,m});if(new Set(u.map(p=>p.object)).size<2)continue;let d=Pl(u,Ur)?.winner?.id;if(!d)continue;let f=s.get(a,l);f?.to_id!==d&&o.run(a,l,(f?.ord??-1)+1,f?.to_id||"",d,r)}}function Hj(e,{subject:t,predicate:n}={}){if(!Ln(e))return[];let s=t&&n?" WHERE subject = ? AND predicate = ?":"",o=s?[t,n]:[];return e.db.prepare(`SELECT subject, predicate, ord, from_id, to_id, recorded_at FROM fact_object_supersessions${s} ORDER BY subject, predicate, ord`).all(...o).map(r=>({subject:r.subject,predicate:r.predicate,ord:r.ord,fromId:r.from_id,toId:r.to_id,recordedAt:r.recorded_at}))}function Yj(){if(Wh)return;Wh=!0;let e=process.listeners("warning").slice();process.removeAllListeners("warning"),process.on("warning",t=>{if(!(t?.name==="ExperimentalWarning"&&/sqlite/i.test(String(t?.message))))if(e.length)for(let n of e)n(t);else console.error(t.stack||String(t))})}async function ng(e){Yj();let{DatabaseSync:t}=await Promise.resolve().then(()=>(Ih(),Ah)),n=new t(e);n.exec("PRAGMA journal_mode = WAL"),n.exec("PRAGMA synchronous = NORMAL"),n.exec(Pj),zj(n);let s={backend:Hh,db:n,dbPath:e};return qj(s),s}function sg(e){Ln(e)&&e.db.close()}async function og(e,t){if(t===uu)return{dir:xa(),close:async()=>{}};let n=Q(e,".tmct","memory","graph.sqlite"),s=r=>Wd(r).then(()=>!0,()=>!1);!await s(n)&&await s(Q(e,ou))&&process.stderr.write(`found .tmct/memory/graph.json \u2014 the flat-file memory backend is retired; starting a fresh sqlite store (the old file is left untouched)
107
+ `),await xn(ve(n),{recursive:!0});let o=await ng(n);return{dir:o,close:async()=>sg(o)}}async function _s(e,t=process.env){let n=String(t?.TMCT_MEMORY_BACKEND||"").trim().toLowerCase();if(!n)try{let{loadTomlConfig:s}=await Promise.resolve().then(()=>(wa(),Uh));n=String((await s(e))?.memory?.backend||"").trim().toLowerCase()}catch{n=""}return og(e,n)}function Xj(e){let t=e.db.prepare("PRAGMA data_version").get()?.data_version;return e.cachedPayload&&e.cachedDataVersion!==t&&(e.cachedPayload=null),e.cachedPayload||(e.cachedPayload=rg(e),e.cachedFactHeads=Gj(e.db),e.cachedDataVersion=t),Zh($n(e.cachedPayload),e.cachedFactHeads)}function rg(e){let t=e.db,n=Jr(),s=(a,l)=>{let c=t.prepare("SELECT v FROM meta WHERE k = ?").get(a);return c?JSON.parse(c.v):l},o=t.prepare("SELECT json FROM individuals ORDER BY ord").all().map(a=>JSON.parse(a.json)),r=t.prepare("SELECT subject, object, subject_label, object_label, extra FROM edges WHERE prop = ? ORDER BY rowid"),i=t.prepare("SELECT prop, predicate, count FROM relations ORDER BY ord").all().map(a=>({predicate:a.predicate,prop:a.prop,count:a.count,examples:r.all(a.prop).map(l=>{let c={subject:l.subject,object:l.object,subjectLabel:l.subject_label,objectLabel:l.object_label};return l.extra&&Object.assign(c,JSON.parse(l.extra)),c})}));return{generated_at:s("generated_at",n.generated_at),memory:s("memory",n.memory),prefixes:s("prefixes",n.prefixes),vocabulary:s("vocabulary",n.vocabulary),classes:s("classes",n.classes),objectProperties:i,individuals:o,proseIndex:s("proseIndex",n.proseIndex)}}function Jj(e,t){let n=$n(t),s=e.individuals.findIndex(o=>o?.id===t.id);s>=0?e.individuals[s]=n:e.individuals.push(n)}function Qj(e,t){e.individuals=e.individuals.filter(n=>t.has(n?.id))}function Zj(e,t){let n=e.objectProperties.find(s=>s?.prop===t);return n||(n={predicate:null,prop:t,count:0,examples:[]},e.objectProperties.push(n)),n}function e_(e,t,n){let s=`${t.subject}\0${t.object}`;e.examples=e.examples.filter(r=>`${r.subject}\0${r.object}`!==s);let o={subject:t.subject,object:t.object,subjectLabel:t.subjectLabel??null,objectLabel:t.objectLabel??null};n.length&&Object.assign(o,$n(Object.fromEntries(n.map(r=>[r,t[r]])))),e.examples.push(o)}function t_(e,t){e.examples=e.examples.filter(n=>t.has(`${n.subject}\0${n.object}`))}function n_(e,t){e.objectProperties=e.objectProperties.filter(n=>t.has(n?.prop))}function s_(e,t){let n=e.db,s=Jr(),o=e.cachedPayload||null;n.exec("BEGIN IMMEDIATE");try{let r=n.prepare("INSERT OR REPLACE INTO meta(k, v) VALUES (?, ?)");r.run("generated_at",JSON.stringify(t.generated_at??s.generated_at)),r.run("memory",JSON.stringify(t.memory??s.memory)),r.run("prefixes",JSON.stringify(t.prefixes??s.prefixes)),r.run("vocabulary",JSON.stringify(t.vocabulary??s.vocabulary)),r.run("classes",JSON.stringify(t.classes??s.classes)),r.run("proseIndex",JSON.stringify(t.proseIndex??s.proseIndex)),o&&(o.generated_at=$n(t.generated_at??s.generated_at),o.memory=$n(t.memory??s.memory),o.prefixes=$n(t.prefixes??s.prefixes),o.vocabulary=$n(t.vocabulary??s.vocabulary),o.classes=$n(t.classes??s.classes),o.proseIndex=$n(t.proseIndex??s.proseIndex));let i=n.prepare("SELECT ord, json FROM individuals WHERE id = ?"),l=n.prepare("SELECT COALESCE(MAX(ord), -1) AS m FROM individuals").get().m+1,c=n.prepare("INSERT OR REPLACE INTO individuals(id, ord, class, label, json) VALUES (?, ?, ?, ?, ?)"),u=n.prepare(Jh),d=new Set,f=new Set,p=new Set;for(let S of t.individuals||[]){d.add(S.id);let R=JSON.stringify(S),k=i.get(S.id);if(k&&k.json===R)continue;let A=k?k.ord:l++;c.run(S.id,A,S.class??null,S.label??null,R),S.class===St&&(u.run(...Xh(S,R)),f.add(Nn(S.id)),p.add(tu(Xr(S,"subject"),Xr(S,"predicate")))),o&&Jj(o,S)}let m=n.prepare("DELETE FROM individuals WHERE id = ?"),h=n.prepare("DELETE FROM facts WHERE id = ?"),g=n.prepare("SELECT triple_hash, subject, predicate FROM facts WHERE id = ?");for(let S of n.prepare("SELECT id FROM individuals").all()){if(d.has(S.id))continue;let R=g.get(S.id);R&&(f.add(R.triple_hash),p.add(tu(R.subject,R.predicate))),m.run(S.id),h.run(S.id)}o&&Qj(o,d);let b=n.prepare("SELECT ord FROM relations WHERE prop = ?"),w=n.prepare("SELECT COALESCE(MAX(ord), -1) AS m FROM relations").get().m+1,v=n.prepare("INSERT OR REPLACE INTO relations(prop, ord, predicate, count) VALUES (?, ?, ?, ?)"),_=n.prepare("SELECT subject, object, subject_label, object_label, extra FROM edges WHERE prop = ?"),$=n.prepare("INSERT OR REPLACE INTO edges(prop, subject, object, subject_label, object_label, extra) VALUES (?, ?, ?, ?, ?, ?)"),x=n.prepare("DELETE FROM edges WHERE prop = ? AND subject = ? AND object = ?"),E=new Set;for(let S of t.objectProperties||[]){E.add(S.prop);let R=_.all(S.prop),k=new Map(R.map(U=>[`${U.subject}\0${U.object}`,U])),A=new Set,M=o?Zj(o,S.prop):null;for(let U of S.examples||[]){let Z=`${U.subject}\0${U.object}`;A.add(Z);let J=Object.keys(U).filter(W=>!Kj.has(W)),ne=J.length?JSON.stringify(Object.fromEntries(J.map(W=>[W,U[W]]))):null,D=k.get(Z);D&&(D.subject_label??null)===(U.subjectLabel??null)&&(D.object_label??null)===(U.objectLabel??null)&&(D.extra??null)===(ne??null)||($.run(S.prop,U.subject,U.object,U.subjectLabel??null,U.objectLabel??null,ne),M&&e_(M,U,J))}for(let U of k.keys()){if(A.has(U))continue;let[Z,J]=U.split("\0");x.run(S.prop,Z,J)}M&&t_(M,A);let T=Number.isFinite(S.count)?S.count:(S.examples||[]).length,P=b.get(S.prop)?.ord??w++;v.run(S.prop,P,S.predicate??null,T),M&&(M.predicate=S.predicate??null,M.count=T)}for(let S of n.prepare("SELECT prop FROM relations").all())E.has(S.prop)||(n.prepare("DELETE FROM edges WHERE prop = ?").run(S.prop),n.prepare("DELETE FROM relations WHERE prop = ?").run(S.prop));if(o&&n_(o,E),f.size){let S=Su(t);tg(n,S,f,e.cachedFactHeads),Vj(n,S,p)}n.exec("COMMIT")}catch(r){throw n.exec("ROLLBACK"),e.cachedPayload=void 0,e.cachedFactHeads=void 0,r}}async function ig(e,t){let n=`${e}.tmp-${process.pid}-${Math.random().toString(36).slice(2,10)}`;await mr(n,t),await mi(n,e)}async function Ea(e,t){await ig(e,JSON.stringify(t))}async function r_(e,{retentionVersions:t}={}){if(du(e))throw new Error("snapshotMemory only supports the flat-JSON backend (Backend A) \u2014 a memory/sqlite handle has no on-disk graph.json to snapshot");let n=Kr(e),s;try{s=await ze(n,"utf8")}catch(u){if(u?.code==="ENOENT")return{skipped:!0,version:null,prunedVersion:null};throw u}let o=o_(e),r;try{r=JSON.parse(await ze(o,"utf8"))}catch(u){if(u?.code!=="ENOENT")throw u;r={version:0,retentionVersions:t??nu}}Number.isInteger(r.version)||(r.version=0),Number.isInteger(r.retentionVersions)||(r.retentionVersions=t??nu);let i=r.version,a=Kr(e,i);await xn(ve(a),{recursive:!0}),await ig(a,s),r.version=i+1;let l=null,c=i-r.retentionVersions;if(c>=0)try{await oc(Kr(e,c)),l=c}catch(u){if(u?.code!=="ENOENT")throw u}return await Ea(o,r),{skipped:!1,version:i,prunedVersion:l}}async function Ct(e){if(js(e))return Jl(e.payload);if(Ln(e))return Jl(Xj(e));let t;try{t=await ze(Zl(e),"utf8")}catch(n){if(n?.code==="ENOENT")return Jr();throw n}return Jl(JSON.parse(t))}function a_(e){if(!Array.isArray(e?.individuals))return e;let t=new Map;for(let s of e.individuals){if(s?.class!==St||!i_.test(s.id||""))continue;let o=i=>(s.attributes||[]).find(a=>a?.key===i)?.value||"",r=Uo(o("subject"),o("predicate"),o("object"));r!==s.id&&(t.set(s.id,r),s.id=r)}if(!t.size)return e;let n=s=>t.get(s)||s;for(let s of e.objectProperties||[])for(let o of s.examples||[])o&&(t.has(o.subject)&&(o.subject=t.get(o.subject)),t.has(o.object)&&(o.object=t.get(o.object)));for(let s of e.individuals){Array.isArray(s?.derived_from)&&s.derived_from.length&&(s.derived_from=s.derived_from.map(n));let o=(s?.attributes||[]).find(r=>r?.prop==="mgx:factJustification");o?.value&&(o.value=o.value.split(" | ").map(r=>r.split(" ").filter(Boolean).map(n).join(" ")).filter(Boolean).join(" | "))}return e}function c_(e){if(!Array.isArray(e?.individuals))return e;let t=(e.objectProperties||[]).find(l=>l?.prop===ln),n=new Map;for(let l of t?.examples||[]){if(!l?.subject)continue;let c=n.get(l.subject);c?c.push(l):n.set(l.subject,[l])}let s=new Set,o=new Map,r=[],i=[],a=[];for(let l of e.individuals){if(l?.class!==St||String(l.id||"").includes("@")){a.push(l);continue}let c=w=>(l.attributes||[]).find(v=>v?.prop===w)?.value||"",u=c("rdf:subject"),d=c("rdf:predicate"),f=c("rdf:object");if(!u||!d||!f){a.push(l);continue}let p=Uo(u,d,f),m=c(st),h=c("mgx:factProvenance"),g=n.get(l.id)||[],b=h?Yh(h):[];for(let w of g)b.some(v=>v.sourceId===w.object)||b.push({sourceId:w.object,sourceType:"",tags:[]});b.length||b.push({sourceId:ns,sourceType:"",tags:[]});let y=[];for(let w of b){let v={id:`${p}@${w.sourceId}`,label:l.label,class:St,derived_from:$n(l.derived_from)||[],mentions:$n(l.mentions)||[],attributes:[{prop:"rdf:type",key:"type",value:"rdf:Statement"},{prop:"rdf:subject",key:"subject",value:u},{prop:"rdf:predicate",key:"predicate",value:d},{prop:"rdf:object",key:"object",value:f},{prop:st,key:"createdAt",value:pu(w.tags,m,Math.min)||m||ks()},{prop:Zo,key:"sourceId",value:w.sourceId},...w.tags.length?[{prop:"mgx:factProvenance",key:"provenance",value:w.tags.join(" | ")}]:[],...c("mgx:hasProseTokens")?[{prop:"mgx:hasProseTokens",key:"prose_tokens",value:c("mgx:hasProseTokens")}]:[],...c("mgx:factQuantifier")?[{prop:"mgx:factQuantifier",key:"quantifier",value:c("mgx:factQuantifier")}]:[],...w.sourceType==="entailed"&&c("mgx:factJustification")?[{prop:"mgx:factJustification",key:"justification",value:c("mgx:factJustification")}]:[]]};if(a.push(v),r.push(v),y.push(v.id),w.sourceId!==ns){let _=g.find($=>$?.object===w.sourceId);i.push({..._||{},subject:v.id,object:w.sourceId,subjectLabel:v.label,objectLabel:bu(w.sourceId)})}}s.add(l.id),o.set(l.id,y)}if(!s.size)return e;t?(t.examples=(t.examples||[]).filter(l=>!s.has(l?.subject)),t.examples.push(...i),t.count=t.examples.length):i.length&&(e.objectProperties=e.objectProperties||[],e.objectProperties.push({predicate:"statedBy",prop:ln,count:i.length,examples:i}));for(let l of e.objectProperties||[]){if(l?.prop===ln||!l?.examples?.length)continue;let c=[];for(let u of l.examples){let d=s.has(u?.subject)?o.get(u.subject)||[]:[u?.subject],f=s.has(u?.object)?o.get(u.object)||[]:[u?.object];for(let p of d)for(let m of f)c.push({...u,subject:p,object:m})}l.examples=c,l.count=c.length}e.individuals=a,ug(e);for(let l of r)er(e,l);return Rs(e),e}async function l_(e,t){if(js(e)){e.payload=t;return}if(Ln(e)){s_(e,t);return}await xn(ve(Zl(e)),{recursive:!0}),await Ea(Zl(e),t)}async function u_(e){if(js(e))return e.syllogiseState?structuredClone(e.syllogiseState):null;if(Ln(e)){let t=e.db.prepare("SELECT v FROM meta WHERE k = ?").get(cg);return t?.v?JSON.parse(t.v):null}try{return JSON.parse(await ze(Q(e,fu),"utf8"))}catch(t){if(t?.code==="ENOENT")return null;throw t}}async function d_(e,t){if(js(e)){e.syllogiseState=structuredClone(t);return}if(Ln(e)){e.db.prepare("INSERT OR REPLACE INTO meta(k, v) VALUES (?, ?)").run(cg,JSON.stringify(t));return}let n=Q(e,fu);await xn(ve(n),{recursive:!0}),await Ea(n,t)}async function p_(e){if(js(e))return e.nodeId||null;if(Ln(e)){let t=e.db.prepare("SELECT v FROM meta WHERE k = ?").get(lg);return t?.v&&JSON.parse(t.v).nodeId||null}try{return JSON.parse(await ze(Q(e,mu),"utf8")).nodeId||null}catch(t){if(t?.code==="ENOENT")return null;throw t}}async function f_(e,t){if(js(e)){e.nodeId=t;return}if(Ln(e)){e.db.prepare("INSERT OR REPLACE INTO meta(k, v) VALUES (?, ?)").run(lg,JSON.stringify({nodeId:t}));return}let n=Q(e,mu);await xn(ve(n),{recursive:!0}),await Ea(n,{nodeId:t})}function ug(e){let t=new Map,n=new Map,s=new Map,o=new Map;for(let i of e.individuals||[])if(i?.id&&(t.set(i.id,i),i.class===nr&&n.set(i.id,i),i.class===St)){let a=Nn(i.id),l=o.get(a);l?l.push(i.id):o.set(a,[i.id])}let r=(e.objectProperties||[]).find(i=>i?.prop===ln);for(let i of r?.examples||[]){if(!i?.subject)continue;let a=s.get(i.subject);a?a.push(i.object):s.set(i.subject,[i.object])}return e[su]={individualsById:t,sourcesById:n,statedByBySubject:s,factRecordsByGroup:o},e[su]}async function oo(e,t){let n=await Ct(e);ug(n);let s=await t(n)??n;return w_(s),$_(s),s.proseIndex=lp(s.individuals),await l_(e,s),s}function hu(e,t){return e?.attributes?.find(n=>n?.prop===st)?.value||t||ks()}function un(e,t,n,s){e.attributes=(e.attributes||[]).filter(o=>o?.prop!==t),e.attributes.push({prop:t,key:n,value:s})}function gu(e){switch(e?.kind){case"operator":return{id:e.sessionId?`${ya}:${e.sessionId}`:ya,type:"operator"};case"teach":return{id:e.sessionId?`${Ql}:${e.sessionId}`:Ql,type:"teach"};case"teachNode":return{id:`${Vh}:${e.nodeId}`,type:"teach"};case"provider":return{id:`src:provider:${e.name}`,type:"provider"};case"corpus":return{id:`src:corpus:${e.name}`,type:"corpus"};case"corpusWeak":return{id:`src:corpus-weak:${e.name}`,type:"corpusWeak"};case"reference":return{id:`src:reference:${e.pack}:${e.article}`,type:"reference"};case"referenceLive":return{id:`src:reference:${e.pack}:${e.article}`,type:"referenceLive"};case"extracted":return{id:`src:extracted:${e.name}`,type:"extracted"};case"optimisticExtract":return{id:`src:optimistic-extract:${e.name}`,type:"optimisticExtract"};case"web":return{id:`src:learned:web:${Fr(String(e.url||""))}`,type:"web",url:String(e.url||"")};case"entailed":return{id:`src:entailed:${e.rule}`,type:"entailed",rule:String(e.rule||"")};default:return null}}function m_(e){return hc[e]||null}function h_(e,t,n){let s=gu(t);if(!s)return null;let o=tn(e),r=o?o.individualsById.get(s.id):e.individuals.find(c=>c?.id===s.id),i=hu(r,t?.createdAt||n),a={id:s.id,label:bu(s.id),class:nr,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:"mgx:sourceType",key:"sourceType",value:s.type},{prop:st,key:"createdAt",value:i},...s.url?[{prop:"mgx:sourceUrl",key:"sourceUrl",value:s.url}]:[],...s.rule?[{prop:"mgx:sourceRule",key:"sourceRule",value:s.rule}]:[]]},l=no(e,a);return o&&o.sourcesById.set(s.id,l),s.id}function ka(e){let t=tn(e),n={};if(t){for(let[s,o]of t.sourcesById)n[s]=o;return n}for(let s of e.individuals)s?.class===nr&&(n[s.id]=s);return n}function dg(e,t){let n=tn(e);return n?(n.statedByBySubject.get(t)||[]).slice():(e.objectProperties.find(o=>o?.prop===ln)?.examples||[]).filter(o=>o?.subject===t).map(o=>o.object)}function g_(e,t,n=Date.now(),s={}){let o=dg(e,t.id),r=(t.attributes||[]).find(l=>l?.prop===st)?.value||"",{score:i,inputs:a}=$p({sourceIds:o,createdAt:r},ka(e),{now:n,...Array.isArray(s?.premiseTrusts)?{premiseTrusts:s.premiseTrusts}:{},...typeof s?.ruleConfidence=="number"?{ruleConfidence:s.ruleConfidence}:{}});un(t,_o,"trustScore",String(i)),un(t,yi,"trustInputs",JSON.stringify(a)),un(t,ds,"updatedAt",new Date(n).toISOString())}function b_(e,t,n=Date.now(),s={}){let[o]=dg(e,t.id),r=o?ka(e)[o]:null,i=(r?.attributes||[]).find(c=>c?.prop==="mgx:sourceType")?.value||"",a=$i(i,r);if(i==="entailed"&&Array.isArray(s?.premiseTrusts)&&s.premiseTrusts.length){let c=typeof s.ruleConfidence=="number"?s.ruleConfidence:1;a=Math.max(0,Math.min(1,Math.min(...s.premiseTrusts)*c))}let l=(t.attributes||[]).find(c=>c?.prop===st)?.value||"";un(t,_o,"trustScore",String(a)),un(t,yi,"trustInputs",JSON.stringify({sourceType:i,sourceId:o||"",createdAt:l})),un(t,ds,"updatedAt",new Date(n).toISOString())}function pg(e,t,n,s){t?.class===St?b_(e,t,n,s):g_(e,t,n,s)}function er(e,t,n=Date.now(),s={}){let o=(t.attributes||[]).find(i=>i?.prop==="mgx:factProvenance")?.value||"",r=(t.attributes||[]).find(i=>i?.prop===st)?.value||new Date(n).toISOString();for(let i of o.split(" | ").filter(Boolean)){let a=ps(i);if(!a)continue;let l=h_(e,a,r);l&&va(e,{predicate:"statedBy",prop:ln},{subject:t.id,object:l,subjectLabel:t.label,objectLabel:bu(l)})}pg(e,t,n,s)}function w_(e){if(!Array.isArray(e?.individuals)||!Array.isArray(e?.objectProperties))return;let t=e.objectProperties.find(r=>r?.prop===ln),n=new Set((t?.examples||[]).map(r=>r.subject)),s=!1,o=Date.now();for(let r of e.individuals)r?.class!==St||n.has(r.id)||!(r.attributes||[]).find(a=>a?.prop==="mgx:factProvenance")?.value||(er(e,r,o),s=!0);s&&Rs(e)}function $_(e){if(!Array.isArray(e?.individuals)||!Array.isArray(e?.objectProperties))return;let t=vt(e),n=new Set;for(let a of Eg(e))for(let l of a)n.add(l.id);let s=new Map;for(let a of t)for(let l of a.sourceIds){if(!y_(l))continue;let c=s.get(l)||{factsAsserted:0,factsContradicted:0};c.factsAsserted+=1,n.has(a.id)&&(c.factsContradicted+=1),s.set(l,c)}if(!s.size)return;let o=tn(e);for(let[a,l]of s){let c=o?o.individualsById.get(a):e.individuals.find(u=>u?.id===a);c&&(un(c,qh,"sourceReliability",String(xp(l))),un(c,ds,"updatedAt",new Date().toISOString()))}let r=e.objectProperties.find(a=>a?.prop===ln),i=new Set;for(let a of r?.examples||[])s.has(a?.object)&&i.add(a.subject);for(let a of i){let l=o?o.individualsById.get(a):e.individuals.find(c=>c?.id===a);l&&pg(e,l)}}function Gh(e,t,n){if(!la(n?.id))return n;let s=Gr(n.id);if(!s)return Wl(t,n);let o=ka(e);return Wl(t,n,{priorFor:r=>$i(s,o[r])})}function no(e,t){let n=tn(e);if(n){let o=n.individualsById.get(t.id);if(o)return Object.assign(o,Gh(e,o,t)),o;if(e.individuals.push(t),n.individualsById.set(t.id,t),t.class===St){let r=Nn(t.id),i=n.factRecordsByGroup.get(r);i?i.push(t.id):n.factRecordsByGroup.set(r,[t.id])}return t}let s=e.individuals.findIndex(o=>o?.id===t.id);return s>=0?(e.individuals[s]=Gh(e,e.individuals[s],t),e.individuals[s]):(e.individuals.push(t),t)}function va(e,{predicate:t,prop:n},s){let o=e.objectProperties.find(l=>l?.prop===n);o||(o={predicate:t,prop:n,count:0,examples:[]},e.objectProperties.push(o));let r=n===ln?tn(e):null;if(r){let l=r.statedByBySubject.get(s.subject);if(!l||!l.includes(s.object)){o.examples.push({...s,createdAt:s.createdAt||ks()}),o.count=o.examples.length,l?l.push(s.object):r.statedByBySubject.set(s.subject,[s.object]);return}}let a=(o.examples||[]).find(l=>l?.subject===s.subject&&l?.object===s.object)?.createdAt||s.createdAt||ks();if(o.examples=(o.examples||[]).filter(l=>!(l?.subject===s.subject&&l?.object===s.object)),o.examples.push({...s,createdAt:a}),o.count=o.examples.length,r){let l=r.statedByBySubject.get(s.subject)||[];l.includes(s.object)||l.push(s.object),r.statedByBySubject.set(s.subject,l)}}function Rs(e){let t=[iu,ru,St,nr,sr];e.classes=(e.classes||[]).filter(n=>!t.includes(n?.name));for(let n of t){let s=e.individuals.filter(o=>o?.class===n);s.length&&e.classes.push({name:n,count:s.length,sample:s.slice(0,3).map(o=>o.label)})}}function v_(e,t,n=""){let s=`session:${t}`;return e.individuals.some(o=>o?.id===s)||e.individuals.push({id:s,label:String(t).slice(0,8),class:iu,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:st,key:"createdAt",value:n||ks()},...n?[{prop:"mgx:sessionStarted",key:"started",value:n}]:[]]}),s}function fg(e,{role:t,text:n,ts:s,sessionId:o,sessionStarted:r="",parsed:i=null,replyTo:a=null,createdAt:l=""}){if(!Oj.has(t))throw new Error(`utterance role must be "visitor" or "tmct", got ${JSON.stringify(t)}`);if(!o)throw new Error("utterance needs a sessionId");let c=String(s||""),u=Qn(n),d=`utt:${o}#${c}#${t}`,f=Sa(u)||(t==="visitor"?"a-visitor-said":"a-tmct-said"),p=wi({doc:u}),m=e.individuals.find(y=>y?.id===d),h=hu(m,l||c),g={id:d,label:f,class:ru,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:"mgx:utteranceRole",key:"role",value:t},{prop:"mgx:utteranceText",key:"text",value:u},{prop:"mgx:utteranceTs",key:"ts",value:c},{prop:st,key:"createdAt",value:h},...i!=null?[{prop:"mgx:utteranceParsed",key:"parsed",value:JSON.stringify(i)}]:[],...p.length?[{prop:"mgx:hasProseTokens",key:"prose_tokens",value:p.join(" ")}]:[]]};no(e,g);let b=v_(e,o,r);if(va(e,{predicate:"saidInSession",prop:au},{subject:d,object:b,subjectLabel:f,objectLabel:String(o).slice(0,8)}),a){let y=e.individuals.find(w=>w?.id===a);y&&va(e,{predicate:"inReplyTo",prop:cu},{subject:d,object:a,subjectLabel:f,objectLabel:y.label})}return c&&c>String(e.generated_at||"")&&(e.generated_at=c),d}async function x_(e,t){let n;return await oo(e,s=>{n=fg(s,t),Rs(s)}),{id:n}}async function mg(e,t){let n=[];return t?.length?(await oo(e,s=>{for(let o of t)n.push(fg(s,o));Rs(s)}),{ids:n}):{ids:n}}async function E_(e,t){t?.length&&await oo(e,n=>{for(let s of t)for(let o of or(n,s.factId))va(n,{predicate:"canonicalisedFrom",prop:lu},{subject:o,object:s.uttId,subjectLabel:s.factLabel,objectLabel:s.uttLabel})})}function or(e,t){let n=tn(e);return n?(n.factRecordsByGroup.get(t)||[]).slice():(e?.individuals||[]).filter(s=>s?.class===St&&Nn(s.id)===t).map(s=>s.id)}function hg(e,t,n){let s=Yh(n);if(s.length===1&&s[0].sourceId===ns&&or(e,t).length)return[];let o=S_(e,t);return o.length?s.filter(r=>!jh(o,r.sourceId)):s}function S_(e,t){let n=tn(e),s=n?n.factRecordsByGroup.get(t):or(e,t),o=[];for(let r of s||[]){if(!Ss(r))continue;let i=so(e,r);i&&o.push(i)}return o}function gg(e,t,{quantifier:n,environments:s}){let o=or(e,t).map(i=>so(e,i)).filter(i=>i&&!(i.attributes||[]).some(a=>a?.prop===Qr)),r=new Set;if(s){let i=o.filter(a=>(a.attributes||[]).some(l=>l?.prop==="mgx:factJustification"));for(let a of i.length?i:o)un(a,"mgx:factJustification","justification",s.map(l=>l.join(" ")).join(" | ")),r.add(a.id)}if(n)for(let i of o)(i.attributes||[]).some(a=>a?.prop==="mgx:factQuantifier")||(un(i,"mgx:factQuantifier","quantifier",n),r.add(i.id));return[...r]}function k_(e){let t=0,n=(e.attributes||[]).find(s=>s?.prop===$a)?.value||"";for(let s of n.split(" ").filter(Boolean)){let o=/#v([1-9][0-9]*)$/.exec(s);o&&(t=Math.max(t,Number(o[1])))}return t+1}function bg(e,t){let{groupId:n,s,p:o,o:r,label:i,tokens:a,group:l,createdAt:c,observedAt:u,quantifier:d,environments:f}=t,p=`${n}@${l.sourceId}`,m=tn(e),h=m?m.individualsById.get(p):e.individuals.find(R=>R?.id===p),g=R=>(h?.attributes||[]).find(k=>k?.prop===R)?.value||"",b=g("mgx:factProvenance").split(" | ").filter(Boolean),y={assertedAt:eu(l.tags),observedAt:u},w=null,v=l.tags,_=y.assertedAt||c||ks(),$=u,x=[],E=d;if(h){let R={assertedAt:eu(b),observedAt:g(Yr)};Dj(y,R)?(w={head:h,id:`${p}#v${k_(h)}`},x=[w.id]):(v=[...new Set([...b,...l.tags])],_=g(st)||_,$=u||g(Yr),x=g($a).split(" ").filter(Boolean)),E=d||g("mgx:factQuantifier")}return{candidate:{id:p,label:i,class:St,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"rdf:Statement"},{prop:"rdf:subject",key:"subject",value:s},{prop:"rdf:predicate",key:"predicate",value:o},{prop:"rdf:object",key:"object",value:r},{prop:st,key:"createdAt",value:_},{prop:Zo,key:"sourceId",value:l.sourceId},...v.length?[{prop:"mgx:factProvenance",key:"provenance",value:v.join(" | ")}]:[],...$?[{prop:Yr,key:"observedAt",value:$}]:[],...a.length?[{prop:"mgx:hasProseTokens",key:"prose_tokens",value:a.join(" ")}]:[],...E?[{prop:"mgx:factQuantifier",key:"quantifier",value:E}]:[],...f?[{prop:"mgx:factJustification",key:"justification",value:f.map(R=>R.join(" ")).join(" | ")}]:[],...x.length?[{prop:$a,key:"supersedes",value:x.join(" ")}]:[]]},demote:w}}function j_(e,t){let n=`${t}@${ns}`,s=tn(e);if((s?!s.individualsById.has(n):!e.individuals.some(r=>r?.id===n))||(e.individuals=e.individuals.filter(r=>r?.id!==n),!s))return;s.individualsById.delete(n);let o=(s.factRecordsByGroup.get(t)||[]).filter(r=>r!==n);o.length?s.factRecordsByGroup.set(t,o):s.factRecordsByGroup.delete(t)}function wg(e,{candidate:t,demote:n}){let s=[];if(t.id.endsWith(`@${ns}`)||j_(e,Nn(t.id)),n){let o={...n.head,id:n.id,attributes:(n.head.attributes||[]).map(r=>({...r}))};un(o,Qr,"supersededBy",t.id),no(e,o),s.push(o.id)}return no(e,t),s.push(t.id),s}function so(e,t){let n=tn(e);return n?n.individualsById.get(t):e.individuals.find(s=>s?.id===t)}function yg(e,t){let n=new Set(t);if(!n.size)return;e.individuals=(e.individuals||[]).filter(o=>!n.has(o?.id));for(let o of e.objectProperties||[]){let r=o.examples||[],i=r.filter(a=>!n.has(a?.subject)&&!n.has(a?.object));i.length!==r.length&&(o.examples=i,o.count=i.length)}let s=tn(e);if(s)for(let o of n){s.individualsById.delete(o),s.statedByBySubject.delete(o);let r=Nn(o),i=(s.factRecordsByGroup.get(r)||[]).filter(a=>a!==o);i.length?s.factRecordsByGroup.set(r,i):s.factRecordsByGroup.delete(r)}}function $g(e,t){let n=tn(e),s=(n?n.factRecordsByGroup.get(t):or(e,t))||[];if(s.length<8)return[];let o=new Map,r=new Map,i=new Map,a=new Map;for(let u of s.slice()){let d=so(e,u);if(!d)continue;let f=y=>(d.attributes||[]).find(w=>w?.prop===y)?.value||"";if(Ss(u)){i.set(Gr(u),d);continue}if(Xo(u)){a.set(f(Zo),d);continue}let p=f("mgx:factProvenance"),m=Kh(p),h=p.split(" | ").filter(Boolean),g={id:u,sourceId:f(Zo)||m.id,assertedAt:pu(h,f(st)),record:d};if(f(Qr)){let y=r.get(g.sourceId);y?y.push(g):r.set(g.sourceId,[g]);continue}if(!m.type)continue;let b=o.get(m.type);b?b.push(g):o.set(m.type,[g])}let l=ka(e),c=[];for(let[u,d]of o){let f=Sh({groupId:t,sourceType:u,heads:d,existing:i.get(u)||null,priorFor:p=>$i(u,l[p])});if(f){no(e,f.rollup),c.push(...f.absorbed);for(let p of f.absorbedSourceIds){for(let h of r.get(p)||[])c.push(h.id);r.delete(p);let m=a.get(p);m&&c.push(m.id),a.delete(p)}}}for(let[u,d]of r){let f=kh({groupId:t,sourceId:u,leaves:d,existing:a.get(u)||null});if(!f)continue;no(e,f.rollup),c.push(...f.absorbed);let p=so(e,f.rewire);p&&un(p,$a,"supersedes",f.rollup.id)}return c}async function __(e,{subject:t,predicate:n,object:s,provenance:o="",createdAt:r="",observedAt:i="",quantifier:a="",premiseTrusts:l,ruleConfidence:c}={}){let u=X(t),d=Zn(n),f=X(s);if(!u||!d||!f)throw new Error("a fact needs subject, predicate and object");let p=Uo(u,d,f),m=`${u} ${d} ${f}`,h=wi({doc:m}),g=Qn(a);return await oo(e,async b=>{let y=hg(b,p,Qn(o));for(let w of y.length?[]:gg(b,p,{quantifier:g}))er(b,so(b,w),void 0,{premiseTrusts:l,ruleConfidence:c});for(let w of y){let v=bg(b,{groupId:p,s:u,p:d,o:f,label:Sa(m),tokens:h,group:w,createdAt:r,observedAt:i,quantifier:g});await ql(v.candidate);for(let _ of wg(b,v))er(b,so(b,_),void 0,_===v.candidate.id?{premiseTrusts:l,ruleConfidence:c}:void 0)}yg(b,$g(b,p)),Rs(b)}),{id:p}}function R_(e){if(!Array.isArray(e))return;let t=e.some(Array.isArray)?e.filter(Array.isArray):[e],n=[],s=new Set;for(let o of t){let r=o.filter(a=>typeof a=="string"&&a);if(!r.length)continue;let i=[...r].sort().join(" ");s.has(i)||(s.add(i),n.push(r))}return n.length?n:void 0}async function Ts(e,t){let n=[],s=0;for(let r of t||[]){let i=X(r?.subject),a=Zn(r?.predicate),l=X(r?.object);if(!i||!a||!l){s+=1;continue}let c=`${i} ${a} ${l}`;n.push({id:Uo(i,a,l),s:i,p:a,o:l,text:c,tokens:wi({doc:c}),provenance:Qn(r?.provenance),createdAt:r?.createdAt||"",observedAt:r?.observedAt||"",quantifier:Qn(r?.quantifier),premiseTrusts:Array.isArray(r?.premiseTrusts)?r.premiseTrusts:void 0,ruleConfidence:typeof r?.ruleConfidence=="number"?r.ruleConfidence:void 0,environments:R_(r?.justification)})}let o=[];return n.length?(await oo(e,r=>{let i=[],a=new Set,l=new Map;for(let u of n){let d=hg(r,u.id,u.provenance);for(let f of d.length?[]:gg(r,u.id,{quantifier:u.quantifier,environments:u.environments}))a.has(f)||(a.add(f),i.push(f)),(u.premiseTrusts!==void 0||u.ruleConfidence!==void 0)&&l.set(f,{premiseTrusts:u.premiseTrusts,ruleConfidence:u.ruleConfidence});for(let f of d){let p=bg(r,{groupId:u.id,s:u.s,p:u.p,o:u.o,label:Sa(u.text),tokens:u.tokens,group:f,createdAt:u.createdAt,observedAt:u.observedAt,quantifier:u.quantifier,environments:u.environments});for(let m of wg(r,p))a.has(m)||(a.add(m),i.push(m));(u.premiseTrusts!==void 0||u.ruleConfidence!==void 0)&&l.set(p.candidate.id,{premiseTrusts:u.premiseTrusts,ruleConfidence:u.ruleConfidence})}o.push(u.id)}for(let u of i)er(r,so(r,u),void 0,l.get(u));let c=[];for(let u of new Set(o))c.push(...$g(r,u));yg(r,c),Rs(r)}),{ids:o,appended:o.length,skipped:s}):{ids:o,appended:0,skipped:s}}async function Ra(e,{name:t,kind:n,slots:s,provenance:o="",createdAt:r=""}={}){let i=vg[n];if(!i)throw new Error(`a rule kind must be one of ${T_.join(", ")}, got ${JSON.stringify(n)}`);let a=X(t);if(!a)throw new Error("a rule needs a name");let l=A_[n]||new Set,c=i.map(([p])=>X(s?.[p])),u=i.filter(([p],m)=>!l.has(p)&&!c[m]);if(u.length)throw new Error(`a ${n} rule needs ${u.map(([p])=>p).join(" + ")}`);if(n===ti){let p=c[i.findIndex(([h])=>h==="objectRole")],m=c[i.findIndex(([h])=>h==="value")];if(!p&&!m)throw new Error(`a ${n} rule needs an objectRole or a value`)}let d=I_(n,a,c),f=Sa(`${a} = ${n}(${c.join(", ")})`);return await oo(e,async p=>{let m=p.individuals.find(w=>w?.id===d),h=m?.attributes?.find(w=>w?.prop==="mgx:factProvenance")?.value||"",g=[...new Set([...h.split(" | "),Qn(o)].filter(Boolean))],b=hu(m,r),y={id:d,label:f,class:sr,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:_a,key:"ruleName",value:a},{prop:rr,key:"ruleKind",value:n},...i.map(([w,v],_)=>({prop:v,key:w,value:c[_],skip:!c[_]&&l.has(w)})).filter(w=>!w.skip).map(({skip:w,...v})=>v),{prop:st,key:"createdAt",value:b},...g.length?[{prop:"mgx:factProvenance",key:"provenance",value:g.join(" | ")}]:[]]};await ql(y),no(p,y),er(p,p.individuals.find(w=>w?.id===d)),Rs(p)}),{id:d}}function vu(e,t){let n=X(t);return(e?.individuals||[]).find(s=>s?.class===sr&&(s.attributes||[]).find(o=>o?.prop===_a)?.value===n)}function C_(e,t){let n=X(t),s=o=>(o.attributes||[]).find(r=>r?.prop===rr)?.value||"";return(e?.individuals||[]).filter(o=>o?.class===sr&&(o.attributes||[]).find(r=>r?.prop===_a)?.value===n).sort((o,r)=>s(o).localeCompare(s(r))||String(o.id).localeCompare(String(r.id)))}function xu(e){let t=[];for(let n of e?.individuals||[]){if(n?.class!==sr)continue;let s=a=>(n.attributes||[]).find(l=>l?.prop===a)?.value,o=s(rr),r=vg[o];if(!r)continue;let i={};for(let[a,l]of r)i[a]=s(l)??"";t.push({id:n.id,name:s(_a)||"",kind:o,slots:i,provenance:s("mgx:factProvenance")||""})}return t.sort((n,s)=>n.name.localeCompare(s.name)||n.kind.localeCompare(s.kind)||String(n.id).localeCompare(String(s.id))),t}async function Eu(e,t,n,s,o){let{relationFactsFor:r,renderFactLine:i,factPhrase:a,factTermVariants:l,byTrust:c,rows:u,HAS_PROPERTY_PREDICATE:d,findActionPath:f}=o,p=String(t||"").trim().toLowerCase(),m=l(X,n),h=l(X,s),g=r(p).filter(w=>m.has(w.fact.subject)&&h.has(w.fact.object));if(g.length){let w=g.slice().sort((v,_)=>c(v.fact,_.fact))[0];return{citation:[i(w.fact),...w.aliasFacts.map(v=>`${a(v)}${v.provenance?` (source: ${v.provenance})`:""}`)]}}let b=vu(e,p),y=b?.attributes?.find(w=>w.prop===rr)?.value;if(b&&y===Zr){let w=b.attributes.find(M=>M.prop==="mgx:ruleBase1")?.value,v=b.attributes.find(M=>M.prop==="mgx:ruleBase2")?.value,_=X(n),$=X(s);if(!w||!v||!_||!$)return null;let R=f({entity:_,hopsTaken:0},M=>M.hopsTaken===2&&M.entity===$,M=>{if(M.hopsTaken>=2)return[];let T=M.hopsTaken===0?w:v;return r(T).filter(P=>P.fact.subject===M.entity).map(P=>({action:P,nextState:{entity:P.fact.object,hopsTaken:M.hopsTaken+1}}))},{maxDepth:2,stateKey:M=>`${M.entity}#${M.hopsTaken}`});if(!R)return null;let k=new Set,A=[];for(let M of R.actions){A.push(i(M.fact));for(let T of M.aliasFacts){let P=T.id||`${T.subject}|${T.predicate}|${T.object}`;k.has(P)||(k.add(P),A.push(`${a(T)}${T.provenance?` (source: ${T.provenance})`:""}`))}}return{citation:A}}if(b&&y===ei){let w=b.attributes.find(S=>S.prop==="mgx:ruleBase1")?.value,v=b.attributes.find(S=>S.prop==="mgx:ruleFilterProperty")?.value;if(!w||!v)return null;let _=await Eu(e,w,n,s,o);if(!_)return null;let $=X(n),x=X(v),E=u.find(S=>S.predicate===d&&S.subject===$&&X(S.object)===x);return E?{citation:[..._.citation,i(E)]}:null}return null}async function xg(e,t,n,s){let{relationFactsFor:o,renderFactLine:r,factPhrase:i,factTermVariants:a,byTrust:l,rows:c,HAS_PROPERTY_PREDICATE:u,findReachableSet:d}=s,f=String(t||"").trim().toLowerCase(),p=a(X,n),m=o(f).filter(b=>p.has(b.fact.object));if(m.length){let b=new Map;for(let y of m)b.has(y.fact.subject)||b.set(y.fact.subject,[]),b.get(y.fact.subject).push(y);return[...b.entries()].map(([y,w])=>{let v=w.slice().sort((_,$)=>l(_.fact,$.fact))[0];return{subject:y,citation:[r(v.fact),...v.aliasFacts.map(_=>`${i(_)}${_.provenance?` (source: ${_.provenance})`:""}`)]}})}let h=vu(e,f),g=h?.attributes?.find(b=>b.prop===rr)?.value;if(h&&g===Zr){let b=h.attributes.find(x=>x.prop==="mgx:ruleBase1")?.value,y=h.attributes.find(x=>x.prop==="mgx:ruleBase2")?.value,w=X(n);return!b||!y||!w?[]:d({entity:w,hopsTaken:0},x=>{if(x.hopsTaken>=2)return[];let E=x.hopsTaken===0?y:b;return o(E).filter(S=>S.fact.object===x.entity).map(S=>({action:S,nextState:{entity:S.fact.subject,hopsTaken:x.hopsTaken+1}}))},{maxDepth:2,stateKey:x=>`${x.entity}#${x.hopsTaken}`}).filter(x=>x.node.hopsTaken===2).map(({node:x,path:E})=>{let S=new Set,R=[];for(let k of E.actions.slice().reverse()){R.push(r(k.fact));for(let A of k.aliasFacts){let M=A.id||`${A.subject}|${A.predicate}|${A.object}`;S.has(M)||(S.add(M),R.push(`${i(A)}${A.provenance?` (source: ${A.provenance})`:""}`))}}return{subject:x.entity,citation:R}})}if(h&&g===ei){let b=h.attributes.find($=>$.prop==="mgx:ruleBase1")?.value,y=h.attributes.find($=>$.prop==="mgx:ruleFilterProperty")?.value;if(!b||!y)return[];let w=await xg(e,b,n,s),v=X(y),_=[];for(let $ of w){let x=X($.subject),E=c.find(S=>S.predicate===u&&S.subject===x&&X(S.object)===v);E&&_.push({subject:$.subject,citation:[...$.citation,r(E)]})}return _}return[]}function vt(e,t={}){let n=Su(e),s=eg(e),o=[];for(let[r,i]of n.groups){let a=ku(r,i,n),l=s?.get(r);a.trust=vi(l?l.inputs:a.assertions,t).score,o.push(a)}return o}function Su(e){let t=e?.individuals||[],n=new Map(t.filter(a=>a?.class===nr).map(a=>[a.id,a])),s=(e?.objectProperties||[]).find(a=>a?.prop===ln),o=new Map;for(let a of s?.examples||[])o.has(a.subject)||o.set(a.subject,[]),o.get(a.subject).push(a.object);let r=new Map;for(let a of t){if(a?.class!==St||(a.attributes||[]).some(u=>u?.prop===Qr)||Xo(a.id))continue;let l=Nn(a.id),c=r.get(l);c?c.push(a):r.set(l,[a])}let i=new Map;for(let[a,l]of r){l.sort((d,f)=>d.id<f.id?-1:d.id>f.id?1:0);let c=tu(Xr(l[0],"subject"),Xr(l[0],"predicate")),u=i.get(c);u?u.push(a):i.set(c,[a])}return{groups:r,groupsByPair:i,statedByRecord:o,sourceTypeOf:a=>(n.get(a)?.attributes||[]).find(l=>l?.prop==="mgx:sourceType")?.value||""}}function ku(e,t,n){let{statedByRecord:s,sourceTypeOf:o}=n,r=Uj,i=Xr,a=[],l=[],c=[],u=new Set,d=[],f=new Set,p="";for(let g of t){if(Ss(g.id)){let x=Gr(g.id),E=ua(g);for(let S of E)l.includes(S)||(l.push(S),x&&c.push(x));a.push({id:g.id,sourceId:"",sourceType:x,provenance:"",createdAt:r(g,In),ownTrust:Number(r(g,Yo))||0,assertedAt:r(g,Cn),rollup:{count:Number(r(g,Wr))||E.length,sourceIds:E,earliest:r(g,In),latest:r(g,Cn)}});continue}let b=r(g,"mgx:factProvenance").split(" | ").filter(Boolean);for(let x of b)u.add(x);let[y]=s.get(g.id)||[],w=y||r(g,Zo),v=o(w);y&&!l.includes(y)&&(l.push(y),v&&c.push(v));let _=r(g,st),$=r(g,Yr);a.push({id:g.id,sourceId:w,sourceType:v,provenance:b.join(" | "),createdAt:_,...$?{observedAt:$}:{},ownTrust:Number(r(g,_o))||0,assertedAt:pu(b,_)}),p=p||i(g,"quantifier");for(let x of i(g,"justification").split(" | ")){let E=x.split(" ").filter(Boolean);if(!E.length)continue;let S=E.join(" ");f.has(S)||(f.add(S),d.push(E))}}let m=[],h=new Set;for(let g of d)for(let b of g)h.has(b)||(h.add(b),m.push(b));return{id:e,subject:i(t[0],"subject"),predicate:i(t[0],"predicate"),object:i(t[0],"object"),provenance:[...u].sort().join(" | "),quantifier:p,sourceIds:l,sourceTypes:c,environments:d,justification:m,assertions:a}}async function O_(e,t){let n=new Set((t||[]).filter(Boolean)),s=[];return n.size?(await oo(e,o=>{let r=new Set,i=new Set;o.individuals=(o.individuals||[]).filter(a=>{if(a?.class!==St)return!0;let l=Nn(a.id),c=n.has(a.id)?a.id:n.has(l)?l:"";return c?(i.add(c),r.add(a.id),!1):!0});for(let a of i)s.push(a);if(s.length){for(let a of o.objectProperties||[]){let l=a.examples||[];a.examples=l.filter(c=>!r.has(c?.subject)&&!r.has(c?.object)),a.count=a.examples.length}Rs(o)}}),{removed:s}):{removed:s}}function Eg(e,{floor:t=L_}={}){let n=vt(e).filter(r=>r.trust>=t),s=new Map;for(let r of n){if(ia(r.predicate)===Ll)continue;let i=`${r.subject} ${r.predicate}`;s.has(i)||s.set(i,[]),s.get(i).push(r)}let o=[];for(let r of s.values()){if(new Set(r.map(a=>a.object)).size<2)continue;let i=ia(r[0].predicate);i!==Nl&&!Pl(r,i).contested||o.push(r.slice().sort((a,l)=>l.trust-a.trust||a.object.localeCompare(l.object)))}return o.sort((r,i)=>`${r[0].subject} ${r[0].predicate}`.localeCompare(`${i[0].subject} ${i[0].predicate}`))}var tr,ou,ru,St,iu,nr,sr,au,cu,Cj,ln,lu,qh,ya,Ql,Vh,Oj,Bh,Lj,Zl,uu,Hh,Pj,ns,Yr,Zo,$a,Qr,Jh,Uj,Xr,tu,Qh,eg,Wj,Kj,Wh,$n,ag,nu,o_,Jl,i_,fu,cg,mu,lg,su,tn,Sa,ks,bu,y_,Zr,ei,wu,yu,ja,ti,$u,T_,_a,rr,vg,A_,I_,L_,ir,N_,M_,Be=O(()=>{_t();Ue();us();qt();qt();fs();mh();fs();ra();Gl();Th();Gl();tr=Q(".tmct","memory"),ou=Q(tr,"graph.json"),ru="Utterance",St="Fact",iu="Session",nr="Source",sr="Rule",au="mgx:saidInSession",cu="mgx:inReplyTo",Cj="mgx:derivedFrom",ln="mgx:statedBy",lu="mgx:canonicalisedFrom",qh="mgx:sourceReliability",ya="src:operator-chat",Ql="src:teach-chat",Vh="src:teach-node",Oj=new Set(["visitor","tmct"]),Bh=48,Lj=[{prop:"rdf:type",note:"rdf-ish typing attribute: owl:NamedIndividual (utterances/sessions) or rdf:Statement (reified facts)"},{prop:"mgx:utteranceRole",note:"who said it: visitor (an a-visitor-said item) or tmct (the response alongside it)"},{prop:"mgx:utteranceText",note:"the utterance's normalized text (capped)"},{prop:"mgx:utteranceTs",note:"when it was said, ISO-8601 (the chat turn timestamp)"},{prop:"mgx:utteranceParsed",note:"optional JSON of the parse the interpretation pipeline produced for this request"},{prop:au,predicate:"saidInSession",note:"Utterance \u2192 Session it was said in; runtime observation, owned (no SEON term)"},{prop:cu,predicate:"inReplyTo",note:"tmct Utterance \u2192 the visitor Utterance it answers (the Q/A pairing)"},{prop:"rdf:subject",note:"reified fact: the triple's subject term"},{prop:"rdf:predicate",note:"reified fact: the triple's predicate term"},{prop:"rdf:object",note:"reified fact: the triple's object term"},{prop:"mgx:factProvenance",note:"LEGACY COMPAT SHIM: the ' | '-joined provenance tag string a fact came from; the source-of-truth is now the mgx:statedBy edges derived from it"},{prop:"mgx:sourceId",note:"the assertion key a Fact record is filed under \u2014 the Source id of the ONE party asserting it, which is also the @-suffix of the record's own id. `src:none` when no tag names a Source, so every record has a key rather than a hole"},{prop:"mgx:observedAt",note:"OPTIONAL valid time: when the asserting party WITNESSED the claim, as against mgx:createdAt's transaction time (when this store recorded it). A stale article read today loses to an eyewitness report from yesterday. Stored only when a caller supplies one \u2014 never fabricated, never backfilled"},{prop:"mgx:supersedes",note:"the record id(s) this one replaced when its own source re-asserted the triple with a newer embedded timestamp. A space-joined LIST; absent, never empty, until the first supersession"},{prop:"mgx:supersededBy",note:"the record id(s) that replaced this one. Its presence is what makes a record a demoted leaf rather than a live head, and the group fold skips it: a source's past belief is not a second vote for the present one. A LIST, because one source with two live replicas can fork before they sync"},{prop:"mgx:factQuantifier",note:"OPTIONAL: the quantifier word a plural class-membership teach used ('every'/'some'/'a few'), for literal recall by 'how many Xs are Ys' \u2014 never real cardinality counting"},{prop:"mgx:factJustification",note:"an entailed Fact's supporting premise fact ids: ' | '-separated environments, one space-separated premise-id list per independent derivation, capped by syllogise's maxEnvironments knob; a value with no ' | ' is a single environment"},{prop:"mgx:ruleName",note:"a taught Rule's own name (e.g. 'grandparent') \u2014 the query-dispatcher's lookup key, PLAN_TAUGHT_RELATIONS.md \xA72/\xA73"},{prop:"mgx:ruleKind",note:"a taught Rule's SHAPE tag \u2014 the closed vocabulary compose2 | filter | recursive (structural, like 'Fact'/'Rule' themselves, never a domain word)"},{prop:"mgx:ruleBase1",note:"compose2: the first hop's base relation name; filter: the base rule/relation being filtered (same 'base relation' role in both kinds, so the name is shared)"},{prop:"mgx:ruleBase2",note:"compose2 only: the second hop's base relation name"},{prop:"mgx:ruleFilterProperty",note:"filter only: the property literal candidates are filtered by (an mgx:hasProperty-shaped Fact lookup)"},{prop:"mgx:ruleBaseCase",note:"recursive only: the base-case relation name (hop zero)"},{prop:"mgx:ruleRecStep",note:"recursive only: the self-referential recursive-step relation name"},{prop:st,note:"when an individual was FIRST written, ISO-8601 (first-write-wins on upsert); the audit 'when', the recency input to trust, the novelty signal"},{prop:ds,note:"an audit / last-modified stamp: when an individual's OWN attributes were last mutated in place (upsertSession, recomputeFactTrust, recomputeSourceReliability) \u2014 most individuals never carry it at all. NOT transaction time: a mutable stamp cannot record when the previous version stopped being current, so tmct is not bitemporal"},{prop:Cj,predicate:"derivedFrom",note:"umbrella: a Fact derived from a Source (or another Fact). ext ref prov:wasDerivedFrom (UNVERIFIED-pending-web-check)"},{prop:ln,predicate:"statedBy",note:"subPropertyOf derivedFrom: a Source directly asserts this Fact (one edge per independent source \u2014 replaces the factProvenance union)"},{prop:lu,predicate:"canonicalisedFrom",note:"subPropertyOf derivedFrom: a canonical Fact cleaned from a raw Block/Source, never replacing it"},{prop:"mgx:sourceType",note:"a Source's kind: operator | teach | provider | corpus | corpusWeak | reference | referenceLive | extracted | optimisticExtract | web | entailed (the trust-prior key)"},{prop:"mgx:sourceUrl",note:"a web Source's URL"},{prop:"mgx:sourceRule",note:"an entailed Source's rule id"},{prop:"mgx:sourceReliability",note:"actor-level (session-scoped) trust nudge in [0.5,1.5], neutral 1.0 when absent \u2014 materialised by recomputeSourceReliability from a session's asserted-vs-contradicted track record (memory/trust.mjs's sessionReliabilityFrom); folds into computeTrust's per-source prior"},{prop:_o,note:"materialised trust cache in [0,1] \u2014 pure function of a fact's Sources + createdAt (memory/trust.mjs); invalidated when a statedBy edge is added"},{prop:yi,note:"JSON of the inputs the trust score was computed from (source-type multiset, corroboration count, createdAt, recency) \u2014 makes the score auditable"},{prop:"mgx:hasProseTokens",note:"prose tokens (prose.mjs tokenizer) backing the payload's proseIndex"},{prop:"mgx:sessionStarted",note:"session anchor: when the session started, ISO-8601"},{prop:"rdf:predicate",prefix:Go,note:"a reified fact's predicate carries its POLARITY: mgxneg:capableOf is the negative twin of mgx:capableOf ('a penguin cannot fly'). Polarity cannot be a separate property \u2014 the fact id hashes (subject, predicate, object), so both polarities would share one id and union their statedBy edges (memory/capability.mjs)"}];Zl=e=>Kr(e),uu="memory",Hh="sqlite";Pj=`
108
108
  CREATE TABLE IF NOT EXISTS meta (k TEXT PRIMARY KEY, v TEXT NOT NULL);
109
109
  CREATE TABLE IF NOT EXISTS individuals (id TEXT PRIMARY KEY, ord INTEGER NOT NULL, class TEXT, label TEXT, json TEXT NOT NULL);
110
110
  CREATE TABLE IF NOT EXISTS relations (prop TEXT PRIMARY KEY, ord INTEGER NOT NULL, predicate TEXT, count INTEGER);
@@ -143,85 +143,85 @@ CREATE TABLE IF NOT EXISTS fact_object_supersessions (
143
143
  recorded_at TEXT NOT NULL,
144
144
  PRIMARY KEY (subject, predicate, ord)
145
145
  );
146
- `,ns="src:none",qr="mgx:observedAt",Yo="mgx:sourceId",ha="mgx:supersedes",Xr="mgx:supersededBy";Wh="INSERT OR REPLACE INTO facts(id, triple_hash, subject, predicate, object, source_id, source_type, trust_score, created_at, observed_at, superseded_by, json) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";_j=(e,t)=>(e?.attributes||[]).find(n=>n?.prop===t)?.value||"",Kr=(e,t)=>(e?.attributes||[]).find(n=>n?.key===t)?.value||"",Xl=(e,t)=>`${e}\0${t}`;Gh=Symbol("materialised fact_heads index");Vh=e=>e?.[Gh]||null,Tj="INSERT OR REPLACE INTO fact_heads(triple_hash, trust_base, inputs_json, updated_at) VALUES (?, ?, ?, ?)";Lj=new Set(["subject","object","subjectLabel","objectLabel"]),Nh=!1;vn=e=>e===void 0?e:structuredClone(e);Zh=Q(Jo,"manifest.json"),Jl=5,Gj=e=>Q(e,Zh);Vl=e=>Kj(qj(e)),Vj=/^fact:[0-9a-f]{8}$/;cu=Q(Jo,"syllogise-state.json"),eg="syllogiseState";lu=Q(Jo,"node-id.json"),tg="nodeId";Ql=Symbol("mutateMemory lookup index");tn=e=>e?.[Ql]||null;ya=e=>e.length>Lh?e.slice(0,Lh-1)+"\u2026":e,Es=()=>new Date().toISOString();pu=e=>String(e).replace(/^src:/,"");r_=e=>typeof e=="string"&&(e.startsWith(`${ma}:`)||e.startsWith(`${ql}:`)||e.startsWith(`${Fh}:`));Jr="compose2",Qr="filter",fu="recursive",mu="action-signature",$a="action-precond",Zr="action-effect",hu="action-constraint",h_=Object.freeze([Jr,Qr,fu,mu,$a,Zr,hu]),xa="mgx:ruleName",nr="mgx:ruleKind",fg={[Jr]:[["base1","mgx:ruleBase1"],["base2","mgx:ruleBase2"]],[Qr]:[["base","mgx:ruleBase1"],["property","mgx:ruleFilterProperty"]],[fu]:[["baseCase","mgx:ruleBaseCase"],["recStep","mgx:ruleRecStep"]],[mu]:[["subjectClass","mgx:ruleActionSubjectClass"],["targetClass","mgx:ruleActionTargetClass"]],[$a]:[["shape","mgx:ruleActionPrecondShape"],["predicate","mgx:ruleActionPrecondPredicate"],["role","mgx:ruleActionPrecondRole"],["scope","mgx:ruleActionPrecondScope"],["value","mgx:ruleActionPrecondValue"],["negate","mgx:ruleActionPrecondNegate"]],[Zr]:[["predicate","mgx:ruleActionEffectPredicate"],["subjectRole","mgx:ruleActionEffectSubject"],["objectRole","mgx:ruleActionEffectObject"],["value","mgx:ruleActionEffectValue"]],[hu]:[["left","mgx:ruleActionConstraintLeft"],["right","mgx:ruleActionConstraintRight"],["guard","mgx:ruleActionConstraintGuard"]]},g_={[$a]:new Set(["value","negate"]),[Zr]:new Set(["objectRole","value"])},b_=(e,t,n)=>`rule:${Pr([e,t,...n].join("\0"))}`;v_=.5,sr="mgx:hasA",$_="mgx:capableOf",x_=Cl});async function dn(e,t=null){try{if(t)return Ct(await Ht(t));let{dir:n,close:s}=await ks($e($e(e.graphFile)));try{return Ct(await Ht(n))}finally{await s()}}catch{return[]}}function bg(e){let t=[...new Set(e.map(s=>s.provenance).filter(Boolean))];return t.length?`provenance: ${t.slice(0,2).join("; ")}${t.length>2?`, +${t.length-2} more source(s)`:""}`:"provenance: memory/corpus facts"}function Ea(e,t){let n=X(t),s=e.filter(a=>gg.has(a.predicate)&&a.object===n);if(!s.length)return null;let o=[...new Set(s.map(a=>a.subject))].sort(),r=o.slice(0,no),i=o.length>no?`
147
- \u2026+${o.length-no} more`:"";return`"${t}" is not a code-map entity \u2014 answering from memory/corpus facts. ${o.length} known subclass(es):
146
+ `,ns="src:none",Yr="mgx:observedAt",Zo="mgx:sourceId",$a="mgx:supersedes",Qr="mgx:supersededBy";Jh="INSERT OR REPLACE INTO facts(id, triple_hash, subject, predicate, object, source_id, source_type, trust_score, created_at, observed_at, superseded_by, json) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";Uj=(e,t)=>(e?.attributes||[]).find(n=>n?.prop===t)?.value||"",Xr=(e,t)=>(e?.attributes||[]).find(n=>n?.key===t)?.value||"",tu=(e,t)=>`${e}\0${t}`;Qh=Symbol("materialised fact_heads index");eg=e=>e?.[Qh]||null,Wj="INSERT OR REPLACE INTO fact_heads(triple_hash, trust_base, inputs_json, updated_at) VALUES (?, ?, ?, ?)";Kj=new Set(["subject","object","subjectLabel","objectLabel"]),Wh=!1;$n=e=>e===void 0?e:structuredClone(e);ag=Q(tr,"manifest.json"),nu=5,o_=e=>Q(e,ag);Jl=e=>c_(a_(e)),i_=/^fact:[0-9a-f]{8}$/;fu=Q(tr,"syllogise-state.json"),cg="syllogiseState";mu=Q(tr,"node-id.json"),lg="nodeId";su=Symbol("mutateMemory lookup index");tn=e=>e?.[su]||null;Sa=e=>e.length>Bh?e.slice(0,Bh-1)+"\u2026":e,ks=()=>new Date().toISOString();bu=e=>String(e).replace(/^src:/,"");y_=e=>typeof e=="string"&&(e.startsWith(`${ya}:`)||e.startsWith(`${Ql}:`)||e.startsWith(`${Vh}:`));Zr="compose2",ei="filter",wu="recursive",yu="action-signature",ja="action-precond",ti="action-effect",$u="action-constraint",T_=Object.freeze([Zr,ei,wu,yu,ja,ti,$u]),_a="mgx:ruleName",rr="mgx:ruleKind",vg={[Zr]:[["base1","mgx:ruleBase1"],["base2","mgx:ruleBase2"]],[ei]:[["base","mgx:ruleBase1"],["property","mgx:ruleFilterProperty"]],[wu]:[["baseCase","mgx:ruleBaseCase"],["recStep","mgx:ruleRecStep"]],[yu]:[["subjectClass","mgx:ruleActionSubjectClass"],["targetClass","mgx:ruleActionTargetClass"]],[ja]:[["shape","mgx:ruleActionPrecondShape"],["predicate","mgx:ruleActionPrecondPredicate"],["role","mgx:ruleActionPrecondRole"],["scope","mgx:ruleActionPrecondScope"],["value","mgx:ruleActionPrecondValue"],["negate","mgx:ruleActionPrecondNegate"]],[ti]:[["predicate","mgx:ruleActionEffectPredicate"],["subjectRole","mgx:ruleActionEffectSubject"],["objectRole","mgx:ruleActionEffectObject"],["value","mgx:ruleActionEffectValue"]],[$u]:[["left","mgx:ruleActionConstraintLeft"],["right","mgx:ruleActionConstraintRight"],["guard","mgx:ruleActionConstraintGuard"]]},A_={[ja]:new Set(["value","negate"]),[ti]:new Set(["objectRole","value"])},I_=(e,t,n)=>`rule:${Fr([e,t,...n].join("\0"))}`;L_=.5,ir="mgx:hasA",N_="mgx:capableOf",M_=Ml});async function dn(e,t=null){try{if(t)return vt(await Ct(t));let{dir:n,close:s}=await _s(ve(ve(e.graphFile)));try{return vt(await Ct(n))}finally{await s()}}catch{return[]}}function kg(e){let t=[...new Set(e.map(s=>s.provenance).filter(Boolean))];return t.length?`provenance: ${t.slice(0,2).join("; ")}${t.length>2?`, +${t.length-2} more source(s)`:""}`:"provenance: memory/corpus facts"}function Ta(e,t){let n=X(t),s=e.filter(a=>Sg.has(a.predicate)&&a.object===n);if(!s.length)return null;let o=[...new Set(s.map(a=>a.subject))].sort(),r=o.slice(0,ro),i=o.length>ro?`
147
+ \u2026+${o.length-ro} more`:"";return`"${t}" is not a code-map entity \u2014 answering from memory/corpus facts. ${o.length} known subclass(es):
148
148
  ${r.join(`
149
149
  `)}${i}
150
- (${bg(s)})`}function Sa(e,t){let n=X(t),s=e.filter(a=>gg.has(a.predicate)&&(a.subject===n||a.object===n));if(!s.length)return null;let o=[...new Set(s.filter(a=>a.subject===n).map(a=>a.object))],r=[...new Set(s.filter(a=>a.object===n).map(a=>a.subject))].sort(),i=[`"${t}" is not a code-map entity \u2014 answering from memory/corpus facts.`];if(o.length&&i.push(`is a: ${o.slice(0,no).join(", ")}`),r.length){let a=r.length>no?`, +${r.length-no} more`:"";i.push(`known subclasses (${r.length}): ${r.slice(0,no).join(", ")}${a}`)}return i.push(`(${bg(s)})`),i.join(`
151
- `)}var gg,no,so=I(()=>{Be();Ke();gg=new Set(["rdfs:subClassOf","rdf:type"]),no=40});async function wg(e,{graph:t,svc:n,config:s}){let o=tt(e,"symbol"),{match:r,candidates:i}=Zt(n.graph,o);if(r)return yc(t,r,{candidates:i});let a=Sa(await dn(s),o);if(a)return a;$t(n,o,"symbol")}var yg=I(()=>{Ie();so();Ge()});async function vg(e,{graph:t,svc:n,repoRoot:s}){let o=tt(e,"symbol"),{match:r,candidates:i}=$t(n,o,"symbol"),a=_t(r);if(!a)throw new Re(`"${r.label}" (${r.class||"Entity"}) has no source span in the graph \u2014 it is likely a module. Use tmct_describe for its contents, then tmct_snippet one of the functions/classes it defines.`);let l;try{l=await Jn({readFile:ze,repoRoot:s,path:a.path,start:a.start,end:a.end,maxLines:Nr})}catch(g){throw g instanceof Re?g:new Re(`could not read ${a.path} (${g?.code||g?.message||g})`)}let{text:c,truncated:u}=l,d=a.end>a.start?`${a.start}-${a.end}`:`${a.start}`,f=`${r.label} \u2014 ${r.class||"Entity"} @ ${a.path}:${d}`,p=u?`
152
- \u2026 (truncated to ${Nr} lines; full span ${d})`:"",m=i.length?`
153
- (other matches: ${i.map(g=>g.label).join(", ")})`:"",h=xc(t,r);return`${f}
150
+ (${kg(s)})`}function Aa(e,t){let n=X(t),s=e.filter(a=>Sg.has(a.predicate)&&(a.subject===n||a.object===n));if(!s.length)return null;let o=[...new Set(s.filter(a=>a.subject===n).map(a=>a.object))],r=[...new Set(s.filter(a=>a.object===n).map(a=>a.subject))].sort(),i=[`"${t}" is not a code-map entity \u2014 answering from memory/corpus facts.`];if(o.length&&i.push(`is a: ${o.slice(0,ro).join(", ")}`),r.length){let a=r.length>ro?`, +${r.length-ro} more`:"";i.push(`known subclasses (${r.length}): ${r.slice(0,ro).join(", ")}${a}`)}return i.push(`(${kg(s)})`),i.join(`
151
+ `)}var Sg,ro,io=O(()=>{Ue();Be();Sg=new Set(["rdfs:subClassOf","rdf:type"]),ro=40});async function jg(e,{graph:t,svc:n,config:s}){let o=tt(e,"symbol"),{match:r,candidates:i}=en(n.graph,o);if(r)return Sc(t,r,{candidates:i});let a=Aa(await dn(s),o);if(a)return a;xt(n,o,"symbol")}var _g=O(()=>{Oe();io();qe()});async function Rg(e,{graph:t,svc:n,repoRoot:s}){let o=tt(e,"symbol"),{match:r,candidates:i}=xt(n,o,"symbol"),a=Rt(r);if(!a)throw new Re(`"${r.label}" (${r.class||"Entity"}) has no source span in the graph \u2014 it is likely a module. Use tmct_describe for its contents, then tmct_snippet one of the functions/classes it defines.`);let l;try{l=await Jn({readFile:ze,repoRoot:s,path:a.path,start:a.start,end:a.end,maxLines:Mr})}catch(g){throw g instanceof Re?g:new Re(`could not read ${a.path} (${g?.code||g?.message||g})`)}let{text:c,truncated:u}=l,d=a.end>a.start?`${a.start}-${a.end}`:`${a.start}`,f=`${r.label} \u2014 ${r.class||"Entity"} @ ${a.path}:${d}`,p=u?`
152
+ \u2026 (truncated to ${Mr} lines; full span ${d})`:"",m=i.length?`
153
+ (other matches: ${i.map(g=>g.label).join(", ")})`:"",h=_c(t,r);return`${f}
154
154
  ${c}${p}${h?`
155
- ${h}`:""}${m}`}var $g=I(()=>{jt();Dt();Gi();Ie();Ge()});var xg,Eg=I(()=>{Ie();Ge();xg=rt(Up)});function Sg(e,{graph:t,svc:n}){let{match:s}=$t(n,tt(e,"module"),"module");return Cp(t,s)}var kg=I(()=>{Ie();Ge()});async function jg(e,{graph:t,config:n}){let s=String(e?.query||"").trim(),o=String(e?.kind||"").trim();if(!s&&!o)throw new Re("query is required");let r=zp(t,s,{kind:o,decorator:String(e?.decorator||"").trim(),name:String(e?.name||"").trim(),toolNamePrefix:n?.toolNamePrefix});if(!o&&/^no module matches/.test(r)){let i=Sa(await dn(n),s);if(i)return i}return r}var _g=I(()=>{Dt();Ie();so()});async function Rg(e,{graph:t,svc:n,config:s}){let o=tt(e,"class"),{match:r}=Zt(n.graph,o);if(r)return Bp(t,r,{toolNamePrefix:s?.toolNamePrefix});let i=Ea(await dn(s),o);if(i)return i;$t(n,o,"class")}var Tg=I(()=>{Ie();so();Ge()});async function Ag(e,{graph:t,svc:n,config:s}){let o=tt(e,"class"),{match:r}=Zt(n.graph,o);if(r)return Wp(t,r);let i=Ea(await dn(s),o);if(i)return i;$t(n,o,"class")}var Cg=I(()=>{Ie();so();Ge()});function k_(e,{conceptBase:t="concept:",relationMap:n=S_}={}){let s=new Set(n.synonym||[]),o=new Set(n.related||[]),r=new Map,i=g=>{r.has(g)||r.set(g,g)},a=g=>{let b=g;for(;r.get(b)!==b;)b=r.get(b);for(;r.get(g)!==b;){let y=r.get(g);r.set(g,b),g=y}return b},l=(g,b)=>{let y=a(g),w=a(b);y!==w&&(y<w?r.set(w,y):r.set(y,w))},c=[];for(let g of e){let b=g.predicate;if(!s.has(b)&&!o.has(b))continue;let y=X(g.subject),w=X(g.object);!y||!w||(i(y),i(w),s.has(b)?l(y,w):c.push({s:y,o:w}))}let u=g=>t+g.replace(/ /g,"_"),d=new Map;for(let g of r.keys()){let b=a(g);d.has(b)||d.set(b,new Set),d.get(b).add(g)}let f=[];for(let[g,b]of d){let y=[...b].sort();f.push({id:u(g),prefLabel:g,altLabels:y.filter(w=>w!==g)})}f.sort((g,b)=>g.id<b.id?-1:g.id>b.id?1:0);let p=new Set,m=[];for(let{s:g,o:b}of c){let y=u(a(g)),w=u(a(b));if(y===w)continue;let $=y<w?`${y}\0${w}`:`${w}\0${y}`;p.has($)||(p.add($),m.push({subject:y,object:w}))}return m.sort((g,b)=>`${g.subject}${g.object}`<`${b.subject}${b.object}`?-1:1),{concepts:f,related:m,conceptIdForTerm:g=>{let b=X(g);return r.has(b)?u(a(b)):null},namespace:E_}}function xu(e,t,n={}){let s=k_(e,n),o=s.conceptIdForTerm(t);if(!o)return null;let r=new Map(s.concepts.map(u=>[u.id,u])),i=r.get(o),a=X(t),l=[i.prefLabel,...i.altLabels].filter(u=>u!==a),c=s.related.filter(u=>u.subject===o||u.object===o).map(u=>r.get(u.subject===o?u.object:u.subject)).filter(Boolean);return{conceptId:o,prefLabel:i.prefLabel,altLabels:i.altLabels,synonyms:l,related:c}}var E_,S_,Eu=I(()=>{en();E_="http://www.w3.org/2004/02/skos/core#",S_={synonym:["mgx:synonym"],related:["mgx:relatedTo","mgx:similarTo"]}});async function Su(e,{config:t,memoryBackend:n=null}){let s=tt(e,"term"),o=xu(await dn(t,n),s);if(!o)throw new Re(`no synonym or related facts for "${s}" in the memory graph. This view answers where the store holds mgx:synonym / mgx:relatedTo facts (a corpus import seeds them).`);let r=[`${o.prefLabel} [${o.conceptId}]`];return o.synonyms.length&&r.push(`synonyms (skos:altLabel): ${o.synonyms.join(", ")}`),o.related.length&&r.push(`related (skos:related): ${o.related.map(i=>i.prefLabel).join(", ")}`),r.push("(from the memory graph's mgx:synonym / mgx:relatedTo / mgx:similarTo facts)"),vs({content:r.join(`
156
- `),data:o})}var Og=I(()=>{Dt();Eu();so();Ge();Su.ownsGraphLoad=!0});function D_(e,t){let n=[];for(let s of t||[])s?.predicate===j_&&X(s.subject)===e&&n.push(X(s.object));return n}function ka(e,t){let n=X(e),s=new Set,o=[n],r=[];for(;o.length;){let i=o.shift();if(!s.has(i)){s.add(i),r.push(i);for(let a of D_(i,t))s.has(a)||o.push(a)}}return r}var j_,__,R_,T_,A_,C_,O_,I_,L_,N_,P_,M_,F_,Ig,ku=I(()=>{en();j_="rdfs:subClassOf",__='<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="10" r="3.4" fill="currentColor"/><circle cx="12" cy="15.6" r="4.6" fill="currentColor"/><g stroke="currentColor" stroke-width="1.1" fill="none" stroke-linecap="round"><path d="M9 8 L2 4"/><path d="M9 10 L1.5 9"/><path d="M9 12.5 L2 14"/><path d="M9 15.5 L3 19"/><path d="M15 8 L22 4"/><path d="M15 10 L22.5 9"/><path d="M15 12.5 L22 14"/><path d="M15 15.5 L21 19"/></g></svg>',R_='<svg viewBox="0 0 24 24" aria-hidden="true"><ellipse cx="12" cy="13.2" rx="3.2" ry="5" fill="currentColor"/><circle cx="12" cy="7" r="2.6" fill="currentColor"/><g fill="currentColor" opacity="0.55"><path d="M9 10 C3 6 2 4 3 2 C6 2 9 6 10.5 10 Z"/><path d="M15 10 C21 6 22 4 21 2 C18 2 15 6 13.5 10 Z"/></g></svg>',T_='<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 2 C7 2 4 10 4 15.5 C4 20 7.6 22 12 22 C16.4 22 20 20 20 15.5 C20 10 17 2 12 2 Z" fill="currentColor"/></svg>',A_='<svg viewBox="0 0 24 24" aria-hidden="true"><ellipse cx="13" cy="15" rx="6.4" ry="4.6" fill="currentColor"/><circle cx="7" cy="8.5" r="4" fill="currentColor"/><g fill="currentColor"><circle cx="4" cy="6" r="1.6"/><circle cx="7" cy="4.2" r="1.7"/><circle cx="10" cy="6" r="1.6"/></g><rect x="18.5" y="14" width="2.2" height="6" rx="1.1" fill="currentColor"/><circle cx="19.6" cy="13" r="1.5" fill="currentColor"/><g stroke="currentColor" stroke-width="1.6" stroke-linecap="round"><line x1="9" y1="19.5" x2="9" y2="22"/><line x1="17" y1="19.5" x2="17" y2="22"/></g></svg>',C_='<svg viewBox="0 0 24 24" aria-hidden="true"><ellipse cx="13" cy="15" rx="6.4" ry="4.2" fill="currentColor"/><circle cx="7" cy="9" r="3.6" fill="currentColor"/><path d="M4.5 6.5 L2 3 L6 5 Z" fill="currentColor"/><path d="M19 13 C22 12 22.5 15 20 16 Z" fill="currentColor"/><g stroke="currentColor" stroke-width="1.6" stroke-linecap="round"><line x1="9" y1="19" x2="9" y2="22"/><line x1="17" y1="19" x2="17" y2="22"/></g></svg>',O_='<svg viewBox="0 0 24 24" aria-hidden="true"><ellipse cx="12" cy="13" rx="7" ry="4.4" fill="currentColor"/><circle cx="12" cy="7" r="3.4" fill="currentColor"/><g stroke="currentColor" stroke-width="1.6" stroke-linecap="round"><line x1="7" y1="17" x2="7" y2="21"/><line x1="17" y1="17" x2="17" y2="21"/></g></svg>',I_='<svg viewBox="0 0 24 24" aria-hidden="true"><rect x="3" y="3" width="18" height="18" rx="1" fill="none" stroke="currentColor" stroke-width="1.6"/><path d="M9 21 L9 13 A3 3 0 0 1 15 13 L15 21" fill="none" stroke="currentColor" stroke-width="1.6"/></svg>',L_='<svg viewBox="0 0 24 24" aria-hidden="true"><rect x="4" y="5" width="16" height="3" rx="1" fill="currentColor"/><rect x="4" y="8" width="3" height="12" fill="currentColor"/><rect x="17" y="8" width="3" height="12" fill="currentColor"/></svg>',N_='<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 6 C7.5 6 5 9.4 5 13.4 C5 17.7 8.1 20 12 20 C15.9 20 19 17.7 19 13.4 C19 9.4 16.5 6 12 6 Z" fill="currentColor"/><path d="M9.4 6.4 C9.9 4.6 10.8 3.4 12 3.4 C13.2 3.4 14.1 4.6 14.6 6.4" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/><ellipse cx="9.8" cy="11.6" rx="1.6" ry="2.1" fill="currentColor" opacity="0.28"/></svg>',P_='<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="6.5" r="3.2" fill="currentColor"/><path d="M6 21 C6 15.5 8.7 13 12 13 C15.3 13 18 15.5 18 21 Z" fill="currentColor"/></svg>',M_='<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="6.5" r="3.2" fill="currentColor"/><path d="M6 21 C6 15.5 8.7 13 12 13 C15.3 13 18 15.5 18 21 Z" fill="currentColor"/><rect x="15.5" y="13.5" width="4.5" height="5" rx="1" fill="currentColor" opacity="0.6"/></svg>',F_='<svg viewBox="0 0 24 24" aria-hidden="true"><rect x="3" y="10" width="18" height="10" rx="1.2" fill="currentColor"/><path d="M3 10 L5 5 H19 L21 10 Z" fill="currentColor" opacity="0.7"/><rect x="10.6" y="9.4" width="2.8" height="2.2" rx="0.4" fill="currentColor" opacity="0.35"/></svg>',Ig=Object.freeze({spider:__,fly:R_,egg:T_,poodle:A_,dog:C_,animal:O_,room:I_,furniture:L_,portable:N_,person:P_,adventurer:M_,container:F_})});function z_(e){return[...new Set([...e.matchAll(/\bid="([^"]+)"/g)].map(t=>t[1]))]}function Lg(e,t){if(!t||typeof e!="string")return e;let n=String(t).replace(/[^a-zA-Z0-9_-]/g,"-"),s=e;for(let o of z_(e)){let r=`${o}-${n}`;s=s.split(`id="${o}"`).join(`id="${r}"`),s=s.split(`url(#${o})`).join(`url(#${r})`)}return s}var Ng=I(()=>{});function B_(e,t){return(t||[]).filter(n=>Array.isArray(n?.classes)&&n.classes.includes(e))}function U_(e){let t=e?.match;return t?Array.isArray(t)?t:[t]:[]}function Fg(e){return U_(e).filter(t=>t?.property&&t.value!==void 0)}function W_(e,t){return e.length?e.every(n=>(t||[]).some(s=>s.predicate===n.property&&s.object===n.value)):!1}function G_(e,t){let n=null,s=0;for(let o of e){let r=Fg(o);r.length<=s||W_(r,t)&&(n=o,s=r.length)}return n}function H_(e,t,n){if(typeof n=="string"&&t.placeholder)return e.split(t.placeholder).join(n);if(n&&typeof n=="object"&&t.placeholders){let s=e;for(let[o,r]of Object.entries(t.placeholders)){if(!Object.prototype.hasOwnProperty.call(n,o))return null;s=s.split(r).join(n[o])}return s}return null}function Pg(e,t){let n=e.svg,s=0;for(let o of Object.values(e.parameters||{})){let r=o?.values||{},i=(t||[]).find(l=>l.predicate===o.property&&Object.prototype.hasOwnProperty.call(r,l.object));if(!i)continue;let a=H_(n,o,r[i.object]);a&&(n=a,s+=1)}return s>0?n:null}function V_(e){let t=[];for(let n of Object.values(e.parameters||{})){n?.placeholder&&t.push(n.placeholder);for(let s of Object.values(n?.placeholders||{}))t.push(s)}return t}function q_(e,t){let n=t;for(let s of V_(e))n=n.split(s).join("");return n}function Mg(e,t,n){let s=B_(e,n),o=G_(s,t);if(o&&!o.parameters)return o.svg;if(o)return q_(o,Pg(o,t)||o.svg);for(let i of s){if(i.match||!i.parameters)continue;let a=Pg(i,t);if(a)return a}let r=s.find(i=>!i.match&&!i.parameters);return r?r.svg:null}function K_(e,t,n,s,o,r){for(let a of ka(e,t)){let l=Mg(a,n,s);if(l)return l;if(Object.prototype.hasOwnProperty.call(o,a))return o[a]}let i=Mg(r,n,s);return i||o[r]}function Dg(e,t,n,s,o,{rootFallback:r="animal",instanceKey:i}={}){let a=K_(e,t,n,s,o,r);return i?Lg(a,i):a}var qN,KN,ju=I(()=>{ku();Ng();qN=Object.freeze(["left","half-left","half-right","right"]),KN=Object.freeze(["moving"])});function _u(e){for(let t of e||[])if(t?.predicate===Y_&&Object.prototype.hasOwnProperty.call(zg,t.object))return zg[t.object];return 1}var Y_,zg,Bg=I(()=>{Y_="mgx:hasProperty",zg=Object.freeze({small:.8,large:1.3,long:1.2,tall:1.25})});function Ug(e,t){let n="mgx:feels",s="mgx:hasProperty",o=String(e&&e.class||"").trim(),r=String(e&&e.expression||"").trim(),i=String(e&&e.size||"").trim(),a=t||{},l=a.resolveSpriteAsset;if(typeof l!="function")throw new TypeError("resolveSpriteRequest needs deps.resolveSpriteAsset");let c=a.templates||[],u=a.spriteRegistry||{},d=a.factRows||[],f=a.rootFallback||"animal",p=a.classAncestorChain,m=a.sizeScaleFor,h=a.expressionPalette,g=[];r&&g.push({predicate:n,object:r}),i&&g.push({predicate:s,object:i});let b={rootFallback:f};a.instanceKey&&(b.instanceKey=a.instanceKey);let y=l(o,d,g,c,u,b),w=R=>l(R,[],g,c,{},{rootFallback:R}),$=R=>Object.prototype.hasOwnProperty.call(u,R),_=(R,k)=>{let A=c.filter(M=>M&&Array.isArray(M.classes)&&M.classes.indexOf(R)>=0),T=A.find(M=>M.svg===k)||A.find(M=>!M.match&&M.parameters)||null;return T?{classes:T.classes.slice(),parameters:Object.keys(T.parameters||{}).sort(),match:T.match||null}:null},v=null,x=null;if(typeof p=="function"){v=[];for(let R of p(o,d)){let k=w(R);if(v.push({term:R,template:!!k,registry:$(R)}),k){x={term:R,via:"template",hops:v.length-1,root:!1,template:_(R,k)};break}if($(R)){x={term:R,via:"registry",hops:v.length-1,root:!1,template:null};break}}if(!x){let R=w(f);v.push({term:f,template:!!R,registry:$(f),root:!0}),x={term:f,via:R?"template":"registry",hops:v.length-1,root:!0,template:R?_(f,R):null}}}let E=a.instanceKey?l(o,d,g,c,u,{rootFallback:f}):y,S=r?l(o,d,g.filter(R=>R.predicate!==n),c,u,{rootFallback:f}):null;return{class:o,expression:r||null,size:i||null,svg:y,scale:typeof m=="function"?m(g):1,sizeKnown:i&&typeof m=="function"?m([{predicate:s,object:i}])!==1:null,expressionKnown:r&&h?Object.prototype.hasOwnProperty.call(h,r):null,expressionApplied:r?E!==S:null,rootFallback:f,fellBackToRoot:x?!!x.root:null,chain:v,matched:x}}var Wg=I(()=>{});var Gg,Hg,X_,ZN,Vg=I(()=>{ju();Gg="icon tier",Hg="sprite tier",X_=Object.freeze({takeParameter:Object.freeze({predicate:"mgx:take-parameter",comment:"sprite class -> parameter name: a parameter that class's own templates declare."}),offerVariant:Object.freeze({predicate:"mgx:offer-variant",comment:"sprite class -> variant value: a hand-authored [match] constraint that class's templates offer."})}),ZN=Object.freeze(Object.values(X_).map(e=>e.predicate))});var qg,Kg=I(()=>{qg=()=>[]});var Yg,Xg=I(()=>{Yg=()=>[]});function eR(){let e=Yg();return e.length?{templates:e,tier:Hg}:{templates:qg(),tier:Gg}}function Jg(e){return e.map(t=>t.term).join(" -> ")}async function Ru(e,{config:t,memoryBackend:n=null}){let s=tt(e,"class").toLowerCase(),o=String(e?.expression||"").trim().toLowerCase(),r=String(e?.size||"").trim().toLowerCase();if(o&&!Object.hasOwn(yo,o))throw new Re(`"${o}" is not a sprite expression. The palette holds: ${Q_().join(", ")}.`);if(r&&!Z_(r))throw new Re(`"${r}" is not a size the sprite scale recognises \u2014 it reads a taught mgx:hasProperty size word off the individual, and has no entry for this one.`);let{templates:i,tier:a}=eR(),l=await dn(t,n),c=Ug({class:s,expression:o,size:r},{factRows:l,templates:i,spriteRegistry:Ig,resolveSpriteAsset:Dg,classAncestorChain:ka,sizeScaleFor:_u,expressionPalette:yo});if(!c.svg||c.fellBackToRoot)throw new Re(`no sprite for "${s}" \u2014 neither it nor any rdfs:subClassOf ancestor the memory graph knows (${Jg(c.chain)}) carries one in the ${a}. Teach the class its superclass first, or ask for a class the catalog draws.`);if(o&&!c.expressionApplied)throw new Re(`the ${a} draws "${s}" (matched at "${c.matched.term}") but that template takes no expression, so "${o}" would not show. Ask for the plain sprite, or a class whose template carries an emotion parameter.`);let u=[o?`expression ${o}`:"",r?`size ${r}`:""].filter(Boolean),d=[`sprite for "${s}"${u.length?` (${u.join(", ")})`:""}, from the ${a}`,c.matched.hops===0?`matched at "${c.matched.term}", the class itself, via its own ${c.matched.via}`:`matched at "${c.matched.term}", ${c.matched.hops} hop(s) up the ancestor chain, via its ${c.matched.via}`,`ancestor chain walked: ${Jg(c.chain)}`];return c.matched.template?.parameters.length&&d.push(`template parameters: ${c.matched.template.parameters.join(", ")}`),r&&d.push(`render scale: ${c.scale} (from the taught mgx:hasProperty "${r}")`),d.push(`${c.svg.length} characters of SVG markup`),vs({content:d.join(`
157
- `),data:{class:c.class,expression:c.expression,size:c.size,tier:a,scale:c.scale,svg:c.svg,chain:c.chain,matched:c.matched,expressionApplied:c.expressionApplied}})}var J_,Q_,Z_,Qg=I(()=>{Dt();ku();ju();sc();Bg();Wg();Vg();Kg();Xg();so();Ge();J_="mgx:hasProperty",Q_=()=>Object.keys(yo).sort(),Z_=e=>!!e&&_u([{predicate:J_,object:String(e)}])!==1;Ru.ownsGraphLoad=!0});function Zg(e,{graph:t}){return Gp(t,{pkg:String(e?.package||"").trim()})}var eb=I(()=>{Ie()});function tb(e,{graph:t,svc:n}){let{match:s}=$t(n,tt(e,"module"),"module");return pf(t,s)}var nb=I(()=>{Ie();Ge()});function sb(e,{graph:t}){return qp(t)}var ob=I(()=>{Ie()});function ib(e,{graph:t}){let{content:n,tmct_ask:s}=bs(t,tt(e,"query"));return vs({content:n,data:s,text:`${n}${rb}${JSON.stringify(s,null,2)}`})}var rb,Tu=I(()=>{ws();Ge();rb=`
155
+ ${h}`:""}${m}`}var Tg=O(()=>{_t();zt();Xi();Oe();qe()});var Ag,Ig=O(()=>{Oe();qe();Ag=rt(Xp)});function Cg(e,{graph:t,svc:n}){let{match:s}=xt(n,tt(e,"module"),"module");return Dp(t,s)}var Og=O(()=>{Oe();qe()});async function Lg(e,{graph:t,config:n}){let s=String(e?.query||"").trim(),o=String(e?.kind||"").trim();if(!s&&!o)throw new Re("query is required");let r=Kp(t,s,{kind:o,decorator:String(e?.decorator||"").trim(),name:String(e?.name||"").trim(),toolNamePrefix:n?.toolNamePrefix});if(!o&&/^no module matches/.test(r)){let i=Aa(await dn(n),s);if(i)return i}return r}var Ng=O(()=>{zt();Oe();io()});async function Mg(e,{graph:t,svc:n,config:s}){let o=tt(e,"class"),{match:r}=en(n.graph,o);if(r)return Yp(t,r,{toolNamePrefix:s?.toolNamePrefix});let i=Ta(await dn(s),o);if(i)return i;xt(n,o,"class")}var Pg=O(()=>{Oe();io();qe()});async function Fg(e,{graph:t,svc:n,config:s}){let o=tt(e,"class"),{match:r}=en(n.graph,o);if(r)return Jp(t,r);let i=Ta(await dn(s),o);if(i)return i;xt(n,o,"class")}var Dg=O(()=>{Oe();io();qe()});function D_(e,{conceptBase:t="concept:",relationMap:n=F_}={}){let s=new Set(n.synonym||[]),o=new Set(n.related||[]),r=new Map,i=g=>{r.has(g)||r.set(g,g)},a=g=>{let b=g;for(;r.get(b)!==b;)b=r.get(b);for(;r.get(g)!==b;){let y=r.get(g);r.set(g,b),g=y}return b},l=(g,b)=>{let y=a(g),w=a(b);y!==w&&(y<w?r.set(w,y):r.set(y,w))},c=[];for(let g of e){let b=g.predicate;if(!s.has(b)&&!o.has(b))continue;let y=X(g.subject),w=X(g.object);!y||!w||(i(y),i(w),s.has(b)?l(y,w):c.push({s:y,o:w}))}let u=g=>t+g.replace(/ /g,"_"),d=new Map;for(let g of r.keys()){let b=a(g);d.has(b)||d.set(b,new Set),d.get(b).add(g)}let f=[];for(let[g,b]of d){let y=[...b].sort();f.push({id:u(g),prefLabel:g,altLabels:y.filter(w=>w!==g)})}f.sort((g,b)=>g.id<b.id?-1:g.id>b.id?1:0);let p=new Set,m=[];for(let{s:g,o:b}of c){let y=u(a(g)),w=u(a(b));if(y===w)continue;let v=y<w?`${y}\0${w}`:`${w}\0${y}`;p.has(v)||(p.add(v),m.push({subject:y,object:w}))}return m.sort((g,b)=>`${g.subject}${g.object}`<`${b.subject}${b.object}`?-1:1),{concepts:f,related:m,conceptIdForTerm:g=>{let b=X(g);return r.has(b)?u(a(b)):null},namespace:P_}}function ju(e,t,n={}){let s=D_(e,n),o=s.conceptIdForTerm(t);if(!o)return null;let r=new Map(s.concepts.map(u=>[u.id,u])),i=r.get(o),a=X(t),l=[i.prefLabel,...i.altLabels].filter(u=>u!==a),c=s.related.filter(u=>u.subject===o||u.object===o).map(u=>r.get(u.subject===o?u.object:u.subject)).filter(Boolean);return{conceptId:o,prefLabel:i.prefLabel,altLabels:i.altLabels,synonyms:l,related:c}}var P_,F_,_u=O(()=>{qt();P_="http://www.w3.org/2004/02/skos/core#",F_={synonym:["mgx:synonym"],related:["mgx:relatedTo","mgx:similarTo"]}});async function Ru(e,{config:t,memoryBackend:n=null}){let s=tt(e,"term"),o=ju(await dn(t,n),s);if(!o)throw new Re(`no synonym or related facts for "${s}" in the memory graph. This view answers where the store holds mgx:synonym / mgx:relatedTo facts (a corpus import seeds them).`);let r=[`${o.prefLabel} [${o.conceptId}]`];return o.synonyms.length&&r.push(`synonyms (skos:altLabel): ${o.synonyms.join(", ")}`),o.related.length&&r.push(`related (skos:related): ${o.related.map(i=>i.prefLabel).join(", ")}`),r.push("(from the memory graph's mgx:synonym / mgx:relatedTo / mgx:similarTo facts)"),xs({content:r.join(`
156
+ `),data:o})}var zg=O(()=>{zt();_u();io();qe();Ru.ownsGraphLoad=!0});function Z_(e,t){let n=[];for(let s of t||[])s?.predicate===z_&&X(s.subject)===e&&n.push(X(s.object));return n}function Ia(e,t){let n=X(e),s=new Set,o=[n],r=[];for(;o.length;){let i=o.shift();if(!s.has(i)){s.add(i),r.push(i);for(let a of Z_(i,t))s.has(a)||o.push(a)}}return r}var z_,U_,B_,W_,G_,q_,V_,H_,K_,Y_,X_,J_,Q_,Ug,Tu=O(()=>{qt();z_="rdfs:subClassOf",U_='<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="10" r="3.4" fill="currentColor"/><circle cx="12" cy="15.6" r="4.6" fill="currentColor"/><g stroke="currentColor" stroke-width="1.1" fill="none" stroke-linecap="round"><path d="M9 8 L2 4"/><path d="M9 10 L1.5 9"/><path d="M9 12.5 L2 14"/><path d="M9 15.5 L3 19"/><path d="M15 8 L22 4"/><path d="M15 10 L22.5 9"/><path d="M15 12.5 L22 14"/><path d="M15 15.5 L21 19"/></g></svg>',B_='<svg viewBox="0 0 24 24" aria-hidden="true"><ellipse cx="12" cy="13.2" rx="3.2" ry="5" fill="currentColor"/><circle cx="12" cy="7" r="2.6" fill="currentColor"/><g fill="currentColor" opacity="0.55"><path d="M9 10 C3 6 2 4 3 2 C6 2 9 6 10.5 10 Z"/><path d="M15 10 C21 6 22 4 21 2 C18 2 15 6 13.5 10 Z"/></g></svg>',W_='<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 2 C7 2 4 10 4 15.5 C4 20 7.6 22 12 22 C16.4 22 20 20 20 15.5 C20 10 17 2 12 2 Z" fill="currentColor"/></svg>',G_='<svg viewBox="0 0 24 24" aria-hidden="true"><ellipse cx="13" cy="15" rx="6.4" ry="4.6" fill="currentColor"/><circle cx="7" cy="8.5" r="4" fill="currentColor"/><g fill="currentColor"><circle cx="4" cy="6" r="1.6"/><circle cx="7" cy="4.2" r="1.7"/><circle cx="10" cy="6" r="1.6"/></g><rect x="18.5" y="14" width="2.2" height="6" rx="1.1" fill="currentColor"/><circle cx="19.6" cy="13" r="1.5" fill="currentColor"/><g stroke="currentColor" stroke-width="1.6" stroke-linecap="round"><line x1="9" y1="19.5" x2="9" y2="22"/><line x1="17" y1="19.5" x2="17" y2="22"/></g></svg>',q_='<svg viewBox="0 0 24 24" aria-hidden="true"><ellipse cx="13" cy="15" rx="6.4" ry="4.2" fill="currentColor"/><circle cx="7" cy="9" r="3.6" fill="currentColor"/><path d="M4.5 6.5 L2 3 L6 5 Z" fill="currentColor"/><path d="M19 13 C22 12 22.5 15 20 16 Z" fill="currentColor"/><g stroke="currentColor" stroke-width="1.6" stroke-linecap="round"><line x1="9" y1="19" x2="9" y2="22"/><line x1="17" y1="19" x2="17" y2="22"/></g></svg>',V_='<svg viewBox="0 0 24 24" aria-hidden="true"><ellipse cx="12" cy="13" rx="7" ry="4.4" fill="currentColor"/><circle cx="12" cy="7" r="3.4" fill="currentColor"/><g stroke="currentColor" stroke-width="1.6" stroke-linecap="round"><line x1="7" y1="17" x2="7" y2="21"/><line x1="17" y1="17" x2="17" y2="21"/></g></svg>',H_='<svg viewBox="0 0 24 24" aria-hidden="true"><rect x="3" y="3" width="18" height="18" rx="1" fill="none" stroke="currentColor" stroke-width="1.6"/><path d="M9 21 L9 13 A3 3 0 0 1 15 13 L15 21" fill="none" stroke="currentColor" stroke-width="1.6"/></svg>',K_='<svg viewBox="0 0 24 24" aria-hidden="true"><rect x="4" y="5" width="16" height="3" rx="1" fill="currentColor"/><rect x="4" y="8" width="3" height="12" fill="currentColor"/><rect x="17" y="8" width="3" height="12" fill="currentColor"/></svg>',Y_='<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 6 C7.5 6 5 9.4 5 13.4 C5 17.7 8.1 20 12 20 C15.9 20 19 17.7 19 13.4 C19 9.4 16.5 6 12 6 Z" fill="currentColor"/><path d="M9.4 6.4 C9.9 4.6 10.8 3.4 12 3.4 C13.2 3.4 14.1 4.6 14.6 6.4" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/><ellipse cx="9.8" cy="11.6" rx="1.6" ry="2.1" fill="currentColor" opacity="0.28"/></svg>',X_='<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="6.5" r="3.2" fill="currentColor"/><path d="M6 21 C6 15.5 8.7 13 12 13 C15.3 13 18 15.5 18 21 Z" fill="currentColor"/></svg>',J_='<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="6.5" r="3.2" fill="currentColor"/><path d="M6 21 C6 15.5 8.7 13 12 13 C15.3 13 18 15.5 18 21 Z" fill="currentColor"/><rect x="15.5" y="13.5" width="4.5" height="5" rx="1" fill="currentColor" opacity="0.6"/></svg>',Q_='<svg viewBox="0 0 24 24" aria-hidden="true"><rect x="3" y="10" width="18" height="10" rx="1.2" fill="currentColor"/><path d="M3 10 L5 5 H19 L21 10 Z" fill="currentColor" opacity="0.7"/><rect x="10.6" y="9.4" width="2.8" height="2.2" rx="0.4" fill="currentColor" opacity="0.35"/></svg>',Ug=Object.freeze({spider:U_,fly:B_,egg:W_,poodle:G_,dog:q_,animal:V_,room:H_,furniture:K_,portable:Y_,person:X_,adventurer:J_,container:Q_})});function eR(e){return[...new Set([...e.matchAll(/\bid="([^"]+)"/g)].map(t=>t[1]))]}function Bg(e,t){if(!t||typeof e!="string")return e;let n=String(t).replace(/[^a-zA-Z0-9_-]/g,"-"),s=e;for(let o of eR(e)){let r=`${o}-${n}`;s=s.split(`id="${o}"`).join(`id="${r}"`),s=s.split(`url(#${o})`).join(`url(#${r})`)}return s}var Wg=O(()=>{});function tR(e,t){return(t||[]).filter(n=>Array.isArray(n?.classes)&&n.classes.includes(e))}function nR(e){let t=e?.match;return t?Array.isArray(t)?t:[t]:[]}function Vg(e){return nR(e).filter(t=>t?.property&&t.value!==void 0)}function sR(e,t){return e.length?e.every(n=>(t||[]).some(s=>s.predicate===n.property&&s.object===n.value)):!1}function oR(e,t){let n=null,s=0;for(let o of e){let r=Vg(o);r.length<=s||sR(r,t)&&(n=o,s=r.length)}return n}function rR(e,t,n){if(typeof n=="string"&&t.placeholder)return e.split(t.placeholder).join(n);if(n&&typeof n=="object"&&t.placeholders){let s=e;for(let[o,r]of Object.entries(t.placeholders)){if(!Object.prototype.hasOwnProperty.call(n,o))return null;s=s.split(r).join(n[o])}return s}return null}function Gg(e,t){let n=e.svg,s=0;for(let o of Object.values(e.parameters||{})){let r=o?.values||{},i=(t||[]).find(l=>l.predicate===o.property&&Object.prototype.hasOwnProperty.call(r,l.object));if(!i)continue;let a=rR(n,o,r[i.object]);a&&(n=a,s+=1)}return s>0?n:null}function iR(e){let t=[];for(let n of Object.values(e.parameters||{})){n?.placeholder&&t.push(n.placeholder);for(let s of Object.values(n?.placeholders||{}))t.push(s)}return t}function aR(e,t){let n=t;for(let s of iR(e))n=n.split(s).join("");return n}function qg(e,t,n){let s=tR(e,n),o=oR(s,t);if(o&&!o.parameters)return o.svg;if(o)return aR(o,Gg(o,t)||o.svg);for(let i of s){if(i.match||!i.parameters)continue;let a=Gg(i,t);if(a)return a}let r=s.find(i=>!i.match&&!i.parameters);return r?r.svg:null}function cR(e,t,n,s,o,r){for(let a of Ia(e,t)){let l=qg(a,n,s);if(l)return l;if(Object.prototype.hasOwnProperty.call(o,a))return o[a]}let i=qg(r,n,s);return i||o[r]}function Hg(e,t,n,s,o,{rootFallback:r="animal",instanceKey:i}={}){let a=cR(e,t,n,s,o,r);return i?Bg(a,i):a}var S0,k0,Au=O(()=>{Tu();Wg();S0=Object.freeze(["left","half-left","half-right","right"]),k0=Object.freeze(["moving"])});function Iu(e){for(let t of e||[])if(t?.predicate===lR&&Object.prototype.hasOwnProperty.call(Kg,t.object))return Kg[t.object];return 1}var lR,Kg,Yg=O(()=>{lR="mgx:hasProperty",Kg=Object.freeze({small:.8,large:1.3,long:1.2,tall:1.25})});function Xg(e,t){let n="mgx:feels",s="mgx:hasProperty",o=String(e&&e.class||"").trim(),r=String(e&&e.expression||"").trim(),i=String(e&&e.size||"").trim(),a=t||{},l=a.resolveSpriteAsset;if(typeof l!="function")throw new TypeError("resolveSpriteRequest needs deps.resolveSpriteAsset");let c=a.templates||[],u=a.spriteRegistry||{},d=a.factRows||[],f=a.rootFallback||"animal",p=a.classAncestorChain,m=a.sizeScaleFor,h=a.expressionPalette,g=[];r&&g.push({predicate:n,object:r}),i&&g.push({predicate:s,object:i});let b={rootFallback:f};a.instanceKey&&(b.instanceKey=a.instanceKey);let y=l(o,d,g,c,u,b),w=R=>l(R,[],g,c,{},{rootFallback:R}),v=R=>Object.prototype.hasOwnProperty.call(u,R),_=(R,k)=>{let A=c.filter(P=>P&&Array.isArray(P.classes)&&P.classes.indexOf(R)>=0),T=A.find(P=>P.svg===k)||A.find(P=>!P.match&&P.parameters)||null;return T?{classes:T.classes.slice(),parameters:Object.keys(T.parameters||{}).sort(),match:T.match||null}:null},$=null,x=null;if(typeof p=="function"){$=[];for(let R of p(o,d)){let k=w(R);if($.push({term:R,template:!!k,registry:v(R)}),k){x={term:R,via:"template",hops:$.length-1,root:!1,template:_(R,k)};break}if(v(R)){x={term:R,via:"registry",hops:$.length-1,root:!1,template:null};break}}if(!x){let R=w(f);$.push({term:f,template:!!R,registry:v(f),root:!0}),x={term:f,via:R?"template":"registry",hops:$.length-1,root:!0,template:R?_(f,R):null}}}let E=a.instanceKey?l(o,d,g,c,u,{rootFallback:f}):y,S=r?l(o,d,g.filter(R=>R.predicate!==n),c,u,{rootFallback:f}):null;return{class:o,expression:r||null,size:i||null,svg:y,scale:typeof m=="function"?m(g):1,sizeKnown:i&&typeof m=="function"?m([{predicate:s,object:i}])!==1:null,expressionKnown:r&&h?Object.prototype.hasOwnProperty.call(h,r):null,expressionApplied:r?E!==S:null,rootFallback:f,fellBackToRoot:x?!!x.root:null,chain:$,matched:x}}var Jg=O(()=>{});var Qg,Zg,uR,A0,eb=O(()=>{Au();Qg="icon tier",Zg="sprite tier",uR=Object.freeze({takeParameter:Object.freeze({predicate:"mgx:take-parameter",comment:"sprite class -> parameter name: a parameter that class's own templates declare."}),offerVariant:Object.freeze({predicate:"mgx:offer-variant",comment:"sprite class -> variant value: a hand-authored [match] constraint that class's templates offer."})}),A0=Object.freeze(Object.values(uR).map(e=>e.predicate))});var tb,nb=O(()=>{tb=()=>[]});var sb,ob=O(()=>{sb=()=>[]});function mR(){let e=sb();return e.length?{templates:e,tier:Zg}:{templates:tb(),tier:Qg}}function rb(e){return e.map(t=>t.term).join(" -> ")}async function Cu(e,{config:t,memoryBackend:n=null}){let s=tt(e,"class").toLowerCase(),o=String(e?.expression||"").trim().toLowerCase(),r=String(e?.size||"").trim().toLowerCase();if(o&&!Object.hasOwn(Eo,o))throw new Re(`"${o}" is not a sprite expression. The palette holds: ${pR().join(", ")}.`);if(r&&!fR(r))throw new Re(`"${r}" is not a size the sprite scale recognises \u2014 it reads a taught mgx:hasProperty size word off the individual, and has no entry for this one.`);let{templates:i,tier:a}=mR(),l=await dn(t,n),c=Xg({class:s,expression:o,size:r},{factRows:l,templates:i,spriteRegistry:Ug,resolveSpriteAsset:Hg,classAncestorChain:Ia,sizeScaleFor:Iu,expressionPalette:Eo});if(!c.svg||c.fellBackToRoot)throw new Re(`no sprite for "${s}" \u2014 neither it nor any rdfs:subClassOf ancestor the memory graph knows (${rb(c.chain)}) carries one in the ${a}. Teach the class its superclass first, or ask for a class the catalog draws.`);if(o&&!c.expressionApplied)throw new Re(`the ${a} draws "${s}" (matched at "${c.matched.term}") but that template takes no expression, so "${o}" would not show. Ask for the plain sprite, or a class whose template carries an emotion parameter.`);let u=[o?`expression ${o}`:"",r?`size ${r}`:""].filter(Boolean),d=[`sprite for "${s}"${u.length?` (${u.join(", ")})`:""}, from the ${a}`,c.matched.hops===0?`matched at "${c.matched.term}", the class itself, via its own ${c.matched.via}`:`matched at "${c.matched.term}", ${c.matched.hops} hop(s) up the ancestor chain, via its ${c.matched.via}`,`ancestor chain walked: ${rb(c.chain)}`];return c.matched.template?.parameters.length&&d.push(`template parameters: ${c.matched.template.parameters.join(", ")}`),r&&d.push(`render scale: ${c.scale} (from the taught mgx:hasProperty "${r}")`),d.push(`${c.svg.length} characters of SVG markup`),xs({content:d.join(`
157
+ `),data:{class:c.class,expression:c.expression,size:c.size,tier:a,scale:c.scale,svg:c.svg,chain:c.chain,matched:c.matched,expressionApplied:c.expressionApplied}})}var dR,pR,fR,ib=O(()=>{zt();Tu();Au();uc();Yg();Jg();eb();nb();ob();io();qe();dR="mgx:hasProperty",pR=()=>Object.keys(Eo).sort(),fR=e=>!!e&&Iu([{predicate:dR,object:String(e)}])!==1;Cu.ownsGraphLoad=!0});function ab(e,{graph:t}){return Qp(t,{pkg:String(e?.package||"").trim()})}var cb=O(()=>{Oe()});function lb(e,{graph:t,svc:n}){let{match:s}=xt(n,tt(e,"module"),"module");return $f(t,s)}var ub=O(()=>{Oe();qe()});function db(e,{graph:t}){return tf(t)}var pb=O(()=>{Oe()});function mb(e,{graph:t}){let{content:n,tmct_ask:s}=ys(t,tt(e,"query"));return xs({content:n,data:s,text:`${n}${fb}${JSON.stringify(s,null,2)}`})}var fb,Ou=O(()=>{$s();qe();fb=`
158
158
 
159
159
  ---tmct_ask---
160
- `});var ab,cb=I(()=>{Ie();Ge();ab=rt(Vp)});var lb,ub=I(()=>{Ie();Ge();lb=rt(Kp)});var db,pb=I(()=>{Ie();Ge();db=rt(tf)});var fb,mb=I(()=>{Ie();Ge();fb=rt(sf)});var hb,gb=I(()=>{Ie();Ge();hb=rt(of)});var bb,wb=I(()=>{Ie();Ge();bb=rt(Xp)});var yb,vb=I(()=>{Ie();Ge();yb=rt(Jp)});var $b,xb=I(()=>{Ie();Ge();$b=rt(Zp)});var Eb,Sb=I(()=>{Ie();Ge();Eb=rt(df)});function tR(e){let t={subject:e.subject,predicate:e.predicate,object:e.object,provenance:e.provenance||""};return e.quantifier&&(t.quantifier=e.quantifier),t}function nR(e){let t=(e||[]).map(tR);return t.map(n=>JSON.stringify(n)).join(`
160
+ `});var hb,gb=O(()=>{Oe();qe();hb=rt(ef)});var bb,wb=O(()=>{Oe();qe();bb=rt(nf)});var yb,$b=O(()=>{Oe();qe();yb=rt(uf)});var vb,xb=O(()=>{Oe();qe();vb=rt(pf)});var Eb,Sb=O(()=>{Oe();qe();Eb=rt(ff)});var kb,jb=O(()=>{Oe();qe();kb=rt(of)});var _b,Rb=O(()=>{Oe();qe();_b=rt(rf)});var Tb,Ab=O(()=>{Oe();qe();Tb=rt(cf)});var Ib,Cb=O(()=>{Oe();qe();Ib=rt(yf)});function hR(e){let t={subject:e.subject,predicate:e.predicate,object:e.object,provenance:e.provenance||""};return e.quantifier&&(t.quantifier=e.quantifier),t}function gR(e){let t=(e||[]).map(hR);return t.map(n=>JSON.stringify(n)).join(`
161
161
  `)+(t.length?`
162
- `:"")}function kb(e){return nR(Ct(e))}var jb=I(()=>{Ke()});async function Au(e,{config:t,memoryBackend:n=null}){let s=n?null:await ks($e($e(t.graphFile))),o=n||s.dir;try{return kb(await Ht(o))||"(the memory store holds no facts to export)"}finally{s&&await s.close()}}var _b=I(()=>{jb();Be();Ke();Au.ownsGraphLoad=!0});async function Cu(e,{config:t,ingest:n}){let s=String(e?.text??"");if(!s.trim())return"(nothing to ingest \u2014 pass some text)";if(typeof n!="function")return"(ingest isn't wired into this context \u2014 invoke tmct_ingest through the CLI `cli` route or the chat surface)";let o=e?.optimistic===!0,{dir:r,close:i}=await ks($e($e(t.graphFile)));try{let a=await n(s,{memoryDir:r,config:t,sourceTag:"tool",optimistic:o,canonical:!0}),l=a.extracted.length+a.optimistic.length,c=`${a.sentences} sentence(s), ${a.recognized} recognized`+(o?`, ${a.optimistic.length} optimistic candidate(s)`:"")+`, ${a.skipped} skipped \u2014 ${l} fact(s) grounded.`;return vs({content:l?`${c}
162
+ `:"")}function Ob(e){return gR(vt(e))}var Lb=O(()=>{Be()});async function Lu(e,{config:t,memoryBackend:n=null}){let s=n?null:await _s(ve(ve(t.graphFile))),o=n||s.dir;try{return Ob(await Ct(o))||"(the memory store holds no facts to export)"}finally{s&&await s.close()}}var Nb=O(()=>{Lb();Ue();Be();Lu.ownsGraphLoad=!0});async function Nu(e,{config:t,ingest:n}){let s=String(e?.text??"");if(!s.trim())return"(nothing to ingest \u2014 pass some text)";if(typeof n!="function")return"(ingest isn't wired into this context \u2014 invoke tmct_ingest through the CLI `cli` route or the chat surface)";let o=e?.optimistic===!0,{dir:r,close:i}=await _s(ve(ve(t.graphFile)));try{let a=await n(s,{memoryDir:r,config:t,sourceTag:"tool",optimistic:o,canonical:!0}),l=a.extracted.length+a.optimistic.length,c=`${a.sentences} sentence(s), ${a.recognized} recognized`+(o?`, ${a.optimistic.length} optimistic candidate(s)`:"")+`, ${a.skipped} skipped \u2014 ${l} fact(s) grounded.`;return xs({content:l?`${c}
163
163
  ${a.canonical.join(`
164
- `)}`:c,data:{...a,grounded:l}})}finally{await i()}}var Rb=I(()=>{Be();Ke();Ge();Cu.ownsGraphLoad=!0});var sR,Tb=I(()=>{pl();Fm();yg();$g();Eg();kg();_g();Tg();Cg();Og();Qg();eb();nb();ob();Tu();cb();ub();pb();mb();gb();wb();vb();xb();Sb();_b();Rb();sR=Object.freeze({tmct_context:dl,tmct_context_more:Mm,tmct_describe:wg,tmct_snippet:vg,tmct_signature:xg,tmct_impact:Sg,tmct_search:jg,tmct_members:Rg,tmct_subclasses:Ag,tmct_related:Su,tmct_sprite:Ru,tmct_architecture:Zg,tmct_exports:tb,tmct_untested:sb,tmct_ask:ib,tmct_tests_for:ab,tmct_history:lb,tmct_file_history:db,tmct_method_history:fb,tmct_class_history:hb,tmct_callers:bb,tmct_callees:yb,tmct_calls:$b,tmct_cochanges:Eb,tmct_export:Au,tmct_ingest:Cu})});var Ou=I(()=>{});var ja,Iu=I(()=>{ja=()=>({relations:[],constructions:[]})});var Ab,Cb=I(()=>{jt();Be();Xd();Dt();vr();ws();qi();Ki();Tb();Ge();Ao();Ii();Ou();Iu();Ki();pl();Tu();Li(void 0);Oi(ja);Ab=Yd.map(({name:e,agentDescription:t,inputSchema:n})=>({name:e,description:t,inputSchema:n}))});var tP,nP,sP,_a=I(()=>{tP=Object.freeze(["entity","set","event","measure"]),nP=Object.freeze(["date","count","op","pivot","metric","kind","provenance"]),sP=Object.freeze({it:Object.freeze(["entity","event","measure"]),this:Object.freeze(["entity","event","measure"]),that:Object.freeze(["entity","event","measure"]),"this one":Object.freeze(["entity","event","measure"]),"that one":Object.freeze(["entity","event","measure"]),those:Object.freeze(["set"]),them:Object.freeze(["set"]),these:Object.freeze(["set"]),here:Object.freeze(["entity"])})});var pt,rP,iP,aP,cP,lP,uP,dP,pP,fP,mP,hP,gP,bP,wP,yP,vP,oR,$P,xP,Ob=I(()=>{pt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},rP=pt("createRequire"),iP=pt("readFileSync"),aP=pt("access"),cP=pt("readFile"),lP=pt("writeFile"),uP=pt("appendFile"),dP=pt("mkdir"),pP=pt("mkdtemp"),fP=pt("rename"),mP=pt("unlink"),hP=pt("rm"),gP=pt("stat"),bP=pt("copyFile"),wP=pt("readdir"),yP=pt("createReadStream"),vP=pt("createWriteStream"),oR=pt("randomBytes"),$P=pt("spawnSync"),xP=pt("createInterface")});var Ra=I(()=>{Ob()});var ft,jP,_P,RP,TP,AP,CP,OP,IP,LP,NP,PP,MP,FP,DP,zP,BP,Vt,UP,WP,GP,Rs=I(()=>{ft=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},jP=ft("createRequire"),_P=ft("readFileSync"),RP=ft("access"),TP=ft("readFile"),AP=ft("writeFile"),CP=ft("appendFile"),OP=ft("mkdir"),IP=ft("mkdtemp"),LP=ft("rename"),NP=ft("unlink"),PP=ft("rm"),MP=ft("stat"),FP=ft("copyFile"),DP=ft("readdir"),zP=ft("createReadStream"),BP=ft("createWriteStream"),Vt=e=>String(e),UP=ft("randomBytes"),WP=ft("spawnSync"),GP=ft("createInterface")});var rR,Ib,YP,XP,JP,Nu=I(()=>{jt();Rs();Be();rR={},Ib=Q($e(Vt(rR.url)),"..","..",".."),YP=Q(Ib,"data","templates","responses.jsonl"),XP=Q(Ib,"data","phrasebook","software-phrases.txt"),JP=Object.freeze(new Set(["subject","count","noun","scope","comparison","metric","unit","superlative","provenance"]))});function aR(e,t={}){let n=iR.exec(String(e||""));if(!n)return 1;let s=t?.[n[1]];return typeof s=="number"&&Number.isFinite(s)?s:1}function cR(e,t={}){let n=Array.isArray(e?.sourceIds)?e.sourceIds:[];return n.length?Math.max(...n.map(s=>aR(s,t))):1}function Qe(e,t={}){return(Array.isArray(e)?e:[]).map((s,o)=>({row:s,index:o,bias:cR(s,t)})).sort((s,o)=>o.bias-s.bias||(o.row?.trust??0)-(s.row?.trust??0)||s.index-o.index).map(s=>s.row)}var iR,Lb=I(()=>{iR=/^src:corpus:(.+)$/});var mt,eM,or,tM,nM,sM,oM,rM,iM,aM,cM,lM,uM,dM,pM,lR,uR,fM,mM,hM,oo=I(()=>{mt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},eM=mt("createRequire"),or=mt("readFileSync"),tM=mt("access"),nM=mt("readFile"),sM=mt("writeFile"),oM=mt("appendFile"),rM=mt("mkdir"),iM=mt("mkdtemp"),aM=mt("rename"),cM=mt("unlink"),lM=mt("rm"),uM=mt("stat"),dM=mt("copyFile"),pM=mt("readdir"),lR=mt("createReadStream"),uR=mt("createWriteStream"),fM=mt("randomBytes"),mM=mt("spawnSync"),hM=mt("createInterface")});function Nb(e,t){let n=String(e).toLowerCase().replace(/^[^a-z]+/,"");if(!n)return null;for(let o of t.vowel_sound_consonants||[])if(n.startsWith(o))return!0;for(let o of t.consonant_sound_vowels||[])if(n.startsWith(o))return!1;let s=n[0];return"aeiou".includes(s)?!0:/[a-z]/.test(s)?!1:null}function mR(e=pR){let t=Ko(or(e,"utf8"));return Array.isArray(t.rule)?t.rule:[]}function Pu(){if(Ta===null)try{Ta=mR()}catch{Ta=[]}return Ta}var hR,dR,pR,fR,EM,Ta,Mu=I(()=>{oo();Rs();Be();ua();Nu();hR={},dR=$e(Vt(hR.url)),pR=Q(dR,"..","..","data","templates","grammar-rules.toml"),fR=Object.freeze(["prose","entity","path","number","code","provenance","receipt"]),EM=Object.freeze(new Set(fR.filter(e=>e!=="prose")));Ta=null});function gR(){if(ei!==void 0)return ei;try{let e=Pb?Pb():bR();ei=e&&e.winkNLP&&e.model?e:null}catch{ei=null}return ei}function bR(){let e=process.getBuiltinModule("node:module").createRequire(wR.url);return{winkNLP:e("wink-nlp"),model:e("wink-eng-lite-web-model")}}function Fu(){if(rr!==void 0)return rr;let e=gR();if(!e)return rr=null,null;try{rr=e.winkNLP(e.model)}catch{rr=null}return rr}var wR,Pb,ei,rr,Du=I(()=>{wR={}});var Mb=I(()=>{Du()});var Db,Fb=I(()=>{Db={comment:"tmct's starter lexicon, now covering BOTH the original software domain and the default 'human-world' persona's everyday people/places/objects/nature/time/body/mind vocabulary. Every word the ACE-OWL sub-fragment parser (src/domain/grammar/ace.mjs) is allowed to understand is DECLARED here \u2014 tmct never guesses a word's category. Nouns may declare a possessive property typing ('data' or 'object', pattern 7) or an irregular 'plural' (WordNet-sourced human nouns like 'man'/'child' need this \u2014 the morphology fold only handles regular -s/-ies/-es endings); adjectives MUST declare a type ('subclass' forms a class, 'data' asserts a boolean-ish datatype property, pattern 8); verbs may declare a preposition ('depend' + 'on' \u2192 dependsOn). The human-domain additions are flat and simple (breadth over depth \u2014 no gender/kinship taxonomy, no formal role hierarchy), matching corpus/tier2/generate.mjs's CORPUSES.human.lexicon sub-key, which --verify drift-checks against. Extend via loadLexicon(extra) with this same shape.",nouns:{module:{},class:{},function:{},method:{},attribute:{},variable:{},constant:{},test:{},suite:{},service:{},repository:{},branch:{},commit:{},tag:{},release:{},package:{},library:{},framework:{},api:{},endpoint:{},route:{},handler:{},controller:{},model:{},view:{},template:{},component:{},interface:{},type:{},category:{},kind:{},artifact:{},routine:{},part:{},helper:{},operation:{},change:{},schema:{},database:{},table:{},query:{},index:{plural:"indices"},cache:{},queue:{},worker:{},job:{},task:{},bug:{},defect:{},issue:{},ticket:{},feature:{},requirement:{},specification:{},document:{},developer:{},engineer:{},user:{},visitor:{},team:{},project:{},codebase:{},file:{},directory:{},folder:{},line:{},symbol:{},identifier:{},comment:{},docstring:{},string:{},number:{},list:{},array:{},graph:{},node:{},edge:{},triple:{},fact:{},ontology:{},lexicon:{},grammar:{},sentence:{},utterance:{},session:{},response:{},request:{},question:{},answer:{},error:{},exception:{},warning:{},log:{},metric:{},benchmark:{},pipeline:{},build:{},deployment:{},environment:{},config:{},configuration:{},setting:{},option:{},flag:{},argument:{},parameter:{},value:{},result:{},output:{},input:{},server:{},client:{},protocol:{},message:{},event:{},hook:{},plugin:{},script:{},tool:{},command:{},prompt:{},token:{},parser:{},compiler:{},linter:{},formatter:{},runtime:{},process:{},thread:{},loop:{},statement:{},expression:{},keyword:{},scope:{},callback:{},promise:{},iterator:{},generator:{},unit:{},risk:{},prototype:{},milestone:{},sprint:{},backlog:{},roadmap:{},phase:{},pattern:{},smell:{},coverage:{},mock:{},stub:{},fixture:{},assertion:{},snapshot:{},regression:{},migration:{},refactor:{},review:{},merge:{},license:{property:"data"},version:{property:"data"},name:{property:"data"},path:{property:"data"},size:{property:"data"},status:{property:"data"},language:{property:"data"},extension:{property:"data"},churn:{property:"data"},impact:{property:"data"},complexity:{property:"data"},latency:{property:"data"},duration:{property:"data"},frequency:{property:"data"},severity:{property:"data"},owner:{property:"object"},maintainer:{property:"object"},author:{property:"object"},reviewer:{property:"object"},parent:{property:"object"},dependency:{property:"object"},man:{plural:"men"},woman:{plural:"women"},person:{plural:"people"},child:{plural:"children"},boy:{},girl:{},baby:{},adult:{},friend:{},neighbor:{},stranger:{},guest:{},doctor:{},teacher:{},nurse:{},student:{},farmer:{},mother:{},father:{},brother:{},sister:{},family:{},king:{},queen:{},soldier:{},artist:{},writer:{},cook:{},group:{},crowd:{},audience:{},club:{},president:{},human:{},lawyer:{},driver:{},manager:{},officer:{},judge:{},priest:{},servant:{},butler:{},housekeeper:{},gardener:{},employee:{},boss:{},husband:{},wife:{plural:"wives"},son:{},daughter:{},grandmother:{},grandfather:{},citizen:{},customer:{},leader:{},champion:{},volunteer:{},resident:{},place:{},city:{},town:{},village:{},country:{},house:{},home:{},room:{},kitchen:{},bedroom:{},bathroom:{},school:{},hospital:{},shop:{},market:{},church:{},park:{},garden:{},street:{},road:{},bridge:{},farm:{},office:{},factory:{},museum:{},hotel:{},airport:{},castle:{},beach:{},forest:{},mountain:{},hat:{},shirt:{},coat:{},shoe:{},dress:{},clothing:{},chair:{},desk:{},lamp:{},portrait:{},bed:{},door:{},window:{},wall:{},roof:{},pen:{},paper:{},key:{},lock:{},box:{},car:{},bicycle:{},boat:{},train:{},wheel:{},knife:{plural:"knives"},spoon:{},fork:{},plate:{},cup:{},bottle:{},bag:{},money:{},coin:{},toy:{},machine:{},clock:{},phone:{},book:{},letter:{},umbrella:{},glove:{},sock:{},ring:{},watch:{},mirror:{},candle:{},ladder:{},hammer:{},basket:{},wallet:{},dog:{},cat:{},horse:{},cow:{},pig:{},sheep:{},bird:{},fish:{},mouse:{plural:"mice"},rabbit:{},bear:{},lion:{},tiger:{},elephant:{},snake:{},mole:{},groundhog:{},meerkat:{},tree:{},flower:{},grass:{},leaf:{plural:"leaves"},root:{},seed:{},fruit:{},water:{},air:{},fire:{},earth:{},stone:{},sand:{},gold:{},iron:{},rain:{},snow:{},wind:{},cloud:{},sun:{},moon:{},star:{},owl:{},wolf:{plural:"wolves"},frog:{},bee:{},ant:{},butterfly:{},spider:{},river:{},ocean:{},time:{},day:{},night:{},morning:{},evening:{},week:{},month:{},year:{},hour:{},minute:{},second:{},moment:{},season:{},spring:{},summer:{},winter:{},wedding:{},race:{},dozen:{},half:{plural:"halves"},amount:{},meeting:{},game:{},war:{},trip:{},birthday:{},holiday:{},autumn:{},century:{},body:{},head:{},hand:{},arm:{},leg:{},foot:{plural:"feet"},eye:{},ear:{},mouth:{},nose:{},hair:{},heart:{},blood:{},bone:{},skin:{},face:{},food:{},bread:{},meat:{},milk:{},egg:{},cheese:{},vegetable:{},meal:{},breakfast:{},dinner:{},drink:{},wine:{},tea:{},coffee:{},tongue:{},tooth:{plural:"teeth"},finger:{},toe:{},shoulder:{},knee:{},brain:{},lung:{},sugar:{},salt:{},word:{},story:{},news:{},idea:{},thought:{},mind:{},memory:{},dream:{},belief:{},love:{},hate:{},fear:{},joy:{},anger:{},hope:{},surprise:{},pride:{},song:{},music:{},sound:{},voice:{},picture:{},art:{},knowledge:{},opinion:{},reason:{},imagination:{},laughter:{},tear:{},smile:{},silence:{},object:{},location:{},quantity:{},organization:{},animal:{},plant:{},furniture:{},vehicle:{},insect:{},emotion:{},metal:{},liquid:{},weather:{},planet:{},jewelry:{},cutlery:{},government:{},material:{},draw:{},set:{},heavy:{},stand:{},free:{},pack:{},dead:{},pick:{},double:{},straight:{},cast:{},dry:{},bank:{},stamp:{},tender:{},fair:{},active:{},regular:{},blue:{},hack:{},band:{},brush:{},guard:{},master:{},transfer:{},firm:{},side:{},bull:{},mate:{},rank:{},board:{},brace:{},grade:{},better:{},course:{},natural:{},butt:{},camp:{},crop:{},date:{},fold:{},help:{},hunt:{},count:{},court:{},crush:{},major:{},march:{},tease:{},tough:{},flight:{},forward:{},division:{},commission:{},jam:{},rat:{},gray:{},hood:{},jerk:{},miss:{},pile:{},pool:{},rear:{},whip:{},bench:{},chain:{},cycle:{},grind:{},guide:{},stiff:{},troll:{},union:{},circle:{},carrier:{},defence:{},defense:{},radical:{},reserve:{},intimate:{},opposite:{},superior:{},grey:{},host:{},knot:{},left:{},lost:{},blind:{},crank:{},panel:{},rally:{},state:{},tramp:{},waver:{},clutch:{},living:{},runner:{},steady:{},stream:{},combine:{},company:{},convert:{},general:{},moderate:{},alternate:{},ace:{},crab:{},flop:{},fund:{},pair:{},rake:{},rock:{},sick:{},blade:{},cheat:{},sport:{},caller:{},column:{},couple:{},divine:{},pledge:{},simple:{},sponge:{},system:{},wanton:{},sleeper:{},business:{},associate:{},instrument:{},substitute:{},gun:{},sum:{},alto:{},best:{},buff:{},dear:{},mass:{},cream:{},creep:{},giant:{},labor:{},pilot:{},sneak:{},stack:{},staff:{},world:{},gutter:{},jumper:{},labour:{},lather:{},picket:{},reader:{},savage:{},captain:{},culture:{},monitor:{},neutral:{},unknown:{},utility:{},inferior:{},initiate:{},innocent:{},national:{},transpose:{},association:{},professional:{},bum:{},fan:{},law:{},deck:{},fool:{},join:{},kink:{},page:{},pink:{},stud:{},twin:{},clump:{},coach:{},dance:{},drone:{},extra:{},feast:{},fence:{},fleet:{},flock:{},ghost:{},clear:{},right:{},open:{},beat:{},back:{},block:{},see:{},keep:{},square:{},pitch:{},center:{},centre:{},top:{},post:{},field:{},spot:{},bar:{},end:{},frame:{},rough:{},address:{},quarter:{},position:{},land:{},bound:{},range:{},seat:{},dark:{},rail:{},cross:{},section:{},tip:{},plug:{},port:{},stall:{},corner:{},outside:{},dig:{},way:{},front:{},joint:{},patch:{},reach:{},thick:{},medium:{plural:"media"},dock:{},ruin:{},tack:{},floor:{},bottom:{},puddle:{},compound:{},retreat:{},mat:{},belt:{},dump:{},scene:{},space:{},border:{},common:{},cradle:{},inside:{},surface:{},lie:{},boot:{},clog:{},coil:{},nest:{},wire:{},yard:{},forge:{},limit:{},lodge:{},buffer:{},middle:{},capital:{},overhead:{},preserve:{},terminal:{},direction:{},hall:{},loft:{},plot:{},tape:{},grate:{},stoop:{},fringe:{},circuit:{},distance:{},derivation:{},bent:{},gate:{},mill:{},safe:{},sail:{},hedge:{},paint:{},parcel:{},sphere:{},bearing:{},profile:{},shelter:{},crossing:{},interior:{},reservation:{},area:{},bush:{},cork:{},dive:{},limb:{},raft:{},shed:{},zone:{},chase:{},cut:{},light:{},charge:{},check:{},work:{},stock:{},stick:{},flat:{},crack:{},press:{},settle:{},spread:{},wash:{},well:{},swing:{},fly:{},tap:{},stretch:{},shot:{},black:{},strip:{},separate:{},tie:{},rack:{},match:{},piece:{},shell:{},still:{},present:{},trim:{},spike:{},split:{},white:{},yield:{},squeeze:{},bolt:{},fret:{},choke:{},float:{},track:{},low:{},crown:{},screen:{},die:{plural:"dice"},pin:{},chip:{},mold:{},seal:{},draft:{},shade:{},shaft:{},stuff:{},switch:{},balance:{},reverse:{},subject:{},approach:{},beam:{},bill:{},card:{},link:{},sack:{},sink:{},trap:{},spare:{},credit:{},counter:{},express:{},positive:{},net:{},pay:{},ball:{},bond:{},bowl:{},horn:{},pole:{},wing:{},glass:{},grant:{},smack:{},collar:{},record:{},ruffle:{},silver:{},negative:{},cap:{},lap:{},pad:{},rag:{},rig:{},bend:{},clip:{},fine:{},flap:{},heel:{},pall:{},pump:{},gauge:{},image:{},plain:{},print:{},slick:{},spoil:{},clinch:{},gather:{},offset:{},pocket:{},relief:{},channel:{},whistle:{},irregular:{},transport:{},bat:{},ice:{},peg:{},pot:{},bust:{},grip:{},hole:{},nail:{},poke:{},slug:{},spat:{},stem:{},suit:{},yoke:{},flood:{},grand:{},gross:{},perch:{},slip:{},down:{},shoot:{},ground:{},discharge:{},solid:{},kill:{},slack:{},waste:{},rush:{},grain:{},shake:{},pit:{},mould:{},colour:{},render:{},mount:{},cutting:{},fill:{},flux:{},tail:{},plaster:{},swallow:{},concentrate:{},bay:{},gum:{},ray:{},slop:{},spur:{},extract:{},fat:{},hop:{},corn:{},rust:{},smut:{},label:{},stain:{},composition:{},gas:{},pip:{},duck:{},gall:{},lime:{},mint:{},tick:{},stalk:{},whiff:{},cement:{},rubber:{},conjugate:{},preparation:{},dun:{},dust:{},jade:{},mire:{},pulp:{},snag:{},bloom:{},caper:{},crude:{},fluid:{},frost:{},paste:{},rinse:{},steam:{},straw:{},corona:{},poison:{},refuse:{},savory:{},feather:{},ferment:{},organic:{},chestnut:{},mushroom:{},percolate:{},sublimate:{},synthetic:{},suspension:{},precipitate:{},cod:{},pet:{},rod:{},bunt:{},crow:{},hide:{},punk:{},vein:{},assay:{},goose:{plural:"geese"},olive:{},stray:{},trash:{},ginger:{},pepper:{},permit:{},polish:{},sorrel:{},blister:{},bristle:{},complex:{},filling:{},flicker:{},harvest:{},scollop:{},whiting:{},anteater:{},snowball:{},tincture:{},repellent:{},ink:{},lip:{},nag:{},rue:{},wad:{},acid:{},beak:{},bean:{},coal:{},dirt:{},fawn:{},fuel:{},lark:{},ling:{},mash:{},palm:{},pelt:{},plum:{},pony:{},pout:{},soil:{},stag:{},bream:{},brier:{},chalk:{},coral:{},fiber:{},fall:{},pass:{},lift:{},go:{},roll:{},drop:{},blow:{},return:{},strike:{},rise:{},snap:{},shift:{},twist:{},case:{},deal:{},start:{},deep:{},jump:{},step:{},stop:{},pound:{},advance:{},pop:{},flash:{},rest:{},crash:{},score:{},figure:{},leave:{},smash:{},stroke:{},first:{},sweep:{},even:{},flow:{},kick:{},heave:{},trace:{},opening:{},full:{},gain:{},jack:{},spin:{},wave:{},splash:{},bob:{},bang:{},dash:{},flick:{},hitch:{},prime:{},proof:{},passing:{},bit:{},click:{},knock:{},swell:{},trouble:{},collapse:{},movement:{},standard:{},variation:{},rap:{},boom:{},bump:{},clap:{},pace:{},peck:{},zero:{},blaze:{},speed:{},spell:{},treat:{},bounce:{},factor:{},little:{},plunge:{},scrape:{},single:{},ban:{},mix:{},one:{},mesh:{},roar:{},tilt:{},climb:{},flip:{},puff:{},bite:{},feed:{},bitter:{},chop:{},sour:{},special:{},crisp:{},tonic:{},scallop:{},mess:{},quick:{},smear:{},fillet:{},curl:{},malt:{},glaze:{},souse:{},breast:{},humour:{},draught:{},delicacy:{},dressing:{},transplant:{},hip:{},sop:{},kiss:{},mush:{},neck:{},belly:{},frank:{},jumble:{},junket:{},trifle:{},stomach:{},clot:{},shin:{},stew:{},tart:{},cheek:{},graft:{},molar:{},roast:{},spice:{},stout:{},sweat:{},groove:{},region:{},savoury:{},western:{},backbone:{},conserve:{},dominant:{},macerate:{},melancholy:{},cake:{},lens:{},loaf:{plural:"loaves"},menu:{},must:{},peel:{},pore:{},suds:{},butch:{},cling:{},curry:{},drool:{},honey:{},jerky:{},juice:{},mince:{},nasal:{},nerve:{},sauce:{},tract:{},dainty:{},entree:{},facial:{},relish:{},squash:{},brittle:{},caramel:{},cordial:{},fissure:{},oblique:{},adhesion:{},turnover:{},nonpareil:{},posterior:{},vegetation:{},ail:{},orb:{},pap:{},rum:{},brew:{},chew:{},hash:{},lard:{},rump:{},brine:{},dowdy:{},farce:{},flour:{},fudge:{},halal:{},icing:{},lunch:{},play:{},make:{},hold:{},close:{},mark:{},form:{},order:{},support:{},rule:{},sign:{},hang:{},drag:{},feel:{},find:{},shock:{},mean:{},offer:{},study:{},show:{},tone:{},flare:{},attack:{},act:{},life:{plural:"lives"},stay:{},think:{},secret:{},account:{},hurt:{},note:{},taste:{},report:{},measure:{},condition:{},cry:{},focus:{plural:"foci"},style:{},thing:{},title:{},recall:{},average:{},contract:{},dissolve:{},so:{},aim:{},bind:{},heat:{},know:{},stir:{},claim:{},power:{},demand:{},design:{},notice:{},source:{},upgrade:{},resolution:{},bid:{},skim:{},brand:{},curve:{},sight:{},smoke:{},digest:{},regard:{},passage:{},program:{},exposure:{},interest:{},character:{},projection:{},lay:{},curse:{},favor:{},remit:{},sense:{},slash:{},wedge:{},bubble:{},excuse:{},favour:{},invite:{},mantle:{},salute:{},stress:{},survey:{},temper:{},comfort:{},neglect:{},resolve:{},respect:{},torment:{},conflict:{},dispatch:{},standing:{},challenge:{},programme:{},background:{},conclusion:{},impression:{},particular:{},withdrawal:{},cite:{},echo:{},hail:{},rip:{},lot:{},great:{},relay:{},tenor:{},browse:{},bundle:{},chorus:{},cypher:{},fellow:{},litter:{},marine:{},native:{},occult:{},plague:{},rocker:{},scheme:{},series:{plural:"series"},social:{},streak:{},sucker:{},teaser:{},antique:{},battery:{},bracket:{},founder:{},gallery:{},liberal:{},starter:{},turnout:{},witness:{},diagonal:{},familiar:{},ordinary:{},prospect:{},sequence:{},aggregate:{},authority:{},community:{},dependent:{},desperate:{},patronage:{},primitive:{},principal:{},complement:{},engagement:{},foundation:{},generation:{},settlement:{},combination:{},lightweight:{},steamroller:{},subordinate:{},organisation:{},establishment:{},representative:{},con:{},fox:{},kid:{},pod:{},red:{},sex:{},spy:{},vet:{},aged:{},bore:{},diet:{},fare:{},gown:{},hawk:{},heap:{},herd:{},hive:{},lump:{},romp:{},sort:{},agent:{},alien:{},beard:{},brave:{},breed:{},brood:{},canon:{},craft:{},crazy:{},devil:{},dummy:{},equal:{},flake:{},groom:{},mound:{},organ:{},scrub:{},toast:{},troop:{},youth:{},colony:{},copper:{},cutter:{},escort:{},feeder:{},junior:{},maroon:{},matrix:{plural:"matrices"},modern:{},muscle:{},people:{},sector:{},shrink:{},tinker:{},topper:{},booster:{},gallant:{},hostile:{},marshal:{},network:{},nucleus:{plural:"nuclei"},premier:{},scourge:{},secular:{},sitting:{},snapper:{},suspect:{},swagger:{},traffic:{},variant:{},cardinal:{},derelict:{},domestic:{},favorite:{},finisher:{},graduate:{},humanist:{},infernal:{},magazine:{},manifold:{},minister:{},palatine:{},presence:{},receiver:{},relation:{},favourite:{},following:{},goldbrick:{},operative:{},sensitive:{},syndicate:{},complexion:{},mouthpiece:{},withdrawer:{},appointment:{},conjugation:{},constituent:{},heavyweight:{},incompetent:{},independent:{},replacement:{},underground:{},untouchable:{},conservative:{},administration:{},ape:{},gem:{},hob:{},sap:{},van:{},axis:{plural:"axes"},chap:{},char:{},crew:{},cult:{},duet:{},gang:{},hero:{},hire:{},lamb:{},lame:{},mute:{},nude:{},pawn:{},pill:{},sage:{},soul:{},tout:{},trio:{},ward:{},worm:{},bunch:{},crimp:{},dwarf:{},elect:{},flank:{},ideal:{},noble:{},octet:{},quack:{},saint:{},scrag:{},shark:{},shoal:{},silly:{},skunk:{},super:{},witch:{},zombi:{},agency:{},anchor:{},backup:{},batter:{},buster:{},canary:{},circus:{},dealer:{},domain:{},doomed:{},genius:{},gossip:{},herald:{},hoodoo:{},hopper:{},immune:{},jockey:{},legion:{},member:{},nature:{},orphan:{},parade:{},peanut:{},pillar:{},pirate:{},player:{},porter:{},pusher:{},putter:{},senior:{},septet:{},sestet:{},sextet:{},surety:{},tapper:{},tiller:{},zombie:{},adjunct:{},butcher:{},captive:{},cascade:{},chapter:{},charity:{},checker:{},chicane:{},chicken:{},climber:{},cognate:{},consort:{},cracker:{},dresser:{},gentile:{},invalid:{},knocker:{},lineage:{},mission:{},mixture:{},monster:{},offence:{},partner:{},pioneer:{},pitcher:{},quartet:{},quintet:{},recruit:{},referee:{},shooter:{},spoiler:{},sponsor:{},stemmer:{},steward:{},striker:{},terrace:{},alliance:{},castrate:{},designer:{},director:{},ensemble:{},faithful:{},friendly:{},mandarin:{},operator:{},romantic:{},accessory:{},annoyance:{},attendant:{},bourgeois:{},precedent:{},quadruple:{},reception:{},recession:{},religious:{},reprobate:{},satellite:{},selection:{},sensation:{},supporter:{},contingent:{},convention:{},expedition:{},incendiary:{},individual:{},masquerade:{},population:{},sweetheart:{},tubercular:{},confederate:{},cooperative:{},subdivision:{},territorial:{},transcriber:{},intelligence:{},registration:{},sophisticate:{},welterweight:{},revolutionary:{},ex:{},ass:{},cog:{},cub:{},den:{},dud:{},duo:{},ham:{},hog:{},mob:{},pro:{},deaf:{},dove:{},fate:{},five:{},folk:{},gull:{},jinx:{},mime:{},nark:{},nine:{},pest:{},prey:{},quad:{},rash:{},scab:{},sire:{},wisp:{},wood:{},zany:{},armor:{},batch:{},bogey:{},caste:{},chief:{},choir:{},clone:{},divan:{},drunk:{},elder:{},enemy:{},exile:{},faith:{},flirt:{},grunt:{},joker:{},lobby:{},louse:{plural:"lice"},pagan:{},pivot:{},racer:{},rebel:{},scout:{},siren:{},slave:{},swarm:{},timid:{},triad:{},tribe:{},armour:{},bearer:{},censor:{},choker:{},convoy:{},covert:{},damned:{},deputy:{},empire:{},goffer:{},gopher:{},huddle:{},killer:{},league:{},martyr:{},muster:{},mystic:{},outfit:{},packet:{},palace:{},passer:{},patrol:{},potter:{},quarry:{},rigger:{},ringer:{},rustic:{},scribe:{},sitter:{},slider:{},slouch:{},squire:{},squirt:{},stupid:{},summit:{},tailor:{},tenant:{},terror:{},tracer:{},turkey:{},turner:{},venter:{},voider:{},voodoo:{},walker:{},worthy:{},academy:{},agonist:{},amateur:{},ancient:{},banquet:{},cabinet:{},cashier:{},classic:{},commune:{},courser:{},crammer:{},current:{},divider:{},economy:{},edition:{},emperor:{},entrant:{},fireman:{},lookout:{},octette:{},orderly:{},painter:{},pervert:{},plotter:{},plunger:{},roaster:{},sampler:{},scanner:{},sellout:{},skimmer:{},skipper:{},society:{},soprano:{},spastic:{},spotter:{},stratum:{plural:"strata"},trimmer:{},tripper:{},trooper:{},tumbler:{},upstart:{},veteran:{},wheeler:{},academic:{},agnostic:{},aviation:{},backstop:{},baritone:{},calendar:{},casualty:{},colonial:{},divinity:{},fireball:{},homeless:{},huckster:{},marriage:{},militant:{},military:{},ministry:{},modifier:{},partisan:{},pedigree:{},possible:{},recorder:{},regiment:{},renegade:{},repeater:{},revenant:{},septette:{},sextette:{},shepherd:{},stalwart:{},stringer:{},stripper:{},whistler:{},affiliate:{},ascendant:{},bacchanal:{},canvasser:{},cockscomb:{},collector:{},comforter:{},commander:{},companion:{},conductor:{},crossover:{},eccentric:{},executive:{},fledgling:{},franchise:{},freelance:{},incumbent:{},mercenary:{},moderator:{},neighbour:{},newspaper:{},patriarch:{},patrician:{},portfolio:{},quartette:{},quintette:{},repertory:{},secretary:{},segregate:{},spearhead:{},stigmatic:{},summation:{},transient:{},trumpeter:{},voluntary:{},absolutism:{},anthropoid:{},apparition:{},assemblage:{},collective:{},contractor:{},delinquent:{},episcopate:{},exaltation:{},exposition:{},illiterate:{},judicature:{},leadership:{},lieutenant:{},minimalist:{},percussion:{},profligate:{},provincial:{},rendezvous:{},brotherhood:{},determinant:{},distributor:{},interpreter:{},stipendiary:{},analphabetic:{},antediluvian:{},civilisation:{},civilization:{},commonwealth:{},conglomerate:{},contemporary:{},cosmopolitan:{},humanitarian:{},neighborhood:{},thoroughbred:{},ultramontane:{},concatenation:{},featherweight:{},superordinate:{},classification:{},fundamentalist:{},cop:{},don:{},eon:{},gal:{},gob:{},god:{},hoe:{},kin:{},nan:{},pup:{},wag:{},wit:{},aeon:{},ally:{},bard:{},chum:{},clew:{},dean:{},fink:{},flak:{},geek:{},goof:{},hulk:{},idol:{},lady:{},loon:{},mace:{},para:{},ruck:{},seer:{},self:{plural:"selves"},adder:{},angel:{},augur:{},baron:{},blond:{},brick:{},brute:{},cabal:{},champ:{},comic:{},crier:{},decoy:{},demon:{},diner:{},diver:{},diwan:{},drove:{},envoy:{},fiend:{},flack:{},flier:{},flyer:{},freak:{},gaudy:{},harpy:{},horde:{},indie:{},jewel:{},leech:{},levee:{},liege:{},locus:{},loser:{},mimic:{},needy:{},nymph:{},oiler:{},poser:{},pupil:{},riser:{},roper:{},rummy:{},scold:{},squad:{},timer:{},tutor:{},usher:{},vicar:{},whale:{},wiper:{},affine:{},albino:{},angler:{},badass:{},baster:{},beggar:{},blonde:{},bomber:{},bowler:{},butter:{},carver:{},caster:{},chichi:{},clinic:{},closer:{},cohort:{},coiner:{},comber:{},cookie:{},cordon:{},corpus:{},cotter:{},cowboy:{},coyote:{},critic:{},dragon:{},drawer:{},drudge:{},eleven:{},ensign:{},estate:{},ethnic:{},exarch:{},finder:{},fodder:{},gaffer:{},gainer:{},galaxy:{},granny:{},hacker:{},hedger:{},heller:{},holder:{},honker:{},hooker:{},hotdog:{},inmate:{},intern:{},jungle:{},knight:{},kvetch:{},lineup:{},lovely:{},magpie:{},maiden:{},mailer:{},maniac:{},matron:{},miller:{},muller:{},nation:{},opener:{},ouster:{},packer:{},parrot:{},patron:{},peeler:{},peeper:{},polity:{},poster:{},powwow:{},punter:{},puppet:{},purdah:{},racist:{},rafter:{},ramrod:{},redact:{},regent:{},rusher:{},sailor:{},scorer:{},seeder:{},shaver:{},slaver:{},slicer:{},smoker:{},snitch:{},syntax:{},tacker:{},tagger:{},tanker:{},tartar:{},teller:{},thrush:{},trigon:{},troika:{},truant:{},tucker:{},tyrant:{},umpire:{},undoer:{},vestal:{},virgin:{},votary:{},warren:{},washer:{},wetter:{},winder:{},winner:{},wizard:{},admirer:{},amnesic:{},analyst:{},anomaly:{},aphasic:{},armorer:{},arrival:{},ascetic:{},auditor:{},baggage:{},bastion:{},biology:{},boarder:{},brahman:{},brahmin:{},breaker:{},caravan:{},clapper:{},cluster:{},coaster:{},cobbler:{},college:{},convict:{},council:{},counsel:{},coxcomb:{},crawler:{},creeper:{},crewman:{},crimper:{},darling:{},destiny:{},dragoon:{},dreamer:{},duality:{},echelon:{},ejector:{},fiddler:{},fighter:{},flasher:{},forbear:{},harrier:{},holdout:{},hostess:{},incubus:{},ingenue:{},justice:{},kachina:{},kindred:{},kingpin:{},macumba:{},manikin:{},marcher:{},married:{},newborn:{},notable:{},nursing:{},outpost:{},parvenu:{},patient:{},payroll:{},peasant:{},phalanx:{},phantom:{},planter:{},platoon:{},plodder:{},poacher:{},printer:{},prodigy:{},puncher:{},realist:{},redhead:{},revival:{},runaway:{},scholar:{},sharpie:{},skidder:{},slicker:{},slogger:{},smasher:{},snorter:{},snuffer:{},spinner:{},splicer:{},stalker:{},stamper:{},standby:{},stepper:{},striper:{},sweeper:{},thrower:{},triplet:{},utopian:{},utterer:{},voucher:{},washout:{},watcher:{},wiggler:{},wrecker:{},affluent:{},armourer:{},attender:{},bacchant:{},bachelor:{},bankrupt:{},bisexual:{},bondsman:{},cautious:{},congress:{},corporal:{},creature:{},decadent:{},defeated:{},delegate:{},diabetic:{},dictator:{},dyslexic:{},effector:{},exponent:{},flagging:{},freshman:{},fugitive:{},futurist:{},garrison:{},greyback:{},hangover:{},humanism:{},immortal:{},juvenile:{},lapidary:{},mainstay:{},mannikin:{},maverick:{},mechanic:{},minority:{},minstrel:{},mistress:{},monotype:{},mutation:{},nativist:{},neophyte:{},neurotic:{},newsroom:{},nobility:{},opponent:{},pacifier:{},pantheon:{},planting:{},probable:{},producer:{},recusant:{},referral:{},reminder:{},retainer:{},ruralism:{},scalawag:{},scrubber:{},searcher:{},sergeant:{},sociable:{},songster:{},splitter:{},squadron:{},straggle:{},strawman:{},survivor:{},taxonomy:{},treasury:{},vanguard:{},virtuoso:{},walloper:{},warhorse:{},yearling:{},alcoholic:{},anorectic:{},artificer:{},artillery:{},attracter:{},attractor:{},automaton:{},auxiliary:{},barbarian:{},bombshell:{},brokerage:{},coalition:{},concourse:{},contralto:{},counselor:{},crewwoman:{},cyberpunk:{},defaulter:{},deliverer:{},democracy:{},dependant:{},descender:{},dissident:{},dyspeptic:{},feudatory:{},firewoman:{},flyweight:{},incurable:{},institute:{},insurgent:{},intellect:{},introvert:{},mandatory:{},mendicant:{},middleman:{},navigator:{},organiser:{},organizer:{},pluralism:{},pluralist:{},pothunter:{},precursor:{},predictor:{},presenter:{},pretender:{},processor:{},proconsul:{},publisher:{},quintuple:{},registrar:{},regulator:{},scallywag:{},scavenger:{},scrambler:{},scratcher:{},serration:{},singleton:{},stargazer:{},stockpile:{},successor:{},surrogate:{},symbolism:{},temporary:{},throwback:{},trickster:{},warrantee:{},womanhood:{},antagonist:{},attendance:{},blackguard:{},bondswoman:{},chancellor:{},classifier:{},conference:{},conformist:{},counsellor:{},crossroads:{},descendant:{},descendent:{},doorkeeper:{},embodiment:{},expatriate:{},federation:{},fellowship:{},filibuster:{},forerunner:{},fratricide:{},grandstand:{},mastermind:{},minstrelsy:{},missionary:{},ordination:{},plantation:{},powerhouse:{},quadruplet:{},quintuplet:{},repatriate:{},republican:{},respondent:{},rubberneck:{},salamander:{},scholastic:{},separatism:{},sisterhood:{},subscriber:{},subsidiary:{},supplicant:{},suppresser:{},suppressor:{},timekeeper:{},translator:{},university:{},wallflower:{},abomination:{},academician:{},agriculture:{},anachronism:{},antiquarian:{},beneficiary:{},bureaucracy:{},clairvoyant:{},conditioner:{},confederacy:{},consumptive:{},deification:{},enlightened:{},incarnation:{},lilliputian:{},middlewoman:{},narcoleptic:{},nationalist:{},partnership:{},peacekeeper:{},peripatetic:{},pontificate:{},progression:{},prosecution:{},quarterback:{},recessional:{},romanticist:{},shipbuilder:{},transmitter:{},transsexual:{},underwriter:{},undesirable:{},utilitarian:{},acquaintance:{},bantamweight:{},collaborator:{},congregation:{},conservatory:{},countertenor:{},demonstrator:{},denomination:{},headquarters:{},illegitimate:{},investigator:{},metropolitan:{},middleweight:{},noncombatant:{},philharmonic:{},schoolmaster:{},sharpshooter:{},totalitarian:{},authoritarian:{},confederation:{},correspondent:{},reincarnation:{},schizophrenic:{},supernumerary:{},categorization:{},tatterdemalion:{},instrumentality:{},internationalist:{},bey:{},cox:{},cur:{},few:{},foe:{},hag:{},lad:{},mod:{},obi:{},sib:{},aide:{},amah:{},anti:{},army:{},beau:{},bevy:{},bogy:{},chit:{},clod:{},coon:{},czar:{},dada:{},dame:{},derp:{},dodo:{},dude:{},duke:{},dupe:{},gild:{},giro:{},goat:{},goon:{},grad:{},guru:{},heir:{},hobo:{},hunk:{},jilt:{},jock:{},jury:{},khan:{},maid:{},naif:{},navy:{},nerd:{},peri:{},pimp:{},putz:{},sect:{},suer:{},swot:{},tuft:{},adept:{},baker:{},basso:{},beast:{},bride:{},bunny:{},cadre:{},comer:{},cooky:{},corps:{},covey:{},deist:{},edger:{},elite:{},emcee:{},enate:{},faery:{},fatty:{},fauna:{},felon:{},filer:{},flora:{},folks:{},forum:{},genus:{plural:"genera"},ghoul:{},gipsy:{},giver:{},gnome:{},grove:{},gypsy:{},hajji:{},hakim:{},junky:{},knave:{},lefty:{},leper:{},loony:{},macho:{},madam:{},magus:{},medic:{},mezzo:{},miler:{},mooch:{},mufti:{},nabob:{},nexus:{},ninja:{},obeah:{},parer:{},pigmy:{},poilu:{},ponce:{},prior:{},proxy:{},puppy:{},pygmy:{},quint:{},raver:{},rover:{},satyr:{},scamp:{},sheik:{},shill:{},shrew:{},sibyl:{},sissy:{},slain:{},smith:{},snoop:{},sprog:{},stoic:{},sylph:{},taker:{},thane:{},toady:{},totem:{},trier:{},tryst:{},tuner:{},twirp:{},uncle:{},valet:{},vegan:{},vixen:{},waker:{},widow:{},wight:{},wirer:{},yenta:{},agnate:{},alexic:{},amazon:{},audile:{},avatar:{},avower:{},bagger:{},bagman:{},banker:{},barber:{},barker:{},bather:{},bawler:{},beater:{},beldam:{},bidder:{},boater:{},brewer:{},broker:{},brunet:{},bureau:{},caddie:{},camper:{},cantor:{},caucus:{},chaser:{},cherub:{},chosen:{},coeval:{},cooper:{},coquet:{},cottar:{},craven:{},cubist:{},daemon:{},deacon:{},digger:{},dodger:{},dowser:{},duette:{},dunker:{},egoist:{},eldest:{},eparch:{},erotic:{},eyeful:{},faller:{},fitter:{},flunky:{},forger:{},framer:{},gaggle:{},gagman:{},gamine:{},gasbag:{},gillie:{},goalie:{},gouger:{},grouch:{},gunman:{},gunner:{},hamlet:{},hanger:{},hawker:{},heaver:{},hermit:{},hitter:{},hummer:{},iceman:{},joiner:{},junkie:{},jurist:{},keeper:{},kelpie:{},kisser:{},lackey:{},lector:{},lifter:{},lister:{},lizard:{},loader:{},loaner:{},logjam:{},longer:{},lubber:{},lumper:{},lyceum:{},madcap:{},maenad:{},maimed:{},masher:{},medico:{},menial:{},midden:{},midget:{},minder:{},moiety:{},motile:{},nester:{},oblate:{},oilman:{},parish:{},paster:{},pelter:{},phylum:{},picker:{},plenum:{},police:{},pruner:{},psyche:{},puller:{},python:{},rabble:{},raider:{},raiser:{},ranger:{},ranker:{},rapper:{},reaper:{},redcap:{},reeler:{},regime:{},renter:{},rifler:{},romper:{},sachem:{},salter:{},sawyer:{},sealer:{},seeker:{},sender:{},sexist:{},shaker:{},shaper:{},sharpy:{},signer:{},silvan:{},sleuth:{},smiler:{},sorter:{},sphinx:{},stager:{},stater:{},supper:{},sylvan:{},talent:{},tanner:{},tester:{},theist:{},throng:{},tilter:{},tipper:{},toller:{},tosser:{},tourer:{},townie:{},trusty:{},varlet:{},vermin:{},vestry:{},victor:{},virago:{},voicer:{},waster:{},weasel:{},weaver:{},weeder:{},weeper:{},weirdo:{},whaler:{},winker:{},wraith:{},wretch:{},yakuza:{},yeoman:{},adapter:{},admiral:{},airhead:{},amalgam:{},animist:{},aphakic:{},applier:{},arbiter:{},armiger:{},atheist:{},attache:{},babbler:{},baffled:{},beldame:{},beloved:{},berserk:{},bondman:{},bounder:{},brigade:{},browser:{},buffoon:{},bulimic:{},burgher:{},caitiff:{},carload:{},catcher:{},cavalry:{},chachka:{},changer:{},charmer:{},chemist:{},cocotte:{},collage:{},compere:{},shadow:{},layer:{},north:{},orbit:{},trend:{},truss:{},vault:{},bunker:{},harbor:{},orient:{},origin:{},resort:{},safety:{},target:{},chamber:{},extreme:{},harbour:{},kingdom:{},mandate:{},outline:{},station:{},blockade:{},darkness:{},overlook:{},landscape:{},northeast:{},northwest:{},partition:{},southeast:{},southwest:{},structure:{},atmosphere:{},lug:{},tee:{},balk:{},burr:{},cage:{},drip:{},east:{},fort:{},hoop:{},west:{},cleat:{},fluke:{},scour:{},south:{},beacon:{},closet:{},duplex:{},radius:{plural:"radii"},vacuum:{},wattle:{},canteen:{},grounds:{},cloister:{},pinnacle:{},property:{},surround:{},terminus:{},anchorage:{},barricade:{},honeycomb:{},turnaround:{},institution:{},termination:{},cab:{},dam:{},brim:{},calk:{},dome:{},goal:{},hill:{},hull:{},knob:{},prop:{},seam:{},site:{},turf:{},apron:{},arena:{},baulk:{},cabin:{},grill:{},groin:{},haunt:{},lever:{},niche:{},privy:{},works:{},airway:{},barren:{},corral:{},dugout:{},fender:{},galley:{},hurdle:{},lounge:{},outlet:{},refuge:{},sconce:{},sprawl:{},temple:{},toilet:{},wicket:{},barrack:{},bulwark:{},buttery:{},cornice:{},grating:{},landing:{},leeward:{},maximum:{},pasture:{},salient:{},shingle:{},squinch:{},surgery:{},building:{},cylinder:{},downtown:{},fountain:{},landmark:{},munition:{},quadrant:{},rearward:{},sideline:{},windward:{},homestead:{},multiplex:{},perfumery:{},residence:{},stretcher:{},substrate:{},excavation:{},silhouette:{},convenience:{},culmination:{},declination:{},architecture:{},spa:{},aery:{},brow:{},bung:{},dike:{},flue:{},hell:{},tent:{},abbey:{},aisle:{},arbor:{},attic:{},booth:{},brink:{},disco:{},oxbow:{},oxeye:{},quoin:{},realm:{},salon:{},villa:{},whorl:{},barony:{},barrow:{},bazaar:{},billet:{},bustle:{},canton:{},casing:{},cellar:{},cooler:{},garage:{},ghetto:{},grille:{},hearth:{},locker:{},midway:{},muffle:{},oracle:{},remise:{},saloon:{},stocks:{},studio:{},tiptop:{},uptown:{},volute:{},arsenal:{},chassis:{},cockpit:{},commons:{},cubicle:{},dockage:{},fairway:{},fencing:{},gondola:{},heading:{},hotspot:{},lattice:{},lodging:{},minimum:{},moorage:{},pannier:{},rattrap:{},rootage:{},stowage:{},theater:{},theatre:{},vacuity:{},baseline:{},butchery:{},buttress:{},clearing:{},crosscut:{},domicile:{},erection:{},exterior:{},fanlight:{},fastness:{},firewall:{},foothold:{},frontier:{},lavatory:{},memorial:{},monument:{},mortuary:{},overhang:{},pedestal:{},scenario:{},solitude:{},sprocket:{},stockade:{},stoppage:{},vaulting:{},bombproof:{},cathedral:{},fundament:{},hindrance:{},panhandle:{},proximity:{},resonator:{},sanctuary:{},territory:{},watershed:{},confluence:{},department:{},encampment:{},flashpoint:{},groundwork:{},hinderance:{},quartering:{},substratum:{},underbelly:{},breadbasket:{},columbarium:{},destination:{},engineering:{},equinoctial:{},planetarium:{},penitentiary:{},circumference:{},confectionery:{},fortification:{},hub:{},hut:{},lee:{},sty:{},acme:{},apex:{},barn:{},brig:{},coop:{},digs:{},holy:{},jail:{},jook:{},juke:{},loge:{},mall:{},nook:{},pave:{},sash:{},silo:{},slum:{},tope:{},weir:{},abode:{},aerie:{},altar:{},bazar:{},detox:{},haven:{},heath:{},hutch:{},kraal:{},lager:{},manor:{},manse:{},navel:{},oasis:{plural:"oases"},opera:{},paddy:{},plaza:{},pylon:{},rodeo:{},shire:{},spile:{},sprag:{},venue:{},visor:{},apogee:{},arcade:{},ashram:{},asylum:{},atrium:{},bagnio:{},bailey:{},barrio:{},belfry:{},boards:{},casino:{},chapel:{},county:{},creche:{},cupola:{},deckle:{},fraise:{},haymow:{},hostel:{},kennel:{},lancet:{},larder:{},lockup:{},mihrab:{},parlor:{},plaque:{},prefab:{},prison:{},spigot:{},stacks:{},tampon:{},turret:{},vertex:{},zodiac:{},automat:{},balcony:{},batwing:{},benthos:{},borough:{},bubbler:{},bullpen:{},cabaret:{},caboose:{},chantry:{},convent:{},deanery:{},demesne:{},derrick:{},desktop:{},drydock:{},dukedom:{},dungeon:{},earldom:{},earplug:{},embassy:{},emirate:{},eparchy:{},equinox:{},fiefdom:{},florist:{},flyover:{},framing:{},funfair:{},grocery:{},hayrack:{},hospice:{},khanate:{},lunette:{},mansion:{},marquee:{},masonry:{},matting:{},midland:{},mooring:{},narthex:{},nirvana:{},obelisk:{},outback:{},parapet:{},parlour:{},pinhead:{},railing:{},rathole:{},redoubt:{},ribbing:{},rotunda:{},sanctum:{},sawmill:{},shipway:{},shoebox:{},stopple:{},tambour:{},transom:{},trellis:{},trestle:{},tribune:{},vantage:{},abutment:{},airspace:{},ambiance:{},ambience:{},backside:{},ballpark:{},basement:{},basilica:{},bioscope:{},bodywork:{},brattice:{},diggings:{},doghouse:{},dominion:{},entrepot:{},environs:{},extremum:{},farmland:{},fireside:{},hacienda:{},hideaway:{},imperium:{},jalousie:{},littoral:{},mantelet:{},mounting:{},nailhead:{},outdoors:{},palisade:{},pharmacy:{},porthole:{},province:{},revolver:{},seascape:{},sidewall:{},steerage:{},stopover:{},suburbia:{},sudatory:{},sweatbox:{},tailgate:{},turnpike:{},wellhead:{},backwater:{},bailiwick:{},beachhead:{},belvedere:{},caliphate:{},caparison:{},cellarage:{},chandlery:{},cloakroom:{},colonnade:{},cookhouse:{},couchette:{},crematory:{},crownwork:{},cubbyhole:{},dollhouse:{},dormitory:{},dripstone:{},fieldwork:{},fireguard:{},forefront:{},guardroom:{},hatchback:{},isoclinal:{},lazaretto:{},lineation:{},mezzanine:{},millinery:{},orphanage:{},outfitter:{},pleasance:{},princedom:{},revetment:{},roadblock:{},scrapheap:{},shrubbery:{},viewpoint:{},viscounty:{},workhouse:{},architrave:{},birthplace:{},borderline:{},bridgehead:{},brownstone:{},chokepoint:{},commissary:{},courthouse:{},escarpment:{},greenhouse:{},ironmonger:{},justiciary:{},laboratory:{},lamination:{},maisonette:{},metropolis:{},obstructor:{},panopticon:{},playground:{},prefecture:{},proscenium:{},quadrangle:{},rotisserie:{},sanatorium:{},suzerainty:{},tenderloin:{},triclinium:{},wellspring:{},wheelhouse:{},condominium:{},conventicle:{},crematorium:{},crenelation:{},demarcation:{},maisonnette:{},observatory:{},reformatory:{},superstrate:{},tobacconist:{},trusteeship:{},wainscoting:{},amphitheater:{},amphitheatre:{},chapterhouse:{},clotheshorse:{},delicatessen:{},fountainhead:{},haberdashery:{},municipality:{},packinghouse:{},patriarchate:{},retrenchment:{},substructure:{},superstratum:{},surroundings:{},wainscotting:{},juxtaposition:{},infrastructure:{},dec:{},inn:{},loo:{},pub:{},burg:{},cafe:{},deli:{},dorm:{},hank:{},iglu:{},kirk:{},lair:{},lawn:{},mart:{},nave:{},oast:{},rink:{},souk:{},tine:{},tipi:{},veld:{},ways:{},wold:{},yurt:{},apsis:{},burgh:{},condo:{},cubby:{},cuddy:{},dacha:{},duchy:{},duomo:{},eaves:{},flies:{},gable:{},glade:{},gulag:{},harem:{},hogan:{},igloo:{},lanai:{},layby:{},mecca:{},midst:{},motel:{},oriel:{},parts:{},patio:{},polls:{},qibla:{},roads:{},rooms:{},sauna:{},skein:{},socle:{},soddy:{},sodom:{},spire:{},stoep:{},stupa:{},tenon:{},tepee:{},tupek:{},tupik:{},veldt:{},weald:{},abatis:{},abbacy:{},alcove:{},apiary:{},arbour:{},aviary:{},bedsit:{},bethel:{},bodega:{},bounds:{},bowels:{},cabana:{},calkin:{},campus:{},carrel:{},casbah:{},casern:{},chalet:{},depths:{},dolmen:{},donjon:{},dormer:{},durbar:{},eatery:{},escarp:{},fipple:{},flange:{},flyway:{},friary:{},furket:{},gantry:{},garret:{},hangar:{},hareem:{},hayrig:{},imaret:{},isobar:{},isohel:{},isolex:{},kasbah:{},laager:{},locale:{},loggia:{},marina:{},masjid:{},meadow:{},medina:{},menhir:{},merlon:{},midair:{},morgue:{},mosque:{},mudhif:{},musjid:{},pagoda:{},paling:{},pantry:{},parvis:{},pelmet:{},piazza:{},pigsty:{},plinth:{},priory:{},pueblo:{},radome:{},setoff:{},skybox:{},skyway:{},stalls:{},storey:{},suburb:{},tenter:{},upside:{},volary:{},wigwam:{},wikiup:{},winery:{},abattis:{},airdock:{},airlock:{},alcazar:{},antapex:{},apadana:{},apojove:{},apolune:{},athanor:{},barroom:{},bascule:{},bedside:{},beeline:{},borstal:{},boudoir:{},brewery:{},brewpub:{},brothel:{},campong:{},cannery:{},capitol:{},carport:{},carrell:{},chancel:{},chateau:{},citadel:{},coaming:{},corncob:{},cottage:{},cowbarn:{},cowshed:{},cowtown:{},crinion:{},dinette:{},diocese:{},earshot:{},edifice:{},enclave:{},exurbia:{},eyeshot:{},fantail:{},feedlot:{},firebox:{},screw:{},share:{},sheet:{},slice:{},slide:{},spill:{},stage:{},stake:{},tread:{},paddle:{},weight:{},canvass:{},compact:{},undercut:{},representation:{},fin:{},gag:{},jet:{},tug:{},bark:{},bunk:{},drum:{},mask:{},pipe:{},reel:{},scan:{},blank:{},drill:{},plumb:{},plume:{},shank:{},sling:{},spray:{},pickup:{},saddle:{},trench:{},capsule:{},security:{},sacrifice:{},technical:{},can:{},jar:{},map:{},ply:{},rib:{},rim:{},web:{},bell:{},buck:{},claw:{},comb:{},copy:{},crib:{},dish:{},fake:{},foil:{},grab:{},kite:{},ramp:{},rent:{},slot:{},spit:{},tank:{},bosom:{},cable:{},charm:{},drain:{},grave:{},price:{},skirt:{},stool:{},strap:{},stump:{},trail:{},access:{},cannon:{},fiddle:{},formal:{},insert:{},launch:{},purple:{},reward:{},strand:{},tackle:{},display:{},floater:{},incline:{},limited:{},portion:{},torpedo:{},overcast:{},puncture:{},broadside:{},duplicate:{},submarine:{},surcharge:{},production:{},interchange:{},bus:{},due:{},gap:{},jaw:{},lag:{},nut:{},tin:{},win:{},arch:{},bail:{},cell:{},dope:{},fell:{},film:{},lace:{},lash:{},mail:{},pale:{},purl:{},rate:{},skid:{},sole:{},spar:{},tuck:{},vamp:{},vent:{},vest:{},brake:{},brass:{},chuck:{},cramp:{},crest:{},drape:{},elbow:{},habit:{},lease:{},lower:{},prize:{},roach:{},royal:{},scrap:{},slate:{},snare:{},snuff:{},total:{},trump:{},beaver:{},canvas:{},future:{},handle:{},header:{},jacket:{},motley:{},muzzle:{},quiver:{},rocket:{},roller:{},staple:{},wrench:{},compass:{},element:{},exhaust:{},frontal:{},thunder:{},transit:{},upstage:{},traverse:{},accession:{},allowance:{},guarantee:{},promenade:{},shipwreck:{},attachment:{},protection:{},perpendicular:{},aid:{},gig:{},gin:{},nap:{},oil:{},ram:{},bead:{},bulb:{},curb:{},dart:{},daub:{},dial:{},dose:{},exit:{},fuse:{},goad:{},item:{},knit:{},plan:{},rein:{},swag:{},veil:{},alarm:{},chart:{},cinch:{},clasp:{},eagle:{},entry:{},fluff:{},gouge:{},lance:{},meter:{},miter:{},pouch:{},probe:{},punch:{},purse:{},sable:{},scuff:{},shear:{},stern:{},taper:{},thumb:{},wharf:{},whisk:{},barrel:{},beetle:{},bronze:{},burden:{},congee:{},fleece:{},glossy:{},halter:{},limber:{},margin:{},mobile:{},needle:{},remote:{},shroud:{},sketch:{},splice:{},stripe:{},toggle:{},trough:{},volume:{},ballast:{},binding:{},blanket:{},costume:{},crackle:{},crystal:{},diamond:{},fitting:{},graphic:{},harness:{},premium:{},product:{},pyramid:{},sandbag:{},squelch:{},trammel:{},uniform:{},venture:{},warrant:{},wildcat:{},working:{},assembly:{},charcoal:{},discount:{},envelope:{},imperial:{},ligature:{},original:{},specific:{},treasure:{},vertical:{},deduction:{},distemper:{},inventory:{},objective:{},reversion:{},whitewash:{},supplement:{},contrivance:{},convertible:{},inspiration:{},intersection:{},counterbalance:{},bet:{},gel:{},gut:{},jag:{},jig:{},pan:{},pry:{},tab:{},tax:{},zip:{},bait:{},barb:{},bomb:{},cone:{},cuff:{},dado:{},disk:{},gear:{},gore:{},grid:{},harp:{},loom:{},main:{},pant:{},pike:{},prod:{},reef:{},ruff:{},sham:{},tare:{},tidy:{},tire:{},toll:{},award:{},basic:{},basin:{},baton:{},birch:{},braid:{},broom:{},clack:{},cloak:{},clout:{},crock:{},fagot:{},ferry:{},filet:{},forte:{},found:{},frail:{},jolly:{},motor:{},pedal:{},potty:{},radio:{},rivet:{},scarf:{},shore:{},shunt:{},sieve:{},splat:{},splay:{},stave:{},steal:{},steel:{},thong:{},tithe:{},torch:{},trunk:{},twine:{},upper:{},valve:{},weave:{},bridle:{},buckle:{},buffet:{},carpet:{},cotton:{},custom:{},devise:{},enamel:{},entail:{},furrow:{},girdle:{},hobble:{},mangle:{},mosaic:{},motive:{},pallet:{},pencil:{},pinion:{},powder:{},radial:{},rattle:{},rebate:{},rumble:{},shield:{},shimmy:{},shovel:{},sledge:{},sluice:{},tablet:{},throne:{},timber:{},tinsel:{},uplift:{},benefit:{},bombard:{},bootleg:{},console:{},default:{},forfeit:{},freight:{},gantlet:{},generic:{},grapple:{},journal:{},loading:{},molding:{},overlap:{},pigment:{},plastic:{},salvage:{},scooter:{},scuffle:{},spindle:{},steamer:{},stopper:{},upright:{},carriage:{},catapult:{},facility:{},laminate:{},medicine:{},offstage:{},overload:{},plastron:{},railroad:{},retrofit:{},strickle:{},throttle:{},whipping:{},wireless:{},automatic:{},blackjack:{},blackwash:{},foliation:{},interlock:{},roughcast:{},threshold:{},antiseptic:{},camouflage:{},incidental:{},intangible:{},preventive:{},reversible:{},watercolor:{},maintenance:{},watercolour:{},differential:{},prescription:{},preventative:{},prophylactic:{},reproduction:{},transcription:{},transportation:{},fob:{},guy:{},hem:{},jug:{},kit:{},saw:{},cane:{},cart:{},clam:{},coif:{},cosy:{},cozy:{},disc:{},felt:{},gash:{},hone:{},hose:{},keel:{},loot:{},luff:{},lure:{},mast:{},mend:{},mine:{},muff:{},nuke:{},plow:{},robe:{},ruby:{},snip:{},soap:{},spud:{},swab:{},tile:{},till:{},tram:{},vane:{},wand:{},weed:{},weld:{},welt:{},audio:{},audit:{},baste:{},bilge:{},brail:{},bugle:{},canal:{},chest:{},chock:{},conge:{},couch:{},crape:{},crepe:{},crook:{},flute:{},frill:{},frock:{},fusee:{},hoist:{},inset:{},kitty:{},leash:{},liner:{},mixer:{},noose:{},novel:{},pearl:{},piano:{},plait:{},quill:{},reset:{},roost:{},saber:{},sabre:{},scull:{},spear:{},squab:{},stilt:{},sulky:{},video:{},vomit:{},wagon:{},aerial:{},armory:{},baffle:{},banner:{},batten:{},binder:{},bodkin:{},bypass:{},canopy:{},chisel:{},clench:{},dollar:{},dredge:{},drogue:{},duster:{},engine:{},excise:{},facing:{},funnel:{},garner:{},hamper:{},joggle:{},kettle:{},lining:{},livery:{},lumber:{},marble:{},mortar:{},mousse:{},nickel:{},ocular:{},payoff:{},pestle:{},piping:{},pommel:{},profit:{},puzzle:{},ransom:{},ration:{},rental:{},ribbon:{},rotary:{},runway:{},saucer:{},seesaw:{},siphon:{},suture:{},tattoo:{},thatch:{},throat:{},tunnel:{},turtle:{},wealth:{},acrylic:{},armoury:{},balloon:{},bargain:{},beehive:{},blinker:{},bolster:{},caisson:{},casting:{},ceiling:{},chariot:{},chopper:{},clarion:{},clinker:{},clipper:{},cowhide:{},earnest:{},elastic:{},expense:{},festoon:{},fortune:{},garnish:{},gravure:{},grinder:{},killing:{},linkage:{},novelty:{},overall:{},overlay:{},pallium:{},perfume:{},pillory:{},pointer:{},ringlet:{},rosette:{},segment:{},shuttle:{},staging:{},trailer:{},trumpet:{},unction:{},barbecue:{},barbeque:{},disguise:{},electric:{},elevated:{},fraction:{},gauntlet:{},gossamer:{},heritage:{},homespun:{},ironclad:{},lifeline:{},lighting:{},mackinaw:{},moulding:{},pinpoint:{},pinwheel:{},poundage:{},sanguine:{},sapphire:{},scribble:{},triangle:{},underlay:{},upstairs:{},virginal:{},admission:{},amphibian:{},backstage:{},capillary:{},cartridge:{},cartwheel:{},cathartic:{},condenser:{},damascene:{},depiction:{},diaphragm:{},medallion:{},overdrive:{},pacemaker:{},reservoir:{},screening:{},sectional:{},solitaire:{},spotlight:{},undercoat:{},assessment:{},bottleneck:{},equatorial:{},overburden:{},pigeonhole:{},pocketbook:{},pontifical:{},refractory:{},reparation:{},roundabout:{},simulation:{},waterproof:{},accelerator:{},certificate:{},inheritance:{},installment:{},restorative:{},ventilation:{},modification:{},subscription:{},hospitalization:{},instrumentation:{},ax:{},axe:{},bib:{},bin:{},bur:{},cot:{},fee:{},fur:{},jib:{},lid:{},six:{},ten:{},tub:{},two:{},bath:{},bike:{},cash:{},coke:{},cope:{},cowl:{},cusp:{},darn:{},debt:{},dice:{},dory:{},duct:{},fore:{},four:{},gaff:{},gage:{},gong:{},helm:{},hemp:{},icon:{},iris:{},junk:{},kern:{},loan:{},maul:{},mink:{},pane:{},pier:{},quid:{},reed:{},rook:{},scum:{},semi:{},sump:{},swob:{},taxi:{},vice:{},ware:{},wool:{},yarn:{},yawl:{},annex:{},atlas:{},barge:{},bevel:{},chaff:{},chute:{},clamp:{},crane:{},crate:{},cubeb:{},dandy:{},dicky:{},dinky:{},dolly:{},dower:{},eight:{},fifty:{},flail:{},floss:{},folio:{},fuzee:{},genre:{},girth:{},gourd:{},grape:{},hinge:{},hobby:{},inlay:{},japan:{},ladle:{},latch:{},linen:{},means:{},mitre:{},motif:{},mulct:{},pique:{},quilt:{},quirk:{},quota:{},rifle:{},rotor:{},setup:{},seven:{},shred:{},skate:{},spade:{},spool:{},spout:{},strut:{},three:{},toner:{},trawl:{},truck:{},twill:{},virtu:{},alpaca:{},anklet:{},argyle:{},argyll:{},arnica:{},balsam:{},bender:{},birdie:{},bishop:{},blower:{},blowup:{},bolero:{},bonnet:{},bounty:{},budget:{},bullet:{},cachet:{},carbon:{},casket:{},castor:{},claxon:{},cobble:{},cobweb:{},collet:{},crenel:{},cutoff:{},cutout:{},damask:{},damper:{},dibble:{},dickey:{},dipper:{},domino:{},douche:{},dragee:{},equity:{},eyelet:{},fetish:{},foible:{},fresco:{},gaiter:{},gibbet:{},gusset:{},heckle:{},hooter:{},horror:{},hunter:{},intake:{},jigger:{},lacing:{},lappet:{},makeup:{},making:{},mallet:{},marker:{},patina:{},paving:{},platen:{},plough:{},poleax:{},portal:{},primer:{},rabbet:{},rattan:{},refill:{},retort:{},revere:{},screed:{},sheath:{},sinker:{},socket:{},splint:{},stereo:{},syphon:{},tamper:{},tandem:{},tarmac:{},tenure:{},ticker:{},trepan:{},twenty:{},velvet:{},veneer:{},vessel:{},vicuna:{},backing:{},bandage:{},bobsled:{},carving:{},central:{},chamfer:{},chequer:{},cistern:{},cleaner:{},cleanup:{},coinage:{},crochet:{},cruiser:{},curtain:{},dilator:{},distaff:{},emerald:{},etching:{},flannel:{},flounce:{},footing:{},gangway:{},garbage:{},garland:{},gauffer:{},gelatin:{},grizzle:{},hanging:{},haywire:{},lamella:{},laniard:{},lanyard:{},lashing:{},lockage:{},lounger:{},manakin:{},masking:{},meshing:{},mileage:{},mintage:{},mortice:{},mortise:{},movable:{},muffler:{},palette:{},pendant:{},pendent:{},pennant:{},pillbox:{},poleaxe:{},portage:{},pottery:{},priming:{},quarrel:{},readout:{},retread:{},roundel:{},rubbing:{},scupper:{},scuttle:{},serpent:{},shampoo:{},shellac:{},shutter:{},snaffle:{},snorkel:{},spangle:{},spouter:{},stabile:{},stinker:{},tankage:{},toehold:{},tracing:{},treadle:{},trefoil:{},truckle:{},trundle:{},vesture:{},webbing:{},whipsaw:{},wrapper:{},additive:{},adjuvant:{},aperture:{},aquatint:{},backdoor:{},basilisk:{},blowback:{},bludgeon:{},breakage:{},causeway:{},checkout:{},clincher:{},compress:{},corduroy:{},coupling:{},crossbar:{},currency:{},detector:{},dividend:{},dogtooth:{},downcast:{},followup:{},frontage:{},giveaway:{},goodwill:{},hardware:{},headgear:{},headshot:{},hypnotic:{},ignition:{},inhalant:{},lipstick:{},masthead:{},meniscus:{},metallic:{},modeling:{},nautilus:{},neckband:{},nightcap:{},ornament:{},outboard:{},partizan:{},pavement:{},pectoral:{},planking:{},plumbing:{},portable:{},pressing:{},radiator:{},remittal:{},residual:{},resource:{},roulette:{},scaffold:{},scapular:{},scissors:{plural:"scissors"},scrabble:{},springer:{},sunburst:{},tapestry:{},taxation:{},thrasher:{},tomahawk:{},totality:{},tympanum:{},valuable:{},vignette:{},wardrobe:{},widening:{},admixture:{},antiquity:{},aquaplane:{},bagatelle:{},bastinado:{},blindfold:{},blueprint:{},boomerang:{},carpetbag:{},crinoline:{},depressor:{},detergent:{},doodlebug:{},downstage:{},emergency:{},endowment:{},equalizer:{},exemption:{},extortion:{},extractor:{},facsimile:{},freewheel:{},gabardine:{},grotesque:{},hemstitch:{},horseshoe:{},invention:{},jackknife:{},microwave:{},millstone:{},miniature:{},modernism:{},nosepiece:{},ownership:{},packaging:{},pargeting:{},patchwork:{},pinstripe:{},polyester:{},potpourri:{},recording:{},refresher:{},semaphore:{},semblance:{},shielding:{},sideboard:{},skyrocket:{},slapstick:{},soporific:{},spectacle:{},starboard:{},telephone:{},telescope:{},treadmill:{},turntable:{},verdigris:{},videotape:{},whirligig:{},allocation:{},ambulatory:{},anesthetic:{},assistance:{},astringent:{},automation:{},cantilever:{},chinchilla:{},concertina:{},constraint:{},deductible:{},depilatory:{},disposable:{},elongation:{},escutcheon:{},featherbed:{},foreground:{},forfeiture:{},guillotine:{},hammerhead:{},hydroplane:{},innovation:{},intoxicant:{},knockabout:{},lithograph:{},monochrome:{},nonpayment:{},nutcracker:{},pargetting:{},peripheral:{},polychrome:{},redemption:{},stabilizer:{},stenograph:{},subvention:{},sustenance:{},technology:{},television:{},waterspout:{},anaesthetic:{},anamorphism:{},concealment:{},containment:{},copperplate:{},cornerstone:{},counterfeit:{},countersink:{},cryptograph:{},delineation:{},delinquency:{},encumbrance:{},fingerboard:{},fluorescent:{},incumbrance:{},perforation:{},pyrotechnic:{},retribution:{},subsistence:{},tensiometer:{},transporter:{},undercharge:{},withholding:{},dispensation:{},electrolytic:{},encrustation:{},inclinometer:{},incrustation:{},installation:{},intermixture:{},photogravure:{},straightaway:{},transparency:{},appropriation:{},embellishment:{},improvisation:{},merchandising:{},mystification:{},quadruplicate:{},semiautomatic:{},pharmaceutical:{},superannuation:{},aba:{},boa:{},dag:{},fax:{},gad:{},keg:{},nib:{},nog:{},pix:{},pyx:{},rep:{},ski:{},taw:{},urn:{},ante:{},arms:{},bale:{},berm:{},bier:{},bitt:{},bola:{},bolo:{},brad:{},cape:{},cask:{},cent:{},coax:{},coca:{},cosh:{},dime:{},dole:{},doll:{},garb:{},gilt:{},gyro:{},hasp:{},hypo:{},ikon:{},juju:{},lane:{},lint:{},luge:{},lute:{},maxi:{},maze:{},mini:{},mitt:{},mule:{},pail:{},perk:{},plat:{},pork:{},pouf:{},rung:{},scow:{},silk:{},sill:{},skep:{},sled:{},tamp:{},tapa:{},topi:{},trey:{},vape:{},wale:{},wick:{},adobe:{},aegis:{},aglet:{},album:{},alley:{},anode:{},anvil:{},arrow:{},auger:{},batik:{},bogie:{},bolus:{},bongo:{},borer:{},bribe:{},bulla:{},caddy:{},canoe:{},chime:{},coign:{},debit:{},denim:{},depot:{},diary:{},diode:{},drier:{},flask:{},flume:{},fount:{},frier:{},fryer:{},gauze:{},globe:{},golem:{},hijab:{},inlet:{},jimmy:{},jorum:{},kayak:{},khaki:{},lasso:{},latex:{},lisle:{},lorry:{},lucre:{},manta:{},mimeo:{},mizen:{},moire:{},mulch:{},newel:{},nylon:{},penny:{},piste:{},plush:{},poker:{},prism:{},pyxis:{},ranch:{},razor:{},relic:{},rouge:{},ruler:{},sabot:{},scape:{},sedan:{},seine:{},servo:{},shelf:{plural:"shelves"},slops:{},spoke:{},sprig:{},stele:{},steps:{},stoup:{},stove:{},strop:{},suede:{},swage:{},tammy:{},tanka:{},tappa:{},teddy:{},terms:{},toque:{},torus:{},towel:{},tunic:{},tweed:{},usury:{},verso:{},vizor:{},waist:{},winch:{},withe:{},xerox:{},yacht:{},abacus:{},afghan:{},aiglet:{},alidad:{},amends:{},arctic:{},artery:{},avenue:{},banger:{},bangle:{},banian:{},banyan:{},bauble:{},beaker:{},bicorn:{},blazon:{},boiler:{},bracer:{},broach:{},bumper:{},burner:{},buzzer:{},caftan:{},calash:{},camera:{},camion:{},camlet:{},capote:{},carton:{},casein:{},catgut:{},chaise:{},cheque:{},chiton:{},chukka:{},cither:{},cloaca:{},cloche:{},coffer:{},coffin:{},coigne:{},colors:{},corbel:{},corker:{},corset:{},crayon:{},crutch:{},dagger:{},daybed:{},detour:{},diaper:{},dickie:{},dipole:{},dirndl:{},discus:{},dogleg:{},dolman:{},dosage:{},duffel:{},duffle:{},eyecup:{},fabric:{},facade:{},falsie:{},fanjet:{},fascia:{},fetter:{},firkin:{},fizgig:{},floppy:{},frieze:{},garter:{},gimlet:{},goblet:{},guimpe:{},guinea:{},gunnel:{},harrow:{},helmet:{},hookup:{},hotbed:{},impost:{},instep:{},iodine:{},island:{},jersey:{},jetsam:{},jigsaw:{},juicer:{},kaftan:{},kibble:{},kirtle:{},lateen:{},laurel:{},ledger:{},linage:{},lunula:{},magnet:{},markup:{},miotic:{},mizzen:{},myotic:{},nipple:{},nozzle:{},onager:{},pajama:{},pavage:{},pellet:{},pennon:{},peplum:{},peyote:{},pincer:{},pipage:{},pomade:{},pompon:{},popper:{},pyjama:{},ragbag:{},reamer:{},remake:{},reseau:{},rudder:{},russet:{},scythe:{},settee:{},shades:{},shorts:{},siding:{},sleeve:{},sleigh:{},spinet:{},spline:{},stoker:{},stylus:{},sublet:{},subway:{},surtax:{},swathe:{},swivel:{},syrinx:{},taenia:{},talcum:{},tariff:{},teacup:{},teeter:{},tenner:{},tether:{},thwart:{},tocsin:{},trophy:{},trowel:{},turban:{},viewer:{},waggon:{},wampum:{},wherry:{},wicker:{},willow:{},wiring:{},woolen:{},yarder:{},zipper:{},acetate:{},aerosol:{},airline:{},alidade:{},ampulla:{},android:{},aneroid:{},annulet:{},anodyne:{},apanage:{},apparel:{},archive:{},armband:{},armilla:{},arrears:{},banding:{},basting:{},batting:{},bayonet:{},beading:{},bedding:{},bladder:{},blocker:{},blusher:{},bollock:{},bouquet:{},bracing:{},brocade:{},broiler:{},bullion:{},bunting:{},burthen:{},bushing:{},caleche:{},caliper:{},cathode:{},catwalk:{},cautery:{},charger:{},charnel:{},chemise:{},chevron:{},chimney:{},chlamys:{},circlet:{},colours:{},commode:{},cooling:{},cordage:{},coronet:{},corsair:{},crampon:{},cutaway:{},daybook:{},deadeye:{},decoder:{},diagram:{},doeskin:{},dogsled:{},doormat:{},dragger:{},dragnet:{},drapery:{},drawers:{},dustpan:{},escheat:{},eyehole:{},fixings:{},flatbed:{},flattop:{},flipper:{},foghorn:{},foliage:{},footage:{},foretop:{},forgery:{},frigate:{},funding:{},furring:{},fustian:{},garment:{},garotte:{},garrote:{},gouache:{},grapnel:{},griddle:{},hackney:{},hammock:{},harpoon:{},hassock:{},hatchel:{},hatchet:{},heating:{},hedging:{},hibachi:{},hobnail:{},holding:{},holster:{},hydrant:{},iceboat:{},igniter:{},impasse:{},ironing:{},jackpot:{},javelin:{},joinery:{},fibre:{},hazel:{},lemon:{},peach:{},plank:{},raven:{},snipe:{},spine:{},steer:{},stint:{},stunt:{},bleach:{},breath:{},callus:{},cherry:{},dimple:{},entire:{},ferret:{},filler:{},hybrid:{},jackal:{},marrow:{},orange:{},radish:{},spruce:{},stifle:{},winkle:{},endemic:{},vanilla:{},beefwood:{},calabash:{},concrete:{},emission:{},kingfish:{},solution:{},volatile:{},partridge:{},repellant:{},derivative:{},thickening:{},ash:{},bud:{},cob:{},hen:{},mew:{},mud:{},mum:{},paw:{},roe:{},sow:{},soy:{},wax:{},yam:{},beef:{},burl:{},calf:{plural:"calves"},chat:{},fowl:{},fuzz:{},gill:{},grub:{},hock:{},hoof:{},lobe:{},rose:{},scup:{},soup:{},swan:{},tint:{},tuna:{},tusk:{},alloy:{},briar:{},clove:{},coney:{},ebony:{},ether:{},filth:{},flesh:{},gumbo:{},homer:{},jelly:{},matte:{},mocha:{},reeve:{},wrack:{},annual:{},canine:{},carrot:{},cereal:{},cockle:{},feeler:{},fennel:{},flimsy:{},gargle:{},gravel:{},grouse:{},indigo:{},mammee:{},medlar:{},monkey:{},nebula:{},oyster:{},salmon:{plural:"salmon"},shiner:{},shrimp:{},sprout:{},stigma:{},blossom:{},blubber:{},buffalo:{},cabbage:{},calamus:{},catfish:{},caudate:{},caustic:{},chelate:{},chicory:{},ciliate:{},essence:{},griffon:{},hemlock:{},hydrate:{},incense:{},lighter:{},remount:{},sardine:{},stinger:{},vitriol:{},ambrosia:{},billfish:{},blackcap:{},crawfish:{},crayfish:{},earthnut:{},escallop:{},filament:{},flounder:{},infusion:{},ironwood:{},quandong:{},relative:{},ringtail:{},screamer:{},sycamore:{},alabaster:{},algarroba:{},broadbill:{},composite:{},fulminate:{},perennial:{},tangerine:{},bladderpod:{},granadilla:{},heartsease:{},periwinkle:{},tumbleweed:{},agglomerate:{},bittersweet:{},intermediate:{},dye:{},elk:{},fig:{},haw:{},oka:{},pea:{},pee:{},rye:{},sac:{},tar:{},yak:{},carp:{},clay:{},coma:{},cony:{},crud:{},cusk:{},dung:{},fang:{},foam:{},germ:{},glue:{},hare:{},hind:{},husk:{},kiwi:{},lake:{},mung:{},okra:{},pine:{},pith:{},puke:{},rice:{},roan:{},sloe:{},taro:{},teal:{},titi:{},twig:{},amber:{},anime:{},berry:{},boxer:{},carob:{},cedar:{},chine:{},guava:{},hound:{},husky:{},kauri:{},lemma:{},monad:{},ocher:{},ochre:{},onion:{},ounce:{},pansy:{},pecan:{},pewit:{},prawn:{},quail:{},shuck:{},sloth:{},slush:{},smelt:{},snail:{},snout:{},spawn:{},swift:{},tabby:{},thorn:{},topaz:{},umber:{},virus:{},wafer:{},wahoo:{},wheat:{},whelk:{},badger:{},bonito:{},broody:{},chrome:{},cirrus:{},cocoon:{},cowpea:{},cuckoo:{},elixir:{},grease:{},grubby:{},howler:{},jabiru:{},jargon:{},jujube:{},kernel:{},leaven:{},lentil:{},liquor:{},locust:{},manioc:{},mastic:{},mentum:{},mildew:{},mimosa:{},mullet:{},muscat:{},mutant:{},nectar:{},nettle:{},nodule:{},pawpaw:{},pecker:{},plasma:{},ruddle:{},sallow:{},shoddy:{},squill:{},starch:{},stroma:{},stucco:{},sunray:{},thorax:{},tissue:{},violet:{},walnut:{},warble:{},amyloid:{},antenna:{plural:"antennae"},apricot:{},aquatic:{},asphalt:{},avocado:{},beebalm:{},bobtail:{},builder:{},bulldog:{},caltrop:{},cayenne:{},chinook:{},coconut:{},cricket:{},cudweed:{},currant:{},cuticle:{},dasheen:{},gallfly:{},juniper:{},lacquer:{},leaflet:{},lettuce:{},macadam:{},mordant:{},mustard:{},packing:{},panther:{},papilla:{},papyrus:{},parsnip:{},pigweed:{},pollard:{},redfish:{},redwood:{},rubbish:{},saffron:{},salsify:{},shallot:{},slating:{},solvate:{},solvent:{},soybean:{},sunfish:{},truffle:{},whisker:{},abrasive:{},allspice:{},angelica:{},biennial:{},bilberry:{},bluebell:{},chickpea:{},cinnabar:{},cinnamon:{},congener:{},creosote:{},demerara:{},duckbill:{},firebird:{},fleabane:{},humanity:{},lavender:{},mahogany:{},monkfish:{},paraffin:{},peduncle:{},peroxide:{},plantain:{},rockfish:{},sandarac:{},sandwort:{},scammony:{},shamrock:{},skipjack:{},skullcap:{},snowbird:{},suckling:{},tubercle:{},alligator:{},angelfish:{},arachnoid:{},arrowroot:{},bearberry:{},blackfish:{},buckthorn:{},capitulum:{},carbonate:{},carnation:{},celluloid:{},chemistry:{},coriander:{},corrosive:{},crabapple:{},devilfish:{},emanation:{},groundnut:{},horseback:{},horsemint:{},injection:{},matchwood:{},mistletoe:{},offspring:{plural:"offspring"},pyrethrum:{},raspberry:{},razorback:{},satinwood:{},sheepskin:{},tomatillo:{},waxflower:{},whitefish:{},ammunition:{},bitterwood:{},blackberry:{},butterfish:{},chinquapin:{},coneflower:{},flagellate:{},flamboyant:{},fledgeling:{},insulation:{},peppermint:{},receptacle:{},strawberry:{},watercress:{},chittamwood:{},everlasting:{},fomentation:{},helleborine:{},honeysuckle:{},horseradish:{},huckleberry:{},salmonberry:{},shittimwood:{},strawflower:{},ultramarine:{},whitethroat:{},wintergreen:{},helmetflower:{},impregnation:{},quintessence:{},sternutatory:{},thimbleberry:{},contamination:{},extravasation:{},leatherjacket:{},pulverisation:{},pulverization:{},tortoiseshell:{},ti:{},ala:{},asp:{},eel:{},elm:{},fir:{},gar:{},neb:{},nit:{},oak:{},oat:{},sol:{},tom:{},yew:{},agar:{},akee:{},anil:{},atom:{},balm:{},bast:{},beet:{},boar:{},bole:{},bran:{},brit:{},cere:{},cero:{},chow:{},coho:{},dahl:{},dill:{},flax:{},foal:{},glop:{},gnat:{},hake:{},herb:{},hoar:{},homo:{},kaki:{},kino:{},leek:{},loin:{},mite:{},musk:{},parr:{},pear:{},poon:{},puka:{},rhea:{},saki:{},seta:{},shad:{},silt:{},slag:{},soda:{},soma:{},soot:{},soya:{},talc:{},teak:{},tufa:{},unai:{},unau:{},whey:{},woad:{},wort:{},yolk:{},zinc:{},abaca:{},alder:{},alula:{},amino:{},anise:{},apple:{},aroid:{},aster:{},balsa:{},basil:{},beech:{},betel:{},biddy:{},billy:{},biped:{},booby:{},britt:{},bruin:{},cairn:{},capon:{},caulk:{},chard:{},chess:{},chick:{},cisco:{},cohoe:{},comma:{},croup:{},cumin:{},dross:{},elver:{},epoxy:{},ergot:{},falls:{},flint:{},fossa:{},genip:{},grout:{},grume:{},henna:{},hilum:{},humus:{},hydra:{},icaco:{},ilama:{},imago:{},ivory:{},kapok:{},kenaf:{},lapin:{},larch:{},lilac:{},lotus:{},luffa:{},mahoe:{},maize:{},mamey:{},mango:{},manna:{},melon:{},moong:{},naiad:{},nanny:{},nopal:{},orris:{},osier:{},otter:{},ovary:{},ovule:{},pacer:{},panda:{},papaw:{},piggy:{},pilus:{},pinna:{},pixie:{},polyp:{},potto:{},putty:{},quira:{},robin:{},roble:{},rosin:{},scrod:{},sepia:{},sisal:{},slime:{},sorus:{},sprat:{},squid:{},stoma:{},sumac:{},swede:{},theca:{},thyme:{},trout:{plural:"trout"},tunny:{},vapor:{},velum:{},venom:{},vinyl:{},whelp:{},yeast:{},acetum:{},acinus:{},acumen:{},adduct:{},agaric:{},alkali:{},almond:{},anuran:{},archil:{},argent:{},balata:{},bamboo:{},bantam:{},barley:{},basset:{},beluga:{},bennet:{},bluing:{},bonduc:{},borage:{},capsid:{},cashew:{},cassia:{},caudex:{},celery:{},chives:{},cilium:{},citron:{},cobnut:{},cocker:{},cosmos:{},cowage:{},croton:{},cupule:{},cushaw:{},darter:{},dentin:{},dobson:{},dodder:{},donkey:{},durian:{},embryo:{},endive:{},ermine:{},falcon:{},feijoa:{},feline:{},fisher:{},fucoid:{},gadfly:{},garlic:{},glycol:{},hackle:{},haunch:{},herpes:{},hyssop:{},kaffir:{},kitten:{},lichee:{},limpet:{},linden:{},linnet:{},litchi:{},loofah:{},loquat:{},lovage:{},lupine:{},madder:{},maguey:{},manure:{},marang:{},mescal:{},mocker:{},mombin:{},mucoid:{},mudcat:{},munggo:{},murine:{},mussel:{},myrtle:{},nipper:{},nutmeg:{},obeche:{},orchil:{},orchis:{},oriole:{},padauk:{},paigle:{},papaya:{},parget:{},pasang:{},peewee:{},peewit:{},phenol:{},plaice:{},pomelo:{},poplar:{},possum:{},potato:{},pothos:{},pouter:{},puffer:{},pullet:{},pumice:{},pyrene:{},quahog:{},quartz:{},quince:{},rachis:{},raffia:{},ratter:{},relict:{},sabicu:{},saline:{},sapote:{},saurel:{},schrod:{},senega:{},septum:{},setter:{},sierra:{},simian:{},sludge:{},solder:{},spirea:{},stevia:{},sulfur:{},thrift:{},toetoe:{},tomato:{},tophus:{},triton:{},tupelo:{},turbot:{},turnip:{},vapour:{},vellum:{},wapiti:{},wasabi:{},acerola:{},actinon:{},aculeus:{},adamant:{},albumen:{},alewife:{},alfalfa:{},amboyna:{},anchovy:{},anemone:{},anionic:{},annelid:{},annulus:{},antacid:{},antlion:{},arsenic:{},aurochs:{},babbitt:{},barilla:{},beeswax:{},bimetal:{},biomass:{},bloomer:{},blotter:{},bluefin:{},blueing:{},boneset:{},boxwood:{},bracken:{},brocket:{},bromide:{},buckeye:{},bugbane:{},bugloss:{},bullock:{},bulrush:{},buzzard:{},cackler:{},cacodyl:{},caliche:{},calycle:{},cambium:{},capulin:{},caraway:{},cardoon:{},catbird:{},catechu:{},celtuce:{},ceriman:{},chalaza:{},chamois:{},chervil:{},chigger:{},citrate:{},cocoyam:{},codfish:{},comfrey:{},compost:{},cowslip:{},crappie:{},crawdad:{},crinoid:{},cyanide:{},cypress:{},dabbler:{},denizen:{},diploid:{},dogfish:{},dogwood:{},echidna:{},eelpout:{},enation:{},fallout:{},ferrite:{},fetlock:{},filaria:{},filbert:{},firebug:{},firefly:{},frijole:{},fuchsia:{},gamboge:{},ginseng:{},girasol:{},glutton:{},gobbler:{},grackle:{},grampus:{},granite:{},grizzly:{},grouper:{},grunter:{},gudgeon:{},haddock:{},halibut:{},haploid:{},haricot:{},heather:{},hepatic:{},herring:{},hickory:{},hogfish:{},honesty:{},hyaline:{},ignitor:{},inducer:{},jackass:{},jewfish:{},jonquil:{},kestrel:{},kingcup:{},kumquat:{},lactate:{},langsat:{},lanolin:{},lingcod:{},lobster:{},logwood:{},mahagua:{},majagua:{},malacca:{},mammoth:{},marabou:{},marasca:{},menthol:{},mercury:{},monarch:{},moneran:{},mongrel:{},moorhen:{},morello:{},muskrat:{},nervure:{},nitrate:{},octopus:{},oldwife:{},opossum:{},oregano:{},ostrich:{},oxheart:{},parsley:{},peacock:{},pigfish:{},pimento:{},piranha:{},plumcot:{},pollack:{},pollock:{},pompano:{},popcorn:{},poultry:{},pricket:{},puccoon:{},pulasan:{},pyrogen:{},quahaug:{},quassia:{},quetzal:{},raccoon:{},ragweed:{},ragwort:{},rattler:{},redbird:{},redpoll:{},redtail:{},reducer:{},redwing:{},remover:{},residue:{},retinal:{},rhubarb:{},rosebud:{},rostrum:{},satsuma:{},saurian:{},sequoia:{},seriema:{},skylark:{},sockeye:{},soursop:{},sparrow:{},spinach:{},spiraea:{},stentor:{},steroid:{},stubble:{},sulfate:{},sulphur:{},tangelo:{},taproot:{},tarweed:{},tarwood:{},tattler:{},taurine:{},teargas:{},timothy:{},tobacco:{},topknot:{},tortrix:{},trotter:{},varmint:{},verdure:{},viceroy:{},vinegar:{},viscose:{},vulture:{},walleye:{},waratah:{},warbler:{},waxwork:{},whooper:{},wilding:{},witloof:{},wryneck:{},abradant:{},absinthe:{},acceptor:{},actinoid:{},adhesive:{},adjutant:{},ageratum:{},agueweed:{},albacore:{},amarelle:{},amethyst:{},ammoniac:{},argonaut:{},armyworm:{},auricula:{},balancer:{},baldpate:{},barnacle:{},basswood:{},bayberry:{},bearskin:{},beetroot:{},birdlime:{},blackfly:{},blacktop:{},bluebird:{},bluefish:{},boarfish:{},bocconia:{},boxberry:{},brisling:{},broccoli:{},buckskin:{},bullhead:{},bullrush:{},canistel:{},capuchin:{},carangid:{},carbonyl:{},carboxyl:{},cardamom:{},cardamon:{},carinate:{},carnauba:{},carotene:{},cashmere:{},catalyst:{},catchfly:{},celeriac:{},cetacean:{},chimaera:{},chloride:{},cilantro:{},cinchona:{},citrange:{},cockspur:{},conodont:{},costmary:{},cowberry:{},cucumber:{},deadwood:{},detritus:{},dewberry:{},dilution:{},dolomite:{},duckling:{},ectozoan:{},eelgrass:{},effluent:{},eggplant:{},emulsion:{},estragon:{},filtrate:{},fireweed:{},flathead:{},flooring:{},forelock:{},galangal:{},garbanzo:{},grayback:{},guaiacum:{},hardtack:{},harebell:{},hawkweed:{},hazelnut:{},hedgehog:{},hepatica:{},hookworm:{},hornwort:{},horsefly:{},hyacinth:{},impurity:{},iodoform:{},jalapeno:{},jamberry:{},japonica:{},keurboom:{},kindling:{},kingwood:{},kinkajou:{},kohlrabi:{},labdanum:{},lambskin:{},locoweed:{},lovebird:{},magnolia:{},mahimahi:{},mandrake:{},margarin:{},marjoram:{},medusoid:{},mephitis:{},migrator:{},molecule:{},moonfish:{},mucilage:{},mulberry:{},nestling:{},omnivore:{},ovenbird:{},pandanus:{},pickerel:{},pilchard:{},pimiento:{},pitahaya:{},placenta:{},plumbago:{},predator:{},ptomaine:{},puffball:{},pulassan:{},purebred:{},pyrectic:{},quandang:{},quickset:{},rambotan:{},rambutan:{},redberry:{},redstart:{},reedbird:{},ricebird:{},richweed:{},ringdove:{},rockrose:{},rosefish:{},rosemary:{},rosewood:{},ruminant:{},rutabaga:{},sailfish:{},salsilla:{},saltwort:{},sandfish:{},scallion:{},seahorse:{},sealskin:{},sewerage:{},shoveler:{},siderite:{},silkworm:{},sparling:{},squealer:{},squirrel:{},stearate:{},stinkpot:{},superbug:{},surffish:{},sweetsop:{},tamarind:{},tarragon:{},teaberry:{},thresher:{},throstle:{},tilefish:{},tomentum:{},toxicant:{},turmeric:{},ungulate:{},univalve:{},urochord:{},vesicant:{},warragal:{},warrigal:{},watchdog:{},waxberry:{},weakfish:{},wolffish:{},woodbine:{},woodruff:{},wormcast:{},wriggler:{},zucchini:{},absorbent:{},adsorbate:{},adsorbent:{},albatross:{},almandine:{},andromeda:{},antiknock:{},apophysis:{},archangel:{},arsenical:{},artichoke:{},asparagus:{},aubergine:{},bacteroid:{},blackbird:{},blindworm:{},bluegrass:{},bluepoint:{},broadtail:{},brooklime:{},brookweed:{},brushwood:{},buckwheat:{},bugleweed:{},buteonine:{},butternut:{},caecilian:{},calyculus:{},candlenut:{},cantaloup:{},carambola:{},carbonado:{},carbuncle:{},cardboard:{},carnivore:{},catamount:{},celandine:{},chameleon:{},chatterer:{},chelonian:{},cherimoya:{},chickweed:{},chlamydia:{},clamshell:{},clapboard:{},coachwhip:{},cochineal:{},cocklebur:{},cocozelle:{},coltsfoot:{},commensal:{},courgette:{},crackling:{},cupflower:{},cyanamide:{},digestive:{},digitalis:{},driftfish:{},ecrevisse:{},ectoplasm:{},eiderdown:{},ephemeral:{},eutherian:{},evergreen:{},excretion:{},exudation:{},fenugreek:{},firebrand:{},firestone:{},flagellum:{},frostweed:{},funiculus:{},gladiolus:{},glasswort:{},goldeneye:{},goldfinch:{},grapevine:{},grenadier:{},hackberry:{},hamadryad:{},heartleaf:{},hellebore:{},hollyhock:{},horehound:{},horsebean:{},horsehair:{},horseweed:{},hortensia:{},hydroxide:{},jackfruit:{},jacksnipe:{},jellyfish:{},juneberry:{},lancewood:{},langouste:{},leavening:{},lemonwood:{},mammalian:{},manzanita:{},maravilla:{},marihuana:{},marijuana:{},moosewood:{},muscadine:{},muskmelon:{},nakedwood:{},nectarine:{},nighthawk:{},pasturage:{},patchouli:{},patchouly:{},pelecypod:{},pellitory:{},peregrine:{},peristome:{},persimmon:{},phosphate:{},pimpernel:{},pinchbeck:{},pineapple:{},pistachio:{},polyploid:{},probiotic:{},proboscis:{},protozoan:{},pureblood:{},quadruped:{},rauwolfia:{},recycling:{},reptilian:{},reticulum:{},rockcress:{},rootstock:{},rosinweed:{},sandpaper:{},sapodilla:{},sassafras:{},sheldrake:{},shingling:{},shoveller:{},siccative:{},sicklepod:{},snakeroot:{},snowflake:{},sourdough:{},spicebush:{},spirillum:{},stainless:{},stiffener:{},strangler:{},strawworm:{},sugarcane:{},swordfish:{},tamarindo:{},tarantula:{},topminnow:{},tulipwood:{},turquoise:{},twayblade:{},twinberry:{},wallpaper:{},whitebait:{},whiteface:{},wineberry:{},wolverine:{},workhorse:{},adulterant:{},amygdaloid:{},anopheline:{},aquamarine:{},belladonna:{},bellwether:{},bitterweed:{},blacksnake:{},blackthorn:{},bluebonnet:{},bluebottle:{},bottlenose:{},brachiopod:{},brazilwood:{},breadfruit:{},butterball:{},butterweed:{},candelilla:{},cantaloupe:{},catarrhine:{},cellulosic:{},chatterbox:{},chinaberry:{},cinquefoil:{},citronwood:{},clementine:{},condensate:{},copperhead:{},coralberry:{},cornflower:{},cottonweed:{},cottonwood:{},crossbreed:{},crustacean:{},deathwatch:{},demoiselle:{},dollarfish:{},elderberry:{},exhalation:{},feathertop:{},fetterbush:{},fiddlehead:{},flycatcher:{},fritillary:{},garambulla:{},goldenbush:{},gooseberry:{},grapefruit:{},jaboticaba:{},jackrabbit:{},ketembilla:{},kitembilla:{},lemongrass:{},littleneck:{},loganberry:{},loggerhead:{},mangosteen:{},marblewood:{},marguerite:{},massasauga:{},meerschaum:{},monoclonal:{},nasturtium:{},needlefish:{},nonstarter:{},ornamental:{},pacesetter:{},parenchyma:{},pennyroyal:{},pepperwort:{},plasmodium:{},princewood:{},propellant:{},propellent:{},pufferfish:{},pyrimidine:{},quercitron:{},restharrow:{},restrainer:{},ribbonfish:{},ribbonwood:{},rudderfish:{},sapphirine:{},scorzonera:{},sidewinder:{},silverbush:{},silverfish:{},silverweed:{},spiceberry:{},sticktight:{},sugarberry:{},superoxide:{},tarmacadam:{},turpentine:{},turtledove:{},velvetleaf:{},vertebrate:{},vesicatory:{},wandflower:{},watermelon:{},windowpane:{},witchgrass:{},yellowbird:{},yellowtail:{},yellowwood:{},adulterator:{},arthrospore:{},artiodactyl:{},bactericide:{},boysenberry:{},branchiopod:{},buffalofish:{},butcherbird:{},cauliflower:{},cherrystone:{},chittimwood:{},chokecherry:{},combustible:{},conspecific:{},digitigrade:{},dolphinfish:{},flameflower:{},gillyflower:{},groundberry:{},groundcover:{},heterocycle:{},honeyflower:{},insectivore:{},leatherleaf:{},leatherwood:{},lingonberry:{},liquidambar:{},loosestrife:{},muskellunge:{},plantigrade:{},platyrrhine:{},pomegranate:{},precipitant:{},prickleback:{},quicksilver:{},recombinant:{},refrigerant:{},shellflower:{},silversides:{},sleuthhound:{},swallowwort:{},unguiculate:{},waldmeister:{},archosaurian:{},distillation:{},heterocyclic:{},honeycreeper:{},instillation:{},invertebrate:{},nonsteroidal:{},placentation:{},sarsaparilla:{},serviceberry:{},squirrelfish:{},transudation:{},weatherboard:{},whortleberry:{},yellowhammer:{},branchiopodan:{},inflorescence:{},platyrrhinian:{},semiconductor:{},transactinide:{},vitrification:{},fructification:{},aa:{},ai:{},ani:{},auk:{},awn:{},bot:{},dak:{},daw:{},dew:{},doe:{},dug:{},eft:{},ern:{},ewe:{},gib:{},gnu:{},goo:{},ivy:{},jay:{},kea:{},kob:{},lac:{},lye:{},may:{},mei:{},moa:{},oca:{},ola:{},olm:{},pia:{},pug:{},teg:{},tup:{},acyl:{},agua:{},aloe:{},amyl:{},anoa:{},apar:{},aril:{},arui:{},atar:{},axil:{},barm:{},baya:{},bine:{},boll:{},bufo:{},buna:{},calx:{},cavy:{},chub:{},cleg:{},coco:{},colt:{},coot:{},corm:{},cows:{},craw:{},culm:{},cyme:{},dace:{},dalo:{},deer:{plural:"deer"},derv:{},dhak:{},dhal:{},dika:{},diol:{},disa:{},dita:{},dogy:{},doob:{},dopa:{},enol:{},erne:{},eyas:{},fern:{},fice:{},floc:{},fuji:{},gean:{},goby:{},guan:{},guar:{},guib:{},haem:{},halm:{},hart:{},heme:{},hogg:{},hops:{},hoya:{},ibex:{},ibis:{},inga:{},jird:{},jute:{},kali:{},kelp:{},kola:{},kudu:{},lily:{},lino:{},liza:{},loam:{},loir:{},lory:{},lynx:{},mako:{},mamo:{},mara:{},marl:{},merl:{},mica:{},milo:{},miro:{},mola:{},moss:{},munj:{},mutt:{},myna:{},nagi:{},napa:{},napu:{},neem:{},neon:{},olla:{},ombu:{},onyx:{},opah:{},opal:{},orca:{},oryx:{},paca:{},peat:{},peba:{},pika:{},pome:{},puku:{},puma:{},pupa:{},ragi:{},rimu:{},rudd:{},sago:{},salp:{},sang:{},sard:{},scut:{},sial:{},sika:{},sild:{},sima:{},skua:{},smew:{},sugi:{},tatu:{},teff:{},teju:{},tern:{},tipu:{},toad:{},tody:{},tolu:{},tuff:{},tung:{},urea:{},urus:{},vole:{},wasp:{},weka:{},blast:{},dinar:{},lapse:{},lurch:{},whirl:{},travel:{},capacity:{},encounter:{},conversion:{},separation:{},age:{},nip:{},now:{},halt:{},leap:{},mile:{},peak:{},peso:{},slam:{},term:{},wake:{},faint:{},scoop:{},surge:{},third:{},trick:{},bother:{},cackle:{},motion:{},chatter:{},reversal:{},elevation:{},experience:{},dab:{},pat:{},cube:{},howl:{},over:{},peep:{},span:{},cause:{},death:{},plump:{},plunk:{},poise:{},pulse:{},shame:{},spark:{},twang:{},wound:{},cipher:{},crunch:{},damage:{},fusion:{},period:{},racket:{},repeat:{},supply:{},wallow:{},wonder:{},dribble:{},failure:{},outrage:{},sparkle:{},backfire:{},campaign:{},delivery:{},increase:{},variance:{},explosion:{},correction:{},disturbance:{},translation:{},displacement:{},transposition:{},hum:{},mug:{},buzz:{},cord:{},dawn:{},fuss:{},hint:{},hiss:{},much:{},past:{},ping:{},rout:{},seek:{},tide:{},warp:{},birth:{},blend:{},crumb:{},delay:{},rupee:{},worst:{},climax:{},deluge:{},dirham:{},recoil:{},replay:{},rhythm:{},rising:{},descent:{},grumble:{},impulse:{},respite:{},scruple:{},triumph:{},addition:{},dogfight:{},eruption:{},occasion:{},progress:{},reprieve:{},shilling:{},stampede:{},accretion:{},induction:{},appearance:{},suggestion:{},circulation:{},irradiation:{},accommodation:{},precipitation:{},in:{},ebb:{},mil:{},zap:{},gush:{},honk:{},lull:{},plop:{},rave:{},ream:{},slap:{},then:{},zoom:{},fifth:{},final:{},gleam:{},reign:{},swash:{},throb:{},thump:{},tweet:{},wreck:{},wring:{},billow:{},breach:{},ending:{},fourth:{},gurgle:{},injury:{},nibble:{},parity:{},sunset:{},billion:{},history:{},instant:{},spatter:{},blackout:{},creation:{},decision:{},downhill:{},entrance:{},rational:{},trillion:{},hereafter:{},immersion:{},intrusion:{},millenary:{},remainder:{},saltation:{},adjustment:{},antecedent:{},dedication:{},deflection:{},impairment:{},limitation:{},outpouring:{},refinement:{},scattering:{},devastation:{},elaboration:{},fundamental:{},prohibition:{},retardation:{},interference:{},transmission:{},manifestation:{},scintillation:{},mi:{},kip:{},wee:{},yaw:{},bout:{},bray:{},doom:{},harm:{},haul:{},jolt:{},none:{},ooze:{},pity:{},sigh:{},surf:{},thaw:{},tour:{},alpha:{},carom:{},chunk:{},clink:{},colon:{},deuce:{},drama:{},glint:{},going:{},shtik:{},sixth:{},spurt:{},thrum:{},tinge:{},today:{},waltz:{},worth:{},bucket:{},egress:{},fathom:{},mutter:{},patter:{},picnic:{},quaver:{},ripple:{},rustle:{},shtick:{},sizzle:{},squawk:{},stride:{},tremor:{},whoosh:{},wobble:{},absence:{},allegro:{},andante:{},deficit:{},episode:{},heaving:{},raising:{},rebirth:{},roaring:{},rupture:{},screech:{},scrunch:{},seventh:{},success:{},sunrise:{},takeoff:{},trample:{},twinkle:{},cracking:{},deletion:{},incident:{},interval:{},isometry:{},overflow:{},rattling:{},skeleton:{},splatter:{},striking:{},twilight:{},upheaval:{},advantage:{},alignment:{},deflexion:{},diffusion:{},emergence:{},inflation:{},normality:{},remission:{},resultant:{},ruination:{},shakedown:{},vibration:{},yesterday:{},allegretto:{},conception:{},concoction:{},concretion:{},disruption:{},divergence:{},graduation:{},inflection:{},initiation:{},moderation:{},sprinkling:{},approaching:{},biquadratic:{},competition:{},compression:{},contraction:{},humiliation:{},permutation:{},constriction:{},ramification:{},accompaniment:{},embarrassment:{},mortification:{},rectification:{},coo:{},eve:{},gee:{},par:{},sea:{},sec:{},tot:{},won:{},yen:{},bash:{},beep:{},ding:{},dram:{},fete:{},gait:{},inch:{},lira:{},peal:{},pint:{},purr:{},rial:{},ting:{},toot:{},whiz:{},blare:{},bleat:{},brawl:{},cease:{},digit:{},dying:{},epoch:{},gravy:{},idyll:{},knell:{},metre:{},minim:{},ninth:{},plash:{},plonk:{},quake:{},quart:{},ravel:{},salvo:{},skirl:{},snore:{},spate:{},spirt:{},swish:{},tenth:{},unity:{},whack:{},whirr:{},years:{},ascent:{},bushel:{},curfew:{},drachm:{},eighth:{},enough:{},finale:{},fizzle:{},footer:{},gobble:{},jingle:{},marvel:{},myriad:{},octave:{},ravage:{},smudge:{},spritz:{},squeak:{},squeal:{},squish:{},swerve:{},tierce:{},usance:{},waxing:{},atrophy:{},banging:{},bending:{},blowout:{},centner:{},clangor:{},debacle:{},decimal:{},eclipse:{},glitter:{},kickoff:{},midterm:{},million:{},misfire:{},modulus:{},monsoon:{},ordinal:{},outflow:{},ringing:{},shimmer:{},sinking:{},smolder:{},torrent:{},twelfth:{},backwash:{},bouncing:{},downfall:{},dripping:{},drumbeat:{},eighties:{},eternity:{},exigency:{},footstep:{},furlough:{},gleaming:{},grinding:{},hardship:{},instance:{},invasion:{},majority:{},maturity:{},nineties:{},overtime:{},overture:{},pandemic:{},pounding:{},receding:{},recovery:{},rustling:{},scraping:{},sixtieth:{},smoulder:{},spoilage:{},spraying:{},tomorrow:{},touching:{},amplitude:{},ascension:{},athletics:{},avalanche:{},billionth:{},checkmate:{},clearance:{},collision:{},commotion:{},contagion:{},departure:{},fertility:{},formality:{},gestation:{},heartbeat:{},honeymoon:{},hundredth:{},interlude:{},irruption:{},lactation:{},millionth:{},multitude:{},onslaught:{},outgrowth:{},plurality:{},probation:{},pulsation:{},shrinkage:{},sixteenth:{},spreading:{},stalemate:{},throbbing:{},whistling:{},withering:{},affliction:{},alteration:{},betterment:{},dispersion:{},enervation:{},expiration:{},foreboding:{},incubation:{},incumbency:{},inevitable:{},irrational:{},jubilation:{},levitation:{},millennium:{plural:"millennia"},procession:{},repetition:{},revolution:{},sabbatical:{},solubility:{},subsidence:{},thousandth:{},undulation:{},visitation:{},accelerando:{},catastrophe:{},celebration:{},coincidence:{},consequence:{},continuance:{},deformation:{},dislocation:{},dissipation:{},expansivity:{},fluctuation:{},gravitation:{},oscillation:{},preliminary:{},punctuation:{},sufficiency:{},acceleration:{},augmentation:{},championship:{},commencement:{},conservation:{},deceleration:{},degeneration:{},encroachment:{},interlocking:{},reflectivity:{},consolidation:{},hundredweight:{},magnetisation:{},magnetization:{},regurgitation:{},sheepshearing:{},transmutation:{},conglomeration:{},materialisation:{},optic:{},patty:{},prune:{},saute:{},scalp:{},sinus:{},swill:{},bubbly:{},burgoo:{},choler:{},claret:{},cortex:{},crotch:{},drivel:{},frappe:{},hiatus:{},kosher:{},legume:{},macula:{},phlegm:{},pickle:{},stemma:{},thenar:{},tiptoe:{},adrenal:{},anatomy:{},confect:{},freckle:{},jugular:{},knuckle:{},mastoid:{},medulla:{},pudding:{},takeout:{},thyroid:{},tonsure:{},wassail:{},anterior:{},coloring:{},julienne:{},libation:{},rhomboid:{},sandwich:{},takeaway:{},appendage:{},chocolate:{},colouring:{},endocrine:{},hamstring:{},moonshine:{},permanent:{},recessive:{},turbinate:{},confection:{},hemisphere:{},ingredient:{},spatchcock:{},sweetening:{},convolution:{},pneumogastric:{},os:{},cos:{},cud:{},sup:{},caul:{},chaw:{},chin:{},chou:{},curd:{},cyst:{},fizz:{},jowl:{},mane:{},milt:{},perm:{},snot:{},sorb:{},sura:{},taco:{},booze:{},broth:{},caput:{},chili:{},cocoa:{},costa:{},cress:{},dough:{},eater:{},fanny:{},fondu:{},hyoid:{},loins:{},lolly:{},lumen:{},mamma:{},mummy:{},pasta:{},plasm:{},porgy:{},puree:{},quaff:{},quark:{},sinew:{},thigh:{},tripe:{},tummy:{},areola:{},banana:{},booger:{},bowleg:{},brunch:{},carpal:{},cervix:{},citrus:{},comfit:{},dactyl:{},dorsum:{},edible:{},flitch:{},fondue:{},fornix:{},gammon:{},herbal:{},lambda:{},malted:{},marcel:{},millet:{},monggo:{},noodle:{},paring:{},pastry:{},pelvis:{},simnel:{},spleen:{},tarsal:{},tensor:{},tipple:{},waffle:{},wonton:{},abdomen:{},adenoid:{},auricle:{},biscuit:{},brownie:{},clabber:{},criollo:{},croaker:{},cubitus:{},deltoid:{},dentine:{},dietary:{},eyeball:{},fistula:{},forearm:{},fritter:{},gherkin:{},haircut:{},headful:{},hyaloid:{},iceberg:{},isthmus:{},kneecap:{},lacteal:{},lasagna:{},lasagne:{},lozenge:{},marmite:{},midriff:{},oatmeal:{},ocellus:{},pageboy:{},paprika:{},pathway:{},pottage:{},prepuce:{},pumpkin:{},ramekin:{},ratafia:{},roulade:{},sausage:{},seltzer:{},serving:{},sidecar:{},slobber:{},sorghum:{},stirrup:{},sultana:{},teacake:{},timbale:{},toenail:{},topping:{},tostada:{},trachea:{},treacle:{},twister:{},vintage:{},abducent:{},abductor:{},afferent:{},alveolus:{},appendix:{plural:"appendices"},astragal:{},bicuspid:{},blowfish:{},blowhole:{},bouffant:{},capitate:{},chowchow:{},cobblers:{},cocktail:{},coquille:{},couscous:{},doughboy:{},doughnut:{},dumpling:{},efferent:{},eminence:{},exocrine:{},fascicle:{},flatfish:{},flatfoot:{},flummery:{},forehead:{},foreskin:{},hairline:{},honeydew:{},licorice:{},ligament:{},lollipop:{},macaroni:{},mackerel:{},marinade:{},membrane:{},monstera:{},mouthful:{},muscatel:{},pheasant:{},physique:{},potation:{},prostate:{},ramequin:{},receptor:{},sillabub:{},sinusoid:{},smoothie:{},specimen:{},streusel:{},stuffing:{},syllabub:{},teardrop:{},venation:{},windfall:{},abdominal:{},apparatus:{},blueberry:{},casserole:{},corpuscle:{},cranberry:{},demitasse:{},dentition:{},drinkable:{},drumstick:{},epiphysis:{},flageolet:{},fricassee:{},hamburger:{},labyrinth:{},lifeblood:{},lineament:{},liquorice:{},mastoidal:{},maxillary:{},navicular:{},pituitary:{},pompadour:{},provender:{},purulence:{},shellfish:{},spaghetti:{},spareribs:{},splayfoot:{},spoilable:{},sundowner:{},sweetener:{},trapezium:{},trapezoid:{},umbilical:{},ventricle:{},vestibule:{},zygomatic:{},applesauce:{},autoplasty:{},blackheart:{},breadstuff:{},cheesecake:{},comestible:{},gastronomy:{},hotchpotch:{},interstice:{},jawbreaker:{},kitambilla:{},maraschino:{},metacarpal:{},metatarsal:{},passageway:{},perishable:{},salmagundi:{},shortening:{},articulator:{},excrescence:{},grasshopper:{},griddlecake:{},intercostal:{},longanberry:{},nourishment:{},screwdriver:{},smorgasbord:{},spindlelegs:{},checkerberry:{},perspiration:{},spindleshanks:{},parasympathetic:{},ab:{},ade:{},ale:{},bap:{},bun:{},jak:{},lat:{},lox:{},pes:{},pie:{},poi:{},pud:{},pus:{},tum:{},vas:{},veg:{},anus:{},arak:{},axon:{},baba:{},bile:{},bleb:{},bleu:{},bock:{},bosc:{},choc:{},clit:{},cola:{},coxa:{},crus:{},cuke:{},duff:{},dura:{},edda:{},eggs:{},fist:{},flab:{},flan:{},fugu:{},genu:{},ghee:{},glia:{},grog:{},isaw:{},java:{},kava:{},marc:{},mayo:{},mead:{},miso:{},mons:{},naan:{},nape:{},nipa:{},oleo:{},orzo:{},ouzo:{},ovum:{},pecs:{},pita:{},pone:{},pons:{},porc:{},rete:{},rima:{},rind:{},roux:{},ruga:{},rusk:{},slaw:{},sops:{},suet:{},tofu:{},ugli:{},ulna:{},umbo:{},uvea:{},veal:{},veau:{},vena:{},vino:{},womb:{},ziti:{},zona:{},ackee:{},adobo:{},aioli:{},anjou:{},ankle:{},annon:{},aorta:{},arcus:{},aspic:{},atole:{},axone:{},babka:{},bacon:{},bagel:{},bialy:{},bigos:{},bitok:{},blanc:{},blini:{},bliny:{},boeuf:{},borsh:{},bowel:{},bursa:{},butty:{},cauda:{},cavum:{},cecum:{},celom:{},chips:{},chyle:{},cider:{},congo:{},copra:{},cornu:{},cuppa:{},cutis:{},cyder:{},cytol:{},decaf:{},donut:{},facia:{},femur:{},filum:{},flews:{},fovea:{},fries:{},gigot:{},gland:{},glans:{},gleet:{},glogg:{},glute:{},gonad:{},goody:{},grist:{},grits:{},gruel:{},gyrus:{},hilus:{},hoagy:{},hooch:{},hooks:{},hymen:{},hyson:{},ileum:{},ilium:{},incus:{},inion:{},jello:{},julep:{},kabob:{},kasha:{},kebab:{},knish:{},kumis:{},kvass:{},lansa:{},latke:{},latte:{},lichi:{},limpa:{},lymph:{},macon:{},manus:{},matzo:{},mucus:{},nacho:{},naris:{},nates:{},negus:{},offal:{},ootid:{},pekoe:{},penis:{},penne:{},perry:{},pesto:{},pilaf:{},pinky:{},pizza:{},plica:{},porta:{},pruno:{},psoas:{},pubis:{},quiff:{},raita:{},ramus:{},raphe:{},salmi:{},salsa:{},savoy:{},sebum:{},serum:{},sirup:{},skull:{},sperm:{},steak:{},sudor:{},sushi:{},taffy:{},tamal:{},tater:{},teeth:{},teres:{},tibia:{},titty:{},toddy:{},toffy:{},torso:{},torte:{},tress:{},uvula:{},vagus:{},viand:{},vodka:{},vomer:{},vulva:{},wrist:{},adnexa:{},afters:{},agnail:{},ananas:{},anlage:{},annexa:{},annona:{},antrum:{},armpit:{},arrack:{},axilla:{},baguet:{},beigel:{},biceps:{},bisque:{},blintz:{},bonbon:{},borsch:{},brazil:{},bregma:{},bulgur:{},burger:{},cachou:{},caecum:{},canape:{},canola:{},cardia:{},carina:{},carpus:{},casaba:{},catsup:{},caviar:{},chevre:{},chiasm:{},chilli:{},choana:{},coccyx:{},coelom:{},comedo:{},concha:{},confit:{},congou:{},corium:{},corpse:{},cupper:{},cuspid:{},cutlet:{},damson:{},danish:{},dermis:{},dewlap:{},dolmas:{},eclair:{},eggnog:{},eschar:{},eyelid:{},farina:{},fauces:{},fibula:{},finnan:{},flexor:{},fundus:{},gateau:{},geneva:{},giblet:{},glossa:{},gluten:{},goatee:{},gobbet:{},gonion:{},goober:{},graham:{},grappa:{},groats:{},gulyas:{},haggis:{},hairdo:{},hallah:{},hallux:{},hamate:{},haslet:{},hoagie:{},hominy:{},hommos:{},hootch:{},hotpot:{},huitre:{},hummus:{},inguen:{},intima:{},jambon:{},jugale:{},jumbal:{},karyon:{},kencur:{},kidney:{},kipper:{},kirsch:{},kishke:{},korlan:{},kummel:{},labium:{},lamina:{},lanseh:{},lanugo:{},larynx:{},lekvar:{},limbus:{},lingua:{},lobule:{},lochia:{},locule:{},lunule:{},matzoh:{},meatus:{},meninx:{},milium:{},mohawk:{},mouton:{},mucosa:{},muesli:{},muffin:{},murphy:{},mutton:{},nasion:{},nervus:{},neuron:{},nougat:{},oculus:{},omelet:{},onyxis:{},oocyte:{},oolong:{},operon:{},organs:{},paczki:{},paella:{},palate:{},paries:{},pastis:{},paunch:{},pectus:{},phyllo:{},pilaff:{},pinkie:{},pinole:{},pirogi:{},pleura:{},plexus:{},pollex:{},polony:{},posset:{},potage:{},poteen:{},potion:{},potpie:{},poulet:{},premix:{},pulque:{},purloo:{},quiche:{},rectum:{},rectus:{},repast:{},retina:{},rhaphe:{},ribier:{},rickey:{},rotgut:{},sacrum:{},salami:{},saliva:{},samosa:{},sapota:{},scampi:{},scampo:{},sclera:{},scruff:{},seckel:{},serosa:{},shandy:{},sherry:{},silage:{},skilly:{},smegma:{},soleus:{},sorbet:{},sputum:{},stapes:{},stodge:{},succus:{},sulcus:{},sundae:{},sutura:{},tahini:{},tamale:{},tarsus:{},tendon:{},testis:{},thymus:{},tidbit:{},tiffin:{},tisane:{},titbit:{},toffee:{},tonsil:{},tragus:{},troche:{},tubule:{},tunica:{},unguis:{},ureter:{},uterus:{},vagina:{},veggie:{},venula:{},venule:{},vermis:{},vesica:{},viscus:{},vitals:{},waters:{},whisky:{},wiener:{},yogurt:{},zaatar:{},zonula:{},zonule:{},zygoma:{},zygote:{},absinth:{},akvavit:{},aniseed:{},aquavit:{},arteria:{},ashcake:{},baklava:{},bannock:{},beignet:{},keen:{},rage:{},wish:{},aside:{},chafe:{},gloss:{},tense:{},whole:{},worry:{},effect:{},reject:{},riddle:{},snatch:{},speech:{},closure:{},collect:{},romance:{},flourish:{},classical:{},influence:{},substance:{},reflection:{},inclination:{},recognition:{},dot:{},nod:{},blur:{},itch:{},slur:{},solo:{},wink:{},abuse:{},acute:{},alert:{},angle:{},bluff:{},cheer:{},honor:{},humor:{},lyric:{},snarl:{},tally:{},accent:{},degree:{},detail:{},indent:{},matter:{},patent:{},rubric:{},thrill:{},abandon:{},bluster:{},concern:{},concord:{},formula:{plural:"formulae"},imprint:{},nominal:{},quality:{},reading:{},sputter:{},torture:{},wrinkle:{},contrast:{},estimate:{},harmonic:{},judgment:{},reaction:{},sanction:{},singular:{},straddle:{},construct:{},judgement:{},reflexion:{},rendering:{},universal:{},acceptance:{},discipline:{},irritation:{},regulation:{},relaxation:{},submission:{},application:{},replication:{},construction:{},introduction:{},presentation:{},cant:{},code:{},joke:{},pain:{},stab:{},trot:{},will:{},blame:{},brief:{},dodge:{},fancy:{},glide:{},grasp:{},guess:{},quote:{},scent:{},slant:{},snort:{},swoop:{},theme:{},trial:{},vocal:{},accord:{},affect:{},cancel:{},debate:{},desire:{},heroic:{},murmur:{},phrase:{},resume:{},scream:{},serial:{},tangle:{},closing:{},dissent:{},drawing:{},example:{},exhibit:{},fatigue:{},feeling:{},mention:{},partial:{},posture:{},protest:{},regress:{},telling:{},welcome:{},absolute:{},analysis:{plural:"analyses"},distress:{},pastoral:{},platform:{},temporal:{},agreement:{},attention:{},beginning:{},closeness:{},connexion:{},dimension:{},discourse:{},lightness:{},principle:{},surrender:{},assignment:{},coordinate:{},involution:{},abstraction:{},arrangement:{},conjunction:{},declaration:{},penetration:{},proposition:{},realisation:{},realization:{},condensation:{},consideration:{},no:{},cue:{},fun:{},rub:{},bias:{},gift:{},hoot:{},jazz:{},oral:{},snub:{},text:{},tune:{},urge:{},coast:{},craze:{},daily:{},debut:{},dowse:{},funny:{},logic:{},mercy:{},peace:{},rerun:{},samba:{},slang:{},taboo:{},verse:{},whine:{},words:{},aspect:{},babble:{},canker:{},choice:{},clamor:{},denial:{},device:{},esteem:{},format:{},lament:{},manual:{},menace:{},normal:{},pardon:{},regret:{},skinny:{},sorrow:{},tickle:{},twinge:{},vision:{},warmth:{},caution:{},charter:{},conceit:{},cunning:{},delight:{},dictate:{},discord:{},finance:{},harmony:{},keynote:{},knowing:{},leaning:{},lecture:{},mistake:{},musical:{},offense:{},palaver:{},preempt:{},purpose:{},pyrrhic:{},realism:{},sharing:{},texture:{},worship:{},writing:{},aspirate:{},biweekly:{},blessing:{},citation:{},despatch:{},dullness:{},feminine:{},flatness:{},geminate:{},manifest:{},personal:{},pleasure:{},politics:{},singsong:{},yielding:{},agitation:{},attrition:{},bimonthly:{},broadcast:{},confusion:{},deviation:{},disregard:{},education:{},faintness:{},heaviness:{},imitation:{},indenture:{},interview:{},isolation:{},isometric:{},minuscule:{},portrayal:{},predicate:{},provision:{},screaming:{},signature:{},spiritual:{},throwaway:{},tightness:{},accounting:{},aggression:{},assumption:{},attraction:{},commercial:{},compromise:{},confession:{},confidence:{},conformity:{},conveyance:{},detachment:{},difference:{},discretion:{},imperative:{},mellowness:{},modulation:{},tenderness:{},uneasiness:{},awkwardness:{},discernment:{},elimination:{},endorsement:{},examination:{},fabrication:{},familiarity:{},implication:{},indorsement:{},involvement:{},observation:{},obstruction:{},performance:{},requisition:{},sensitivity:{},testimonial:{},appreciation:{},articulation:{},condemnation:{},confirmation:{},deliberation:{},intervention:{},satisfaction:{},confrontation:{},decomposition:{},determination:{},reinforcement:{},understanding:{},characteristic:{},correspondence:{},sophistication:{},transformation:{},rationalisation:{},rationalization:{},dub:{},fog:{},bold:{},buoy:{},dare:{},daze:{},envy:{},gape:{},okay:{},plus:{},rasp:{},rime:{},role:{},tabu:{},yell:{},above:{},affix:{},agape:{},chord:{},croak:{},doubt:{},email:{},essay:{},folly:{},idiom:{},laugh:{},modal:{},panic:{},posit:{},rhyme:{},rider:{},rumba:{},scare:{},scorn:{},sneer:{},trill:{},truth:{},wince:{},adagio:{},binary:{},daring:{},defeat:{},dismay:{},docket:{},filing:{},flavor:{},giving:{},gospel:{},lesson:{},median:{},neuter:{},notion:{},parody:{},parole:{},plight:{},rebuff:{},rhumba:{},sample:{},shiver:{},solace:{},trance:{},unseen:{},vanity:{},vector:{},amnesty:{},anguish:{},arousal:{},bucolic:{},caption:{},catalog:{},contour:{},descant:{},disdain:{},dispute:{},fantasy:{},flavour:{},glimpse:{},insight:{},languor:{},licence:{},marking:{},overbid:{},prelude:{},probate:{},purport:{},pursuit:{},reality:{},receipt:{},recital:{},riposte:{},splurge:{},sticker:{},summons:{},wrangle:{},approval:{},buoyancy:{},converse:{},coolness:{},covenant:{},crotchet:{},devotion:{},dialogue:{},emphasis:{},esthetic:{},excision:{},fairness:{},fixation:{},forecast:{},hieratic:{},identity:{},illusion:{},integral:{},monotone:{},offering:{},paradigm:{},premiere:{},printing:{},referent:{},rescript:{},research:{},rhetoric:{},schedule:{},skimming:{},sleeping:{},speaking:{},splutter:{},streamer:{},tendency:{},topology:{},vexation:{},wildness:{},adjective:{},aesthetic:{},assurance:{},burlesque:{},catalogue:{},correlate:{},detection:{},discovery:{},dismissal:{},exclusion:{},exclusive:{},expansion:{},impromptu:{},inaugural:{},indicator:{},intensive:{},interdict:{},largeness:{},masculine:{},paragraph:{},partitive:{},pragmatic:{},prevision:{},quarterly:{},quotation:{},readiness:{},rendition:{},reverence:{},roundness:{},safeguard:{},suspicion:{},sweetness:{},thickness:{},trademark:{},antagonism:{},aspiration:{},bitterness:{},coarseness:{},collection:{},conjecture:{},deposition:{},estimation:{},excitement:{},gloominess:{},impossible:{},incitement:{},invocation:{},inwardness:{},literature:{},morphology:{},narrowness:{},nominative:{},observance:{},possessive:{},postmortem:{},preemption:{},preference:{},profession:{},profundity:{},recitation:{},redundancy:{},abnormality:{},acquisition:{},affirmation:{},affirmative:{},alternative:{},bombardment:{},commutation:{},concurrence:{},convergence:{},countenance:{},disposition:{},distinction:{},distraction:{},enlargement:{},expectation:{},fingerprint:{},indentation:{},instruction:{},nationalism:{},possibility:{},presumption:{},publication:{},spectacular:{},speculation:{},substantive:{},superlative:{},unconscious:{},unitisation:{},unitization:{},anticipation:{},apprehension:{},circumstance:{},continuation:{},coordination:{},countercheck:{},distribution:{},hieroglyphic:{},illustration:{},intimidation:{},misdirection:{},overestimate:{},precondition:{},renunciation:{},approximation:{},authorisation:{},authorization:{},certification:{},falsification:{},interrogative:{},nonconformity:{},reduplication:{},sensitiveness:{},sequestration:{},superposition:{},underestimate:{},capitalisation:{},capitalization:{},generalisation:{},generalization:{},perceptiveness:{},recapitulation:{},sensationalism:{},awe:{},bop:{},ego:{},hex:{},jot:{},lit:{},nub:{},vow:{},beta:{},brag:{},clue:{},cull:{},elan:{},epic:{},funk:{},fury:{},gibe:{},hymn:{},jibe:{},leer:{},lust:{},mood:{},oath:{},pang:{},plea:{},quip:{},rant:{},riff:{},visa:{},zeal:{},zest:{},alibi:{},badge:{},basis:{plural:"bases"},bravo:{},carol:{},chant:{},chaos:{},conga:{},delta:{},demur:{},dread:{},fable:{},flair:{},fugue:{},given:{},gloat:{},gloom:{},hunch:{},infix:{},irony:{},largo:{},least:{},libel:{},magic:{},moral:{},polka:{},reply:{},sally:{},spiel:{},spook:{},stymy:{},tango:{},usage:{},velar:{},vigil:{},whoop:{},affair:{},airing:{},ardour:{},ballot:{},bathos:{},beauty:{},bellow:{},bowing:{},curtsy:{},deceit:{},dental:{},dialog:{},gambit:{},gibber:{},grudge:{},halloo:{},insult:{},intent:{},italic:{},kowtow:{},labial:{},latest:{},manner:{},mumble:{},naming:{},outcry:{},pathos:{},piffle:{},plural:{},policy:{},praise:{},raving:{},rehash:{},revise:{},scalar:{},scroll:{},seeing:{},shriek:{},sonnet:{},stymie:{},tattle:{},theory:{},tingle:{},tumult:{},upbeat:{},urging:{},wangle:{},weekly:{},wheeze:{},yearly:{},acclaim:{},acidity:{},airmail:{},analogy:{},apology:{},barrage:{},barrier:{},bidding:{},bonding:{},buildup:{},cadence:{},cartoon:{},censure:{},clutter:{},concert:{},cruelty:{},despair:{},disgust:{},dodging:{},earmark:{},embargo:{},enquiry:{},erasure:{},eristic:{},fluency:{},gradual:{},gravity:{},initial:{},inquiry:{},lingual:{},loyalty:{},mastery:{},mimesis:{},monthly:{},numeral:{},omnibus:{},outlook:{},palatal:{},placard:{},polemic:{},posting:{},presage:{},preview:{},quibble:{},refrain:{},reissue:{},reorder:{},reprint:{},rewrite:{},roundup:{},singing:{},slander:{},sorting:{},tasting:{},tribute:{},turmoil:{},whisper:{},ablative:{},acridity:{},allegory:{},alveolar:{},ambition:{},ascender:{},audition:{},binomial:{},brandish:{},brooding:{},bundling:{},calculus:{},circular:{},clipping:{},coldness:{},courtesy:{},critique:{},daydream:{},defiance:{},delusion:{},demurrer:{},disfavor:{},disquiet:{},dynamism:{},easiness:{},equation:{},fondness:{},grasping:{},grouping:{},guidance:{},guttural:{},hornpipe:{},hysteria:{},idealism:{},intimacy:{},mistrust:{},monition:{},negation:{},nickname:{},nihilism:{},notation:{},ordinate:{},outburst:{},particle:{},passport:{},pedagogy:{},petition:{},phantasy:{},planning:{},playbook:{},proposal:{},revision:{},rhapsody:{},ridicule:{},sampling:{},serenade:{},slowness:{},sourness:{},subtitle:{},suspense:{},sympathy:{},tartness:{},teaching:{},theology:{},travesty:{},universe:{},acuteness:{},addiction:{},adoration:{},attending:{},autograph:{},constancy:{},crispness:{},cuneiform:{},deception:{},defensive:{},denseness:{},dialectic:{},dictation:{},digestion:{},diplomacy:{},disfavour:{},editorial:{},emulation:{},enactment:{},evocation:{},fecundity:{},footprint:{},formalism:{},formative:{},gradation:{},grievance:{},grumbling:{},guideline:{},immediacy:{},insurance:{},intention:{},intercept:{},invariant:{},itinerary:{},lassitude:{},majuscule:{},misgiving:{},monologue:{},morbidity:{},murmuring:{},narration:{},nutrition:{},ordinance:{},oversight:{},pictorial:{},pizzicato:{},prejudice:{},quadratic:{},quickness:{},quickstep:{},reckoning:{},reflexive:{},rejoicing:{},repulsion:{},retention:{},retrieval:{},revealing:{},saltiness:{},schooling:{},sentience:{},sulkiness:{},synthesis:{},testament:{},testimony:{},underline:{},undertone:{},accidental:{},accusative:{},adaptation:{},admiration:{},affixation:{},allurement:{},anatomical:{},antiphonal:{},asceticism:{},belittling:{},brightness:{},brilliance:{},chronology:{},classified:{},cleverness:{},clumsiness:{},cognizance:{},compliment:{},concession:{},conscience:{},conspiracy:{},contention:{},continuity:{},decoration:{},determiner:{},deterrence:{},digression:{},diminution:{},discontent:{},dissection:{},dissonance:{},divination:{},empiricism:{},enthusiasm:{},enticement:{},equivalent:{},execration:{},fortissimo:{},grogginess:{},hesitation:{},humbleness:{},hypostasis:{},hypothesis:{plural:"hypotheses"},impatience:{},infliction:{},insistence:{},instalment:{},intermezzo:{},jocularity:{},loneliness:{},neutrality:{},nomination:{},oppression:{},perfection:{},pestilence:{},philosophy:{},precaution:{},pretension:{},propensity:{},refutation:{},reputation:{},revelation:{},rumination:{},salutation:{},semiweekly:{},stigmatism:{},theatrical:{},triviality:{},underscore:{},unfairness:{},vernacular:{},vocabulary:{},whispering:{},acceptation:{},advancement:{},aggravation:{},appellative:{},benevolence:{},calculation:{},comparative:{},concordance:{},conjunctive:{},conjuration:{},correlation:{},correlative:{},countersign:{},denigration:{},designation:{},discourtesy:{},documentary:{},electricity:{},enchantment:{},engrossment:{},exclamation:{},explanation:{},exploration:{},foolishness:{},frustration:{},imperialism:{},infatuation:{},inscription:{},jactitation:{},obfuscation:{},outwardness:{},peculiarity:{},playfulness:{},presentment:{},propagation:{},provocation:{},rationalism:{},regionalism:{},repudiation:{},resignation:{},rotogravure:{},semimonthly:{},sensibility:{},seriousness:{},stipulation:{},strangeness:{},subcontract:{},supposition:{},syncopation:{},titillation:{},tranquility:{},unorthodoxy:{},unsoundness:{},valedictory:{},breakthrough:{},choreography:{},conciliation:{},constitution:{},consultation:{},counterpoint:{},covetousness:{},depreciation:{},faultfinding:{},heedlessness:{},helplessness:{},idealisation:{},idealization:{},impertinence:{},intoxication:{},irritability:{},mercifulness:{},notification:{},pacification:{},processional:{},promulgation:{},proportional:{},recollection:{},retroflexion:{},retroversion:{},significance:{},solicitation:{},spiritualism:{},stupefaction:{},supplication:{},transference:{},acculturation:{},attentiveness:{},communication:{},comprehensive:{},condescension:{},contradiction:{},demonstrative:{},determinative:{},documentation:{},hallucination:{},impersonation:{},individualism:{},interpolation:{},orchestration:{},preoccupation:{},prevarication:{},qualification:{},retentiveness:{},retroflection:{},structuralism:{},symbolisation:{},symbolization:{},versification:{},aggressiveness:{},categorisation:{},demoralisation:{},demoralization:{},farsightedness:{},predisposition:{},recommendation:{},reconstruction:{},sesquipedalian:{},simplification:{},traditionalism:{},conventionality:{},crystallization:{},personification:{},prognostication:{},characterization:{},predetermination:{},pi:{},xi:{},boo:{},bye:{},dit:{},fib:{},ire:{},ken:{},nay:{},pic:{},psi:{},pun:{},wai:{},woe:{},yea:{},blip:{},blog:{},deed:{},demo:{},epos:{},gist:{},grin:{},heed:{},idyl:{},iota:{},jive:{},moan:{},muse:{},norm:{},noun:{},nous:{},odor:{},pean:{},ploy:{},pomp:{},quiz:{},sass:{},sext:{},spam:{},sulk:{},surd:{},tale:{},trig:{},vlog:{},whim:{},yack:{},yoga:{},agony:{},alias:{},aroma:{},axiom:{},bebop:{},blues:{},bonus:{},canto:{},codex:{},creed:{},ditto:{},dogma:{},drawl:{},edict:{},ethic:{},facet:{},fever:{},frown:{},gamma:{},gamut:{},grief:{},groan:{},guilt:{},intro:{},kotow:{},macro:{},odour:{},omega:{},paean:{},pavan:{},peeve:{},prate:{},primo:{},prose:{},psalm:{},qualm:{},retro:{},rumor:{},savvy:{},scowl:{},shrug:{},skill:{},smirk:{},danger:{},push:{},refusal:{},tooling:{},trelvox:{}},verbs:{import:{},call:{},test:{},contain:{},extend:{},use:{},depend:{prep:"on"},rely:{prep:"on"},inherit:{prep:"from"},belong:{prep:"to"},point:{prep:"to"},implement:{},override:{},export:{},define:{},declare:{},reference:{},invoke:{},wrap:{},mock:{},cover:{},document:{},describe:{},modify:{},touch:{},fix:{},break:{},introduce:{},deprecate:{},replace:{},own:{},maintain:{},review:{},merge:{},revert:{},deploy:{},run:{},execute:{},load:{},parse:{},emit:{},validate:{},log:{},throw:{},catch:{},create:{},delete:{},update:{},expose:{},consume:{},produce:{},generate:{},configure:{},install:{},publish:{},release:{},ship:{},watch:{},trigger:{},build:{},write:{},read:{},have:{},like:{},want:{},need:{},believe:{},trust:{},love:{},hate:{},fear:{},hope:{},teach:{},learn:{},drive:{},cook:{},sing:{},visit:{},care:{},grow:{},marry:{},wear:{},eat:{},sleep:{},walk:{},buy:{},sell:{},give:{},take:{},meet:{},ride:{},speak:{},duck:{}},adjectives:{legacy:{type:"subclass"},mock:{type:"subclass"},senior:{type:"subclass"},internal:{type:"subclass"},external:{type:"subclass"},public:{type:"subclass"},private:{type:"subclass"},abstract:{type:"subclass"},static:{type:"subclass"},async:{type:"subclass"},experimental:{type:"subclass"},stable:{type:"subclass"},core:{type:"subclass"},shared:{type:"subclass"},global:{type:"subclass"},local:{type:"subclass"},generated:{type:"subclass"},standalone:{type:"subclass"},primary:{type:"subclass"},secondary:{type:"subclass"},deprecated:{type:"data"},fast:{type:"data"},slow:{type:"data"},large:{type:"data"},small:{type:"data"},flaky:{type:"data"},tested:{type:"data"},documented:{type:"data"},buggy:{type:"data"},broken:{type:"data"},green:{type:"data"},deterministic:{type:"data"},pure:{type:"data"},empty:{type:"data"},stale:{type:"data"},male:{type:"data"},female:{type:"data"},young:{type:"data"},old:{type:"data"},hot:{type:"data"},cold:{type:"data"},sweet:{type:"data"},salty:{type:"data"},sharp:{type:"data"},round:{type:"data"},tall:{type:"data"},short:{type:"data"},happy:{type:"data"},sad:{type:"data"},angry:{type:"data"},afraid:{type:"data"},strong:{type:"data"},weak:{type:"data"},rich:{type:"data"},poor:{type:"data"},hard:{type:"data"},soft:{type:"data"},wild:{type:"data"},gentle:{type:"data"},colorful:{type:"data"},legitimate:{type:"data"},ranked:{type:"data"},related:{type:"data"},sacred:{type:"data"},unaffected:{type:"data"}},properNames:["tmct","Node","npm","JavaScript","TypeScript","Python","Java","Git","GitHub","GitLab","ESLint","Linux","macOS","Windows","Polycode","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]}});function ER(e){let t=String(e),n=[t];return t.length>4&&/[a-z]ies$/.test(t)&&n.push(`${t.slice(0,-3)}y`),/(ses|xes|zes|ches|shes)$/.test(t)&&n.push(t.slice(0,-2)),/[a-z]s$/.test(t)&&!/ss$/.test(t)&&n.push(t.slice(0,-1)),t==="has"&&n.push("have"),n}function zb(e,t={}){for(let[n,s]of Object.entries(t.nouns||{})){let o={lemma:n,...s||{}};if(o.property&&!SR.has(o.property))throw new Error(`lexicon noun "${n}": property must be "data" or "object", got ${JSON.stringify(o.property)}`);e.nouns.set(n,o),o.plural&&e.nounPlurals.set(o.plural,n)}for(let[n,s]of Object.entries(t.verbs||{}))e.verbs.set(n,{lemma:n,...s||{}});for(let[n,s]of Object.entries(t.adjectives||{})){let o={lemma:n,...s||{}};if(!kR.has(o.type))throw new Error(`lexicon adjective "${n}": type must be "subclass" or "data", got ${JSON.stringify(o.type)}`);e.adjectives.set(n,o)}for(let n of t.properNames||[])e.properNames.set(String(n).toLowerCase(),String(n))}function Ts(e,t=vR){if(!e&&zu.has(t))return zu.get(t);let n=Db,s={nouns:new Map,nounPlurals:new Map,verbs:new Map,adjectives:new Map,properNames:new Map,ns:t};return zb(s,n),e?(zb(s,e),s):(zu.set(t,s),s)}function ti(e,t,n={}){return jR(e,t,n)[0]??null}function jR(e,t,n={}){let s=String(t??"").toLowerCase(),o=e.nouns.get(s),r=e.nounPlurals.get(s),i=[],a=new Set,l=c=>{c&&!a.has(c.lemma)&&(a.add(c.lemma),i.push(c))};if(r){let c=e.nouns.get(r)??null;return n.singularOnly&&o?(l(o),l(c)):(l(c),l(o)),i}for(let c of ER(s))l(e.nouns.get(c));return i}var vR,AM,CM,$R,xR,OM,SR,kR,zu,ro=I(()=>{Fb();vR="tmct:",AM=Object.freeze({every:"universal",a:"indefinite",an:"indefinite",the:"definite",no:"negative"}),CM=Object.freeze({"at least":"owl:minCardinality","at most":"owl:maxCardinality",exactly:"owl:cardinality"}),$R=Object.freeze(new Set(["type","kind","sort","form","class","variety","species","breed","genus"])),xR=Object.freeze(new Set(["body","mass","group","collection","set","series","number","amount","piece","part","lot","pair","bunch","pile"])),OM=Object.freeze({one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10});SR=new Set(["data","object"]),kR=new Set(["subclass","data"]);zu=new Map});var PM,MM,FM,_R,DM,zM,BM,Bb=I(()=>{ws();Ie();PM=Object.freeze({class:"Class",module:"Module",function:"Function",method:"Method",attribute:"Attribute",variable:"GlobalVariable",constant:"GlobalVariable",commit:"Commit"}),MM=Object.freeze({Class:["class","classes"],Module:["module","modules"],Function:["function","functions"],Method:["method","methods"],Attribute:["attribute","attributes"],GlobalVariable:["variable","variables"],Commit:["commit","commits"]}),FM=Object.freeze({Class:[e=>`which classes inherit from ${e}`,e=>`what does ${e} contain`,e=>`where is ${e} defined`],Module:[e=>`what does ${e} import`,e=>`which modules import ${e}`,e=>`where is ${e} defined`],Function:[e=>`what calls ${e}`,e=>`what does ${e} call`,e=>`where is ${e} defined`],Method:[e=>`which class contains ${e}`,e=>`what calls ${e}`,e=>`where is ${e} defined`],Attribute:[e=>`which class contains ${e}`,e=>`where is ${e} defined`],GlobalVariable:[e=>`where is ${e} defined`,e=>`where is ${e} mentioned`],Commit:[e=>`what did commit ${e} touch`,e=>`when did ${e} change`]}),_R=Object.freeze({import:"imports",imports:"imports",importing:"imports",imported:"imports",call:"calls",calls:"calls",calling:"calls",called:"calls",invoke:"calls",invokes:"calls",invoking:"calls",contain:"contains",contains:"contains",containing:"contains",containment:"contains",member:"contains",members:"contains",inherit:"inherits",inherits:"inherits",inheriting:"inherits",inheritance:"inherits",extend:"inherits",extends:"inherits",extending:"inherits",subclass:"inherits",subclasses:"inherits",subclassing:"inherits",test:"tests",tests:"tests",testing:"tests",tested:"tests",coverage:"tests",define:"defines",defines:"defines",defining:"defines",defined:"defines",definition:"defines",definitions:"defines",declaration:"defines",touch:"touches",touches:"touches",touching:"touches",touched:"touches",cochange:"cochange","co-change":"cochange","change-coupling":"cochange",coupled:"cochange",export:"reexports",exports:"reexports",exporting:"reexports",exported:"reexports",reexport:"reexports",reexports:"reexports",reexporting:"reexports","re-export":"reexports","re-exports":"reexports","re-exporting":"reexports",serve:"serves",serves:"serves",serving:"serves",served:"serves",denote:"denotes",denotes:"denotes",denoting:"denotes",denoted:"denotes"}),DM=Object.freeze({imports:["imports"],calls:["calls","callsSymbol"],contains:["contains"],inherits:["inherits"],tests:["tests"],defines:["defines"],touches:["touches","touchesSymbol"],cochange:["cochange"],reexports:["reexports"],serves:["serves"],denotes:["denotes"]}),zM=Object.freeze({imports:{verb:"imports",edgeNoun:"import"},calls:{verb:"calls",edgeNoun:"call"},contains:{verb:"contains",edgeNoun:"containment"},inherits:{verb:"inherits from",edgeNoun:"inheritance"},tests:{verb:"tests",edgeNoun:"test"},defines:{verb:"defines",edgeNoun:"definition"},touches:{verb:"touches",edgeNoun:"touch"},cochange:{verb:"changes together with",edgeNoun:"change-coupling"},reexports:{verb:"re-exports",edgeNoun:"re-export"},serves:{verb:"serves",edgeNoun:"service"},denotes:{verb:"denotes",edgeNoun:"denotation"}}),BM=Object.freeze({imports:[{side:"obj",make:e=>`which modules import ${e}`},{side:"subj",make:e=>`what does ${e} import`}],calls:[{side:"obj",make:e=>`what calls ${e}`},{side:"subj",make:e=>`what does ${e} call`}],contains:[{side:"subj",make:e=>`what does ${e} contain`},{side:"obj",make:e=>`which class contains ${e}`}],inherits:[{side:"obj",make:e=>`which classes inherit from ${e}`},{side:"subj",make:e=>`where is ${e} defined`}],tests:[{side:"obj",make:e=>`what tests ${e}`},{side:"obj",make:e=>`where is ${e} defined`}],defines:[{side:"obj",make:e=>`where is ${e} defined`},{side:"subj",make:e=>`what does ${e} contain`}],touches:[{side:"obj",make:e=>`when did ${e} change`},{side:"subj",make:e=>`what did commit ${e} touch`}],cochange:[{side:"obj",make:e=>`where is ${e} defined`},{side:"subj",make:e=>`which modules import ${e}`}],reexports:[{side:"subj",make:e=>`what does ${e} export`},{side:"obj",make:e=>`where is ${e} defined`}],serves:[{side:"subj",make:e=>`what does ${e} serve`},{side:"obj",make:e=>`what serves ${e}`}],denotes:[{side:"subj",make:e=>`what does ${e} denote`},{side:"obj",make:e=>`what denotes ${e}`}]})});var Aa=I(()=>{en();ro();Bb()});var Ca,Oa=I(()=>{Ca=()=>{throw new Error("gunzipSync unavailable in a browser bundle")}});var TR,eF,Ub=I(()=>{oo();Oa();Rs();Be();Aa();TR={},eF=Q($e(Vt(TR.url)),"..","..","..")});var Wb=I(()=>{en();ro();Aa()});var AR,CR,pF,Bu=I(()=>{en();ro();Ao();AR=Object.freeze({fanoutLimit:5,maxDepth:1,maxTopics:12,minIntervalMs:2e3}),CR=["this","is","about","the"],pF=CR.length});var Gb=I(()=>{jt();Be()});var Uu=I(()=>{en()});var OR,_F,Hb=I(()=>{oo();Oa();Rs();Be();Uu();en();OR={},_F=Q($e(Vt(OR.url)),"..","..","..")});var TF,AF,CF,Vb=I(()=>{TF=Object.freeze(["task","autoFeedback","alloFeedback","turnManagement","timeManagement","discourseStructuring","ownCommunicationManagement","partnerCommunicationManagement","socialObligationsManagement","contactManagement"]),AF=Object.freeze({propositionalQuestion:Object.freeze({dimension:"task",gloss:"a yes/no question about whether a proposition holds ('does X import Y?')"}),checkQuestion:Object.freeze({dimension:"task",gloss:"a yes/no question whose asker already expects the answer yes ('..., right?')"}),setQuestion:Object.freeze({dimension:"task",gloss:"a wh-question asking for the members of a set ('what does X import?')"}),choiceQuestion:Object.freeze({dimension:"task",gloss:"a question asking which of the listed alternatives holds ('is X a module or a class?')"}),inform:Object.freeze({dimension:"task",gloss:"a declarative telling the addressee something (a teach turn; also tmct explaining its own function)"}),answer:Object.freeze({dimension:"task",gloss:"an inform that discharges a question just asked (an answer grounded in the graph)"}),confirm:Object.freeze({dimension:"task",gloss:"an answer 'yes' to a check question"}),disconfirm:Object.freeze({dimension:"task",gloss:"an answer 'no' to a check question"}),agreement:Object.freeze({dimension:"task",gloss:"an inform stating that the speaker holds what the addressee just stated to be true"}),disagreement:Object.freeze({dimension:"task",gloss:"an inform stating that the speaker holds what the addressee just stated to be false"}),correction:Object.freeze({dimension:"task",gloss:"a disagreement that also supplies the replacement ('no, I meant Y')"}),request:Object.freeze({dimension:"task",gloss:"asks the addressee to perform an action ('solve it' \u2014 a goal turn)"}),instruct:Object.freeze({dimension:"task",gloss:"a request the addressee is expected to carry out without negotiation (a bare imperative)"}),suggestion:Object.freeze({dimension:"task",gloss:"puts an action forward as advisable without claiming authority over the addressee"}),offer:Object.freeze({dimension:"task",gloss:"commits the speaker to an action, conditional on the addressee wanting it"}),autoPositive:Object.freeze({dimension:"autoFeedback",gloss:"the sender reports its own processing of the previous turn succeeded (an acknowledgement)"}),autoNegative:Object.freeze({dimension:"autoFeedback",gloss:"the sender reports its own processing of the previous turn failed \u2014 tmct's honest miss"}),initialGreeting:Object.freeze({dimension:"socialObligationsManagement",gloss:"opens an exchange of greetings ('hi')"}),returnGreeting:Object.freeze({dimension:"socialObligationsManagement",gloss:"answers a greeting with a greeting"}),thanking:Object.freeze({dimension:"socialObligationsManagement",gloss:"expresses gratitude for something the addressee did"}),apology:Object.freeze({dimension:"socialObligationsManagement",gloss:"expresses regret for something the speaker did"})}),CF=Object.freeze({teach:"inform","ask-set":"setQuestion","ask-propositional":"propositionalQuestion",goal:"request",imperative:"instruct","honest-miss":"autoNegative",greeting:"initialGreeting",thanks:"thanking",help:"inform","game-answer":"answer","game-inform":"inform"})});function ni(e){let t=new Map;for(let[n,s]of e||[])!n||!s||n===s||(t.has(n)||t.set(n,new Set),t.get(n).add(s));return t}function Ia(e,t,{cap:n=6}={}){let s=[e],o=new Set([e]),r=e;for(;s.length<n;){let i=[...t.get(r)||[]].filter(a=>!o.has(a)).sort();if(!i.length)break;r=i[0],o.add(r),s.push(r)}return s}function qb(e,t,{cap:n=64}={}){let s=new Set([e]),o=[e];for(;o.length&&s.size<n;){let r=o.shift();for(let i of t.get(r)||[])s.has(i)||(s.add(i),o.push(i))}return s}function Wu(e,t,n,s){if(n.has(e))return n.get(e);if(s.has(e))return 1;s.add(e);let o=t.get(e),r=1;if(o&&o.size){let i=0;for(let a of o)i=Math.max(i,Wu(a,t,n,s));r=i+1}return s.delete(e),n.set(e,r),r}function IR(e){let t=new Map;for(let[n,s]of e||[])!n||!s||(t.has(n)||t.set(n,new Set),t.get(n).add(s),t.has(s)||t.set(s,new Set),t.get(s).add(n));return t}function LR(e,t,n,s,o,{threshold:r,rootDepth:i,icByTerm:a}){let l=qb(e,n),c=qb(t,n);if(l.has(t)||c.has(e))return{distinct:!1,reason:"subsumes",lcs:l.has(t)?t:e};if(s.size)for(let h of l){let g=s.get(h);if(g){for(let b of c)if(g.has(b))return{distinct:!0,reason:"disjoint",lcs:null}}}let u=[...l].filter(h=>c.has(h));if(!u.length)return l.size<2||c.size<2?{distinct:!1,reason:"inconclusive",lcs:null}:{distinct:!0,reason:"non-intersecting",lcs:null};let d=h=>Wu(h,n,o,new Set),f=u[0],p=d(f);for(let h of u){let g=d(h);(g>p||g===p&&h<f)&&(f=h,p=g)}if(p<=i)return{distinct:!0,reason:"root-subsumer",lcs:f};if(a){let h=a.get(f);return typeof h=="number"&&h<r?{distinct:!0,reason:"low-ic",lcs:f}:{distinct:!1,reason:"shared-lineage",lcs:f}}return 2*p/(d(e)+d(t))<r?{distinct:!0,reason:"shallow-subsumer",lcs:f}:{distinct:!1,reason:"shared-lineage",lcs:f}}function La(e,{subClassEdges:t=[],parents:n=null,disjointEdges:s=[],threshold:o=.5,rootDepth:r=1,icByTerm:i=null}={}){let a=[...new Set((e||[]).filter(Boolean))],l=n||ni(t),c=IR(s),u=new Map,d=new Map(a.map(y=>[y,y])),f=y=>{for(;d.get(y)!==y;)d.set(y,d.get(d.get(y))),y=d.get(y);return y},p=(y,w)=>{let $=f(y),_=f(w);$!==_&&d.set($<_?_:$,$<_?$:_)},m=[];for(let y=0;y<a.length;y+=1)for(let w=y+1;w<a.length;w+=1){let $=LR(a[y],a[w],l,c,u,{threshold:o,rootDepth:r,icByTerm:i});m.push({a:a[y],b:a[w],...$}),$.distinct||p(a[y],a[w])}let h=new Map;for(let y of a){let w=f(y);h.has(w)||h.set(w,[]),h.get(w).push(y)}let g=y=>Wu(y,l,u,new Set),b=[...h.values()].map(y=>{let w=[...y].sort(),$=w[0],_=g($);for(let v of w){let x=g(v);x>_&&(_=x,$=v)}return{objects:w,label:$}}).sort((y,w)=>y.label.localeCompare(w.label));return{split:b.length>1,clusters:b,pairs:m}}var Na=I(()=>{Gt()});function Gu(e){return typeof e=="string"&&NR.test(e)}function Kb(e){return!!e&&typeof e=="object"&&io(e.s)}function Hu(e){return!!e&&typeof e=="object"&&e.kind==="fact"&&Gu(e.world)&&io(e.subject)&&io(e.predicate)&&io(e.object)}function Vu(e){if(!e||typeof e!="object"||e.kind!=="rule"||!Gu(e.world)||!io(e.name)||!MR.has(e.ruleKind)||!e.slots||typeof e.slots!="object"||Array.isArray(e.slots))return!1;let t=Object.values(e.slots);return t.length>0&&t.every(io)}function qu(e){return!!e&&typeof e=="object"&&e.kind==="meta"&&Gu(e.world)&&io(e.opening)}function Yb(e){return Hu(e)||Vu(e)||qu(e)}function Xb(e){let t=e||[],n=t.filter(c=>c.predicate===FR).sort((c,u)=>`${c.subject}\0${c.object}`.localeCompare(`${u.subject}\0${u.object}`));if(!n.length)return t;let s=new Set(t.filter(c=>c.predicate==="rdf:type").map(c=>c.subject)),o=new Map;for(let c of t)c.predicate==="mgx:located-in"&&o.set(c.subject,c.object);let r=(c,u)=>t.some(d=>d.predicate==="rdf:type"&&d.object===c&&o.get(d.subject)===u),i=t.find(c=>typeof c.world=="string"&&c.kind==="fact"),a=(c,u,d)=>({...i?{world:i.world,kind:"fact"}:{},subject:c,predicate:u,object:d}),l=[];for(let c of n){let u=c.subject,d=c.object;if(r(d,u))continue;let f=d,p=1;for(;s.has(f);)p+=1,f=`${d}-${p}`;s.add(f),l.push(a(f,"rdf:type",d)),l.push(a(f,"rdf:type","portable")),l.push(a(f,"mgx:located-in",u))}return l.length?[...t,...l]:t}var NR,PR,MR,io,FR,ir=I(()=>{NR=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,PR=Object.freeze(["action-signature","action-precond","action-effect","action-constraint"]),MR=new Set(PR),io=e=>typeof e=="string"&&e.trim()!=="";FR="mgx:default-contains"});var zR,BR,UR,WR,GR,HR,VR,qR,KR,WF,YR,Jb,GF,HF,Qb=I(()=>{ro();_o();zR="subClassOf",BR="typeAssertion",UR="relation",WR="someValuesFrom",GR="cardinality",HR="disjointWith",VR="possessive",qR="adjective",KR="capability",WF=Object.freeze([zR,BR,UR,WR,GR,HR,VR,qR,KR]),YR=new Set(["go","take","drop","open","unlock","close","give","look","talk","examine","dig","eat","put"]),Jb=new Map([["pick up","take"],["pick","take"],["grab","take"],["put down","drop"],["set down","drop"],["leave","drop"],["talk to","talk"],["speak to","talk"],["speak with","talk"],["talk","talk"],["speak","talk"],["chat with","talk"],["converse with","talk"],["look at","examine"],["examine","examine"],["inspect","examine"],["have a look at","examine"],["take a look at","examine"],["check out","examine"],["shut","close"]]),GF=Math.max(...[...Jb.keys()].map(e=>e.split(" ").length)),HF=[...new Set([...YR,...[...Jb.keys()].map(e=>e.split(" ")[0])])]});var ao=I(()=>{});var Ku=I(()=>{Ie();ws();ao()});function kt({name:e,label:t,question:n,params:s=[],preconditions:o=[],add:r=[],del:i=[]}){return Object.freeze({type:As.Capability,name:e,label:t,question:n,readOnly:!0,parameters:Object.freeze(s),preconditions:Object.freeze(o),effects:Object.freeze({add:Object.freeze(r),del:Object.freeze(i)})})}var XR,As,Ee,QF,oi,nt,Nt,qt,JR,Zb,St,QR,ZR,ew,ZF,eD,tD,tw=I(()=>{XR=Object.freeze({cap:"urn:tmct:cap#",taught:"urn:tmct:taught#",mgx:"urn:tmct:mgx#",seon:"http://se-on.org/ontologies/seon.owl#"}),As=Object.freeze({Capability:"cap:Capability",Parameter:"cap:Parameter",Precondition:"cap:Precondition",Effect:"cap:Effect"}),Ee=Object.freeze({Symbol:"seon:CodeEntity",Module:"mgx:Module",Class:"seon:ClassType",MemoryTerm:"mgx:MemoryTerm",Query:"cap:FreeText",Kind:"cap:KindFilter",Package:"cap:PackageName"}),QF=Object.freeze([Ee.MemoryTerm]),oi=Object.freeze({graphLoaded:"cap:graph-loaded",resolves:"cap:resolves",anyPresent:"cap:any-present",memoryFacts:"cap:memory-facts"}),nt=(e,t,{arg:n=e,required:s=!0,note:o=""}={})=>Object.freeze({type:As.Parameter,name:e,kind:t,arg:n,required:s,note:o}),Nt=()=>Object.freeze({type:As.Precondition,pred:oi.graphLoaded}),qt=(e,t)=>Object.freeze({type:As.Precondition,pred:oi.resolves,param:e,as:t}),JR=e=>Object.freeze({type:As.Precondition,pred:oi.anyPresent,params:Object.freeze([...e])}),Zb=()=>Object.freeze({type:As.Precondition,pred:oi.memoryFacts}),St=(e,t=null)=>Object.freeze({type:As.Effect,pred:"cap:knows",topic:e,of:t?`?${t}`:null});QR=Object.freeze([kt({name:"tmct_search",label:"search",question:"lexical search across the graph",params:[nt("query",Ee.Query,{required:!1,note:"required unless a kind filter is given"}),nt("kind",Ee.Kind,{required:!1}),nt("name",Ee.Query,{required:!1}),nt("decorator",Ee.Query,{required:!1})],preconditions:[Nt(),JR(["query","kind"])],add:[St("matches","query")]}),kt({name:"tmct_describe",label:"describe",question:"a symbol's definition, kind and relations",params:[nt("symbol",Ee.Symbol)],preconditions:[Nt(),qt("symbol",Ee.Symbol)],add:[St("description","symbol")]}),kt({name:"tmct_signature",label:"signature",question:"a symbol's signature only",params:[nt("symbol",Ee.Symbol)],preconditions:[Nt(),qt("symbol",Ee.Symbol)],add:[St("signature","symbol")]}),kt({name:"tmct_impact",label:"impact",question:"what a change to this module or symbol reaches (impact closure)",params:[nt("module",Ee.Symbol,{note:"a Module, or any sited symbol \u2014 a fine-grained seed walks callsSymbol dependents and coarsens them to module grain"})],preconditions:[Nt(),qt("module",Ee.Symbol)],add:[St("impact","module")]}),kt({name:"tmct_members",label:"members",question:"the methods/attributes of a class",params:[nt("class",Ee.Class,{arg:"class"})],preconditions:[Nt(),qt("class",Ee.Class)],add:[St("members","class")]}),kt({name:"tmct_subclasses",label:"subclasses",question:"the subclasses of a class",params:[nt("class",Ee.Class,{arg:"class"})],preconditions:[Nt(),qt("class",Ee.Class)],add:[St("subclasses","class")]}),kt({name:"tmct_exports",label:"exports",question:"a module's public exports",params:[nt("module",Ee.Module)],preconditions:[Nt(),qt("module",Ee.Module)],add:[St("exports","module")]}),kt({name:"tmct_callers",label:"callers",question:"functions that call this symbol",params:[nt("symbol",Ee.Symbol)],preconditions:[Nt(),qt("symbol",Ee.Symbol)],add:[St("callers","symbol")]}),kt({name:"tmct_callees",label:"callees",question:"functions this symbol calls",params:[nt("symbol",Ee.Symbol)],preconditions:[Nt(),qt("symbol",Ee.Symbol)],add:[St("callees","symbol")]}),kt({name:"tmct_calls",label:"calls",question:"the call edges out of this symbol/module",params:[nt("symbol",Ee.Symbol)],preconditions:[Nt(),qt("symbol",Ee.Symbol)],add:[St("calls","symbol")]}),kt({name:"tmct_tests_for",label:"tests",question:"the tests covering this symbol",params:[nt("symbol",Ee.Symbol)],preconditions:[Nt(),qt("symbol",Ee.Symbol)],add:[St("tests","symbol")]}),kt({name:"tmct_untested",label:"untested",question:"symbols with no covering test",params:[],preconditions:[Nt()],add:[St("untested",null)]}),kt({name:"tmct_history",label:"history",question:"the commit history of this symbol",params:[nt("symbol",Ee.Symbol)],preconditions:[Nt(),qt("symbol",Ee.Symbol)],add:[St("history","symbol")]}),kt({name:"tmct_cochanges",label:"cochanges",question:"symbols that change together with this one",params:[nt("symbol",Ee.Symbol)],preconditions:[Nt(),qt("symbol",Ee.Symbol)],add:[St("cochanges","symbol")]}),kt({name:"tmct_architecture",label:"arch",question:"the architecture overview (optional package filter)",params:[nt("package",Ee.Package,{required:!1})],preconditions:[Nt()],add:[St("architecture","package")]}),kt({name:"tmct_related",label:"related",question:"a term's synonyms and related concepts (the SKOS view over the conversational-memory graph)",params:[nt("term",Ee.MemoryTerm,{note:"a concept term, matched against memory relation facts rather than resolved in the code graph"})],preconditions:[Zb(),qt("term",Ee.MemoryTerm)],add:[St("related","term")]}),kt({name:"tmct_sprite",label:"sprite",question:"the sprite for a class, with the expression and size asked for",params:[nt("class",Ee.MemoryTerm,{arg:"class",note:"a world class, matched against the memory graph's own fact rows rather than resolved in the code graph"}),nt("expression",Ee.Kind,{required:!1,note:"one of sprite-expressions.mjs's palette words, carried as an mgx:feels fact"}),nt("size",Ee.Kind,{required:!1,note:"a taught mgx:hasProperty size word, resolved to a render scale \u2014 not a template tier"})],preconditions:[Zb(),qt("class",Ee.MemoryTerm)],add:[St("sprite","class")]})]),ZR=e=>Object.freeze(e.reduce((t,n)=>(t[n.name]=n,t),Object.create(null))),ew=QR,ZF=ZR(ew),eD=Object.freeze({tmct_context:"unbounded edit-context bundle (multi-file); needs a size/budget precondition",tmct_context_more:"unbounded context continuation; same as tmct_context",tmct_snippet:"raw source-file read (reads the filesystem); needs a file-read + span precondition",tmct_ask:"the plain-English question entry point itself \u2014 calls ask.mjs directly and bypasses the capability planner; not one of the planner's operators",tmct_export:"reads the memory store's whole fact set with no discriminating param and no resolver goal frame; needs NL-reachability wiring before it can join",tmct_ingest:"writes into the memory store (grounds facts); capability() only models read-only operators, so a write path needs its own precondition/effect design first",tmct_file_history:"a module-grain cut of the same history edge tmct_history already models; no NL frame distinguishes the granularities yet",tmct_method_history:"a method-grain cut of the same history edge tmct_history already models; no NL frame distinguishes the granularities yet",tmct_class_history:"a class-grain cut of the same history edge tmct_history already models; no NL frame distinguishes the granularities yet"}),tD=Object.freeze({prefixes:XR,vocab:As,kinds:Ee,precond:oi,get capabilities(){return ew}})});var nw=I(()=>{tw()});var sw=I(()=>{ps()});function tT(e=process.env){return e?.TMCT_WORLDS_PACK_DIR||Q(eT,"corpus","worlds")}function ow(e){try{return Ca(or(e))}catch{return null}}function rw(e){if(Yu.has(e))return Yu.get(e);let t=null,n=ow(Q(e,"index.json.gz"));if(n)try{let s=JSON.parse(n.toString("utf8"));s&&typeof s=="object"&&!Array.isArray(s)&&(t=s)}catch{}return Yu.set(e,t),t}function nT(e,t){let n=rw(e);if(!n)return null;let s=n[String(t??"")];if(!Kb(s))return null;let o=`${e}\0${t}`;if(Xu.has(o))return Xu.get(o);let r=null,i=ow(Q(e,"shards",`${s.s}.jsonl.gz`));if(i){let a=[],l=[],c=null;for(let u of i.toString("utf8").split(`
165
- `))if(u.trim())try{let d=JSON.parse(u);if(!Yb(d)||d.world!==t)continue;Hu(d)?a.push(d):Vu(d)?l.push(d):qu(d)&&!c&&(c=d)}catch{}(a.length||l.length||c)&&(r={name:t,facts:Xb(a),rules:l,meta:c})}return Xu.set(o,r),r}var oT,eT,Yu,Xu,sT,mD,Ju=I(()=>{oo();Oa();Rs();Be();ir();oT={},eT=Q($e(Vt(oT.url)),"..","..","..");Yu=new Map,Xu=new Map;sT=e=>({list:async()=>{let t=rw(e());return t?Object.keys(t).sort():null},load:async t=>nT(e(),t)}),mD=sT(()=>tT())});var ED,iw=I(()=>{jt();Be();ls();$r();ps();Ke();ED=Q(".tmct","memory","blocks")});var aw=I(()=>{ao()});var lw=I(()=>{ls();$r();ao()});var Qu=I(()=>{ls();$r();ao()});var uw=I(()=>{Qu();ls();Gs();ao()});var dw=I(()=>{});var pw=I(()=>{aw();lw();Qu();uw();dw();ao()});var fw=I(()=>{iw();Ke();qi();Mu();pw();Ku()});var mw=I(()=>{jn();_o()});function ar(e,t){let n=parseInt(e.slice(1),16);return`rgba(${n>>16&255}, ${n>>8&255}, ${n&255}, ${t})`}function Ma(e){let t=n=>cT.map((s,o)=>`--${n}-t${o+1}: ${ar(e[n],s)};`).join(" ");return[`--bg: ${e.bg}; --ink: ${e.ink}; --muted: ${e.muted}; --line: ${e.line}; --card: ${e.card};`,`--taught: ${e.taught}; --corpus: ${e.corpus}; --entail: ${e.entail}; --alert: ${e.alert};`,t("taught"),t("corpus"),t("entail"),`--taught-soft: ${ar(e.taught,.12)}; --corpus-soft: ${ar(e.corpus,.12)};`,`--entail-soft: ${ar(e.entail,.14)}; --alert-soft: ${ar(e.alert,.12)};`,`--sprite-pop: drop-shadow(0 0 .6px ${ar(e.ink,e.popRimAlpha)}) drop-shadow(${e.popShadow});`].join(" ")}var Pa,cT,yz,Zu=I(()=>{mw();Pa=Object.freeze({light:Object.freeze({bg:"#F7F6F2",ink:"#23272B",muted:"#6E7168",line:"#DDD9D0",card:"#FFFFFF",taught:"#2E7D4F",corpus:"#5A80AC",entail:"#B07C2E",alert:"#B0503F",popRimAlpha:.66,popShadow:"0 1px 1.2px rgba(0, 0, 0, .30)"}),dark:Object.freeze({bg:"#15181C",ink:"#E7E5DF",muted:"#9A9E95",line:"#2B3036",card:"#1C2126",taught:"#5FBE8B",corpus:"#6C93BF",entail:"#D9A554",alert:"#D08070",popRimAlpha:.45,popShadow:"0 1px 1.4px rgba(0, 0, 0, .55)"})}),cT=[.35,.65,1];yz=`
166
- :root { color-scheme: light dark; ${Ma(Pa.light)} }
167
- @media (prefers-color-scheme: dark) { :root { ${Ma(Pa.dark)} } }
168
- :root[data-theme="dark"] { ${Ma(Pa.dark)} }
169
- :root[data-theme="light"] { ${Ma(Pa.light)} }
170
- `});var hw=I(()=>{Zu()});var gw=I(()=>{Zu()});var bw=I(()=>{Ke();ir();jn();td()});var hT,gT,bT,wT,yT,vT,$T,c2,l2,td=I(()=>{ir();Qb();ro();_a();Ku();nw();sw();Ju();Ke();fw();hw();gw();bw();hT="mgx:world-epoch",gT=new Set(["mgx:currently-in","mgx:located-in","mgx:fixed-in","mgx:stands-locked-in","mgx:hidden-in"]),bT=new Set(["mgx:on-top-of","mgx:on-plane","mgx:under"]),wT="mgx:is-open",yT="mgx:hasMass",vT="mgx:knows-about",$T="mgx:display-name",c2=new Set([...gT,...bT,wT,yT,vT,$T,"rdf:type",hT]),l2=new RegExp("^(?:what\\s+foods?\\s+(?:do\\s+you\\s+know(?:\\s+about)?|have\\s+you\\s+(?:found|seen|heard\\s+(?:about|of))|do\\s+you\\s+know\\s+of)|what\\s+do\\s+you\\s+know\\s+about\\s+(?:any\\s+)?foods?|do\\s+you\\s+know\\s+(?:about|of)\\s+(?:any\\s+)?foods?|where\\s+is\\s+(?:the\\s+)?food)[?.!\\s]*$","i")});var Fa,d2,p2,f2,m2,h2,g2,cr=I(()=>{Fa=Object.freeze({spiderFly:Object.freeze({spiderInitialMass:15,spiderMassDecrementPerTurn:.5,flyInitialMass:10,flyMassDecrementPerTurn:1,spiderVisionRadius:4,flyVisionRadius:4,eggHatchDelayTurns:3,flySpawnIntervalTurns:3,eggLayMassThreshold:25,eggHatchCount:2,minHatchlingMass:3,webDurationTurns:10}),mud:Object.freeze({moleInitialMass:8,moleMassDecrementPerTurn:.06,moleSpeed:1,moleDigReach:1,voleInitialMass:6,voleMassDecrementPerTurn:.05,voleSpeed:1,voleDigReach:1,badgerInitialMass:20,badgerMassDecrementPerTurn:.08,badgerSpeed:2,badgerDigReach:2,groundhogInitialMass:12,groundhogMassDecrementPerTurn:.06,groundhogSpeed:2,groundhogDigReach:2,meerkatInitialMass:9,meerkatMassDecrementPerTurn:.05,meerkatSpeed:1,meerkatDigReach:1}),mudiii:Object.freeze({predatorInitialMass:20,predatorMassDecrementPerTurn:.08,predatorVisionRadius:4,preyInitialMass:8,preyMassDecrementPerTurn:.06,preyVisionRadius:3,preySpawnIntervalTurns:5,foodSpawnIntervalTurns:3,spawnedFoodMass:1,placedFoodMass:2,maxPreyPopulation:6,maxFoodItems:8}),guessNumber:Object.freeze({defaultLo:1,defaultHi:100,maxBound:1e9}),adventure:Object.freeze({teach:!1}),planning:Object.freeze({maxDepth:300})}),d2=Object.freeze({spider_initial_mass:"spiderInitialMass",spider_mass_decrement_per_turn:"spiderMassDecrementPerTurn",fly_initial_mass:"flyInitialMass",fly_mass_decrement_per_turn:"flyMassDecrementPerTurn",spider_vision_radius:"spiderVisionRadius",fly_vision_radius:"flyVisionRadius",egg_hatch_delay_turns:"eggHatchDelayTurns",fly_spawn_interval_turns:"flySpawnIntervalTurns",egg_lay_mass_threshold:"eggLayMassThreshold",egg_hatch_count:"eggHatchCount",min_hatchling_mass:"minHatchlingMass",web_duration_turns:"webDurationTurns"}),p2=Object.freeze({mole_initial_mass:"moleInitialMass",mole_mass_decrement_per_turn:"moleMassDecrementPerTurn",mole_speed:"moleSpeed",mole_dig_reach:"moleDigReach",vole_initial_mass:"voleInitialMass",vole_mass_decrement_per_turn:"voleMassDecrementPerTurn",vole_speed:"voleSpeed",vole_dig_reach:"voleDigReach",badger_initial_mass:"badgerInitialMass",badger_mass_decrement_per_turn:"badgerMassDecrementPerTurn",badger_speed:"badgerSpeed",badger_dig_reach:"badgerDigReach",groundhog_initial_mass:"groundhogInitialMass",groundhog_mass_decrement_per_turn:"groundhogMassDecrementPerTurn",groundhog_speed:"groundhogSpeed",groundhog_dig_reach:"groundhogDigReach",meerkat_initial_mass:"meerkatInitialMass",meerkat_mass_decrement_per_turn:"meerkatMassDecrementPerTurn",meerkat_speed:"meerkatSpeed",meerkat_dig_reach:"meerkatDigReach"}),f2=Object.freeze({predator_initial_mass:"predatorInitialMass",predator_mass_decrement_per_turn:"predatorMassDecrementPerTurn",predator_vision_radius:"predatorVisionRadius",prey_initial_mass:"preyInitialMass",prey_mass_decrement_per_turn:"preyMassDecrementPerTurn",prey_vision_radius:"preyVisionRadius",prey_spawn_interval_turns:"preySpawnIntervalTurns",food_spawn_interval_turns:"foodSpawnIntervalTurns",spawned_food_mass:"spawnedFoodMass",placed_food_mass:"placedFoodMass",max_prey_population:"maxPreyPopulation",max_food_items:"maxFoodItems"}),m2=Object.freeze({teach:"teach"}),h2=Object.freeze({default_lo:"defaultLo",default_hi:"defaultHi",max_bound:"maxBound"}),g2=Object.freeze({max_depth:"maxDepth"})});var xT,ww,y2,nd=I(()=>{cr();xT=Object.freeze({x:2,y:2}),ww=Object.freeze({north:Object.freeze({dx:0,dy:-1}),south:Object.freeze({dx:0,dy:1}),east:Object.freeze({dx:1,dy:0}),west:Object.freeze({dx:-1,dy:0})}),y2=Object.freeze([Object.freeze(["poodle","dog"]),Object.freeze(["sheepdog","dog"]),Object.freeze(["dog","animal"]),Object.freeze(["spider","arachnid"]),Object.freeze(["arachnid","animal"]),Object.freeze(["fly","insect"]),Object.freeze(["insect","animal"])])});var yw=I(()=>{});var vw=I(()=>{});var $w=I(()=>{nd();yw();Gs();Ke();ir();vw();en();cr()});var Z2,xw=I(()=>{nd();$w();ir();Ju();Ke();cr();Z2=new RegExp("^@(spider|fly)(?:-(\\d+))?[,:]?\\s+the\\s+(spider|fly)(?:-(\\d+))?\\s+is\\s+(?:(north|south|east|west)|at\\s+(cell-\\d+-\\d+))[.!?\\s]*$","i")});var ht,tB,nB,sB,oB,rB,iB,aB,cB,lB,uB,dB,pB,fB,mB,hB,gB,bB,wB,yB,Ew=I(()=>{ht=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},tB=ht("createRequire"),nB=ht("readFileSync"),sB=ht("access"),oB=ht("readFile"),rB=ht("writeFile"),iB=ht("appendFile"),aB=ht("mkdir"),cB=ht("mkdtemp"),lB=ht("rename"),uB=ht("unlink"),dB=ht("rm"),pB=ht("stat"),fB=ht("copyFile"),mB=ht("readdir"),hB=ht("createReadStream"),gB=ht("createWriteStream"),bB=ht("randomBytes"),wB=ht("spawnSync"),yB=ht("createInterface")});var gt,$B,xB,EB,SB,kB,jB,_B,RB,TB,AB,CB,OB,IB,LB,NB,PB,MB,FB,TT,Sw=I(()=>{gt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},$B=gt("createRequire"),xB=gt("readFileSync"),EB=gt("access"),SB=gt("readFile"),kB=gt("writeFile"),jB=gt("appendFile"),_B=gt("mkdir"),RB=gt("mkdtemp"),TB=gt("rename"),AB=gt("unlink"),CB=gt("rm"),OB=gt("stat"),IB=gt("copyFile"),LB=gt("readdir"),NB=gt("createReadStream"),PB=gt("createWriteStream"),MB=gt("randomBytes"),FB=gt("spawnSync"),TT=gt("createInterface")});var bt,zB,BB,UB,WB,GB,HB,VB,qB,KB,YB,XB,JB,QB,ZB,eU,tU,nU,kw,sU,sd=I(()=>{bt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},zB=bt("createRequire"),BB=bt("readFileSync"),UB=bt("access"),WB=bt("readFile"),GB=bt("writeFile"),HB=bt("appendFile"),VB=bt("mkdir"),qB=bt("mkdtemp"),KB=bt("rename"),YB=bt("unlink"),XB=bt("rm"),JB=bt("stat"),QB=bt("copyFile"),ZB=bt("readdir"),eU=bt("createReadStream"),tU=bt("createWriteStream"),nU=bt("randomBytes"),kw=bt("spawnSync"),sU=bt("createInterface")});var jw=I(()=>{sd();Be();jt();Be();fa();Dt()});var _w=I(()=>{});var AT,Rw=I(()=>{jt();Be();Ke();_w();AT=Q(".tmct","sessions")});var Aw=I(()=>{jt();Be();Ra()});var wt,SU,kU,jU,_U,RU,TU,AU,CU,OU,IU,LU,NU,PU,MU,FU,DU,zU,BU,CT,Cw=I(()=>{wt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},SU=wt("createRequire"),kU=wt("readFileSync"),jU=wt("access"),_U=wt("readFile"),RU=wt("writeFile"),TU=wt("appendFile"),AU=wt("mkdir"),CU=wt("mkdtemp"),OU=wt("rename"),IU=wt("unlink"),LU=wt("rm"),NU=wt("stat"),PU=wt("copyFile"),MU=wt("readdir"),FU=wt("createReadStream"),DU=wt("createWriteStream"),zU=wt("randomBytes"),BU=wt("spawnSync"),CT=wt("createInterface")});var IT,lr,Ow,OT,Iw,XU,ss,JU,Da,QU,Lw=I(()=>{oo();jt();Cw();Rs();Be();ua();Ke();IT={},lr=Q($e(Vt(IT.url)),"..","..",".."),Ow=Q(lr,"corpus","conceptnet","slice.jsonl"),OT=Q(lr,"src","adapters","corpus","conceptnet-map.toml"),Iw=Q(lr,"corpus","seon","concepts.jsonl"),XU=Q(lr,"corpus","seon","definitions.jsonl"),ss=Q(lr,"corpus","tier2"),JU=Q(ss,"manifest.json"),Da=Q(lr,"corpus","wordnet"),QU=Q(Da,"manifest.json")});function PT(){return{seon:{kind:"corpus",active:!1,corpusPath:Iw,provenancePrefix:"corpus:seon"},conceptnet:{kind:"corpus",active:!1,corpusPath:Ow,provenancePrefix:"corpus:conceptnet",limit:void 0,prefer:NT},human:{kind:"corpus",active:!0,corpusPath:Q(ss,"human.jsonl"),provenancePrefix:"corpus:human"},"human-medium":{kind:"corpus",active:!1,corpusPath:Q(ss,"human-medium.jsonl"),provenancePrefix:"corpus:human-medium"},"human-large":{kind:"corpus",active:!1,corpusPath:Q(ss,"human-large.jsonl"),provenancePrefix:"corpus:human-large"},"tier2-aws":{kind:"corpus",active:!1,corpusPath:Q(ss,"aws.jsonl"),provenancePrefix:"corpus:tier2-aws"},"tier2-python":{kind:"corpus",active:!1,corpusPath:Q(ss,"python.jsonl"),provenancePrefix:"corpus:tier2-python"},"tier2-java":{kind:"corpus",active:!1,corpusPath:Q(ss,"java.jsonl"),provenancePrefix:"corpus:tier2-java"},"tier2-general":{kind:"corpus",active:!1,corpusPath:Q(ss,"general.jsonl"),provenancePrefix:"corpus:tier2-general"},"wordnet-xl":{kind:"corpus",active:!1,corpusPath:Q(Da,"wordnet-xl.jsonl"),provenancePrefix:"corpus:wordnet-xl"},"wordnet-full":{kind:"corpus",active:!1,corpusPath:Q(Da,"wordnet-full.jsonl"),provenancePrefix:"corpus:wordnet-full"},namenet:{kind:"corpus",active:!1,corpusPath:Q(LT,"namenet.jsonl"),provenancePrefix:"corpus:namenet"}}}var MT,LT,lW,NT,uW,Nw=I(()=>{Be();jt();Rs();fa();Lw();MT={},LT=Q($e(Vt(MT.url)),"..","..","corpus","namenet"),lW=Object.freeze(["corpus","lexicon","templates","pack","ontology"]),NT=["rdfs:subClassOf","rdf:type","mgx:usedFor","mgx:partOf","mgx:capableOf"];uW=Object.freeze(PT())});var Pw=I(()=>{});var Mw=I(()=>{Be();oo();jt();Ew();Sw();sd();Dt();jw();Ie();Rw();Ra();Aw();vr();Nw();za();cr();_a();Bu();Pw()});var Fw={};Fn(Fw,{proseLemma:()=>DT});function DT(){if(co!==void 0)return co;try{let e=Fu();if(!e)return co=null,co;let t=e.its,n=new Map;co=s=>{let o=String(s||"");if(n.has(o))return n.get(o);let r;try{r=String(e.readDoc(o).tokens().out(t.lemma)[0]||o).toLowerCase()}catch{r=o.toLowerCase()}return n.set(o,r),r}}catch{co=null}return co}var co,Dw=I(()=>{Du()});var zw={};Fn(zw,{digestTermFromRows:()=>UT,loadDigestStructureTable:()=>BT,readDigestStructures:()=>zT});var zT,BT,UT,Bw=I(()=>{zT=()=>null,BT=()=>null,UT=()=>null});function gd(e){if(!e)return null;let{node:t,shape:n,kind:s}=e;if(t==="find")return`locate a specific named entity ("${e.term}")`;if(t==="count")return`get a count of ${Ba(e.entityType)}`;if(t==="list")return`list/enumerate ${Ba(e.entityType)} matching a condition`;if(t==="superlative")return`rank/compare ${Ba(e.entityType)} by ${e.metricNoun||e.metric||"a metric"}`;if(t==="anaphora")return"follow up on the previous answer's result set (discourse anaphora)";if(t==="membership")return`understand "${e.term||"an entity"}"'s membership/relationship`;if(t==="clause")return gd(e.clause);if(t==="miss")return null;if(t==="boolean"||t==="qualifier"||t==="reverseSet"||t==="forwardSet"||t==="allOfClass"||t==="temporal"){let o=s||e.inner?.kind;return o&&fn[o]?fn[o]:`filter/traverse ${Ba(e.entityType)} by a relationship`}return n==="meta"?`understand a vocabulary/definition term ("${e.object}")`:n==="where"?`locate where something is defined ("${e.object}")`:n==="when"?"understand when something last changed (history)":n==="whoLast"?"find who most recently touched something (history)":n==="mentions"?`find where something is mentioned in prose ("${e.object}")`:n==="ask"?s&&fn[s]||"check a specific subject/object relationship":(n==="reverse"||n==="forward")&&s?fn[s]||`understand a "${s}" relationship`:"understand a graph relationship"}function Ed(e){let t=new Map;for(let n of e)t.has(Gw(n))||t.set(Gw(n),n);return t}function id(e,t=ii){let n=[],s=[];for(let o of e)o.predicate===t&&(s.push([o.subject,o.object]),lo(o)&&n.push([o.subject,o.object]));return{strictEdges:n,broadEdges:s}}function ad(e,t,n,s,o){return e(t,n,[],s.strictEdges,o)||e(t,n,[],s.broadEdges,o)}function KT(e,t){return!/ves$/i.test(e)||!/fe?$/i.test(t)?t:e.slice(0,-1)}async function YT(e){let t=String(e||"").toLowerCase();try{let{proseLemma:n}=await Promise.resolve().then(()=>(Dw(),Fw)),s=n();return s?KT(t,s(t)):t}catch{return t}}function kd(e){let t=String(e||"").trim();if(/[a-z]ies$/i.test(t))return`${t.slice(0,-3)}y`;if(/[a-z]ses$/i.test(t)){let n=t.slice(0,-2);return/ss$/i.test(n)||XT.has(n.toLowerCase())?n:t.slice(0,-1)}return/(xes|zes|ches|shes)$/i.test(t)?t.slice(0,-2):/[a-z]s$/i.test(t)&&!/(?:ss|ous)$/i.test(t)?t.slice(0,-1):t}async function ud(e){let t=String(e||"").toLowerCase();if(t==="has"||t==="have")return sr;if(t==="can")return"mgx:capableOf";try{let n=await YT(t);return n==="have"?sr:Zn(`mgx:${n}`)}catch{return Zn(`mgx:${t}`)}}function nA(e,t){let n=String(t||"").match(tA);return n&&/^mgx:[a-z]+$/.test(e)?{predicate:`${e}-${n[1].toLowerCase()}`,object:n[2].trim()}:{predicate:e,object:String(t||"").trim()}}async function ri(e,t){if(!e||!t)return null;try{let{resolveObject:n}=await Promise.resolve().then(()=>(ws(),Om)),s=n(e,t);if(s?.match?.id&&!s.ambiguous)return{id:s.match.id,label:s.match.label}}catch{}return null}function iA(e){let t=String(e||"");return/^have$/i.test(t)?"has":/[a-z]y$/i.test(t)&&!/[aeiou]y$/i.test(t)?`${t.slice(0,-1)}ies`:/(?:s|x|z|ch|sh|o)$/i.test(t)?`${t}es`:`${t}s`}function hy(e){let t=String(e||"");return/^has$/i.test(t)?"have":/[a-z]ies$/i.test(t)&&!/[aeiou]ies$/i.test(t)?`${t.slice(0,-3)}y`:/(?:s|x|z|ch|sh|o)es$/i.test(t)?t.slice(0,-2):t.replace(/s$/i,"")}function gy(e){if(uo[e])return uo[e];let t=String(e||""),n=th(t);if(n){let a=gy(n);if(a==="can")return"cannot";if(a==="can be")return"cannot be";if(a==="is"||a.startsWith("is "))return`is not${a.slice(2)}`;let[l,...c]=a.split(" ");return["does not",hy(l),...c].join(" ")}let s=/^mgx:([a-z]+(?:-[a-z]+)*)-than$/i.exec(t);if(s)return`is ${s[1].replace(/-/g," ")} than`;let o=new RegExp(`^mgx:(${jd})-([a-z]+)$`,"i").exec(t);if(o)return`is ${o[1].toLowerCase()} ${o[2].toLowerCase()}`;let r=/^mgx:same-([a-z]+)-as$/i.exec(t);if(r)return`has the same ${r[1].toLowerCase()} as`;let i=/^mgx:([a-z]+)(?:-([a-z]+))?$/i.exec(t);return i?`${iA(i[1])}${i[2]?` ${i[2]}`:""}`:e}function pd(e){let t=/^mgx:([a-z][\w-]*)$/i.exec(String(e||""));return t?t[1].toLowerCase():null}function cA(e){let t=String(e||"").trim(),n=t.toLowerCase();for(let{marker:s,predicate:o}of aA)if(n!==s&&n.endsWith(` ${s}`)){let r=t.slice(0,t.length-s.length).trim();if(r)return{subject:r,predicate:o}}return{subject:t,predicate:null}}function Pn(e){return e.replace(/#node:[0-9a-f]+/g,"")}function re(e){let t=e.provenance?` (source: ${Pn(e.provenance)})`:"";return e.provenance.includes("ace:chat")||e.provenance.includes("teach:chat")?`you told me: ${Pt(e)}${t}`:e.provenance.includes("corpus-weak:")?`possibly: ${Pt(e)}${t}`:e.provenance.includes("corpus:")?`${Pt(e)}${t}`:e.provenance.includes("reference:")?`${Pt(e)}${t}`:`i learned: ${Pt(e)}${t}`}function qw(e,t,n){let s=re(e);if(!rs.has(e.predicate)||!n.has(e.subject))return s;let o=Ia(e.object,t,{cap:6});if(o.length<=1)return s;let r=` \u2192 ${o.slice(1).join(" \u2192 ")}`,i=s.match(lA);return i?s.slice(0,i.index)+r+i[0]:s+r}function Kw(e,t,n,{indent:s=""}={}){let o=t.filter(_=>_.predicate===ii).map(_=>[_.subject,_.object]),r=ni(o),i=e.map(_=>`${s}${qw(_,r,n)}`),a=e.filter(_=>rs.has(_.predicate)&&n.has(_.subject)),l=[...new Set(a.map(_=>_.object))];if(l.length<2)return{lines:i,grouped:null};let c=t.filter(_=>_.predicate==="owl:disjointWith").map(_=>[_.subject,_.object]),{split:u,clusters:d}=La(l,{parents:r,disjointEdges:c});if(!u)return{lines:i,grouped:null};let f=a[0].subject,p=new Map;for(let _ of d)for(let v of _.objects)p.set(v,_);let m=e.filter(_=>!(rs.has(_.predicate)&&n.has(_.subject))),h=[],g=[],b=0,y=_=>{let v=qw(_,r,n);return b<je?(b+=1,`${s}${v}`):(g.push(v),null)};for(let _ of d){let v=a.filter(x=>p.get(x.object)===_).map(y).filter(Boolean);v.length&&h.push(`${s}${f}, the ${_.label}:
171
- ${v.join(`
164
+ `)}`:c,data:{...a,grounded:l}})}finally{await i()}}var Mb=O(()=>{Ue();Be();qe();Nu.ownsGraphLoad=!0});var bR,Pb=O(()=>{bl();Vm();_g();Tg();Ig();Og();Ng();Pg();Dg();zg();ib();cb();ub();pb();Ou();gb();wb();$b();xb();Sb();jb();Rb();Ab();Cb();Nb();Mb();bR=Object.freeze({tmct_context:gl,tmct_context_more:qm,tmct_describe:jg,tmct_snippet:Rg,tmct_signature:Ag,tmct_impact:Cg,tmct_search:Lg,tmct_members:Mg,tmct_subclasses:Fg,tmct_related:Ru,tmct_sprite:Cu,tmct_architecture:ab,tmct_exports:lb,tmct_untested:db,tmct_ask:mb,tmct_tests_for:hb,tmct_history:bb,tmct_file_history:yb,tmct_method_history:vb,tmct_class_history:Eb,tmct_callers:kb,tmct_callees:_b,tmct_calls:Tb,tmct_cochanges:Ib,tmct_export:Lu,tmct_ingest:Nu})});var Mu=O(()=>{});var Ca,Pu=O(()=>{Ca=()=>({relations:[],constructions:[]})});var Fb,Db=O(()=>{_t();Ue();op();zt();vr();$s();Zi();ea();Pb();qe();Lo();Di();Mu();Pu();ea();bl();Ou();zi(void 0);Fi(Ca);Fb=sp.map(({name:e,agentDescription:t,inputSchema:n})=>({name:e,description:t,inputSchema:n}))});var CM,OM,LM,Oa=O(()=>{CM=Object.freeze(["entity","set","event","measure"]),OM=Object.freeze(["date","count","op","pivot","metric","kind","provenance"]),LM=Object.freeze({it:Object.freeze(["entity","event","measure"]),this:Object.freeze(["entity","event","measure"]),that:Object.freeze(["entity","event","measure"]),"this one":Object.freeze(["entity","event","measure"]),"that one":Object.freeze(["entity","event","measure"]),those:Object.freeze(["set"]),them:Object.freeze(["set"]),these:Object.freeze(["set"]),here:Object.freeze(["entity"])})});var pt,MM,PM,FM,DM,zM,UM,BM,WM,GM,qM,VM,HM,KM,YM,XM,JM,wR,QM,ZM,zb=O(()=>{pt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},MM=pt("createRequire"),PM=pt("readFileSync"),FM=pt("access"),DM=pt("readFile"),zM=pt("writeFile"),UM=pt("appendFile"),BM=pt("mkdir"),WM=pt("mkdtemp"),GM=pt("rename"),qM=pt("unlink"),VM=pt("rm"),HM=pt("stat"),KM=pt("copyFile"),YM=pt("readdir"),XM=pt("createReadStream"),JM=pt("createWriteStream"),wR=pt("randomBytes"),QM=pt("spawnSync"),ZM=pt("createInterface")});var La=O(()=>{zb()});var ft,sP,oP,rP,iP,aP,cP,lP,uP,dP,pP,fP,mP,hP,gP,bP,wP,Ht,yP,$P,vP,Is=O(()=>{ft=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},sP=ft("createRequire"),oP=ft("readFileSync"),rP=ft("access"),iP=ft("readFile"),aP=ft("writeFile"),cP=ft("appendFile"),lP=ft("mkdir"),uP=ft("mkdtemp"),dP=ft("rename"),pP=ft("unlink"),fP=ft("rm"),mP=ft("stat"),hP=ft("copyFile"),gP=ft("readdir"),bP=ft("createReadStream"),wP=ft("createWriteStream"),Ht=e=>String(e),yP=ft("randomBytes"),$P=ft("spawnSync"),vP=ft("createInterface")});var yR,Ub,jP,_P,RP,Du=O(()=>{_t();Is();Ue();yR={},Ub=Q(ve(Ht(yR.url)),"..","..",".."),jP=Q(Ub,"data","templates","responses.jsonl"),_P=Q(Ub,"data","phrasebook","software-phrases.txt"),RP=Object.freeze(new Set(["subject","count","noun","scope","comparison","metric","unit","superlative","provenance"]))});function vR(e,t={}){let n=$R.exec(String(e||""));if(!n)return 1;let s=t?.[n[1]];return typeof s=="number"&&Number.isFinite(s)?s:1}function xR(e,t={}){let n=Array.isArray(e?.sourceIds)?e.sourceIds:[];return n.length?Math.max(...n.map(s=>vR(s,t))):1}function Qe(e,t={}){return(Array.isArray(e)?e:[]).map((s,o)=>({row:s,index:o,bias:xR(s,t)})).sort((s,o)=>o.bias-s.bias||(o.row?.trust??0)-(s.row?.trust??0)||s.index-o.index).map(s=>s.row)}var $R,Bb=O(()=>{$R=/^src:corpus:(.+)$/});var mt,IP,ar,CP,OP,LP,NP,MP,PP,FP,DP,zP,UP,BP,WP,ER,SR,GP,qP,VP,ao=O(()=>{mt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},IP=mt("createRequire"),ar=mt("readFileSync"),CP=mt("access"),OP=mt("readFile"),LP=mt("writeFile"),NP=mt("appendFile"),MP=mt("mkdir"),PP=mt("mkdtemp"),FP=mt("rename"),DP=mt("unlink"),zP=mt("rm"),UP=mt("stat"),BP=mt("copyFile"),WP=mt("readdir"),ER=mt("createReadStream"),SR=mt("createWriteStream"),GP=mt("randomBytes"),qP=mt("spawnSync"),VP=mt("createInterface")});function Wb(e,t){let n=String(e).toLowerCase().replace(/^[^a-z]+/,"");if(!n)return null;for(let o of t.vowel_sound_consonants||[])if(n.startsWith(o))return!0;for(let o of t.consonant_sound_vowels||[])if(n.startsWith(o))return!1;let s=n[0];return"aeiou".includes(s)?!0:/[a-z]/.test(s)?!1:null}function RR(e=jR){let t=Qo(ar(e,"utf8"));return Array.isArray(t.rule)?t.rule:[]}function zu(){if(Na===null)try{Na=RR()}catch{Na=[]}return Na}var TR,kR,jR,_R,eF,Na,Uu=O(()=>{ao();Is();Ue();ha();Du();TR={},kR=ve(Ht(TR.url)),jR=Q(kR,"..","..","data","templates","grammar-rules.toml"),_R=Object.freeze(["prose","entity","path","number","code","provenance","receipt"]),eF=Object.freeze(new Set(_R.filter(e=>e!=="prose")));Na=null});function AR(){if(ni!==void 0)return ni;try{let e=Gb?Gb():IR();ni=e&&e.winkNLP&&e.model?e:null}catch{ni=null}return ni}function IR(){let e=process.getBuiltinModule("node:module").createRequire(CR.url);return{winkNLP:e("wink-nlp"),model:e("wink-eng-lite-web-model")}}function Bu(){if(cr!==void 0)return cr;let e=AR();if(!e)return cr=null,null;try{cr=e.winkNLP(e.model)}catch{cr=null}return cr}var CR,Gb,ni,cr,Wu=O(()=>{CR={}});var qb=O(()=>{Wu()});var Hb,Vb=O(()=>{Hb={comment:"tmct's starter lexicon, now covering BOTH the original software domain and the default 'human-world' persona's everyday people/places/objects/nature/time/body/mind vocabulary. Every word the ACE-OWL sub-fragment parser (src/domain/grammar/ace.mjs) is allowed to understand is DECLARED here \u2014 tmct never guesses a word's category. Nouns may declare a possessive property typing ('data' or 'object', pattern 7) or an irregular 'plural' (WordNet-sourced human nouns like 'man'/'child' need this \u2014 the morphology fold only handles regular -s/-ies/-es endings); adjectives MUST declare a type ('subclass' forms a class, 'data' asserts a boolean-ish datatype property, pattern 8); verbs may declare a preposition ('depend' + 'on' \u2192 dependsOn). The human-domain additions are flat and simple (breadth over depth \u2014 no gender/kinship taxonomy, no formal role hierarchy), matching corpus/tier2/generate.mjs's CORPUSES.human.lexicon sub-key, which --verify drift-checks against. Extend via loadLexicon(extra) with this same shape.",nouns:{module:{},class:{},function:{},method:{},attribute:{},variable:{},constant:{},test:{},suite:{},service:{},repository:{},branch:{},commit:{},tag:{},release:{},package:{},library:{},framework:{},api:{},endpoint:{},route:{},handler:{},controller:{},model:{},view:{},template:{},component:{},interface:{},type:{},category:{},kind:{},artifact:{},routine:{},part:{},helper:{},operation:{},change:{},schema:{},database:{},table:{},query:{},index:{plural:"indices"},cache:{},queue:{},worker:{},job:{},task:{},bug:{},defect:{},issue:{},ticket:{},feature:{},requirement:{},specification:{},document:{},developer:{},engineer:{},user:{},visitor:{},team:{},project:{},codebase:{},file:{},directory:{},folder:{},line:{},symbol:{},identifier:{},comment:{},docstring:{},string:{},number:{},list:{},array:{},graph:{},node:{},edge:{},triple:{},fact:{},ontology:{},lexicon:{},grammar:{},sentence:{},utterance:{},session:{},response:{},request:{},question:{},answer:{},error:{},exception:{},warning:{},log:{},metric:{},benchmark:{},pipeline:{},build:{},deployment:{},environment:{},config:{},configuration:{},setting:{},option:{},flag:{},argument:{},parameter:{},value:{},result:{},output:{},input:{},server:{},client:{},protocol:{},message:{},event:{},hook:{},plugin:{},script:{},tool:{},command:{},prompt:{},token:{},parser:{},compiler:{},linter:{},formatter:{},runtime:{},process:{},thread:{},loop:{},statement:{},expression:{},keyword:{},scope:{},callback:{},promise:{},iterator:{},generator:{},unit:{},risk:{},prototype:{},milestone:{},sprint:{},backlog:{},roadmap:{},phase:{},pattern:{},smell:{},coverage:{},mock:{},stub:{},fixture:{},assertion:{},snapshot:{},regression:{},migration:{},refactor:{},review:{},merge:{},license:{property:"data"},version:{property:"data"},name:{property:"data"},path:{property:"data"},size:{property:"data"},status:{property:"data"},language:{property:"data"},extension:{property:"data"},churn:{property:"data"},impact:{property:"data"},complexity:{property:"data"},latency:{property:"data"},duration:{property:"data"},frequency:{property:"data"},severity:{property:"data"},owner:{property:"object"},maintainer:{property:"object"},author:{property:"object"},reviewer:{property:"object"},parent:{property:"object"},dependency:{property:"object"},man:{plural:"men"},woman:{plural:"women"},person:{plural:"people"},child:{plural:"children"},boy:{},girl:{},baby:{},adult:{},friend:{},neighbor:{},stranger:{},guest:{},doctor:{},teacher:{},nurse:{},student:{},farmer:{},mother:{},father:{},brother:{},sister:{},family:{},king:{},queen:{},soldier:{},artist:{},writer:{},cook:{},group:{},crowd:{},audience:{},club:{},president:{},human:{},lawyer:{},driver:{},manager:{},officer:{},judge:{},priest:{},servant:{},butler:{},housekeeper:{},gardener:{},employee:{},boss:{},husband:{},wife:{plural:"wives"},son:{},daughter:{},grandmother:{},grandfather:{},citizen:{},customer:{},leader:{},champion:{},volunteer:{},resident:{},place:{},city:{},town:{},village:{},country:{},house:{},home:{},room:{},kitchen:{},bedroom:{},bathroom:{},school:{},hospital:{},shop:{},market:{},church:{},park:{},garden:{},street:{},road:{},bridge:{},farm:{},office:{},factory:{},museum:{},hotel:{},airport:{},castle:{},beach:{},forest:{},mountain:{},hat:{},shirt:{},coat:{},shoe:{},dress:{},clothing:{},chair:{},desk:{},lamp:{},portrait:{},bed:{},door:{},window:{},wall:{},roof:{},pen:{},paper:{},key:{},lock:{},box:{},car:{},bicycle:{},boat:{},train:{},wheel:{},knife:{plural:"knives"},spoon:{},fork:{},plate:{},cup:{},bottle:{},bag:{},money:{},coin:{},toy:{},machine:{},clock:{},phone:{},book:{},letter:{},umbrella:{},glove:{},sock:{},ring:{},watch:{},mirror:{},candle:{},ladder:{},hammer:{},basket:{},wallet:{},dog:{},cat:{},horse:{},cow:{},pig:{},sheep:{},bird:{},fish:{},mouse:{plural:"mice"},rabbit:{},bear:{},lion:{},tiger:{},elephant:{},snake:{},mole:{},groundhog:{},meerkat:{},tree:{},flower:{},grass:{},leaf:{plural:"leaves"},root:{},seed:{},fruit:{},water:{},air:{},fire:{},earth:{},stone:{},sand:{},gold:{},iron:{},rain:{},snow:{},wind:{},cloud:{},sun:{},moon:{},star:{},owl:{},wolf:{plural:"wolves"},frog:{},bee:{},ant:{},butterfly:{},spider:{},river:{},ocean:{},time:{},day:{},night:{},morning:{},evening:{},week:{},month:{},year:{},hour:{},minute:{},second:{},moment:{},season:{},spring:{},summer:{},winter:{},wedding:{},race:{},dozen:{},half:{plural:"halves"},amount:{},meeting:{},game:{},war:{},trip:{},birthday:{},holiday:{},autumn:{},century:{},body:{},head:{},hand:{},arm:{},leg:{},foot:{plural:"feet"},eye:{},ear:{},mouth:{},nose:{},hair:{},heart:{},blood:{},bone:{},skin:{},face:{},food:{},bread:{},meat:{},milk:{},egg:{},cheese:{},vegetable:{},meal:{},breakfast:{},dinner:{},drink:{},wine:{},tea:{},coffee:{},tongue:{},tooth:{plural:"teeth"},finger:{},toe:{},shoulder:{},knee:{},brain:{},lung:{},sugar:{},salt:{},word:{},story:{},news:{},idea:{},thought:{},mind:{},memory:{},dream:{},belief:{},love:{},hate:{},fear:{},joy:{},anger:{},hope:{},surprise:{},pride:{},song:{},music:{},sound:{},voice:{},picture:{},art:{},knowledge:{},opinion:{},reason:{},imagination:{},laughter:{},tear:{},smile:{},silence:{},object:{},location:{},quantity:{},organization:{},animal:{},plant:{},furniture:{},vehicle:{},insect:{},emotion:{},metal:{},liquid:{},weather:{},planet:{},jewelry:{},cutlery:{},government:{},material:{},draw:{},set:{},heavy:{},stand:{},free:{},pack:{},dead:{},pick:{},double:{},straight:{},cast:{},dry:{},bank:{},stamp:{},tender:{},fair:{},active:{},regular:{},blue:{},hack:{},band:{},brush:{},guard:{},master:{},transfer:{},firm:{},side:{},bull:{},mate:{},rank:{},board:{},brace:{},grade:{},better:{},course:{},natural:{},butt:{},camp:{},crop:{},date:{},fold:{},help:{},hunt:{},count:{},court:{},crush:{},major:{},march:{},tease:{},tough:{},flight:{},forward:{},division:{},commission:{},jam:{},rat:{},gray:{},hood:{},jerk:{},miss:{},pile:{},pool:{},rear:{},whip:{},bench:{},chain:{},cycle:{},grind:{},guide:{},stiff:{},troll:{},union:{},circle:{},carrier:{},defence:{},defense:{},radical:{},reserve:{},intimate:{},opposite:{},superior:{},grey:{},host:{},knot:{},left:{},lost:{},blind:{},crank:{},panel:{},rally:{},state:{},tramp:{},waver:{},clutch:{},living:{},runner:{},steady:{},stream:{},combine:{},company:{},convert:{},general:{},moderate:{},alternate:{},ace:{},crab:{},flop:{},fund:{},pair:{},rake:{},rock:{},sick:{},blade:{},cheat:{},sport:{},caller:{},column:{},couple:{},divine:{},pledge:{},simple:{},sponge:{},system:{},wanton:{},sleeper:{},business:{},associate:{},instrument:{},substitute:{},gun:{},sum:{},alto:{},best:{},buff:{},dear:{},mass:{},cream:{},creep:{},giant:{},labor:{},pilot:{},sneak:{},stack:{},staff:{},world:{},gutter:{},jumper:{},labour:{},lather:{},picket:{},reader:{},savage:{},captain:{},culture:{},monitor:{},neutral:{},unknown:{},utility:{},inferior:{},initiate:{},innocent:{},national:{},transpose:{},association:{},professional:{},bum:{},fan:{},law:{},deck:{},fool:{},join:{},kink:{},page:{},pink:{},stud:{},twin:{},clump:{},coach:{},dance:{},drone:{},extra:{},feast:{},fence:{},fleet:{},flock:{},ghost:{},clear:{},right:{},open:{},beat:{},back:{},block:{},see:{},keep:{},square:{},pitch:{},center:{},centre:{},top:{},post:{},field:{},spot:{},bar:{},end:{},frame:{},rough:{},address:{},quarter:{},position:{},land:{},bound:{},range:{},seat:{},dark:{},rail:{},cross:{},section:{},tip:{},plug:{},port:{},stall:{},corner:{},outside:{},dig:{},way:{},front:{},joint:{},patch:{},reach:{},thick:{},medium:{plural:"media"},dock:{},ruin:{},tack:{},floor:{},bottom:{},puddle:{},compound:{},retreat:{},mat:{},belt:{},dump:{},scene:{},space:{},border:{},common:{},cradle:{},inside:{},surface:{},lie:{},boot:{},clog:{},coil:{},nest:{},wire:{},yard:{},forge:{},limit:{},lodge:{},buffer:{},middle:{},capital:{},overhead:{},preserve:{},terminal:{},direction:{},hall:{},loft:{},plot:{},tape:{},grate:{},stoop:{},fringe:{},circuit:{},distance:{},derivation:{},bent:{},gate:{},mill:{},safe:{},sail:{},hedge:{},paint:{},parcel:{},sphere:{},bearing:{},profile:{},shelter:{},crossing:{},interior:{},reservation:{},area:{},bush:{},cork:{},dive:{},limb:{},raft:{},shed:{},zone:{},chase:{},cut:{},light:{},charge:{},check:{},work:{},stock:{},stick:{},flat:{},crack:{},press:{},settle:{},spread:{},wash:{},well:{},swing:{},fly:{},tap:{},stretch:{},shot:{},black:{},strip:{},separate:{},tie:{},rack:{},match:{},piece:{},shell:{},still:{},present:{},trim:{},spike:{},split:{},white:{},yield:{},squeeze:{},bolt:{},fret:{},choke:{},float:{},track:{},low:{},crown:{},screen:{},die:{plural:"dice"},pin:{},chip:{},mold:{},seal:{},draft:{},shade:{},shaft:{},stuff:{},switch:{},balance:{},reverse:{},subject:{},approach:{},beam:{},bill:{},card:{},link:{},sack:{},sink:{},trap:{},spare:{},credit:{},counter:{},express:{},positive:{},net:{},pay:{},ball:{},bond:{},bowl:{},horn:{},pole:{},wing:{},glass:{},grant:{},smack:{},collar:{},record:{},ruffle:{},silver:{},negative:{},cap:{},lap:{},pad:{},rag:{},rig:{},bend:{},clip:{},fine:{},flap:{},heel:{},pall:{},pump:{},gauge:{},image:{},plain:{},print:{},slick:{},spoil:{},clinch:{},gather:{},offset:{},pocket:{},relief:{},channel:{},whistle:{},irregular:{},transport:{},bat:{},ice:{},peg:{},pot:{},bust:{},grip:{},hole:{},nail:{},poke:{},slug:{},spat:{},stem:{},suit:{},yoke:{},flood:{},grand:{},gross:{},perch:{},slip:{},down:{},shoot:{},ground:{},discharge:{},solid:{},kill:{},slack:{},waste:{},rush:{},grain:{},shake:{},pit:{},mould:{},colour:{},render:{},mount:{},cutting:{},fill:{},flux:{},tail:{},plaster:{},swallow:{},concentrate:{},bay:{},gum:{},ray:{},slop:{},spur:{},extract:{},fat:{},hop:{},corn:{},rust:{},smut:{},label:{},stain:{},composition:{},gas:{},pip:{},duck:{},gall:{},lime:{},mint:{},tick:{},stalk:{},whiff:{},cement:{},rubber:{},conjugate:{},preparation:{},dun:{},dust:{},jade:{},mire:{},pulp:{},snag:{},bloom:{},caper:{},crude:{},fluid:{},frost:{},paste:{},rinse:{},steam:{},straw:{},corona:{},poison:{},refuse:{},savory:{},feather:{},ferment:{},organic:{},chestnut:{},mushroom:{},percolate:{},sublimate:{},synthetic:{},suspension:{},precipitate:{},cod:{},pet:{},rod:{},bunt:{},crow:{},hide:{},punk:{},vein:{},assay:{},goose:{plural:"geese"},olive:{},stray:{},trash:{},ginger:{},pepper:{},permit:{},polish:{},sorrel:{},blister:{},bristle:{},complex:{},filling:{},flicker:{},harvest:{},scollop:{},whiting:{},anteater:{},snowball:{},tincture:{},repellent:{},ink:{},lip:{},nag:{},rue:{},wad:{},acid:{},beak:{},bean:{},coal:{},dirt:{},fawn:{},fuel:{},lark:{},ling:{},mash:{},palm:{},pelt:{},plum:{},pony:{},pout:{},soil:{},stag:{},bream:{},brier:{},chalk:{},coral:{},fiber:{},fall:{},pass:{},lift:{},go:{},roll:{},drop:{},blow:{},return:{},strike:{},rise:{},snap:{},shift:{},twist:{},case:{},deal:{},start:{},deep:{},jump:{},step:{},stop:{},pound:{},advance:{},pop:{},flash:{},rest:{},crash:{},score:{},figure:{},leave:{},smash:{},stroke:{},first:{},sweep:{},even:{},flow:{},kick:{},heave:{},trace:{},opening:{},full:{},gain:{},jack:{},spin:{},wave:{},splash:{},bob:{},bang:{},dash:{},flick:{},hitch:{},prime:{},proof:{},passing:{},bit:{},click:{},knock:{},swell:{},trouble:{},collapse:{},movement:{},standard:{},variation:{},rap:{},boom:{},bump:{},clap:{},pace:{},peck:{},zero:{},blaze:{},speed:{},spell:{},treat:{},bounce:{},factor:{},little:{},plunge:{},scrape:{},single:{},ban:{},mix:{},one:{},mesh:{},roar:{},tilt:{},climb:{},flip:{},puff:{},bite:{},feed:{},bitter:{},chop:{},sour:{},special:{},crisp:{},tonic:{},scallop:{},mess:{},quick:{},smear:{},fillet:{},curl:{},malt:{},glaze:{},souse:{},breast:{},humour:{},draught:{},delicacy:{},dressing:{},transplant:{},hip:{},sop:{},kiss:{},mush:{},neck:{},belly:{},frank:{},jumble:{},junket:{},trifle:{},stomach:{},clot:{},shin:{},stew:{},tart:{},cheek:{},graft:{},molar:{},roast:{},spice:{},stout:{},sweat:{},groove:{},region:{},savoury:{},western:{},backbone:{},conserve:{},dominant:{},macerate:{},melancholy:{},cake:{},lens:{},loaf:{plural:"loaves"},menu:{},must:{},peel:{},pore:{},suds:{},butch:{},cling:{},curry:{},drool:{},honey:{},jerky:{},juice:{},mince:{},nasal:{},nerve:{},sauce:{},tract:{},dainty:{},entree:{},facial:{},relish:{},squash:{},brittle:{},caramel:{},cordial:{},fissure:{},oblique:{},adhesion:{},turnover:{},nonpareil:{},posterior:{},vegetation:{},ail:{},orb:{},pap:{},rum:{},brew:{},chew:{},hash:{},lard:{},rump:{},brine:{},dowdy:{},farce:{},flour:{},fudge:{},halal:{},icing:{},lunch:{},play:{},make:{},hold:{},close:{},mark:{},form:{},order:{},support:{},rule:{},sign:{},hang:{},drag:{},feel:{},find:{},shock:{},mean:{},offer:{},study:{},show:{},tone:{},flare:{},attack:{},act:{},life:{plural:"lives"},stay:{},think:{},secret:{},account:{},hurt:{},note:{},taste:{},report:{},measure:{},condition:{},cry:{},focus:{plural:"foci"},style:{},thing:{},title:{},recall:{},average:{},contract:{},dissolve:{},so:{},aim:{},bind:{},heat:{},know:{},stir:{},claim:{},power:{},demand:{},design:{},notice:{},source:{},upgrade:{},resolution:{},bid:{},skim:{},brand:{},curve:{},sight:{},smoke:{},digest:{},regard:{},passage:{},program:{},exposure:{},interest:{},character:{},projection:{},lay:{},curse:{},favor:{},remit:{},sense:{},slash:{},wedge:{},bubble:{},excuse:{},favour:{},invite:{},mantle:{},salute:{},stress:{},survey:{},temper:{},comfort:{},neglect:{},resolve:{},respect:{},torment:{},conflict:{},dispatch:{},standing:{},challenge:{},programme:{},background:{},conclusion:{},impression:{},particular:{},withdrawal:{},cite:{},echo:{},hail:{},rip:{},lot:{},great:{},relay:{},tenor:{},browse:{},bundle:{},chorus:{},cypher:{},fellow:{},litter:{},marine:{},native:{},occult:{},plague:{},rocker:{},scheme:{},series:{plural:"series"},social:{},streak:{},sucker:{},teaser:{},antique:{},battery:{},bracket:{},founder:{},gallery:{},liberal:{},starter:{},turnout:{},witness:{},diagonal:{},familiar:{},ordinary:{},prospect:{},sequence:{},aggregate:{},authority:{},community:{},dependent:{},desperate:{},patronage:{},primitive:{},principal:{},complement:{},engagement:{},foundation:{},generation:{},settlement:{},combination:{},lightweight:{},steamroller:{},subordinate:{},organisation:{},establishment:{},representative:{},con:{},fox:{},kid:{},pod:{},red:{},sex:{},spy:{},vet:{},aged:{},bore:{},diet:{},fare:{},gown:{},hawk:{},heap:{},herd:{},hive:{},lump:{},romp:{},sort:{},agent:{},alien:{},beard:{},brave:{},breed:{},brood:{},canon:{},craft:{},crazy:{},devil:{},dummy:{},equal:{},flake:{},groom:{},mound:{},organ:{},scrub:{},toast:{},troop:{},youth:{},colony:{},copper:{},cutter:{},escort:{},feeder:{},junior:{},maroon:{},matrix:{plural:"matrices"},modern:{},muscle:{},people:{},sector:{},shrink:{},tinker:{},topper:{},booster:{},gallant:{},hostile:{},marshal:{},network:{},nucleus:{plural:"nuclei"},premier:{},scourge:{},secular:{},sitting:{},snapper:{},suspect:{},swagger:{},traffic:{},variant:{},cardinal:{},derelict:{},domestic:{},favorite:{},finisher:{},graduate:{},humanist:{},infernal:{},magazine:{},manifold:{},minister:{},palatine:{},presence:{},receiver:{},relation:{},favourite:{},following:{},goldbrick:{},operative:{},sensitive:{},syndicate:{},complexion:{},mouthpiece:{},withdrawer:{},appointment:{},conjugation:{},constituent:{},heavyweight:{},incompetent:{},independent:{},replacement:{},underground:{},untouchable:{},conservative:{},administration:{},ape:{},gem:{},hob:{},sap:{},van:{},axis:{plural:"axes"},chap:{},char:{},crew:{},cult:{},duet:{},gang:{},hero:{},hire:{},lamb:{},lame:{},mute:{},nude:{},pawn:{},pill:{},sage:{},soul:{},tout:{},trio:{},ward:{},worm:{},bunch:{},crimp:{},dwarf:{},elect:{},flank:{},ideal:{},noble:{},octet:{},quack:{},saint:{},scrag:{},shark:{},shoal:{},silly:{},skunk:{},super:{},witch:{},zombi:{},agency:{},anchor:{},backup:{},batter:{},buster:{},canary:{},circus:{},dealer:{},domain:{},doomed:{},genius:{},gossip:{},herald:{},hoodoo:{},hopper:{},immune:{},jockey:{},legion:{},member:{},nature:{},orphan:{},parade:{},peanut:{},pillar:{},pirate:{},player:{},porter:{},pusher:{},putter:{},senior:{},septet:{},sestet:{},sextet:{},surety:{},tapper:{},tiller:{},zombie:{},adjunct:{},butcher:{},captive:{},cascade:{},chapter:{},charity:{},checker:{},chicane:{},chicken:{},climber:{},cognate:{},consort:{},cracker:{},dresser:{},gentile:{},invalid:{},knocker:{},lineage:{},mission:{},mixture:{},monster:{},offence:{},partner:{},pioneer:{},pitcher:{},quartet:{},quintet:{},recruit:{},referee:{},shooter:{},spoiler:{},sponsor:{},stemmer:{},steward:{},striker:{},terrace:{},alliance:{},castrate:{},designer:{},director:{},ensemble:{},faithful:{},friendly:{},mandarin:{},operator:{},romantic:{},accessory:{},annoyance:{},attendant:{},bourgeois:{},precedent:{},quadruple:{},reception:{},recession:{},religious:{},reprobate:{},satellite:{},selection:{},sensation:{},supporter:{},contingent:{},convention:{},expedition:{},incendiary:{},individual:{},masquerade:{},population:{},sweetheart:{},tubercular:{},confederate:{},cooperative:{},subdivision:{},territorial:{},transcriber:{},intelligence:{},registration:{},sophisticate:{},welterweight:{},revolutionary:{},ex:{},ass:{},cog:{},cub:{},den:{},dud:{},duo:{},ham:{},hog:{},mob:{},pro:{},deaf:{},dove:{},fate:{},five:{},folk:{},gull:{},jinx:{},mime:{},nark:{},nine:{},pest:{},prey:{},quad:{},rash:{},scab:{},sire:{},wisp:{},wood:{},zany:{},armor:{},batch:{},bogey:{},caste:{},chief:{},choir:{},clone:{},divan:{},drunk:{},elder:{},enemy:{},exile:{},faith:{},flirt:{},grunt:{},joker:{},lobby:{},louse:{plural:"lice"},pagan:{},pivot:{},racer:{},rebel:{},scout:{},siren:{},slave:{},swarm:{},timid:{},triad:{},tribe:{},armour:{},bearer:{},censor:{},choker:{},convoy:{},covert:{},damned:{},deputy:{},empire:{},goffer:{},gopher:{},huddle:{},killer:{},league:{},martyr:{},muster:{},mystic:{},outfit:{},packet:{},palace:{},passer:{},patrol:{},potter:{},quarry:{},rigger:{},ringer:{},rustic:{},scribe:{},sitter:{},slider:{},slouch:{},squire:{},squirt:{},stupid:{},summit:{},tailor:{},tenant:{},terror:{},tracer:{},turkey:{},turner:{},venter:{},voider:{},voodoo:{},walker:{},worthy:{},academy:{},agonist:{},amateur:{},ancient:{},banquet:{},cabinet:{},cashier:{},classic:{},commune:{},courser:{},crammer:{},current:{},divider:{},economy:{},edition:{},emperor:{},entrant:{},fireman:{},lookout:{},octette:{},orderly:{},painter:{},pervert:{},plotter:{},plunger:{},roaster:{},sampler:{},scanner:{},sellout:{},skimmer:{},skipper:{},society:{},soprano:{},spastic:{},spotter:{},stratum:{plural:"strata"},trimmer:{},tripper:{},trooper:{},tumbler:{},upstart:{},veteran:{},wheeler:{},academic:{},agnostic:{},aviation:{},backstop:{},baritone:{},calendar:{},casualty:{},colonial:{},divinity:{},fireball:{},homeless:{},huckster:{},marriage:{},militant:{},military:{},ministry:{},modifier:{},partisan:{},pedigree:{},possible:{},recorder:{},regiment:{},renegade:{},repeater:{},revenant:{},septette:{},sextette:{},shepherd:{},stalwart:{},stringer:{},stripper:{},whistler:{},affiliate:{},ascendant:{},bacchanal:{},canvasser:{},cockscomb:{},collector:{},comforter:{},commander:{},companion:{},conductor:{},crossover:{},eccentric:{},executive:{},fledgling:{},franchise:{},freelance:{},incumbent:{},mercenary:{},moderator:{},neighbour:{},newspaper:{},patriarch:{},patrician:{},portfolio:{},quartette:{},quintette:{},repertory:{},secretary:{},segregate:{},spearhead:{},stigmatic:{},summation:{},transient:{},trumpeter:{},voluntary:{},absolutism:{},anthropoid:{},apparition:{},assemblage:{},collective:{},contractor:{},delinquent:{},episcopate:{},exaltation:{},exposition:{},illiterate:{},judicature:{},leadership:{},lieutenant:{},minimalist:{},percussion:{},profligate:{},provincial:{},rendezvous:{},brotherhood:{},determinant:{},distributor:{},interpreter:{},stipendiary:{},analphabetic:{},antediluvian:{},civilisation:{},civilization:{},commonwealth:{},conglomerate:{},contemporary:{},cosmopolitan:{},humanitarian:{},neighborhood:{},thoroughbred:{},ultramontane:{},concatenation:{},featherweight:{},superordinate:{},classification:{},fundamentalist:{},cop:{},don:{},eon:{},gal:{},gob:{},god:{},hoe:{},kin:{},nan:{},pup:{},wag:{},wit:{},aeon:{},ally:{},bard:{},chum:{},clew:{},dean:{},fink:{},flak:{},geek:{},goof:{},hulk:{},idol:{},lady:{},loon:{},mace:{},para:{},ruck:{},seer:{},self:{plural:"selves"},adder:{},angel:{},augur:{},baron:{},blond:{},brick:{},brute:{},cabal:{},champ:{},comic:{},crier:{},decoy:{},demon:{},diner:{},diver:{},diwan:{},drove:{},envoy:{},fiend:{},flack:{},flier:{},flyer:{},freak:{},gaudy:{},harpy:{},horde:{},indie:{},jewel:{},leech:{},levee:{},liege:{},locus:{},loser:{},mimic:{},needy:{},nymph:{},oiler:{},poser:{},pupil:{},riser:{},roper:{},rummy:{},scold:{},squad:{},timer:{},tutor:{},usher:{},vicar:{},whale:{},wiper:{},affine:{},albino:{},angler:{},badass:{},baster:{},beggar:{},blonde:{},bomber:{},bowler:{},butter:{},carver:{},caster:{},chichi:{},clinic:{},closer:{},cohort:{},coiner:{},comber:{},cookie:{},cordon:{},corpus:{},cotter:{},cowboy:{},coyote:{},critic:{},dragon:{},drawer:{},drudge:{},eleven:{},ensign:{},estate:{},ethnic:{},exarch:{},finder:{},fodder:{},gaffer:{},gainer:{},galaxy:{},granny:{},hacker:{},hedger:{},heller:{},holder:{},honker:{},hooker:{},hotdog:{},inmate:{},intern:{},jungle:{},knight:{},kvetch:{},lineup:{},lovely:{},magpie:{},maiden:{},mailer:{},maniac:{},matron:{},miller:{},muller:{},nation:{},opener:{},ouster:{},packer:{},parrot:{},patron:{},peeler:{},peeper:{},polity:{},poster:{},powwow:{},punter:{},puppet:{},purdah:{},racist:{},rafter:{},ramrod:{},redact:{},regent:{},rusher:{},sailor:{},scorer:{},seeder:{},shaver:{},slaver:{},slicer:{},smoker:{},snitch:{},syntax:{},tacker:{},tagger:{},tanker:{},tartar:{},teller:{},thrush:{},trigon:{},troika:{},truant:{},tucker:{},tyrant:{},umpire:{},undoer:{},vestal:{},virgin:{},votary:{},warren:{},washer:{},wetter:{},winder:{},winner:{},wizard:{},admirer:{},amnesic:{},analyst:{},anomaly:{},aphasic:{},armorer:{},arrival:{},ascetic:{},auditor:{},baggage:{},bastion:{},biology:{},boarder:{},brahman:{},brahmin:{},breaker:{},caravan:{},clapper:{},cluster:{},coaster:{},cobbler:{},college:{},convict:{},council:{},counsel:{},coxcomb:{},crawler:{},creeper:{},crewman:{},crimper:{},darling:{},destiny:{},dragoon:{},dreamer:{},duality:{},echelon:{},ejector:{},fiddler:{},fighter:{},flasher:{},forbear:{},harrier:{},holdout:{},hostess:{},incubus:{},ingenue:{},justice:{},kachina:{},kindred:{},kingpin:{},macumba:{},manikin:{},marcher:{},married:{},newborn:{},notable:{},nursing:{},outpost:{},parvenu:{},patient:{},payroll:{},peasant:{},phalanx:{},phantom:{},planter:{},platoon:{},plodder:{},poacher:{},printer:{},prodigy:{},puncher:{},realist:{},redhead:{},revival:{},runaway:{},scholar:{},sharpie:{},skidder:{},slicker:{},slogger:{},smasher:{},snorter:{},snuffer:{},spinner:{},splicer:{},stalker:{},stamper:{},standby:{},stepper:{},striper:{},sweeper:{},thrower:{},triplet:{},utopian:{},utterer:{},voucher:{},washout:{},watcher:{},wiggler:{},wrecker:{},affluent:{},armourer:{},attender:{},bacchant:{},bachelor:{},bankrupt:{},bisexual:{},bondsman:{},cautious:{},congress:{},corporal:{},creature:{},decadent:{},defeated:{},delegate:{},diabetic:{},dictator:{},dyslexic:{},effector:{},exponent:{},flagging:{},freshman:{},fugitive:{},futurist:{},garrison:{},greyback:{},hangover:{},humanism:{},immortal:{},juvenile:{},lapidary:{},mainstay:{},mannikin:{},maverick:{},mechanic:{},minority:{},minstrel:{},mistress:{},monotype:{},mutation:{},nativist:{},neophyte:{},neurotic:{},newsroom:{},nobility:{},opponent:{},pacifier:{},pantheon:{},planting:{},probable:{},producer:{},recusant:{},referral:{},reminder:{},retainer:{},ruralism:{},scalawag:{},scrubber:{},searcher:{},sergeant:{},sociable:{},songster:{},splitter:{},squadron:{},straggle:{},strawman:{},survivor:{},taxonomy:{},treasury:{},vanguard:{},virtuoso:{},walloper:{},warhorse:{},yearling:{},alcoholic:{},anorectic:{},artificer:{},artillery:{},attracter:{},attractor:{},automaton:{},auxiliary:{},barbarian:{},bombshell:{},brokerage:{},coalition:{},concourse:{},contralto:{},counselor:{},crewwoman:{},cyberpunk:{},defaulter:{},deliverer:{},democracy:{},dependant:{},descender:{},dissident:{},dyspeptic:{},feudatory:{},firewoman:{},flyweight:{},incurable:{},institute:{},insurgent:{},intellect:{},introvert:{},mandatory:{},mendicant:{},middleman:{},navigator:{},organiser:{},organizer:{},pluralism:{},pluralist:{},pothunter:{},precursor:{},predictor:{},presenter:{},pretender:{},processor:{},proconsul:{},publisher:{},quintuple:{},registrar:{},regulator:{},scallywag:{},scavenger:{},scrambler:{},scratcher:{},serration:{},singleton:{},stargazer:{},stockpile:{},successor:{},surrogate:{},symbolism:{},temporary:{},throwback:{},trickster:{},warrantee:{},womanhood:{},antagonist:{},attendance:{},blackguard:{},bondswoman:{},chancellor:{},classifier:{},conference:{},conformist:{},counsellor:{},crossroads:{},descendant:{},descendent:{},doorkeeper:{},embodiment:{},expatriate:{},federation:{},fellowship:{},filibuster:{},forerunner:{},fratricide:{},grandstand:{},mastermind:{},minstrelsy:{},missionary:{},ordination:{},plantation:{},powerhouse:{},quadruplet:{},quintuplet:{},repatriate:{},republican:{},respondent:{},rubberneck:{},salamander:{},scholastic:{},separatism:{},sisterhood:{},subscriber:{},subsidiary:{},supplicant:{},suppresser:{},suppressor:{},timekeeper:{},translator:{},university:{},wallflower:{},abomination:{},academician:{},agriculture:{},anachronism:{},antiquarian:{},beneficiary:{},bureaucracy:{},clairvoyant:{},conditioner:{},confederacy:{},consumptive:{},deification:{},enlightened:{},incarnation:{},lilliputian:{},middlewoman:{},narcoleptic:{},nationalist:{},partnership:{},peacekeeper:{},peripatetic:{},pontificate:{},progression:{},prosecution:{},quarterback:{},recessional:{},romanticist:{},shipbuilder:{},transmitter:{},transsexual:{},underwriter:{},undesirable:{},utilitarian:{},acquaintance:{},bantamweight:{},collaborator:{},congregation:{},conservatory:{},countertenor:{},demonstrator:{},denomination:{},headquarters:{},illegitimate:{},investigator:{},metropolitan:{},middleweight:{},noncombatant:{},philharmonic:{},schoolmaster:{},sharpshooter:{},totalitarian:{},authoritarian:{},confederation:{},correspondent:{},reincarnation:{},schizophrenic:{},supernumerary:{},categorization:{},tatterdemalion:{},instrumentality:{},internationalist:{},bey:{},cox:{},cur:{},few:{},foe:{},hag:{},lad:{},mod:{},obi:{},sib:{},aide:{},amah:{},anti:{},army:{},beau:{},bevy:{},bogy:{},chit:{},clod:{},coon:{},czar:{},dada:{},dame:{},derp:{},dodo:{},dude:{},duke:{},dupe:{},gild:{},giro:{},goat:{},goon:{},grad:{},guru:{},heir:{},hobo:{},hunk:{},jilt:{},jock:{},jury:{},khan:{},maid:{},naif:{},navy:{},nerd:{},peri:{},pimp:{},putz:{},sect:{},suer:{},swot:{},tuft:{},adept:{},baker:{},basso:{},beast:{},bride:{},bunny:{},cadre:{},comer:{},cooky:{},corps:{},covey:{},deist:{},edger:{},elite:{},emcee:{},enate:{},faery:{},fatty:{},fauna:{},felon:{},filer:{},flora:{},folks:{},forum:{},genus:{plural:"genera"},ghoul:{},gipsy:{},giver:{},gnome:{},grove:{},gypsy:{},hajji:{},hakim:{},junky:{},knave:{},lefty:{},leper:{},loony:{},macho:{},madam:{},magus:{},medic:{},mezzo:{},miler:{},mooch:{},mufti:{},nabob:{},nexus:{},ninja:{},obeah:{},parer:{},pigmy:{},poilu:{},ponce:{},prior:{},proxy:{},puppy:{},pygmy:{},quint:{},raver:{},rover:{},satyr:{},scamp:{},sheik:{},shill:{},shrew:{},sibyl:{},sissy:{},slain:{},smith:{},snoop:{},sprog:{},stoic:{},sylph:{},taker:{},thane:{},toady:{},totem:{},trier:{},tryst:{},tuner:{},twirp:{},uncle:{},valet:{},vegan:{},vixen:{},waker:{},widow:{},wight:{},wirer:{},yenta:{},agnate:{},alexic:{},amazon:{},audile:{},avatar:{},avower:{},bagger:{},bagman:{},banker:{},barber:{},barker:{},bather:{},bawler:{},beater:{},beldam:{},bidder:{},boater:{},brewer:{},broker:{},brunet:{},bureau:{},caddie:{},camper:{},cantor:{},caucus:{},chaser:{},cherub:{},chosen:{},coeval:{},cooper:{},coquet:{},cottar:{},craven:{},cubist:{},daemon:{},deacon:{},digger:{},dodger:{},dowser:{},duette:{},dunker:{},egoist:{},eldest:{},eparch:{},erotic:{},eyeful:{},faller:{},fitter:{},flunky:{},forger:{},framer:{},gaggle:{},gagman:{},gamine:{},gasbag:{},gillie:{},goalie:{},gouger:{},grouch:{},gunman:{},gunner:{},hamlet:{},hanger:{},hawker:{},heaver:{},hermit:{},hitter:{},hummer:{},iceman:{},joiner:{},junkie:{},jurist:{},keeper:{},kelpie:{},kisser:{},lackey:{},lector:{},lifter:{},lister:{},lizard:{},loader:{},loaner:{},logjam:{},longer:{},lubber:{},lumper:{},lyceum:{},madcap:{},maenad:{},maimed:{},masher:{},medico:{},menial:{},midden:{},midget:{},minder:{},moiety:{},motile:{},nester:{},oblate:{},oilman:{},parish:{},paster:{},pelter:{},phylum:{},picker:{},plenum:{},police:{},pruner:{},psyche:{},puller:{},python:{},rabble:{},raider:{},raiser:{},ranger:{},ranker:{},rapper:{},reaper:{},redcap:{},reeler:{},regime:{},renter:{},rifler:{},romper:{},sachem:{},salter:{},sawyer:{},sealer:{},seeker:{},sender:{},sexist:{},shaker:{},shaper:{},sharpy:{},signer:{},silvan:{},sleuth:{},smiler:{},sorter:{},sphinx:{},stager:{},stater:{},supper:{},sylvan:{},talent:{},tanner:{},tester:{},theist:{},throng:{},tilter:{},tipper:{},toller:{},tosser:{},tourer:{},townie:{},trusty:{},varlet:{},vermin:{},vestry:{},victor:{},virago:{},voicer:{},waster:{},weasel:{},weaver:{},weeder:{},weeper:{},weirdo:{},whaler:{},winker:{},wraith:{},wretch:{},yakuza:{},yeoman:{},adapter:{},admiral:{},airhead:{},amalgam:{},animist:{},aphakic:{},applier:{},arbiter:{},armiger:{},atheist:{},attache:{},babbler:{},baffled:{},beldame:{},beloved:{},berserk:{},bondman:{},bounder:{},brigade:{},browser:{},buffoon:{},bulimic:{},burgher:{},caitiff:{},carload:{},catcher:{},cavalry:{},chachka:{},changer:{},charmer:{},chemist:{},cocotte:{},collage:{},compere:{},shadow:{},layer:{},north:{},orbit:{},trend:{},truss:{},vault:{},bunker:{},harbor:{},orient:{},origin:{},resort:{},safety:{},target:{},chamber:{},extreme:{},harbour:{},kingdom:{},mandate:{},outline:{},station:{},blockade:{},darkness:{},overlook:{},landscape:{},northeast:{},northwest:{},partition:{},southeast:{},southwest:{},structure:{},atmosphere:{},lug:{},tee:{},balk:{},burr:{},cage:{},drip:{},east:{},fort:{},hoop:{},west:{},cleat:{},fluke:{},scour:{},south:{},beacon:{},closet:{},duplex:{},radius:{plural:"radii"},vacuum:{},wattle:{},canteen:{},grounds:{},cloister:{},pinnacle:{},property:{},surround:{},terminus:{},anchorage:{},barricade:{},honeycomb:{},turnaround:{},institution:{},termination:{},cab:{},dam:{},brim:{},calk:{},dome:{},goal:{},hill:{},hull:{},knob:{},prop:{},seam:{},site:{},turf:{},apron:{},arena:{},baulk:{},cabin:{},grill:{},groin:{},haunt:{},lever:{},niche:{},privy:{},works:{},airway:{},barren:{},corral:{},dugout:{},fender:{},galley:{},hurdle:{},lounge:{},outlet:{},refuge:{},sconce:{},sprawl:{},temple:{},toilet:{},wicket:{},barrack:{},bulwark:{},buttery:{},cornice:{},grating:{},landing:{},leeward:{},maximum:{},pasture:{},salient:{},shingle:{},squinch:{},surgery:{},building:{},cylinder:{},downtown:{},fountain:{},landmark:{},munition:{},quadrant:{},rearward:{},sideline:{},windward:{},homestead:{},multiplex:{},perfumery:{},residence:{},stretcher:{},substrate:{},excavation:{},silhouette:{},convenience:{},culmination:{},declination:{},architecture:{},spa:{},aery:{},brow:{},bung:{},dike:{},flue:{},hell:{},tent:{},abbey:{},aisle:{},arbor:{},attic:{},booth:{},brink:{},disco:{},oxbow:{},oxeye:{},quoin:{},realm:{},salon:{},villa:{},whorl:{},barony:{},barrow:{},bazaar:{},billet:{},bustle:{},canton:{},casing:{},cellar:{},cooler:{},garage:{},ghetto:{},grille:{},hearth:{},locker:{},midway:{},muffle:{},oracle:{},remise:{},saloon:{},stocks:{},studio:{},tiptop:{},uptown:{},volute:{},arsenal:{},chassis:{},cockpit:{},commons:{},cubicle:{},dockage:{},fairway:{},fencing:{},gondola:{},heading:{},hotspot:{},lattice:{},lodging:{},minimum:{},moorage:{},pannier:{},rattrap:{},rootage:{},stowage:{},theater:{},theatre:{},vacuity:{},baseline:{},butchery:{},buttress:{},clearing:{},crosscut:{},domicile:{},erection:{},exterior:{},fanlight:{},fastness:{},firewall:{},foothold:{},frontier:{},lavatory:{},memorial:{},monument:{},mortuary:{},overhang:{},pedestal:{},scenario:{},solitude:{},sprocket:{},stockade:{},stoppage:{},vaulting:{},bombproof:{},cathedral:{},fundament:{},hindrance:{},panhandle:{},proximity:{},resonator:{},sanctuary:{},territory:{},watershed:{},confluence:{},department:{},encampment:{},flashpoint:{},groundwork:{},hinderance:{},quartering:{},substratum:{},underbelly:{},breadbasket:{},columbarium:{},destination:{},engineering:{},equinoctial:{},planetarium:{},penitentiary:{},circumference:{},confectionery:{},fortification:{},hub:{},hut:{},lee:{},sty:{},acme:{},apex:{},barn:{},brig:{},coop:{},digs:{},holy:{},jail:{},jook:{},juke:{},loge:{},mall:{},nook:{},pave:{},sash:{},silo:{},slum:{},tope:{},weir:{},abode:{},aerie:{},altar:{},bazar:{},detox:{},haven:{},heath:{},hutch:{},kraal:{},lager:{},manor:{},manse:{},navel:{},oasis:{plural:"oases"},opera:{},paddy:{},plaza:{},pylon:{},rodeo:{},shire:{},spile:{},sprag:{},venue:{},visor:{},apogee:{},arcade:{},ashram:{},asylum:{},atrium:{},bagnio:{},bailey:{},barrio:{},belfry:{},boards:{},casino:{},chapel:{},county:{},creche:{},cupola:{},deckle:{},fraise:{},haymow:{},hostel:{},kennel:{},lancet:{},larder:{},lockup:{},mihrab:{},parlor:{},plaque:{},prefab:{},prison:{},spigot:{},stacks:{},tampon:{},turret:{},vertex:{},zodiac:{},automat:{},balcony:{},batwing:{},benthos:{},borough:{},bubbler:{},bullpen:{},cabaret:{},caboose:{},chantry:{},convent:{},deanery:{},demesne:{},derrick:{},desktop:{},drydock:{},dukedom:{},dungeon:{},earldom:{},earplug:{},embassy:{},emirate:{},eparchy:{},equinox:{},fiefdom:{},florist:{},flyover:{},framing:{},funfair:{},grocery:{},hayrack:{},hospice:{},khanate:{},lunette:{},mansion:{},marquee:{},masonry:{},matting:{},midland:{},mooring:{},narthex:{},nirvana:{},obelisk:{},outback:{},parapet:{},parlour:{},pinhead:{},railing:{},rathole:{},redoubt:{},ribbing:{},rotunda:{},sanctum:{},sawmill:{},shipway:{},shoebox:{},stopple:{},tambour:{},transom:{},trellis:{},trestle:{},tribune:{},vantage:{},abutment:{},airspace:{},ambiance:{},ambience:{},backside:{},ballpark:{},basement:{},basilica:{},bioscope:{},bodywork:{},brattice:{},diggings:{},doghouse:{},dominion:{},entrepot:{},environs:{},extremum:{},farmland:{},fireside:{},hacienda:{},hideaway:{},imperium:{},jalousie:{},littoral:{},mantelet:{},mounting:{},nailhead:{},outdoors:{},palisade:{},pharmacy:{},porthole:{},province:{},revolver:{},seascape:{},sidewall:{},steerage:{},stopover:{},suburbia:{},sudatory:{},sweatbox:{},tailgate:{},turnpike:{},wellhead:{},backwater:{},bailiwick:{},beachhead:{},belvedere:{},caliphate:{},caparison:{},cellarage:{},chandlery:{},cloakroom:{},colonnade:{},cookhouse:{},couchette:{},crematory:{},crownwork:{},cubbyhole:{},dollhouse:{},dormitory:{},dripstone:{},fieldwork:{},fireguard:{},forefront:{},guardroom:{},hatchback:{},isoclinal:{},lazaretto:{},lineation:{},mezzanine:{},millinery:{},orphanage:{},outfitter:{},pleasance:{},princedom:{},revetment:{},roadblock:{},scrapheap:{},shrubbery:{},viewpoint:{},viscounty:{},workhouse:{},architrave:{},birthplace:{},borderline:{},bridgehead:{},brownstone:{},chokepoint:{},commissary:{},courthouse:{},escarpment:{},greenhouse:{},ironmonger:{},justiciary:{},laboratory:{},lamination:{},maisonette:{},metropolis:{},obstructor:{},panopticon:{},playground:{},prefecture:{},proscenium:{},quadrangle:{},rotisserie:{},sanatorium:{},suzerainty:{},tenderloin:{},triclinium:{},wellspring:{},wheelhouse:{},condominium:{},conventicle:{},crematorium:{},crenelation:{},demarcation:{},maisonnette:{},observatory:{},reformatory:{},superstrate:{},tobacconist:{},trusteeship:{},wainscoting:{},amphitheater:{},amphitheatre:{},chapterhouse:{},clotheshorse:{},delicatessen:{},fountainhead:{},haberdashery:{},municipality:{},packinghouse:{},patriarchate:{},retrenchment:{},substructure:{},superstratum:{},surroundings:{},wainscotting:{},juxtaposition:{},infrastructure:{},dec:{},inn:{},loo:{},pub:{},burg:{},cafe:{},deli:{},dorm:{},hank:{},iglu:{},kirk:{},lair:{},lawn:{},mart:{},nave:{},oast:{},rink:{},souk:{},tine:{},tipi:{},veld:{},ways:{},wold:{},yurt:{},apsis:{},burgh:{},condo:{},cubby:{},cuddy:{},dacha:{},duchy:{},duomo:{},eaves:{},flies:{},gable:{},glade:{},gulag:{},harem:{},hogan:{},igloo:{},lanai:{},layby:{},mecca:{},midst:{},motel:{},oriel:{},parts:{},patio:{},polls:{},qibla:{},roads:{},rooms:{},sauna:{},skein:{},socle:{},soddy:{},sodom:{},spire:{},stoep:{},stupa:{},tenon:{},tepee:{},tupek:{},tupik:{},veldt:{},weald:{},abatis:{},abbacy:{},alcove:{},apiary:{},arbour:{},aviary:{},bedsit:{},bethel:{},bodega:{},bounds:{},bowels:{},cabana:{},calkin:{},campus:{},carrel:{},casbah:{},casern:{},chalet:{},depths:{},dolmen:{},donjon:{},dormer:{},durbar:{},eatery:{},escarp:{},fipple:{},flange:{},flyway:{},friary:{},furket:{},gantry:{},garret:{},hangar:{},hareem:{},hayrig:{},imaret:{},isobar:{},isohel:{},isolex:{},kasbah:{},laager:{},locale:{},loggia:{},marina:{},masjid:{},meadow:{},medina:{},menhir:{},merlon:{},midair:{},morgue:{},mosque:{},mudhif:{},musjid:{},pagoda:{},paling:{},pantry:{},parvis:{},pelmet:{},piazza:{},pigsty:{},plinth:{},priory:{},pueblo:{},radome:{},setoff:{},skybox:{},skyway:{},stalls:{},storey:{},suburb:{},tenter:{},upside:{},volary:{},wigwam:{},wikiup:{},winery:{},abattis:{},airdock:{},airlock:{},alcazar:{},antapex:{},apadana:{},apojove:{},apolune:{},athanor:{},barroom:{},bascule:{},bedside:{},beeline:{},borstal:{},boudoir:{},brewery:{},brewpub:{},brothel:{},campong:{},cannery:{},capitol:{},carport:{},carrell:{},chancel:{},chateau:{},citadel:{},coaming:{},corncob:{},cottage:{},cowbarn:{},cowshed:{},cowtown:{},crinion:{},dinette:{},diocese:{},earshot:{},edifice:{},enclave:{},exurbia:{},eyeshot:{},fantail:{},feedlot:{},firebox:{},screw:{},share:{},sheet:{},slice:{},slide:{},spill:{},stage:{},stake:{},tread:{},paddle:{},weight:{},canvass:{},compact:{},undercut:{},representation:{},fin:{},gag:{},jet:{},tug:{},bark:{},bunk:{},drum:{},mask:{},pipe:{},reel:{},scan:{},blank:{},drill:{},plumb:{},plume:{},shank:{},sling:{},spray:{},pickup:{},saddle:{},trench:{},capsule:{},security:{},sacrifice:{},technical:{},can:{},jar:{},map:{},ply:{},rib:{},rim:{},web:{},bell:{},buck:{},claw:{},comb:{},copy:{},crib:{},dish:{},fake:{},foil:{},grab:{},kite:{},ramp:{},rent:{},slot:{},spit:{},tank:{},bosom:{},cable:{},charm:{},drain:{},grave:{},price:{},skirt:{},stool:{},strap:{},stump:{},trail:{},access:{},cannon:{},fiddle:{},formal:{},insert:{},launch:{},purple:{},reward:{},strand:{},tackle:{},display:{},floater:{},incline:{},limited:{},portion:{},torpedo:{},overcast:{},puncture:{},broadside:{},duplicate:{},submarine:{},surcharge:{},production:{},interchange:{},bus:{},due:{},gap:{},jaw:{},lag:{},nut:{},tin:{},win:{},arch:{},bail:{},cell:{},dope:{},fell:{},film:{},lace:{},lash:{},mail:{},pale:{},purl:{},rate:{},skid:{},sole:{},spar:{},tuck:{},vamp:{},vent:{},vest:{},brake:{},brass:{},chuck:{},cramp:{},crest:{},drape:{},elbow:{},habit:{},lease:{},lower:{},prize:{},roach:{},royal:{},scrap:{},slate:{},snare:{},snuff:{},total:{},trump:{},beaver:{},canvas:{},future:{},handle:{},header:{},jacket:{},motley:{},muzzle:{},quiver:{},rocket:{},roller:{},staple:{},wrench:{},compass:{},element:{},exhaust:{},frontal:{},thunder:{},transit:{},upstage:{},traverse:{},accession:{},allowance:{},guarantee:{},promenade:{},shipwreck:{},attachment:{},protection:{},perpendicular:{},aid:{},gig:{},gin:{},nap:{},oil:{},ram:{},bead:{},bulb:{},curb:{},dart:{},daub:{},dial:{},dose:{},exit:{},fuse:{},goad:{},item:{},knit:{},plan:{},rein:{},swag:{},veil:{},alarm:{},chart:{},cinch:{},clasp:{},eagle:{},entry:{},fluff:{},gouge:{},lance:{},meter:{},miter:{},pouch:{},probe:{},punch:{},purse:{},sable:{},scuff:{},shear:{},stern:{},taper:{},thumb:{},wharf:{},whisk:{},barrel:{},beetle:{},bronze:{},burden:{},congee:{},fleece:{},glossy:{},halter:{},limber:{},margin:{},mobile:{},needle:{},remote:{},shroud:{},sketch:{},splice:{},stripe:{},toggle:{},trough:{},volume:{},ballast:{},binding:{},blanket:{},costume:{},crackle:{},crystal:{},diamond:{},fitting:{},graphic:{},harness:{},premium:{},product:{},pyramid:{},sandbag:{},squelch:{},trammel:{},uniform:{},venture:{},warrant:{},wildcat:{},working:{},assembly:{},charcoal:{},discount:{},envelope:{},imperial:{},ligature:{},original:{},specific:{},treasure:{},vertical:{},deduction:{},distemper:{},inventory:{},objective:{},reversion:{},whitewash:{},supplement:{},contrivance:{},convertible:{},inspiration:{},intersection:{},counterbalance:{},bet:{},gel:{},gut:{},jag:{},jig:{},pan:{},pry:{},tab:{},tax:{},zip:{},bait:{},barb:{},bomb:{},cone:{},cuff:{},dado:{},disk:{},gear:{},gore:{},grid:{},harp:{},loom:{},main:{},pant:{},pike:{},prod:{},reef:{},ruff:{},sham:{},tare:{},tidy:{},tire:{},toll:{},award:{},basic:{},basin:{},baton:{},birch:{},braid:{},broom:{},clack:{},cloak:{},clout:{},crock:{},fagot:{},ferry:{},filet:{},forte:{},found:{},frail:{},jolly:{},motor:{},pedal:{},potty:{},radio:{},rivet:{},scarf:{},shore:{},shunt:{},sieve:{},splat:{},splay:{},stave:{},steal:{},steel:{},thong:{},tithe:{},torch:{},trunk:{},twine:{},upper:{},valve:{},weave:{},bridle:{},buckle:{},buffet:{},carpet:{},cotton:{},custom:{},devise:{},enamel:{},entail:{},furrow:{},girdle:{},hobble:{},mangle:{},mosaic:{},motive:{},pallet:{},pencil:{},pinion:{},powder:{},radial:{},rattle:{},rebate:{},rumble:{},shield:{},shimmy:{},shovel:{},sledge:{},sluice:{},tablet:{},throne:{},timber:{},tinsel:{},uplift:{},benefit:{},bombard:{},bootleg:{},console:{},default:{},forfeit:{},freight:{},gantlet:{},generic:{},grapple:{},journal:{},loading:{},molding:{},overlap:{},pigment:{},plastic:{},salvage:{},scooter:{},scuffle:{},spindle:{},steamer:{},stopper:{},upright:{},carriage:{},catapult:{},facility:{},laminate:{},medicine:{},offstage:{},overload:{},plastron:{},railroad:{},retrofit:{},strickle:{},throttle:{},whipping:{},wireless:{},automatic:{},blackjack:{},blackwash:{},foliation:{},interlock:{},roughcast:{},threshold:{},antiseptic:{},camouflage:{},incidental:{},intangible:{},preventive:{},reversible:{},watercolor:{},maintenance:{},watercolour:{},differential:{},prescription:{},preventative:{},prophylactic:{},reproduction:{},transcription:{},transportation:{},fob:{},guy:{},hem:{},jug:{},kit:{},saw:{},cane:{},cart:{},clam:{},coif:{},cosy:{},cozy:{},disc:{},felt:{},gash:{},hone:{},hose:{},keel:{},loot:{},luff:{},lure:{},mast:{},mend:{},mine:{},muff:{},nuke:{},plow:{},robe:{},ruby:{},snip:{},soap:{},spud:{},swab:{},tile:{},till:{},tram:{},vane:{},wand:{},weed:{},weld:{},welt:{},audio:{},audit:{},baste:{},bilge:{},brail:{},bugle:{},canal:{},chest:{},chock:{},conge:{},couch:{},crape:{},crepe:{},crook:{},flute:{},frill:{},frock:{},fusee:{},hoist:{},inset:{},kitty:{},leash:{},liner:{},mixer:{},noose:{},novel:{},pearl:{},piano:{},plait:{},quill:{},reset:{},roost:{},saber:{},sabre:{},scull:{},spear:{},squab:{},stilt:{},sulky:{},video:{},vomit:{},wagon:{},aerial:{},armory:{},baffle:{},banner:{},batten:{},binder:{},bodkin:{},bypass:{},canopy:{},chisel:{},clench:{},dollar:{},dredge:{},drogue:{},duster:{},engine:{},excise:{},facing:{},funnel:{},garner:{},hamper:{},joggle:{},kettle:{},lining:{},livery:{},lumber:{},marble:{},mortar:{},mousse:{},nickel:{},ocular:{},payoff:{},pestle:{},piping:{},pommel:{},profit:{},puzzle:{},ransom:{},ration:{},rental:{},ribbon:{},rotary:{},runway:{},saucer:{},seesaw:{},siphon:{},suture:{},tattoo:{},thatch:{},throat:{},tunnel:{},turtle:{},wealth:{},acrylic:{},armoury:{},balloon:{},bargain:{},beehive:{},blinker:{},bolster:{},caisson:{},casting:{},ceiling:{},chariot:{},chopper:{},clarion:{},clinker:{},clipper:{},cowhide:{},earnest:{},elastic:{},expense:{},festoon:{},fortune:{},garnish:{},gravure:{},grinder:{},killing:{},linkage:{},novelty:{},overall:{},overlay:{},pallium:{},perfume:{},pillory:{},pointer:{},ringlet:{},rosette:{},segment:{},shuttle:{},staging:{},trailer:{},trumpet:{},unction:{},barbecue:{},barbeque:{},disguise:{},electric:{},elevated:{},fraction:{},gauntlet:{},gossamer:{},heritage:{},homespun:{},ironclad:{},lifeline:{},lighting:{},mackinaw:{},moulding:{},pinpoint:{},pinwheel:{},poundage:{},sanguine:{},sapphire:{},scribble:{},triangle:{},underlay:{},upstairs:{},virginal:{},admission:{},amphibian:{},backstage:{},capillary:{},cartridge:{},cartwheel:{},cathartic:{},condenser:{},damascene:{},depiction:{},diaphragm:{},medallion:{},overdrive:{},pacemaker:{},reservoir:{},screening:{},sectional:{},solitaire:{},spotlight:{},undercoat:{},assessment:{},bottleneck:{},equatorial:{},overburden:{},pigeonhole:{},pocketbook:{},pontifical:{},refractory:{},reparation:{},roundabout:{},simulation:{},waterproof:{},accelerator:{},certificate:{},inheritance:{},installment:{},restorative:{},ventilation:{},modification:{},subscription:{},hospitalization:{},instrumentation:{},ax:{},axe:{},bib:{},bin:{},bur:{},cot:{},fee:{},fur:{},jib:{},lid:{},six:{},ten:{},tub:{},two:{},bath:{},bike:{},cash:{},coke:{},cope:{},cowl:{},cusp:{},darn:{},debt:{},dice:{},dory:{},duct:{},fore:{},four:{},gaff:{},gage:{},gong:{},helm:{},hemp:{},icon:{},iris:{},junk:{},kern:{},loan:{},maul:{},mink:{},pane:{},pier:{},quid:{},reed:{},rook:{},scum:{},semi:{},sump:{},swob:{},taxi:{},vice:{},ware:{},wool:{},yarn:{},yawl:{},annex:{},atlas:{},barge:{},bevel:{},chaff:{},chute:{},clamp:{},crane:{},crate:{},cubeb:{},dandy:{},dicky:{},dinky:{},dolly:{},dower:{},eight:{},fifty:{},flail:{},floss:{},folio:{},fuzee:{},genre:{},girth:{},gourd:{},grape:{},hinge:{},hobby:{},inlay:{},japan:{},ladle:{},latch:{},linen:{},means:{},mitre:{},motif:{},mulct:{},pique:{},quilt:{},quirk:{},quota:{},rifle:{},rotor:{},setup:{},seven:{},shred:{},skate:{},spade:{},spool:{},spout:{},strut:{},three:{},toner:{},trawl:{},truck:{},twill:{},virtu:{},alpaca:{},anklet:{},argyle:{},argyll:{},arnica:{},balsam:{},bender:{},birdie:{},bishop:{},blower:{},blowup:{},bolero:{},bonnet:{},bounty:{},budget:{},bullet:{},cachet:{},carbon:{},casket:{},castor:{},claxon:{},cobble:{},cobweb:{},collet:{},crenel:{},cutoff:{},cutout:{},damask:{},damper:{},dibble:{},dickey:{},dipper:{},domino:{},douche:{},dragee:{},equity:{},eyelet:{},fetish:{},foible:{},fresco:{},gaiter:{},gibbet:{},gusset:{},heckle:{},hooter:{},horror:{},hunter:{},intake:{},jigger:{},lacing:{},lappet:{},makeup:{},making:{},mallet:{},marker:{},patina:{},paving:{},platen:{},plough:{},poleax:{},portal:{},primer:{},rabbet:{},rattan:{},refill:{},retort:{},revere:{},screed:{},sheath:{},sinker:{},socket:{},splint:{},stereo:{},syphon:{},tamper:{},tandem:{},tarmac:{},tenure:{},ticker:{},trepan:{},twenty:{},velvet:{},veneer:{},vessel:{},vicuna:{},backing:{},bandage:{},bobsled:{},carving:{},central:{},chamfer:{},chequer:{},cistern:{},cleaner:{},cleanup:{},coinage:{},crochet:{},cruiser:{},curtain:{},dilator:{},distaff:{},emerald:{},etching:{},flannel:{},flounce:{},footing:{},gangway:{},garbage:{},garland:{},gauffer:{},gelatin:{},grizzle:{},hanging:{},haywire:{},lamella:{},laniard:{},lanyard:{},lashing:{},lockage:{},lounger:{},manakin:{},masking:{},meshing:{},mileage:{},mintage:{},mortice:{},mortise:{},movable:{},muffler:{},palette:{},pendant:{},pendent:{},pennant:{},pillbox:{},poleaxe:{},portage:{},pottery:{},priming:{},quarrel:{},readout:{},retread:{},roundel:{},rubbing:{},scupper:{},scuttle:{},serpent:{},shampoo:{},shellac:{},shutter:{},snaffle:{},snorkel:{},spangle:{},spouter:{},stabile:{},stinker:{},tankage:{},toehold:{},tracing:{},treadle:{},trefoil:{},truckle:{},trundle:{},vesture:{},webbing:{},whipsaw:{},wrapper:{},additive:{},adjuvant:{},aperture:{},aquatint:{},backdoor:{},basilisk:{},blowback:{},bludgeon:{},breakage:{},causeway:{},checkout:{},clincher:{},compress:{},corduroy:{},coupling:{},crossbar:{},currency:{},detector:{},dividend:{},dogtooth:{},downcast:{},followup:{},frontage:{},giveaway:{},goodwill:{},hardware:{},headgear:{},headshot:{},hypnotic:{},ignition:{},inhalant:{},lipstick:{},masthead:{},meniscus:{},metallic:{},modeling:{},nautilus:{},neckband:{},nightcap:{},ornament:{},outboard:{},partizan:{},pavement:{},pectoral:{},planking:{},plumbing:{},portable:{},pressing:{},radiator:{},remittal:{},residual:{},resource:{},roulette:{},scaffold:{},scapular:{},scissors:{plural:"scissors"},scrabble:{},springer:{},sunburst:{},tapestry:{},taxation:{},thrasher:{},tomahawk:{},totality:{},tympanum:{},valuable:{},vignette:{},wardrobe:{},widening:{},admixture:{},antiquity:{},aquaplane:{},bagatelle:{},bastinado:{},blindfold:{},blueprint:{},boomerang:{},carpetbag:{},crinoline:{},depressor:{},detergent:{},doodlebug:{},downstage:{},emergency:{},endowment:{},equalizer:{},exemption:{},extortion:{},extractor:{},facsimile:{},freewheel:{},gabardine:{},grotesque:{},hemstitch:{},horseshoe:{},invention:{},jackknife:{},microwave:{},millstone:{},miniature:{},modernism:{},nosepiece:{},ownership:{},packaging:{},pargeting:{},patchwork:{},pinstripe:{},polyester:{},potpourri:{},recording:{},refresher:{},semaphore:{},semblance:{},shielding:{},sideboard:{},skyrocket:{},slapstick:{},soporific:{},spectacle:{},starboard:{},telephone:{},telescope:{},treadmill:{},turntable:{},verdigris:{},videotape:{},whirligig:{},allocation:{},ambulatory:{},anesthetic:{},assistance:{},astringent:{},automation:{},cantilever:{},chinchilla:{},concertina:{},constraint:{},deductible:{},depilatory:{},disposable:{},elongation:{},escutcheon:{},featherbed:{},foreground:{},forfeiture:{},guillotine:{},hammerhead:{},hydroplane:{},innovation:{},intoxicant:{},knockabout:{},lithograph:{},monochrome:{},nonpayment:{},nutcracker:{},pargetting:{},peripheral:{},polychrome:{},redemption:{},stabilizer:{},stenograph:{},subvention:{},sustenance:{},technology:{},television:{},waterspout:{},anaesthetic:{},anamorphism:{},concealment:{},containment:{},copperplate:{},cornerstone:{},counterfeit:{},countersink:{},cryptograph:{},delineation:{},delinquency:{},encumbrance:{},fingerboard:{},fluorescent:{},incumbrance:{},perforation:{},pyrotechnic:{},retribution:{},subsistence:{},tensiometer:{},transporter:{},undercharge:{},withholding:{},dispensation:{},electrolytic:{},encrustation:{},inclinometer:{},incrustation:{},installation:{},intermixture:{},photogravure:{},straightaway:{},transparency:{},appropriation:{},embellishment:{},improvisation:{},merchandising:{},mystification:{},quadruplicate:{},semiautomatic:{},pharmaceutical:{},superannuation:{},aba:{},boa:{},dag:{},fax:{},gad:{},keg:{},nib:{},nog:{},pix:{},pyx:{},rep:{},ski:{},taw:{},urn:{},ante:{},arms:{},bale:{},berm:{},bier:{},bitt:{},bola:{},bolo:{},brad:{},cape:{},cask:{},cent:{},coax:{},coca:{},cosh:{},dime:{},dole:{},doll:{},garb:{},gilt:{},gyro:{},hasp:{},hypo:{},ikon:{},juju:{},lane:{},lint:{},luge:{},lute:{},maxi:{},maze:{},mini:{},mitt:{},mule:{},pail:{},perk:{},plat:{},pork:{},pouf:{},rung:{},scow:{},silk:{},sill:{},skep:{},sled:{},tamp:{},tapa:{},topi:{},trey:{},vape:{},wale:{},wick:{},adobe:{},aegis:{},aglet:{},album:{},alley:{},anode:{},anvil:{},arrow:{},auger:{},batik:{},bogie:{},bolus:{},bongo:{},borer:{},bribe:{},bulla:{},caddy:{},canoe:{},chime:{},coign:{},debit:{},denim:{},depot:{},diary:{},diode:{},drier:{},flask:{},flume:{},fount:{},frier:{},fryer:{},gauze:{},globe:{},golem:{},hijab:{},inlet:{},jimmy:{},jorum:{},kayak:{},khaki:{},lasso:{},latex:{},lisle:{},lorry:{},lucre:{},manta:{},mimeo:{},mizen:{},moire:{},mulch:{},newel:{},nylon:{},penny:{},piste:{},plush:{},poker:{},prism:{},pyxis:{},ranch:{},razor:{},relic:{},rouge:{},ruler:{},sabot:{},scape:{},sedan:{},seine:{},servo:{},shelf:{plural:"shelves"},slops:{},spoke:{},sprig:{},stele:{},steps:{},stoup:{},stove:{},strop:{},suede:{},swage:{},tammy:{},tanka:{},tappa:{},teddy:{},terms:{},toque:{},torus:{},towel:{},tunic:{},tweed:{},usury:{},verso:{},vizor:{},waist:{},winch:{},withe:{},xerox:{},yacht:{},abacus:{},afghan:{},aiglet:{},alidad:{},amends:{},arctic:{},artery:{},avenue:{},banger:{},bangle:{},banian:{},banyan:{},bauble:{},beaker:{},bicorn:{},blazon:{},boiler:{},bracer:{},broach:{},bumper:{},burner:{},buzzer:{},caftan:{},calash:{},camera:{},camion:{},camlet:{},capote:{},carton:{},casein:{},catgut:{},chaise:{},cheque:{},chiton:{},chukka:{},cither:{},cloaca:{},cloche:{},coffer:{},coffin:{},coigne:{},colors:{},corbel:{},corker:{},corset:{},crayon:{},crutch:{},dagger:{},daybed:{},detour:{},diaper:{},dickie:{},dipole:{},dirndl:{},discus:{},dogleg:{},dolman:{},dosage:{},duffel:{},duffle:{},eyecup:{},fabric:{},facade:{},falsie:{},fanjet:{},fascia:{},fetter:{},firkin:{},fizgig:{},floppy:{},frieze:{},garter:{},gimlet:{},goblet:{},guimpe:{},guinea:{},gunnel:{},harrow:{},helmet:{},hookup:{},hotbed:{},impost:{},instep:{},iodine:{},island:{},jersey:{},jetsam:{},jigsaw:{},juicer:{},kaftan:{},kibble:{},kirtle:{},lateen:{},laurel:{},ledger:{},linage:{},lunula:{},magnet:{},markup:{},miotic:{},mizzen:{},myotic:{},nipple:{},nozzle:{},onager:{},pajama:{},pavage:{},pellet:{},pennon:{},peplum:{},peyote:{},pincer:{},pipage:{},pomade:{},pompon:{},popper:{},pyjama:{},ragbag:{},reamer:{},remake:{},reseau:{},rudder:{},russet:{},scythe:{},settee:{},shades:{},shorts:{},siding:{},sleeve:{},sleigh:{},spinet:{},spline:{},stoker:{},stylus:{},sublet:{},subway:{},surtax:{},swathe:{},swivel:{},syrinx:{},taenia:{},talcum:{},tariff:{},teacup:{},teeter:{},tenner:{},tether:{},thwart:{},tocsin:{},trophy:{},trowel:{},turban:{},viewer:{},waggon:{},wampum:{},wherry:{},wicker:{},willow:{},wiring:{},woolen:{},yarder:{},zipper:{},acetate:{},aerosol:{},airline:{},alidade:{},ampulla:{},android:{},aneroid:{},annulet:{},anodyne:{},apanage:{},apparel:{},archive:{},armband:{},armilla:{},arrears:{},banding:{},basting:{},batting:{},bayonet:{},beading:{},bedding:{},bladder:{},blocker:{},blusher:{},bollock:{},bouquet:{},bracing:{},brocade:{},broiler:{},bullion:{},bunting:{},burthen:{},bushing:{},caleche:{},caliper:{},cathode:{},catwalk:{},cautery:{},charger:{},charnel:{},chemise:{},chevron:{},chimney:{},chlamys:{},circlet:{},colours:{},commode:{},cooling:{},cordage:{},coronet:{},corsair:{},crampon:{},cutaway:{},daybook:{},deadeye:{},decoder:{},diagram:{},doeskin:{},dogsled:{},doormat:{},dragger:{},dragnet:{},drapery:{},drawers:{},dustpan:{},escheat:{},eyehole:{},fixings:{},flatbed:{},flattop:{},flipper:{},foghorn:{},foliage:{},footage:{},foretop:{},forgery:{},frigate:{},funding:{},furring:{},fustian:{},garment:{},garotte:{},garrote:{},gouache:{},grapnel:{},griddle:{},hackney:{},hammock:{},harpoon:{},hassock:{},hatchel:{},hatchet:{},heating:{},hedging:{},hibachi:{},hobnail:{},holding:{},holster:{},hydrant:{},iceboat:{},igniter:{},impasse:{},ironing:{},jackpot:{},javelin:{},joinery:{},fibre:{},hazel:{},lemon:{},peach:{},plank:{},raven:{},snipe:{},spine:{},steer:{},stint:{},stunt:{},bleach:{},breath:{},callus:{},cherry:{},dimple:{},entire:{},ferret:{},filler:{},hybrid:{},jackal:{},marrow:{},orange:{},radish:{},spruce:{},stifle:{},winkle:{},endemic:{},vanilla:{},beefwood:{},calabash:{},concrete:{},emission:{},kingfish:{},solution:{},volatile:{},partridge:{},repellant:{},derivative:{},thickening:{},ash:{},bud:{},cob:{},hen:{},mew:{},mud:{},mum:{},paw:{},roe:{},sow:{},soy:{},wax:{},yam:{},beef:{},burl:{},calf:{plural:"calves"},chat:{},fowl:{},fuzz:{},gill:{},grub:{},hock:{},hoof:{},lobe:{},rose:{},scup:{},soup:{},swan:{},tint:{},tuna:{},tusk:{},alloy:{},briar:{},clove:{},coney:{},ebony:{},ether:{},filth:{},flesh:{},gumbo:{},homer:{},jelly:{},matte:{},mocha:{},reeve:{},wrack:{},annual:{},canine:{},carrot:{},cereal:{},cockle:{},feeler:{},fennel:{},flimsy:{},gargle:{},gravel:{},grouse:{},indigo:{},mammee:{},medlar:{},monkey:{},nebula:{},oyster:{},salmon:{plural:"salmon"},shiner:{},shrimp:{},sprout:{},stigma:{},blossom:{},blubber:{},buffalo:{},cabbage:{},calamus:{},catfish:{},caudate:{},caustic:{},chelate:{},chicory:{},ciliate:{},essence:{},griffon:{},hemlock:{},hydrate:{},incense:{},lighter:{},remount:{},sardine:{},stinger:{},vitriol:{},ambrosia:{},billfish:{},blackcap:{},crawfish:{},crayfish:{},earthnut:{},escallop:{},filament:{},flounder:{},infusion:{},ironwood:{},quandong:{},relative:{},ringtail:{},screamer:{},sycamore:{},alabaster:{},algarroba:{},broadbill:{},composite:{},fulminate:{},perennial:{},tangerine:{},bladderpod:{},granadilla:{},heartsease:{},periwinkle:{},tumbleweed:{},agglomerate:{},bittersweet:{},intermediate:{},dye:{},elk:{},fig:{},haw:{},oka:{},pea:{},pee:{},rye:{},sac:{},tar:{},yak:{},carp:{},clay:{},coma:{},cony:{},crud:{},cusk:{},dung:{},fang:{},foam:{},germ:{},glue:{},hare:{},hind:{},husk:{},kiwi:{},lake:{},mung:{},okra:{},pine:{},pith:{},puke:{},rice:{},roan:{},sloe:{},taro:{},teal:{},titi:{},twig:{},amber:{},anime:{},berry:{},boxer:{},carob:{},cedar:{},chine:{},guava:{},hound:{},husky:{},kauri:{},lemma:{},monad:{},ocher:{},ochre:{},onion:{},ounce:{},pansy:{},pecan:{},pewit:{},prawn:{},quail:{},shuck:{},sloth:{},slush:{},smelt:{},snail:{},snout:{},spawn:{},swift:{},tabby:{},thorn:{},topaz:{},umber:{},virus:{},wafer:{},wahoo:{},wheat:{},whelk:{},badger:{},bonito:{},broody:{},chrome:{},cirrus:{},cocoon:{},cowpea:{},cuckoo:{},elixir:{},grease:{},grubby:{},howler:{},jabiru:{},jargon:{},jujube:{},kernel:{},leaven:{},lentil:{},liquor:{},locust:{},manioc:{},mastic:{},mentum:{},mildew:{},mimosa:{},mullet:{},muscat:{},mutant:{},nectar:{},nettle:{},nodule:{},pawpaw:{},pecker:{},plasma:{},ruddle:{},sallow:{},shoddy:{},squill:{},starch:{},stroma:{},stucco:{},sunray:{},thorax:{},tissue:{},violet:{},walnut:{},warble:{},amyloid:{},antenna:{plural:"antennae"},apricot:{},aquatic:{},asphalt:{},avocado:{},beebalm:{},bobtail:{},builder:{},bulldog:{},caltrop:{},cayenne:{},chinook:{},coconut:{},cricket:{},cudweed:{},currant:{},cuticle:{},dasheen:{},gallfly:{},juniper:{},lacquer:{},leaflet:{},lettuce:{},macadam:{},mordant:{},mustard:{},packing:{},panther:{},papilla:{},papyrus:{},parsnip:{},pigweed:{},pollard:{},redfish:{},redwood:{},rubbish:{},saffron:{},salsify:{},shallot:{},slating:{},solvate:{},solvent:{},soybean:{},sunfish:{},truffle:{},whisker:{},abrasive:{},allspice:{},angelica:{},biennial:{},bilberry:{},bluebell:{},chickpea:{},cinnabar:{},cinnamon:{},congener:{},creosote:{},demerara:{},duckbill:{},firebird:{},fleabane:{},humanity:{},lavender:{},mahogany:{},monkfish:{},paraffin:{},peduncle:{},peroxide:{},plantain:{},rockfish:{},sandarac:{},sandwort:{},scammony:{},shamrock:{},skipjack:{},skullcap:{},snowbird:{},suckling:{},tubercle:{},alligator:{},angelfish:{},arachnoid:{},arrowroot:{},bearberry:{},blackfish:{},buckthorn:{},capitulum:{},carbonate:{},carnation:{},celluloid:{},chemistry:{},coriander:{},corrosive:{},crabapple:{},devilfish:{},emanation:{},groundnut:{},horseback:{},horsemint:{},injection:{},matchwood:{},mistletoe:{},offspring:{plural:"offspring"},pyrethrum:{},raspberry:{},razorback:{},satinwood:{},sheepskin:{},tomatillo:{},waxflower:{},whitefish:{},ammunition:{},bitterwood:{},blackberry:{},butterfish:{},chinquapin:{},coneflower:{},flagellate:{},flamboyant:{},fledgeling:{},insulation:{},peppermint:{},receptacle:{},strawberry:{},watercress:{},chittamwood:{},everlasting:{},fomentation:{},helleborine:{},honeysuckle:{},horseradish:{},huckleberry:{},salmonberry:{},shittimwood:{},strawflower:{},ultramarine:{},whitethroat:{},wintergreen:{},helmetflower:{},impregnation:{},quintessence:{},sternutatory:{},thimbleberry:{},contamination:{},extravasation:{},leatherjacket:{},pulverisation:{},pulverization:{},tortoiseshell:{},ti:{},ala:{},asp:{},eel:{},elm:{},fir:{},gar:{},neb:{},nit:{},oak:{},oat:{},sol:{},tom:{},yew:{},agar:{},akee:{},anil:{},atom:{},balm:{},bast:{},beet:{},boar:{},bole:{},bran:{},brit:{},cere:{},cero:{},chow:{},coho:{},dahl:{},dill:{},flax:{},foal:{},glop:{},gnat:{},hake:{},herb:{},hoar:{},homo:{},kaki:{},kino:{},leek:{},loin:{},mite:{},musk:{},parr:{},pear:{},poon:{},puka:{},rhea:{},saki:{},seta:{},shad:{},silt:{},slag:{},soda:{},soma:{},soot:{},soya:{},talc:{},teak:{},tufa:{},unai:{},unau:{},whey:{},woad:{},wort:{},yolk:{},zinc:{},abaca:{},alder:{},alula:{},amino:{},anise:{},apple:{},aroid:{},aster:{},balsa:{},basil:{},beech:{},betel:{},biddy:{},billy:{},biped:{},booby:{},britt:{},bruin:{},cairn:{},capon:{},caulk:{},chard:{},chess:{},chick:{},cisco:{},cohoe:{},comma:{},croup:{},cumin:{},dross:{},elver:{},epoxy:{},ergot:{},falls:{},flint:{},fossa:{},genip:{},grout:{},grume:{},henna:{},hilum:{},humus:{},hydra:{},icaco:{},ilama:{},imago:{},ivory:{},kapok:{},kenaf:{},lapin:{},larch:{},lilac:{},lotus:{},luffa:{},mahoe:{},maize:{},mamey:{},mango:{},manna:{},melon:{},moong:{},naiad:{},nanny:{},nopal:{},orris:{},osier:{},otter:{},ovary:{},ovule:{},pacer:{},panda:{},papaw:{},piggy:{},pilus:{},pinna:{},pixie:{},polyp:{},potto:{},putty:{},quira:{},robin:{},roble:{},rosin:{},scrod:{},sepia:{},sisal:{},slime:{},sorus:{},sprat:{},squid:{},stoma:{},sumac:{},swede:{},theca:{},thyme:{},trout:{plural:"trout"},tunny:{},vapor:{},velum:{},venom:{},vinyl:{},whelp:{},yeast:{},acetum:{},acinus:{},acumen:{},adduct:{},agaric:{},alkali:{},almond:{},anuran:{},archil:{},argent:{},balata:{},bamboo:{},bantam:{},barley:{},basset:{},beluga:{},bennet:{},bluing:{},bonduc:{},borage:{},capsid:{},cashew:{},cassia:{},caudex:{},celery:{},chives:{},cilium:{},citron:{},cobnut:{},cocker:{},cosmos:{},cowage:{},croton:{},cupule:{},cushaw:{},darter:{},dentin:{},dobson:{},dodder:{},donkey:{},durian:{},embryo:{},endive:{},ermine:{},falcon:{},feijoa:{},feline:{},fisher:{},fucoid:{},gadfly:{},garlic:{},glycol:{},hackle:{},haunch:{},herpes:{},hyssop:{},kaffir:{},kitten:{},lichee:{},limpet:{},linden:{},linnet:{},litchi:{},loofah:{},loquat:{},lovage:{},lupine:{},madder:{},maguey:{},manure:{},marang:{},mescal:{},mocker:{},mombin:{},mucoid:{},mudcat:{},munggo:{},murine:{},mussel:{},myrtle:{},nipper:{},nutmeg:{},obeche:{},orchil:{},orchis:{},oriole:{},padauk:{},paigle:{},papaya:{},parget:{},pasang:{},peewee:{},peewit:{},phenol:{},plaice:{},pomelo:{},poplar:{},possum:{},potato:{},pothos:{},pouter:{},puffer:{},pullet:{},pumice:{},pyrene:{},quahog:{},quartz:{},quince:{},rachis:{},raffia:{},ratter:{},relict:{},sabicu:{},saline:{},sapote:{},saurel:{},schrod:{},senega:{},septum:{},setter:{},sierra:{},simian:{},sludge:{},solder:{},spirea:{},stevia:{},sulfur:{},thrift:{},toetoe:{},tomato:{},tophus:{},triton:{},tupelo:{},turbot:{},turnip:{},vapour:{},vellum:{},wapiti:{},wasabi:{},acerola:{},actinon:{},aculeus:{},adamant:{},albumen:{},alewife:{},alfalfa:{},amboyna:{},anchovy:{},anemone:{},anionic:{},annelid:{},annulus:{},antacid:{},antlion:{},arsenic:{},aurochs:{},babbitt:{},barilla:{},beeswax:{},bimetal:{},biomass:{},bloomer:{},blotter:{},bluefin:{},blueing:{},boneset:{},boxwood:{},bracken:{},brocket:{},bromide:{},buckeye:{},bugbane:{},bugloss:{},bullock:{},bulrush:{},buzzard:{},cackler:{},cacodyl:{},caliche:{},calycle:{},cambium:{},capulin:{},caraway:{},cardoon:{},catbird:{},catechu:{},celtuce:{},ceriman:{},chalaza:{},chamois:{},chervil:{},chigger:{},citrate:{},cocoyam:{},codfish:{},comfrey:{},compost:{},cowslip:{},crappie:{},crawdad:{},crinoid:{},cyanide:{},cypress:{},dabbler:{},denizen:{},diploid:{},dogfish:{},dogwood:{},echidna:{},eelpout:{},enation:{},fallout:{},ferrite:{},fetlock:{},filaria:{},filbert:{},firebug:{},firefly:{},frijole:{},fuchsia:{},gamboge:{},ginseng:{},girasol:{},glutton:{},gobbler:{},grackle:{},grampus:{},granite:{},grizzly:{},grouper:{},grunter:{},gudgeon:{},haddock:{},halibut:{},haploid:{},haricot:{},heather:{},hepatic:{},herring:{},hickory:{},hogfish:{},honesty:{},hyaline:{},ignitor:{},inducer:{},jackass:{},jewfish:{},jonquil:{},kestrel:{},kingcup:{},kumquat:{},lactate:{},langsat:{},lanolin:{},lingcod:{},lobster:{},logwood:{},mahagua:{},majagua:{},malacca:{},mammoth:{},marabou:{},marasca:{},menthol:{},mercury:{},monarch:{},moneran:{},mongrel:{},moorhen:{},morello:{},muskrat:{},nervure:{},nitrate:{},octopus:{},oldwife:{},opossum:{},oregano:{},ostrich:{},oxheart:{},parsley:{},peacock:{},pigfish:{},pimento:{},piranha:{},plumcot:{},pollack:{},pollock:{},pompano:{},popcorn:{},poultry:{},pricket:{},puccoon:{},pulasan:{},pyrogen:{},quahaug:{},quassia:{},quetzal:{},raccoon:{},ragweed:{},ragwort:{},rattler:{},redbird:{},redpoll:{},redtail:{},reducer:{},redwing:{},remover:{},residue:{},retinal:{},rhubarb:{},rosebud:{},rostrum:{},satsuma:{},saurian:{},sequoia:{},seriema:{},skylark:{},sockeye:{},soursop:{},sparrow:{},spinach:{},spiraea:{},stentor:{},steroid:{},stubble:{},sulfate:{},sulphur:{},tangelo:{},taproot:{},tarweed:{},tarwood:{},tattler:{},taurine:{},teargas:{},timothy:{},tobacco:{},topknot:{},tortrix:{},trotter:{},varmint:{},verdure:{},viceroy:{},vinegar:{},viscose:{},vulture:{},walleye:{},waratah:{},warbler:{},waxwork:{},whooper:{},wilding:{},witloof:{},wryneck:{},abradant:{},absinthe:{},acceptor:{},actinoid:{},adhesive:{},adjutant:{},ageratum:{},agueweed:{},albacore:{},amarelle:{},amethyst:{},ammoniac:{},argonaut:{},armyworm:{},auricula:{},balancer:{},baldpate:{},barnacle:{},basswood:{},bayberry:{},bearskin:{},beetroot:{},birdlime:{},blackfly:{},blacktop:{},bluebird:{},bluefish:{},boarfish:{},bocconia:{},boxberry:{},brisling:{},broccoli:{},buckskin:{},bullhead:{},bullrush:{},canistel:{},capuchin:{},carangid:{},carbonyl:{},carboxyl:{},cardamom:{},cardamon:{},carinate:{},carnauba:{},carotene:{},cashmere:{},catalyst:{},catchfly:{},celeriac:{},cetacean:{},chimaera:{},chloride:{},cilantro:{},cinchona:{},citrange:{},cockspur:{},conodont:{},costmary:{},cowberry:{},cucumber:{},deadwood:{},detritus:{},dewberry:{},dilution:{},dolomite:{},duckling:{},ectozoan:{},eelgrass:{},effluent:{},eggplant:{},emulsion:{},estragon:{},filtrate:{},fireweed:{},flathead:{},flooring:{},forelock:{},galangal:{},garbanzo:{},grayback:{},guaiacum:{},hardtack:{},harebell:{},hawkweed:{},hazelnut:{},hedgehog:{},hepatica:{},hookworm:{},hornwort:{},horsefly:{},hyacinth:{},impurity:{},iodoform:{},jalapeno:{},jamberry:{},japonica:{},keurboom:{},kindling:{},kingwood:{},kinkajou:{},kohlrabi:{},labdanum:{},lambskin:{},locoweed:{},lovebird:{},magnolia:{},mahimahi:{},mandrake:{},margarin:{},marjoram:{},medusoid:{},mephitis:{},migrator:{},molecule:{},moonfish:{},mucilage:{},mulberry:{},nestling:{},omnivore:{},ovenbird:{},pandanus:{},pickerel:{},pilchard:{},pimiento:{},pitahaya:{},placenta:{},plumbago:{},predator:{},ptomaine:{},puffball:{},pulassan:{},purebred:{},pyrectic:{},quandang:{},quickset:{},rambotan:{},rambutan:{},redberry:{},redstart:{},reedbird:{},ricebird:{},richweed:{},ringdove:{},rockrose:{},rosefish:{},rosemary:{},rosewood:{},ruminant:{},rutabaga:{},sailfish:{},salsilla:{},saltwort:{},sandfish:{},scallion:{},seahorse:{},sealskin:{},sewerage:{},shoveler:{},siderite:{},silkworm:{},sparling:{},squealer:{},squirrel:{},stearate:{},stinkpot:{},superbug:{},surffish:{},sweetsop:{},tamarind:{},tarragon:{},teaberry:{},thresher:{},throstle:{},tilefish:{},tomentum:{},toxicant:{},turmeric:{},ungulate:{},univalve:{},urochord:{},vesicant:{},warragal:{},warrigal:{},watchdog:{},waxberry:{},weakfish:{},wolffish:{},woodbine:{},woodruff:{},wormcast:{},wriggler:{},zucchini:{},absorbent:{},adsorbate:{},adsorbent:{},albatross:{},almandine:{},andromeda:{},antiknock:{},apophysis:{},archangel:{},arsenical:{},artichoke:{},asparagus:{},aubergine:{},bacteroid:{},blackbird:{},blindworm:{},bluegrass:{},bluepoint:{},broadtail:{},brooklime:{},brookweed:{},brushwood:{},buckwheat:{},bugleweed:{},buteonine:{},butternut:{},caecilian:{},calyculus:{},candlenut:{},cantaloup:{},carambola:{},carbonado:{},carbuncle:{},cardboard:{},carnivore:{},catamount:{},celandine:{},chameleon:{},chatterer:{},chelonian:{},cherimoya:{},chickweed:{},chlamydia:{},clamshell:{},clapboard:{},coachwhip:{},cochineal:{},cocklebur:{},cocozelle:{},coltsfoot:{},commensal:{},courgette:{},crackling:{},cupflower:{},cyanamide:{},digestive:{},digitalis:{},driftfish:{},ecrevisse:{},ectoplasm:{},eiderdown:{},ephemeral:{},eutherian:{},evergreen:{},excretion:{},exudation:{},fenugreek:{},firebrand:{},firestone:{},flagellum:{},frostweed:{},funiculus:{},gladiolus:{},glasswort:{},goldeneye:{},goldfinch:{},grapevine:{},grenadier:{},hackberry:{},hamadryad:{},heartleaf:{},hellebore:{},hollyhock:{},horehound:{},horsebean:{},horsehair:{},horseweed:{},hortensia:{},hydroxide:{},jackfruit:{},jacksnipe:{},jellyfish:{},juneberry:{},lancewood:{},langouste:{},leavening:{},lemonwood:{},mammalian:{},manzanita:{},maravilla:{},marihuana:{},marijuana:{},moosewood:{},muscadine:{},muskmelon:{},nakedwood:{},nectarine:{},nighthawk:{},pasturage:{},patchouli:{},patchouly:{},pelecypod:{},pellitory:{},peregrine:{},peristome:{},persimmon:{},phosphate:{},pimpernel:{},pinchbeck:{},pineapple:{},pistachio:{},polyploid:{},probiotic:{},proboscis:{},protozoan:{},pureblood:{},quadruped:{},rauwolfia:{},recycling:{},reptilian:{},reticulum:{},rockcress:{},rootstock:{},rosinweed:{},sandpaper:{},sapodilla:{},sassafras:{},sheldrake:{},shingling:{},shoveller:{},siccative:{},sicklepod:{},snakeroot:{},snowflake:{},sourdough:{},spicebush:{},spirillum:{},stainless:{},stiffener:{},strangler:{},strawworm:{},sugarcane:{},swordfish:{},tamarindo:{},tarantula:{},topminnow:{},tulipwood:{},turquoise:{},twayblade:{},twinberry:{},wallpaper:{},whitebait:{},whiteface:{},wineberry:{},wolverine:{},workhorse:{},adulterant:{},amygdaloid:{},anopheline:{},aquamarine:{},belladonna:{},bellwether:{},bitterweed:{},blacksnake:{},blackthorn:{},bluebonnet:{},bluebottle:{},bottlenose:{},brachiopod:{},brazilwood:{},breadfruit:{},butterball:{},butterweed:{},candelilla:{},cantaloupe:{},catarrhine:{},cellulosic:{},chatterbox:{},chinaberry:{},cinquefoil:{},citronwood:{},clementine:{},condensate:{},copperhead:{},coralberry:{},cornflower:{},cottonweed:{},cottonwood:{},crossbreed:{},crustacean:{},deathwatch:{},demoiselle:{},dollarfish:{},elderberry:{},exhalation:{},feathertop:{},fetterbush:{},fiddlehead:{},flycatcher:{},fritillary:{},garambulla:{},goldenbush:{},gooseberry:{},grapefruit:{},jaboticaba:{},jackrabbit:{},ketembilla:{},kitembilla:{},lemongrass:{},littleneck:{},loganberry:{},loggerhead:{},mangosteen:{},marblewood:{},marguerite:{},massasauga:{},meerschaum:{},monoclonal:{},nasturtium:{},needlefish:{},nonstarter:{},ornamental:{},pacesetter:{},parenchyma:{},pennyroyal:{},pepperwort:{},plasmodium:{},princewood:{},propellant:{},propellent:{},pufferfish:{},pyrimidine:{},quercitron:{},restharrow:{},restrainer:{},ribbonfish:{},ribbonwood:{},rudderfish:{},sapphirine:{},scorzonera:{},sidewinder:{},silverbush:{},silverfish:{},silverweed:{},spiceberry:{},sticktight:{},sugarberry:{},superoxide:{},tarmacadam:{},turpentine:{},turtledove:{},velvetleaf:{},vertebrate:{},vesicatory:{},wandflower:{},watermelon:{},windowpane:{},witchgrass:{},yellowbird:{},yellowtail:{},yellowwood:{},adulterator:{},arthrospore:{},artiodactyl:{},bactericide:{},boysenberry:{},branchiopod:{},buffalofish:{},butcherbird:{},cauliflower:{},cherrystone:{},chittimwood:{},chokecherry:{},combustible:{},conspecific:{},digitigrade:{},dolphinfish:{},flameflower:{},gillyflower:{},groundberry:{},groundcover:{},heterocycle:{},honeyflower:{},insectivore:{},leatherleaf:{},leatherwood:{},lingonberry:{},liquidambar:{},loosestrife:{},muskellunge:{},plantigrade:{},platyrrhine:{},pomegranate:{},precipitant:{},prickleback:{},quicksilver:{},recombinant:{},refrigerant:{},shellflower:{},silversides:{},sleuthhound:{},swallowwort:{},unguiculate:{},waldmeister:{},archosaurian:{},distillation:{},heterocyclic:{},honeycreeper:{},instillation:{},invertebrate:{},nonsteroidal:{},placentation:{},sarsaparilla:{},serviceberry:{},squirrelfish:{},transudation:{},weatherboard:{},whortleberry:{},yellowhammer:{},branchiopodan:{},inflorescence:{},platyrrhinian:{},semiconductor:{},transactinide:{},vitrification:{},fructification:{},aa:{},ai:{},ani:{},auk:{},awn:{},bot:{},dak:{},daw:{},dew:{},doe:{},dug:{},eft:{},ern:{},ewe:{},gib:{},gnu:{},goo:{},ivy:{},jay:{},kea:{},kob:{},lac:{},lye:{},may:{},mei:{},moa:{},oca:{},ola:{},olm:{},pia:{},pug:{},teg:{},tup:{},acyl:{},agua:{},aloe:{},amyl:{},anoa:{},apar:{},aril:{},arui:{},atar:{},axil:{},barm:{},baya:{},bine:{},boll:{},bufo:{},buna:{},calx:{},cavy:{},chub:{},cleg:{},coco:{},colt:{},coot:{},corm:{},cows:{},craw:{},culm:{},cyme:{},dace:{},dalo:{},deer:{plural:"deer"},derv:{},dhak:{},dhal:{},dika:{},diol:{},disa:{},dita:{},dogy:{},doob:{},dopa:{},enol:{},erne:{},eyas:{},fern:{},fice:{},floc:{},fuji:{},gean:{},goby:{},guan:{},guar:{},guib:{},haem:{},halm:{},hart:{},heme:{},hogg:{},hops:{},hoya:{},ibex:{},ibis:{},inga:{},jird:{},jute:{},kali:{},kelp:{},kola:{},kudu:{},lily:{},lino:{},liza:{},loam:{},loir:{},lory:{},lynx:{},mako:{},mamo:{},mara:{},marl:{},merl:{},mica:{},milo:{},miro:{},mola:{},moss:{},munj:{},mutt:{},myna:{},nagi:{},napa:{},napu:{},neem:{},neon:{},olla:{},ombu:{},onyx:{},opah:{},opal:{},orca:{},oryx:{},paca:{},peat:{},peba:{},pika:{},pome:{},puku:{},puma:{},pupa:{},ragi:{},rimu:{},rudd:{},sago:{},salp:{},sang:{},sard:{},scut:{},sial:{},sika:{},sild:{},sima:{},skua:{},smew:{},sugi:{},tatu:{},teff:{},teju:{},tern:{},tipu:{},toad:{},tody:{},tolu:{},tuff:{},tung:{},urea:{},urus:{},vole:{},wasp:{},weka:{},blast:{},dinar:{},lapse:{},lurch:{},whirl:{},travel:{},capacity:{},encounter:{},conversion:{},separation:{},age:{},nip:{},now:{},halt:{},leap:{},mile:{},peak:{},peso:{},slam:{},term:{},wake:{},faint:{},scoop:{},surge:{},third:{},trick:{},bother:{},cackle:{},motion:{},chatter:{},reversal:{},elevation:{},experience:{},dab:{},pat:{},cube:{},howl:{},over:{},peep:{},span:{},cause:{},death:{},plump:{},plunk:{},poise:{},pulse:{},shame:{},spark:{},twang:{},wound:{},cipher:{},crunch:{},damage:{},fusion:{},period:{},racket:{},repeat:{},supply:{},wallow:{},wonder:{},dribble:{},failure:{},outrage:{},sparkle:{},backfire:{},campaign:{},delivery:{},increase:{},variance:{},explosion:{},correction:{},disturbance:{},translation:{},displacement:{},transposition:{},hum:{},mug:{},buzz:{},cord:{},dawn:{},fuss:{},hint:{},hiss:{},much:{},past:{},ping:{},rout:{},seek:{},tide:{},warp:{},birth:{},blend:{},crumb:{},delay:{},rupee:{},worst:{},climax:{},deluge:{},dirham:{},recoil:{},replay:{},rhythm:{},rising:{},descent:{},grumble:{},impulse:{},respite:{},scruple:{},triumph:{},addition:{},dogfight:{},eruption:{},occasion:{},progress:{},reprieve:{},shilling:{},stampede:{},accretion:{},induction:{},appearance:{},suggestion:{},circulation:{},irradiation:{},accommodation:{},precipitation:{},in:{},ebb:{},mil:{},zap:{},gush:{},honk:{},lull:{},plop:{},rave:{},ream:{},slap:{},then:{},zoom:{},fifth:{},final:{},gleam:{},reign:{},swash:{},throb:{},thump:{},tweet:{},wreck:{},wring:{},billow:{},breach:{},ending:{},fourth:{},gurgle:{},injury:{},nibble:{},parity:{},sunset:{},billion:{},history:{},instant:{},spatter:{},blackout:{},creation:{},decision:{},downhill:{},entrance:{},rational:{},trillion:{},hereafter:{},immersion:{},intrusion:{},millenary:{},remainder:{},saltation:{},adjustment:{},antecedent:{},dedication:{},deflection:{},impairment:{},limitation:{},outpouring:{},refinement:{},scattering:{},devastation:{},elaboration:{},fundamental:{},prohibition:{},retardation:{},interference:{},transmission:{},manifestation:{},scintillation:{},mi:{},kip:{},wee:{},yaw:{},bout:{},bray:{},doom:{},harm:{},haul:{},jolt:{},none:{},ooze:{},pity:{},sigh:{},surf:{},thaw:{},tour:{},alpha:{},carom:{},chunk:{},clink:{},colon:{},deuce:{},drama:{},glint:{},going:{},shtik:{},sixth:{},spurt:{},thrum:{},tinge:{},today:{},waltz:{},worth:{},bucket:{},egress:{},fathom:{},mutter:{},patter:{},picnic:{},quaver:{},ripple:{},rustle:{},shtick:{},sizzle:{},squawk:{},stride:{},tremor:{},whoosh:{},wobble:{},absence:{},allegro:{},andante:{},deficit:{},episode:{},heaving:{},raising:{},rebirth:{},roaring:{},rupture:{},screech:{},scrunch:{},seventh:{},success:{},sunrise:{},takeoff:{},trample:{},twinkle:{},cracking:{},deletion:{},incident:{},interval:{},isometry:{},overflow:{},rattling:{},skeleton:{},splatter:{},striking:{},twilight:{},upheaval:{},advantage:{},alignment:{},deflexion:{},diffusion:{},emergence:{},inflation:{},normality:{},remission:{},resultant:{},ruination:{},shakedown:{},vibration:{},yesterday:{},allegretto:{},conception:{},concoction:{},concretion:{},disruption:{},divergence:{},graduation:{},inflection:{},initiation:{},moderation:{},sprinkling:{},approaching:{},biquadratic:{},competition:{},compression:{},contraction:{},humiliation:{},permutation:{},constriction:{},ramification:{},accompaniment:{},embarrassment:{},mortification:{},rectification:{},coo:{},eve:{},gee:{},par:{},sea:{},sec:{},tot:{},won:{},yen:{},bash:{},beep:{},ding:{},dram:{},fete:{},gait:{},inch:{},lira:{},peal:{},pint:{},purr:{},rial:{},ting:{},toot:{},whiz:{},blare:{},bleat:{},brawl:{},cease:{},digit:{},dying:{},epoch:{},gravy:{},idyll:{},knell:{},metre:{},minim:{},ninth:{},plash:{},plonk:{},quake:{},quart:{},ravel:{},salvo:{},skirl:{},snore:{},spate:{},spirt:{},swish:{},tenth:{},unity:{},whack:{},whirr:{},years:{},ascent:{},bushel:{},curfew:{},drachm:{},eighth:{},enough:{},finale:{},fizzle:{},footer:{},gobble:{},jingle:{},marvel:{},myriad:{},octave:{},ravage:{},smudge:{},spritz:{},squeak:{},squeal:{},squish:{},swerve:{},tierce:{},usance:{},waxing:{},atrophy:{},banging:{},bending:{},blowout:{},centner:{},clangor:{},debacle:{},decimal:{},eclipse:{},glitter:{},kickoff:{},midterm:{},million:{},misfire:{},modulus:{},monsoon:{},ordinal:{},outflow:{},ringing:{},shimmer:{},sinking:{},smolder:{},torrent:{},twelfth:{},backwash:{},bouncing:{},downfall:{},dripping:{},drumbeat:{},eighties:{},eternity:{},exigency:{},footstep:{},furlough:{},gleaming:{},grinding:{},hardship:{},instance:{},invasion:{},majority:{},maturity:{},nineties:{},overtime:{},overture:{},pandemic:{},pounding:{},receding:{},recovery:{},rustling:{},scraping:{},sixtieth:{},smoulder:{},spoilage:{},spraying:{},tomorrow:{},touching:{},amplitude:{},ascension:{},athletics:{},avalanche:{},billionth:{},checkmate:{},clearance:{},collision:{},commotion:{},contagion:{},departure:{},fertility:{},formality:{},gestation:{},heartbeat:{},honeymoon:{},hundredth:{},interlude:{},irruption:{},lactation:{},millionth:{},multitude:{},onslaught:{},outgrowth:{},plurality:{},probation:{},pulsation:{},shrinkage:{},sixteenth:{},spreading:{},stalemate:{},throbbing:{},whistling:{},withering:{},affliction:{},alteration:{},betterment:{},dispersion:{},enervation:{},expiration:{},foreboding:{},incubation:{},incumbency:{},inevitable:{},irrational:{},jubilation:{},levitation:{},millennium:{plural:"millennia"},procession:{},repetition:{},revolution:{},sabbatical:{},solubility:{},subsidence:{},thousandth:{},undulation:{},visitation:{},accelerando:{},catastrophe:{},celebration:{},coincidence:{},consequence:{},continuance:{},deformation:{},dislocation:{},dissipation:{},expansivity:{},fluctuation:{},gravitation:{},oscillation:{},preliminary:{},punctuation:{},sufficiency:{},acceleration:{},augmentation:{},championship:{},commencement:{},conservation:{},deceleration:{},degeneration:{},encroachment:{},interlocking:{},reflectivity:{},consolidation:{},hundredweight:{},magnetisation:{},magnetization:{},regurgitation:{},sheepshearing:{},transmutation:{},conglomeration:{},materialisation:{},optic:{},patty:{},prune:{},saute:{},scalp:{},sinus:{},swill:{},bubbly:{},burgoo:{},choler:{},claret:{},cortex:{},crotch:{},drivel:{},frappe:{},hiatus:{},kosher:{},legume:{},macula:{},phlegm:{},pickle:{},stemma:{},thenar:{},tiptoe:{},adrenal:{},anatomy:{},confect:{},freckle:{},jugular:{},knuckle:{},mastoid:{},medulla:{},pudding:{},takeout:{},thyroid:{},tonsure:{},wassail:{},anterior:{},coloring:{},julienne:{},libation:{},rhomboid:{},sandwich:{},takeaway:{},appendage:{},chocolate:{},colouring:{},endocrine:{},hamstring:{},moonshine:{},permanent:{},recessive:{},turbinate:{},confection:{},hemisphere:{},ingredient:{},spatchcock:{},sweetening:{},convolution:{},pneumogastric:{},os:{},cos:{},cud:{},sup:{},caul:{},chaw:{},chin:{},chou:{},curd:{},cyst:{},fizz:{},jowl:{},mane:{},milt:{},perm:{},snot:{},sorb:{},sura:{},taco:{},booze:{},broth:{},caput:{},chili:{},cocoa:{},costa:{},cress:{},dough:{},eater:{},fanny:{},fondu:{},hyoid:{},loins:{},lolly:{},lumen:{},mamma:{},mummy:{},pasta:{},plasm:{},porgy:{},puree:{},quaff:{},quark:{},sinew:{},thigh:{},tripe:{},tummy:{},areola:{},banana:{},booger:{},bowleg:{},brunch:{},carpal:{},cervix:{},citrus:{},comfit:{},dactyl:{},dorsum:{},edible:{},flitch:{},fondue:{},fornix:{},gammon:{},herbal:{},lambda:{},malted:{},marcel:{},millet:{},monggo:{},noodle:{},paring:{},pastry:{},pelvis:{},simnel:{},spleen:{},tarsal:{},tensor:{},tipple:{},waffle:{},wonton:{},abdomen:{},adenoid:{},auricle:{},biscuit:{},brownie:{},clabber:{},criollo:{},croaker:{},cubitus:{},deltoid:{},dentine:{},dietary:{},eyeball:{},fistula:{},forearm:{},fritter:{},gherkin:{},haircut:{},headful:{},hyaloid:{},iceberg:{},isthmus:{},kneecap:{},lacteal:{},lasagna:{},lasagne:{},lozenge:{},marmite:{},midriff:{},oatmeal:{},ocellus:{},pageboy:{},paprika:{},pathway:{},pottage:{},prepuce:{},pumpkin:{},ramekin:{},ratafia:{},roulade:{},sausage:{},seltzer:{},serving:{},sidecar:{},slobber:{},sorghum:{},stirrup:{},sultana:{},teacake:{},timbale:{},toenail:{},topping:{},tostada:{},trachea:{},treacle:{},twister:{},vintage:{},abducent:{},abductor:{},afferent:{},alveolus:{},appendix:{plural:"appendices"},astragal:{},bicuspid:{},blowfish:{},blowhole:{},bouffant:{},capitate:{},chowchow:{},cobblers:{},cocktail:{},coquille:{},couscous:{},doughboy:{},doughnut:{},dumpling:{},efferent:{},eminence:{},exocrine:{},fascicle:{},flatfish:{},flatfoot:{},flummery:{},forehead:{},foreskin:{},hairline:{},honeydew:{},licorice:{},ligament:{},lollipop:{},macaroni:{},mackerel:{},marinade:{},membrane:{},monstera:{},mouthful:{},muscatel:{},pheasant:{},physique:{},potation:{},prostate:{},ramequin:{},receptor:{},sillabub:{},sinusoid:{},smoothie:{},specimen:{},streusel:{},stuffing:{},syllabub:{},teardrop:{},venation:{},windfall:{},abdominal:{},apparatus:{},blueberry:{},casserole:{},corpuscle:{},cranberry:{},demitasse:{},dentition:{},drinkable:{},drumstick:{},epiphysis:{},flageolet:{},fricassee:{},hamburger:{},labyrinth:{},lifeblood:{},lineament:{},liquorice:{},mastoidal:{},maxillary:{},navicular:{},pituitary:{},pompadour:{},provender:{},purulence:{},shellfish:{},spaghetti:{},spareribs:{},splayfoot:{},spoilable:{},sundowner:{},sweetener:{},trapezium:{},trapezoid:{},umbilical:{},ventricle:{},vestibule:{},zygomatic:{},applesauce:{},autoplasty:{},blackheart:{},breadstuff:{},cheesecake:{},comestible:{},gastronomy:{},hotchpotch:{},interstice:{},jawbreaker:{},kitambilla:{},maraschino:{},metacarpal:{},metatarsal:{},passageway:{},perishable:{},salmagundi:{},shortening:{},articulator:{},excrescence:{},grasshopper:{},griddlecake:{},intercostal:{},longanberry:{},nourishment:{},screwdriver:{},smorgasbord:{},spindlelegs:{},checkerberry:{},perspiration:{},spindleshanks:{},parasympathetic:{},ab:{},ade:{},ale:{},bap:{},bun:{},jak:{},lat:{},lox:{},pes:{},pie:{},poi:{},pud:{},pus:{},tum:{},vas:{},veg:{},anus:{},arak:{},axon:{},baba:{},bile:{},bleb:{},bleu:{},bock:{},bosc:{},choc:{},clit:{},cola:{},coxa:{},crus:{},cuke:{},duff:{},dura:{},edda:{},eggs:{},fist:{},flab:{},flan:{},fugu:{},genu:{},ghee:{},glia:{},grog:{},isaw:{},java:{},kava:{},marc:{},mayo:{},mead:{},miso:{},mons:{},naan:{},nape:{},nipa:{},oleo:{},orzo:{},ouzo:{},ovum:{},pecs:{},pita:{},pone:{},pons:{},porc:{},rete:{},rima:{},rind:{},roux:{},ruga:{},rusk:{},slaw:{},sops:{},suet:{},tofu:{},ugli:{},ulna:{},umbo:{},uvea:{},veal:{},veau:{},vena:{},vino:{},womb:{},ziti:{},zona:{},ackee:{},adobo:{},aioli:{},anjou:{},ankle:{},annon:{},aorta:{},arcus:{},aspic:{},atole:{},axone:{},babka:{},bacon:{},bagel:{},bialy:{},bigos:{},bitok:{},blanc:{},blini:{},bliny:{},boeuf:{},borsh:{},bowel:{},bursa:{},butty:{},cauda:{},cavum:{},cecum:{},celom:{},chips:{},chyle:{},cider:{},congo:{},copra:{},cornu:{},cuppa:{},cutis:{},cyder:{},cytol:{},decaf:{},donut:{},facia:{},femur:{},filum:{},flews:{},fovea:{},fries:{},gigot:{},gland:{},glans:{},gleet:{},glogg:{},glute:{},gonad:{},goody:{},grist:{},grits:{},gruel:{},gyrus:{},hilus:{},hoagy:{},hooch:{},hooks:{},hymen:{},hyson:{},ileum:{},ilium:{},incus:{},inion:{},jello:{},julep:{},kabob:{},kasha:{},kebab:{},knish:{},kumis:{},kvass:{},lansa:{},latke:{},latte:{},lichi:{},limpa:{},lymph:{},macon:{},manus:{},matzo:{},mucus:{},nacho:{},naris:{},nates:{},negus:{},offal:{},ootid:{},pekoe:{},penis:{},penne:{},perry:{},pesto:{},pilaf:{},pinky:{},pizza:{},plica:{},porta:{},pruno:{},psoas:{},pubis:{},quiff:{},raita:{},ramus:{},raphe:{},salmi:{},salsa:{},savoy:{},sebum:{},serum:{},sirup:{},skull:{},sperm:{},steak:{},sudor:{},sushi:{},taffy:{},tamal:{},tater:{},teeth:{},teres:{},tibia:{},titty:{},toddy:{},toffy:{},torso:{},torte:{},tress:{},uvula:{},vagus:{},viand:{},vodka:{},vomer:{},vulva:{},wrist:{},adnexa:{},afters:{},agnail:{},ananas:{},anlage:{},annexa:{},annona:{},antrum:{},armpit:{},arrack:{},axilla:{},baguet:{},beigel:{},biceps:{},bisque:{},blintz:{},bonbon:{},borsch:{},brazil:{},bregma:{},bulgur:{},burger:{},cachou:{},caecum:{},canape:{},canola:{},cardia:{},carina:{},carpus:{},casaba:{},catsup:{},caviar:{},chevre:{},chiasm:{},chilli:{},choana:{},coccyx:{},coelom:{},comedo:{},concha:{},confit:{},congou:{},corium:{},corpse:{},cupper:{},cuspid:{},cutlet:{},damson:{},danish:{},dermis:{},dewlap:{},dolmas:{},eclair:{},eggnog:{},eschar:{},eyelid:{},farina:{},fauces:{},fibula:{},finnan:{},flexor:{},fundus:{},gateau:{},geneva:{},giblet:{},glossa:{},gluten:{},goatee:{},gobbet:{},gonion:{},goober:{},graham:{},grappa:{},groats:{},gulyas:{},haggis:{},hairdo:{},hallah:{},hallux:{},hamate:{},haslet:{},hoagie:{},hominy:{},hommos:{},hootch:{},hotpot:{},huitre:{},hummus:{},inguen:{},intima:{},jambon:{},jugale:{},jumbal:{},karyon:{},kencur:{},kidney:{},kipper:{},kirsch:{},kishke:{},korlan:{},kummel:{},labium:{},lamina:{},lanseh:{},lanugo:{},larynx:{},lekvar:{},limbus:{},lingua:{},lobule:{},lochia:{},locule:{},lunule:{},matzoh:{},meatus:{},meninx:{},milium:{},mohawk:{},mouton:{},mucosa:{},muesli:{},muffin:{},murphy:{},mutton:{},nasion:{},nervus:{},neuron:{},nougat:{},oculus:{},omelet:{},onyxis:{},oocyte:{},oolong:{},operon:{},organs:{},paczki:{},paella:{},palate:{},paries:{},pastis:{},paunch:{},pectus:{},phyllo:{},pilaff:{},pinkie:{},pinole:{},pirogi:{},pleura:{},plexus:{},pollex:{},polony:{},posset:{},potage:{},poteen:{},potion:{},potpie:{},poulet:{},premix:{},pulque:{},purloo:{},quiche:{},rectum:{},rectus:{},repast:{},retina:{},rhaphe:{},ribier:{},rickey:{},rotgut:{},sacrum:{},salami:{},saliva:{},samosa:{},sapota:{},scampi:{},scampo:{},sclera:{},scruff:{},seckel:{},serosa:{},shandy:{},sherry:{},silage:{},skilly:{},smegma:{},soleus:{},sorbet:{},sputum:{},stapes:{},stodge:{},succus:{},sulcus:{},sundae:{},sutura:{},tahini:{},tamale:{},tarsus:{},tendon:{},testis:{},thymus:{},tidbit:{},tiffin:{},tisane:{},titbit:{},toffee:{},tonsil:{},tragus:{},troche:{},tubule:{},tunica:{},unguis:{},ureter:{},uterus:{},vagina:{},veggie:{},venula:{},venule:{},vermis:{},vesica:{},viscus:{},vitals:{},waters:{},whisky:{},wiener:{},yogurt:{},zaatar:{},zonula:{},zonule:{},zygoma:{},zygote:{},absinth:{},akvavit:{},aniseed:{},aquavit:{},arteria:{},ashcake:{},baklava:{},bannock:{},beignet:{},keen:{},rage:{},wish:{},aside:{},chafe:{},gloss:{},tense:{},whole:{},worry:{},effect:{},reject:{},riddle:{},snatch:{},speech:{},closure:{},collect:{},romance:{},flourish:{},classical:{},influence:{},substance:{},reflection:{},inclination:{},recognition:{},dot:{},nod:{},blur:{},itch:{},slur:{},solo:{},wink:{},abuse:{},acute:{},alert:{},angle:{},bluff:{},cheer:{},honor:{},humor:{},lyric:{},snarl:{},tally:{},accent:{},degree:{},detail:{},indent:{},matter:{},patent:{},rubric:{},thrill:{},abandon:{},bluster:{},concern:{},concord:{},formula:{plural:"formulae"},imprint:{},nominal:{},quality:{},reading:{},sputter:{},torture:{},wrinkle:{},contrast:{},estimate:{},harmonic:{},judgment:{},reaction:{},sanction:{},singular:{},straddle:{},construct:{},judgement:{},reflexion:{},rendering:{},universal:{},acceptance:{},discipline:{},irritation:{},regulation:{},relaxation:{},submission:{},application:{},replication:{},construction:{},introduction:{},presentation:{},cant:{},code:{},joke:{},pain:{},stab:{},trot:{},will:{},blame:{},brief:{},dodge:{},fancy:{},glide:{},grasp:{},guess:{},quote:{},scent:{},slant:{},snort:{},swoop:{},theme:{},trial:{},vocal:{},accord:{},affect:{},cancel:{},debate:{},desire:{},heroic:{},murmur:{},phrase:{},resume:{},scream:{},serial:{},tangle:{},closing:{},dissent:{},drawing:{},example:{},exhibit:{},fatigue:{},feeling:{},mention:{},partial:{},posture:{},protest:{},regress:{},telling:{},welcome:{},absolute:{},analysis:{plural:"analyses"},distress:{},pastoral:{},platform:{},temporal:{},agreement:{},attention:{},beginning:{},closeness:{},connexion:{},dimension:{},discourse:{},lightness:{},principle:{},surrender:{},assignment:{},coordinate:{},involution:{},abstraction:{},arrangement:{},conjunction:{},declaration:{},penetration:{},proposition:{},realisation:{},realization:{},condensation:{},consideration:{},no:{},cue:{},fun:{},rub:{},bias:{},gift:{},hoot:{},jazz:{},oral:{},snub:{},text:{},tune:{},urge:{},coast:{},craze:{},daily:{},debut:{},dowse:{},funny:{},logic:{},mercy:{},peace:{},rerun:{},samba:{},slang:{},taboo:{},verse:{},whine:{},words:{},aspect:{},babble:{},canker:{},choice:{},clamor:{},denial:{},device:{},esteem:{},format:{},lament:{},manual:{},menace:{},normal:{},pardon:{},regret:{},skinny:{},sorrow:{},tickle:{},twinge:{},vision:{},warmth:{},caution:{},charter:{},conceit:{},cunning:{},delight:{},dictate:{},discord:{},finance:{},harmony:{},keynote:{},knowing:{},leaning:{},lecture:{},mistake:{},musical:{},offense:{},palaver:{},preempt:{},purpose:{},pyrrhic:{},realism:{},sharing:{},texture:{},worship:{},writing:{},aspirate:{},biweekly:{},blessing:{},citation:{},despatch:{},dullness:{},feminine:{},flatness:{},geminate:{},manifest:{},personal:{},pleasure:{},politics:{},singsong:{},yielding:{},agitation:{},attrition:{},bimonthly:{},broadcast:{},confusion:{},deviation:{},disregard:{},education:{},faintness:{},heaviness:{},imitation:{},indenture:{},interview:{},isolation:{},isometric:{},minuscule:{},portrayal:{},predicate:{},provision:{},screaming:{},signature:{},spiritual:{},throwaway:{},tightness:{},accounting:{},aggression:{},assumption:{},attraction:{},commercial:{},compromise:{},confession:{},confidence:{},conformity:{},conveyance:{},detachment:{},difference:{},discretion:{},imperative:{},mellowness:{},modulation:{},tenderness:{},uneasiness:{},awkwardness:{},discernment:{},elimination:{},endorsement:{},examination:{},fabrication:{},familiarity:{},implication:{},indorsement:{},involvement:{},observation:{},obstruction:{},performance:{},requisition:{},sensitivity:{},testimonial:{},appreciation:{},articulation:{},condemnation:{},confirmation:{},deliberation:{},intervention:{},satisfaction:{},confrontation:{},decomposition:{},determination:{},reinforcement:{},understanding:{},characteristic:{},correspondence:{},sophistication:{},transformation:{},rationalisation:{},rationalization:{},dub:{},fog:{},bold:{},buoy:{},dare:{},daze:{},envy:{},gape:{},okay:{},plus:{},rasp:{},rime:{},role:{},tabu:{},yell:{},above:{},affix:{},agape:{},chord:{},croak:{},doubt:{},email:{},essay:{},folly:{},idiom:{},laugh:{},modal:{},panic:{},posit:{},rhyme:{},rider:{},rumba:{},scare:{},scorn:{},sneer:{},trill:{},truth:{},wince:{},adagio:{},binary:{},daring:{},defeat:{},dismay:{},docket:{},filing:{},flavor:{},giving:{},gospel:{},lesson:{},median:{},neuter:{},notion:{},parody:{},parole:{},plight:{},rebuff:{},rhumba:{},sample:{},shiver:{},solace:{},trance:{},unseen:{},vanity:{},vector:{},amnesty:{},anguish:{},arousal:{},bucolic:{},caption:{},catalog:{},contour:{},descant:{},disdain:{},dispute:{},fantasy:{},flavour:{},glimpse:{},insight:{},languor:{},licence:{},marking:{},overbid:{},prelude:{},probate:{},purport:{},pursuit:{},reality:{},receipt:{},recital:{},riposte:{},splurge:{},sticker:{},summons:{},wrangle:{},approval:{},buoyancy:{},converse:{},coolness:{},covenant:{},crotchet:{},devotion:{},dialogue:{},emphasis:{},esthetic:{},excision:{},fairness:{},fixation:{},forecast:{},hieratic:{},identity:{},illusion:{},integral:{},monotone:{},offering:{},paradigm:{},premiere:{},printing:{},referent:{},rescript:{},research:{},rhetoric:{},schedule:{},skimming:{},sleeping:{},speaking:{},splutter:{},streamer:{},tendency:{},topology:{},vexation:{},wildness:{},adjective:{},aesthetic:{},assurance:{},burlesque:{},catalogue:{},correlate:{},detection:{},discovery:{},dismissal:{},exclusion:{},exclusive:{},expansion:{},impromptu:{},inaugural:{},indicator:{},intensive:{},interdict:{},largeness:{},masculine:{},paragraph:{},partitive:{},pragmatic:{},prevision:{},quarterly:{},quotation:{},readiness:{},rendition:{},reverence:{},roundness:{},safeguard:{},suspicion:{},sweetness:{},thickness:{},trademark:{},antagonism:{},aspiration:{},bitterness:{},coarseness:{},collection:{},conjecture:{},deposition:{},estimation:{},excitement:{},gloominess:{},impossible:{},incitement:{},invocation:{},inwardness:{},literature:{},morphology:{},narrowness:{},nominative:{},observance:{},possessive:{},postmortem:{},preemption:{},preference:{},profession:{},profundity:{},recitation:{},redundancy:{},abnormality:{},acquisition:{},affirmation:{},affirmative:{},alternative:{},bombardment:{},commutation:{},concurrence:{},convergence:{},countenance:{},disposition:{},distinction:{},distraction:{},enlargement:{},expectation:{},fingerprint:{},indentation:{},instruction:{},nationalism:{},possibility:{},presumption:{},publication:{},spectacular:{},speculation:{},substantive:{},superlative:{},unconscious:{},unitisation:{},unitization:{},anticipation:{},apprehension:{},circumstance:{},continuation:{},coordination:{},countercheck:{},distribution:{},hieroglyphic:{},illustration:{},intimidation:{},misdirection:{},overestimate:{},precondition:{},renunciation:{},approximation:{},authorisation:{},authorization:{},certification:{},falsification:{},interrogative:{},nonconformity:{},reduplication:{},sensitiveness:{},sequestration:{},superposition:{},underestimate:{},capitalisation:{},capitalization:{},generalisation:{},generalization:{},perceptiveness:{},recapitulation:{},sensationalism:{},awe:{},bop:{},ego:{},hex:{},jot:{},lit:{},nub:{},vow:{},beta:{},brag:{},clue:{},cull:{},elan:{},epic:{},funk:{},fury:{},gibe:{},hymn:{},jibe:{},leer:{},lust:{},mood:{},oath:{},pang:{},plea:{},quip:{},rant:{},riff:{},visa:{},zeal:{},zest:{},alibi:{},badge:{},basis:{plural:"bases"},bravo:{},carol:{},chant:{},chaos:{},conga:{},delta:{},demur:{},dread:{},fable:{},flair:{},fugue:{},given:{},gloat:{},gloom:{},hunch:{},infix:{},irony:{},largo:{},least:{},libel:{},magic:{},moral:{},polka:{},reply:{},sally:{},spiel:{},spook:{},stymy:{},tango:{},usage:{},velar:{},vigil:{},whoop:{},affair:{},airing:{},ardour:{},ballot:{},bathos:{},beauty:{},bellow:{},bowing:{},curtsy:{},deceit:{},dental:{},dialog:{},gambit:{},gibber:{},grudge:{},halloo:{},insult:{},intent:{},italic:{},kowtow:{},labial:{},latest:{},manner:{},mumble:{},naming:{},outcry:{},pathos:{},piffle:{},plural:{},policy:{},praise:{},raving:{},rehash:{},revise:{},scalar:{},scroll:{},seeing:{},shriek:{},sonnet:{},stymie:{},tattle:{},theory:{},tingle:{},tumult:{},upbeat:{},urging:{},wangle:{},weekly:{},wheeze:{},yearly:{},acclaim:{},acidity:{},airmail:{},analogy:{},apology:{},barrage:{},barrier:{},bidding:{},bonding:{},buildup:{},cadence:{},cartoon:{},censure:{},clutter:{},concert:{},cruelty:{},despair:{},disgust:{},dodging:{},earmark:{},embargo:{},enquiry:{},erasure:{},eristic:{},fluency:{},gradual:{},gravity:{},initial:{},inquiry:{},lingual:{},loyalty:{},mastery:{},mimesis:{},monthly:{},numeral:{},omnibus:{},outlook:{},palatal:{},placard:{},polemic:{},posting:{},presage:{},preview:{},quibble:{},refrain:{},reissue:{},reorder:{},reprint:{},rewrite:{},roundup:{},singing:{},slander:{},sorting:{},tasting:{},tribute:{},turmoil:{},whisper:{},ablative:{},acridity:{},allegory:{},alveolar:{},ambition:{},ascender:{},audition:{},binomial:{},brandish:{},brooding:{},bundling:{},calculus:{},circular:{},clipping:{},coldness:{},courtesy:{},critique:{},daydream:{},defiance:{},delusion:{},demurrer:{},disfavor:{},disquiet:{},dynamism:{},easiness:{},equation:{},fondness:{},grasping:{},grouping:{},guidance:{},guttural:{},hornpipe:{},hysteria:{},idealism:{},intimacy:{},mistrust:{},monition:{},negation:{},nickname:{},nihilism:{},notation:{},ordinate:{},outburst:{},particle:{},passport:{},pedagogy:{},petition:{},phantasy:{},planning:{},playbook:{},proposal:{},revision:{},rhapsody:{},ridicule:{},sampling:{},serenade:{},slowness:{},sourness:{},subtitle:{},suspense:{},sympathy:{},tartness:{},teaching:{},theology:{},travesty:{},universe:{},acuteness:{},addiction:{},adoration:{},attending:{},autograph:{},constancy:{},crispness:{},cuneiform:{},deception:{},defensive:{},denseness:{},dialectic:{},dictation:{},digestion:{},diplomacy:{},disfavour:{},editorial:{},emulation:{},enactment:{},evocation:{},fecundity:{},footprint:{},formalism:{},formative:{},gradation:{},grievance:{},grumbling:{},guideline:{},immediacy:{},insurance:{},intention:{},intercept:{},invariant:{},itinerary:{},lassitude:{},majuscule:{},misgiving:{},monologue:{},morbidity:{},murmuring:{},narration:{},nutrition:{},ordinance:{},oversight:{},pictorial:{},pizzicato:{},prejudice:{},quadratic:{},quickness:{},quickstep:{},reckoning:{},reflexive:{},rejoicing:{},repulsion:{},retention:{},retrieval:{},revealing:{},saltiness:{},schooling:{},sentience:{},sulkiness:{},synthesis:{},testament:{},testimony:{},underline:{},undertone:{},accidental:{},accusative:{},adaptation:{},admiration:{},affixation:{},allurement:{},anatomical:{},antiphonal:{},asceticism:{},belittling:{},brightness:{},brilliance:{},chronology:{},classified:{},cleverness:{},clumsiness:{},cognizance:{},compliment:{},concession:{},conscience:{},conspiracy:{},contention:{},continuity:{},decoration:{},determiner:{},deterrence:{},digression:{},diminution:{},discontent:{},dissection:{},dissonance:{},divination:{},empiricism:{},enthusiasm:{},enticement:{},equivalent:{},execration:{},fortissimo:{},grogginess:{},hesitation:{},humbleness:{},hypostasis:{},hypothesis:{plural:"hypotheses"},impatience:{},infliction:{},insistence:{},instalment:{},intermezzo:{},jocularity:{},loneliness:{},neutrality:{},nomination:{},oppression:{},perfection:{},pestilence:{},philosophy:{},precaution:{},pretension:{},propensity:{},refutation:{},reputation:{},revelation:{},rumination:{},salutation:{},semiweekly:{},stigmatism:{},theatrical:{},triviality:{},underscore:{},unfairness:{},vernacular:{},vocabulary:{},whispering:{},acceptation:{},advancement:{},aggravation:{},appellative:{},benevolence:{},calculation:{},comparative:{},concordance:{},conjunctive:{},conjuration:{},correlation:{},correlative:{},countersign:{},denigration:{},designation:{},discourtesy:{},documentary:{},electricity:{},enchantment:{},engrossment:{},exclamation:{},explanation:{},exploration:{},foolishness:{},frustration:{},imperialism:{},infatuation:{},inscription:{},jactitation:{},obfuscation:{},outwardness:{},peculiarity:{},playfulness:{},presentment:{},propagation:{},provocation:{},rationalism:{},regionalism:{},repudiation:{},resignation:{},rotogravure:{},semimonthly:{},sensibility:{},seriousness:{},stipulation:{},strangeness:{},subcontract:{},supposition:{},syncopation:{},titillation:{},tranquility:{},unorthodoxy:{},unsoundness:{},valedictory:{},breakthrough:{},choreography:{},conciliation:{},constitution:{},consultation:{},counterpoint:{},covetousness:{},depreciation:{},faultfinding:{},heedlessness:{},helplessness:{},idealisation:{},idealization:{},impertinence:{},intoxication:{},irritability:{},mercifulness:{},notification:{},pacification:{},processional:{},promulgation:{},proportional:{},recollection:{},retroflexion:{},retroversion:{},significance:{},solicitation:{},spiritualism:{},stupefaction:{},supplication:{},transference:{},acculturation:{},attentiveness:{},communication:{},comprehensive:{},condescension:{},contradiction:{},demonstrative:{},determinative:{},documentation:{},hallucination:{},impersonation:{},individualism:{},interpolation:{},orchestration:{},preoccupation:{},prevarication:{},qualification:{},retentiveness:{},retroflection:{},structuralism:{},symbolisation:{},symbolization:{},versification:{},aggressiveness:{},categorisation:{},demoralisation:{},demoralization:{},farsightedness:{},predisposition:{},recommendation:{},reconstruction:{},sesquipedalian:{},simplification:{},traditionalism:{},conventionality:{},crystallization:{},personification:{},prognostication:{},characterization:{},predetermination:{},pi:{},xi:{},boo:{},bye:{},dit:{},fib:{},ire:{},ken:{},nay:{},pic:{},psi:{},pun:{},wai:{},woe:{},yea:{},blip:{},blog:{},deed:{},demo:{},epos:{},gist:{},grin:{},heed:{},idyl:{},iota:{},jive:{},moan:{},muse:{},norm:{},noun:{},nous:{},odor:{},pean:{},ploy:{},pomp:{},quiz:{},sass:{},sext:{},spam:{},sulk:{},surd:{},tale:{},trig:{},vlog:{},whim:{},yack:{},yoga:{},agony:{},alias:{},aroma:{},axiom:{},bebop:{},blues:{},bonus:{},canto:{},codex:{},creed:{},ditto:{},dogma:{},drawl:{},edict:{},ethic:{},facet:{},fever:{},frown:{},gamma:{},gamut:{},grief:{},groan:{},guilt:{},intro:{},kotow:{},macro:{},odour:{},omega:{},paean:{},pavan:{},peeve:{},prate:{},primo:{},prose:{},psalm:{},qualm:{},retro:{},rumor:{},savvy:{},scowl:{},shrug:{},skill:{},smirk:{},danger:{},push:{},refusal:{},tooling:{},trelvox:{}},verbs:{import:{},call:{},test:{},contain:{},extend:{},use:{},depend:{prep:"on"},rely:{prep:"on"},inherit:{prep:"from"},belong:{prep:"to"},point:{prep:"to"},implement:{},override:{},export:{},define:{},declare:{},reference:{},invoke:{},wrap:{},mock:{},cover:{},document:{},describe:{},modify:{},touch:{},fix:{},break:{},introduce:{},deprecate:{},replace:{},own:{},maintain:{},review:{},merge:{},revert:{},deploy:{},run:{},execute:{},load:{},parse:{},emit:{},validate:{},log:{},throw:{},catch:{},create:{},delete:{},update:{},expose:{},consume:{},produce:{},generate:{},configure:{},install:{},publish:{},release:{},ship:{},watch:{},trigger:{},build:{},write:{},read:{},have:{},like:{},want:{},need:{},believe:{},trust:{},love:{},hate:{},fear:{},hope:{},teach:{},learn:{},drive:{},cook:{},sing:{},visit:{},care:{},grow:{},marry:{},wear:{},eat:{},sleep:{},walk:{},buy:{},sell:{},give:{},take:{},meet:{},ride:{},speak:{},duck:{}},adjectives:{legacy:{type:"subclass"},mock:{type:"subclass"},senior:{type:"subclass"},internal:{type:"subclass"},external:{type:"subclass"},public:{type:"subclass"},private:{type:"subclass"},abstract:{type:"subclass"},static:{type:"subclass"},async:{type:"subclass"},experimental:{type:"subclass"},stable:{type:"subclass"},core:{type:"subclass"},shared:{type:"subclass"},global:{type:"subclass"},local:{type:"subclass"},generated:{type:"subclass"},standalone:{type:"subclass"},primary:{type:"subclass"},secondary:{type:"subclass"},deprecated:{type:"data"},fast:{type:"data"},slow:{type:"data"},large:{type:"data"},small:{type:"data"},flaky:{type:"data"},tested:{type:"data"},documented:{type:"data"},buggy:{type:"data"},broken:{type:"data"},green:{type:"data"},deterministic:{type:"data"},pure:{type:"data"},empty:{type:"data"},stale:{type:"data"},male:{type:"data"},female:{type:"data"},young:{type:"data"},old:{type:"data"},hot:{type:"data"},cold:{type:"data"},sweet:{type:"data"},salty:{type:"data"},sharp:{type:"data"},round:{type:"data"},tall:{type:"data"},short:{type:"data"},happy:{type:"data"},sad:{type:"data"},angry:{type:"data"},afraid:{type:"data"},strong:{type:"data"},weak:{type:"data"},rich:{type:"data"},poor:{type:"data"},hard:{type:"data"},soft:{type:"data"},wild:{type:"data"},gentle:{type:"data"},colorful:{type:"data"},legitimate:{type:"data"},ranked:{type:"data"},related:{type:"data"},sacred:{type:"data"},unaffected:{type:"data"}},properNames:["tmct","Node","npm","JavaScript","TypeScript","Python","Java","Git","GitHub","GitLab","ESLint","Linux","macOS","Windows","Polycode","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]}});function PR(e){let t=String(e),n=[t];return t.length>4&&/[a-z]ies$/.test(t)&&n.push(`${t.slice(0,-3)}y`),/(ses|xes|zes|ches|shes)$/.test(t)&&n.push(t.slice(0,-2)),/[a-z]s$/.test(t)&&!/ss$/.test(t)&&n.push(t.slice(0,-1)),t==="has"&&n.push("have"),n}function Kb(e,t={}){for(let[n,s]of Object.entries(t.nouns||{})){let o={lemma:n,...s||{}};if(o.property&&!FR.has(o.property))throw new Error(`lexicon noun "${n}": property must be "data" or "object", got ${JSON.stringify(o.property)}`);e.nouns.set(n,o),o.plural&&e.nounPlurals.set(o.plural,n)}for(let[n,s]of Object.entries(t.verbs||{}))e.verbs.set(n,{lemma:n,...s||{}});for(let[n,s]of Object.entries(t.adjectives||{})){let o={lemma:n,...s||{}};if(!DR.has(o.type))throw new Error(`lexicon adjective "${n}": type must be "subclass" or "data", got ${JSON.stringify(o.type)}`);e.adjectives.set(n,o)}for(let n of t.properNames||[])e.properNames.set(String(n).toLowerCase(),String(n))}function Cs(e,t=LR){if(!e&&Gu.has(t))return Gu.get(t);let n=Hb,s={nouns:new Map,nounPlurals:new Map,verbs:new Map,adjectives:new Map,properNames:new Map,ns:t};return Kb(s,n),e?(Kb(s,e),s):(Gu.set(t,s),s)}function si(e,t,n={}){return zR(e,t,n)[0]??null}function zR(e,t,n={}){let s=String(t??"").toLowerCase(),o=e.nouns.get(s),r=e.nounPlurals.get(s),i=[],a=new Set,l=c=>{c&&!a.has(c.lemma)&&(a.add(c.lemma),i.push(c))};if(r){let c=e.nouns.get(r)??null;return n.singularOnly&&o?(l(o),l(c)):(l(c),l(o)),i}for(let c of PR(s))l(e.nouns.get(c));return i}var LR,aF,cF,NR,MR,lF,FR,DR,Gu,co=O(()=>{Vb();LR="tmct:",aF=Object.freeze({every:"universal",a:"indefinite",an:"indefinite",the:"definite",no:"negative"}),cF=Object.freeze({"at least":"owl:minCardinality","at most":"owl:maxCardinality",exactly:"owl:cardinality"}),NR=Object.freeze(new Set(["type","kind","sort","form","class","variety","species","breed","genus"])),MR=Object.freeze(new Set(["body","mass","group","collection","set","series","number","amount","piece","part","lot","pair","bunch","pile"])),lF=Object.freeze({one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10});FR=new Set(["data","object"]),DR=new Set(["subclass","data"]);Gu=new Map});var fF,mF,hF,UR,gF,bF,wF,Yb=O(()=>{$s();Oe();fF=Object.freeze({class:"Class",module:"Module",function:"Function",method:"Method",attribute:"Attribute",variable:"GlobalVariable",constant:"GlobalVariable",commit:"Commit"}),mF=Object.freeze({Class:["class","classes"],Module:["module","modules"],Function:["function","functions"],Method:["method","methods"],Attribute:["attribute","attributes"],GlobalVariable:["variable","variables"],Commit:["commit","commits"]}),hF=Object.freeze({Class:[e=>`which classes inherit from ${e}`,e=>`what does ${e} contain`,e=>`where is ${e} defined`],Module:[e=>`what does ${e} import`,e=>`which modules import ${e}`,e=>`where is ${e} defined`],Function:[e=>`what calls ${e}`,e=>`what does ${e} call`,e=>`where is ${e} defined`],Method:[e=>`which class contains ${e}`,e=>`what calls ${e}`,e=>`where is ${e} defined`],Attribute:[e=>`which class contains ${e}`,e=>`where is ${e} defined`],GlobalVariable:[e=>`where is ${e} defined`,e=>`where is ${e} mentioned`],Commit:[e=>`what did commit ${e} touch`,e=>`when did ${e} change`]}),UR=Object.freeze({import:"imports",imports:"imports",importing:"imports",imported:"imports",call:"calls",calls:"calls",calling:"calls",called:"calls",invoke:"calls",invokes:"calls",invoking:"calls",contain:"contains",contains:"contains",containing:"contains",containment:"contains",member:"contains",members:"contains",inherit:"inherits",inherits:"inherits",inheriting:"inherits",inheritance:"inherits",extend:"inherits",extends:"inherits",extending:"inherits",subclass:"inherits",subclasses:"inherits",subclassing:"inherits",test:"tests",tests:"tests",testing:"tests",tested:"tests",coverage:"tests",define:"defines",defines:"defines",defining:"defines",defined:"defines",definition:"defines",definitions:"defines",declaration:"defines",touch:"touches",touches:"touches",touching:"touches",touched:"touches",cochange:"cochange","co-change":"cochange","change-coupling":"cochange",coupled:"cochange",export:"reexports",exports:"reexports",exporting:"reexports",exported:"reexports",reexport:"reexports",reexports:"reexports",reexporting:"reexports","re-export":"reexports","re-exports":"reexports","re-exporting":"reexports",serve:"serves",serves:"serves",serving:"serves",served:"serves",denote:"denotes",denotes:"denotes",denoting:"denotes",denoted:"denotes"}),gF=Object.freeze({imports:["imports"],calls:["calls","callsSymbol"],contains:["contains"],inherits:["inherits"],tests:["tests"],defines:["defines"],touches:["touches","touchesSymbol"],cochange:["cochange"],reexports:["reexports"],serves:["serves"],denotes:["denotes"]}),bF=Object.freeze({imports:{verb:"imports",edgeNoun:"import"},calls:{verb:"calls",edgeNoun:"call"},contains:{verb:"contains",edgeNoun:"containment"},inherits:{verb:"inherits from",edgeNoun:"inheritance"},tests:{verb:"tests",edgeNoun:"test"},defines:{verb:"defines",edgeNoun:"definition"},touches:{verb:"touches",edgeNoun:"touch"},cochange:{verb:"changes together with",edgeNoun:"change-coupling"},reexports:{verb:"re-exports",edgeNoun:"re-export"},serves:{verb:"serves",edgeNoun:"service"},denotes:{verb:"denotes",edgeNoun:"denotation"}}),wF=Object.freeze({imports:[{side:"obj",make:e=>`which modules import ${e}`},{side:"subj",make:e=>`what does ${e} import`}],calls:[{side:"obj",make:e=>`what calls ${e}`},{side:"subj",make:e=>`what does ${e} call`}],contains:[{side:"subj",make:e=>`what does ${e} contain`},{side:"obj",make:e=>`which class contains ${e}`}],inherits:[{side:"obj",make:e=>`which classes inherit from ${e}`},{side:"subj",make:e=>`where is ${e} defined`}],tests:[{side:"obj",make:e=>`what tests ${e}`},{side:"obj",make:e=>`where is ${e} defined`}],defines:[{side:"obj",make:e=>`where is ${e} defined`},{side:"subj",make:e=>`what does ${e} contain`}],touches:[{side:"obj",make:e=>`when did ${e} change`},{side:"subj",make:e=>`what did commit ${e} touch`}],cochange:[{side:"obj",make:e=>`where is ${e} defined`},{side:"subj",make:e=>`which modules import ${e}`}],reexports:[{side:"subj",make:e=>`what does ${e} export`},{side:"obj",make:e=>`where is ${e} defined`}],serves:[{side:"subj",make:e=>`what does ${e} serve`},{side:"obj",make:e=>`what serves ${e}`}],denotes:[{side:"subj",make:e=>`what does ${e} denote`},{side:"obj",make:e=>`what denotes ${e}`}]})});var Ma=O(()=>{qt();co();Yb()});var Pa,Fa=O(()=>{Pa=()=>{throw new Error("gunzipSync unavailable in a browser bundle")}});var WR,IF,Xb=O(()=>{ao();Fa();Is();Ue();Ma();WR={},IF=Q(ve(Ht(WR.url)),"..","..","..")});var Jb=O(()=>{qt();co();Ma()});var GR,qR,WF,qu=O(()=>{qt();co();Lo();GR=Object.freeze({fanoutLimit:5,maxDepth:1,maxTopics:12,minIntervalMs:2e3}),qR=["this","is","about","the"],WF=qR.length});var Qb=O(()=>{_t();Ue()});var Vu=O(()=>{qt()});var VR,oD,Zb=O(()=>{ao();Fa();Is();Ue();Vu();qt();VR={},oD=Q(ve(Ht(VR.url)),"..","..","..")});var iD,aD,cD,ew=O(()=>{iD=Object.freeze(["task","autoFeedback","alloFeedback","turnManagement","timeManagement","discourseStructuring","ownCommunicationManagement","partnerCommunicationManagement","socialObligationsManagement","contactManagement"]),aD=Object.freeze({propositionalQuestion:Object.freeze({dimension:"task",gloss:"a yes/no question about whether a proposition holds ('does X import Y?')"}),checkQuestion:Object.freeze({dimension:"task",gloss:"a yes/no question whose asker already expects the answer yes ('..., right?')"}),setQuestion:Object.freeze({dimension:"task",gloss:"a wh-question asking for the members of a set ('what does X import?')"}),choiceQuestion:Object.freeze({dimension:"task",gloss:"a question asking which of the listed alternatives holds ('is X a module or a class?')"}),inform:Object.freeze({dimension:"task",gloss:"a declarative telling the addressee something (a teach turn; also tmct explaining its own function)"}),answer:Object.freeze({dimension:"task",gloss:"an inform that discharges a question just asked (an answer grounded in the graph)"}),confirm:Object.freeze({dimension:"task",gloss:"an answer 'yes' to a check question"}),disconfirm:Object.freeze({dimension:"task",gloss:"an answer 'no' to a check question"}),agreement:Object.freeze({dimension:"task",gloss:"an inform stating that the speaker holds what the addressee just stated to be true"}),disagreement:Object.freeze({dimension:"task",gloss:"an inform stating that the speaker holds what the addressee just stated to be false"}),correction:Object.freeze({dimension:"task",gloss:"a disagreement that also supplies the replacement ('no, I meant Y')"}),request:Object.freeze({dimension:"task",gloss:"asks the addressee to perform an action ('solve it' \u2014 a goal turn)"}),instruct:Object.freeze({dimension:"task",gloss:"a request the addressee is expected to carry out without negotiation (a bare imperative)"}),suggestion:Object.freeze({dimension:"task",gloss:"puts an action forward as advisable without claiming authority over the addressee"}),offer:Object.freeze({dimension:"task",gloss:"commits the speaker to an action, conditional on the addressee wanting it"}),autoPositive:Object.freeze({dimension:"autoFeedback",gloss:"the sender reports its own processing of the previous turn succeeded (an acknowledgement)"}),autoNegative:Object.freeze({dimension:"autoFeedback",gloss:"the sender reports its own processing of the previous turn failed \u2014 tmct's honest miss"}),initialGreeting:Object.freeze({dimension:"socialObligationsManagement",gloss:"opens an exchange of greetings ('hi')"}),returnGreeting:Object.freeze({dimension:"socialObligationsManagement",gloss:"answers a greeting with a greeting"}),thanking:Object.freeze({dimension:"socialObligationsManagement",gloss:"expresses gratitude for something the addressee did"}),apology:Object.freeze({dimension:"socialObligationsManagement",gloss:"expresses regret for something the speaker did"})}),cD=Object.freeze({teach:"inform","ask-set":"setQuestion","ask-propositional":"propositionalQuestion",goal:"request",imperative:"instruct","honest-miss":"autoNegative",greeting:"initialGreeting",thanks:"thanking",help:"inform","game-answer":"answer","game-inform":"inform"})});function oi(e){let t=new Map;for(let[n,s]of e||[])!n||!s||n===s||(t.has(n)||t.set(n,new Set),t.get(n).add(s));return t}function Da(e,t,{cap:n=6}={}){let s=[e],o=new Set([e]),r=e;for(;s.length<n;){let i=[...t.get(r)||[]].filter(a=>!o.has(a)).sort();if(!i.length)break;r=i[0],o.add(r),s.push(r)}return s}function tw(e,t,{cap:n=64}={}){let s=new Set([e]),o=[e];for(;o.length&&s.size<n;){let r=o.shift();for(let i of t.get(r)||[])s.has(i)||(s.add(i),o.push(i))}return s}function Hu(e,t,n,s){if(n.has(e))return n.get(e);if(s.has(e))return 1;s.add(e);let o=t.get(e),r=1;if(o&&o.size){let i=0;for(let a of o)i=Math.max(i,Hu(a,t,n,s));r=i+1}return s.delete(e),n.set(e,r),r}function HR(e){let t=new Map;for(let[n,s]of e||[])!n||!s||(t.has(n)||t.set(n,new Set),t.get(n).add(s),t.has(s)||t.set(s,new Set),t.get(s).add(n));return t}function KR(e,t,n,s,o,{threshold:r,rootDepth:i,icByTerm:a}){let l=tw(e,n),c=tw(t,n);if(l.has(t)||c.has(e))return{distinct:!1,reason:"subsumes",lcs:l.has(t)?t:e};if(s.size)for(let h of l){let g=s.get(h);if(g){for(let b of c)if(g.has(b))return{distinct:!0,reason:"disjoint",lcs:null}}}let u=[...l].filter(h=>c.has(h));if(!u.length)return l.size<2||c.size<2?{distinct:!1,reason:"inconclusive",lcs:null}:{distinct:!0,reason:"non-intersecting",lcs:null};let d=h=>Hu(h,n,o,new Set),f=u[0],p=d(f);for(let h of u){let g=d(h);(g>p||g===p&&h<f)&&(f=h,p=g)}if(p<=i)return{distinct:!0,reason:"root-subsumer",lcs:f};if(a){let h=a.get(f);return typeof h=="number"&&h<r?{distinct:!0,reason:"low-ic",lcs:f}:{distinct:!1,reason:"shared-lineage",lcs:f}}return 2*p/(d(e)+d(t))<r?{distinct:!0,reason:"shallow-subsumer",lcs:f}:{distinct:!1,reason:"shared-lineage",lcs:f}}function za(e,{subClassEdges:t=[],parents:n=null,disjointEdges:s=[],threshold:o=.5,rootDepth:r=1,icByTerm:i=null}={}){let a=[...new Set((e||[]).filter(Boolean))],l=n||oi(t),c=HR(s),u=new Map,d=new Map(a.map(y=>[y,y])),f=y=>{for(;d.get(y)!==y;)d.set(y,d.get(d.get(y))),y=d.get(y);return y},p=(y,w)=>{let v=f(y),_=f(w);v!==_&&d.set(v<_?_:v,v<_?v:_)},m=[];for(let y=0;y<a.length;y+=1)for(let w=y+1;w<a.length;w+=1){let v=KR(a[y],a[w],l,c,u,{threshold:o,rootDepth:r,icByTerm:i});m.push({a:a[y],b:a[w],...v}),v.distinct||p(a[y],a[w])}let h=new Map;for(let y of a){let w=f(y);h.has(w)||h.set(w,[]),h.get(w).push(y)}let g=y=>Hu(y,l,u,new Set),b=[...h.values()].map(y=>{let w=[...y].sort(),v=w[0],_=g(v);for(let $ of w){let x=g($);x>_&&(_=x,v=$)}return{objects:w,label:v}}).sort((y,w)=>y.label.localeCompare(w.label));return{split:b.length>1,clusters:b,pairs:m}}var Ua=O(()=>{Vt()});function Ku(e){return typeof e=="string"&&YR.test(e)}function nw(e){return!!e&&typeof e=="object"&&lo(e.s)}function Yu(e){return!!e&&typeof e=="object"&&e.kind==="fact"&&Ku(e.world)&&lo(e.subject)&&lo(e.predicate)&&lo(e.object)}function Xu(e){if(!e||typeof e!="object"||e.kind!=="rule"||!Ku(e.world)||!lo(e.name)||!JR.has(e.ruleKind)||!e.slots||typeof e.slots!="object"||Array.isArray(e.slots))return!1;let t=Object.values(e.slots);return t.length>0&&t.every(lo)}function Ju(e){return!!e&&typeof e=="object"&&e.kind==="meta"&&Ku(e.world)&&lo(e.opening)}function sw(e){return Yu(e)||Xu(e)||Ju(e)}function ow(e){let t=e||[],n=t.filter(c=>c.predicate===QR).sort((c,u)=>`${c.subject}\0${c.object}`.localeCompare(`${u.subject}\0${u.object}`));if(!n.length)return t;let s=new Set(t.filter(c=>c.predicate==="rdf:type").map(c=>c.subject)),o=new Map;for(let c of t)c.predicate==="mgx:located-in"&&o.set(c.subject,c.object);let r=(c,u)=>t.some(d=>d.predicate==="rdf:type"&&d.object===c&&o.get(d.subject)===u),i=t.find(c=>typeof c.world=="string"&&c.kind==="fact"),a=(c,u,d)=>({...i?{world:i.world,kind:"fact"}:{},subject:c,predicate:u,object:d}),l=[];for(let c of n){let u=c.subject,d=c.object;if(r(d,u))continue;let f=d,p=1;for(;s.has(f);)p+=1,f=`${d}-${p}`;s.add(f),l.push(a(f,"rdf:type",d)),l.push(a(f,"rdf:type","portable")),l.push(a(f,"mgx:located-in",u))}return l.length?[...t,...l]:t}var YR,XR,JR,lo,QR,Os=O(()=>{YR=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,XR=Object.freeze(["action-signature","action-precond","action-effect","action-constraint"]),JR=new Set(XR),lo=e=>typeof e=="string"&&e.trim()!=="";QR="mgx:default-contains"});var eT,tT,nT,sT,oT,rT,iT,aT,cT,$D,lT,rw,vD,xD,iw=O(()=>{co();Io();eT="subClassOf",tT="typeAssertion",nT="relation",sT="someValuesFrom",oT="cardinality",rT="disjointWith",iT="possessive",aT="adjective",cT="capability",$D=Object.freeze([eT,tT,nT,sT,oT,rT,iT,aT,cT]),lT=new Set(["go","take","drop","open","unlock","close","give","look","talk","examine","dig","eat","put"]),rw=new Map([["pick up","take"],["pick","take"],["grab","take"],["put down","drop"],["set down","drop"],["leave","drop"],["talk to","talk"],["speak to","talk"],["speak with","talk"],["talk","talk"],["speak","talk"],["chat with","talk"],["converse with","talk"],["look at","examine"],["examine","examine"],["inspect","examine"],["have a look at","examine"],["take a look at","examine"],["check out","examine"],["shut","close"]]),vD=Math.max(...[...rw.keys()].map(e=>e.split(" ").length)),xD=[...new Set([...lT,...[...rw.keys()].map(e=>e.split(" ")[0])])]});var uo=O(()=>{});var Qu=O(()=>{Oe();$s();uo()});function jt({name:e,label:t,question:n,params:s=[],preconditions:o=[],add:r=[],del:i=[]}){return Object.freeze({type:Ls.Capability,name:e,label:t,question:n,readOnly:!0,parameters:Object.freeze(s),preconditions:Object.freeze(o),effects:Object.freeze({add:Object.freeze(r),del:Object.freeze(i)})})}var uT,Ls,Ee,TD,ii,nt,Mt,Kt,dT,aw,kt,pT,fT,cw,AD,ID,CD,lw=O(()=>{uT=Object.freeze({cap:"urn:tmct:cap#",taught:"urn:tmct:taught#",mgx:"urn:tmct:mgx#",seon:"http://se-on.org/ontologies/seon.owl#"}),Ls=Object.freeze({Capability:"cap:Capability",Parameter:"cap:Parameter",Precondition:"cap:Precondition",Effect:"cap:Effect"}),Ee=Object.freeze({Symbol:"seon:CodeEntity",Module:"mgx:Module",Class:"seon:ClassType",MemoryTerm:"mgx:MemoryTerm",Query:"cap:FreeText",Kind:"cap:KindFilter",Package:"cap:PackageName"}),TD=Object.freeze([Ee.MemoryTerm]),ii=Object.freeze({graphLoaded:"cap:graph-loaded",resolves:"cap:resolves",anyPresent:"cap:any-present",memoryFacts:"cap:memory-facts"}),nt=(e,t,{arg:n=e,required:s=!0,note:o=""}={})=>Object.freeze({type:Ls.Parameter,name:e,kind:t,arg:n,required:s,note:o}),Mt=()=>Object.freeze({type:Ls.Precondition,pred:ii.graphLoaded}),Kt=(e,t)=>Object.freeze({type:Ls.Precondition,pred:ii.resolves,param:e,as:t}),dT=e=>Object.freeze({type:Ls.Precondition,pred:ii.anyPresent,params:Object.freeze([...e])}),aw=()=>Object.freeze({type:Ls.Precondition,pred:ii.memoryFacts}),kt=(e,t=null)=>Object.freeze({type:Ls.Effect,pred:"cap:knows",topic:e,of:t?`?${t}`:null});pT=Object.freeze([jt({name:"tmct_search",label:"search",question:"lexical search across the graph",params:[nt("query",Ee.Query,{required:!1,note:"required unless a kind filter is given"}),nt("kind",Ee.Kind,{required:!1}),nt("name",Ee.Query,{required:!1}),nt("decorator",Ee.Query,{required:!1})],preconditions:[Mt(),dT(["query","kind"])],add:[kt("matches","query")]}),jt({name:"tmct_describe",label:"describe",question:"a symbol's definition, kind and relations",params:[nt("symbol",Ee.Symbol)],preconditions:[Mt(),Kt("symbol",Ee.Symbol)],add:[kt("description","symbol")]}),jt({name:"tmct_signature",label:"signature",question:"a symbol's signature only",params:[nt("symbol",Ee.Symbol)],preconditions:[Mt(),Kt("symbol",Ee.Symbol)],add:[kt("signature","symbol")]}),jt({name:"tmct_impact",label:"impact",question:"what a change to this module or symbol reaches (impact closure)",params:[nt("module",Ee.Symbol,{note:"a Module, or any sited symbol \u2014 a fine-grained seed walks callsSymbol dependents and coarsens them to module grain"})],preconditions:[Mt(),Kt("module",Ee.Symbol)],add:[kt("impact","module")]}),jt({name:"tmct_members",label:"members",question:"the methods/attributes of a class",params:[nt("class",Ee.Class,{arg:"class"})],preconditions:[Mt(),Kt("class",Ee.Class)],add:[kt("members","class")]}),jt({name:"tmct_subclasses",label:"subclasses",question:"the subclasses of a class",params:[nt("class",Ee.Class,{arg:"class"})],preconditions:[Mt(),Kt("class",Ee.Class)],add:[kt("subclasses","class")]}),jt({name:"tmct_exports",label:"exports",question:"a module's public exports",params:[nt("module",Ee.Module)],preconditions:[Mt(),Kt("module",Ee.Module)],add:[kt("exports","module")]}),jt({name:"tmct_callers",label:"callers",question:"functions that call this symbol",params:[nt("symbol",Ee.Symbol)],preconditions:[Mt(),Kt("symbol",Ee.Symbol)],add:[kt("callers","symbol")]}),jt({name:"tmct_callees",label:"callees",question:"functions this symbol calls",params:[nt("symbol",Ee.Symbol)],preconditions:[Mt(),Kt("symbol",Ee.Symbol)],add:[kt("callees","symbol")]}),jt({name:"tmct_calls",label:"calls",question:"the call edges out of this symbol/module",params:[nt("symbol",Ee.Symbol)],preconditions:[Mt(),Kt("symbol",Ee.Symbol)],add:[kt("calls","symbol")]}),jt({name:"tmct_tests_for",label:"tests",question:"the tests covering this symbol",params:[nt("symbol",Ee.Symbol)],preconditions:[Mt(),Kt("symbol",Ee.Symbol)],add:[kt("tests","symbol")]}),jt({name:"tmct_untested",label:"untested",question:"symbols with no covering test",params:[],preconditions:[Mt()],add:[kt("untested",null)]}),jt({name:"tmct_history",label:"history",question:"the commit history of this symbol",params:[nt("symbol",Ee.Symbol)],preconditions:[Mt(),Kt("symbol",Ee.Symbol)],add:[kt("history","symbol")]}),jt({name:"tmct_cochanges",label:"cochanges",question:"symbols that change together with this one",params:[nt("symbol",Ee.Symbol)],preconditions:[Mt(),Kt("symbol",Ee.Symbol)],add:[kt("cochanges","symbol")]}),jt({name:"tmct_architecture",label:"arch",question:"the architecture overview (optional package filter)",params:[nt("package",Ee.Package,{required:!1})],preconditions:[Mt()],add:[kt("architecture","package")]}),jt({name:"tmct_related",label:"related",question:"a term's synonyms and related concepts (the SKOS view over the conversational-memory graph)",params:[nt("term",Ee.MemoryTerm,{note:"a concept term, matched against memory relation facts rather than resolved in the code graph"})],preconditions:[aw(),Kt("term",Ee.MemoryTerm)],add:[kt("related","term")]}),jt({name:"tmct_sprite",label:"sprite",question:"the sprite for a class, with the expression and size asked for",params:[nt("class",Ee.MemoryTerm,{arg:"class",note:"a world class, matched against the memory graph's own fact rows rather than resolved in the code graph"}),nt("expression",Ee.Kind,{required:!1,note:"one of sprite-expressions.mjs's palette words, carried as an mgx:feels fact"}),nt("size",Ee.Kind,{required:!1,note:"a taught mgx:hasProperty size word, resolved to a render scale \u2014 not a template tier"})],preconditions:[aw(),Kt("class",Ee.MemoryTerm)],add:[kt("sprite","class")]})]),fT=e=>Object.freeze(e.reduce((t,n)=>(t[n.name]=n,t),Object.create(null))),cw=pT,AD=fT(cw),ID=Object.freeze({tmct_context:"unbounded edit-context bundle (multi-file); needs a size/budget precondition",tmct_context_more:"unbounded context continuation; same as tmct_context",tmct_snippet:"raw source-file read (reads the filesystem); needs a file-read + span precondition",tmct_ask:"the plain-English question entry point itself \u2014 calls ask.mjs directly and bypasses the capability planner; not one of the planner's operators",tmct_export:"reads the memory store's whole fact set with no discriminating param and no resolver goal frame; needs NL-reachability wiring before it can join",tmct_ingest:"writes into the memory store (grounds facts); capability() only models read-only operators, so a write path needs its own precondition/effect design first",tmct_file_history:"a module-grain cut of the same history edge tmct_history already models; no NL frame distinguishes the granularities yet",tmct_method_history:"a method-grain cut of the same history edge tmct_history already models; no NL frame distinguishes the granularities yet",tmct_class_history:"a class-grain cut of the same history edge tmct_history already models; no NL frame distinguishes the granularities yet"}),CD=Object.freeze({prefixes:uT,vocab:Ls,kinds:Ee,precond:ii,get capabilities(){return cw}})});var uw=O(()=>{lw()});var dw=O(()=>{fs()});function hT(e=process.env){return e?.TMCT_WORLDS_PACK_DIR||Q(mT,"corpus","worlds")}function pw(e){try{return Pa(ar(e))}catch{return null}}function fw(e){if(Zu.has(e))return Zu.get(e);let t=null,n=pw(Q(e,"index.json.gz"));if(n)try{let s=JSON.parse(n.toString("utf8"));s&&typeof s=="object"&&!Array.isArray(s)&&(t=s)}catch{}return Zu.set(e,t),t}function gT(e,t){let n=fw(e);if(!n)return null;let s=n[String(t??"")];if(!nw(s))return null;let o=`${e}\0${t}`;if(ed.has(o))return ed.get(o);let r=null,i=pw(Q(e,"shards",`${s.s}.jsonl.gz`));if(i){let a=[],l=[],c=null;for(let u of i.toString("utf8").split(`
165
+ `))if(u.trim())try{let d=JSON.parse(u);if(!sw(d)||d.world!==t)continue;Yu(d)?a.push(d):Xu(d)?l.push(d):Ju(d)&&!c&&(c=d)}catch{}(a.length||l.length||c)&&(r={name:t,facts:ow(a),rules:l,meta:c})}return ed.set(o,r),r}var wT,mT,Zu,ed,bT,qD,Ba=O(()=>{ao();Fa();Is();Ue();Os();wT={},mT=Q(ve(Ht(wT.url)),"..","..","..");Zu=new Map,ed=new Map;bT=e=>({list:async()=>{let t=fw(e());return t?Object.keys(t).sort():null},load:async t=>gT(e(),t)}),qD=bT(()=>hT())});var ez,mw=O(()=>{_t();Ue();us();xr();fs();Be();ez=Q(".tmct","memory","blocks")});var hw=O(()=>{uo()});var bw=O(()=>{us();xr();uo()});var td=O(()=>{us();xr();uo()});var ww=O(()=>{td();us();ms();uo()});var yw=O(()=>{});var $w=O(()=>{hw();bw();td();ww();yw();uo()});var vw=O(()=>{mw();Be();Zi();Uu();$w();Qu()});var xw=O(()=>{jn();Io()});function lr(e,t){let n=parseInt(e.slice(1),16);return`rgba(${n>>16&255}, ${n>>8&255}, ${n&255}, ${t})`}function Ga(e){let t=n=>xT.map((s,o)=>`--${n}-t${o+1}: ${lr(e[n],s)};`).join(" ");return[`--bg: ${e.bg}; --ink: ${e.ink}; --muted: ${e.muted}; --line: ${e.line}; --card: ${e.card};`,`--taught: ${e.taught}; --corpus: ${e.corpus}; --entail: ${e.entail}; --alert: ${e.alert};`,t("taught"),t("corpus"),t("entail"),`--taught-soft: ${lr(e.taught,.12)}; --corpus-soft: ${lr(e.corpus,.12)};`,`--entail-soft: ${lr(e.entail,.14)}; --alert-soft: ${lr(e.alert,.12)};`,`--sprite-pop: drop-shadow(0 0 .6px ${lr(e.ink,e.popRimAlpha)}) drop-shadow(${e.popShadow});`].join(" ")}var Wa,xT,Xz,nd=O(()=>{xw();Wa=Object.freeze({light:Object.freeze({bg:"#F7F6F2",ink:"#23272B",muted:"#6E7168",line:"#DDD9D0",card:"#FFFFFF",taught:"#2E7D4F",corpus:"#5A80AC",entail:"#B07C2E",alert:"#B0503F",popRimAlpha:.66,popShadow:"0 1px 1.2px rgba(0, 0, 0, .30)"}),dark:Object.freeze({bg:"#15181C",ink:"#E7E5DF",muted:"#9A9E95",line:"#2B3036",card:"#1C2126",taught:"#5FBE8B",corpus:"#6C93BF",entail:"#D9A554",alert:"#D08070",popRimAlpha:.45,popShadow:"0 1px 1.4px rgba(0, 0, 0, .55)"})}),xT=[.35,.65,1];Xz=`
166
+ :root { color-scheme: light dark; ${Ga(Wa.light)} }
167
+ @media (prefers-color-scheme: dark) { :root { ${Ga(Wa.dark)} } }
168
+ :root[data-theme="dark"] { ${Ga(Wa.dark)} }
169
+ :root[data-theme="light"] { ${Ga(Wa.light)} }
170
+ `});var Ew=O(()=>{nd()});var Sw=O(()=>{nd()});var kw=O(()=>{Be();Os();jn();qa()});var sd,TT,AT,IT,CT,OT,LT,F2,D2,qa=O(()=>{Os();iw();co();Oa();Qu();uw();dw();Ba();Be();vw();Ew();Sw();kw();sd="mgx:world-epoch",TT=new Set(["mgx:currently-in","mgx:located-in","mgx:fixed-in","mgx:stands-locked-in","mgx:hidden-in"]),AT=new Set(["mgx:on-top-of","mgx:on-plane","mgx:under"]),IT="mgx:is-open",CT="mgx:hasMass",OT="mgx:knows-about",LT="mgx:display-name",F2=new Set([...TT,...AT,IT,CT,OT,LT,"rdf:type",sd]),D2=new RegExp("^(?:what\\s+foods?\\s+(?:do\\s+you\\s+know(?:\\s+about)?|have\\s+you\\s+(?:found|seen|heard\\s+(?:about|of))|do\\s+you\\s+know\\s+of)|what\\s+do\\s+you\\s+know\\s+about\\s+(?:any\\s+)?foods?|do\\s+you\\s+know\\s+(?:about|of)\\s+(?:any\\s+)?foods?|where\\s+is\\s+(?:the\\s+)?food)[?.!\\s]*$","i")});var po,U2,B2,W2,G2,q2,V2,ss=O(()=>{po=Object.freeze({spiderFly:Object.freeze({spiderInitialMass:15,spiderMassDecrementPerTurn:.5,flyInitialMass:10,flyMassDecrementPerTurn:1,spiderVisionRadius:4,flyVisionRadius:4,eggHatchDelayTurns:3,flySpawnIntervalTurns:3,eggLayMassThreshold:25,eggHatchCount:2,minHatchlingMass:3,webDurationTurns:10}),mud:Object.freeze({moleInitialMass:8,moleMassDecrementPerTurn:.06,moleSpeed:1,moleDigReach:1,voleInitialMass:6,voleMassDecrementPerTurn:.05,voleSpeed:1,voleDigReach:1,badgerInitialMass:20,badgerMassDecrementPerTurn:.08,badgerSpeed:2,badgerDigReach:2,groundhogInitialMass:12,groundhogMassDecrementPerTurn:.06,groundhogSpeed:2,groundhogDigReach:2,meerkatInitialMass:9,meerkatMassDecrementPerTurn:.05,meerkatSpeed:1,meerkatDigReach:1}),mudiii:Object.freeze({predatorInitialMass:20,predatorMassDecrementPerTurn:.08,predatorVisionRadius:4,preyInitialMass:8,preyMassDecrementPerTurn:.06,preyVisionRadius:3,preySpawnIntervalTurns:5,foodSpawnIntervalTurns:3,spawnedFoodMass:1,placedFoodMass:2,maxPreyPopulation:6,maxFoodItems:8}),guessNumber:Object.freeze({defaultLo:1,defaultHi:100,maxBound:1e9}),adventure:Object.freeze({teach:!1}),planning:Object.freeze({maxDepth:300})}),U2=Object.freeze({spider_initial_mass:"spiderInitialMass",spider_mass_decrement_per_turn:"spiderMassDecrementPerTurn",fly_initial_mass:"flyInitialMass",fly_mass_decrement_per_turn:"flyMassDecrementPerTurn",spider_vision_radius:"spiderVisionRadius",fly_vision_radius:"flyVisionRadius",egg_hatch_delay_turns:"eggHatchDelayTurns",fly_spawn_interval_turns:"flySpawnIntervalTurns",egg_lay_mass_threshold:"eggLayMassThreshold",egg_hatch_count:"eggHatchCount",min_hatchling_mass:"minHatchlingMass",web_duration_turns:"webDurationTurns"}),B2=Object.freeze({mole_initial_mass:"moleInitialMass",mole_mass_decrement_per_turn:"moleMassDecrementPerTurn",mole_speed:"moleSpeed",mole_dig_reach:"moleDigReach",vole_initial_mass:"voleInitialMass",vole_mass_decrement_per_turn:"voleMassDecrementPerTurn",vole_speed:"voleSpeed",vole_dig_reach:"voleDigReach",badger_initial_mass:"badgerInitialMass",badger_mass_decrement_per_turn:"badgerMassDecrementPerTurn",badger_speed:"badgerSpeed",badger_dig_reach:"badgerDigReach",groundhog_initial_mass:"groundhogInitialMass",groundhog_mass_decrement_per_turn:"groundhogMassDecrementPerTurn",groundhog_speed:"groundhogSpeed",groundhog_dig_reach:"groundhogDigReach",meerkat_initial_mass:"meerkatInitialMass",meerkat_mass_decrement_per_turn:"meerkatMassDecrementPerTurn",meerkat_speed:"meerkatSpeed",meerkat_dig_reach:"meerkatDigReach"}),W2=Object.freeze({predator_initial_mass:"predatorInitialMass",predator_mass_decrement_per_turn:"predatorMassDecrementPerTurn",predator_vision_radius:"predatorVisionRadius",prey_initial_mass:"preyInitialMass",prey_mass_decrement_per_turn:"preyMassDecrementPerTurn",prey_vision_radius:"preyVisionRadius",prey_spawn_interval_turns:"preySpawnIntervalTurns",food_spawn_interval_turns:"foodSpawnIntervalTurns",spawned_food_mass:"spawnedFoodMass",placed_food_mass:"placedFoodMass",max_prey_population:"maxPreyPopulation",max_food_items:"maxFoodItems"}),G2=Object.freeze({teach:"teach"}),q2=Object.freeze({default_lo:"defaultLo",default_hi:"defaultHi",max_bound:"maxBound"}),V2=Object.freeze({max_depth:"maxDepth"})});var NT,_w,Y2,od=O(()=>{ss();NT=Object.freeze({x:2,y:2}),_w=Object.freeze({north:Object.freeze({dx:0,dy:-1}),south:Object.freeze({dx:0,dy:1}),east:Object.freeze({dx:1,dy:0}),west:Object.freeze({dx:-1,dy:0})}),Y2=Object.freeze([Object.freeze(["poodle","dog"]),Object.freeze(["sheepdog","dog"]),Object.freeze(["dog","animal"]),Object.freeze(["spider","arachnid"]),Object.freeze(["arachnid","animal"]),Object.freeze(["fly","insect"]),Object.freeze(["insect","animal"])])});var rd=O(()=>{});var id=O(()=>{});var Rw=O(()=>{od();rd();ms();Be();Os();id();qt();ss()});var kU,Tw=O(()=>{od();Rw();Os();Ba();Be();ss();kU=new RegExp("^@(spider|fly)(?:-(\\d+))?[,:]?\\s+the\\s+(spider|fly)(?:-(\\d+))?\\s+is\\s+(?:(north|south|east|west)|at\\s+(cell-\\d+-\\d+))[.!?\\s]*$","i")});var Aw,Lw,RU,TU,cd,Iw,Cw,Ow,ld,AU,IU,ud=O(()=>{ss();Aw=Object.freeze({predator:"fox",prey:"goblin",spawnedFood:"crumb",placedFood:"morsel"}),Lw=Object.freeze({north:Object.freeze({dx:0,dy:-1}),south:Object.freeze({dx:0,dy:1}),east:Object.freeze({dx:1,dy:0}),west:Object.freeze({dx:-1,dy:0})}),RU=Object.freeze(["blacksmith","bush","cart","fence","house","inn","oak","stall","well"]),TU=Object.freeze([Aw.spawnedFood,Aw.placedFood]),cd=e=>Object.freeze({...e,props:Object.freeze(e.props.map(t=>Object.freeze(t))),cast:Object.freeze(e.cast)}),Iw=cd({name:"town-square",gridSize:12,opening:"a fox prowls the town square; goblins pick over the stalls for scraps. Neither is yours to move. Watch, or address one by name in chat.",cast:{predators:1,prey:3},props:[{id:"house-1",model:"house-1",cell:"cell-8-1",rotation:"180"},{id:"house-2",model:"house-2",cell:"cell-8-2",rotation:"180"},{id:"house-3",model:"house-3",cell:"cell-8-3",rotation:"180"},{id:"well-1",model:"well",cell:"cell-6-7",rotation:"0"},{id:"stall-1",model:"market-stall-1",cell:"cell-3-9",rotation:"90"},{id:"inn-1",model:"inn",cell:"cell-11-10",rotation:"270"}]}),Cw=cd({name:"town-square-market",gridSize:10,opening:"market day in the town square: two rows of stalls, goblins working the lanes between them, and a fox somewhere among the crowd.",cast:{predators:1,prey:4},props:[{id:"stall-1",model:"market-stall-1",cell:"cell-2-4",rotation:"0"},{id:"stall-2",model:"market-stall-2",cell:"cell-3-4",rotation:"0"},{id:"stall-3",model:"market-stall-1",cell:"cell-4-4",rotation:"0"},{id:"stall-4",model:"market-stall-2",cell:"cell-6-4",rotation:"0"},{id:"stall-5",model:"market-stall-1",cell:"cell-7-4",rotation:"0"},{id:"stall-6",model:"market-stall-2",cell:"cell-8-4",rotation:"0"},{id:"stall-7",model:"market-stall-2",cell:"cell-2-7",rotation:"180"},{id:"stall-8",model:"market-stall-1",cell:"cell-3-7",rotation:"180"},{id:"stall-9",model:"market-stall-2",cell:"cell-4-7",rotation:"180"},{id:"stall-10",model:"market-stall-1",cell:"cell-6-7",rotation:"180"},{id:"stall-11",model:"market-stall-2",cell:"cell-7-7",rotation:"180"},{id:"stall-12",model:"market-stall-1",cell:"cell-8-7",rotation:"180"},{id:"well-1",model:"well",cell:"cell-5-5",rotation:"0"},{id:"blacksmith-1",model:"blacksmith",cell:"cell-10-5",rotation:"270"},{id:"cart-1",model:"cart",cell:"cell-1-1",rotation:"90"},{id:"cart-2",model:"cart",cell:"cell-10-10",rotation:"270"},{id:"bush-1",model:"bush",cell:"cell-10-1",rotation:"0"},{id:"bush-2",model:"bush",cell:"cell-1-10",rotation:"0"}]}),Ow=cd({name:"town-square-chapel",gridSize:14,opening:"the chapel corner of the town square, fenced to the south and shaded by three oaks. Two foxes hunt here, and two goblins know it.",cast:{predators:2,prey:2},props:[{id:"inn-1",model:"inn",cell:"cell-2-2",rotation:"180"},{id:"house-1",model:"house-1",cell:"cell-3-2",rotation:"180"},{id:"house-2",model:"house-2",cell:"cell-2-3",rotation:"90"},{id:"fence-1",model:"fence",cell:"cell-7-11",rotation:"0"},{id:"fence-2",model:"fence",cell:"cell-8-11",rotation:"0"},{id:"fence-3",model:"fence",cell:"cell-9-11",rotation:"0"},{id:"oak-1",model:"oak-tree",cell:"cell-12-4",rotation:"0"},{id:"oak-2",model:"oak-tree",cell:"cell-12-12",rotation:"90"},{id:"oak-3",model:"oak-tree",cell:"cell-5-8",rotation:"180"}]}),ld=Object.freeze({[Iw.name]:Iw,[Cw.name]:Cw,[Ow.name]:Ow}),AU=Object.freeze(Object.keys(ld)),IU=Object.freeze([Object.freeze(["fox","canine"]),Object.freeze(["canine","animal"]),Object.freeze(["goblin","humanoid"]),Object.freeze(["humanoid","creature"]),Object.freeze(["creature","animal"]),Object.freeze(["crumb","food"]),Object.freeze(["morsel","food"]),Object.freeze(["food","thing"]),Object.freeze(["prop","thing"])])});var ci,YT,XT,JT,QT,ZT,eA,tA,nA,sA,oA,rA,YU,Nw=O(()=>{ud();rd();ms();Be();Os();id();qt();ss();qa();ci=Object.freeze({predator:{role:"predator",kind:"fox",idPrefix:"fox"},prey:{role:"prey",kind:"goblin",idPrefix:"goblin"},food:{spawnedKind:"crumb",placedKind:"morsel"}}),YT="mgx:currently-in",XT="mgx:hasMass",JT="mgx:feels",QT="mgx:facing",ZT="mgx:eaten-by",eA="mgx:starved",tA="mgx:placed-by",nA="mgx:model",sA="mgx:rotation",oA="mgx:turn-played",rA=new Set([YT,XT,JT,QT,ZT,eA,tA,nA,sA,oA,"rdf:type",sd]),YU=Object.freeze([...rA].sort())});var fB,mB,hB,gB,bB,Mw=O(()=>{ud();Nw();Os();Ba();Be();ss();fB=ci.predator.kind,mB=ci.prey.kind,hB=ci.food.spawnedKind,gB=ci.food.placedKind,bB=new RegExp("^@(fox|goblin)(?:-(\\d+))?[,:]?\\s+the\\s+(fox|goblin|crumb|morsel)(?:-(\\d+))?\\s+is\\s+(?:(north|south|east|west)|at\\s+(cell-\\d+-\\d+))[.!?\\s]*$","i")});var ht,yB,$B,vB,xB,EB,SB,kB,jB,_B,RB,TB,AB,IB,CB,OB,LB,NB,MB,PB,Pw=O(()=>{ht=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},yB=ht("createRequire"),$B=ht("readFileSync"),vB=ht("access"),xB=ht("readFile"),EB=ht("writeFile"),SB=ht("appendFile"),kB=ht("mkdir"),jB=ht("mkdtemp"),_B=ht("rename"),RB=ht("unlink"),TB=ht("rm"),AB=ht("stat"),IB=ht("copyFile"),CB=ht("readdir"),OB=ht("createReadStream"),LB=ht("createWriteStream"),NB=ht("randomBytes"),MB=ht("spawnSync"),PB=ht("createInterface")});var gt,DB,zB,UB,BB,WB,GB,qB,VB,HB,KB,YB,XB,JB,QB,ZB,eW,tW,nW,iA,Fw=O(()=>{gt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},DB=gt("createRequire"),zB=gt("readFileSync"),UB=gt("access"),BB=gt("readFile"),WB=gt("writeFile"),GB=gt("appendFile"),qB=gt("mkdir"),VB=gt("mkdtemp"),HB=gt("rename"),KB=gt("unlink"),YB=gt("rm"),XB=gt("stat"),JB=gt("copyFile"),QB=gt("readdir"),ZB=gt("createReadStream"),eW=gt("createWriteStream"),tW=gt("randomBytes"),nW=gt("spawnSync"),iA=gt("createInterface")});var bt,oW,rW,iW,aW,cW,lW,uW,dW,pW,fW,mW,hW,gW,bW,wW,yW,$W,Dw,vW,dd=O(()=>{bt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},oW=bt("createRequire"),rW=bt("readFileSync"),iW=bt("access"),aW=bt("readFile"),cW=bt("writeFile"),lW=bt("appendFile"),uW=bt("mkdir"),dW=bt("mkdtemp"),pW=bt("rename"),fW=bt("unlink"),mW=bt("rm"),hW=bt("stat"),gW=bt("copyFile"),bW=bt("readdir"),wW=bt("createReadStream"),yW=bt("createWriteStream"),$W=bt("randomBytes"),Dw=bt("spawnSync"),vW=bt("createInterface")});var zw=O(()=>{dd();Ue();_t();Ue();wa();zt()});var Uw=O(()=>{});var aA,Bw=O(()=>{_t();Ue();Be();Uw();aA=Q(".tmct","sessions")});var Gw=O(()=>{_t();Ue();La()});var wt,BW,WW,GW,qW,VW,HW,KW,YW,XW,JW,QW,ZW,eG,tG,nG,sG,oG,rG,cA,qw=O(()=>{wt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},BW=wt("createRequire"),WW=wt("readFileSync"),GW=wt("access"),qW=wt("readFile"),VW=wt("writeFile"),HW=wt("appendFile"),KW=wt("mkdir"),YW=wt("mkdtemp"),XW=wt("rename"),JW=wt("unlink"),QW=wt("rm"),ZW=wt("stat"),eG=wt("copyFile"),tG=wt("readdir"),nG=wt("createReadStream"),sG=wt("createWriteStream"),oG=wt("randomBytes"),rG=wt("spawnSync"),cA=wt("createInterface")});var uA,ur,Vw,lA,Hw,mG,os,hG,Va,gG,Kw=O(()=>{ao();_t();qw();Is();Ue();ha();Be();uA={},ur=Q(ve(Ht(uA.url)),"..","..",".."),Vw=Q(ur,"corpus","conceptnet","slice.jsonl"),lA=Q(ur,"src","adapters","corpus","conceptnet-map.toml"),Hw=Q(ur,"corpus","seon","concepts.jsonl"),mG=Q(ur,"corpus","seon","definitions.jsonl"),os=Q(ur,"corpus","tier2"),hG=Q(os,"manifest.json"),Va=Q(ur,"corpus","wordnet"),gG=Q(Va,"manifest.json")});function fA(){return{seon:{kind:"corpus",active:!1,corpusPath:Hw,provenancePrefix:"corpus:seon"},conceptnet:{kind:"corpus",active:!1,corpusPath:Vw,provenancePrefix:"corpus:conceptnet",limit:void 0,prefer:pA},human:{kind:"corpus",active:!0,corpusPath:Q(os,"human.jsonl"),provenancePrefix:"corpus:human"},"human-medium":{kind:"corpus",active:!1,corpusPath:Q(os,"human-medium.jsonl"),provenancePrefix:"corpus:human-medium"},"human-large":{kind:"corpus",active:!1,corpusPath:Q(os,"human-large.jsonl"),provenancePrefix:"corpus:human-large"},"tier2-aws":{kind:"corpus",active:!1,corpusPath:Q(os,"aws.jsonl"),provenancePrefix:"corpus:tier2-aws"},"tier2-python":{kind:"corpus",active:!1,corpusPath:Q(os,"python.jsonl"),provenancePrefix:"corpus:tier2-python"},"tier2-java":{kind:"corpus",active:!1,corpusPath:Q(os,"java.jsonl"),provenancePrefix:"corpus:tier2-java"},"tier2-general":{kind:"corpus",active:!1,corpusPath:Q(os,"general.jsonl"),provenancePrefix:"corpus:tier2-general"},"wordnet-xl":{kind:"corpus",active:!1,corpusPath:Q(Va,"wordnet-xl.jsonl"),provenancePrefix:"corpus:wordnet-xl"},"wordnet-full":{kind:"corpus",active:!1,corpusPath:Q(Va,"wordnet-full.jsonl"),provenancePrefix:"corpus:wordnet-full"},namenet:{kind:"corpus",active:!1,corpusPath:Q(dA,"namenet.jsonl"),provenancePrefix:"corpus:namenet"}}}var mA,dA,_G,pA,RG,Yw=O(()=>{Ue();_t();Is();wa();Kw();mA={},dA=Q(ve(Ht(mA.url)),"..","..","corpus","namenet"),_G=Object.freeze(["corpus","lexicon","templates","pack","ontology"]),pA=["rdfs:subClassOf","rdf:type","mgx:usedFor","mgx:partOf","mgx:capableOf"];RG=Object.freeze(fA())});var Xw=O(()=>{});var Jw=O(()=>{Ue();ao();_t();Pw();Fw();dd();zt();zw();Oe();Bw();La();Gw();vr();Yw();Ha();ss();Oa();qu();Xw()});var Qw={};Fn(Qw,{proseLemma:()=>gA});function gA(){if(fo!==void 0)return fo;try{let e=Bu();if(!e)return fo=null,fo;let t=e.its,n=new Map;fo=s=>{let o=String(s||"");if(n.has(o))return n.get(o);let r;try{r=String(e.readDoc(o).tokens().out(t.lemma)[0]||o).toLowerCase()}catch{r=o.toLowerCase()}return n.set(o,r),r}}catch{fo=null}return fo}var fo,Zw=O(()=>{Wu()});var ey={};Fn(ey,{digestTermFromRows:()=>yA,loadDigestStructureTable:()=>wA,readDigestStructures:()=>bA});var bA,wA,yA,ty=O(()=>{bA=()=>null,wA=()=>null,yA=()=>null});function Sd(e){if(!e)return null;let{node:t,shape:n,kind:s}=e;if(t==="find")return`locate a specific named entity ("${e.term}")`;if(t==="count")return`get a count of ${Ka(e.entityType)}`;if(t==="list")return`list/enumerate ${Ka(e.entityType)} matching a condition`;if(t==="superlative")return`rank/compare ${Ka(e.entityType)} by ${e.metricNoun||e.metric||"a metric"}`;if(t==="anaphora")return"follow up on the previous answer's result set (discourse anaphora)";if(t==="membership")return`understand "${e.term||"an entity"}"'s membership/relationship`;if(t==="clause")return Sd(e.clause);if(t==="miss")return null;if(t==="boolean"||t==="qualifier"||t==="reverseSet"||t==="forwardSet"||t==="allOfClass"||t==="temporal"){let o=s||e.inner?.kind;return o&&fn[o]?fn[o]:`filter/traverse ${Ka(e.entityType)} by a relationship`}return n==="meta"?`understand a vocabulary/definition term ("${e.object}")`:n==="where"?`locate where something is defined ("${e.object}")`:n==="when"?"understand when something last changed (history)":n==="whoLast"?"find who most recently touched something (history)":n==="mentions"?`find where something is mentioned in prose ("${e.object}")`:n==="ask"?s&&fn[s]||"check a specific subject/object relationship":(n==="reverse"||n==="forward")&&s?fn[s]||`understand a "${s}" relationship`:"understand a graph relationship"}function Id(e){let t=new Map;for(let n of e)t.has(oy(n))||t.set(oy(n),n);return t}function md(e,t=ui){let n=[],s=[];for(let o of e)o.predicate===t&&(s.push([o.subject,o.object]),mo(o)&&n.push([o.subject,o.object]));return{strictEdges:n,broadEdges:s}}function hd(e,t,n,s,o){return e(t,n,[],s.strictEdges,o)||e(t,n,[],s.broadEdges,o)}function kA(e,t){return!/ves$/i.test(e)||!/fe?$/i.test(t)?t:e.slice(0,-1)}async function jA(e){let t=String(e||"").toLowerCase();try{let{proseLemma:n}=await Promise.resolve().then(()=>(Zw(),Qw)),s=n();return s?kA(t,s(t)):t}catch{return t}}function Od(e){let t=String(e||"").trim();if(/[a-z]ies$/i.test(t))return`${t.slice(0,-3)}y`;if(/[a-z]ses$/i.test(t)){let n=t.slice(0,-2);return/ss$/i.test(n)||_A.has(n.toLowerCase())?n:t.slice(0,-1)}return/(xes|zes|ches|shes)$/i.test(t)?t.slice(0,-2):/[a-z]s$/i.test(t)&&!/(?:ss|ous)$/i.test(t)?t.slice(0,-1):t}async function wd(e){let t=String(e||"").toLowerCase();if(t==="has"||t==="have")return ir;if(t==="can")return"mgx:capableOf";try{let n=await jA(t);return n==="have"?ir:Zn(`mgx:${n}`)}catch{return Zn(`mgx:${t}`)}}function OA(e,t){let n=String(t||"").match(CA);return n&&/^mgx:[a-z]+$/.test(e)?{predicate:`${e}-${n[1].toLowerCase()}`,object:n[2].trim()}:{predicate:e,object:String(t||"").trim()}}async function li(e,t){if(!e||!t)return null;try{let{resolveObject:n}=await Promise.resolve().then(()=>($s(),zm)),s=n(e,t);if(s?.match?.id&&!s.ambiguous)return{id:s.match.id,label:s.match.label}}catch{}return null}function PA(e){let t=String(e||"");return/^have$/i.test(t)?"has":/[a-z]y$/i.test(t)&&!/[aeiou]y$/i.test(t)?`${t.slice(0,-1)}ies`:/(?:s|x|z|ch|sh|o)$/i.test(t)?`${t}es`:`${t}s`}function Ty(e){let t=String(e||"");return/^has$/i.test(t)?"have":/[a-z]ies$/i.test(t)&&!/[aeiou]ies$/i.test(t)?`${t.slice(0,-3)}y`:/(?:s|x|z|ch|sh|o)es$/i.test(t)?t.slice(0,-2):t.replace(/s$/i,"")}function Ay(e){if(ho[e])return ho[e];let t=String(e||""),n=lh(t);if(n){let a=Ay(n);if(a==="can")return"cannot";if(a==="can be")return"cannot be";if(a==="is"||a.startsWith("is "))return`is not${a.slice(2)}`;let[l,...c]=a.split(" ");return["does not",Ty(l),...c].join(" ")}let s=/^mgx:([a-z]+(?:-[a-z]+)*)-than$/i.exec(t);if(s)return`is ${s[1].replace(/-/g," ")} than`;let o=new RegExp(`^mgx:(${Ld})-([a-z]+)$`,"i").exec(t);if(o)return`is ${o[1].toLowerCase()} ${o[2].toLowerCase()}`;let r=/^mgx:same-([a-z]+)-as$/i.exec(t);if(r)return`has the same ${r[1].toLowerCase()} as`;let i=/^mgx:([a-z]+)(?:-([a-z]+))?$/i.exec(t);return i?`${PA(i[1])}${i[2]?` ${i[2]}`:""}`:e}function $d(e){let t=/^mgx:([a-z][\w-]*)$/i.exec(String(e||""));return t?t[1].toLowerCase():null}function DA(e){let t=String(e||"").trim(),n=t.toLowerCase();for(let{marker:s,predicate:o}of FA)if(n!==s&&n.endsWith(` ${s}`)){let r=t.slice(0,t.length-s.length).trim();if(r)return{subject:r,predicate:o}}return{subject:t,predicate:null}}function Mn(e){return e.replace(/#node:[0-9a-f]+/g,"")}function re(e){let t=e.provenance?` (source: ${Mn(e.provenance)})`:"";return e.provenance.includes("ace:chat")||e.provenance.includes("teach:chat")?`you told me: ${Pt(e)}${t}`:e.provenance.includes("corpus-weak:")?`possibly: ${Pt(e)}${t}`:e.provenance.includes("corpus:")?`${Pt(e)}${t}`:e.provenance.includes("reference:")?`${Pt(e)}${t}`:`i learned: ${Pt(e)}${t}`}function ay(e,t,n){let s=re(e);if(!is.has(e.predicate)||!n.has(e.subject))return s;let o=Da(e.object,t,{cap:6});if(o.length<=1)return s;let r=` \u2192 ${o.slice(1).join(" \u2192 ")}`,i=s.match(zA);return i?s.slice(0,i.index)+r+i[0]:s+r}function cy(e,t,n,{indent:s=""}={}){let o=t.filter(_=>_.predicate===ui).map(_=>[_.subject,_.object]),r=oi(o),i=e.map(_=>`${s}${ay(_,r,n)}`),a=e.filter(_=>is.has(_.predicate)&&n.has(_.subject)),l=[...new Set(a.map(_=>_.object))];if(l.length<2)return{lines:i,grouped:null};let c=t.filter(_=>_.predicate==="owl:disjointWith").map(_=>[_.subject,_.object]),{split:u,clusters:d}=za(l,{parents:r,disjointEdges:c});if(!u)return{lines:i,grouped:null};let f=a[0].subject,p=new Map;for(let _ of d)for(let $ of _.objects)p.set($,_);let m=e.filter(_=>!(is.has(_.predicate)&&n.has(_.subject))),h=[],g=[],b=0,y=_=>{let $=ay(_,r,n);return b<je?(b+=1,`${s}${$}`):(g.push($),null)};for(let _ of d){let $=a.filter(x=>p.get(x.object)===_).map(y).filter(Boolean);$.length&&h.push(`${s}${f}, the ${_.label}:
171
+ ${$.join(`
172
172
  `)}`)}if(m.length){let _=m.map(y).filter(Boolean);_.length&&h.push(`${s}also about ${f}:
173
173
  ${_.join(`
174
174
  `)}`)}let w=g.length?`
175
- ${s}\u2026and ${g.length} more \u2014 say 'more' to see them.`:"",$={text:h.join(`
176
- `)+w,replace:!0,...g.length?{pending:{items:g,noun:"facts"}}:{}};return{lines:i,grouped:$}}async function dA(e,t,n,s){let o;try{({digestTermFromRows:o}=await Promise.resolve().then(()=>(Bw(),zw)))}catch{return null}let r;try{r=o(e,t,n)}catch{return null}if(!r||!r.paragraphs.length)return null;let i=[...new Set((r.sources||[]).map(u=>u.provenance).filter(Boolean))],a=i.length?`(sources: ${i.join("; ")})
175
+ ${s}\u2026and ${g.length} more \u2014 say 'more' to see them.`:"",v={text:h.join(`
176
+ `)+w,replace:!0,...g.length?{pending:{items:g,noun:"facts"}}:{}};return{lines:i,grouped:v}}async function BA(e,t,n,s){let o;try{({digestTermFromRows:o}=await Promise.resolve().then(()=>(ty(),ey)))}catch{return null}let r;try{r=o(e,t,n)}catch{return null}if(!r||!r.paragraphs.length)return null;let i=[...new Set((r.sources||[]).map(u=>u.provenance).filter(Boolean))],a=i.length?`(sources: ${i.join("; ")})
177
177
  `:"",l=`Say 'show the facts' for all ${s.length} stored facts.`;return{text:`${r.paragraphs.join(`
178
178
 
179
179
  `)}
180
180
 
181
- ${a}${l}`,pending:{items:s,noun:"facts"}}}function ur(e){let t=Pu().find(n=>n.kind==="article");return t&&Nb(String(e||""),t)?"an":"a"}function by(e,t){return e&&t?{text:`you've told me both, and I won't pick between them \u2014 ${re(e)}; ${re(t)}. To settle it, say "forget that ${e.subject} is ${ur(e.object)} ${e.object}".`,replace:!0}:t?{text:`no \u2014 ${re(t)}`,replace:!0}:e?{text:`yes \u2014 ${re(e)}`,replace:!0}:null}function pA(e,t){let n=s=>`${Pt(s)}${s.provenance?` (source: ${Pn(s.provenance)})`:""}`;return{text:`you've told me both ${n(e)} and ${n(t)} \u2014 together those contradict, and I won't derive an answer from an inconsistency. To settle it, say "forget that ${e.subject} is ${ur(e.object)} ${e.object}".`,replace:!0}}function Ua(e){let t=o=>`${Pt(o)}${o.provenance?` (source: ${Pn(o.provenance)})`:""}`,n=e[0],s=e[e.length-1];return`${e.map(t).join("; ")}; so ${n.subject} is a ${s.object}`}async function fd(e){try{let{loadMemory:t}=await Promise.resolve().then(()=>(Ke(),_s)),n=await t(e),s=[];for(let o of n.individuals||[]){if(o?.class!=="Fact")continue;let r=i=>(o.attributes||[]).find(a=>a.key===i)?.value||"";s.push({subject:r("subject"),predicate:r("predicate"),object:r("object"),provenance:r("provenance")})}return s}catch{return[]}}async function it(e,t=null){if(t?.rows)return t.rows;try{let{loadMemory:n,readFactRows:s}=await Promise.resolve().then(()=>(Ke(),_s)),o=s(await n(e));return t&&(t.rows=o,t.reloads=(t.reloads||0)+1),o}catch{return[]}}function fA(e){if(!Wa)try{Wa=Ts().nounPlurals}catch{Wa=new Map}return Wa.get(e)??null}function Ha(e){let t=String(e||"").trim().toLowerCase();if(!t||/\s/.test(t))return t;try{return ti(Ts(),t)?.lemma||t}catch{return t}}function mA(e){let t=String(e||"").trim().match(/^(?:all|every|each|both|most|some)\s+([\w-]+)$/i);if(!t)return Ha(e);let n=Ha(kd(t[1]));return`${ur(n)} ${n}`}function Y(e,t){let n=e(t),s=new Set,o=new Set([n]),r=n.replace(hA,"").trim();r&&r!==n&&o.add(r);for(let i of o){s.add(i),i.endsWith("es")&&s.add(i.slice(0,-2)),i.endsWith("s")&&s.add(i.slice(0,-1));let a=fA(i);a&&s.add(e(a))}return s}function Yw(e,t,n){for(let s of e)for(let o of t){let r=n(s,o);if(r)return r}return null}function vy(e,t=null){let n=Va(e),s=n.match(gA);if(s)return[s[0],s[2],s[1]];if(!t)return null;let o=n.match(wA);return o&&t(o[1])?[o[0],o[2],o[1]]:null}function wd(e){let t=String(e||"").replace($A,"");if(t!==e){let s=t.match(Cs);if(s)return s}let n=String(e||"").match(xA);return n?`is ${n[1].trim()} a ${n[2].trim()}`.match(Cs):null}function vd(e){return String(e||"").replace(/^(?:can't|cannot|can not|cant)\s+/i,"can ").replace(/^(?:doesn't|does not)\s+/i,"does ").replace(/^(?:don't|do not)\s+/i,"do ").replace(/^(?:didn't|did not)\s+/i,"did ").replace(/\s+(?:not|never)\s+/i," ").replace(/\s+/g," ").trim()}function Jw(e){let t=String(e.text||"").replace(/^(?:yes|no) — /i,"");return t===e.text?e:{...e,text:t}}function MA(e,t){let n=(e||[]).map(s=>t.find(o=>o.predicate===s.predicate&&o.subject===s.subject&&o.object===s.object));return!n.length||!n.every(Boolean)?null:n.map(s=>`${Pt(s)}${s.provenance?` (source: ${Pn(s.provenance)})`:""}`).join("; ")}function Zw(e,t,n,{maxHops:s=3}={}){let o=Y(X,e),r=Y(X,t),i=Zi(o,r,n,{maxHops:s}),a=l=>{let c=l&&l.length?MA(l,n):null;return c?` \u2014 via: ${c}`:""};if(i.verdict==="both")return{text:`I have both, at the same level of detail \u2014 my sources disagree, so I won't pick:
181
+ ${a}${l}`,pending:{items:s,noun:"facts"}}}function dr(e){let t=zu().find(n=>n.kind==="article");return t&&Wb(String(e||""),t)?"an":"a"}function Iy(e,t){return e&&t?{text:`you've told me both, and I won't pick between them \u2014 ${re(e)}; ${re(t)}. To settle it, say "forget that ${e.subject} is ${dr(e.object)} ${e.object}".`,replace:!0}:t?{text:`no \u2014 ${re(t)}`,replace:!0}:e?{text:`yes \u2014 ${re(e)}`,replace:!0}:null}function WA(e,t){let n=s=>`${Pt(s)}${s.provenance?` (source: ${Mn(s.provenance)})`:""}`;return{text:`you've told me both ${n(e)} and ${n(t)} \u2014 together those contradict, and I won't derive an answer from an inconsistency. To settle it, say "forget that ${e.subject} is ${dr(e.object)} ${e.object}".`,replace:!0}}function Ya(e){let t=o=>`${Pt(o)}${o.provenance?` (source: ${Mn(o.provenance)})`:""}`,n=e[0],s=e[e.length-1];return`${e.map(t).join("; ")}; so ${n.subject} is a ${s.object}`}async function vd(e){try{let{loadMemory:t}=await Promise.resolve().then(()=>(Be(),As)),n=await t(e),s=[];for(let o of n.individuals||[]){if(o?.class!=="Fact")continue;let r=i=>(o.attributes||[]).find(a=>a.key===i)?.value||"";s.push({subject:r("subject"),predicate:r("predicate"),object:r("object"),provenance:r("provenance")})}return s}catch{return[]}}async function it(e,t=null){if(t?.rows)return t.rows;try{let{loadMemory:n,readFactRows:s}=await Promise.resolve().then(()=>(Be(),As)),o=s(await n(e));return t&&(t.rows=o,t.reloads=(t.reloads||0)+1),o}catch{return[]}}function GA(e){if(!Xa)try{Xa=Cs().nounPlurals}catch{Xa=new Map}return Xa.get(e)??null}function Qa(e){let t=String(e||"").trim().toLowerCase();if(!t||/\s/.test(t))return t;try{return si(Cs(),t)?.lemma||t}catch{return t}}function qA(e){let t=String(e||"").trim().match(/^(?:all|every|each|both|most|some)\s+([\w-]+)$/i);if(!t)return Qa(e);let n=Qa(Od(t[1]));return`${dr(n)} ${n}`}function Y(e,t){let n=e(t),s=new Set,o=new Set([n]),r=n.replace(VA,"").trim();r&&r!==n&&o.add(r);for(let i of o){s.add(i),i.endsWith("es")&&s.add(i.slice(0,-2)),i.endsWith("s")&&s.add(i.slice(0,-1));let a=GA(i);a&&s.add(e(a))}return s}function ly(e,t,n){for(let s of e)for(let o of t){let r=n(s,o);if(r)return r}return null}function Ly(e,t=null){let n=Za(e),s=n.match(HA);if(s)return[s[0],s[2],s[1]];if(!t)return null;let o=n.match(YA);return o&&t(o[1])?[o[0],o[2],o[1]]:null}function jd(e){let t=String(e||"").replace(QA,"");if(t!==e){let s=t.match(Ns);if(s)return s}let n=String(e||"").match(ZA);return n?`is ${n[1].trim()} a ${n[2].trim()}`.match(Ns):null}function Rd(e){return String(e||"").replace(/^(?:can't|cannot|can not|cant)\s+/i,"can ").replace(/^(?:doesn't|does not)\s+/i,"does ").replace(/^(?:don't|do not)\s+/i,"do ").replace(/^(?:didn't|did not)\s+/i,"did ").replace(/\s+(?:not|never)\s+/i," ").replace(/\s+/g," ").trim()}function dy(e){let t=String(e.text||"").replace(/^(?:yes|no) — /i,"");return t===e.text?e:{...e,text:t}}function mI(e,t){let n=(e||[]).map(s=>t.find(o=>o.predicate===s.predicate&&o.subject===s.subject&&o.object===s.object));return!n.length||!n.every(Boolean)?null:n.map(s=>`${Pt(s)}${s.provenance?` (source: ${Mn(s.provenance)})`:""}`).join("; ")}function fy(e,t,n,{maxHops:s=3}={}){let o=Y(X,e),r=Y(X,t),i=oa(o,r,n,{maxHops:s}),a=l=>{let c=l&&l.length?mI(l,n):null;return c?` \u2014 via: ${c}`:""};if(i.verdict==="both")return{text:`I have both, at the same level of detail \u2014 my sources disagree, so I won't pick:
182
182
  ${[...i.negative,...i.positive].map(re).join(`
183
- `)}`,replace:!0,miss:!0};if(i.verdict==="yes"||i.verdict==="no"){let l=i.verdict==="no"?i.negative[0]:i.positive[0],c=`${i.verdict} \u2014 ${re(l)}${a(i.chain)}`;return i.overrides&&(c+=`. That overrides what I know about ${i.overrides.fact.subject} generally: ${re(i.overrides.fact)}`),{text:c,replace:!0}}return null}function ey(e,t,n,{maxHops:s=3}={}){let o=Y(X,e),r=Y(X,t),i=_l(o,r,n,{maxHops:s});if(!i)return null;let a=`${e} is a kind of ${i.klass}`,l=`I don't know if ${e} can ${t}.`;if(i.positive.length||i.negative.length){let u=[`${i.positive.length} can ${t}`,`${i.negative.length} cannot`,`${i.unknown.length} I have nothing on`].join(", "),d=[...i.positive,...i.negative].slice(0,jl).map(f=>re(f.fact));return{text:`${l} ${a}, and of the ${i.kinds} kind${i.kinds===1?"":"s"} of ${i.klass} I know, ${u}.
183
+ `)}`,replace:!0,miss:!0};if(i.verdict==="yes"||i.verdict==="no"){let l=i.verdict==="no"?i.negative[0]:i.positive[0],c=`${i.verdict} \u2014 ${re(l)}${a(i.chain)}`;return i.overrides&&(c+=`. That overrides what I know about ${i.overrides.fact.subject} generally: ${re(i.overrides.fact)}`),{text:c,replace:!0}}return null}function my(e,t,n,{maxHops:s=3}={}){let o=Y(X,e),r=Y(X,t),i=Cl(o,r,n,{maxHops:s});if(!i)return null;let a=`${e} is a kind of ${i.klass}`,l=`I don't know if ${e} can ${t}.`;if(i.positive.length||i.negative.length){let u=[`${i.positive.length} can ${t}`,`${i.negative.length} cannot`,`${i.unknown.length} I have nothing on`].join(", "),d=[...i.positive,...i.negative].slice(0,Il).map(f=>re(f.fact));return{text:`${l} ${a}, and of the ${i.kinds} kind${i.kinds===1?"":"s"} of ${i.klass} I know, ${u}.
184
184
  ${d.join(`
185
- `)}`,replace:!0,miss:!0}}let c=Rl(r,n,{exclude:new Set([...o,i.klass])});if(c.length){let u=c.slice(0,jl),d=c.slice(u.length);return{text:`${l} ${a}, and nothing I know about ${i.klass} says whether one can ${t}. I do know ${c.length} thing${c.length===1?"":"s"} that can ${t}${d.length?` (first ${u.length} shown)`:""}:
185
+ `)}`,replace:!0,miss:!0}}let c=Ol(r,n,{exclude:new Set([...o,i.klass])});if(c.length){let u=c.slice(0,Il),d=c.slice(u.length);return{text:`${l} ${a}, and nothing I know about ${i.klass} says whether one can ${t}. I do know ${c.length} thing${c.length===1?"":"s"} that can ${t}${d.length?` (first ${u.length} shown)`:""}:
186
186
  ${u.map(re).join(`
187
- `)}`,replace:!0,miss:!0,...d.length?{pending:{items:d.map(re),noun:"facts"}}:{}}}return{text:`${l} ${a}, but nothing I remember says whether any kind of ${i.klass} can ${t}.`,replace:!0,miss:!0}}function zA(e){let t=String(e||"").toLowerCase().trim().replace(/\s+/g," ");if(t==="best")return"better";if(t==="worst")return"worse";let n=t.match(/^(most|least)\s+([a-z][\w-]*)$/);return n?`${n[1]==="most"?"more":"less"} ${n[2]}`:/[a-z]est$/.test(t)&&t.length>4?`${t.slice(0,-3)}er`:null}function pn(e){let t=new Set,n=[];for(let s of e){let o=`${s.subject}|${s.predicate}|${s.object}`;t.has(o)||(t.add(o),n.push(s))}return n}async function xy(e,t,n,s,o={},r=null,i=null){return Ey(await VA(e,t,n,s,o,r,i),n,t)}function Ey(e,t,n){if(!e||e.goal!==void 0)return e;let s=String(n||"").trim(),o=gd(t?.parsed);if(!o&&e.generalVerbQuery&&(o=Uw),!o){let r=s.match(bd),i=r?null:Va(s).match(yy)||vy(s),a=r?r[2]:i?i[1]:null;a&&!yd.has(a.toLowerCase())&&(o=Uw)}if(!o){let r=s.match(ky);r&&(o=gd({shape:"meta",object:r[1]}))}return o?{...e,goal:o}:e}async function VA(e,t,n,s,o={},r=null,i=null){let a,l;try{({normFactTerm:a,normFactPredicate:l}=await Promise.resolve().then(()=>(Ke(),_s)))}catch{return null}let c=String(t).trim(),u=c.match(RA);if(u){let D=Y(a,u[1]),z=(await it(e,r)).filter(W=>W.predicate==="mgx:usedFor"&&D.has(W.object));if(z.length){let C=Qe(pn(z),o).map(re),L=C.slice(0,je),O=C.slice(je),N=O.length?`
188
- \u2026and ${O.length} more \u2014 say 'more' to see them.`:"";return{text:L.join(`
189
- `)+N,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}}for(let{predicate:D,re:z}of UA){let W=c.match(z);if(!W)continue;let C=Y(a,W[1]),L=(await it(e,r)).filter(ae=>ae.predicate===D&&C.has(ae.object));if(!L.length)continue;let N=Qe(pn(L),o).map(re),F=N.slice(0,je),G=N.slice(je),q=G.length?`
187
+ `)}`,replace:!0,miss:!0,...d.length?{pending:{items:d.map(re),noun:"facts"}}:{}}}return{text:`${l} ${a}, but nothing I remember says whether any kind of ${i.klass} can ${t}.`,replace:!0,miss:!0}}function bI(e){let t=String(e||"").toLowerCase().trim().replace(/\s+/g," ");if(t==="best")return"better";if(t==="worst")return"worse";let n=t.match(/^(most|least)\s+([a-z][\w-]*)$/);return n?`${n[1]==="most"?"more":"less"} ${n[2]}`:/[a-z]est$/.test(t)&&t.length>4?`${t.slice(0,-3)}er`:null}function pn(e){let t=new Set,n=[];for(let s of e){let o=`${s.subject}|${s.predicate}|${s.object}`;t.has(o)||(t.add(o),n.push(s))}return n}async function My(e,t,n,s,o={},r=null,i=null){return Py(await EI(e,t,n,s,o,r,i),n,t)}function Py(e,t,n){if(!e||e.goal!==void 0)return e;let s=String(n||"").trim(),o=Sd(t?.parsed);if(!o&&e.generalVerbQuery&&(o=ny),!o){let r=s.match(kd),i=r?null:Za(s).match(Oy)||Ly(s),a=r?r[2]:i?i[1]:null;a&&!_d.has(a.toLowerCase())&&(o=ny)}if(!o){let r=s.match(Dy);r&&(o=Sd({shape:"meta",object:r[1]}))}return o?{...e,goal:o}:e}async function EI(e,t,n,s,o={},r=null,i=null){let a,l;try{({normFactTerm:a,normFactPredicate:l}=await Promise.resolve().then(()=>(Be(),As)))}catch{return null}let c=String(t).trim(),u=c.match(rI);if(u){let D=Y(a,u[1]),z=(await it(e,r)).filter(W=>W.predicate==="mgx:usedFor"&&D.has(W.object));if(z.length){let I=Qe(pn(z),o).map(re),L=I.slice(0,je),C=I.slice(je),N=C.length?`
188
+ \u2026and ${C.length} more \u2014 say 'more' to see them.`:"";return{text:L.join(`
189
+ `)+N,replace:!0,...C.length?{pending:{items:C,noun:"facts"}}:{}}}}for(let{predicate:D,re:z}of yI){let W=c.match(z);if(!W)continue;let I=Y(a,W[1]),L=(await it(e,r)).filter(ae=>ae.predicate===D&&I.has(ae.object));if(!L.length)continue;let N=Qe(pn(L),o).map(re),F=N.slice(0,je),G=N.slice(je),H=G.length?`
190
190
  \u2026and ${G.length} more \u2014 say 'more' to see them.`:"";return{text:F.join(`
191
- `)+q,replace:!0,...G.length?{pending:{items:G,noun:"facts"}}:{}}}let d=c.match(FA),f=d?null:c.match(DA),p=d?d[1]:f?.[2],m=d?d[2]:f?.[1],h=p&&m?zA(m):null;if(h){let D=`mgx:${h.replace(/\s+/g,"-")}-than`,z=await it(e,r),W=Y(a,p),C=[...W].sort((N,F)=>N.length-F.length)[0],L=N=>W.has(N)||N.startsWith(`${C}-`)||N.startsWith(`${C} `)||z.some(F=>rs.has(F.predicate)&&F.subject===N&&W.has(F.object)),O=pn(z.filter(N=>N.predicate===D&&lo(N))).filter(N=>N.subject!==N.object&&L(N.subject)&&L(N.object));if(O.length){let N=new Set,F=new Map;for(let K of O)N.add(K.subject),N.add(K.object),F.set(K.object,(F.get(K.object)||0)+1),F.has(K.subject)||F.set(K.subject,F.get(K.subject)||0);let G=new Map(F),q=[],ae=null;for(;G.size;){let K=[...G.keys()].filter(H=>G.get(H)===0);if(K.length!==1){ae=K.length===0?{text:`I can't order the ${C}s \u2014 the "${h} than" facts I have loop back on themselves, so no ${m} exists. /memory to inspect them.`,replace:!0,miss:!0}:{text:`I can't pick the ${m} ${C} from what I know \u2014 nothing compares ${K[0]} and ${K[1]}. Teach me, e.g. "${K[0]} is ${h} than ${K[1]}".`,replace:!0,miss:!0};break}let ee=K[0];q.push(ee),G.delete(ee);for(let H of O)H.subject===ee&&G.has(H.object)&&G.set(H.object,G.get(H.object)-1)}if(ae)return ae;let ce=q.slice(0,-1).map((K,ee)=>O.find(H=>H.subject===K&&H.object===q[ee+1]));if(ce.every(Boolean)){let K=ce.map(ee=>`${Pt(ee)}${ee.provenance?` (source: ${Pn(ee.provenance)})`:""}`).join("; ");return{text:`${q[0]} \u2014 ${K}; so ${q[0]} is the ${m} ${C}`,replace:!0}}}}let g=s?c.match(TA)||c.match(AA):null;if(g){let D=Y(a,g[1]),z=(await it(e,r)).filter(W=>ho(W.predicate)!==null&&D.has(W.subject));if(z.length){let C=Qe(pn(z),o).map(re),L=C.slice(0,je),O=C.slice(je),N=O.length?`
192
- \u2026and ${O.length} more \u2014 say 'more' to see them.`:"";return{text:L.join(`
193
- `)+N,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}}let b=c.match(CA);if(b){let D=b[1].toLowerCase(),z=Y(a,b[2].replace(/^(?:an?|the)\s+/i,"").trim()),W=(await it(e,r)).filter(C=>ho(C.predicate)===D&&z.has(C.object));if(W.length){let L=Qe(pn(W),o).map(re),O=L.slice(0,je),N=L.slice(je),F=N.length?`
194
- \u2026and ${N.length} more \u2014 say 'more' to see them.`:"";return{text:O.join(`
195
- `)+F,replace:!0,...N.length?{pending:{items:N,noun:"facts"}}:{}}}}let y=c.match(OA);if(y){let D=y[3].toLowerCase(),z=Y(a,y[2]),W=new Set([...Y(a,y[1])].map(L=>l(`mgx:${D}-${L.replace(/\s+/g,"-")}`))),C=(await it(e,r)).filter(L=>W.has(l(L.predicate))&&z.has(a(L.subject)));if(C.length){let O=Qe(pn(C),o).map(re),N=O.slice(0,je),F=O.slice(je),G=F.length?`
191
+ `)+H,replace:!0,...G.length?{pending:{items:G,noun:"facts"}}:{}}}let d=c.match(hI),f=d?null:c.match(gI),p=d?d[1]:f?.[2],m=d?d[2]:f?.[1],h=p&&m?bI(m):null;if(h){let D=`mgx:${h.replace(/\s+/g,"-")}-than`,z=await it(e,r),W=Y(a,p),I=[...W].sort((N,F)=>N.length-F.length)[0],L=N=>W.has(N)||N.startsWith(`${I}-`)||N.startsWith(`${I} `)||z.some(F=>is.has(F.predicate)&&F.subject===N&&W.has(F.object)),C=pn(z.filter(N=>N.predicate===D&&mo(N))).filter(N=>N.subject!==N.object&&L(N.subject)&&L(N.object));if(C.length){let N=new Set,F=new Map;for(let K of C)N.add(K.subject),N.add(K.object),F.set(K.object,(F.get(K.object)||0)+1),F.has(K.subject)||F.set(K.subject,F.get(K.subject)||0);let G=new Map(F),H=[],ae=null;for(;G.size;){let K=[...G.keys()].filter(q=>G.get(q)===0);if(K.length!==1){ae=K.length===0?{text:`I can't order the ${I}s \u2014 the "${h} than" facts I have loop back on themselves, so no ${m} exists. /memory to inspect them.`,replace:!0,miss:!0}:{text:`I can't pick the ${m} ${I} from what I know \u2014 nothing compares ${K[0]} and ${K[1]}. Teach me, e.g. "${K[0]} is ${h} than ${K[1]}".`,replace:!0,miss:!0};break}let ee=K[0];H.push(ee),G.delete(ee);for(let q of C)q.subject===ee&&G.has(q.object)&&G.set(q.object,G.get(q.object)-1)}if(ae)return ae;let ce=H.slice(0,-1).map((K,ee)=>C.find(q=>q.subject===K&&q.object===H[ee+1]));if(ce.every(Boolean)){let K=ce.map(ee=>`${Pt(ee)}${ee.provenance?` (source: ${Mn(ee.provenance)})`:""}`).join("; ");return{text:`${H[0]} \u2014 ${K}; so ${H[0]} is the ${m} ${I}`,replace:!0}}}}let g=s?c.match(iI)||c.match(aI):null;if(g){let D=Y(a,g[1]),z=(await it(e,r)).filter(W=>yo(W.predicate)!==null&&D.has(W.subject));if(z.length){let I=Qe(pn(z),o).map(re),L=I.slice(0,je),C=I.slice(je),N=C.length?`
192
+ \u2026and ${C.length} more \u2014 say 'more' to see them.`:"";return{text:L.join(`
193
+ `)+N,replace:!0,...C.length?{pending:{items:C,noun:"facts"}}:{}}}}let b=c.match(cI);if(b){let D=b[1].toLowerCase(),z=Y(a,b[2].replace(/^(?:an?|the)\s+/i,"").trim()),W=(await it(e,r)).filter(I=>yo(I.predicate)===D&&z.has(I.object));if(W.length){let L=Qe(pn(W),o).map(re),C=L.slice(0,je),N=L.slice(je),F=N.length?`
194
+ \u2026and ${N.length} more \u2014 say 'more' to see them.`:"";return{text:C.join(`
195
+ `)+F,replace:!0,...N.length?{pending:{items:N,noun:"facts"}}:{}}}}let y=c.match(lI);if(y){let D=y[3].toLowerCase(),z=Y(a,y[2]),W=new Set([...Y(a,y[1])].map(L=>l(`mgx:${D}-${L.replace(/\s+/g,"-")}`))),I=(await it(e,r)).filter(L=>W.has(l(L.predicate))&&z.has(a(L.subject)));if(I.length){let C=Qe(pn(I),o).map(re),N=C.slice(0,je),F=C.slice(je),G=F.length?`
196
196
  \u2026and ${F.length} more \u2014 say 'more' to see them.`:"";return{text:N.join(`
197
- `)+G,replace:!0,...F.length?{pending:{items:F,noun:"facts"}}:{}}}}let w=n?.parsed?.shape==="meta"?n.parsed.object:null,$=n?.parsed&&n.parsed.node!=="miss";if(!w&&s&&!$&&!ty.test(c)){let D=c.match(ky)||c.match(/^what\s+(?:does|do)\s+(.+?)\s+means?[?.!\s]*$/i);D&&(w=Ps(D[1]))}if(!w&&n?.ambiguous&&Array.isArray(n.candidateParses)){let D=n.candidateParses.find(z=>z?.shape==="meta"&&z.object);D&&(w=Ps(String(D.object)))}if(w){let D=cA(w),{predicate:z}=D,W=D.subject.replace(/^(?:the|an?)\s+/i,"").trim()||D.subject,C=!1;if(z&&os.test(W)){if(!i){let H=String(uo[z]||"").replace(/^(?:is|are)\s+/,"");return{text:`not sure what "${W.toLowerCase()}" refers to yet \u2014 name the subject directly, e.g. "what is a <name>${H?` ${H}`:""}".`,replace:s,miss:!0,selfContainedMiss:!0}}W=i,C=!0}let L=Y(a,W),O=(await it(e,r)).filter(H=>L.has(H.subject)&&!Vw.has(H.predicate)),N=z?O.filter(H=>l(H.predicate)===z):O;if(!z&&N.length&&!N.some(md)&&(N=[]),!N.length){if(z&&(O.length||C))return{text:`I don't have any "${uo[z]}" facts about ${W}.`,replace:s,...O.length?{}:{miss:!0}};if(!z){let H=Qe((await it(e,r)).filter(se=>L.has(se.object)),o);if(H.length&&!H.some(md)&&(H=[]),H.length){let se=H.map(re),te=se.slice(0,je),xe=se.slice(je),Ae=xe.length?`
197
+ `)+G,replace:!0,...F.length?{pending:{items:F,noun:"facts"}}:{}}}}let w=n?.parsed?.shape==="meta"?n.parsed.object:null,v=n?.parsed&&n.parsed.node!=="miss";if(!w&&s&&!v&&!hy.test(c)){let D=c.match(Dy)||c.match(/^what\s+(?:does|do)\s+(.+?)\s+means?[?.!\s]*$/i);D&&(w=zs(D[1]))}if(!w&&n?.ambiguous&&Array.isArray(n.candidateParses)){let D=n.candidateParses.find(z=>z?.shape==="meta"&&z.object);D&&(w=zs(String(D.object)))}if(w){let D=DA(w),{predicate:z}=D,W=D.subject.replace(/^(?:the|an?)\s+/i,"").trim()||D.subject,I=!1;if(z&&rs.test(W)){if(!i){let q=String(ho[z]||"").replace(/^(?:is|are)\s+/,"");return{text:`not sure what "${W.toLowerCase()}" refers to yet \u2014 name the subject directly, e.g. "what is a <name>${q?` ${q}`:""}".`,replace:s,miss:!0,selfContainedMiss:!0}}W=i,I=!0}let L=Y(a,W),C=(await it(e,r)).filter(q=>L.has(q.subject)&&!iy.has(q.predicate)),N=z?C.filter(q=>l(q.predicate)===z):C;if(!z&&N.length&&!N.some(xd)&&(N=[]),!N.length){if(z&&(C.length||I))return{text:`I don't have any "${ho[z]}" facts about ${W}.`,replace:s,...C.length?{}:{miss:!0}};if(!z){let q=Qe((await it(e,r)).filter(se=>L.has(se.object)),o);if(q.length&&!q.some(xd)&&(q=[]),q.length){let se=q.map(re),te=se.slice(0,je),xe=se.slice(je),Ae=xe.length?`
198
198
  \u2026and ${xe.length} more \u2014 say 'more' to see them.`:"";return{text:te.join(`
199
- `)+Ae,replace:s,...xe.length?{pending:{items:xe,noun:"facts"}}:{}}}}return null}N=Qe(N,o);let F=await it(e,r),{lines:G,grouped:q}=Kw(N,F,L),ae=!z&&G.length>uA?await dA(W,N,F,G):null;if(ae)return{...ae,replace:s};if(q)return{...q,replace:s};let ce=G.slice(0,je),K=G.slice(je),ee=K.length?`
199
+ `)+Ae,replace:s,...xe.length?{pending:{items:xe,noun:"facts"}}:{}}}}return null}N=Qe(N,o);let F=await it(e,r),{lines:G,grouped:H}=cy(N,F,L),ae=!z&&G.length>UA?await BA(W,N,F,G):null;if(ae)return{...ae,replace:s};if(H)return{...H,replace:s};let ce=G.slice(0,je),K=G.slice(je),ee=K.length?`
200
200
  \u2026and ${K.length} more \u2014 say 'more' to see them.`:"";return{text:ce.join(`
201
- `)+ee,replace:s,...K.length?{pending:{items:K,noun:"facts"}}:{}}}if(!s)return null;let _=c.match(VT);if(_){let z=`mgx:${_[2].toLowerCase().replace(/\s+/g,"-")}-than`,W=await fd(e),C=ce=>{let K=ce.replace(/^(?:an?|the)\s+/i,"").trim();return i&&os.test(K)?i:K},L=C(_[1]),O=C(_[3]),N=Y(a,L),F=Y(a,O),G=W.find(ce=>ce.predicate===z&&N.has(ce.subject)&&F.has(ce.object));if(G){let ce=W.find(ee=>ee.predicate===z&&N.has(ee.object)&&F.has(ee.subject)),K=ce?` \u2014 though you also told me the opposite: ${re(ce)}. Both are stored; I won't silently pick one.`:"";return{text:`yes \u2014 ${re(G)}${K}`,replace:!0}}let q=W.filter(ce=>ce.predicate===z&&(N.has(ce.subject)||N.has(ce.object)));return{text:`I can't confirm that \u2014 nothing I remember compares them that way.${q.length?` I do know: ${q.slice(0,3).map(re).join("; ")}.`:""} If it's true, teach me: "${L} is ${_[2].toLowerCase()} than ${O}".`,replace:!0,miss:!0}}for(let{predicate:D,phrase:z,re:W}of GA){let C=c.match(W);if(!C)continue;let L=await fd(e),O=Y(a,C[1]),N=Y(a,C[2]),F=L.find(q=>q.predicate===D&&O.has(q.subject)&&N.has(q.object));if(F)return{text:`yes \u2014 ${re(F)}`,replace:!0};let G=L.filter(q=>q.predicate===D&&O.has(q.subject));if(G.length){let q=G.slice(0,3).map(re).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${C[1]} ${z} ${C[2]}. I do know: ${q}.`,replace:!0,miss:!0}}if(!n?.parsed&&L.some(q=>O.has(q.subject)))return{text:`I can't confirm that \u2014 nothing I remember says ${C[1]} ${z} ${C[2]}.`,replace:!0,miss:!0};break}let v=c.match(Cs)||wd(c);if(v){let D=Y(a,v[1]),z=Y(a,v[2]),W=await it(e,r),C=F=>D.has(F.subject)&&z.has(F.object),{DISJOINT_PREDICATE:L}=await Promise.resolve().then(()=>(Gt(),cn)),O=F=>D.has(F.subject)||D.has(F.object)||z.has(F.subject)||z.has(F.object);return W.some(F=>F.predicate===L&&lo(F)&&O(F))?null:by(W.find(F=>rs.has(F.predicate)&&C(F)),W.find(F=>F.predicate===Ji&&C(F)))}let x=vd(c),E=x.match(SA);if(E){let D=await it(e,r),z=E[1],W=Zw(E[2],E[3],D);if(W&&x!==Qw(c)&&(W=Jw(W)),W&&z)return{text:`I can't speak for ${z.trim()} ${E[2]} \u2014 what I remember is generic, not universal. ${W.text}.`,replace:!0};if(W)return W;let C=Y(a,E[2]),L=D.filter(O=>O.predicate==="mgx:capableOf"&&C.has(O.subject));if(L.length){let O=L.slice(0,3).map(re).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${E[2]} can ${E[3]}. I do know: ${O}. If it's true, teach me: "a ${L[0].subject} can ${E[3]}".`,replace:!0,miss:!0}}return ey(E[2],E[3],D)}let S=c.match(kA);if(S){let D=Y(a,S[1]),z=Y(a,S[2]),W=new Set(["mgx:hasA","tmct:has"]),C=await fd(e),L=G=>C.find(q=>W.has(q.predicate)&&G.has(q.subject)&&z.has(q.object)),O=L(D);if(O)return{text:`yes \u2014 ${re(O)}`,replace:!0};let N=[{terms:D,chain:[]}],F=new Set;for(let G=0;G<4;G+=1){let q=[];for(let{terms:ae,chain:ce}of N){let K=C.filter(ee=>rs.has(ee.predicate)&&ae.has(ee.subject)&&!F.has(ee.object));for(let ee of K){if(F.has(ee.object))continue;F.add(ee.object);let H=[...ce,ee],se=L(Y(a,ee.object));if(se)return{text:`yes \u2014 ${[...H.map(re),re(se)].join("; ")}`,replace:!0};q.push({terms:Y(a,ee.object),chain:H})}}if(!q.length)break;N=q}return null}let R=vd(c),k=R.match(IA);if(k){let D=await it(e,r),z=!!k[1],W=Y(a,k[2]),C=Y(a,k[3]),L=Zw(k[2],k[3],D);if(L&&R!==Qw(c)&&(L=Jw(L)),L&&z)return{text:`I can't speak for ${k[1].trim()} ${k[2]} \u2014 what I remember is generic, not universal. ${L.text}.`,replace:!0};if(L)return L;if(s){let O=D.filter(F=>F.predicate==="mgx:capableOf"&&W.has(F.subject));if(O.length){let F=O.slice(0,3).map(re).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${k[2]} can ${k[3]}. I do know: ${F}. If it's true, teach me: "a ${O[0].subject} can ${k[3]}".`,replace:!0,miss:!0}}let N=ey(k[2],k[3],D);if(N)return N;if(!/\s/.test(k[2].trim())&&!D.some(F=>W.has(F.subject)||W.has(F.object))){let F=kd(Ha(k[2]));return{text:`I can't confirm that \u2014 I don't know anything about "${k[2]}" yet. Teach me "a ${F} can ${k[3]}" (or "a ${F} cannot ${k[3]}") and I'll remember it.`,replace:!0,miss:!0}}}}let A=c.match(jA);if(A){let D=Y(a,A[1]),z=(await it(e,r)).filter(F=>(F.predicate==="mgx:capableOf"||F.predicate===Bo)&&D.has(F.subject));if(!z.length)return null;let C=Qe(pn(z),o).map(re),L=C.slice(0,je),O=C.slice(je),N=O.length?`
202
- \u2026and ${O.length} more \u2014 say 'more' to see them.`:"";return{text:L.join(`
203
- `)+N,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}let P=c.match(PA);if(P){let D=Y(a,P[1]),z=Y(a,P[2]),W=await it(e,r),C=pn(W.filter(L=>L.predicate==="mgx:capableOf"&&z.has(L.object))).filter(L=>Zi(new Set([L.subject]),z,W).verdict==="yes");if(C.length){let{findIsaChain:L,SUBCLASS_PREDICATE:O,TYPE_PREDICATE:N}=await Promise.resolve().then(()=>(Gt(),cn)),F=W.filter(ie=>ie.predicate===O),G=W.filter(ie=>ie.predicate===N),q=F.map(ie=>[ie.subject,ie.object]),ae=G.map(ie=>[ie.subject,ie.object]),ce=ie=>(ie.predicate===O?F:G).find(fe=>fe.subject===ie.subject&&fe.object===ie.object),K=new Map,ee=C.filter(ie=>D.has(ie.subject)?!0:(K.has(ie.subject)||K.set(ie.subject,L(ie.subject,D,ae,q,{maxHops:3})),!!K.get(ie.subject))),se=Qe(ee.length?ee:C,o).map(ie=>{let fe=ee.length?K.get(ie.subject):null;if(!fe||fe.length<2)return re(ie);let be=fe.map(ce);if(!be.every(Boolean))return re(ie);let Ce=be.map(ue=>`${Pt(ue)}${ue.provenance?` (source: ${Pn(ue.provenance)})`:""}`).join("; ");return`${re(ie)} \u2014 via: ${Ce}`}),te=se.slice(0,je),xe=se.slice(je),Ae=xe.length?`
204
- \u2026and ${xe.length} more \u2014 say 'more' to see them.`:"";return{text:(ee.length?"":`nothing I remember ties these to "${P[1]}", but:
201
+ `)+ee,replace:s,...K.length?{pending:{items:K,noun:"facts"}}:{}}}if(!s)return null;let _=c.match(EA);if(_){let z=`mgx:${_[2].toLowerCase().replace(/\s+/g,"-")}-than`,W=await vd(e),I=ce=>{let K=ce.replace(/^(?:an?|the)\s+/i,"").trim();return i&&rs.test(K)?i:K},L=I(_[1]),C=I(_[3]),N=Y(a,L),F=Y(a,C),G=W.find(ce=>ce.predicate===z&&N.has(ce.subject)&&F.has(ce.object));if(G){let ce=W.find(ee=>ee.predicate===z&&N.has(ee.object)&&F.has(ee.subject)),K=ce?` \u2014 though you also told me the opposite: ${re(ce)}. Both are stored; I won't silently pick one.`:"";return{text:`yes \u2014 ${re(G)}${K}`,replace:!0}}let H=W.filter(ce=>ce.predicate===z&&(N.has(ce.subject)||N.has(ce.object)));return{text:`I can't confirm that \u2014 nothing I remember compares them that way.${H.length?` I do know: ${H.slice(0,3).map(re).join("; ")}.`:""} If it's true, teach me: "${L} is ${_[2].toLowerCase()} than ${C}".`,replace:!0,miss:!0}}for(let{predicate:D,phrase:z,re:W}of vI){let I=c.match(W);if(!I)continue;let L=await vd(e),C=Y(a,I[1]),N=Y(a,I[2]),F=L.find(H=>H.predicate===D&&C.has(H.subject)&&N.has(H.object));if(F)return{text:`yes \u2014 ${re(F)}`,replace:!0};let G=L.filter(H=>H.predicate===D&&C.has(H.subject));if(G.length){let H=G.slice(0,3).map(re).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${I[1]} ${z} ${I[2]}. I do know: ${H}.`,replace:!0,miss:!0}}if(!n?.parsed&&L.some(H=>C.has(H.subject)))return{text:`I can't confirm that \u2014 nothing I remember says ${I[1]} ${z} ${I[2]}.`,replace:!0,miss:!0};break}let $=c.match(Ns)||jd(c);if($){let D=Y(a,$[1]),z=Y(a,$[2]),W=await it(e,r),I=F=>D.has(F.subject)&&z.has(F.object),{DISJOINT_PREDICATE:L}=await Promise.resolve().then(()=>(Vt(),cn)),C=F=>D.has(F.subject)||D.has(F.object)||z.has(F.subject)||z.has(F.object);return W.some(F=>F.predicate===L&&mo(F)&&C(F))?null:Iy(W.find(F=>is.has(F.predicate)&&I(F)),W.find(F=>F.predicate===na&&I(F)))}let x=Rd(c),E=x.match(tI);if(E){let D=await it(e,r),z=E[1],W=fy(E[2],E[3],D);if(W&&x!==py(c)&&(W=dy(W)),W&&z)return{text:`I can't speak for ${z.trim()} ${E[2]} \u2014 what I remember is generic, not universal. ${W.text}.`,replace:!0};if(W)return W;let I=Y(a,E[2]),L=D.filter(C=>C.predicate==="mgx:capableOf"&&I.has(C.subject));if(L.length){let C=L.slice(0,3).map(re).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${E[2]} can ${E[3]}. I do know: ${C}. If it's true, teach me: "a ${L[0].subject} can ${E[3]}".`,replace:!0,miss:!0}}return my(E[2],E[3],D)}let S=c.match(nI);if(S){let D=Y(a,S[1]),z=Y(a,S[2]),W=new Set(["mgx:hasA","tmct:has"]),I=await vd(e),L=G=>I.find(H=>W.has(H.predicate)&&G.has(H.subject)&&z.has(H.object)),C=L(D);if(C)return{text:`yes \u2014 ${re(C)}`,replace:!0};let N=[{terms:D,chain:[]}],F=new Set;for(let G=0;G<4;G+=1){let H=[];for(let{terms:ae,chain:ce}of N){let K=I.filter(ee=>is.has(ee.predicate)&&ae.has(ee.subject)&&!F.has(ee.object));for(let ee of K){if(F.has(ee.object))continue;F.add(ee.object);let q=[...ce,ee],se=L(Y(a,ee.object));if(se)return{text:`yes \u2014 ${[...q.map(re),re(se)].join("; ")}`,replace:!0};H.push({terms:Y(a,ee.object),chain:q})}}if(!H.length)break;N=H}return null}let R=Rd(c),k=R.match(uI);if(k){let D=await it(e,r),z=!!k[1],W=Y(a,k[2]),I=Y(a,k[3]),L=fy(k[2],k[3],D);if(L&&R!==py(c)&&(L=dy(L)),L&&z)return{text:`I can't speak for ${k[1].trim()} ${k[2]} \u2014 what I remember is generic, not universal. ${L.text}.`,replace:!0};if(L)return L;if(s){let C=D.filter(F=>F.predicate==="mgx:capableOf"&&W.has(F.subject));if(C.length){let F=C.slice(0,3).map(re).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${k[2]} can ${k[3]}. I do know: ${F}. If it's true, teach me: "a ${C[0].subject} can ${k[3]}".`,replace:!0,miss:!0}}let N=my(k[2],k[3],D);if(N)return N;if(!/\s/.test(k[2].trim())&&!D.some(F=>W.has(F.subject)||W.has(F.object))){let F=Od(Qa(k[2]));return{text:`I can't confirm that \u2014 I don't know anything about "${k[2]}" yet. Teach me "a ${F} can ${k[3]}" (or "a ${F} cannot ${k[3]}") and I'll remember it.`,replace:!0,miss:!0}}}}let A=c.match(sI);if(A){let D=Y(a,A[1]),z=(await it(e,r)).filter(F=>(F.predicate==="mgx:capableOf"||F.predicate===qo)&&D.has(F.subject));if(!z.length)return null;let I=Qe(pn(z),o).map(re),L=I.slice(0,je),C=I.slice(je),N=C.length?`
202
+ \u2026and ${C.length} more \u2014 say 'more' to see them.`:"";return{text:L.join(`
203
+ `)+N,replace:!0,...C.length?{pending:{items:C,noun:"facts"}}:{}}}let M=c.match(fI);if(M){let D=Y(a,M[1]),z=Y(a,M[2]),W=await it(e,r),I=pn(W.filter(L=>L.predicate==="mgx:capableOf"&&z.has(L.object))).filter(L=>oa(new Set([L.subject]),z,W).verdict==="yes");if(I.length){let{findIsaChain:L,SUBCLASS_PREDICATE:C,TYPE_PREDICATE:N}=await Promise.resolve().then(()=>(Vt(),cn)),F=W.filter(ie=>ie.predicate===C),G=W.filter(ie=>ie.predicate===N),H=F.map(ie=>[ie.subject,ie.object]),ae=G.map(ie=>[ie.subject,ie.object]),ce=ie=>(ie.predicate===C?F:G).find(fe=>fe.subject===ie.subject&&fe.object===ie.object),K=new Map,ee=I.filter(ie=>D.has(ie.subject)?!0:(K.has(ie.subject)||K.set(ie.subject,L(ie.subject,D,ae,H,{maxHops:3})),!!K.get(ie.subject))),se=Qe(ee.length?ee:I,o).map(ie=>{let fe=ee.length?K.get(ie.subject):null;if(!fe||fe.length<2)return re(ie);let be=fe.map(ce);if(!be.every(Boolean))return re(ie);let Ie=be.map(ue=>`${Pt(ue)}${ue.provenance?` (source: ${Mn(ue.provenance)})`:""}`).join("; ");return`${re(ie)} \u2014 via: ${Ie}`}),te=se.slice(0,je),xe=se.slice(je),Ae=xe.length?`
204
+ \u2026and ${xe.length} more \u2014 say 'more' to see them.`:"";return{text:(ee.length?"":`nothing I remember ties these to "${M[1]}", but:
205
205
  `)+te.join(`
206
- `)+Ae,replace:!0,...xe.length?{pending:{items:xe,noun:"facts"}}:{}}}}let T=c.match(NA);if(T&&T[1].trim().split(/\s+/).at(-1)?.toLowerCase()!=="do"){let D=Y(a,T[1]),z=(await it(e,r)).filter(W=>W.predicate==="mgxneg:capableOf"&&D.has(W.object));if(z.length){let C=Qe(pn(z),o).map(re),L=C.slice(0,je),O=C.slice(je),N=O.length?`
207
- \u2026and ${O.length} more \u2014 say 'more' to see them.`:"";return{text:L.join(`
208
- `)+N,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}return{text:`nothing I remember says anything cannot ${T[1].trim()}.`,replace:!0,miss:!0}}let M=c.match(LA);if(M&&M[1].trim().split(/\s+/).at(-1)?.toLowerCase()!=="do"){let D=Y(a,M[1]),z=Rl(D,await it(e,r));if(z.length){let C=Qe(pn(z),o).map(re),L=C.slice(0,je),O=C.slice(je),N=O.length?`
209
- \u2026and ${O.length} more \u2014 say 'more' to see them.`:"";return{text:L.join(`
210
- `)+N,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}}let B=c.match(_A);if(B&&!HA.has(B[1].trim().split(/\s+/)[0]?.toLowerCase())){let D=Y(a,B[1]),z=(await it(e,r)).filter(F=>F.predicate==="mgx:hasA"&&D.has(F.object));if(!z.length)return null;let C=Qe(pn(z),o).map(re),L=C.slice(0,je),O=C.slice(je),N=O.length?`
211
- \u2026and ${O.length} more \u2014 say 'more' to see them.`:"";return{text:L.join(`
212
- `)+N,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}let Z=c.match(ty),J=n?.parsed?.shape==="reverse"&&n.parsed.kind==="inherits"?n.parsed.object:Z?.[1];if(J){let D=Y(a,J),z=(await it(e,r)).filter(F=>rs.has(F.predicate)&&D.has(F.object));if(!z.length)return null;let C=Qe(pn(z),o).map(re),L=C.slice(0,je),O=C.slice(je),N=O.length?`
213
- \u2026and ${O.length} more \u2014 say 'more' to see them.`:"";return{text:L.join(`
214
- `)+N,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}let ne=c.match(EA);if(ne){let D=Y(a,ne[1]),z=await it(e,r),W=V=>!String(V.provenance||"").includes("corpus:")&&!String(V.provenance||"").includes("web:"),C=z.filter(V=>rs.has(V.predicate)&&W(V)),L=new Set,O=D;for(let V=0;V<8&&O.size;V+=1){let oe=new Set;for(let De of C)O.has(De.object)&&!L.has(De.subject)&&oe.add(De.subject);if(!oe.size)break;for(let De of oe)L.add(De);let Ze=new Set;for(let De of oe)for(let He of Y(a,De))Ze.add(He);O=Ze}let N=z.filter(V=>D.has(V.subject)||D.has(V.object)||L.has(V.subject));if(!N.length){let V=a(ne[1]).split(/\s+/).filter(oe=>oe.length>=4&&!wy.has(oe));if(V.length){let oe=De=>new Set(String(De||"").split(/\s+/)),Ze=De=>{let He=oe(De);return V.some(nn=>He.has(nn))};N=z.filter(De=>Ze(De.subject)||Ze(De.object))}}N=N.filter(V=>!Vw.has(V.predicate));let F=N.length>0&&!N.some(md);if(!N.length)return null;let{findConsistencyViolations:G,TYPE_PREDICATE:q,SUBCLASS_PREDICATE:ae,DISJOINT_PREDICATE:ce}=await Promise.resolve().then(()=>(Gt(),cn)),K=V=>!V.provenance?.includes("corpus:")&&!V.provenance?.includes("web:"),ee=z.filter(V=>V.predicate===q&&K(V)).map(V=>[V.subject,V.object]),H=z.filter(V=>V.predicate===ae&&K(V)).map(V=>[V.subject,V.object]),se=z.filter(V=>V.predicate===ce&&K(V)).map(V=>[V.subject,V.object]);if(se.length){let oe=G(ee,H,se,{focus:D,budget:5}).find(Ze=>D.has(Ze.subject));if(oe)return{text:`I can't answer that \u2014 what I've been told about ${oe.subject} is inconsistent: it's taught to be both ${oe.classA} and ${oe.classB}, but ${oe.viaA} and ${oe.viaB} are disjoint (${oe.viaA} owl:disjointWith ${oe.viaB}). I'd need one of those retracted before I can answer honestly.`,replace:!0}}let te=N.find(V=>D.has(V.subject)||D.has(V.object)),xe=te?D.has(te.subject)?te.subject:te.object:ne[1].trim(),Ae=N.some(V=>L.has(V.subject)&&!D.has(V.subject)&&!D.has(V.object));N=Qe(N,o);let pe=`${N.length} remembered fact${N.length===1?"":"s"} about ${xe}${Ae?" (including its known subtypes)":""}:`,{lines:ie,grouped:fe}=Kw(N,z,D,{indent:" "});if(fe)return{...fe,text:`${pe}
215
- ${fe.text}`,...F?{weakOnly:!0}:{}};let be=ie.slice(0,je),Ce=ie.slice(je),ue=Ce.length?`
216
- \u2026and ${Ce.length} more \u2014 say 'more' to see them.`:"";return{text:`${pe}
206
+ `)+Ae,replace:!0,...xe.length?{pending:{items:xe,noun:"facts"}}:{}}}}let T=c.match(pI);if(T&&T[1].trim().split(/\s+/).at(-1)?.toLowerCase()!=="do"){let D=Y(a,T[1]),z=(await it(e,r)).filter(W=>W.predicate==="mgxneg:capableOf"&&D.has(W.object));if(z.length){let I=Qe(pn(z),o).map(re),L=I.slice(0,je),C=I.slice(je),N=C.length?`
207
+ \u2026and ${C.length} more \u2014 say 'more' to see them.`:"";return{text:L.join(`
208
+ `)+N,replace:!0,...C.length?{pending:{items:C,noun:"facts"}}:{}}}return{text:`nothing I remember says anything cannot ${T[1].trim()}.`,replace:!0,miss:!0}}let P=c.match(dI);if(P&&P[1].trim().split(/\s+/).at(-1)?.toLowerCase()!=="do"){let D=Y(a,P[1]),z=Ol(D,await it(e,r));if(z.length){let I=Qe(pn(z),o).map(re),L=I.slice(0,je),C=I.slice(je),N=C.length?`
209
+ \u2026and ${C.length} more \u2014 say 'more' to see them.`:"";return{text:L.join(`
210
+ `)+N,replace:!0,...C.length?{pending:{items:C,noun:"facts"}}:{}}}}let U=c.match(oI);if(U&&!xI.has(U[1].trim().split(/\s+/)[0]?.toLowerCase())){let D=Y(a,U[1]),z=(await it(e,r)).filter(F=>F.predicate==="mgx:hasA"&&D.has(F.object));if(!z.length)return null;let I=Qe(pn(z),o).map(re),L=I.slice(0,je),C=I.slice(je),N=C.length?`
211
+ \u2026and ${C.length} more \u2014 say 'more' to see them.`:"";return{text:L.join(`
212
+ `)+N,replace:!0,...C.length?{pending:{items:C,noun:"facts"}}:{}}}let Z=c.match(hy),J=n?.parsed?.shape==="reverse"&&n.parsed.kind==="inherits"?n.parsed.object:Z?.[1];if(J){let D=Y(a,J),z=(await it(e,r)).filter(F=>is.has(F.predicate)&&D.has(F.object));if(!z.length)return null;let I=Qe(pn(z),o).map(re),L=I.slice(0,je),C=I.slice(je),N=C.length?`
213
+ \u2026and ${C.length} more \u2014 say 'more' to see them.`:"";return{text:L.join(`
214
+ `)+N,replace:!0,...C.length?{pending:{items:C,noun:"facts"}}:{}}}let ne=c.match(eI);if(ne){let D=Y(a,ne[1]),z=await it(e,r),W=V=>!String(V.provenance||"").includes("corpus:")&&!String(V.provenance||"").includes("web:"),I=z.filter(V=>is.has(V.predicate)&&W(V)),L=new Set,C=D;for(let V=0;V<8&&C.size;V+=1){let oe=new Set;for(let De of I)C.has(De.object)&&!L.has(De.subject)&&oe.add(De.subject);if(!oe.size)break;for(let De of oe)L.add(De);let Ze=new Set;for(let De of oe)for(let Ve of Y(a,De))Ze.add(Ve);C=Ze}let N=z.filter(V=>D.has(V.subject)||D.has(V.object)||L.has(V.subject));if(!N.length){let V=a(ne[1]).split(/\s+/).filter(oe=>oe.length>=4&&!Cy.has(oe));if(V.length){let oe=De=>new Set(String(De||"").split(/\s+/)),Ze=De=>{let Ve=oe(De);return V.some(nn=>Ve.has(nn))};N=z.filter(De=>Ze(De.subject)||Ze(De.object))}}N=N.filter(V=>!iy.has(V.predicate));let F=N.length>0&&!N.some(xd);if(!N.length)return null;let{findConsistencyViolations:G,TYPE_PREDICATE:H,SUBCLASS_PREDICATE:ae,DISJOINT_PREDICATE:ce}=await Promise.resolve().then(()=>(Vt(),cn)),K=V=>!V.provenance?.includes("corpus:")&&!V.provenance?.includes("web:"),ee=z.filter(V=>V.predicate===H&&K(V)).map(V=>[V.subject,V.object]),q=z.filter(V=>V.predicate===ae&&K(V)).map(V=>[V.subject,V.object]),se=z.filter(V=>V.predicate===ce&&K(V)).map(V=>[V.subject,V.object]);if(se.length){let oe=G(ee,q,se,{focus:D,budget:5}).find(Ze=>D.has(Ze.subject));if(oe)return{text:`I can't answer that \u2014 what I've been told about ${oe.subject} is inconsistent: it's taught to be both ${oe.classA} and ${oe.classB}, but ${oe.viaA} and ${oe.viaB} are disjoint (${oe.viaA} owl:disjointWith ${oe.viaB}). I'd need one of those retracted before I can answer honestly.`,replace:!0}}let te=N.find(V=>D.has(V.subject)||D.has(V.object)),xe=te?D.has(te.subject)?te.subject:te.object:ne[1].trim(),Ae=N.some(V=>L.has(V.subject)&&!D.has(V.subject)&&!D.has(V.object));N=Qe(N,o);let pe=`${N.length} remembered fact${N.length===1?"":"s"} about ${xe}${Ae?" (including its known subtypes)":""}:`,{lines:ie,grouped:fe}=cy(N,z,D,{indent:" "});if(fe)return{...fe,text:`${pe}
215
+ ${fe.text}`,...F?{weakOnly:!0}:{}};let be=ie.slice(0,je),Ie=ie.slice(je),ue=Ie.length?`
216
+ \u2026and ${Ie.length} more \u2014 say 'more' to see them.`:"";return{text:`${pe}
217
217
  ${be.join(`
218
- `)}${ue}`,replace:!0,...Ce.length?{pending:{items:Ce.map(V=>V.trim()),noun:"facts"}}:{},...F?{weakOnly:!0}:{}}}return null}async function sC(e,t){let n=await ri(e,t);if(!n)return null;let s=(e?.byId?.get?.(n.id)||(e?.individuals||[]).find(o=>o?.id===n.id))?.class;return s&&Ww[s]?Ww[s][0]:null}function Ga(e,t){let n=[];if(!e||!t)return n;let s=new Set([t]),o=t;for(let r=0;r<rC;r+=1){let i=null;for(let a of e.relations||[])if(oC.test(`${a?.prop||""} ${a?.predicate||""}`)&&(i=(a.edges||[]).find(l=>l?.subject===o)||null,i))break;if(!i||s.has(i.object))break;s.add(i.object),n.push({id:i.object,label:i.objectLabel||i.object}),o=i.object}return n}async function Sy(e,t,n,s,o=null,r=null,i={},a=null){return Ey(await iC(e,t,n,s,o,r,i,a),n,t)}async function iC(e,t,n,s,o=null,r=null,i={},a=null){if(!s)return null;let l;try{({normFactTerm:l}=await Promise.resolve().then(()=>(Ke(),_s)))}catch{return null}let c=String(t).trim();if(o){let C=c.match(Cs);if(C){let L=await ri(o,C[1]);if(L){let O=Y(l,on(C[2])),N=Ga(o,L.id).find(G=>[...Y(l,G.label)].some(q=>O.has(q)));if(N)return{text:`yes \u2014 the code graph says ${L.label} inherits ${N.label}.`,replace:!0};let F=await ri(o,on(C[2]));if(F&&Ga(o,F.id).some(G=>G.id===L.id))return{text:`I can't confirm that \u2014 the code graph's stored direction runs the other way: ${F.label} inherits ${L.label}. An inheritance doesn't reverse.`,replace:!0,miss:!0}}}}let u=c.replace(/^(?:actually|really|honestly|yeah\s+nah)\s*,?\s+/i,""),d=await it(e,a);if(!d.length){if(!Cs.test(u)&&!bd.test(u)){let L=u.match(sy);if(L){let O=L[1].trim(),N=os.test(O)?r||null:O;if(N&&!/^there\b/i.test(N)&&!n?.parsed&&!ry.test(O)&&!oy.test(O)&&!Hw.test(L[2].trim()))return iy(N,L[2].trim().toLowerCase())}}let C=u.match(Cs)||wd(c);if(!(C&&!/^there\b/i.test(C[1].trim())||Xw.test(c)))return null}let f=d.filter(C=>rs.has(C.predicate)),p=(C,L)=>L.trust-C.trust,m=C=>{let L=C.map(re),O=L.slice(0,je),N=L.slice(je),F=N.length?`
219
- \u2026and ${N.length} more \u2014 say 'more' to see them.`:"";return{text:O.join(`
220
- `)+F,replace:!0,...N.length?{pending:{items:N,noun:"facts"}}:{}}};if(nC.test(c)){let C=Qe(f.length?f:d,i);return C.length?m(C):null}let h=u.match(bd);if(h){let C=h[1].trim(),L=os.test(C)?r||null:C,O=h[2].trim().toLowerCase(),N=h[3].trim();if(L&&!yd.has(O)){let F=id(d),{findIsaChain:G}=await Promise.resolve().then(()=>(Gt(),cn)),q=Ae=>{let pe=String(Ae||"").trim().toLowerCase(),ie=[];for(let fe of d){let be=pd(fe.predicate);if(!be)continue;if(be===pe){ie.push({fact:fe,aliasFacts:[]});continue}let Ce=ad(G,be,new Set([pe]),F,{maxHops:2});if(!Ce)continue;let ue=Ce.map(V=>d.find(oe=>oe.predicate===ii&&oe.subject===V.subject&&oe.object===V.object));ue.every(Boolean)&&ie.push({fact:fe,aliasFacts:ue})}return ie},{loadMemory:ae,findRuleByName:ce,resolveRelationChase:K}=await Promise.resolve().then(()=>(Ke(),_s)),{findActionPath:ee}=await Promise.resolve().then(()=>(Gs(),yi)),H=await ae(e),te=await K(H,O,L,N,{relationFactsFor:q,renderFactLine:re,factPhrase:Pt,factTermVariants:Y,byTrust:p,rows:d,HAS_PROPERTY_PREDICATE:rd,findActionPath:ee});return te?{text:`yes \u2014 ${te.citation.join("; ")}`,replace:!0}:q(O).length>0||!!ce(H,O)?{text:`I know the '${O}' relation, but I can't confirm ${L} is the ${O} of ${N} from what you've told me.`,replace:!0}:{text:`I don't know a relation or rule called '${O}' yet.`,replace:!0}}}let g=Va(u).match(yy)||vy(u,C=>{let L=Y(l,C);return d.some(O=>L.has(O.subject)||L.has(O.object))});if(g){let C=g[1].trim().toLowerCase(),L=g[2].trim(),O=os.test(L)?r||null:L;if(O&&!yd.has(C)){let N=id(d),{findIsaChain:F}=await Promise.resolve().then(()=>(Gt(),cn)),G=Ae=>{let pe=String(Ae||"").trim().toLowerCase(),ie=[];for(let fe of d){let be=pd(fe.predicate);if(!be)continue;if(be===pe){ie.push({fact:fe,aliasFacts:[]});continue}let Ce=ad(F,be,new Set([pe]),N,{maxHops:2});if(!Ce)continue;let ue=Ce.map(V=>d.find(oe=>oe.predicate===ii&&oe.subject===V.subject&&oe.object===V.object));ue.every(Boolean)&&ie.push({fact:fe,aliasFacts:ue})}return ie},{loadMemory:q,findRuleByName:ae,resolveRelationChaseReverse:ce}=await Promise.resolve().then(()=>(Ke(),_s)),K=await q(e),{findReachableSet:ee}=await Promise.resolve().then(()=>(Gs(),yi)),se=await ce(K,C,O,{relationFactsFor:G,renderFactLine:re,factPhrase:Pt,factTermVariants:Y,byTrust:p,rows:d,HAS_PROPERTY_PREDICATE:rd,findReachableSet:ee});return se.length?{text:se.map(pe=>`${pe.subject} \u2014 ${pe.citation.join("; ")}`).join(`
221
- `),replace:!0}:G(C).length>0||!!ae(K,C)?{text:/^what\b/i.test(Va(u))?`I don't know what the ${C} of ${O} is from what you've told me.`:`I don't know anyone who is the ${C} of ${O} from what you've told me.`,replace:!0}:{text:`I don't know a relation or rule called '${C}' yet.`,replace:!0}}}{let C=u.match(aC);if(C){let L=Y(l,C[1]),O=Qe(d.filter(N=>L.has(N.subject)||L.has(N.object)),i);if(O.length){let N=O.map(re),F=N.slice(0,je),G=N.slice(je),q=G.length?`
218
+ `)}${ue}`,replace:!0,...Ie.length?{pending:{items:Ie.map(V=>V.trim()),noun:"facts"}}:{},...F?{weakOnly:!0}:{}}}return null}async function LI(e,t){let n=await li(e,t);if(!n)return null;let s=(e?.byId?.get?.(n.id)||(e?.individuals||[]).find(o=>o?.id===n.id))?.class;return s&&sy[s]?sy[s][0]:null}function Ja(e,t){let n=[];if(!e||!t)return n;let s=new Set([t]),o=t;for(let r=0;r<MI;r+=1){let i=null;for(let a of e.relations||[])if(NI.test(`${a?.prop||""} ${a?.predicate||""}`)&&(i=(a.edges||[]).find(l=>l?.subject===o)||null,i))break;if(!i||s.has(i.object))break;s.add(i.object),n.push({id:i.object,label:i.objectLabel||i.object}),o=i.object}return n}async function Fy(e,t,n,s,o=null,r=null,i={},a=null){return Py(await PI(e,t,n,s,o,r,i,a),n,t)}async function PI(e,t,n,s,o=null,r=null,i={},a=null){if(!s)return null;let l;try{({normFactTerm:l}=await Promise.resolve().then(()=>(Be(),As)))}catch{return null}let c=String(t).trim();if(o){let I=c.match(Ns);if(I){let L=await li(o,I[1]);if(L){let C=Y(l,on(I[2])),N=Ja(o,L.id).find(G=>[...Y(l,G.label)].some(H=>C.has(H)));if(N)return{text:`yes \u2014 the code graph says ${L.label} inherits ${N.label}.`,replace:!0};let F=await li(o,on(I[2]));if(F&&Ja(o,F.id).some(G=>G.id===L.id))return{text:`I can't confirm that \u2014 the code graph's stored direction runs the other way: ${F.label} inherits ${L.label}. An inheritance doesn't reverse.`,replace:!0,miss:!0}}}}let u=c.replace(/^(?:actually|really|honestly|yeah\s+nah)\s*,?\s+/i,""),d=await it(e,a);if(!d.length){if(!Ns.test(u)&&!kd.test(u)){let L=u.match(by);if(L){let C=L[1].trim(),N=rs.test(C)?r||null:C;if(N&&!/^there\b/i.test(N)&&!n?.parsed&&!yy.test(C)&&!wy.test(C)&&!ry.test(L[2].trim()))return $y(N,L[2].trim().toLowerCase())}}let I=u.match(Ns)||jd(c);if(!(I&&!/^there\b/i.test(I[1].trim())||uy.test(c)))return null}let f=d.filter(I=>is.has(I.predicate)),p=(I,L)=>L.trust-I.trust,m=I=>{let L=I.map(re),C=L.slice(0,je),N=L.slice(je),F=N.length?`
219
+ \u2026and ${N.length} more \u2014 say 'more' to see them.`:"";return{text:C.join(`
220
+ `)+F,replace:!0,...N.length?{pending:{items:N,noun:"facts"}}:{}}};if(OI.test(c)){let I=Qe(f.length?f:d,i);return I.length?m(I):null}let h=u.match(kd);if(h){let I=h[1].trim(),L=rs.test(I)?r||null:I,C=h[2].trim().toLowerCase(),N=h[3].trim();if(L&&!_d.has(C)){let F=md(d),{findIsaChain:G}=await Promise.resolve().then(()=>(Vt(),cn)),H=Ae=>{let pe=String(Ae||"").trim().toLowerCase(),ie=[];for(let fe of d){let be=$d(fe.predicate);if(!be)continue;if(be===pe){ie.push({fact:fe,aliasFacts:[]});continue}let Ie=hd(G,be,new Set([pe]),F,{maxHops:2});if(!Ie)continue;let ue=Ie.map(V=>d.find(oe=>oe.predicate===ui&&oe.subject===V.subject&&oe.object===V.object));ue.every(Boolean)&&ie.push({fact:fe,aliasFacts:ue})}return ie},{loadMemory:ae,findRuleByName:ce,resolveRelationChase:K}=await Promise.resolve().then(()=>(Be(),As)),{findActionPath:ee}=await Promise.resolve().then(()=>(ms(),ki)),q=await ae(e),te=await K(q,C,L,N,{relationFactsFor:H,renderFactLine:re,factPhrase:Pt,factTermVariants:Y,byTrust:p,rows:d,HAS_PROPERTY_PREDICATE:fd,findActionPath:ee});return te?{text:`yes \u2014 ${te.citation.join("; ")}`,replace:!0}:H(C).length>0||!!ce(q,C)?{text:`I know the '${C}' relation, but I can't confirm ${L} is the ${C} of ${N} from what you've told me.`,replace:!0}:{text:`I don't know a relation or rule called '${C}' yet.`,replace:!0}}}let g=Za(u).match(Oy)||Ly(u,I=>{let L=Y(l,I);return d.some(C=>L.has(C.subject)||L.has(C.object))});if(g){let I=g[1].trim().toLowerCase(),L=g[2].trim(),C=rs.test(L)?r||null:L;if(C&&!_d.has(I)){let N=md(d),{findIsaChain:F}=await Promise.resolve().then(()=>(Vt(),cn)),G=Ae=>{let pe=String(Ae||"").trim().toLowerCase(),ie=[];for(let fe of d){let be=$d(fe.predicate);if(!be)continue;if(be===pe){ie.push({fact:fe,aliasFacts:[]});continue}let Ie=hd(F,be,new Set([pe]),N,{maxHops:2});if(!Ie)continue;let ue=Ie.map(V=>d.find(oe=>oe.predicate===ui&&oe.subject===V.subject&&oe.object===V.object));ue.every(Boolean)&&ie.push({fact:fe,aliasFacts:ue})}return ie},{loadMemory:H,findRuleByName:ae,resolveRelationChaseReverse:ce}=await Promise.resolve().then(()=>(Be(),As)),K=await H(e),{findReachableSet:ee}=await Promise.resolve().then(()=>(ms(),ki)),se=await ce(K,I,C,{relationFactsFor:G,renderFactLine:re,factPhrase:Pt,factTermVariants:Y,byTrust:p,rows:d,HAS_PROPERTY_PREDICATE:fd,findReachableSet:ee});return se.length?{text:se.map(pe=>`${pe.subject} \u2014 ${pe.citation.join("; ")}`).join(`
221
+ `),replace:!0}:G(I).length>0||!!ae(K,I)?{text:/^what\b/i.test(Za(u))?`I don't know what the ${I} of ${C} is from what you've told me.`:`I don't know anyone who is the ${I} of ${C} from what you've told me.`,replace:!0}:{text:`I don't know a relation or rule called '${I}' yet.`,replace:!0}}}{let I=u.match(FI);if(I){let L=Y(l,I[1]),C=Qe(d.filter(N=>L.has(N.subject)||L.has(N.object)),i);if(C.length){let N=C.map(re),F=N.slice(0,je),G=N.slice(je),H=G.length?`
222
222
  \u2026and ${G.length} more \u2014 say 'more' to see them.`:"";return{text:F.join(`
223
- `)+q,replace:!0,...G.length?{pending:{items:G,noun:"facts"}}:{}}}}}let b=u.match(yA);if(b){let C=kd(b[1].trim().toLowerCase()),L=b[2].trim(),O=os.test(L)?r||null:L;if(O){let{loadMemory:N,findRuleByName:F,RULE_KIND_PROP:G,RULE_KIND_RECURSIVE:q}=await Promise.resolve().then(()=>(Ke(),_s)),ae=await N(e),ce=F(ae,C),K=ce?.attributes?.find(ee=>ee.prop===G)?.value;if(ce&&K===q){let ee=ce.attributes.find(te=>te.prop==="mgx:ruleBaseCase")?.value,H=ce.attributes.find(te=>te.prop==="mgx:ruleRecStep")?.value,se=l(O);if(ee&&H&&se){let te=id(d),{findIsaChain:xe}=await Promise.resolve().then(()=>(Gt(),cn)),Ae=Ce=>{let ue=String(Ce||"").trim().toLowerCase(),V=[];for(let oe of d){let Ze=pd(oe.predicate);if(!Ze)continue;if(Ze===ue){V.push({fact:oe,aliasFacts:[]});continue}let De=ad(xe,Ze,new Set([ue]),te,{maxHops:2});if(!De)continue;let He=De.map(nn=>d.find(sn=>sn.predicate===ii&&sn.subject===nn.subject&&sn.object===nn.object));He.every(Boolean)&&V.push({fact:oe,aliasFacts:He})}return V},{findReachableSet:pe}=await Promise.resolve().then(()=>(Gs(),yi)),be=pe({entity:se,hop:0},Ce=>{let ue=Ce.hop===0?ee:H;return Ae(ue).filter(V=>V.fact.subject===Ce.entity).map(V=>({action:V,nextState:{entity:V.fact.object,hop:Ce.hop+1}}))},{maxDepth:20,stateKey:Ce=>Ce.entity});if(be.length)return{text:be.map(({node:ue,path:V})=>{let oe=new Set,Ze=[];for(let De of V.actions){Ze.push(re(De.fact));for(let He of De.aliasFacts){let nn=He.id||`${He.subject}|${He.predicate}|${He.object}`;oe.has(nn)||(oe.add(nn),Ze.push(`${Pt(He)}${He.provenance?` (source: ${Pn(He.provenance)})`:""}`))}}return`${ue.entity} \u2014 ${Ze.join("; ")}`}).join(`
224
- `),replace:!0}}}return null}}let y=c.match(Xw),w=c.match(Cs)||wd(c)||y&&`is ${y[1].trim()} a ${y[2].trim()}`.match(Cs);if(w){let C=Y(l,on(w[2])),L=r&&os.test(w[1].trim())?r:w[1],O=new Set(Y(l,L));if([...O].some(U=>C.has(U))){let U=on(w[2]).trim();return{text:`yes \u2014 ${ur(U)} ${U} is ${ur(U)} ${U}, trivially: every kind is a kind of itself.`,replace:!0}}let N=await sC(o,L);if(N)for(let U of Y(l,N))O.add(U);let{findIsaChain:F,deriveDisjointViolations:G,SUBCLASS_PREDICATE:q,TYPE_PREDICATE:ae,DISJOINT_PREDICATE:ce}=await Promise.resolve().then(()=>(Gt(),cn)),K=lo,ee=f.filter(U=>U.predicate===q&&K(U)),H=f.filter(U=>U.predicate===ae&&K(U)),se=ee.map(U=>[U.subject,U.object]),te=H.map(U=>[U.subject,U.object]),xe=f.filter(U=>U.predicate===q),Ae=f.filter(U=>U.predicate===ae),pe=Ae.map(U=>[U.subject,U.object]),ie=xe.map(U=>[U.subject,U.object]),fe=d.filter(U=>U.predicate===ce&&K(U)),be=fe.map(U=>[U.subject,U.object]),Ce=fe.length?G(pe.concat(ie),ie,be,{budget:20,focus:new Set([...O,...C])}):[],ue=U=>{let we=Ce.find(Ne=>Ne.subject===U&&C.has(Ne.object));if(!we)return null;let ye=f.filter(Ne=>C.has(Ne.object)&&(Ne.subject===we.viaClass||Ne.subject===we.subject)).sort(p)[0],_e=fe.find(Ne=>Ne.subject===we.viaClass&&Ne.object===we.object||Ne.subject===we.object&&Ne.object===we.viaClass);return!ye||!_e?null:pA(ye,_e)},V=f.filter(U=>O.has(U.subject)&&C.has(U.object)).sort(p)[0],oe=d.filter(U=>U.predicate===Ji&&O.has(U.subject)&&C.has(U.object)).sort(p)[0],Ze=fe.find(U=>O.has(U.subject)&&C.has(U.object)||O.has(U.object)&&C.has(U.subject));if(V&&!oe){let U=ue(V.subject);if(U)return U}let De=by(V,oe||Ze);if(De)return De;if(fe.length){let U=_e=>{let Ne=new Set(_e),Ot=new Set(_e);for(let Oe=0;Oe<8&&Ot.size;Oe+=1){let ve=new Set;for(let[at,Is]of ie)Ot.has(at)&&!Ne.has(Is)&&ve.add(Is);if(!ve.size)break;for(let at of ve)Ne.add(at);Ot=ve}return Ne},we=U(C),ye=Ce.find(_e=>O.has(_e.subject)&&we.has(_e.object)&&!U([_e.viaClass]).has(_e.object)&&!U([_e.object]).has(_e.viaClass));if(ye){let _e=f.filter(ve=>O.has(ve.subject)&&ve.object===ye.viaClass).sort(p)[0],Ne=fe.find(ve=>ve.subject===ye.viaClass&&ve.object===ye.object||ve.subject===ye.object&&ve.object===ye.viaClass),Ot=!C.has(ye.object),Oe=Ot?f.filter(ve=>C.has(ve.subject)&&ve.object===ye.object).sort(p)[0]:null;if(_e&&Ne&&(!Ot||Oe)){let ve=on(w[2]).trim();return{text:`no \u2014 ${[_e,...Oe?[Oe]:[]].map(re).join("; ")}; and ${Pt(Ne)}${Ne.provenance?` (source: ${Pn(Ne.provenance)})`:""} \u2014 so ${L} can never be ${ur(ve)} ${ve}.`,replace:!0}}}}let He=await ri(o,L);if(He){let U=new Map;for(let ye of Ga(o,He.id))for(let _e of Y(l,ye.label))!O.has(_e)&&!U.has(_e)&&U.set(_e,ye.label);let we=f.filter(ye=>U.has(ye.subject)&&C.has(ye.object)).sort(p)[0];if(we)return{text:`yes \u2014 the code graph says ${He.label} inherits ${U.get(we.subject)}, and ${re(we)}`,replace:!0}}let nn=U=>(U.predicate===q?ee:H).find(we=>we.subject===U.subject&&we.object===U.object);for(let U of O){let we=F(U,C,te,se,{maxHops:2});if(!we)continue;let ye=ue(U);if(ye)return ye;let _e=we.map(nn);if(_e.every(Boolean))return{text:`yes \u2014 ${Ua(_e)}`,replace:!0}}let sn=U=>(U.predicate===q?xe:Ae).find(we=>we.subject===U.subject&&we.object===U.object);for(let U of O){let we=F(U,C,pe,ie,{maxHops:2});if(!we)continue;let ye=ue(U);if(ye)return ye;let _e=we.map(sn);if(_e.every(Boolean)&&_e.some(K))return{text:`yes \u2014 ${Ua(_e)}`,replace:!0}}let Kt=L.match(/^(.*\S)\s+not$/i),Mt=Kt&&[Kt[0],r&&os.test(Kt[1].trim())?r:Kt[1]];if(Mt){let U=Y(l,Mt[1]),we=C,ye=f.filter(Oe=>U.has(Oe.subject)&&we.has(Oe.object)).sort(p)[0];if(ye)return{text:`no \u2014 ${re(ye)}`,replace:!0};let _e=fe.find(Oe=>U.has(Oe.subject)&&we.has(Oe.object)||U.has(Oe.object)&&we.has(Oe.subject));if(_e)return{text:`yes \u2014 ${re(_e)}`,replace:!0};let Ne=Mt[1].trim(),Ot=on(w[2]).trim();return{text:`I can't confirm that either way \u2014 nothing I remember links ${Ne} and ${Ot}. If no ${Ne} is a ${Ot}, teach me: "no ${Ne} is a ${Ot}".`,replace:!0,miss:!0}}if(fe.length){let U=G(te.concat(se),se,be,{budget:10});for(let we of O){let ye=U.find(Oe=>Oe.subject===we&&C.has(Oe.object));if(!ye)continue;let _e=H.concat(ee).find(Oe=>Oe.subject===ye.subject&&Oe.object===ye.viaType),Ne=fe.find(Oe=>Oe.subject===ye.viaClass&&Oe.object===ye.object||Oe.subject===ye.object&&Oe.object===ye.viaClass),Ot=[_e,Ne].filter(Boolean).map(re);return{text:`no \u2014 ${Ot.length?Ot.join("; "):`${ye.viaClass} and ${ye.object} are disjoint.`}`,replace:!0}}}let{deriveSomeValuesFromApplication:ai,ON_PROPERTY_PREDICATE:j,SOME_VALUES_FROM_PREDICATE:le,deriveSomeValuesFromSubsumption:Te,ENTAILED_SCM_SVF_PROVENANCE:Mn,SCM_SVF_RULE_CONFIDENCE:mo,entailedTrustFrom:Td}=await Promise.resolve().then(()=>(Gt(),cn)),Ad=d.filter(U=>U.predicate===j&&K(U)),Cd=d.filter(U=>U.predicate===le&&K(U));if(Ad.length&&Cd.length){let U=new Map(Cd.map(ve=>[ve.subject,ve.object])),we=Ad.map(ve=>({restriction:ve.subject,property:ve.object,target:U.get(ve.subject)})).filter(ve=>ve.target),ye=new Set([q,ae,ce,j,le,"owl:intersectionOf"]),_e=d.filter(ve=>K(ve)&&!ye.has(ve.predicate)),Ne=_e.map(ve=>[ve.subject,ve.predicate,ve.object]),Ot=ai(Ne,te,se,we,{budget:10});for(let ve of O){let at=Ot.find(mn=>mn.subject===ve&&C.has(mn.object));if(!at)continue;let Is=_e.find(mn=>mn.subject===at.subject&&mn.predicate===at.viaProperty&&mn.object===at.viaValue),Ls=H.find(mn=>mn.subject===at.viaValue&&mn.object===at.viaType),pr=[Is,Ls].filter(Boolean).map(re);return{text:`yes \u2014 ${pr.length?pr.join("; "):`${at.subject} ${at.viaProperty} ${at.viaValue}, and ${at.viaValue} is a ${at.viaType}.`}`,replace:!0}}let Oe=we.length>1?Te(we,se,{budget:10}):[];if(Oe.length){let ve=se.concat(Oe.map(Se=>[Se.subject,Se.object])),at=new Map(we.map(Se=>[Se.restriction,Se])),Is=new Map;for(let Se of d)Is.set(`${Se.subject}\0${Se.predicate}\0${Se.object}`,Se.trust);let Ls=(Se,$n,Ft)=>Is.get(`${Se}\0${$n}\0${Ft}`),pr=new Map;for(let Se of Oe){let $n=at.get(Se.subject),Ft=at.get(Se.object),Yt=[$n&&Ls(Se.subject,j,$n.property),Ls(Se.subject,le,Se.viaY1),Ft&&Ls(Se.object,j,Ft.property),Ls(Se.object,le,Se.viaY2),Ls(Se.viaY1,q,Se.viaY2)].filter(Hy=>typeof Hy=="number"),li=Td(Yt,mo);li!==null&&pr.set(`${Se.subject}\0${Se.object}`,li)}let mn=Se=>{if(Se.predicate!==q)return H.find(Yt=>Yt.subject===Se.subject&&Yt.object===Se.object);let $n=ee.find(Yt=>Yt.subject===Se.subject&&Yt.object===Se.object);if($n)return $n;let Ft=Oe.find(Yt=>Yt.subject===Se.subject&&Yt.object===Se.object);return Ft?{subject:Ft.subject,predicate:q,object:Ft.object,provenance:Mn,trust:pr.get(`${Ft.subject}\0${Ft.object}`)}:void 0};for(let Se of O){let $n=F(Se,C,te,ve,{maxHops:3});if(!$n)continue;let Ft=$n.map(mn);if(Ft.every(Boolean)){let Yt=Td(Ft.map(li=>li.trust),1);return{text:`yes \u2014 ${Ua(Ft)}`,replace:!0,...Yt!==null?{trust:Yt}:{}}}}}}let Wy=Y(l,L),Od=f.filter(U=>Wy.has(U.subject)).sort(p),Os=L.trim(),ci=on(w[2]).trim(),Gy=[...O].some(U=>F(U,C,te,se,{maxHops:vA}));if(Od.length){let U=Od.slice(0,3).map(re).join("; "),we=Gy?`The facts to settle it are here, but the chain is longer than I follow while answering. Run "/syllogise ${Os}", then ask me again.`:`If it's true, teach me: "${Os} is a kind of ${ci}".`;return{text:`I can't confirm that \u2014 nothing I remember says ${Os} is a ${ci}. I do know: ${U}. ${we}`,replace:!0,miss:!0}}let Id=f.filter(U=>O.has(U.object)&&C.has(U.subject)).sort(p)[0];return Id?{text:`I can't confirm that \u2014 what I know runs the other way: ${re(Id)}. A kind doesn't reverse. If it's true, teach me: "every ${Os} is a ${ci}".`,replace:!0,miss:!0}:!He&&!N&&!WT(Os)&&!d.some(U=>O.has(U.subject)||O.has(U.object))?{text:`I can't confirm that \u2014 I don't know "${Os}" at all yet. If it's true, teach me: "${Os} is a kind of ${ci}".`,replace:!0,miss:!0}:null}let $=c.match(YA);if($){let[,C,L,O]=$,{SUBCLASS_PREDICATE:N,ON_PROPERTY_PREDICATE:F,buildCardinalityRestrictions:G,proveCardinalityAtLeast:q,CARDINALITY_RULE_CONFIDENCE:ae,entailedTrustFrom:ce}=await Promise.resolve().then(()=>(Gt(),cn)),K=lo,ee=f.filter(te=>te.predicate===N&&K(te)).map(te=>[te.subject,te.object]),H=d.filter(te=>(te.predicate===F||ny.has(te.predicate))&&K(te)),se=G(H);if(se.length){let te=Y(l,C.trim()),xe=Y(l,O.trim()),Ae=Number(L),pe=Yw(te,xe,(ie,fe)=>q(ee,se,ie,fe,Ae,{}));if(pe){let ie=d.find(oe=>oe.predicate===N&&oe.subject===pe.viaClass&&oe.object===pe.viaRestriction),fe=ie?.provenance?` (source: ${Pn(ie.provenance)})`:"",be=pe.kind==="exactly"?"exactly":"at least",Ce=(oe,Ze)=>`${oe}${Ze===1?"":"s"}`,ue=[ie?.trust,...H.filter(oe=>oe.subject===pe.viaRestriction).map(oe=>oe.trust),...pe.viaClass!==pe.subject?[f.find(oe=>oe.predicate===N&&oe.subject===pe.subject&&oe.object===pe.viaClass)?.trust]:[]].filter(oe=>typeof oe=="number"),V=ce(ue,ae);return{text:`yes \u2014 every ${pe.viaClass} has ${be} ${pe.n} ${Ce(pe.object,pe.n)}${fe}, so at least ${Ae} follows.`,replace:!0,...V!==null?{trust:V}:{}}}}}let _=c.match(XA);if(_){let[,C,L]=_,{SUBCLASS_PREDICATE:O,ON_PROPERTY_PREDICATE:N,buildCardinalityRestrictions:F,proveMaxCardinalityZeroDenial:G,CAX_MAXC0_RULE_CONFIDENCE:q,entailedTrustFrom:ae}=await Promise.resolve().then(()=>(Gt(),cn)),ce=lo,K=f.filter(se=>se.predicate===O&&ce(se)).map(se=>[se.subject,se.object]),ee=d.filter(se=>(se.predicate===N||ny.has(se.predicate))&&ce(se)),H=F(ee);if(H.length){let se=Y(l,C.trim()),te=Y(l,L.trim()),xe=Yw(se,te,(Ae,pe)=>G(K,H,Ae,pe,{}));if(xe){let Ae=d.find(be=>be.predicate===O&&be.subject===xe.viaClass&&be.object===xe.viaRestriction),pe=Ae?.provenance?` (source: ${Pn(Ae.provenance)})`:"",ie=[Ae?.trust,...ee.filter(be=>be.subject===xe.viaRestriction).map(be=>be.trust),...xe.viaClass!==xe.subject?[f.find(be=>be.predicate===O&&be.subject===xe.subject&&be.object===xe.viaClass)?.trust]:[]].filter(be=>typeof be=="number"),fe=ae(ie,q);return{text:`no \u2014 every ${xe.viaClass} has at most 0 ${xe.object}${pe}.`,replace:!0,...fe!==null?{trust:fe}:{}}}}}let v=c.match(JA);if(v){let C=Y(l,v[1]),L=d.filter(O=>O.predicate===od&&C.has(O.subject)).sort(p);return L.length?m(L):null}let x=u.match(QA);if(x){let[,C,L]=x,O=Y(l,C.trim()),N=Y(l,L.replace(/^an?\s+/i,"").trim()),F=d.filter(G=>G.predicate===od&&N.has(G.subject)&&O.has(G.object)).sort(p)[0];return F?{text:`yes \u2014 ${re(F)}`,replace:!0}:{text:`no \u2014 no remembered fact says ${C.trim().toLowerCase()} owns/maintains ${L.trim()}.`,replace:!0}}let E=u.match(ZA);if(E){let[,C,L]=E,O=Y(l,C.replace(/^an?\s+/i,"").trim()),N=Y(l,L.trim()),F=d.filter(G=>G.predicate===od&&O.has(G.subject)&&N.has(G.object)).sort(p)[0];return F?{text:`yes \u2014 ${re(F)}`,replace:!0}:{text:`no \u2014 no remembered fact says ${C.trim().toLowerCase()} is owned by ${L.trim()}.`,replace:!0}}let S=u.match(eC);if(S){let[,C,L]=S,O=Y(l,C.trim()),N=Y(l,`${L.trim()} method`),F=d.filter(G=>G.predicate===sr&&O.has(G.subject)&&N.has(G.object)).sort(p)[0];return F?{text:`yes \u2014 ${re(F)}`,replace:!0}:null}let R=u.match(tC);if(R){let C=Y(l,R[1].trim()),L=d.filter(O=>O.predicate===sr&&C.has(O.subject)&&/ method$/.test(O.object)).sort(p);return L.length?m(L):null}let k=u.match(sy);if(k){let C=k[1].trim(),L=ry.test(C)||oy.test(C)?null:os.test(C)?r||null:C,O=k[2].trim().toLowerCase();if(L){let N=Y(l,L),F=new Map,G=null;if(o){let H=await ri(o,L);if(G=H,H)for(let se of Ga(o,H.id))for(let te of Y(l,se.label))!N.has(te)&&!F.has(te)&&F.set(te,se.label),N.add(te)}let q=H=>H.predicate===rd&&l(H.object)===O||H.predicate===`tmct:${O}`&&H.object==="true",ae=l(L).split(/\s+/).filter(H=>H.length>=4&&!wy.has(H)),ce=H=>ae.some(se=>new Set(String(H.subject||"").split(/\s+/)).has(se)),K=H=>N.has(H.subject)||ae.length&&ce(H),ee=d.filter(H=>K(H)&&q(H)).sort(p)[0];if(ee){let H=F.get(ee.subject);return{text:H?`yes \u2014 the code graph says ${G.label} inherits ${H}, and ${re(ee)}`:`yes \u2014 ${re(ee)}`,replace:!0}}{let{findIsaChain:H,SUBCLASS_PREDICATE:se,TYPE_PREDICATE:te}=await Promise.resolve().then(()=>(Gt(),cn)),xe=lo,Ae=d.filter(ue=>ue.predicate===se&&xe(ue)),pe=d.filter(ue=>ue.predicate===te&&xe(ue)),ie=Ae.map(ue=>[ue.subject,ue.object]),fe=pe.map(ue=>[ue.subject,ue.object]),be=ue=>(ue.predicate===se?Ae:pe).find(V=>V.subject===ue.subject&&V.object===ue.object),Ce=Y(l,O);for(let ue of N){let V=H(ue,Ce,fe,ie,{maxHops:2});if(!V)continue;let oe=V.map(be);if(oe.every(Boolean))return{text:`yes \u2014 ${Ua(oe)}`,replace:!0}}}if(d.some(K)&&!n?.parsed)return{text:`I don't have a fact saying ${mA(L)} is ${O}.`,replace:!0};if(!n?.parsed&&!Hw.test(O))return iy(L,O)}}let A=vd(c).match(ZT);if(A&&!ld.test(c)){let[,C,L,O]=A,N=L.toLowerCase();if(!cd.test(N)&&!dd.test(N)){let F=C.trim(),G=nA(await ud(N),O),q=G.object.replace(/^an?\s+/i,"").trim();if(F&&q){let ae=G.predicate,ce=Y(l,F),K=Y(l,q),ee=[ae,Wo(ae)],H=d.filter(te=>ee.includes(te.predicate)&&ce.has(te.subject)&&K.has(te.object)).sort(p)[0];if(H)return{text:`${nh(H.predicate)?"no":"yes"} \u2014 ${re(H)}`,replace:!0,generalVerbQuery:!0};let se=d.filter(te=>ee.includes(te.predicate)&&ce.has(te.subject));if(se.length){let te=se.slice(0,3).map(re).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${Pt({subject:F,predicate:ae,object:q})}. I do know: ${te}.`,replace:!0,miss:!0}}return null}}}let P=c.match(eA);if(P&&!ld.test(c)){let[,C,L]=P,[O,N]=L.toLowerCase().split(/\s+/);if(!cd.test(O)&&!dd.test(O)){let F=C.trim();if(F){let G=await ud(O);N&&/^mgx:[a-z]+$/.test(G)&&(G=`${G}-${N}`);let q=Y(l,F),ae=[G,Wo(G)],ce=Qe(d.filter(K=>ae.includes(K.predicate)&&q.has(K.subject)),i);if(ce.length)return{...m(ce),generalVerbQuery:!0}}}}let T=c.match(/^(?:what|who)\s+([a-z]+)\s+(on|in|at|onto|upon|under|over|beside|near|behind|above|below|inside|outside)\s+(.+?)[?.!\s]*$/i);if(T&&!ld.test(c)){let[,C,L,O]=T,N=C.toLowerCase();if(!cd.test(N)&&!dd.test(N)&&!QT.test(N)){let F=await ud(N);/^mgx:[a-z]+$/.test(F)&&(F=`${F}-${L.toLowerCase()}`);let G=Y(l,O.replace(/^(?:an?|the)\s+/i,"").trim()),q=Qe(d.filter(ae=>ae.predicate===F&&G.has(ae.object)),i);if(q.length)return{...m(q),generalVerbQuery:!0}}}let M=c.match(qA);if(M){let C=Y(l,M[1]),L=Qe(d.filter(ae=>C.has(ae.subject)||C.has(ae.object)),i);if(!L.length)return null;let O=C.has(L[0].subject)?L[0].subject:L[0].object,N=L.map(ae=>` ${re(ae)}`),F=N.slice(0,je),G=N.slice(je),q=G.length?`
225
- \u2026and ${G.length} more \u2014 say 'more' to see them.`:"";return{text:`${L.length} remembered fact${L.length===1?"":"s"} about ${O}:
223
+ `)+H,replace:!0,...G.length?{pending:{items:G,noun:"facts"}}:{}}}}}let b=u.match(XA);if(b){let I=Od(b[1].trim().toLowerCase()),L=b[2].trim(),C=rs.test(L)?r||null:L;if(C){let{loadMemory:N,findRuleByName:F,RULE_KIND_PROP:G,RULE_KIND_RECURSIVE:H}=await Promise.resolve().then(()=>(Be(),As)),ae=await N(e),ce=F(ae,I),K=ce?.attributes?.find(ee=>ee.prop===G)?.value;if(ce&&K===H){let ee=ce.attributes.find(te=>te.prop==="mgx:ruleBaseCase")?.value,q=ce.attributes.find(te=>te.prop==="mgx:ruleRecStep")?.value,se=l(C);if(ee&&q&&se){let te=md(d),{findIsaChain:xe}=await Promise.resolve().then(()=>(Vt(),cn)),Ae=Ie=>{let ue=String(Ie||"").trim().toLowerCase(),V=[];for(let oe of d){let Ze=$d(oe.predicate);if(!Ze)continue;if(Ze===ue){V.push({fact:oe,aliasFacts:[]});continue}let De=hd(xe,Ze,new Set([ue]),te,{maxHops:2});if(!De)continue;let Ve=De.map(nn=>d.find(sn=>sn.predicate===ui&&sn.subject===nn.subject&&sn.object===nn.object));Ve.every(Boolean)&&V.push({fact:oe,aliasFacts:Ve})}return V},{findReachableSet:pe}=await Promise.resolve().then(()=>(ms(),ki)),be=pe({entity:se,hop:0},Ie=>{let ue=Ie.hop===0?ee:q;return Ae(ue).filter(V=>V.fact.subject===Ie.entity).map(V=>({action:V,nextState:{entity:V.fact.object,hop:Ie.hop+1}}))},{maxDepth:20,stateKey:Ie=>Ie.entity});if(be.length)return{text:be.map(({node:ue,path:V})=>{let oe=new Set,Ze=[];for(let De of V.actions){Ze.push(re(De.fact));for(let Ve of De.aliasFacts){let nn=Ve.id||`${Ve.subject}|${Ve.predicate}|${Ve.object}`;oe.has(nn)||(oe.add(nn),Ze.push(`${Pt(Ve)}${Ve.provenance?` (source: ${Mn(Ve.provenance)})`:""}`))}}return`${ue.entity} \u2014 ${Ze.join("; ")}`}).join(`
224
+ `),replace:!0}}}return null}}let y=c.match(uy),w=c.match(Ns)||jd(c)||y&&`is ${y[1].trim()} a ${y[2].trim()}`.match(Ns);if(w){let I=Y(l,on(w[2])),L=r&&rs.test(w[1].trim())?r:w[1],C=new Set(Y(l,L));if([...C].some(B=>I.has(B))){let B=on(w[2]).trim();return{text:`yes \u2014 ${dr(B)} ${B} is ${dr(B)} ${B}, trivially: every kind is a kind of itself.`,replace:!0}}let N=await LI(o,L);if(N)for(let B of Y(l,N))C.add(B);let{findIsaChain:F,deriveDisjointViolations:G,SUBCLASS_PREDICATE:H,TYPE_PREDICATE:ae,DISJOINT_PREDICATE:ce}=await Promise.resolve().then(()=>(Vt(),cn)),K=mo,ee=f.filter(B=>B.predicate===H&&K(B)),q=f.filter(B=>B.predicate===ae&&K(B)),se=ee.map(B=>[B.subject,B.object]),te=q.map(B=>[B.subject,B.object]),xe=f.filter(B=>B.predicate===H),Ae=f.filter(B=>B.predicate===ae),pe=Ae.map(B=>[B.subject,B.object]),ie=xe.map(B=>[B.subject,B.object]),fe=d.filter(B=>B.predicate===ce&&K(B)),be=fe.map(B=>[B.subject,B.object]),Ie=fe.length?G(pe.concat(ie),ie,be,{budget:20,focus:new Set([...C,...I])}):[],ue=B=>{let we=Ie.find(Ne=>Ne.subject===B&&I.has(Ne.object));if(!we)return null;let ye=f.filter(Ne=>I.has(Ne.object)&&(Ne.subject===we.viaClass||Ne.subject===we.subject)).sort(p)[0],_e=fe.find(Ne=>Ne.subject===we.viaClass&&Ne.object===we.object||Ne.subject===we.object&&Ne.object===we.viaClass);return!ye||!_e?null:WA(ye,_e)},V=f.filter(B=>C.has(B.subject)&&I.has(B.object)).sort(p)[0],oe=d.filter(B=>B.predicate===na&&C.has(B.subject)&&I.has(B.object)).sort(p)[0],Ze=fe.find(B=>C.has(B.subject)&&I.has(B.object)||C.has(B.object)&&I.has(B.subject));if(V&&!oe){let B=ue(V.subject);if(B)return B}let De=Iy(V,oe||Ze);if(De)return De;if(fe.length){let B=_e=>{let Ne=new Set(_e),Ot=new Set(_e);for(let Ce=0;Ce<8&&Ot.size;Ce+=1){let $e=new Set;for(let[at,Ps]of ie)Ot.has(at)&&!Ne.has(Ps)&&$e.add(Ps);if(!$e.size)break;for(let at of $e)Ne.add(at);Ot=$e}return Ne},we=B(I),ye=Ie.find(_e=>C.has(_e.subject)&&we.has(_e.object)&&!B([_e.viaClass]).has(_e.object)&&!B([_e.object]).has(_e.viaClass));if(ye){let _e=f.filter($e=>C.has($e.subject)&&$e.object===ye.viaClass).sort(p)[0],Ne=fe.find($e=>$e.subject===ye.viaClass&&$e.object===ye.object||$e.subject===ye.object&&$e.object===ye.viaClass),Ot=!I.has(ye.object),Ce=Ot?f.filter($e=>I.has($e.subject)&&$e.object===ye.object).sort(p)[0]:null;if(_e&&Ne&&(!Ot||Ce)){let $e=on(w[2]).trim();return{text:`no \u2014 ${[_e,...Ce?[Ce]:[]].map(re).join("; ")}; and ${Pt(Ne)}${Ne.provenance?` (source: ${Mn(Ne.provenance)})`:""} \u2014 so ${L} can never be ${dr($e)} ${$e}.`,replace:!0}}}}let Ve=await li(o,L);if(Ve){let B=new Map;for(let ye of Ja(o,Ve.id))for(let _e of Y(l,ye.label))!C.has(_e)&&!B.has(_e)&&B.set(_e,ye.label);let we=f.filter(ye=>B.has(ye.subject)&&I.has(ye.object)).sort(p)[0];if(we)return{text:`yes \u2014 the code graph says ${Ve.label} inherits ${B.get(we.subject)}, and ${re(we)}`,replace:!0}}let nn=B=>(B.predicate===H?ee:q).find(we=>we.subject===B.subject&&we.object===B.object);for(let B of C){let we=F(B,I,te,se,{maxHops:2});if(!we)continue;let ye=ue(B);if(ye)return ye;let _e=we.map(nn);if(_e.every(Boolean))return{text:`yes \u2014 ${Ya(_e)}`,replace:!0}}let sn=B=>(B.predicate===H?xe:Ae).find(we=>we.subject===B.subject&&we.object===B.object);for(let B of C){let we=F(B,I,pe,ie,{maxHops:2});if(!we)continue;let ye=ue(B);if(ye)return ye;let _e=we.map(sn);if(_e.every(Boolean)&&_e.some(K))return{text:`yes \u2014 ${Ya(_e)}`,replace:!0}}let Yt=L.match(/^(.*\S)\s+not$/i),Ft=Yt&&[Yt[0],r&&rs.test(Yt[1].trim())?r:Yt[1]];if(Ft){let B=Y(l,Ft[1]),we=I,ye=f.filter(Ce=>B.has(Ce.subject)&&we.has(Ce.object)).sort(p)[0];if(ye)return{text:`no \u2014 ${re(ye)}`,replace:!0};let _e=fe.find(Ce=>B.has(Ce.subject)&&we.has(Ce.object)||B.has(Ce.object)&&we.has(Ce.subject));if(_e)return{text:`yes \u2014 ${re(_e)}`,replace:!0};let Ne=Ft[1].trim(),Ot=on(w[2]).trim();return{text:`I can't confirm that either way \u2014 nothing I remember links ${Ne} and ${Ot}. If no ${Ne} is a ${Ot}, teach me: "no ${Ne} is a ${Ot}".`,replace:!0,miss:!0}}if(fe.length){let B=G(te.concat(se),se,be,{budget:10});for(let we of C){let ye=B.find(Ce=>Ce.subject===we&&I.has(Ce.object));if(!ye)continue;let _e=q.concat(ee).find(Ce=>Ce.subject===ye.subject&&Ce.object===ye.viaType),Ne=fe.find(Ce=>Ce.subject===ye.viaClass&&Ce.object===ye.object||Ce.subject===ye.object&&Ce.object===ye.viaClass),Ot=[_e,Ne].filter(Boolean).map(re);return{text:`no \u2014 ${Ot.length?Ot.join("; "):`${ye.viaClass} and ${ye.object} are disjoint.`}`,replace:!0}}}let{deriveSomeValuesFromApplication:di,ON_PROPERTY_PREDICATE:j,SOME_VALUES_FROM_PREDICATE:le,deriveSomeValuesFromSubsumption:Te,ENTAILED_SCM_SVF_PROVENANCE:Pn,SCM_SVF_RULE_CONFIDENCE:wo,entailedTrustFrom:Pd}=await Promise.resolve().then(()=>(Vt(),cn)),Fd=d.filter(B=>B.predicate===j&&K(B)),Dd=d.filter(B=>B.predicate===le&&K(B));if(Fd.length&&Dd.length){let B=new Map(Dd.map($e=>[$e.subject,$e.object])),we=Fd.map($e=>({restriction:$e.subject,property:$e.object,target:B.get($e.subject)})).filter($e=>$e.target),ye=new Set([H,ae,ce,j,le,"owl:intersectionOf"]),_e=d.filter($e=>K($e)&&!ye.has($e.predicate)),Ne=_e.map($e=>[$e.subject,$e.predicate,$e.object]),Ot=di(Ne,te,se,we,{budget:10});for(let $e of C){let at=Ot.find(mn=>mn.subject===$e&&I.has(mn.object));if(!at)continue;let Ps=_e.find(mn=>mn.subject===at.subject&&mn.predicate===at.viaProperty&&mn.object===at.viaValue),Fs=q.find(mn=>mn.subject===at.viaValue&&mn.object===at.viaType),fr=[Ps,Fs].filter(Boolean).map(re);return{text:`yes \u2014 ${fr.length?fr.join("; "):`${at.subject} ${at.viaProperty} ${at.viaValue}, and ${at.viaValue} is a ${at.viaType}.`}`,replace:!0}}let Ce=we.length>1?Te(we,se,{budget:10}):[];if(Ce.length){let $e=se.concat(Ce.map(Se=>[Se.subject,Se.object])),at=new Map(we.map(Se=>[Se.restriction,Se])),Ps=new Map;for(let Se of d)Ps.set(`${Se.subject}\0${Se.predicate}\0${Se.object}`,Se.trust);let Fs=(Se,vn,Dt)=>Ps.get(`${Se}\0${vn}\0${Dt}`),fr=new Map;for(let Se of Ce){let vn=at.get(Se.subject),Dt=at.get(Se.object),Xt=[vn&&Fs(Se.subject,j,vn.property),Fs(Se.subject,le,Se.viaY1),Dt&&Fs(Se.object,j,Dt.property),Fs(Se.object,le,Se.viaY2),Fs(Se.viaY1,H,Se.viaY2)].filter(r$=>typeof r$=="number"),fi=Pd(Xt,wo);fi!==null&&fr.set(`${Se.subject}\0${Se.object}`,fi)}let mn=Se=>{if(Se.predicate!==H)return q.find(Xt=>Xt.subject===Se.subject&&Xt.object===Se.object);let vn=ee.find(Xt=>Xt.subject===Se.subject&&Xt.object===Se.object);if(vn)return vn;let Dt=Ce.find(Xt=>Xt.subject===Se.subject&&Xt.object===Se.object);return Dt?{subject:Dt.subject,predicate:H,object:Dt.object,provenance:Pn,trust:fr.get(`${Dt.subject}\0${Dt.object}`)}:void 0};for(let Se of C){let vn=F(Se,I,te,$e,{maxHops:3});if(!vn)continue;let Dt=vn.map(mn);if(Dt.every(Boolean)){let Xt=Pd(Dt.map(fi=>fi.trust),1);return{text:`yes \u2014 ${Ya(Dt)}`,replace:!0,...Xt!==null?{trust:Xt}:{}}}}}}let s$=Y(l,L),zd=f.filter(B=>s$.has(B.subject)).sort(p),Ms=L.trim(),pi=on(w[2]).trim(),o$=[...C].some(B=>F(B,I,te,se,{maxHops:JA}));if(zd.length){let B=zd.slice(0,3).map(re).join("; "),we=o$?`The facts to settle it are here, but the chain is longer than I follow while answering. Run "/syllogise ${Ms}", then ask me again.`:`If it's true, teach me: "${Ms} is a kind of ${pi}".`;return{text:`I can't confirm that \u2014 nothing I remember says ${Ms} is a ${pi}. I do know: ${B}. ${we}`,replace:!0,miss:!0}}let Ud=f.filter(B=>C.has(B.object)&&I.has(B.subject)).sort(p)[0];return Ud?{text:`I can't confirm that \u2014 what I know runs the other way: ${re(Ud)}. A kind doesn't reverse. If it's true, teach me: "every ${Ms} is a ${pi}".`,replace:!0,miss:!0}:!Ve&&!N&&!$A(Ms)&&!d.some(B=>C.has(B.subject)||C.has(B.object))?{text:`I can't confirm that \u2014 I don't know "${Ms}" at all yet. If it's true, teach me: "${Ms} is a kind of ${pi}".`,replace:!0,miss:!0}:null}let v=c.match(jI);if(v){let[,I,L,C]=v,{SUBCLASS_PREDICATE:N,ON_PROPERTY_PREDICATE:F,buildCardinalityRestrictions:G,proveCardinalityAtLeast:H,CARDINALITY_RULE_CONFIDENCE:ae,entailedTrustFrom:ce}=await Promise.resolve().then(()=>(Vt(),cn)),K=mo,ee=f.filter(te=>te.predicate===N&&K(te)).map(te=>[te.subject,te.object]),q=d.filter(te=>(te.predicate===F||gy.has(te.predicate))&&K(te)),se=G(q);if(se.length){let te=Y(l,I.trim()),xe=Y(l,C.trim()),Ae=Number(L),pe=ly(te,xe,(ie,fe)=>H(ee,se,ie,fe,Ae,{}));if(pe){let ie=d.find(oe=>oe.predicate===N&&oe.subject===pe.viaClass&&oe.object===pe.viaRestriction),fe=ie?.provenance?` (source: ${Mn(ie.provenance)})`:"",be=pe.kind==="exactly"?"exactly":"at least",Ie=(oe,Ze)=>`${oe}${Ze===1?"":"s"}`,ue=[ie?.trust,...q.filter(oe=>oe.subject===pe.viaRestriction).map(oe=>oe.trust),...pe.viaClass!==pe.subject?[f.find(oe=>oe.predicate===N&&oe.subject===pe.subject&&oe.object===pe.viaClass)?.trust]:[]].filter(oe=>typeof oe=="number"),V=ce(ue,ae);return{text:`yes \u2014 every ${pe.viaClass} has ${be} ${pe.n} ${Ie(pe.object,pe.n)}${fe}, so at least ${Ae} follows.`,replace:!0,...V!==null?{trust:V}:{}}}}}let _=c.match(_I);if(_){let[,I,L]=_,{SUBCLASS_PREDICATE:C,ON_PROPERTY_PREDICATE:N,buildCardinalityRestrictions:F,proveMaxCardinalityZeroDenial:G,CAX_MAXC0_RULE_CONFIDENCE:H,entailedTrustFrom:ae}=await Promise.resolve().then(()=>(Vt(),cn)),ce=mo,K=f.filter(se=>se.predicate===C&&ce(se)).map(se=>[se.subject,se.object]),ee=d.filter(se=>(se.predicate===N||gy.has(se.predicate))&&ce(se)),q=F(ee);if(q.length){let se=Y(l,I.trim()),te=Y(l,L.trim()),xe=ly(se,te,(Ae,pe)=>G(K,q,Ae,pe,{}));if(xe){let Ae=d.find(be=>be.predicate===C&&be.subject===xe.viaClass&&be.object===xe.viaRestriction),pe=Ae?.provenance?` (source: ${Mn(Ae.provenance)})`:"",ie=[Ae?.trust,...ee.filter(be=>be.subject===xe.viaRestriction).map(be=>be.trust),...xe.viaClass!==xe.subject?[f.find(be=>be.predicate===C&&be.subject===xe.subject&&be.object===xe.viaClass)?.trust]:[]].filter(be=>typeof be=="number"),fe=ae(ie,H);return{text:`no \u2014 every ${xe.viaClass} has at most 0 ${xe.object}${pe}.`,replace:!0,...fe!==null?{trust:fe}:{}}}}}let $=c.match(RI);if($){let I=Y(l,$[1]),L=d.filter(C=>C.predicate===pd&&I.has(C.subject)).sort(p);return L.length?m(L):null}let x=u.match(TI);if(x){let[,I,L]=x,C=Y(l,I.trim()),N=Y(l,L.replace(/^an?\s+/i,"").trim()),F=d.filter(G=>G.predicate===pd&&N.has(G.subject)&&C.has(G.object)).sort(p)[0];return F?{text:`yes \u2014 ${re(F)}`,replace:!0}:{text:`no \u2014 no remembered fact says ${I.trim().toLowerCase()} owns/maintains ${L.trim()}.`,replace:!0}}let E=u.match(AI);if(E){let[,I,L]=E,C=Y(l,I.replace(/^an?\s+/i,"").trim()),N=Y(l,L.trim()),F=d.filter(G=>G.predicate===pd&&C.has(G.subject)&&N.has(G.object)).sort(p)[0];return F?{text:`yes \u2014 ${re(F)}`,replace:!0}:{text:`no \u2014 no remembered fact says ${I.trim().toLowerCase()} is owned by ${L.trim()}.`,replace:!0}}let S=u.match(II);if(S){let[,I,L]=S,C=Y(l,I.trim()),N=Y(l,`${L.trim()} method`),F=d.filter(G=>G.predicate===ir&&C.has(G.subject)&&N.has(G.object)).sort(p)[0];return F?{text:`yes \u2014 ${re(F)}`,replace:!0}:null}let R=u.match(CI);if(R){let I=Y(l,R[1].trim()),L=d.filter(C=>C.predicate===ir&&I.has(C.subject)&&/ method$/.test(C.object)).sort(p);return L.length?m(L):null}let k=u.match(by);if(k){let I=k[1].trim(),L=yy.test(I)||wy.test(I)?null:rs.test(I)?r||null:I,C=k[2].trim().toLowerCase();if(L){let N=Y(l,L),F=new Map,G=null;if(o){let q=await li(o,L);if(G=q,q)for(let se of Ja(o,q.id))for(let te of Y(l,se.label))!N.has(te)&&!F.has(te)&&F.set(te,se.label),N.add(te)}let H=q=>q.predicate===fd&&l(q.object)===C||q.predicate===`tmct:${C}`&&q.object==="true",ae=l(L).split(/\s+/).filter(q=>q.length>=4&&!Cy.has(q)),ce=q=>ae.some(se=>new Set(String(q.subject||"").split(/\s+/)).has(se)),K=q=>N.has(q.subject)||ae.length&&ce(q),ee=d.filter(q=>K(q)&&H(q)).sort(p)[0];if(ee){let q=F.get(ee.subject);return{text:q?`yes \u2014 the code graph says ${G.label} inherits ${q}, and ${re(ee)}`:`yes \u2014 ${re(ee)}`,replace:!0}}{let{findIsaChain:q,SUBCLASS_PREDICATE:se,TYPE_PREDICATE:te}=await Promise.resolve().then(()=>(Vt(),cn)),xe=mo,Ae=d.filter(ue=>ue.predicate===se&&xe(ue)),pe=d.filter(ue=>ue.predicate===te&&xe(ue)),ie=Ae.map(ue=>[ue.subject,ue.object]),fe=pe.map(ue=>[ue.subject,ue.object]),be=ue=>(ue.predicate===se?Ae:pe).find(V=>V.subject===ue.subject&&V.object===ue.object),Ie=Y(l,C);for(let ue of N){let V=q(ue,Ie,fe,ie,{maxHops:2});if(!V)continue;let oe=V.map(be);if(oe.every(Boolean))return{text:`yes \u2014 ${Ya(oe)}`,replace:!0}}}if(d.some(K)&&!n?.parsed)return{text:`I don't have a fact saying ${qA(L)} is ${C}.`,replace:!0};if(!n?.parsed&&!ry.test(C))return $y(L,C)}}let A=Rd(c).match(AA);if(A&&!bd.test(c)){let[,I,L,C]=A,N=L.toLowerCase();if(!gd.test(N)&&!yd.test(N)){let F=I.trim(),G=OA(await wd(N),C),H=G.object.replace(/^an?\s+/i,"").trim();if(F&&H){let ae=G.predicate,ce=Y(l,F),K=Y(l,H),ee=[ae,Ho(ae)],q=d.filter(te=>ee.includes(te.predicate)&&ce.has(te.subject)&&K.has(te.object)).sort(p)[0];if(q)return{text:`${uh(q.predicate)?"no":"yes"} \u2014 ${re(q)}`,replace:!0,generalVerbQuery:!0};let se=d.filter(te=>ee.includes(te.predicate)&&ce.has(te.subject));if(se.length){let te=se.slice(0,3).map(re).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${Pt({subject:F,predicate:ae,object:H})}. I do know: ${te}.`,replace:!0,miss:!0}}return null}}}let M=c.match(IA);if(M&&!bd.test(c)){let[,I,L]=M,[C,N]=L.toLowerCase().split(/\s+/);if(!gd.test(C)&&!yd.test(C)){let F=I.trim();if(F){let G=await wd(C);N&&/^mgx:[a-z]+$/.test(G)&&(G=`${G}-${N}`);let H=Y(l,F),ae=[G,Ho(G)],ce=Qe(d.filter(K=>ae.includes(K.predicate)&&H.has(K.subject)),i);if(ce.length)return{...m(ce),generalVerbQuery:!0}}}}let T=c.match(/^(?:what|who)\s+([a-z]+)\s+(on|in|at|onto|upon|under|over|beside|near|behind|above|below|inside|outside)\s+(.+?)[?.!\s]*$/i);if(T&&!bd.test(c)){let[,I,L,C]=T,N=I.toLowerCase();if(!gd.test(N)&&!yd.test(N)&&!TA.test(N)){let F=await wd(N);/^mgx:[a-z]+$/.test(F)&&(F=`${F}-${L.toLowerCase()}`);let G=Y(l,C.replace(/^(?:an?|the)\s+/i,"").trim()),H=Qe(d.filter(ae=>ae.predicate===F&&G.has(ae.object)),i);if(H.length)return{...m(H),generalVerbQuery:!0}}}let P=c.match(SI);if(P){let I=Y(l,P[1]),L=Qe(d.filter(ae=>I.has(ae.subject)||I.has(ae.object)),i);if(!L.length)return null;let C=I.has(L[0].subject)?L[0].subject:L[0].object,N=L.map(ae=>` ${re(ae)}`),F=N.slice(0,je),G=N.slice(je),H=G.length?`
225
+ \u2026and ${G.length} more \u2014 say 'more' to see them.`:"";return{text:`${L.length} remembered fact${L.length===1?"":"s"} about ${C}:
226
226
  ${F.join(`
227
- `)}${q}`,replace:!0,...G.length?{pending:{items:G.map(ae=>ae.trim()),noun:"facts"}}:{}}}let B=n?.parsed?.shape==="meta"?n.parsed.object:null,Z=!1,J=c.match(KA);if(J)B=J[1],Z=!0;else if(!B&&!n?.parsed){let C=c.match(/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i);C&&(B=C[1])}if(!B)return null;let ne=Y(l,B),D=Qe(f.filter(C=>ne.has(C.subject)),i),z=Qe(f.filter(C=>ne.has(C.object)),i),W=Z?D.length?D:z:z.length?z:D;return W.length?m(W):null}function md(e){let t=e.sourceTypes||[];return t.length===0||t.some(n=>n!=="corpusWeak")}var xd,WT,fn,Ba,Uw,ay,bH,Ww,GT,wH,yH,cy,ly,uy,HT,Gw,vH,$H,xH,EH,SH,Sd,kH,VT,Ye,od,rd,ii,qT,lo,jH,_H,RH,TH,AH,CH,OH,IH,LH,NH,PH,MH,FH,DH,zH,Hw,XT,qa,JT,BH,UH,jd,dy,WH,GH,HH,cd,ld,QT,VH,ZT,eA,dd,tA,sA,qH,py,fy,oA,KH,YH,XH,JH,dr,QH,ZH,eV,my,tV,nV,rA,sV,oV,rV,uo,Vw,_d,Pt,aA,lA,uA,Wa,hA,wy,iV,bd,yy,gA,bA,Va,wA,yA,Cs,rs,vA,$A,xA,yd,Xw,EA,je,SA,kA,jA,_A,RA,TA,AA,CA,OA,IA,LA,NA,PA,Qw,$y,FA,DA,BA,UA,WA,GA,ty,HA,qA,KA,YA,XA,ny,JA,QA,ZA,eC,tC,sy,os,oy,ry,iy,nC,oC,rC,aV,ky,aC,cV,hd,$d,cC,lV,uV,jy,dV,pV,fV,mV,hV,Ka,gV,bV,wV,yV,lC,vV,$V,za=I(()=>{Be();Cb();Dt();Ie();ws();_a();Ra();vr();Nu();Lb();Ke();ea();Mu();Mb();Bn();jn();Ao();Ii();Ou();Iu();_o();ro();Cc();Aa();Ub();Wb();Bu();Gb();Uu();Hb();Vb();Na();Eu();td();xw();cr();Mw();Li(void 0);Oi(ja);xd=new Set(["it","this","that","here"]),WT=e=>xd.has(String(e||"").trim().toLowerCase()),fn={imports:"understand a dependency/import relationship",uses:"understand a dependency/usage relationship (imports and/or calls)",calls:"understand a call relationship",callsSymbol:"understand a call relationship",defines:"locate what a module/class defines",contains:"understand class membership (methods/attributes)",tests:"assess test coverage",inherits:"understand a class hierarchy/inheritance relationship",touches:"understand commit/change history",touchesSymbol:"understand commit/change history",cochange:"understand change-coupling between modules",reexports:"understand a module's public exports/API surface",serves:"understand which component provides or backs another",denotes:"understand which vocabulary term names a code entity"},Ba=e=>e?`${String(e).toLowerCase()}(s)`:"entities",Uw="look up a taught fact about a subject/verb/object";ay={find:{tool:"tmct_search",arg:"query",help:"lexical search across the graph"},search:{tool:"tmct_search",arg:"query",help:"alias of /find"},context:{tool:"tmct_context",arg:"symbol",help:"the sized edit bundle for a symbol (start here to change code)"},snippet:{tool:"tmct_snippet",arg:"symbol",help:"exact source of one function/class/method"},describe:{tool:"tmct_describe",arg:"symbol",help:"a symbol's definition, kind and relations"},signature:{tool:"tmct_signature",arg:"symbol",help:"a symbol's signature only"},members:{tool:"tmct_members",arg:"class",help:"the methods/attributes of a class"},subclasses:{tool:"tmct_subclasses",arg:"class",help:"the subclasses of a class"},impact:{tool:"tmct_impact",arg:"module",help:"what a change to this module or symbol reaches (impact closure)"},callers:{tool:"tmct_callers",arg:"symbol",help:"functions that call this symbol"},callees:{tool:"tmct_callees",arg:"symbol",help:"functions this symbol calls"},tests:{tool:"tmct_tests_for",arg:"symbol",help:"the tests covering this symbol"},untested:{tool:"tmct_untested",arg:null,help:"symbols with no covering test"},history:{tool:"tmct_history",arg:"symbol",help:"the commit history of this symbol"},exports:{tool:"tmct_exports",arg:"module",help:"a module's public exports"},arch:{tool:"tmct_architecture",arg:"package",help:"the architecture overview (optional package filter)",optional:!0}},bH=new Set(["stats","memory","focus",...Object.keys(ay)]),Ww={Class:["class","classes"],Function:["function","functions"],Module:["module","modules"],Package:["package","packages"],Method:["method","methods"],Attribute:["attribute","attributes"],GlobalVariable:["variable","variables"],Commit:["commit","commits"],Session:["session","sessions"]},GT=new Set(["have","has","holds","hold"]),wH=new RegExp(`\\b(?:${[...Object.keys(de),...Object.keys(as)].filter(e=>!GT.has(e)).sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})\\b`,"i"),yH=new Set([...Ab.map(e=>e.name),...Object.values(ay).map(e=>e.tool)]),cy=new Set(["hi","hello","hey","yo","hiya","howdy","sup","greetings","g'day","gday","hey there","hi there","hello there","good morning","good afternoon","good evening","morning","alright","you alright","alright mate","morning all","yeah nah","hey y'all","howdy there","hiya there","good day","good day to you","salutations","good to meet you","pleased to meet you","yo yo","ayy","wassup","sup fam","heya","hiya!","gm","ge"]),ly=new Set(["thanks","thank you","thankyou","thx","ty","ta","cheers","nice one","much appreciated","cool thanks","many thanks","much obliged","ta very much","cheers mate","cheers for that","tks","sweet thanks","nice","brilliant","ta for that","cheers, that's everything for now, thanks","that's everything for now, thanks","that's all for now, thanks"]),uy=new Set(["bye","goodbye","quit","exit","see ya","see you","cya","later","farewell","peace","peace out","im off","i'm off","gtg","gotta go","catch you later","farewell then"]),HT=new Set(["ok","okay","cool","aight","fair enough","got it","gotcha","noted","sounds good","sure","cool cool","right","haha ok fair enough"]),Gw=e=>e.replace(/(.)\1+/g,"$1");vH=Ed(cy),$H=Ed(ly),xH=Ed(uy),EH=new RegExp(`^(?:${[...HT].map(Je).join("|")})\\s+(.+)$`,"i"),SH=[...cy,...ly,...uy,"what can you do","what do you do","help","how do you work","who are you","what are you","what is your name"],Sd="(?:[a-z]+er|better|worse|(?:more|less)\\s+[a-z]+)",kH=new RegExp(`^(?:the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(?:is|are)\\s+(${Sd})\\s+than\\s+(.+)$`,"i"),VT=new RegExp(`^(?:is|are)\\s+(.+?)\\s+(${Sd})\\s+than\\s+(.+?)[?.!\\s]*$`,"i"),Ye="on|in|at|onto|upon|under|over|beside|near|behind|above|below|inside|outside",od="mgx:ownedBy",rd="mgx:hasProperty",ii="rdfs:subClassOf",qT=new Set(["operator","teach","entailed"]),lo=e=>!!e.sourceTypes?.some(t=>qT.has(t));jH=new RegExp(`^you\\s+(?:can|may)\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Ye})\\s+an?\\s+([a-z][\\w-]*)[.!?]*$`,"i"),_H=new RegExp(`^an?\\s+([a-z][\\w-]*)\\s+(?:can|may)\\s+be\\s+([a-z]+)\\s+(${Ye})\\s+an?\\s+([a-z][\\w-]*)[.!?]*$`,"i"),RH=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Ye})\\s+an?\\s+([a-z][\\w-]*)\\s*,?\\s*nothing\\s+may\\s+([a-z]+)\\s+(${Ye})\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),TH=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Ye})\\s+an?\\s+([a-z][\\w-]*)\\s*,?\\s*the\\s+([a-z][\\w-]*)\\s+must\\s+be\\s+(${Sd})\\s+than\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),AH=new RegExp(`^([a-z]+ing)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Ye})\\s+an?\\s+([a-z][\\w-]*)\\s+makes\\s+(?:it|the\\s+([a-z][\\w-]*))\\s+([a-z]+)\\s+(${Ye})\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),CH=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Ye})\\s+an?\\s+([a-z][\\w-]*)\\s*,?\\s*the\\s+([a-z][\\w-]*)\\s+may\\s+not\\s+be\\s+with\\s+the\\s+([a-z][\\w-]*)\\s+without\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i");OH=new RegExp(`^the\\s+goal\\s+is\\s+that\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+([a-z]+s)\\s+(${Ye})\\s+([\\w-]+)[.!?]*$`,"i"),IH=new RegExp(`^(?:the\\s+goal\\s+is\\s+for|i\\s+want)\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+to\\s+([a-z]+)\\s+(${Ye})\\s+([\\w-]+)[.!?]*$`,"i"),LH=new RegExp(`^(?:the\\s+goal\\s+is\\s+for|i\\s+want)\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+(${Ye})\\s+([\\w-]+)[.!?]*$`,"i"),NH=new RegExp(`^(?:can|could)\\s+you\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Ye})\\s+an?\\s+([a-z][\\w-]*)[?.!]*$`,"i"),PH=new RegExp(`^(?:get|put|place|stack)\\s+(?:(every|each|all|both)\\s+)?(?:the\\s+)?([\\w-]+?)\\s+(${Ye})\\s+([\\w-]+)[?.!]*$`,"i"),MH=new RegExp(`^the\\s+goal\\s+is\\s+(?:(every|each|all|both)\\s+)?(?:the\\s+)?([\\w-]+?)\\s+(${Ye})\\s+([\\w-]+)[?.!]*$`,"i"),FH=new RegExp(`^(?:(every|each|all)\\s+)?([\\w-]+)\\s+([a-z]+s)\\s+(${Ye})\\s+([\\w-]+)$`,"i"),DH=new RegExp(`^(?:what|who)\\s+([a-z']+)\\s+(${Ye})\\s+(.+?)[?.!\\s]*$`,"i"),zH=new RegExp(`^what\\s+(?:does|do|is)\\s+([\\w-]+)\\s+([a-z]+)(?:\\s+(${Ye}))?[?.!\\s]*$`,"i"),Hw=/^(?:anywhere|everywhere|nowhere|somewhere)$/i,XT=new Set(["bus","gas","plus","minus","surplus","lens","bias","atlas","canvas","virus","bonus","campus","census","chorus","circus","focus","status","iris","genius","sinus","walrus","cactus","fungus","radius","nucleus","alias","crocus","abacus","syllabus","octopus","platypus"]);qa="(?:(?:usually|often|sometimes|rarely|always|typically|generally|occasionally|frequently|normally|regularly|commonly|mostly|currently|still|also|really|actually|closely|strongly|directly)\\s+)?",JT="(?:cannot|can't|can not|does not|doesn't|do not|don't|never)",BH=new RegExp(`^(.+?)\\s+(${JT})\\s+(.+)$`,"i"),UH=new RegExp(`^([\\w'-]+)\\s+${qa}([a-z]+)\\s+(.+?)[.!?]*$`,"i"),jd="connected|related|associated|linked|based|derived|composed|made|used|known|located|found|involved|concerned",dy="with|to|from|by|of|in|on|for|as|about|into",WH=new RegExp(`^(?:the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(?:is|are|was|were)\\s+${qa}(${jd})\\s+(${dy})\\s+(.+)$`,"i"),GH=new RegExp(`^(?:the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(is|are|was|were)\\s+(?:an?\\s+)?([\\w'-]+)\\s+(${jd})\\s+(${dy})\\s+(.+)$`,"i"),HH=new RegExp(`^(?:the\\s+|an?\\s+)([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+([a-z]+)\\s+(${Ye})\\s+(.+?)[.!?]*$`,"i"),cd=/^(?:is|are|am|owns|maintains)$/i,ld=/\b(?:is|are|am|owns|maintains)\b/i,QT=new RegExp("^(?:i|me|you|he|him|she|her|it|we|us|they|them|my|your|his|its|our|their|mine|yours|hers|ours|theirs|this|that|these|those|a|an|the|every|each|all|some|any|no|both|either|neither|in|on|at|to|from|by|with|for|of|about|into|onto|over|under|near|before|after|during|through|up|down|off|out|above|below|between|among|against|without|within|along|across|behind|beyond|upon|toward|towards|per|and|but|or|if|because|although|though|while|when|since|unless|until|whether|so|nor|than|as|what|who|whom|whose|which|where|why|how)$","i"),VH=new RegExp(`^(?:${zs.filter(e=>!/\s/.test(e)).join("|")})$`,"i");ZT=new RegExp(`^(?:does|did)\\s+([\\w'-]+)\\s+${qa}([a-z]+)\\s+(.+?)[?.!\\s]*$`,"i"),eA=new RegExp(`^what\\s+(?:does|did)\\s+([\\w'-]+)\\s+${qa}([a-z]+(?:\\s+(?:${Ye}))?)[?.!\\s]*$`,"i"),dd=/^(?:be|own|maintain)$/i,tA=new RegExp(`^(${Ye})\\s+(.+)$`,"i");sA=["first","second","third","then","next","finally","later","meanwhile","afterward","afterwards"],qH=new RegExp(`^(?:${sA.join("|")})\\b\\s*,?\\s+`,"i"),py=Object.freeze(["you","i","it","they","he","she","we"]),fy=Object.freeze(["you're","i'm","it's","they're","he's","she's","we're"]),oA=Object.freeze([...fy,...py]),KH=new RegExp(`^(?:every\\s+|each\\s+|all\\s+|some\\s+|a few\\s+|a\\s+|an\\s+)?(${oA.join("|")})\\s+\\S+`,"i"),YH=new RegExp(`^(?:every\\s+|each\\s+|all\\s+|some\\s+|a few\\s+|a\\s+|an\\s+)?(?:(${py.join("|")})\\s+(?:is|are|am|was|were)|(${fy.join("|")}))\\s+(?:an?\\s+)?[\\w'-]+[.!?]*$`,"i"),XH=new RegExp(`^([\\w-]+)\\s+([a-z]+)s\\s+(${Ye})\\s+([\\w-]+)$`,"i"),JH=new RegExp(`^forget\\s+(?:that\\s+)?([\\w-]+)\\s+([a-z]+)s\\s+(${Ye})\\s+([\\w-]+)$`,"i"),dr="(?:\\s+(?:exactly|really|actually|truly|anyway|internally|properly))?",QH=new RegExp(`^what\\s+does\\s+(.+?)${dr}\\s+do${dr}\\??$`,"i"),ZH=new RegExp(`^what\\s+(.+?)${dr}\\s+does${dr}\\??$`,"i"),eV=new RegExp(`^what(?:'s|s|\\s+is)\\s+(.+?)${dr}\\s+do${dr}\\??$`,"i"),my="([A-Za-z][\\w'.-]*(?:\\s+[A-Za-z][\\w'.-]*){0,3})",tV=new RegExp(`^who\\s+(?:is|was)\\s+${my}$`,"i"),nV=new RegExp(`^what\\s+(?:did|has)\\s+${my}\\s+(?:touch(?:ed)?|chang(?:e|ed)|work(?:ed)?\\s+on|commit(?:ted)?)$`,"i"),rA="(?:good|bad|clean|messy|ugly|nice|great|terrible|awful|solid|elegant|readable|maintainable|well[- ]written|well[- ]structured|spaghetti|ok|okay|decent|healthy)",sV=new RegExp(`^is\\s+(?:this|the)\\s+code(?:base)?\\s+(?:any\\s+)?${rA}\\b`,"i"),oV=new RegExp("^(?:what\\s+time\\s+is\\s+it(?:\\s+(?:now|right\\s+now))?|what(?:'s|s|\\s+is)\\s+the\\s+time(?:\\s+(?:now|right\\s+now))?|what\\s+day\\s+is\\s+it(?:\\s+today)?|what(?:'s|s|\\s+is)\\s+(?:the\\s+)?(?:day|date)(?:\\s+today)?|what(?:'s|s|\\s+is)\\s+today'?s\\s+date|what(?:'s|s|\\s+is)\\s+the\\s+weather(?:\\s+like)?(?:\\s+(?:today|outside))?|how'?s\\s+the\\s+weather(?:\\s+like)?(?:\\s+(?:today|outside))?)\\??$","i");rV=new Set([...Object.keys(de).flatMap(e=>e.split(/[\s-]+/)),...Jt,...hn,"owns","maintains"].filter(e=>e.length>=3)),uo={"rdfs:subClassOf":"is a kind of","mgxneg:subClassOf":"is not a kind of","rdf:type":"is a","owl:disjointWith":"is not a","mgx:partOf":"is part of","mgx:hasA":"has","mgx:usedFor":"is used for","mgx:capableOf":"can","mgx:atLocation":"is found in","mgx:causes":"causes","mgx:hasProperty":"is","mgx:madeOf":"is made of","mgx:receivesAction":"can be","mgx:createdBy":"is created by","mgx:mannerOf":"is a way to","mgx:desires":"wants","mgx:locatedNear":"is typically near","mgx:motivatedByGoal":"is motivated by","mgx:obstructedBy":"can be prevented by","mgx:causesDesire":"makes you want to","mgx:hasSubevent":"involves","mgx:hasFirstSubevent":"begins with","mgx:hasLastSubevent":"ends with","mgx:hasPrerequisite":"requires","mgx:ownedBy":"is owned by","mgx:rendersAs":"renders as","mgx:synonym":"means the same as","mgx:antonym":"is the opposite of","mgx:similarTo":"is similar to","mgx:relatedTo":"is related to","mgx:symbolOf":"is a symbol of","mgx:currently-in":"is in","mgx:located-in":"is in","mgx:fixed-in":"is fixed in","mgx:stands-locked-in":"stands locked in","mgx:works-in":"works in"},Vw=new Set(["mgx:hidden-in","mgx:is-objective","mgx:unlocks-with","mgx:is-npc","mgx:acts-on-turn","mgx:acts-toward","mgx:is-container","mgx:is-open"]),_d=new Set(["mgx:currently-in","mgx:located-in","mgx:fixed-in","mgx:stands-locked-in","mgx:works-in"]);Pt=e=>`${e.subject} ${gy(e.predicate)} ${e.object}`;aA=Object.entries(uo).filter(([e])=>!_d.has(e)).map(([e,t])=>{let n=/^(?:is|are)\s+(.+)$/i.exec(t);return n?{predicate:e,marker:n[1].trim().toLowerCase()}:null}).filter(e=>e&&e.marker.length>1).sort((e,t)=>t.marker.length-e.marker.length);lA=/ \(source: [^)]*\)$/;uA=8;Wa=null;hA=/^(?:every|each|all|any)\s+/i;wy=new Set(["module","modules","class","classes","function","functions","method","methods","handler","handlers","controller","controllers","service","services","component","components","flow","flows","thing","things","item","items","object","objects","commit","commits"]),iV=new Set([["interpreter","compiler"],["string","thread"],["heart","kernel"],["battalion","heap"],["bash","sock"],["command","skill"],["docker","longshoreman"],["name","list"],["list","number"]].map(([e,t])=>[e,t].sort().join("|"))),bd=/^(?:is|are|was|were)\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)\s+(?:the|an?)\s+([a-z][\w-]*)\s+of\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,yy=/^(?:who|what)\s+(?:is|are)\s+(?:the|an?)\s+([a-z][\w-]*)\s+of\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,gA=/^(?:who|what)\s+(?:is|are|was|were)\s+([\w-]+(?:\s+[A-Z][\w-]*)?)'s\s+([a-z][\w-]*)[?.!\s]*$/i,bA=/^(who|what)'?s\s+/i,Va=e=>String(e).replace(bA,(t,n)=>`${n} is `),wA=/^(?:who|what)\s+(?:is|are|was|were)\s+([\w-]{2,}?)s\s+([a-z][\w-]*)[?.!\s]*$/i;yA=/^list\s+(?:the\s+|all\s+)?([a-z][\w-]*)\s+of\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,Cs=/^(?:is|are)\s+(?:an?\s+)?(.+?)\s+(?:a\s+kind\s+of|a\s+type\s+of|an?)\s+(.+?)[?.!\s]*$/i,rs=new Set(["rdfs:subClassOf","rdf:type"]),vA=6,$A=/^why\s+(?=(?:is|are)\b)/i,xA=/^explain\s+how\s+you\s+know\s+(?:that\s+)?(.+?)\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i;yd=new Set(["kind","sort","type","subclass","superclass"]),Xw=/^(?:so\s+)?(.+?)\s+(?:is|are)\s+(?:an?\s+)?(.+?)\s*,?\s*(?:now\s+)?(?:right|correct|yeah)\??$/i,EA=/^(?:what\s+do\s+you\s+know\s+about|what(?:'s|s|\s+is)\s+in\s+your\s+memory\s+about|what\s+do\s+you\s+remember\s+about)\s+(.+?)[?.!\s]*$/i,je=32,SA=/^(?:can|could)\s+(all\s+|every\s+)?(?:an?\s+)?([\w'-]+(?:\s+[\w'-]+)*?)\s+([a-z]+)[?.!\s]*$/i,kA=/^(?:does|do)\s+(?:an?\s+|the\s+)?(.+?)\s+have\s+(?:an?\s+|the\s+)?(.+?)[?.!\s]*$/i,jA=/^what\s+can\s+(?:an?\s+)?(.+?)\s+do[?.!\s]*$/i,_A=/^what\s+has\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,RA=/^what\s+(?:(?:can\s+be|is)\s+used\s+for|is\s+for)\s+(.+?)[?.!\s]*$/i,TA=/^where(?:'s|\s+is|\s+are)\s+(.+?)(?:\s+now)?\s*[?.!]*$/i,AA=/^where\s+(?:does|do|did)\s+(.+?)\s+[a-z][a-z'-]*(?:\s+now)?\s*[?.!]*$/i,CA=new RegExp(`^what(?:'s|\\s+is|\\s+are)\\s+(${Ye})\\s+(.+?)\\s*[?.!]*$`,"i"),OA=/^what\s+([a-z][\w-]*)\s+(?:does|do)\s+(?:an?\s+|the\s+)?(.+?)\s+([a-z][a-z-]*)\s*[?.!]*$/i,IA=/^(?:do|does)\s+(all\s+|every\s+)?(?:an?\s+|the\s+)?([\w'-]+(?:\s+[\w'-]+)*?)\s+([a-z-]+)[?.!\s]*$/i,LA=/^what\s+can\s+(?!be\s)(.+?)[?.!\s]*$/i,NA=/^what\s+(?:cannot|can't|cant|can\s+not)\s+(.+?)[?.!\s]*$/i,PA=/^(?:which|what)\s+([\w'-]+(?:\s+[\w'-]+)*?)\s+can\s+(.+?)[?.!\s]*$/i;Qw=e=>String(e||"").replace(/\s+/g," ").trim();$y="(?:most|least)\\s+[a-z][\\w-]*|[a-z][\\w-]*est|best|worst",FA=new RegExp(`^which\\s+([\\w'-]+)\\s+(?:is|are)\\s+(?:the\\s+)?(${$y})[?.!\\s]*$`,"i"),DA=new RegExp(`^what(?:'s|s|\\s+is)\\s+the\\s+(${$y})\\s+([\\w'-]+)[?.!\\s]*$`,"i");BA=new Set(["rdfs:subClassOf","rdf:type","mgx:hasA","mgx:capableOf","mgx:usedFor","mgx:ownedBy","owl:disjointWith","mgx:hasProperty","mgx:receivesAction"]),UA=Object.entries(uo).filter(([e])=>!BA.has(e)&&!_d.has(e)).map(([e,t])=>({predicate:e,re:new RegExp(`^what\\s+${Je(t)}\\s+(.+?)[?.!\\s]*$`,"i")})).sort((e,t)=>t.re.source.length-e.re.source.length),WA=new Set(["rdfs:subClassOf","rdf:type","owl:disjointWith","mgx:hasProperty","mgx:hasA","mgx:capableOf","mgx:ownedBy"]),GA=Object.entries(uo).filter(([e])=>!WA.has(e)&&!_d.has(e)).map(([e,t])=>{let n;if(t==="can be")n=new RegExp("^can\\s+(?:an?\\s+|the\\s+)?(.+?)\\s+be\\s+(.+?)[?.!\\s]*$","i");else if(t.startsWith("is ")){let s=Je(t.slice(3));n=new RegExp(`^(?:is|are)\\s+(?:an?\\s+|the\\s+)?(.+?)\\s+${s}\\s+(?:an?\\s+|the\\s+)?(.+?)[?.!\\s]*$`,"i")}else{let[s,...o]=t.split(" "),r=[hy(s),...o].map(Je).join("\\s+");n=new RegExp(`^(?:does|do)\\s+(?:an?\\s+|the\\s+)?(.+?)\\s+${r}\\s+(?:an?\\s+|the\\s+)?(.+?)[?.!\\s]*$`,"i")}return{predicate:e,phrase:t,re:n}}).sort((e,t)=>t.re.source.length-e.re.source.length),ty=/^what\s+(?:inherits?\s+(?:from\s+)?(?:an?\s+)?|is\s+(?:an?\s+)?(?:kind|sort|type)\s+of\s+|is\s+(?:an?\s+)?subclass\s+of\s+)(.+?)[?.!\s]*$/i,HA=new Set(["changed","change","changes","updated","modified","happened","occurred"]);qA=/^what\s+(?:did|have)\s+(?:i|we|you)\s+(?:told|tell|said|say)\s+(?:you|me|us)?\s*about\s+(.+?)[?.!\s]*$/i,KA=/^what\s+kind\s+of\s+(?:thing|class|type|category|entity)?\s*(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,YA=/^does\s+every\s+(.+?)\s+have\s+at\s+least\s+(\d+)\s+(.+?)[?.!\s]*$/i,XA=/^does\s+an?\s+(.+?)\s+have\s+an?\s+(.+?)[?.!\s]*$/i,ny=new Set(["owl:cardinality","owl:minCardinality","owl:maxCardinality","owl:onClass"]),JA=/^who\s+(?:owns|maintains)\s+(.+?)[?.!\s]*$/i,QA=/^(?:does|did)\s+([\w'-]+)\s+(?:owns?|maintains?)\s+(.+?)[?.!\s]*$/i,ZA=/^(?:is|are|was|were)\s+(.+?)\s+owned\s+by\s+([A-Za-z][\w'-]*(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,eC=/^(?:does|did)\s+([\w'-]+)\s+(?:has|have)\s+an?\s+([a-z][\w-]*)\s+method[?.!\s]*$/i,tC=/^what\s+methods\s+does\s+([\w'-]+)\s+have[?.!\s]*$/i,sy=/^(?:is|are|was|were)\s+(.+?)\s+([A-Za-z][\w-]*)[?.!\s]*$/i,os=/^(?:it|this|that)$/i,oy=/^(?:it|this|that)(?:\s+one)?\s+(?:before|after)\b/i,ry=/^(?:you|i|they|he|she|we)\b/i,iy=(e,t)=>({text:`I don't know anything about "${e}" yet \u2014 teach me directly, e.g. "remember that ${Ha(e)} is ${t}".`,replace:!0}),nC=/^(?:what\s+(?:did|have)\s+(?:i|we)\s+(?:told?|tell|said?|say)\s+(?:you|me|us)?(?:\s+(?:last\s+time|before|earlier|previously|already))?|what\s+facts?\s+do\s+you\s+(?:know|have|remember)|what\s+do\s+you\s+(?:know|remember)|what\s+have\s+you\s+(?:learned|learnt|remembered))[?.!\s]*$/i;oC=/inherit|supertype|subclass|extend|specializ/i,rC=8;aV=new RegExp(`\\b(?:${[...xd].join("|")})\\b`,"i"),ky=/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,aC=/^who\s+(?:is|are|was|were)\s+(?:an?\s+|the\s+)?([\w'-]+)[?.!\s]*$/i;cV=new RegExp(`^(?:(?:the|a|an)\\s+)?(.+?)\\s+(${Object.keys(Ue).join("|")})$`,"i"),hd="(?:(?:can|could|would)\\s+you\\s+(?:please\\s+)?)?(?:(?:show|give)\\s+(?:me|us)\\s+|describe\\s+|explain\\s+|what(?:'s|s|\\s+is)\\s+)?",$d="(?:of|for)\\s+(?:this|the)\\s+(?:app|codebase|repo|repository|project|code)",cC=`(?:\\s+${$d})?`,lV=[new RegExp(`^${hd}the\\s+architecture(?:\\s+(?:overview|map|diagram))?${cC}(?:\\s+here)?\\??$`,"i"),new RegExp(`^${hd}architecture\\s+(?:${$d}|overview|map|diagram)\\??$`,"i"),new RegExp(`^${hd}(?:(?:an?|the)\\s+)?(?:overview|map|diagram)\\s+${$d}(?:\\s+here)?\\??$`,"i")],uV={find:"locate a specific named entity",search:"locate a specific named entity",context:"gather the sized edit bundle for a symbol before changing code",snippet:"view a symbol's exact source",describe:"look up a symbol's definition and relations",signature:"view a symbol's signature",members:fn.contains,subclasses:fn.inherits,impact:"understand what a change to this module would reach (impact closure)",callers:fn.calls,callees:fn.calls,tests:fn.tests,untested:fn.tests,history:fn.touches,exports:fn.reexports,arch:"understand the overall architecture (package/module boundaries)",capabilities:"see what /plan can plan over \u2014 built-in query tools and taught actions",syllogise:"materialize the entailed facts that follow from what's remembered about one term",wiki:"toggle the live Wikipedia supplement for questions nothing local can answer",export:"write the memory store to a file, in the standard JSONL shape",ingest:"read a local text file and store every fact the recognizer grounds from it"},jy="(?:changed?|modif(?:y|ied)|edits?|edited|touch(?:es|ed)?|updates?|updated|alters?|altered|deletes?|deleted|removes?|removed|drops?|dropped)",dV=new RegExp(`^what\\s+(?:would|will|might|could|does|do)?\\s*(?:breaks?|fails?|happens?|stops?\\s+working|is\\s+affected|are\\s+affected|gets?\\s+affected|be\\s+affected|is\\s+impacted|be\\s+impacted)\\s+if\\s+(?:i|we|you|one|someone)\\s+${jy}\\s+(?:the\\s+)?(.+?)[?.!\\s]*$`,"i"),pV=new RegExp(`^if\\s+(?:i|we|you|one|someone)\\s+${jy}\\s+(?:the\\s+)?(.+?),?\\s+what\\s+(?:would\\s+|will\\s+|might\\s+|could\\s+|does\\s+|do\\s+)?(?:breaks?|fails?|happens?|stops?\\s+working|is\\s+affected|are\\s+affected|gets?\\s+affected|be\\s+affected|would\\s+break|will\\s+break)[?.!\\s]*$`,"i"),fV=new RegExp("^what\\s+(?:is|are|gets?|would\\s+be|will\\s+be)\\s+(?:affected|impacted|broken)\\s+(?:by|when|if)\\s+(?:i\\s+|we\\s+|you\\s+)?(?:chang(?:e|es|ing)|edit(?:s|ing)?|modif(?:y|ies|ying)|touch(?:es|ing)?|updat(?:e|es|ing)|delet(?:e|es|ing)|remov(?:e|es|ing)|a\\s+change\\s+to)\\s+(?:the\\s+)?(.+?)[?.!\\s]*$","i"),mV=new RegExp("^(?:(?:can|could)\\s+(?:i|we|you|one|someone)\\s+safely|is\\s+it\\s+safe\\s+to)\\s+(?:change|edit|modify|touch|update|alter|delete|remove|drop)\\s+(?:the\\s+)?(.+?)[?.!\\s]*$","i"),hV=new RegExp("^(?:what(?:'s|\\s+is)\\s+the\\s+)?(?:blast\\s+radius|impact)\\s+(?:of|for)\\s+(?:chang(?:ing|es)\\s+|editing\\s+|modifying\\s+|touching\\s+|updating\\s+|deleting\\s+|removing\\s+)?(?:the\\s+)?(.+?)[?.!\\s]*$","i"),Ka="as\\s+(?:its|the|an?)?\\s*(?:base\\s+class|parent\\s+class|base|parent)",gV=new RegExp(`^(.+?)\\s+uses?\\s+(?:which\\s+[\\w'-]+|what)\\s+${Ka}\\s*\\??$`,"i"),bV=new RegExp(`^what\\s+(?:does|do|did)\\s+(.+?)\\s+uses?\\s+${Ka}\\s*\\??$`,"i"),wV=new RegExp(`^(?:does|do|did)\\s+(.+?)\\s+uses?\\s+(.+?)\\s+${Ka}\\s*\\??$`,"i"),yV=new RegExp(`^(.+?)\\s+uses?\\s+(.+?)\\s+${Ka}\\s*[.!]*$`,"i"),lC=Object.freeze([...xd].filter(e=>e!=="here").concat("they")),vV=new RegExp(`^((?:is|are|can|could|does|do)\\s+|what\\s+(?:is|are)\\s+)(${lC.join("|")})\\b(\\s+\\S.*)?$`,"i"),$V=Q(".tmct","memory","corpus-seed.json")});za();Ke();ps();Na();var Ya={uninformativeClassMaxShare:.35,uninformativeClassMinSubjects:12,entailedDepthPenalty:.2,minoritySensePenalty:.5,minScore:.05,groupSplitThreshold:4,openerConceptCount:2,maxObjectsPerBodySentence:4,maxBodySentences:4,closerRootCount:2,budget:{chatReply:5,researchPanel:10,cliDigest:12,ledgerTerm:8}};var Ty=Object.freeze({"rdfs:subClassOf":"isa","rdf:type":"isa","mgx:atLocation":"location","mgx:locatedNear":"location","mgx:partOf":"partOf","mgx:capableOf":"capableOf","mgx:usedFor":"usedFor"}),po=Object.freeze(["isa","location","partOf","capableOf","usedFor","other"]),Xa=e=>Ty[e]||"other",dC=e=>Math.max(0,Math.min(1,e));function _y(e){let t=(e.sourceTypes||[]).map(n=>Us[n]??0);return t.length?Math.max(...t):typeof e.trust=="number"&&e.trust>0?e.trust:Us.entailed}function pC(e){return Array.isArray(e.environments)&&e.environments.length?!0:(e.sourceTypes||[]).includes("entailed")}function Ry(e,t){let n=Number(t?.totalSubjects)||0;return n<=0?0:(Number(t?.classSubjectCounts?.[e])||0)/n}function Ay(e,t,n={},s={}){let o={...Ya,...s.config||{}},r=Number.isInteger(s.budget)?s.budget:o.budget.chatReply,i=(t||[]).filter(v=>v&&v.object&&v.object!==e),a=[],l=(Number(n?.totalSubjects)||0)>=o.uninformativeClassMinSubjects,c=[];for(let v of i){if(Xa(v.predicate)==="isa"){let x=Ry(v.object,n);if(l&&x>o.uninformativeClassMaxShare){a.push({row:v,family:"isa",reason:"uninformative-class",share:x});continue}}c.push(v)}let u=c.filter(v=>Xa(v.predicate)==="isa").map(v=>v.object),d=La(u,{subClassEdges:n.subClassEdges||[],disjointEdges:n.disjointEdges||[]}),f=new Map,p=new Map;for(let v of d.clusters){let x=0;for(let E of v.objects){p.set(E,v.label);let S=c.find(R=>R.object===E&&Xa(R.predicate)==="isa");x+=S?_y(S):0}f.set(v.label,x)}let m=null,h=-1;for(let[v,x]of[...f].sort((E,S)=>E[0].localeCompare(S[0])))x>h&&(h=x,m=v);let g=[];for(let v of c){let x=Xa(v.predicate),E=_y(v),S={provenance:E};if(pC(v)&&(E-=o.entailedDepthPenalty,S.entailed=!0),x==="isa"){let k=.6+.4*(1-Ry(v.object,n));E*=k,S.informativeness=k;let A=p.get(v.object);m&&A&&A!==m&&(E-=o.minoritySensePenalty,S.minoritySense=A)}E=dC(E),g.push({row:v,family:x,score:E,reasons:S})}let b=[];for(let v of g)v.score<o.minScore?a.push({row:v.row,family:v.family,reason:"below-floor",score:v.score}):b.push(v);let y=new Map;for(let v of b)y.has(v.family)||y.set(v.family,[]),y.get(v.family).push(v);for(let v of y.values())v.sort((x,E)=>E.score-x.score||x.row.object.localeCompare(E.row.object));let w=po.filter(v=>y.has(v)).concat([...y.keys()].filter(v=>!po.includes(v)).sort()),$=[],_=!1;for(;$.length<r&&!_;){_=!0;for(let v of w){let x=y.get(v);if(x&&x.length&&($.push(x.shift()),_=!1,$.length>=r))break}}for(let v of w)for(let x of y.get(v)||[])a.push({row:x.row,family:x.family,reason:"over-budget",score:x.score});return $.sort((v,x)=>{let E=po.indexOf(v.family),S=po.indexOf(x.family);return E-S||x.score-v.score||v.row.object.localeCompare(x.row.object)}),{term:e,selected:$,cut:a,senses:{split:d.split,clusters:d.clusters,dominantLabel:m}}}Mi();en();var fC=new Set(["isa","location","partOf","capableOf","usedFor"]),mC=new Set(["single","several","chained","group","closer"]),Cy=(e,t)=>`${e}:${t}`;function Rd(e){let t=new Map;for(let n of e||[]){if(!n||typeof n.family!="string"||!fC.has(n.family)||typeof n.form!="string"||!mC.has(n.form)||typeof n.template!="string"||!n.template.trim())continue;let s=Cy(n.family,n.form);t.has(s)||t.set(s,{family:n.family,form:n.form,templates:[]});let o=t.get(s);o.templates.includes(n.template)||o.templates.push(n.template)}return t}var fo=e=>`${Co(e)} ${e}`;function hC(e){let t=(e||[]).map(o=>String(o||"").trim()).filter(Boolean);if(!t.length)return"";let n=fo(t[0]),s=t.slice(1);return s.length?`${n}, and so ${jr(s.map(fo))}`:n}function gC(e,t,n,s){let o=String(e||"").trim(),r=(t||[]).map(l=>String(l||"").trim()).filter(Boolean),i=r[0]||"",a=String(s||"").trim();return{TERM:o,TERM_CAP:Oo(o),A_TERM:fo(o),A_TERM_CAP:Oo(fo(o)),TERMS:Pi(o),TERMS_CAP:Oo(Pi(o)),PRONOUN:"it",PRONOUN_CAP:"It",PARENT:a,A_PARENT:a?fo(a):"",OBJECT:i,A_OBJECT:i?fo(i):"",OBJECTS_A:jr(r.map(fo)),OBJECTS_PLURAL:jr(r.map(Pi)),OBJECTS_RAW:jr(r),CHAIN:hC(n&&n.length?n:r.slice(0,1))}}function bC(e,t){return String(e).replace(/\{([A-Z_]+)\}/g,(n,s)=>s in t?t[s]:"").replace(/\s+/g," ").replace(/\s+([.,;])/g,"$1").trim()}function is(e,t,n,s={}){let o=(n||[]).filter(Boolean);if(!o.length)return null;let r=s.term??o[0].subject??"",i=s.form||(o.length>1?"several":"single"),a=e instanceof Map?e.get(Cy(t,i)):null,l=a?a.templates:null;if(!l||!l.length)return null;let c=s.variantSeed??"",u=Yi(`${r}|${t}|${i}|${c}`)%l.length,d=s.objectsOverride||o.map(p=>p.object),f=bC(l[u],gC(r,d,s.chain,s.parent));return f?{text:f,rows:o,family:t,form:i}:null}Mi();var wC=po.filter(e=>e!=="isa"&&e!=="other");function yC(e){let t=new Map;for(let n of e||[])t.has(n.family)||t.set(n.family,[]),t.get(n.family).push(n.row);return t}function Oy(e,t){let n=Math.max(1,Math.trunc(t)||1),s=[];for(let o=0;o<(e||[]).length;o+=n)s.push(e.slice(o,o+n));return s}function vC(e,t){let n=l=>(t?.[l.object]||[])[1]||null,s=new Map;for(let l of e||[]){let c=n(l);c&&s.set(c,(s.get(c)||0)+1)}let o=new Map,r=[],i=[];for(let l of e||[]){let c=n(l);c&&s.get(c)>=2?(o.has(c)||(o.set(c,[]),r.push(c)),o.get(c).push(l)):i.push(l)}let a=r.map(l=>({parent:l,rows:o.get(l)}));return i.length&&a.push({parent:null,rows:i}),a}function $C(e,t,n){let s=new Map,o=new Map;for(let l of t||[]){let c=e?.[l.object];if(!Array.isArray(c)||c.length<2)continue;let u=c[c.length-1];!u||u===l.object||(s.set(u,(s.get(u)||0)+1),o.has(u)||o.set(u,[]),o.get(u).push(l))}let r=[...s.keys()].sort((l,c)=>s.get(c)-s.get(l)||l.localeCompare(c)).slice(0,Math.max(0,n)),i=[],a=new Set;for(let l of r)for(let c of o.get(l)||[])a.has(c.id)||(a.add(c.id),i.push(c));return{roots:r,rows:i}}function xC(e,t,n,s,o){let r=[];if(!e.length)return r;if(e.length===1){let f=t[e[0].object],p=f&&f.length>1?"chained":"single",m=is(s,"isa",e,{term:n,form:p,chain:f});return m&&r.push({...m,role:"names-term",paragraph:"definition"}),r}if(e.length<=o.groupSplitThreshold){let f=is(s,"isa",e,{term:n,form:"several"});return f&&r.push({...f,role:"names-term",paragraph:"definition"}),r}let i=e.slice(0,o.openerConceptCount),a=e.slice(o.openerConceptCount),l=is(s,"isa",i,{term:n,form:i.length>1?"several":"single",variantSeed:n});l&&r.push({...l,role:"names-term",paragraph:"definition"});let c=[];for(let f of vC(a,t))for(let p of Oy(f.rows,o.maxObjectsPerBodySentence))c.push({parent:f.parent,rows:p});if(c.length>o.maxBodySentences){let f=c.slice(0,o.maxBodySentences),p=f[f.length-1];for(let m of c.slice(o.maxBodySentences))p.rows=p.rows.concat(m.rows);p.parent=null,c=f}for(let f of c){let p=f.parent?is(s,"isa",f.rows,{term:n,form:"group",parent:f.parent,variantSeed:f.parent}):is(s,"isa",f.rows,{term:n,form:"several",variantSeed:n});p&&r.push({...p,role:"describes-isa",paragraph:"definition"})}let{roots:u,rows:d}=$C(t,e,o.closerRootCount);if(u.length){let f=is(s,"isa",d.length?d:e,{term:n,form:"closer",objectsOverride:u,variantSeed:n});f&&r.push({...f,role:"closes-isa",paragraph:"definition"})}return r}function EC(e,t){if(!e.length)return;let n=e[0];if(/\bnames-term\b/.test(n.role))return;let s=Oo(`${Co(t)} ${t}`);n.text=n.text.replace(/^It\b/,s),n.role="names-term"}function SC(e,t){let n=[],s=null,o=null;for(let r of e)(!s||r.paragraph!==o||s.length>=t)&&(s=[],o=r.paragraph,n.push(s)),s.push(r);return n.map(r=>({sentences:r,text:r.map(i=>i.text).join(" ")}))}function Iy(e,t,n={}){let s=e?.term||"",o=Number.isInteger(n.maxSentencesPerParagraph)?n.maxSentencesPerParagraph:3,r=n.chains||{},i={...Ya,...n.config||{}},a=yC(e?.selected||[]),l=[];for(let u of xC(a.get("isa")||[],r,s,t,i))l.push(u);for(let u of wC){let d=a.get(u);if(!(!d||!d.length))for(let f of Oy(d,i.maxObjectsPerBodySentence)){let p=is(t,u,f,{term:s});p&&l.push({...p,role:"describes",paragraph:"description"})}}EC(l,s);let c=new Map;for(let u of l)for(let d of u.rows)c.has(d.id)||c.set(d.id,d);return{term:s,sentences:l,paragraphs:SC(l,o),provenanceRows:[...c.values()]}}var kC=e=>({subject:e.subject,predicate:e.predicate,object:e.object,sourceTypes:e.sourceTypes||[],provenance:e.provenance||""});function jC(e){let t=new Set,n=[];for(let s of e||[]){let o=s.provenance||(s.sourceTypes||[]).join(",");!o||t.has(o)||(t.add(o),n.push({provenance:s.provenance||"",sourceTypes:s.sourceTypes||[]}))}return n}var _C=Object.freeze({facts:"show the facts",chains:"show the chains"});function RC(e,t){let n=[...(e?.selected||[]).map(o=>o.row),...(e?.cut||[]).map(o=>o.row)].filter(Boolean),s=Object.entries(t||{}).filter(([,o])=>Array.isArray(o)&&o.length>1).map(([o,r])=>({object:o,chain:r}));return{escapes:_C,facts:n.map(kC),factCount:n.length,chains:s}}function Ly(e,t,n={}){let s=t?.term||e?.term||"";return{kind:"term-article",term:s,headline:s,paragraphs:(t?.paragraphs||[]).map(o=>o.text).filter(Boolean),body:t?.paragraphs||[],sources:jC(t?.provenanceRows||[]),detail:RC(e,n.chains),provenanceRows:t?.provenanceRows||[]}}function Ny(e,t,n={},s=new Map,o={}){let r=Ay(e,t,n,o),i=Iy(r,s,o);return Ly(r,i,o)}Na();var Py=new Set(["rdfs:subClassOf","rdf:type"]);function My(e){let t=new Map,n=new Set,s=[],o=[];for(let i of e||[])!i||!i.predicate||(Py.has(i.predicate)?(n.add(i.subject),t.has(i.object)||t.set(i.object,new Set),t.get(i.object).add(i.subject),s.push([i.subject,i.object])):i.predicate==="owl:disjointWith"&&o.push([i.subject,i.object]));let r={};for(let[i,a]of t)r[i]=a.size;return{classSubjectCounts:r,totalSubjects:n.size,subClassEdges:s,disjointEdges:o}}function Fy(e,t,n=6){let s=ni(e||[]),o={};for(let r of t||[]){if(r in o)continue;let i=Ia(r,s,{cap:n});i.length>1&&(o[r]=i)}return o}function Dy(e){let t=[],n=new Set;for(let s of e||[])!s||!Py.has(s.predicate)||n.has(s.object)||(n.add(s.object),t.push(s.object));return t}Ke();za();function TC(e,t,n,s,o={}){let r=Rd(s||[]);if(!r||r.size===0)return null;let i=t||[],a=My(n||i),l=Fy(a.subClassEdges,Dy(i));return Ny(e,i,a,r,{...o,chains:l})}function zy(e,t,n,s={}){let o=Ct(e||{individuals:[],objectProperties:[]}),r=Y(X,t),i=o.filter(l=>r.has(l.subject));if(!i.length)return null;let a=TC(t,i,o,n,s);return AC(a)}function AC(e){if(!e||!Array.isArray(e.paragraphs)||!e.paragraphs.length)return null;let t=e.detail&&Array.isArray(e.detail.facts)?e.detail.facts:[];return{term:e.term||"",paragraphs:e.paragraphs.slice(),sources:[...new Set((e.sources||[]).map(n=>n.provenance).filter(Boolean))],facts:t,factCount:e.detail&&Number.isInteger(e.detail.factCount)?e.detail.factCount:t.length}}var CC="no session is open on this page yet \u2014 await tmct.open() first",By=Symbol.for("tmct.surface.fallback");function Uy({open:e,ask:t=null,plan:n=null,turn:s=null,page:o={},fallback:r=!1,target:i=globalThis}={}){if(typeof e!="function")throw new Error("publishTmctSurface: `open` must be this page's session factory");let a=i.tmct;if(r&&a&&!a[By])return a;let l=null,c=()=>{if(!l)throw new Error(CC);return l},u={async open(...d){return l=await e(...d),l},get session(){return l},async turn(d,f){let p=c();return s?s(d,f,p):typeof p.turn!="function"?{answer:"this page runs no conversational turn \u2014 see tmct.session for what it does run",end:!1,record:null,plan:null,research:null}:p.turn(d,f)},async ask(d,f){return t?t(d,f,c()):{answer:"this page has no separate ask route \u2014 it answers questions through tmct.turn()",data:void 0,miss:!0}},async plan(d,f){return n?n(d,f,c()):{refused:!0,why:"this page's bundle carries no capability planner",driver:null,calls:[],composed:null,observed:null}},page:o,fallback:r};return u[By]=r,i.tmct=u,u}function OC({payload:e=null}={}){let t=ba();return e&&(t.payload=e),{memoryDir:t}}async function IC(e,t,n){let s=null;try{s=await xy(n.memoryDir,e,null,!0,{})}catch{s=null}if(!(s&&s.text))try{s=await Sy(n.memoryDir,e,null,!0,null)}catch{s=null}return s&&s.text?{answer:s.text,data:s,miss:!1}:{answer:null,data:null,miss:!0}}Uy({open:OC,ask:IC,page:{normFactTerm:X,digestTermFromPayloadBrowser:zy},fallback:!0});})();
227
+ `)}${H}`,replace:!0,...G.length?{pending:{items:G.map(ae=>ae.trim()),noun:"facts"}}:{}}}let U=n?.parsed?.shape==="meta"?n.parsed.object:null,Z=!1,J=c.match(kI);if(J)U=J[1],Z=!0;else if(!U&&!n?.parsed){let I=c.match(/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i);I&&(U=I[1])}if(!U)return null;let ne=Y(l,U),D=Qe(f.filter(I=>ne.has(I.subject)),i),z=Qe(f.filter(I=>ne.has(I.object)),i),W=Z?D.length?D:z:z.length?z:D;return W.length?m(W):null}function xd(e){let t=e.sourceTypes||[];return t.length===0||t.some(n=>n!=="corpusWeak")}var Ad,$A,fn,Ka,ny,vy,PV,sy,vA,FV,DV,xy,Ey,Sy,xA,oy,zV,UV,BV,WV,GV,Cd,qV,EA,Ye,pd,fd,ui,SA,mo,VV,HV,KV,YV,XV,JV,QV,ZV,eH,tH,nH,sH,oH,rH,iH,ry,_A,ec,RA,aH,cH,Ld,ky,lH,uH,dH,gd,bd,TA,pH,AA,IA,yd,CA,LA,fH,jy,_y,NA,mH,hH,gH,bH,pr,wH,yH,$H,Ry,vH,xH,MA,EH,SH,kH,ho,iy,Nd,Pt,FA,zA,UA,Xa,VA,Cy,jH,kd,Oy,HA,KA,Za,YA,XA,Ns,is,JA,QA,ZA,_d,uy,eI,je,tI,nI,sI,oI,rI,iI,aI,cI,lI,uI,dI,pI,fI,py,Ny,hI,gI,wI,yI,$I,vI,hy,xI,SI,kI,jI,_I,gy,RI,TI,AI,II,CI,by,rs,wy,yy,$y,OI,NI,MI,_H,Dy,FI,RH,Ed,Td,DI,TH,AH,zy,IH,CH,OH,LH,NH,tc,MH,PH,FH,DH,zI,zH,UH,Ha=O(()=>{Ue();Db();zt();Oe();$s();Oa();La();vr();Du();Bb();Be();ra();Uu();qb();Un();jn();Lo();Di();Mu();Pu();Io();co();Mc();Ma();Xb();Jb();qu();Qb();Vu();Zb();ew();Ua();_u();qa();Tw();Mw();ss();Jw();zi(void 0);Fi(Ca);Ad=new Set(["it","this","that","here"]),$A=e=>Ad.has(String(e||"").trim().toLowerCase()),fn={imports:"understand a dependency/import relationship",uses:"understand a dependency/usage relationship (imports and/or calls)",calls:"understand a call relationship",callsSymbol:"understand a call relationship",defines:"locate what a module/class defines",contains:"understand class membership (methods/attributes)",tests:"assess test coverage",inherits:"understand a class hierarchy/inheritance relationship",touches:"understand commit/change history",touchesSymbol:"understand commit/change history",cochange:"understand change-coupling between modules",reexports:"understand a module's public exports/API surface",serves:"understand which component provides or backs another",denotes:"understand which vocabulary term names a code entity"},Ka=e=>e?`${String(e).toLowerCase()}(s)`:"entities",ny="look up a taught fact about a subject/verb/object";vy={find:{tool:"tmct_search",arg:"query",help:"lexical search across the graph"},search:{tool:"tmct_search",arg:"query",help:"alias of /find"},context:{tool:"tmct_context",arg:"symbol",help:"the sized edit bundle for a symbol (start here to change code)"},snippet:{tool:"tmct_snippet",arg:"symbol",help:"exact source of one function/class/method"},describe:{tool:"tmct_describe",arg:"symbol",help:"a symbol's definition, kind and relations"},signature:{tool:"tmct_signature",arg:"symbol",help:"a symbol's signature only"},members:{tool:"tmct_members",arg:"class",help:"the methods/attributes of a class"},subclasses:{tool:"tmct_subclasses",arg:"class",help:"the subclasses of a class"},impact:{tool:"tmct_impact",arg:"module",help:"what a change to this module or symbol reaches (impact closure)"},callers:{tool:"tmct_callers",arg:"symbol",help:"functions that call this symbol"},callees:{tool:"tmct_callees",arg:"symbol",help:"functions this symbol calls"},tests:{tool:"tmct_tests_for",arg:"symbol",help:"the tests covering this symbol"},untested:{tool:"tmct_untested",arg:null,help:"symbols with no covering test"},history:{tool:"tmct_history",arg:"symbol",help:"the commit history of this symbol"},exports:{tool:"tmct_exports",arg:"module",help:"a module's public exports"},arch:{tool:"tmct_architecture",arg:"package",help:"the architecture overview (optional package filter)",optional:!0}},PV=new Set(["stats","memory","focus",...Object.keys(vy)]),sy={Class:["class","classes"],Function:["function","functions"],Module:["module","modules"],Package:["package","packages"],Method:["method","methods"],Attribute:["attribute","attributes"],GlobalVariable:["variable","variables"],Commit:["commit","commits"],Session:["session","sessions"]},vA=new Set(["have","has","holds","hold"]),FV=new RegExp(`\\b(?:${[...Object.keys(de),...Object.keys(cs)].filter(e=>!vA.has(e)).sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})\\b`,"i"),DV=new Set([...Fb.map(e=>e.name),...Object.values(vy).map(e=>e.tool)]),xy=new Set(["hi","hello","hey","yo","hiya","howdy","sup","greetings","g'day","gday","hey there","hi there","hello there","good morning","good afternoon","good evening","morning","alright","you alright","alright mate","morning all","yeah nah","hey y'all","howdy there","hiya there","good day","good day to you","salutations","good to meet you","pleased to meet you","yo yo","ayy","wassup","sup fam","heya","hiya!","gm","ge"]),Ey=new Set(["thanks","thank you","thankyou","thx","ty","ta","cheers","nice one","much appreciated","cool thanks","many thanks","much obliged","ta very much","cheers mate","cheers for that","tks","sweet thanks","nice","brilliant","ta for that","cheers, that's everything for now, thanks","that's everything for now, thanks","that's all for now, thanks"]),Sy=new Set(["bye","goodbye","quit","exit","see ya","see you","cya","later","farewell","peace","peace out","im off","i'm off","gtg","gotta go","catch you later","farewell then"]),xA=new Set(["ok","okay","cool","aight","fair enough","got it","gotcha","noted","sounds good","sure","cool cool","right","haha ok fair enough"]),oy=e=>e.replace(/(.)\1+/g,"$1");zV=Id(xy),UV=Id(Ey),BV=Id(Sy),WV=new RegExp(`^(?:${[...xA].map(Je).join("|")})\\s+(.+)$`,"i"),GV=[...xy,...Ey,...Sy,"what can you do","what do you do","help","how do you work","who are you","what are you","what is your name"],Cd="(?:[a-z]+er|better|worse|(?:more|less)\\s+[a-z]+)",qV=new RegExp(`^(?:the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(?:is|are)\\s+(${Cd})\\s+than\\s+(.+)$`,"i"),EA=new RegExp(`^(?:is|are)\\s+(.+?)\\s+(${Cd})\\s+than\\s+(.+?)[?.!\\s]*$`,"i"),Ye="on|in|at|onto|upon|under|over|beside|near|behind|above|below|inside|outside",pd="mgx:ownedBy",fd="mgx:hasProperty",ui="rdfs:subClassOf",SA=new Set(["operator","teach","entailed"]),mo=e=>!!e.sourceTypes?.some(t=>SA.has(t));VV=new RegExp(`^you\\s+(?:can|may)\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Ye})\\s+an?\\s+([a-z][\\w-]*)[.!?]*$`,"i"),HV=new RegExp(`^an?\\s+([a-z][\\w-]*)\\s+(?:can|may)\\s+be\\s+([a-z]+)\\s+(${Ye})\\s+an?\\s+([a-z][\\w-]*)[.!?]*$`,"i"),KV=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Ye})\\s+an?\\s+([a-z][\\w-]*)\\s*,?\\s*nothing\\s+may\\s+([a-z]+)\\s+(${Ye})\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),YV=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Ye})\\s+an?\\s+([a-z][\\w-]*)\\s*,?\\s*the\\s+([a-z][\\w-]*)\\s+must\\s+be\\s+(${Cd})\\s+than\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),XV=new RegExp(`^([a-z]+ing)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Ye})\\s+an?\\s+([a-z][\\w-]*)\\s+makes\\s+(?:it|the\\s+([a-z][\\w-]*))\\s+([a-z]+)\\s+(${Ye})\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),JV=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Ye})\\s+an?\\s+([a-z][\\w-]*)\\s*,?\\s*the\\s+([a-z][\\w-]*)\\s+may\\s+not\\s+be\\s+with\\s+the\\s+([a-z][\\w-]*)\\s+without\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i");QV=new RegExp(`^the\\s+goal\\s+is\\s+that\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+([a-z]+s)\\s+(${Ye})\\s+([\\w-]+)[.!?]*$`,"i"),ZV=new RegExp(`^(?:the\\s+goal\\s+is\\s+for|i\\s+want)\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+to\\s+([a-z]+)\\s+(${Ye})\\s+([\\w-]+)[.!?]*$`,"i"),eH=new RegExp(`^(?:the\\s+goal\\s+is\\s+for|i\\s+want)\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+(${Ye})\\s+([\\w-]+)[.!?]*$`,"i"),tH=new RegExp(`^(?:can|could)\\s+you\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Ye})\\s+an?\\s+([a-z][\\w-]*)[?.!]*$`,"i"),nH=new RegExp(`^(?:get|put|place|stack)\\s+(?:(every|each|all|both)\\s+)?(?:the\\s+)?([\\w-]+?)\\s+(${Ye})\\s+([\\w-]+)[?.!]*$`,"i"),sH=new RegExp(`^the\\s+goal\\s+is\\s+(?:(every|each|all|both)\\s+)?(?:the\\s+)?([\\w-]+?)\\s+(${Ye})\\s+([\\w-]+)[?.!]*$`,"i"),oH=new RegExp(`^(?:(every|each|all)\\s+)?([\\w-]+)\\s+([a-z]+s)\\s+(${Ye})\\s+([\\w-]+)$`,"i"),rH=new RegExp(`^(?:what|who)\\s+([a-z']+)\\s+(${Ye})\\s+(.+?)[?.!\\s]*$`,"i"),iH=new RegExp(`^what\\s+(?:does|do|is)\\s+([\\w-]+)\\s+([a-z]+)(?:\\s+(${Ye}))?[?.!\\s]*$`,"i"),ry=/^(?:anywhere|everywhere|nowhere|somewhere)$/i,_A=new Set(["bus","gas","plus","minus","surplus","lens","bias","atlas","canvas","virus","bonus","campus","census","chorus","circus","focus","status","iris","genius","sinus","walrus","cactus","fungus","radius","nucleus","alias","crocus","abacus","syllabus","octopus","platypus"]);ec="(?:(?:usually|often|sometimes|rarely|always|typically|generally|occasionally|frequently|normally|regularly|commonly|mostly|currently|still|also|really|actually|closely|strongly|directly)\\s+)?",RA="(?:cannot|can't|can not|does not|doesn't|do not|don't|never)",aH=new RegExp(`^(.+?)\\s+(${RA})\\s+(.+)$`,"i"),cH=new RegExp(`^([\\w'-]+)\\s+${ec}([a-z]+)\\s+(.+?)[.!?]*$`,"i"),Ld="connected|related|associated|linked|based|derived|composed|made|used|known|located|found|involved|concerned",ky="with|to|from|by|of|in|on|for|as|about|into",lH=new RegExp(`^(?:the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(?:is|are|was|were)\\s+${ec}(${Ld})\\s+(${ky})\\s+(.+)$`,"i"),uH=new RegExp(`^(?:the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(is|are|was|were)\\s+(?:an?\\s+)?([\\w'-]+)\\s+(${Ld})\\s+(${ky})\\s+(.+)$`,"i"),dH=new RegExp(`^(?:the\\s+|an?\\s+)([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+([a-z]+)\\s+(${Ye})\\s+(.+?)[.!?]*$`,"i"),gd=/^(?:is|are|am|owns|maintains)$/i,bd=/\b(?:is|are|am|owns|maintains)\b/i,TA=new RegExp("^(?:i|me|you|he|him|she|her|it|we|us|they|them|my|your|his|its|our|their|mine|yours|hers|ours|theirs|this|that|these|those|a|an|the|every|each|all|some|any|no|both|either|neither|in|on|at|to|from|by|with|for|of|about|into|onto|over|under|near|before|after|during|through|up|down|off|out|above|below|between|among|against|without|within|along|across|behind|beyond|upon|toward|towards|per|and|but|or|if|because|although|though|while|when|since|unless|until|whether|so|nor|than|as|what|who|whom|whose|which|where|why|how)$","i"),pH=new RegExp(`^(?:${Gs.filter(e=>!/\s/.test(e)).join("|")})$`,"i");AA=new RegExp(`^(?:does|did)\\s+([\\w'-]+)\\s+${ec}([a-z]+)\\s+(.+?)[?.!\\s]*$`,"i"),IA=new RegExp(`^what\\s+(?:does|did)\\s+([\\w'-]+)\\s+${ec}([a-z]+(?:\\s+(?:${Ye}))?)[?.!\\s]*$`,"i"),yd=/^(?:be|own|maintain)$/i,CA=new RegExp(`^(${Ye})\\s+(.+)$`,"i");LA=["first","second","third","then","next","finally","later","meanwhile","afterward","afterwards"],fH=new RegExp(`^(?:${LA.join("|")})\\b\\s*,?\\s+`,"i"),jy=Object.freeze(["you","i","it","they","he","she","we"]),_y=Object.freeze(["you're","i'm","it's","they're","he's","she's","we're"]),NA=Object.freeze([..._y,...jy]),mH=new RegExp(`^(?:every\\s+|each\\s+|all\\s+|some\\s+|a few\\s+|a\\s+|an\\s+)?(${NA.join("|")})\\s+\\S+`,"i"),hH=new RegExp(`^(?:every\\s+|each\\s+|all\\s+|some\\s+|a few\\s+|a\\s+|an\\s+)?(?:(${jy.join("|")})\\s+(?:is|are|am|was|were)|(${_y.join("|")}))\\s+(?:an?\\s+)?[\\w'-]+[.!?]*$`,"i"),gH=new RegExp(`^([\\w-]+)\\s+([a-z]+)s\\s+(${Ye})\\s+([\\w-]+)$`,"i"),bH=new RegExp(`^forget\\s+(?:that\\s+)?([\\w-]+)\\s+([a-z]+)s\\s+(${Ye})\\s+([\\w-]+)$`,"i"),pr="(?:\\s+(?:exactly|really|actually|truly|anyway|internally|properly))?",wH=new RegExp(`^what\\s+does\\s+(.+?)${pr}\\s+do${pr}\\??$`,"i"),yH=new RegExp(`^what\\s+(.+?)${pr}\\s+does${pr}\\??$`,"i"),$H=new RegExp(`^what(?:'s|s|\\s+is)\\s+(.+?)${pr}\\s+do${pr}\\??$`,"i"),Ry="([A-Za-z][\\w'.-]*(?:\\s+[A-Za-z][\\w'.-]*){0,3})",vH=new RegExp(`^who\\s+(?:is|was)\\s+${Ry}$`,"i"),xH=new RegExp(`^what\\s+(?:did|has)\\s+${Ry}\\s+(?:touch(?:ed)?|chang(?:e|ed)|work(?:ed)?\\s+on|commit(?:ted)?)$`,"i"),MA="(?:good|bad|clean|messy|ugly|nice|great|terrible|awful|solid|elegant|readable|maintainable|well[- ]written|well[- ]structured|spaghetti|ok|okay|decent|healthy)",EH=new RegExp(`^is\\s+(?:this|the)\\s+code(?:base)?\\s+(?:any\\s+)?${MA}\\b`,"i"),SH=new RegExp("^(?:what\\s+time\\s+is\\s+it(?:\\s+(?:now|right\\s+now))?|what(?:'s|s|\\s+is)\\s+the\\s+time(?:\\s+(?:now|right\\s+now))?|what\\s+day\\s+is\\s+it(?:\\s+today)?|what(?:'s|s|\\s+is)\\s+(?:the\\s+)?(?:day|date)(?:\\s+today)?|what(?:'s|s|\\s+is)\\s+today'?s\\s+date|what(?:'s|s|\\s+is)\\s+the\\s+weather(?:\\s+like)?(?:\\s+(?:today|outside))?|how'?s\\s+the\\s+weather(?:\\s+like)?(?:\\s+(?:today|outside))?)\\??$","i");kH=new Set([...Object.keys(de).flatMap(e=>e.split(/[\s-]+/)),...Qt,...hn,"owns","maintains"].filter(e=>e.length>=3)),ho={"rdfs:subClassOf":"is a kind of","mgxneg:subClassOf":"is not a kind of","rdf:type":"is a","owl:disjointWith":"is not a","mgx:partOf":"is part of","mgx:hasA":"has","mgx:usedFor":"is used for","mgx:capableOf":"can","mgx:atLocation":"is found in","mgx:causes":"causes","mgx:hasProperty":"is","mgx:madeOf":"is made of","mgx:receivesAction":"can be","mgx:createdBy":"is created by","mgx:mannerOf":"is a way to","mgx:desires":"wants","mgx:locatedNear":"is typically near","mgx:motivatedByGoal":"is motivated by","mgx:obstructedBy":"can be prevented by","mgx:causesDesire":"makes you want to","mgx:hasSubevent":"involves","mgx:hasFirstSubevent":"begins with","mgx:hasLastSubevent":"ends with","mgx:hasPrerequisite":"requires","mgx:ownedBy":"is owned by","mgx:rendersAs":"renders as","mgx:synonym":"means the same as","mgx:antonym":"is the opposite of","mgx:similarTo":"is similar to","mgx:relatedTo":"is related to","mgx:symbolOf":"is a symbol of","mgx:currently-in":"is in","mgx:located-in":"is in","mgx:fixed-in":"is fixed in","mgx:stands-locked-in":"stands locked in","mgx:works-in":"works in"},iy=new Set(["mgx:hidden-in","mgx:is-objective","mgx:unlocks-with","mgx:is-npc","mgx:acts-on-turn","mgx:acts-toward","mgx:is-container","mgx:is-open"]),Nd=new Set(["mgx:currently-in","mgx:located-in","mgx:fixed-in","mgx:stands-locked-in","mgx:works-in"]);Pt=e=>`${e.subject} ${Ay(e.predicate)} ${e.object}`;FA=Object.entries(ho).filter(([e])=>!Nd.has(e)).map(([e,t])=>{let n=/^(?:is|are)\s+(.+)$/i.exec(t);return n?{predicate:e,marker:n[1].trim().toLowerCase()}:null}).filter(e=>e&&e.marker.length>1).sort((e,t)=>t.marker.length-e.marker.length);zA=/ \(source: [^)]*\)$/;UA=8;Xa=null;VA=/^(?:every|each|all|any)\s+/i;Cy=new Set(["module","modules","class","classes","function","functions","method","methods","handler","handlers","controller","controllers","service","services","component","components","flow","flows","thing","things","item","items","object","objects","commit","commits"]),jH=new Set([["interpreter","compiler"],["string","thread"],["heart","kernel"],["battalion","heap"],["bash","sock"],["command","skill"],["docker","longshoreman"],["name","list"],["list","number"]].map(([e,t])=>[e,t].sort().join("|"))),kd=/^(?:is|are|was|were)\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)\s+(?:the|an?)\s+([a-z][\w-]*)\s+of\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,Oy=/^(?:who|what)\s+(?:is|are)\s+(?:the|an?)\s+([a-z][\w-]*)\s+of\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,HA=/^(?:who|what)\s+(?:is|are|was|were)\s+([\w-]+(?:\s+[A-Z][\w-]*)?)'s\s+([a-z][\w-]*)[?.!\s]*$/i,KA=/^(who|what)'?s\s+/i,Za=e=>String(e).replace(KA,(t,n)=>`${n} is `),YA=/^(?:who|what)\s+(?:is|are|was|were)\s+([\w-]{2,}?)s\s+([a-z][\w-]*)[?.!\s]*$/i;XA=/^list\s+(?:the\s+|all\s+)?([a-z][\w-]*)\s+of\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,Ns=/^(?:is|are)\s+(?:an?\s+)?(.+?)\s+(?:a\s+kind\s+of|a\s+type\s+of|an?)\s+(.+?)[?.!\s]*$/i,is=new Set(["rdfs:subClassOf","rdf:type"]),JA=6,QA=/^why\s+(?=(?:is|are)\b)/i,ZA=/^explain\s+how\s+you\s+know\s+(?:that\s+)?(.+?)\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i;_d=new Set(["kind","sort","type","subclass","superclass"]),uy=/^(?:so\s+)?(.+?)\s+(?:is|are)\s+(?:an?\s+)?(.+?)\s*,?\s*(?:now\s+)?(?:right|correct|yeah)\??$/i,eI=/^(?:what\s+do\s+you\s+know\s+about|what(?:'s|s|\s+is)\s+in\s+your\s+memory\s+about|what\s+do\s+you\s+remember\s+about)\s+(.+?)[?.!\s]*$/i,je=32,tI=/^(?:can|could)\s+(all\s+|every\s+)?(?:an?\s+)?([\w'-]+(?:\s+[\w'-]+)*?)\s+([a-z]+)[?.!\s]*$/i,nI=/^(?:does|do)\s+(?:an?\s+|the\s+)?(.+?)\s+have\s+(?:an?\s+|the\s+)?(.+?)[?.!\s]*$/i,sI=/^what\s+can\s+(?:an?\s+)?(.+?)\s+do[?.!\s]*$/i,oI=/^what\s+has\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,rI=/^what\s+(?:(?:can\s+be|is)\s+used\s+for|is\s+for)\s+(.+?)[?.!\s]*$/i,iI=/^where(?:'s|\s+is|\s+are)\s+(.+?)(?:\s+now)?\s*[?.!]*$/i,aI=/^where\s+(?:does|do|did)\s+(.+?)\s+[a-z][a-z'-]*(?:\s+now)?\s*[?.!]*$/i,cI=new RegExp(`^what(?:'s|\\s+is|\\s+are)\\s+(${Ye})\\s+(.+?)\\s*[?.!]*$`,"i"),lI=/^what\s+([a-z][\w-]*)\s+(?:does|do)\s+(?:an?\s+|the\s+)?(.+?)\s+([a-z][a-z-]*)\s*[?.!]*$/i,uI=/^(?:do|does)\s+(all\s+|every\s+)?(?:an?\s+|the\s+)?([\w'-]+(?:\s+[\w'-]+)*?)\s+([a-z-]+)[?.!\s]*$/i,dI=/^what\s+can\s+(?!be\s)(.+?)[?.!\s]*$/i,pI=/^what\s+(?:cannot|can't|cant|can\s+not)\s+(.+?)[?.!\s]*$/i,fI=/^(?:which|what)\s+([\w'-]+(?:\s+[\w'-]+)*?)\s+can\s+(.+?)[?.!\s]*$/i;py=e=>String(e||"").replace(/\s+/g," ").trim();Ny="(?:most|least)\\s+[a-z][\\w-]*|[a-z][\\w-]*est|best|worst",hI=new RegExp(`^which\\s+([\\w'-]+)\\s+(?:is|are)\\s+(?:the\\s+)?(${Ny})[?.!\\s]*$`,"i"),gI=new RegExp(`^what(?:'s|s|\\s+is)\\s+the\\s+(${Ny})\\s+([\\w'-]+)[?.!\\s]*$`,"i");wI=new Set(["rdfs:subClassOf","rdf:type","mgx:hasA","mgx:capableOf","mgx:usedFor","mgx:ownedBy","owl:disjointWith","mgx:hasProperty","mgx:receivesAction"]),yI=Object.entries(ho).filter(([e])=>!wI.has(e)&&!Nd.has(e)).map(([e,t])=>({predicate:e,re:new RegExp(`^what\\s+${Je(t)}\\s+(.+?)[?.!\\s]*$`,"i")})).sort((e,t)=>t.re.source.length-e.re.source.length),$I=new Set(["rdfs:subClassOf","rdf:type","owl:disjointWith","mgx:hasProperty","mgx:hasA","mgx:capableOf","mgx:ownedBy"]),vI=Object.entries(ho).filter(([e])=>!$I.has(e)&&!Nd.has(e)).map(([e,t])=>{let n;if(t==="can be")n=new RegExp("^can\\s+(?:an?\\s+|the\\s+)?(.+?)\\s+be\\s+(.+?)[?.!\\s]*$","i");else if(t.startsWith("is ")){let s=Je(t.slice(3));n=new RegExp(`^(?:is|are)\\s+(?:an?\\s+|the\\s+)?(.+?)\\s+${s}\\s+(?:an?\\s+|the\\s+)?(.+?)[?.!\\s]*$`,"i")}else{let[s,...o]=t.split(" "),r=[Ty(s),...o].map(Je).join("\\s+");n=new RegExp(`^(?:does|do)\\s+(?:an?\\s+|the\\s+)?(.+?)\\s+${r}\\s+(?:an?\\s+|the\\s+)?(.+?)[?.!\\s]*$`,"i")}return{predicate:e,phrase:t,re:n}}).sort((e,t)=>t.re.source.length-e.re.source.length),hy=/^what\s+(?:inherits?\s+(?:from\s+)?(?:an?\s+)?|is\s+(?:an?\s+)?(?:kind|sort|type)\s+of\s+|is\s+(?:an?\s+)?subclass\s+of\s+)(.+?)[?.!\s]*$/i,xI=new Set(["changed","change","changes","updated","modified","happened","occurred"]);SI=/^what\s+(?:did|have)\s+(?:i|we|you)\s+(?:told|tell|said|say)\s+(?:you|me|us)?\s*about\s+(.+?)[?.!\s]*$/i,kI=/^what\s+kind\s+of\s+(?:thing|class|type|category|entity)?\s*(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,jI=/^does\s+every\s+(.+?)\s+have\s+at\s+least\s+(\d+)\s+(.+?)[?.!\s]*$/i,_I=/^does\s+an?\s+(.+?)\s+have\s+an?\s+(.+?)[?.!\s]*$/i,gy=new Set(["owl:cardinality","owl:minCardinality","owl:maxCardinality","owl:onClass"]),RI=/^who\s+(?:owns|maintains)\s+(.+?)[?.!\s]*$/i,TI=/^(?:does|did)\s+([\w'-]+)\s+(?:owns?|maintains?)\s+(.+?)[?.!\s]*$/i,AI=/^(?:is|are|was|were)\s+(.+?)\s+owned\s+by\s+([A-Za-z][\w'-]*(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,II=/^(?:does|did)\s+([\w'-]+)\s+(?:has|have)\s+an?\s+([a-z][\w-]*)\s+method[?.!\s]*$/i,CI=/^what\s+methods\s+does\s+([\w'-]+)\s+have[?.!\s]*$/i,by=/^(?:is|are|was|were)\s+(.+?)\s+([A-Za-z][\w-]*)[?.!\s]*$/i,rs=/^(?:it|this|that)$/i,wy=/^(?:it|this|that)(?:\s+one)?\s+(?:before|after)\b/i,yy=/^(?:you|i|they|he|she|we)\b/i,$y=(e,t)=>({text:`I don't know anything about "${e}" yet \u2014 teach me directly, e.g. "remember that ${Qa(e)} is ${t}".`,replace:!0}),OI=/^(?:what\s+(?:did|have)\s+(?:i|we)\s+(?:told?|tell|said?|say)\s+(?:you|me|us)?(?:\s+(?:last\s+time|before|earlier|previously|already))?|what\s+facts?\s+do\s+you\s+(?:know|have|remember)|what\s+do\s+you\s+(?:know|remember)|what\s+have\s+you\s+(?:learned|learnt|remembered))[?.!\s]*$/i;NI=/inherit|supertype|subclass|extend|specializ/i,MI=8;_H=new RegExp(`\\b(?:${[...Ad].join("|")})\\b`,"i"),Dy=/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,FI=/^who\s+(?:is|are|was|were)\s+(?:an?\s+|the\s+)?([\w'-]+)[?.!\s]*$/i;RH=new RegExp(`^(?:(?:the|a|an)\\s+)?(.+?)\\s+(${Object.keys(We).join("|")})$`,"i"),Ed="(?:(?:can|could|would)\\s+you\\s+(?:please\\s+)?)?(?:(?:show|give)\\s+(?:me|us)\\s+|describe\\s+|explain\\s+|what(?:'s|s|\\s+is)\\s+)?",Td="(?:of|for)\\s+(?:this|the)\\s+(?:app|codebase|repo|repository|project|code)",DI=`(?:\\s+${Td})?`,TH=[new RegExp(`^${Ed}the\\s+architecture(?:\\s+(?:overview|map|diagram))?${DI}(?:\\s+here)?\\??$`,"i"),new RegExp(`^${Ed}architecture\\s+(?:${Td}|overview|map|diagram)\\??$`,"i"),new RegExp(`^${Ed}(?:(?:an?|the)\\s+)?(?:overview|map|diagram)\\s+${Td}(?:\\s+here)?\\??$`,"i")],AH={find:"locate a specific named entity",search:"locate a specific named entity",context:"gather the sized edit bundle for a symbol before changing code",snippet:"view a symbol's exact source",describe:"look up a symbol's definition and relations",signature:"view a symbol's signature",members:fn.contains,subclasses:fn.inherits,impact:"understand what a change to this module would reach (impact closure)",callers:fn.calls,callees:fn.calls,tests:fn.tests,untested:fn.tests,history:fn.touches,exports:fn.reexports,arch:"understand the overall architecture (package/module boundaries)",capabilities:"see what /plan can plan over \u2014 built-in query tools and taught actions",syllogise:"materialize the entailed facts that follow from what's remembered about one term",wiki:"toggle the live Wikipedia supplement for questions nothing local can answer",export:"write the memory store to a file, in the standard JSONL shape",ingest:"read a local text file and store every fact the recognizer grounds from it"},zy="(?:changed?|modif(?:y|ied)|edits?|edited|touch(?:es|ed)?|updates?|updated|alters?|altered|deletes?|deleted|removes?|removed|drops?|dropped)",IH=new RegExp(`^what\\s+(?:would|will|might|could|does|do)?\\s*(?:breaks?|fails?|happens?|stops?\\s+working|is\\s+affected|are\\s+affected|gets?\\s+affected|be\\s+affected|is\\s+impacted|be\\s+impacted)\\s+if\\s+(?:i|we|you|one|someone)\\s+${zy}\\s+(?:the\\s+)?(.+?)[?.!\\s]*$`,"i"),CH=new RegExp(`^if\\s+(?:i|we|you|one|someone)\\s+${zy}\\s+(?:the\\s+)?(.+?),?\\s+what\\s+(?:would\\s+|will\\s+|might\\s+|could\\s+|does\\s+|do\\s+)?(?:breaks?|fails?|happens?|stops?\\s+working|is\\s+affected|are\\s+affected|gets?\\s+affected|be\\s+affected|would\\s+break|will\\s+break)[?.!\\s]*$`,"i"),OH=new RegExp("^what\\s+(?:is|are|gets?|would\\s+be|will\\s+be)\\s+(?:affected|impacted|broken)\\s+(?:by|when|if)\\s+(?:i\\s+|we\\s+|you\\s+)?(?:chang(?:e|es|ing)|edit(?:s|ing)?|modif(?:y|ies|ying)|touch(?:es|ing)?|updat(?:e|es|ing)|delet(?:e|es|ing)|remov(?:e|es|ing)|a\\s+change\\s+to)\\s+(?:the\\s+)?(.+?)[?.!\\s]*$","i"),LH=new RegExp("^(?:(?:can|could)\\s+(?:i|we|you|one|someone)\\s+safely|is\\s+it\\s+safe\\s+to)\\s+(?:change|edit|modify|touch|update|alter|delete|remove|drop)\\s+(?:the\\s+)?(.+?)[?.!\\s]*$","i"),NH=new RegExp("^(?:what(?:'s|\\s+is)\\s+the\\s+)?(?:blast\\s+radius|impact)\\s+(?:of|for)\\s+(?:chang(?:ing|es)\\s+|editing\\s+|modifying\\s+|touching\\s+|updating\\s+|deleting\\s+|removing\\s+)?(?:the\\s+)?(.+?)[?.!\\s]*$","i"),tc="as\\s+(?:its|the|an?)?\\s*(?:base\\s+class|parent\\s+class|base|parent)",MH=new RegExp(`^(.+?)\\s+uses?\\s+(?:which\\s+[\\w'-]+|what)\\s+${tc}\\s*\\??$`,"i"),PH=new RegExp(`^what\\s+(?:does|do|did)\\s+(.+?)\\s+uses?\\s+${tc}\\s*\\??$`,"i"),FH=new RegExp(`^(?:does|do|did)\\s+(.+?)\\s+uses?\\s+(.+?)\\s+${tc}\\s*\\??$`,"i"),DH=new RegExp(`^(.+?)\\s+uses?\\s+(.+?)\\s+${tc}\\s*[.!]*$`,"i"),zI=Object.freeze([...Ad].filter(e=>e!=="here").concat("they")),zH=new RegExp(`^((?:is|are|can|could|does|do)\\s+|what\\s+(?:is|are)\\s+)(${zI.join("|")})\\b(\\s+\\S.*)?$`,"i"),UH=Q(".tmct","memory","corpus-seed.json")});Ha();Be();fs();Ua();var nc={uninformativeClassMaxShare:.35,uninformativeClassMinSubjects:12,entailedDepthPenalty:.2,minoritySensePenalty:.5,minScore:.05,groupSplitThreshold:4,openerConceptCount:2,maxObjectsPerBodySentence:4,maxBodySentences:4,closerRootCount:2,budget:{chatReply:5,researchPanel:10,cliDigest:12,ledgerTerm:8}};var Wy=Object.freeze({"rdfs:subClassOf":"isa","rdf:type":"isa","mgx:atLocation":"location","mgx:locatedNear":"location","mgx:partOf":"partOf","mgx:capableOf":"capableOf","mgx:usedFor":"usedFor"}),go=Object.freeze(["isa","location","partOf","capableOf","usedFor","other"]),sc=e=>Wy[e]||"other",BI=e=>Math.max(0,Math.min(1,e));function Uy(e){let t=(e.sourceTypes||[]).map(n=>Vs[n]??0);return t.length?Math.max(...t):typeof e.trust=="number"&&e.trust>0?e.trust:Vs.entailed}function WI(e){return Array.isArray(e.environments)&&e.environments.length?!0:(e.sourceTypes||[]).includes("entailed")}function By(e,t){let n=Number(t?.totalSubjects)||0;return n<=0?0:(Number(t?.classSubjectCounts?.[e])||0)/n}function Gy(e,t,n={},s={}){let o={...nc,...s.config||{}},r=Number.isInteger(s.budget)?s.budget:o.budget.chatReply,i=(t||[]).filter($=>$&&$.object&&$.object!==e),a=[],l=(Number(n?.totalSubjects)||0)>=o.uninformativeClassMinSubjects,c=[];for(let $ of i){if(sc($.predicate)==="isa"){let x=By($.object,n);if(l&&x>o.uninformativeClassMaxShare){a.push({row:$,family:"isa",reason:"uninformative-class",share:x});continue}}c.push($)}let u=c.filter($=>sc($.predicate)==="isa").map($=>$.object),d=za(u,{subClassEdges:n.subClassEdges||[],disjointEdges:n.disjointEdges||[]}),f=new Map,p=new Map;for(let $ of d.clusters){let x=0;for(let E of $.objects){p.set(E,$.label);let S=c.find(R=>R.object===E&&sc(R.predicate)==="isa");x+=S?Uy(S):0}f.set($.label,x)}let m=null,h=-1;for(let[$,x]of[...f].sort((E,S)=>E[0].localeCompare(S[0])))x>h&&(h=x,m=$);let g=[];for(let $ of c){let x=sc($.predicate),E=Uy($),S={provenance:E};if(WI($)&&(E-=o.entailedDepthPenalty,S.entailed=!0),x==="isa"){let k=.6+.4*(1-By($.object,n));E*=k,S.informativeness=k;let A=p.get($.object);m&&A&&A!==m&&(E-=o.minoritySensePenalty,S.minoritySense=A)}E=BI(E),g.push({row:$,family:x,score:E,reasons:S})}let b=[];for(let $ of g)$.score<o.minScore?a.push({row:$.row,family:$.family,reason:"below-floor",score:$.score}):b.push($);let y=new Map;for(let $ of b)y.has($.family)||y.set($.family,[]),y.get($.family).push($);for(let $ of y.values())$.sort((x,E)=>E.score-x.score||x.row.object.localeCompare(E.row.object));let w=go.filter($=>y.has($)).concat([...y.keys()].filter($=>!go.includes($)).sort()),v=[],_=!1;for(;v.length<r&&!_;){_=!0;for(let $ of w){let x=y.get($);if(x&&x.length&&(v.push(x.shift()),_=!1,v.length>=r))break}}for(let $ of w)for(let x of y.get($)||[])a.push({row:x.row,family:x.family,reason:"over-budget",score:x.score});return v.sort(($,x)=>{let E=go.indexOf($.family),S=go.indexOf(x.family);return E-S||x.score-$.score||$.row.object.localeCompare(x.row.object)}),{term:e,selected:v,cut:a,senses:{split:d.split,clusters:d.clusters,dominantLabel:m}}}Wi();qt();var GI=new Set(["isa","location","partOf","capableOf","usedFor"]),qI=new Set(["single","several","chained","group","closer"]),qy=(e,t)=>`${e}:${t}`;function Md(e){let t=new Map;for(let n of e||[]){if(!n||typeof n.family!="string"||!GI.has(n.family)||typeof n.form!="string"||!qI.has(n.form)||typeof n.template!="string"||!n.template.trim())continue;let s=qy(n.family,n.form);t.has(s)||t.set(s,{family:n.family,form:n.form,templates:[]});let o=t.get(s);o.templates.includes(n.template)||o.templates.push(n.template)}return t}var bo=e=>`${No(e)} ${e}`;function VI(e){let t=(e||[]).map(o=>String(o||"").trim()).filter(Boolean);if(!t.length)return"";let n=bo(t[0]),s=t.slice(1);return s.length?`${n}, and so ${_r(s.map(bo))}`:n}function HI(e,t,n,s){let o=String(e||"").trim(),r=(t||[]).map(l=>String(l||"").trim()).filter(Boolean),i=r[0]||"",a=String(s||"").trim();return{TERM:o,TERM_CAP:Mo(o),A_TERM:bo(o),A_TERM_CAP:Mo(bo(o)),TERMS:Bi(o),TERMS_CAP:Mo(Bi(o)),PRONOUN:"it",PRONOUN_CAP:"It",PARENT:a,A_PARENT:a?bo(a):"",OBJECT:i,A_OBJECT:i?bo(i):"",OBJECTS_A:_r(r.map(bo)),OBJECTS_PLURAL:_r(r.map(Bi)),OBJECTS_RAW:_r(r),CHAIN:VI(n&&n.length?n:r.slice(0,1))}}function KI(e,t){return String(e).replace(/\{([A-Z_]+)\}/g,(n,s)=>s in t?t[s]:"").replace(/\s+/g," ").replace(/\s+([.,;])/g,"$1").trim()}function as(e,t,n,s={}){let o=(n||[]).filter(Boolean);if(!o.length)return null;let r=s.term??o[0].subject??"",i=s.form||(o.length>1?"several":"single"),a=e instanceof Map?e.get(qy(t,i)):null,l=a?a.templates:null;if(!l||!l.length)return null;let c=s.variantSeed??"",u=Pr(`${r}|${t}|${i}|${c}`)%l.length,d=s.objectsOverride||o.map(p=>p.object),f=KI(l[u],HI(r,d,s.chain,s.parent));return f?{text:f,rows:o,family:t,form:i}:null}Wi();var YI=go.filter(e=>e!=="isa"&&e!=="other");function XI(e){let t=new Map;for(let n of e||[])t.has(n.family)||t.set(n.family,[]),t.get(n.family).push(n.row);return t}function Vy(e,t){let n=Math.max(1,Math.trunc(t)||1),s=[];for(let o=0;o<(e||[]).length;o+=n)s.push(e.slice(o,o+n));return s}function JI(e,t){let n=l=>(t?.[l.object]||[])[1]||null,s=new Map;for(let l of e||[]){let c=n(l);c&&s.set(c,(s.get(c)||0)+1)}let o=new Map,r=[],i=[];for(let l of e||[]){let c=n(l);c&&s.get(c)>=2?(o.has(c)||(o.set(c,[]),r.push(c)),o.get(c).push(l)):i.push(l)}let a=r.map(l=>({parent:l,rows:o.get(l)}));return i.length&&a.push({parent:null,rows:i}),a}function QI(e,t,n){let s=new Map,o=new Map;for(let l of t||[]){let c=e?.[l.object];if(!Array.isArray(c)||c.length<2)continue;let u=c[c.length-1];!u||u===l.object||(s.set(u,(s.get(u)||0)+1),o.has(u)||o.set(u,[]),o.get(u).push(l))}let r=[...s.keys()].sort((l,c)=>s.get(c)-s.get(l)||l.localeCompare(c)).slice(0,Math.max(0,n)),i=[],a=new Set;for(let l of r)for(let c of o.get(l)||[])a.has(c.id)||(a.add(c.id),i.push(c));return{roots:r,rows:i}}function ZI(e,t,n,s,o){let r=[];if(!e.length)return r;if(e.length===1){let f=t[e[0].object],p=f&&f.length>1?"chained":"single",m=as(s,"isa",e,{term:n,form:p,chain:f});return m&&r.push({...m,role:"names-term",paragraph:"definition"}),r}if(e.length<=o.groupSplitThreshold){let f=as(s,"isa",e,{term:n,form:"several"});return f&&r.push({...f,role:"names-term",paragraph:"definition"}),r}let i=e.slice(0,o.openerConceptCount),a=e.slice(o.openerConceptCount),l=as(s,"isa",i,{term:n,form:i.length>1?"several":"single",variantSeed:n});l&&r.push({...l,role:"names-term",paragraph:"definition"});let c=[];for(let f of JI(a,t))for(let p of Vy(f.rows,o.maxObjectsPerBodySentence))c.push({parent:f.parent,rows:p});if(c.length>o.maxBodySentences){let f=c.slice(0,o.maxBodySentences),p=f[f.length-1];for(let m of c.slice(o.maxBodySentences))p.rows=p.rows.concat(m.rows);p.parent=null,c=f}for(let f of c){let p=f.parent?as(s,"isa",f.rows,{term:n,form:"group",parent:f.parent,variantSeed:f.parent}):as(s,"isa",f.rows,{term:n,form:"several",variantSeed:n});p&&r.push({...p,role:"describes-isa",paragraph:"definition"})}let{roots:u,rows:d}=QI(t,e,o.closerRootCount);if(u.length){let f=as(s,"isa",d.length?d:e,{term:n,form:"closer",objectsOverride:u,variantSeed:n});f&&r.push({...f,role:"closes-isa",paragraph:"definition"})}return r}function eC(e,t){if(!e.length)return;let n=e[0];if(/\bnames-term\b/.test(n.role))return;let s=Mo(`${No(t)} ${t}`);n.text=n.text.replace(/^It\b/,s),n.role="names-term"}function tC(e,t){let n=[],s=null,o=null;for(let r of e)(!s||r.paragraph!==o||s.length>=t)&&(s=[],o=r.paragraph,n.push(s)),s.push(r);return n.map(r=>({sentences:r,text:r.map(i=>i.text).join(" ")}))}function Hy(e,t,n={}){let s=e?.term||"",o=Number.isInteger(n.maxSentencesPerParagraph)?n.maxSentencesPerParagraph:3,r=n.chains||{},i={...nc,...n.config||{}},a=XI(e?.selected||[]),l=[];for(let u of ZI(a.get("isa")||[],r,s,t,i))l.push(u);for(let u of YI){let d=a.get(u);if(!(!d||!d.length))for(let f of Vy(d,i.maxObjectsPerBodySentence)){let p=as(t,u,f,{term:s});p&&l.push({...p,role:"describes",paragraph:"description"})}}eC(l,s);let c=new Map;for(let u of l)for(let d of u.rows)c.has(d.id)||c.set(d.id,d);return{term:s,sentences:l,paragraphs:tC(l,o),provenanceRows:[...c.values()]}}var nC=e=>({subject:e.subject,predicate:e.predicate,object:e.object,sourceTypes:e.sourceTypes||[],provenance:e.provenance||""});function sC(e){let t=new Set,n=[];for(let s of e||[]){let o=s.provenance||(s.sourceTypes||[]).join(",");!o||t.has(o)||(t.add(o),n.push({provenance:s.provenance||"",sourceTypes:s.sourceTypes||[]}))}return n}var oC=Object.freeze({facts:"show the facts",chains:"show the chains"});function rC(e,t){let n=[...(e?.selected||[]).map(o=>o.row),...(e?.cut||[]).map(o=>o.row)].filter(Boolean),s=Object.entries(t||{}).filter(([,o])=>Array.isArray(o)&&o.length>1).map(([o,r])=>({object:o,chain:r}));return{escapes:oC,facts:n.map(nC),factCount:n.length,chains:s}}function Ky(e,t,n={}){let s=t?.term||e?.term||"";return{kind:"term-article",term:s,headline:s,paragraphs:(t?.paragraphs||[]).map(o=>o.text).filter(Boolean),body:t?.paragraphs||[],sources:sC(t?.provenanceRows||[]),detail:rC(e,n.chains),provenanceRows:t?.provenanceRows||[]}}function Yy(e,t,n={},s=new Map,o={}){let r=Gy(e,t,n,o),i=Hy(r,s,o);return Ky(r,i,o)}Ua();var Xy=new Set(["rdfs:subClassOf","rdf:type"]);function Jy(e){let t=new Map,n=new Set,s=[],o=[];for(let i of e||[])!i||!i.predicate||(Xy.has(i.predicate)?(n.add(i.subject),t.has(i.object)||t.set(i.object,new Set),t.get(i.object).add(i.subject),s.push([i.subject,i.object])):i.predicate==="owl:disjointWith"&&o.push([i.subject,i.object]));let r={};for(let[i,a]of t)r[i]=a.size;return{classSubjectCounts:r,totalSubjects:n.size,subClassEdges:s,disjointEdges:o}}function Qy(e,t,n=6){let s=oi(e||[]),o={};for(let r of t||[]){if(r in o)continue;let i=Da(r,s,{cap:n});i.length>1&&(o[r]=i)}return o}function Zy(e){let t=[],n=new Set;for(let s of e||[])!s||!Xy.has(s.predicate)||n.has(s.object)||(n.add(s.object),t.push(s.object));return t}Be();Ha();function iC(e,t,n,s,o={}){let r=Md(s||[]);if(!r||r.size===0)return null;let i=t||[],a=Jy(n||i),l=Qy(a.subClassEdges,Zy(i));return Yy(e,i,a,r,{...o,chains:l})}function e$(e,t,n,s={}){let o=vt(e||{individuals:[],objectProperties:[]}),r=Y(X,t),i=o.filter(l=>r.has(l.subject));if(!i.length)return null;let a=iC(t,i,o,n,s);return aC(a)}function aC(e){if(!e||!Array.isArray(e.paragraphs)||!e.paragraphs.length)return null;let t=e.detail&&Array.isArray(e.detail.facts)?e.detail.facts:[];return{term:e.term||"",paragraphs:e.paragraphs.slice(),sources:[...new Set((e.sources||[]).map(n=>n.provenance).filter(Boolean))],facts:t,factCount:e.detail&&Number.isInteger(e.detail.factCount)?e.detail.factCount:t.length}}var cC="no session is open on this page yet \u2014 await tmct.open() first",t$=Symbol.for("tmct.surface.fallback");function n$({open:e,ask:t=null,plan:n=null,turn:s=null,page:o={},fallback:r=!1,target:i=globalThis}={}){if(typeof e!="function")throw new Error("publishTmctSurface: `open` must be this page's session factory");let a=i.tmct;if(r&&a&&!a[t$])return a;let l=null,c=()=>{if(!l)throw new Error(cC);return l},u={async open(...d){return l=await e(...d),l},get session(){return l},async turn(d,f){let p=c();return s?s(d,f,p):typeof p.turn!="function"?{answer:"this page runs no conversational turn \u2014 see tmct.session for what it does run",end:!1,record:null,plan:null,research:null}:p.turn(d,f)},async ask(d,f){return t?t(d,f,c()):{answer:"this page has no separate ask route \u2014 it answers questions through tmct.turn()",data:void 0,miss:!0}},async plan(d,f){return n?n(d,f,c()):{refused:!0,why:"this page's bundle carries no capability planner",driver:null,calls:[],composed:null,observed:null}},page:o,fallback:r};return u[t$]=r,i.tmct=u,u}function lC({payload:e=null}={}){let t=xa();return e&&(t.payload=e),{memoryDir:t}}async function uC(e,t,n){let s=null;try{s=await My(n.memoryDir,e,null,!0,{})}catch{s=null}if(!(s&&s.text))try{s=await Fy(n.memoryDir,e,null,!0,null)}catch{s=null}return s&&s.text?{answer:s.text,data:s,miss:!1}:{answer:null,data:null,miss:!0}}n$({open:lC,ask:uC,page:{normFactTerm:X,digestTermFromPayloadBrowser:e$},fallback:!0});})();