@polycode-projects/the-mechanical-code-talker 5.0.24 → 5.0.25
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,4 +1,4 @@
|
|
|
1
|
-
(()=>{var Kx=Object.defineProperty;var C=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(s){throw n=[s],s}};var Gt=(e,t)=>{for(var n in t)Kx(e,n,{get:t[n],enumerable:!0})};var lt,D0,z0,U0,B0,W0,G0,V0,q0,H0,K0,Y0,X0,J0,Q0,Z0,e1,Z,he,Pt,cl,jf,t1,n1,s1,We=C(()=>{lt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},D0=lt("createRequire"),z0=lt("readFileSync"),U0=lt("access"),B0=lt("readFile"),W0=lt("writeFile"),G0=lt("appendFile"),V0=lt("mkdir"),q0=lt("mkdtemp"),H0=lt("rename"),K0=lt("unlink"),Y0=lt("rm"),X0=lt("stat"),J0=lt("copyFile"),Q0=lt("readdir"),Z0=lt("createReadStream"),e1=lt("createWriteStream"),Z=(...e)=>e.join("/"),he=e=>String(e).replace(/\/[^/]*$/,""),Pt=(...e)=>e.join("/"),cl=e=>String(e).startsWith("/"),jf="/",t1=lt("randomBytes"),n1=lt("spawnSync"),s1=lt("createInterface")});var ut,r1,i1,ll,Re,_r,Yx,An,Xx,Mi,ul,Jx,Qx,a1,Zx,c1,l1,u1,d1,p1,_t=C(()=>{ut=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},r1=ut("createRequire"),i1=ut("readFileSync"),ll=ut("access"),Re=ut("readFile"),_r=ut("writeFile"),Yx=ut("appendFile"),An=ut("mkdir"),Xx=ut("mkdtemp"),Mi=ut("rename"),ul=ut("unlink"),Jx=ut("rm"),Qx=ut("stat"),a1=ut("copyFile"),Zx=ut("readdir"),c1=ut("createReadStream"),l1=ut("createWriteStream"),u1=ut("randomBytes"),d1=ut("spawnSync"),p1=ut("createInterface")});function Co(e){let t=tE.exec(String(e||""));return t?t[1].toLowerCase():null}function Fi(e){return String(e||"").replace(nE,"$1")}function Es(e){return e.replace(sE,"").trim()}function nn(e){let t=e;for(let n=0;n<2;n+=1){let s=t.replace(rE,"").trim();if(s=s.replace(aE,"").trim(),s===t)break;t=s}return t}var Rf,Tr,Js,_f,Tf,eE,tE,Ar,tn,dl,nE,$n,pl,sE,oE,rE,iE,aE,de,Ir,Di,cE,Af,Ge,sn,Ss,If,fl,hl,ml,Cf,Cr,Qs,Of,Lf,Zs,Zn,es,Oo,Qe,Nf,eo,to,In,Cn,Pf,Or,Lo,zi,No,Mf,On=C(()=>{Rf=["is a superclass of","are a superclass of","is a parent class of","are a parent class of","superclass","superclasses"],Tr={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",...Rf]},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"]}},Js=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:hasMass",comment:"individual -> number: the subject's current mass.",nouns:Object.freeze(["mass","masses","weight","weights"]),reads:"has mass"})}),_f=Object.freeze(Object.fromEntries(Object.entries(Js).flatMap(([e,{nouns:t}])=>t.map(n=>[n,e])))),Tf=Object.freeze(Object.values(Js).map(e=>e.predicate)),eE=Object.freeze(["on","in","at","inside","under","below","above","near","beside","behind","by"]),tE=new RegExp(`^mgx:[a-z]+-(${eE.join("|")})$`,"i");Ar=Object.freeze([...Rf,"is the superclass of","are the superclass of","is the parent class of"]),tn=Object.freeze(["defined","declared","located","implemented"]),dl=Object.freeze(["now","currently","right now","at the moment","these days","today"]),nE=new RegExp(`\\s+(?:${[...dl].sort((e,t)=>t.length-e.length).join("|")})(\\s*[?.!]*)$`,"i");$n=Object.freeze(["mentioned","referenced"]),pl=Object.freeze(["in this graph","in the graph","in this codebase","in the codebase","in this repo","in the repo","here"]),sE=new RegExp(`\\s+(?:${pl.join("|")})\\s*[?.!]*$`,"i");oE=Object.freeze(["then","though","too"]),rE=new RegExp(`\\s+(?:${oE.join("|")})\\s*[?.!]*$`,"i"),iE=Object.freeze(["please explain","explain"]),aE=new RegExp(`,\\s*(?:${iE.join("|")})\\s*[?.!]*$`,"i");de=Object.freeze(Object.fromEntries(Object.entries(Tr).flatMap(([e,{verbs:t}])=>t.map(n=>[n,e])))),Ir=Object.freeze(new Set(["has","have","holds","hold"])),Di=Object.freeze(new Set(["search","describe","signature","impact","members","subclasses","exports","callers","callees","calls","tests","untested","history","cochanges","architecture","arch","related","sprite"])),cE=e=>!Ar.includes(e),Af=Object.freeze([...new Set(Object.keys(de).filter(cE).map(e=>e.match(/^(?:is|are)\s+an?\s+(.+)$/i)).filter(Boolean).map(e=>e[1].toLowerCase()))]),Ge=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"}),sn=Object.freeze({explicitly:"direct",directly:"direct",transitively:"transitive",indirectly:"transitive"}),Ss=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"}),If=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"}}),fl=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"}),hl=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"}),ml=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"}),Cf=/\b([a-z]{3,})in'/gi,Cr=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"]),Qs=Object.freeze(["this","it","that","here","this one","that one"]),Of=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]}`}]),Lf=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`}]),Zs=Object.freeze(["mean","means","stand for","stands for","signify","signifies","represent","represents","refer to","refers to"]),Zn=Object.freeze(["that","which","who"]),es=Object.freeze(["something","anything","everything","somethings","things","thing","entities","entity","nodes","node","stuff","code","symbol","symbols"]),Oo=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"}),Qe=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}}),Nf=Object.freeze(new Set(["tests","test","anything","something","anyone","someone","any"])),eo=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"]),to=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"]),In=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"}),Cn=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"}}),Pf=Object.freeze({tests:"Module",test:"Module"}),Or=Object.freeze(["those","them","these"]),Lo=Object.freeze(["contains","defines"]),zi=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"]),No=Object.freeze({tally:"count",tallies:"count",sum:"count",total:"count",totals:"count"}),Mf=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 Ve,ks,Ui=C(()=>{Ve="#000000",ks=Object.freeze({happy:`<circle cx="-0.4" cy="-0.15" r="0.11" fill="${Ve}" opacity="0.85"/><circle cx="0.4" cy="-0.15" r="0.11" fill="${Ve}" opacity="0.85"/><path d="M -0.4 0.35 Q 0 0.68 0.4 0.35" fill="none" stroke="${Ve}" stroke-width="0.09" stroke-linecap="round" opacity="0.85"/>`,sad:`<circle cx="-0.4" cy="-0.1" r="0.1" fill="${Ve}" opacity="0.85"/><circle cx="0.4" cy="-0.1" r="0.1" fill="${Ve}" opacity="0.85"/><path d="M -0.38 0.55 Q 0 0.3 0.38 0.55" fill="none" stroke="${Ve}" stroke-width="0.09" stroke-linecap="round" opacity="0.85"/>`,angry:`<path d="M -0.58 -0.32 L -0.22 -0.16" stroke="${Ve}" stroke-width="0.09" stroke-linecap="round" opacity="0.85"/><path d="M 0.58 -0.32 L 0.22 -0.16" stroke="${Ve}" stroke-width="0.09" stroke-linecap="round" opacity="0.85"/><circle cx="-0.32" cy="-0.02" r="0.09" fill="${Ve}" opacity="0.85"/><circle cx="0.32" cy="-0.02" r="0.09" fill="${Ve}" opacity="0.85"/><path d="M -0.36 0.5 L 0.36 0.42" stroke="${Ve}" stroke-width="0.1" stroke-linecap="round" opacity="0.85"/>`,scared:`<circle cx="-0.4" cy="-0.12" r="0.2" fill="none" stroke="${Ve}" stroke-width="0.07" opacity="0.85"/><circle cx="-0.4" cy="-0.12" r="0.07" fill="${Ve}" opacity="0.85"/><circle cx="0.4" cy="-0.12" r="0.2" fill="none" stroke="${Ve}" stroke-width="0.07" opacity="0.85"/><circle cx="0.4" cy="-0.12" r="0.07" fill="${Ve}" opacity="0.85"/><circle cx="0" cy="0.42" r="0.09" fill="none" stroke="${Ve}" stroke-width="0.07" opacity="0.85"/>`,surprised:`<circle cx="-0.38" cy="-0.12" r="0.17" fill="none" stroke="${Ve}" stroke-width="0.07" opacity="0.85"/><circle cx="-0.38" cy="-0.12" r="0.06" fill="${Ve}" opacity="0.85"/><circle cx="0.38" cy="-0.12" r="0.17" fill="none" stroke="${Ve}" stroke-width="0.07" opacity="0.85"/><circle cx="0.38" cy="-0.12" r="0.06" fill="${Ve}" opacity="0.85"/><ellipse cx="0" cy="0.42" rx="0.16" ry="0.22" fill="${Ve}" opacity="0.7"/>`,calm:`<path d="M -0.5 -0.1 Q -0.4 -0.2 -0.3 -0.1" fill="none" stroke="${Ve}" 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="${Ve}" 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="${Ve}" stroke-width="0.08" stroke-linecap="round" opacity="0.85"/>`})});var lE,dn,Ff,Df,gl,zf,w1,y1,Uf=C(()=>{On();Ui();lE=()=>Object.keys(ks).sort(),dn=e=>({type:"object",required:["symbol"],properties:{symbol:{type:"string",description:e}}}),Ff=e=>({type:"object",required:["module"],properties:{module:{type:"string",description:e}}}),Df=e=>({type:"object",required:["class"],properties:{class:{type:"string",description:e}}}),gl=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:tn}},{name:"tmct_describe",tier:"cold",summary:"Locate one symbol and list its typed edges (both directions) with provenance.",inputSchema:dn("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:dn("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:Ff("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:Df("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:Df("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:lE(),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:Ff("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:dn("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:dn("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:dn("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:dn("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:dn("A class name."),example:{symbol:"Truncator"}},{name:"tmct_callers",tier:"cold",summary:"Modules that call into a symbol's module (one hop).",inputSchema:dn("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:dn("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:dn("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:dn("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:dn("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}}]),zf=gl.filter(e=>e.tier==="hot"),w1=gl.filter(e=>e.tier==="cold"),y1=Object.freeze(gl.map(e=>e.name))});var Bf,_e,Vt=C(()=>{We();Bf=Z(".tmct","graph.json"),_e=class extends Error{constructor(t){super(t),this.name="ToolError"}}});function uE(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 Wf(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})=>uE(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(h=>u(h))),Array.isArray(p.mentions)&&(p.mentions=p.mentions.map(h=>h&&h.id?{...h,id:u(h.id)}:h)),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(h=>{if(!h)return h;let m={...h};return m.subject&&(m.subject=u(m.subject)),m.object&&(m.object=u(m.object)),m})),r.objectProperties.push(p)}let d=l.proseIndex&&typeof l.proseIndex=="object"?l.proseIndex:{};for(let[f,p]of Object.entries(d)){let h=r.proseIndex[f]||(r.proseIndex[f]=[]);for(let m of Array.isArray(p)?p:[]){let b=u(m);h.includes(b)||h.push(b)}}}return r.generated_at=i,a&&(r.bootstrap=!0),r}var Gf=C(()=>{});var Mo={};Gt(Mo,{clearCache:()=>dE,emptyEntities:()=>bl,fetchEntities:()=>mE,registerProvider:()=>pE});function dE(){Po=null,Lr=null}function pE(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,Po=null,t}function bl(){return{generated_at:"",bootstrap:!0,classes:[],vocabulary:[],objectProperties:[],individuals:[],proseIndex:{}}}async function fE(e){let t;try{t=await Re(e,"utf8")}catch(n){if(n?.code==="ENOENT")return bl();throw new _e(`cannot read graph artifact at ${e} (${n?.code||n?.message||n})`)}try{return JSON.parse(t)}catch{throw new _e(`graph artifact ${e} is not valid JSON`)}}async function hE(e){let t=e.graphFiles,n=[...t].map(String).sort().join("|");if(Lr&&Lr.key===n)return Lr.payload;let s=[];for(let r=0;r<t.length;r++){let i=await fE(t[r]);s.push({file:t[r],payload:i,name:e.graphNames?.[r]})}let o=Wf(s);return Lr={key:n,payload:o},o}async function mE(e){if(Bi){let s;try{s=await Bi(e)}catch(o){throw o instanceof _e?o:new _e(`graph provider failed (${o?.message||o})`)}if(!s||typeof s!="object")throw new _e("graph provider returned no entities payload");return s}if(Array.isArray(e.graphFiles)&&e.graphFiles.length>1)return hE(e);if(Po&&Po.file===e.graphFile)return Po.payload;let t;try{t=await Re(e.graphFile,"utf8")}catch(s){if(s?.code==="ENOENT")return bl();throw new _e(`cannot read graph artifact at ${e.graphFile} (${s?.code||s?.message||s})`)}let n;try{n=JSON.parse(t)}catch{throw new _e(`graph artifact ${e.graphFile} is not valid JSON`)}return Po={file:e.graphFile,payload:n},n}var Po,Lr,Bi,Nr=C(()=>{_t();Vt();Gf();Po=null,Lr=null,Bi=null});function Ln(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<=Vf)}function wl(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>Vf||gE.has(s))&&!n.has(s)&&(n.add(s),t.push(s),t.length>=bE))break;return t}function Wi({name:e,doc:t}={}){return[...new Set([...Ln(e),...wl(t)])].sort()}function qf(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 no(e,t,{limit:n=10}={}){let s=[...new Set([...Ln(t),...wl(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 Hf(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 gE,Vf,bE,js=C(()=>{gE=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+/)),Vf=40,bE=120});function Kf(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 wE(e){if(!e.startsWith(Xf))return null;let t=e.indexOf("@"),n=t>=0?e.slice(0,t):e,s=t>=0?e.slice(t+1):"",o=n.indexOf(Yf);if(o<0)return null;let r=n.slice(o+Yf.length);return r?{kind:"teachNode",nodeId:r,displayName:n.slice(Xf.length,o),createdAt:s}:null}function ts(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:$E(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",...Kf(n.slice(4))};if(n.startsWith("teach:")){let s=n.slice(6),o=wE(s);return o||{kind:"teach",...Kf(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 th(e){let t=(e?.attributes||[]).find(s=>s.prop==="mgx:sourceReliability")?.value;if(t===void 0)return Qf;let n=Number(t);return Number.isFinite(n)?Math.max(yl,Math.min(eh,n)):Qf}function nh(e,t=Date.now(),n=vE){let s=Date.parse(e);if(!Number.isFinite(s))return 1;let o=Math.max(0,t-s);return Jf+(1-Jf)*Math.pow(.5,o/n)}function sh(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 h=t[p],m=xE(h);if(!m)continue;i.push(m);let b=(so[m]??0)*th(h);a.push(Math.max(0,Math.min(1,b)))}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=nh(e?.createdAt,s,n.halfLifeMs),d=Fo(Math.min(1,l*u)),f={sourceTypes:i.slice().sort(),corroboration:i.length,createdAt:e?.createdAt||"",recency:Fo(u)};return{score:d,inputs:f}}function Vi(e,t){let n=(so[e]??0)*th(t);return Fo(Math.max(0,Math.min(1,n)))}function EE(e){if(e==="operator")return 1;let t=so[e];return t===void 0?1:(t+1)/2}function qi(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=nh(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:Fo(l)})}let i=1;for(let[a,l]of o){let c=Math.max(EE(a),l.strongest);i*=1-Math.min(1-l.complement,c)}return{score:s.length?Fo(Math.min(1,1-i)):0,inputs:r}}function oh(e){return qi(e,{halfLifeMs:SE})}function rh({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+kE),i=(o*r+1)/2;return Fo(yl+(eh-yl)*i)}var Do,Gi,Ze,Rs,Yf,Xf,yE,$E,so,$l,Zf,vE,Jf,yl,eh,Qf,Fo,xE,SE,kE,ns=C(()=>{Do="mgx:trustScore",Gi="mgx:trustInputs",Ze="mgx:createdAt",Rs="mgx:updatedAt";Yf="#node:",Xf="peer:";yE="wikipedia-live",$E=e=>e===yE?"referenceLive":"reference";so=Object.freeze({operator:1,teach:.95,provider:.9,corpus:.7,reference:.6,corpusWeak:.55,referenceLive:.5,extracted:.45,web:.4,optimisticExtract:.35,entailed:.3}),$l=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"}}),Zf=new Set(Object.entries($l).filter(([,e])=>e.prov==="prov:Agent").map(([e])=>e)),vE=720*60*60*1e3,Jf=.9,yl=.5,eh=1.5,Qf=1,Fo=(e,t=6)=>Number(e.toFixed(t)),xE=e=>(e?.attributes||[]).find(t=>t.prop==="mgx:sourceType")?.value||"";SE=1/0;kE=19});var oo,vl=C(()=>{oo=e=>/(^|\/)tests?\//.test(e)||/(^|\/)test_[^/]*\.py$/.test(e)||/\.tests(\.|$)/.test(e)||/(^|\/)[^/]*[-_]tests?\//.test(e)||/\.(test|spec)\.[cm]?[jt]sx?$/.test(e)});function xl(e,t){return Math.log(1+e/(1+t))}var Pr=C(()=>{});var Yi={};Gt(Yi,{bfsLevels:()=>Ki,findActionPath:()=>Hi,findReachableSet:()=>El});function ih(e){return e&&typeof e=="object"?JSON.stringify(e):String(e)}function ah(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 Hi(e,t,n,{maxDepth:s=50,stateKey:o=ih}={}){if(t(e))return{actions:[],states:[e]};let r=ah(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 El(e,t,{maxDepth:n=50,stateKey:s=ih}={}){let o=ah(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*Ki(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 _s=C(()=>{});function Ji(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 Mr(e){return!e||!Array.isArray(e.individuals)?0:e.individuals.filter(t=>(t.class||"")==="Module").length}function is(e){let t=String(e?.prop||"").toLowerCase();if(ch[t])return ch[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 os(e){return String(e||"").trim().toLowerCase().replace(/^\.\//,"").replace(/^\//,"")}function Sl(e){let t=os(e).split("/");return t[t.length-1]}function jE(e){return(e?.derived_from||[]).filter(vh).length}function lh(e){return(e?.mentions||[]).reduce((n,s)=>n+(Number(s?.count)||0),0)+jE(e)}function on(e,t){let n=os(t);if(!n)return{match:null,candidates:[]};let s=Sl(n),o=!n.includes("/"),r=[];for(let i of e.individuals){let a=os(i.label),l=String(i.id||"").toLowerCase(),c=0;a===n||l===n?c=100:a.endsWith(`/${n}`)||o&&(Sl(a)===s||Sl(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||lh(a.ind)-lh(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 Tt(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 RE(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 uh(e){return e.prop?`${e.predicate} [${e.prop}]`:e.predicate}function rs(e){let t=e||"Entity",n=Ln(t);return n.length<2?t:n.map(s=>s[0].toUpperCase()+s.slice(1)).join(" ")}function dt(e,t,n=", "){return e.length<=t?e.join(n):e.slice(0,t).join(n)+`, +${e.length-t} more`}function Al(e,t,{candidates:n=[]}={}){let s=[];s.push(`${t.label} \u2014 ${rs(t.class)} (id: ${t.id})`);let o=(t.derived_from||[]).filter(vh);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}=RE(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(` ${uh(l)} (${c.length}) \u2192 ${dt(c.map(u=>u.objectLabel||u.object),dh)}`);for(let{group:l,edges:c}of i)s.push(` \u2190 ${uh(l)} (${c.length}) by ${dt(c.map(u=>u.subjectLabel||u.subject),dh)}`)}let a=t.derived_from||[];return a.length&&s.push(`provenance: ${dt(a,_E)}`),n.length&&s.push(`other matches: ${n.map(l=>`${l.label} (${rs(l.class)})`).join(", ")}`),e.truncated.length&&s.push(TE(e)),s.join(`
|
|
1
|
+
(()=>{var Kx=Object.defineProperty;var C=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(s){throw n=[s],s}};var Gt=(e,t)=>{for(var n in t)Kx(e,n,{get:t[n],enumerable:!0})};var lt,z0,U0,B0,W0,G0,V0,q0,H0,K0,Y0,X0,J0,Q0,Z0,e1,t1,Z,he,Pt,cl,jf,n1,s1,o1,We=C(()=>{lt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},z0=lt("createRequire"),U0=lt("readFileSync"),B0=lt("access"),W0=lt("readFile"),G0=lt("writeFile"),V0=lt("appendFile"),q0=lt("mkdir"),H0=lt("mkdtemp"),K0=lt("rename"),Y0=lt("unlink"),X0=lt("rm"),J0=lt("stat"),Q0=lt("copyFile"),Z0=lt("readdir"),e1=lt("createReadStream"),t1=lt("createWriteStream"),Z=(...e)=>e.join("/"),he=e=>String(e).replace(/\/[^/]*$/,""),Pt=(...e)=>e.join("/"),cl=e=>String(e).startsWith("/"),jf="/",n1=lt("randomBytes"),s1=lt("spawnSync"),o1=lt("createInterface")});var ut,i1,a1,ll,Re,_r,Yx,An,Xx,Mi,ul,Jx,Qx,c1,Zx,l1,u1,d1,p1,f1,_t=C(()=>{ut=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},i1=ut("createRequire"),a1=ut("readFileSync"),ll=ut("access"),Re=ut("readFile"),_r=ut("writeFile"),Yx=ut("appendFile"),An=ut("mkdir"),Xx=ut("mkdtemp"),Mi=ut("rename"),ul=ut("unlink"),Jx=ut("rm"),Qx=ut("stat"),c1=ut("copyFile"),Zx=ut("readdir"),l1=ut("createReadStream"),u1=ut("createWriteStream"),d1=ut("randomBytes"),p1=ut("spawnSync"),f1=ut("createInterface")});function Co(e){let t=tE.exec(String(e||""));return t?t[1].toLowerCase():null}function Fi(e){return String(e||"").replace(nE,"$1")}function Es(e){return e.replace(sE,"").trim()}function nn(e){let t=e;for(let n=0;n<2;n+=1){let s=t.replace(rE,"").trim();if(s=s.replace(aE,"").trim(),s===t)break;t=s}return t}var Rf,Tr,Js,_f,Tf,eE,tE,Ar,tn,dl,nE,$n,pl,sE,oE,rE,iE,aE,de,Ir,Di,cE,Af,Ge,sn,Ss,If,fl,hl,ml,Cf,Cr,Qs,Of,Lf,Zs,Zn,es,Oo,Qe,Nf,eo,to,In,Cn,Pf,Or,Lo,zi,No,Mf,On=C(()=>{Rf=["is a superclass of","are a superclass of","is a parent class of","are a parent class of","superclass","superclasses"],Tr={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",...Rf]},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"]}},Js=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:hasMass",comment:"individual -> number: the subject's current mass.",nouns:Object.freeze(["mass","masses","weight","weights"]),reads:"has mass"})}),_f=Object.freeze(Object.fromEntries(Object.entries(Js).flatMap(([e,{nouns:t}])=>t.map(n=>[n,e])))),Tf=Object.freeze(Object.values(Js).map(e=>e.predicate)),eE=Object.freeze(["on","in","at","inside","under","below","above","near","beside","behind","by"]),tE=new RegExp(`^mgx:[a-z]+-(${eE.join("|")})$`,"i");Ar=Object.freeze([...Rf,"is the superclass of","are the superclass of","is the parent class of"]),tn=Object.freeze(["defined","declared","located","implemented"]),dl=Object.freeze(["now","currently","right now","at the moment","these days","today"]),nE=new RegExp(`\\s+(?:${[...dl].sort((e,t)=>t.length-e.length).join("|")})(\\s*[?.!]*)$`,"i");$n=Object.freeze(["mentioned","referenced"]),pl=Object.freeze(["in this graph","in the graph","in this codebase","in the codebase","in this repo","in the repo","here"]),sE=new RegExp(`\\s+(?:${pl.join("|")})\\s*[?.!]*$`,"i");oE=Object.freeze(["then","though","too"]),rE=new RegExp(`\\s+(?:${oE.join("|")})\\s*[?.!]*$`,"i"),iE=Object.freeze(["please explain","explain"]),aE=new RegExp(`,\\s*(?:${iE.join("|")})\\s*[?.!]*$`,"i");de=Object.freeze(Object.fromEntries(Object.entries(Tr).flatMap(([e,{verbs:t}])=>t.map(n=>[n,e])))),Ir=Object.freeze(new Set(["has","have","holds","hold"])),Di=Object.freeze(new Set(["search","describe","signature","impact","members","subclasses","exports","callers","callees","calls","tests","untested","history","cochanges","architecture","arch","related","sprite"])),cE=e=>!Ar.includes(e),Af=Object.freeze([...new Set(Object.keys(de).filter(cE).map(e=>e.match(/^(?:is|are)\s+an?\s+(.+)$/i)).filter(Boolean).map(e=>e[1].toLowerCase()))]),Ge=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"}),sn=Object.freeze({explicitly:"direct",directly:"direct",transitively:"transitive",indirectly:"transitive"}),Ss=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"}),If=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"}}),fl=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"}),hl=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"}),ml=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"}),Cf=/\b([a-z]{3,})in'/gi,Cr=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"]),Qs=Object.freeze(["this","it","that","here","this one","that one"]),Of=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]}`}]),Lf=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`}]),Zs=Object.freeze(["mean","means","stand for","stands for","signify","signifies","represent","represents","refer to","refers to"]),Zn=Object.freeze(["that","which","who"]),es=Object.freeze(["something","anything","everything","somethings","things","thing","entities","entity","nodes","node","stuff","code","symbol","symbols"]),Oo=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"}),Qe=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}}),Nf=Object.freeze(new Set(["tests","test","anything","something","anyone","someone","any"])),eo=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"]),to=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"]),In=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"}),Cn=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"}}),Pf=Object.freeze({tests:"Module",test:"Module"}),Or=Object.freeze(["those","them","these"]),Lo=Object.freeze(["contains","defines"]),zi=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"]),No=Object.freeze({tally:"count",tallies:"count",sum:"count",total:"count",totals:"count"}),Mf=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 Ve,ks,Ui=C(()=>{Ve="#000000",ks=Object.freeze({happy:`<circle cx="-0.4" cy="-0.15" r="0.11" fill="${Ve}" opacity="0.85"/><circle cx="0.4" cy="-0.15" r="0.11" fill="${Ve}" opacity="0.85"/><path d="M -0.4 0.35 Q 0 0.68 0.4 0.35" fill="none" stroke="${Ve}" stroke-width="0.09" stroke-linecap="round" opacity="0.85"/>`,sad:`<circle cx="-0.4" cy="-0.1" r="0.1" fill="${Ve}" opacity="0.85"/><circle cx="0.4" cy="-0.1" r="0.1" fill="${Ve}" opacity="0.85"/><path d="M -0.38 0.55 Q 0 0.3 0.38 0.55" fill="none" stroke="${Ve}" stroke-width="0.09" stroke-linecap="round" opacity="0.85"/>`,angry:`<path d="M -0.58 -0.32 L -0.22 -0.16" stroke="${Ve}" stroke-width="0.09" stroke-linecap="round" opacity="0.85"/><path d="M 0.58 -0.32 L 0.22 -0.16" stroke="${Ve}" stroke-width="0.09" stroke-linecap="round" opacity="0.85"/><circle cx="-0.32" cy="-0.02" r="0.09" fill="${Ve}" opacity="0.85"/><circle cx="0.32" cy="-0.02" r="0.09" fill="${Ve}" opacity="0.85"/><path d="M -0.36 0.5 L 0.36 0.42" stroke="${Ve}" stroke-width="0.1" stroke-linecap="round" opacity="0.85"/>`,scared:`<circle cx="-0.4" cy="-0.12" r="0.2" fill="none" stroke="${Ve}" stroke-width="0.07" opacity="0.85"/><circle cx="-0.4" cy="-0.12" r="0.07" fill="${Ve}" opacity="0.85"/><circle cx="0.4" cy="-0.12" r="0.2" fill="none" stroke="${Ve}" stroke-width="0.07" opacity="0.85"/><circle cx="0.4" cy="-0.12" r="0.07" fill="${Ve}" opacity="0.85"/><circle cx="0" cy="0.42" r="0.09" fill="none" stroke="${Ve}" stroke-width="0.07" opacity="0.85"/>`,surprised:`<circle cx="-0.38" cy="-0.12" r="0.17" fill="none" stroke="${Ve}" stroke-width="0.07" opacity="0.85"/><circle cx="-0.38" cy="-0.12" r="0.06" fill="${Ve}" opacity="0.85"/><circle cx="0.38" cy="-0.12" r="0.17" fill="none" stroke="${Ve}" stroke-width="0.07" opacity="0.85"/><circle cx="0.38" cy="-0.12" r="0.06" fill="${Ve}" opacity="0.85"/><ellipse cx="0" cy="0.42" rx="0.16" ry="0.22" fill="${Ve}" opacity="0.7"/>`,calm:`<path d="M -0.5 -0.1 Q -0.4 -0.2 -0.3 -0.1" fill="none" stroke="${Ve}" 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="${Ve}" 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="${Ve}" stroke-width="0.08" stroke-linecap="round" opacity="0.85"/>`})});var lE,dn,Ff,Df,gl,zf,y1,$1,Uf=C(()=>{On();Ui();lE=()=>Object.keys(ks).sort(),dn=e=>({type:"object",required:["symbol"],properties:{symbol:{type:"string",description:e}}}),Ff=e=>({type:"object",required:["module"],properties:{module:{type:"string",description:e}}}),Df=e=>({type:"object",required:["class"],properties:{class:{type:"string",description:e}}}),gl=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:tn}},{name:"tmct_describe",tier:"cold",summary:"Locate one symbol and list its typed edges (both directions) with provenance.",inputSchema:dn("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:dn("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:Ff("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:Df("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:Df("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:lE(),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:Ff("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:dn("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:dn("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:dn("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:dn("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:dn("A class name."),example:{symbol:"Truncator"}},{name:"tmct_callers",tier:"cold",summary:"Modules that call into a symbol's module (one hop).",inputSchema:dn("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:dn("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:dn("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:dn("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:dn("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}}]),zf=gl.filter(e=>e.tier==="hot"),y1=gl.filter(e=>e.tier==="cold"),$1=Object.freeze(gl.map(e=>e.name))});var Bf,_e,Vt=C(()=>{We();Bf=Z(".tmct","graph.json"),_e=class extends Error{constructor(t){super(t),this.name="ToolError"}}});function uE(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 Wf(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})=>uE(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(h=>u(h))),Array.isArray(p.mentions)&&(p.mentions=p.mentions.map(h=>h&&h.id?{...h,id:u(h.id)}:h)),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(h=>{if(!h)return h;let m={...h};return m.subject&&(m.subject=u(m.subject)),m.object&&(m.object=u(m.object)),m})),r.objectProperties.push(p)}let d=l.proseIndex&&typeof l.proseIndex=="object"?l.proseIndex:{};for(let[f,p]of Object.entries(d)){let h=r.proseIndex[f]||(r.proseIndex[f]=[]);for(let m of Array.isArray(p)?p:[]){let b=u(m);h.includes(b)||h.push(b)}}}return r.generated_at=i,a&&(r.bootstrap=!0),r}var Gf=C(()=>{});var Mo={};Gt(Mo,{clearCache:()=>dE,emptyEntities:()=>bl,fetchEntities:()=>mE,registerProvider:()=>pE});function dE(){Po=null,Lr=null}function pE(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,Po=null,t}function bl(){return{generated_at:"",bootstrap:!0,classes:[],vocabulary:[],objectProperties:[],individuals:[],proseIndex:{}}}async function fE(e){let t;try{t=await Re(e,"utf8")}catch(n){if(n?.code==="ENOENT")return bl();throw new _e(`cannot read graph artifact at ${e} (${n?.code||n?.message||n})`)}try{return JSON.parse(t)}catch{throw new _e(`graph artifact ${e} is not valid JSON`)}}async function hE(e){let t=e.graphFiles,n=[...t].map(String).sort().join("|");if(Lr&&Lr.key===n)return Lr.payload;let s=[];for(let r=0;r<t.length;r++){let i=await fE(t[r]);s.push({file:t[r],payload:i,name:e.graphNames?.[r]})}let o=Wf(s);return Lr={key:n,payload:o},o}async function mE(e){if(Bi){let s;try{s=await Bi(e)}catch(o){throw o instanceof _e?o:new _e(`graph provider failed (${o?.message||o})`)}if(!s||typeof s!="object")throw new _e("graph provider returned no entities payload");return s}if(Array.isArray(e.graphFiles)&&e.graphFiles.length>1)return hE(e);if(Po&&Po.file===e.graphFile)return Po.payload;let t;try{t=await Re(e.graphFile,"utf8")}catch(s){if(s?.code==="ENOENT")return bl();throw new _e(`cannot read graph artifact at ${e.graphFile} (${s?.code||s?.message||s})`)}let n;try{n=JSON.parse(t)}catch{throw new _e(`graph artifact ${e.graphFile} is not valid JSON`)}return Po={file:e.graphFile,payload:n},n}var Po,Lr,Bi,Nr=C(()=>{_t();Vt();Gf();Po=null,Lr=null,Bi=null});function Ln(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<=Vf)}function wl(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>Vf||gE.has(s))&&!n.has(s)&&(n.add(s),t.push(s),t.length>=bE))break;return t}function Wi({name:e,doc:t}={}){return[...new Set([...Ln(e),...wl(t)])].sort()}function qf(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 no(e,t,{limit:n=10}={}){let s=[...new Set([...Ln(t),...wl(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 Hf(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 gE,Vf,bE,js=C(()=>{gE=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+/)),Vf=40,bE=120});function Kf(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 wE(e){if(!e.startsWith(Xf))return null;let t=e.indexOf("@"),n=t>=0?e.slice(0,t):e,s=t>=0?e.slice(t+1):"",o=n.indexOf(Yf);if(o<0)return null;let r=n.slice(o+Yf.length);return r?{kind:"teachNode",nodeId:r,displayName:n.slice(Xf.length,o),createdAt:s}:null}function ts(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:$E(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",...Kf(n.slice(4))};if(n.startsWith("teach:")){let s=n.slice(6),o=wE(s);return o||{kind:"teach",...Kf(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 th(e){let t=(e?.attributes||[]).find(s=>s.prop==="mgx:sourceReliability")?.value;if(t===void 0)return Qf;let n=Number(t);return Number.isFinite(n)?Math.max(yl,Math.min(eh,n)):Qf}function nh(e,t=Date.now(),n=vE){let s=Date.parse(e);if(!Number.isFinite(s))return 1;let o=Math.max(0,t-s);return Jf+(1-Jf)*Math.pow(.5,o/n)}function sh(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 h=t[p],m=xE(h);if(!m)continue;i.push(m);let b=(so[m]??0)*th(h);a.push(Math.max(0,Math.min(1,b)))}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=nh(e?.createdAt,s,n.halfLifeMs),d=Fo(Math.min(1,l*u)),f={sourceTypes:i.slice().sort(),corroboration:i.length,createdAt:e?.createdAt||"",recency:Fo(u)};return{score:d,inputs:f}}function Vi(e,t){let n=(so[e]??0)*th(t);return Fo(Math.max(0,Math.min(1,n)))}function EE(e){if(e==="operator")return 1;let t=so[e];return t===void 0?1:(t+1)/2}function qi(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=nh(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:Fo(l)})}let i=1;for(let[a,l]of o){let c=Math.max(EE(a),l.strongest);i*=1-Math.min(1-l.complement,c)}return{score:s.length?Fo(Math.min(1,1-i)):0,inputs:r}}function oh(e){return qi(e,{halfLifeMs:SE})}function rh({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+kE),i=(o*r+1)/2;return Fo(yl+(eh-yl)*i)}var Do,Gi,Ze,Rs,Yf,Xf,yE,$E,so,$l,Zf,vE,Jf,yl,eh,Qf,Fo,xE,SE,kE,ns=C(()=>{Do="mgx:trustScore",Gi="mgx:trustInputs",Ze="mgx:createdAt",Rs="mgx:updatedAt";Yf="#node:",Xf="peer:";yE="wikipedia-live",$E=e=>e===yE?"referenceLive":"reference";so=Object.freeze({operator:1,teach:.95,provider:.9,corpus:.7,reference:.6,corpusWeak:.55,referenceLive:.5,extracted:.45,web:.4,optimisticExtract:.35,entailed:.3}),$l=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"}}),Zf=new Set(Object.entries($l).filter(([,e])=>e.prov==="prov:Agent").map(([e])=>e)),vE=720*60*60*1e3,Jf=.9,yl=.5,eh=1.5,Qf=1,Fo=(e,t=6)=>Number(e.toFixed(t)),xE=e=>(e?.attributes||[]).find(t=>t.prop==="mgx:sourceType")?.value||"";SE=1/0;kE=19});var oo,vl=C(()=>{oo=e=>/(^|\/)tests?\//.test(e)||/(^|\/)test_[^/]*\.py$/.test(e)||/\.tests(\.|$)/.test(e)||/(^|\/)[^/]*[-_]tests?\//.test(e)||/\.(test|spec)\.[cm]?[jt]sx?$/.test(e)});function xl(e,t){return Math.log(1+e/(1+t))}var Pr=C(()=>{});var Yi={};Gt(Yi,{bfsLevels:()=>Ki,findActionPath:()=>Hi,findReachableSet:()=>El});function ih(e){return e&&typeof e=="object"?JSON.stringify(e):String(e)}function ah(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 Hi(e,t,n,{maxDepth:s=50,stateKey:o=ih}={}){if(t(e))return{actions:[],states:[e]};let r=ah(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 El(e,t,{maxDepth:n=50,stateKey:s=ih}={}){let o=ah(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*Ki(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 _s=C(()=>{});function Ji(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 Mr(e){return!e||!Array.isArray(e.individuals)?0:e.individuals.filter(t=>(t.class||"")==="Module").length}function is(e){let t=String(e?.prop||"").toLowerCase();if(ch[t])return ch[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 os(e){return String(e||"").trim().toLowerCase().replace(/^\.\//,"").replace(/^\//,"")}function Sl(e){let t=os(e).split("/");return t[t.length-1]}function jE(e){return(e?.derived_from||[]).filter(vh).length}function lh(e){return(e?.mentions||[]).reduce((n,s)=>n+(Number(s?.count)||0),0)+jE(e)}function on(e,t){let n=os(t);if(!n)return{match:null,candidates:[]};let s=Sl(n),o=!n.includes("/"),r=[];for(let i of e.individuals){let a=os(i.label),l=String(i.id||"").toLowerCase(),c=0;a===n||l===n?c=100:a.endsWith(`/${n}`)||o&&(Sl(a)===s||Sl(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||lh(a.ind)-lh(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 Tt(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 RE(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 uh(e){return e.prop?`${e.predicate} [${e.prop}]`:e.predicate}function rs(e){let t=e||"Entity",n=Ln(t);return n.length<2?t:n.map(s=>s[0].toUpperCase()+s.slice(1)).join(" ")}function dt(e,t,n=", "){return e.length<=t?e.join(n):e.slice(0,t).join(n)+`, +${e.length-t} more`}function Al(e,t,{candidates:n=[]}={}){let s=[];s.push(`${t.label} \u2014 ${rs(t.class)} (id: ${t.id})`);let o=(t.derived_from||[]).filter(vh);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}=RE(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(` ${uh(l)} (${c.length}) \u2192 ${dt(c.map(u=>u.objectLabel||u.object),dh)}`);for(let{group:l,edges:c}of i)s.push(` \u2190 ${uh(l)} (${c.length}) by ${dt(c.map(u=>u.subjectLabel||u.subject),dh)}`)}let a=t.derived_from||[];return a.length&&s.push(`provenance: ${dt(a,_E)}`),n.length&&s.push(`other matches: ${n.map(l=>`${l.label} (${rs(l.class)})`).join(", ")}`),e.truncated.length&&s.push(TE(e)),s.join(`
|
|
2
2
|
`)}function TE(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 Uo(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=is(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=ss(e,c.subject),d=ss(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 Ki(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 xh(e,t,{maxDepth:n=8}={}){let s=Uo(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>=AE){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,kl)){let u=c.tests.length?`tests: ${dt(c.tests,IE)}`:"tests: none recorded",d=l===0?`${c.via} it`:"reaches it through an intermediary";o.push(` - ${c.label} (${d}) \u2014 ${u}`)}a.length>kl&&o.push(` \u2026+${a.length-kl} more at depth ${l+1}`)});let i=e.truncated.filter(a=>{let l=is({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
3
|
`)}function Eh(e){let t=new Map;for(let n of e.relations)if(is(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 fh(e){return new Set(String(e).replace(/([a-z0-9])([A-Z])/g,"$1_$2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean))}function _h(e,t,n=null){let s=n||(i=>ss(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 xe(e,i))r(s(a.subject),s(a.object));return o}function fS(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 h of c.values())u=Math.max(u,h);let d=[...c.entries()].sort((h,m)=>m[1]-h[1]),f=[],p=[];for(let[h,m]of d)m>=u*sS&&f.length<n?f.push([h,m]):p.length<ph&&p.push([h,m]);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<iS&&i.length;c++){let u=new Map,d=[];for(let f of aS){let p=_h(e,f),h=new Map;for(let[g,y]of i)for(let w of p.get(g)||[])o.has(w)&&h.set(w,Math.max(h.get(w)||0,y));let[m,b]=r(h);for(let[g,y]of m)u.set(g,Math.max(u.get(g)||0,y));d.push(...b)}a.push(...d);for(let[f,p]of u){if(l.has(f))continue;let h=s.get(f);h&&(h.score+=Math.min(p*oS,h.score*rS),l.add(f))}i=[...u.entries()],!i.length&&a.length&&(i=a.splice(0,ph).filter(([f])=>!l.has(f)))}}function hS(e,t=[],{depth:n=kh,q:s=Rh,nodeLimit:o=jh,kinds:r=cS,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 h=_h(e,r,a),m=S=>h.get(S)?.size||0,b=[],g=(S,_)=>S.hop!==_.hop?S.hop<_.hop:S.deg!==_.deg?S.deg<_.deg:S.id<_.id,y=(S,_)=>{let R=b[S];b[S]=b[_],b[_]=R},w=S=>{b.push(S);let _=b.length-1;for(;_>0;){let R=_-1>>1;if(g(b[_],b[R]))y(_,R),_=R;else break}},v=()=>{let S=b[0],_=b.pop();if(b.length){b[0]=_;let R=0;for(;;){let I=2*R+1,P=2*R+2,T=R;if(I<b.length&&g(b[I],b[T])&&(T=I),P<b.length&&g(b[P],b[T])&&(T=P),T===R)break;y(R,T),R=T}}return S},k=new Set(p);for(let S of p)w({id:S,hop:0,deg:m(S)});let $=null,x=0,E=[];for(;b.length&&x<o;){let S=v();if(E.push({id:S.id,hop:S.hop}),!p.has(S.id)){if(f){let I=d*lS*Math.pow(uS,S.hop-1),P=u.get(S.id);if(P)P.score+=Math.min(I*dS,P.score*pS);else{let T=e.byId?.get?.(S.id);if(T&&i(T)){$||($=Eh(e));let F=$.get(T.id)||[],U={ind:T,score:I,defineCount:F.length,matching:[],density:0};t.push(U),u.set(S.id,U)}}}x++}if(S.hop>=n||S.hop>0&&m(S.id)>c)continue;let _=[];for(let I of h.get(S.id)||[]){if(k.has(I))continue;let P=e.byId?.get?.(I);!P||!i(P)||_.push({id:I,deg:m(I)})}if(!_.length)continue;_.sort((I,P)=>I.deg-P.deg||(I.id<P.id?-1:I.id>P.id?1:0));let R=Math.max(1,Math.floor(s*_.length));for(let I=0;I<R;I++){let P=_[I];k.add(P.id),w({id:P.id,hop:S.hop+1,deg:P.deg})}}return E}function Th(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=Eh(e),h=[];for(let v of e.individuals){if((v.class||"")!=="Module")continue;let k=String(v.label),$=k.toLowerCase(),x=p.get(v.id)||[],E=new Set(x.map(R=>R.toLowerCase())),S=new Set;for(let R of x)for(let I of fh(R))S.add(I);let _=u?String((v.attributes||[]).find(R=>R.key==="dotted")?.value||"").toLowerCase():"";h.push({ind:v,label:k,labelLc:$,defines:x,symSet:E,symComps:S,dotted:_})}let m=h.length||1,b=new Map,g=v=>{let k=0;for(let $ of h)($.labelLc.includes(v)||$.symComps.has(v)||$.symSet.has(v))&&k++;return k},y=v=>(b.has(v)||b.set(v,xl(m,g(v))),b.get(v));for(let v of t)y(v);let w=[];for(let v of h){let k=0,$=0,x=0,E=[];for(let P of t){let T=b.get(P)||0;T&&(v.symSet.has(P)?(k+=T*Sh,x++):v.symComps.has(P)&&(E.push(T),x++),v.labelLc.includes(P)&&($+=T*OE))}E.sort((P,T)=>T-P);let S=0;for(let P=0;P<Math.min(E.length,NE);P++)S+=E[P]*LE;let _=k+$+S;if(!_)continue;s&&(oo(v.labelLc)||DE(v.labelLc))?_*=FE:oo(v.labelLc)&&(_*=.4);let R=v.defines.filter(P=>{let T=P.toLowerCase(),F=fh(P);return t.some(U=>T===U||F.has(U))}),I=v.defines.length?x/v.defines.length:0;w.push({ind:v.ind,score:_,defineCount:v.defines.length,matching:R,density:I})}if(u&&d&&w.length){let v=String(d).toLowerCase(),k=S=>S!=null&&/[a-z0-9_./]/.test(S),$=S=>{for(let _=v.indexOf(S);_!==-1;_=v.indexOf(S,_+1))if(!k(v[_-1])&&!k(v[_+S.length]))return!0;return!1},x=new Map(h.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 _=x.get(S.ind.id);if(!_)continue;let R=0;for(let I of new Set([_.dotted,_.labelLc])){if(!I||I.split(/[./]+/).filter(Boolean).length<ZE||!$(I))continue;let P=[...new Set(I.split(/[^a-z0-9_]+/).filter(Boolean))].map(y).sort((F,U)=>U-F),T=0;for(let F=0;F<Math.min(P.length,eS);F++)T+=P[F]*QE;R=Math.max(R,T)}R&&(S.score+=Math.min(R*tS,E*nS))}}if(w.length>1){let v=new Map(w.map($=>[$.ind.id,$.score])),k=new Map;for(let $ of xe(e,"imports"))!v.has($.subject)&&!v.has($.object)||(k.has($.subject)||k.set($.subject,new Set),k.has($.object)||k.set($.object,new Set),k.get($.subject).add($.object),k.get($.object).add($.subject));for(let $ of w){let x=0;for(let E of k.get($.ind.id)||[])x=Math.max(x,v.get(E)||0);$.score+=Math.min(x*PE,$.score*ME)}}if(o&&w.length>1){let v=new Map(w.map($=>[$.ind.id,$.score])),k=new Map;for(let $ of["calls","callsSymbol"])for(let x of xe(e,$)){let E=ss(e,x.subject),S=ss(e,x.object);!E||!S||E===S||!v.has(E)&&!v.has(S)||(k.has(E)||k.set(E,new Set),k.has(S)||k.set(S,new Set),k.get(E).add(S),k.get(S).add(E))}for(let $ of w){let x=0;for(let E of k.get($.ind.id)||[])x=Math.max(x,v.get(E)||0);$.score+=Math.min(x*zE,$.score*UE)}}if(r&&w.length>1){let v=new Map(w.map($=>[$.ind.id,$.score])),k=new Map;for(let $ of e.individuals)($.class||"")==="Class"&&$.label&&k.set(String($.label),$);for(let $ of w){if(!GE($.ind.label))continue;let x=0;for(let E of xe(e,"inherits")){if(ss(e,E.subject)!==$.ind.id||!VE(E.objectLabel))continue;let _=ss(e,E.object);if(!_){let R=k.get(String(E.objectLabel||""));R&&(_=Nn(e,R))}_&&(x=Math.max(x,v.get(_)||0))}$.score+=Math.min(x*BE,$.score*WE)}}if(l&&w.length&&e.proseIndex){let v=no(e.proseIndex,t.join(" "),{limit:KE});if(v.length){let k=new Map;for(let{id:$,score:x}of v){let E=ss(e,$);E&&k.set(E,(k.get(E)||0)+x)}for(let $ of w){let x=k.get($.ind.id)||0;x&&($.score+=Math.min(x*qE,$.score*HE))}}}if(c&&w.length&&e.proseIndex){let v=new Map(w.map(x=>[x.ind.id,x])),k=new Map(h.map(x=>[x.ind.id,x])),$=new Map;for(let x of new Set(t)){let E=b.get(x)||0;if(!E)continue;let{ids:S}=Hf(e.proseIndex,x);if(!S.length)continue;let _=new Set;for(let R of S){let I=ss(e,R);if(!I||_.has(I)||(_.add(I),!v.has(I)))continue;let P=k.get(I);P&&(P.symSet.has(x)||P.symComps.has(x)||P.labelLc.includes(x))||$.set(I,($.get(I)||0)+E*JE)}}for(let x of w){let E=$.get(x.ind.id)||0;E&&(x.score+=Math.min(E*YE,x.score*XE))}}return i&&w.length>1&&fS(e,w,f),a&&w.length&&hS(e,w,{depth:Number.isFinite(n.spiralDepth)&&n.spiralDepth>0?n.spiralDepth:kh,q:Number.isFinite(n.mostDistinctiveBeams)&&n.mostDistinctiveBeams>0?n.mostDistinctiveBeams:Rh,nodeLimit:Number.isFinite(n.spiralNodeLimit)&&n.spiralNodeLimit>0?n.spiralNodeLimit:jh}),w.sort((v,k)=>k.score-v.score||k.density-v.density||v.defineCount-k.defineCount||String(v.ind.label).length-String(k.ind.label).length),w}function Ah(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 Th(e,o,r).map(i=>({path:String(i.ind.label),score:i.score}))}function gS(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 Il(e,{now:t=Date.now}={}){let n=String(e);if(n.length>hh)return{error:`name pattern is ${n.length} characters; the limit is ${hh}.`};let{quantifiers:s,quantifiedGroup:o,backreference:r}=gS(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>mh)return{error:`name pattern "${n}" has ${s} quantifiers; the limit is ${mh}.`};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()+gh;else if(t()>a)throw new Xi(`name pattern "${n}" exceeded its ${gh}ms matching budget.`);return i.test(String(l).slice(0,mS))}}}function Ih(e,t,{limit:n=Qi,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 h=Il(r);if(h.error)return h.error;u=h}if(l&&l!=="module")try{return vS(e,a,{limit:n,kind:l,decFilter:c,nameRe:u,toolNamePrefix:i})}catch(h){if(h instanceof Xi)return h.message;throw h}if(!a.length&&!u&&!c)return"empty query";let d=Th(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:h,defineCount:m,matching:b}of f){let g=b.length?` \u2014 matching: ${dt([...new Set(b)],CE)}`:"";p.push(`- ${h.label} (defines ${m} symbol(s))${g}`)}return p.push(`Then ${i}describe <path> for the full sibling list + typed edges, or ${i}impact <path> for dependents.`),p.join(`
|
|
4
4
|
`)}function xe(e,t){let n=bh.get(e);n||(n=new Map,bh.set(e,n));let s=n.get(t);if(s)return s;let o=[];for(let r of e.relations)if(is(r)===t)for(let i of r.edges)o.push(i);return n.set(t,o),o}function ss(e,t){let n=e.byId?.get?.(t);if(n)return Nn(e,n);let s=String(t||"").match(/^fn:(.+)#/);return s?`mod:${s[1]}`:null}function Nn(e,t){if((t?.class||"")==="Module")return t.id;let n=Tt(t);if(n)return`mod:${n.path}`;let s=String(t?.id||"").match(/^fn:(.+)#/);return s?`mod:${s[1]}`:null}function Cl(e){if(!e)return"";let t=e.end>e.start?`${e.start}-${e.end}`:`${e.start}`;return` [${e.path}:${t}]`}function zo(e){return(e?.attributes||[]).find(t=>t.key==="decorators")?.value||""}function Ch(e,t,{toolNamePrefix:n="tmct_"}={}){let s=[`${t.label} \u2014 ${rs(t.class)} (id: ${t.id})`],o=xe(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(`
|
|
@@ -51,7 +51,7 @@ ${s.join(`
|
|
|
51
51
|
\u2026+${o.length-Rl} more`:"")}function nm(e,t){let n=Nn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=xe(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,_l).map(i=>{let a=e.byId.get(i.object),l=a?Tt(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
53
|
`)}`+(o.length>_l?`
|
|
54
|
-
\u2026+${o.length-_l} more`:"")}var Tl,ch,vh,dh,_E,AE,kl,IE,Qi,CE,OE,LE,Sh,NE,PE,ME,FE,DE,zE,UE,BE,WE,GE,VE,qE,HE,KE,YE,XE,JE,QE,ZE,eS,tS,nS,sS,oS,rS,ph,iS,aS,kh,jh,Rh,cS,lS,uS,dS,pS,hh,mh,mS,gh,Xi,bh,wh,yh,Fr,Me,bS,wS,Ph,yS,qt,zh,$S,Xh,xS,ES,SS,kS,jS,RS,_S,TS,jl,$h,ta,AS,Rl,_l,Ie=C(()=>{js();ns();vl();Pr();_s();Tl="This store holds no code index, so it records no modules or commits to look through.",ch={"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"};vh=e=>/^(git|turn):/.test(String(e||""));dh=30,_E=8;AE=2,kl=25,IE=3;Qi=10,CE=8,OE=3,LE=2,Sh=5,NE=4,PE=.2,ME=.35,FE=.15,DE=e=>/(^|\/)(examples?|fixtures?|samples?|demos?|benchmarks?|test-[^/]+)(\/|$)/.test(e),zE=.2,UE=.35,BE=.2,WE=.35,GE=e=>/\.cs$/i.test(e),VE=e=>/^I[A-Z]/.test(String(e||"")),qE=.2,HE=.35,KE=50,YE=.2,XE=.35,JE=.5,QE=Sh,ZE=3,eS=4,tS=1,nS=.9,sS=.5,oS=.2,rS=.35,ph=4,iS=2,aS=[["imports"],["calls","callsSymbol"],["inherits"],["cochange"]],kh=3,jh=12,Rh=.9,cS=["imports","calls","callsSymbol","inherits"],lS=.5,uS=.6,dS=.2,pS=.35;hh=128,mh=4,mS=64,gh=250,Xi=class extends Error{};bh=new WeakMap;wh=40,yh=40,Fr=30;Me=(e,t)=>(e?.attributes||[]).find(n=>n.key===t)?.value||"";bS=25,wS=15;Ph=40,yS="tests edges are recorded module to module, so this is module-grain coverage.";qt=15;zh=new Set(["Function","Method"]);$S=8;Xh={function:"Function",class:"Class",method:"Method",attribute:"Attribute"};xS=8,ES=16,SS=4,kS=6,jS=12,RS=2,_S=8,TS=3,jl=e=>String(e||"").split(",").map(t=>t.trim()).filter(Boolean),$h=e=>String(e||"").replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean),ta=e=>{let t=String(e||"").trim();return t?t.split(",").map(n=>n.trim()).filter(Boolean).length:0},AS=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};Rl=20;_l=40});function Ke(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function lm(e){let t=String(e||"");return sm&&(t=t.replace(sm," ")),t.replace(/\s+/g," ").trim()}function um(e){let t=String(e||"");t=t.replace(ZS," ").replace(/\s+/g," ").trim();for(let n=0;n<3;n++){let s=t,o=t.match(KS);if(o&&(t=o[1].trim()),o=t.match(YS),o&&(t=o[1].trim()),o=t.match(om),o&&(t=o[1].trim()),o=t.match(rm),o&&(t=o[1].trim()),o=t.match(im),o&&(t=o[1].trim()),o=t.match(QS),o&&(t=o[1].trim()),o=t.match(am),o&&(t=o[1].trim()),o=t.match(ek),o&&(t=o[1].trim()),o=t.match(tk),o&&Ts.test(o[1].trim())&&(t=o[1].trim()),o=t.match(nk),o&&Ts.test(o[1].trim())&&(t=o[1].trim()),o=t.match(sk),o&&Ts.test(o[1].trim())&&(t=o[1].trim()),o=t.match(ok),o&&Ts.test(o[1].trim())&&(t=o[1].trim()),o=t.match(rk),o&&Ts.test(o[1].trim())&&(t=o[1].trim()),o=t.match(ik),o&&Ts.test(o[1].trim())&&(t=o[1].trim()),o=t.match(ak),o&&(t=`what ${o[2].toLowerCase()} ${o[1].trim()}`),o=t.match(ck),o&&(t=`what does ${o[1].trim()} mean`),o=t.match(lk),o&&(t=`what do you ${o[1].toLowerCase()} about ${o[2].trim()}`),o=t.match(uk),o){let r=o[1].trim();HS(r)||(t=!dk.test(r)&&(GS.test(r)||Ts.test(r))?r:`describe ${r}`)}if(o=t.match(pk),o){let r=o[1].trim();(Ts.test(r)||fk.test(r)||am.test(r)||om.test(r)||im.test(r)||rm.test(r)||hk.test(r))&&(t=r)}if(t===s)break}return t}function Sk(e){let t=String(e||"");for(let n=0;n<3;n++){let s=t,o=t.match(xk);if(o&&(t=o[1].trim()),o=t.match(Ek),o&&(t=o[1].trim()),t===s)break}return t}function jk(e){let t=String(e||"");for(let n=0;n<3;n++){let s=t.match(kk);if(!s)break;let o=s[1].trim();if(!o||o===t)break;t=o}return t}function Tk(e){let t=String(e||""),n=t.match(_k);if(n){let o=pm[n[1].toLowerCase()],r=dm[n[2].toLowerCase()];return`${o} ${r} ${n[3].trim()} and ${n[4].toLowerCase()}`}let s=t.match(fm);return s?`which modules transitively import ${s[1].trim()}`:t}function oa(e){return String(e||"").replace(PS,t=>fl[t.toLowerCase()])}function io(e){let t=oa(e);return t=t.replace(MS,n=>hl[n.toLowerCase()]),t=t.replace(FS,n=>ml[n.toLowerCase()]),t=t.replace(DS,"with"),t=t.replace(zS,(n,s)=>`${s} for`),t=t.replace(US,(n,s)=>`for ${s}`),t=t.replace(BS,(n,s)=>s),t=t.replace(Ak,"$1$2"),t=t.replace(Cf,"$1ing"),t=um(t),t=jk(t),t=Sk(t),t=Tk(t),t=lm(t),t=nn(t),t=t.replace(/\?{2,}\s*$/,"?"),t.replace(/\s+/g," ").trim()}function zr(e){for(let t of[...Lf,...Of]){let n=e.match(t.re);if(n)return t.to(n).replace(/\s+/g," ").trim()}return e}function Nl(e){for(let t of Ik){let n=e.match(t.re);if(n)return t.to(n).replace(/\s+/g," ").trim()}return e}function hm(e){let t=String(e||"").match(Ck);if(!t)return null;let n=t[1].toLowerCase(),s=t[2].trim();return s?{entWord:n,predicate:s}:null}var NS,PS,cm,MS,FS,DS,zS,US,BS,WS,sm,GS,Ts,VS,qS,HS,Dr,KS,YS,XS,JS,om,rm,im,QS,ZS,ek,tk,nk,sk,ok,rk,ik,ak,ck,lk,uk,dk,pk,fk,hk,am,sa,mk,gk,bk,wk,yk,$k,vk,z1,xk,Ek,kk,dm,pm,Rk,_k,fm,Ak,Ik,Ck,nt,Ht,fe,vn=C(()=>{On();NS=e=>new RegExp("\\b("+Object.keys(e).sort((t,n)=>n.length-t.length).map(Ke).join("|")+")\\b","gi"),PS=NS(fl),cm=e=>new RegExp("\\b("+Object.keys(e).sort((t,n)=>n.length-t.length).map(Ke).join("|")+")\\b(?!\\.[a-z0-9])","gi"),MS=cm(hl),FS=cm(ml),DS=/(?<=^|\s)w\/(?=\s|$)/gi,zS=/\b(thx|thanks|thank\s+you|many\s+thanks|ty|cheers)\s+4\b/gi,US=/\b4\s+(example|instance)\b(?!\s*[a-z])/gi,BS=/\b(this|that)\s+(class|module|function|method|attribute|variable|file|commit)\b/gi,WS=Object.keys(de).sort((e,t)=>t.length-e.length).map(Ke).join("|"),sm=Cr.length?new RegExp("\\b("+[...Cr].sort((e,t)=>t.length-e.length).map(Ke).join("|")+")\\b\\s*,?","gi"):null;GS=new RegExp("\\b(?:"+Object.keys(de).sort((e,t)=>t.length-e.length).map(Ke).join("|")+")\\b","i"),Ts=/^(?:which|what|who|whose|where|when|why|how)\b/i,VS=new Set(["modules","files","packages","functions","methods","classes","attributes","fields","properties","variables","globals","commits","changes","tests","members"]),qS=/^(?:all\s+|the\s+)?(?:module|file|package|function|method|class|attribute|field|property|variable|global|commit|change|test|member)\??$/i,HS=e=>{if(qS.test(e))return!0;let t=e.replace(/\?+\s*$/,"").trim().split(/\s+/);return VS.has((t[t.length-1]||"").toLowerCase())},Dr="[,.;:!]|\u2014|\u2013|-",KS=/^(?: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,YS=/^(?: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,XS="ok(?:ay)?|aight|cool|alright|sure|right|fine|great|nice|got it|gotcha|sounds good|no worries|no problem|another\\s+one",JS="(?:just\\s+)?(?:one|another)\\s+more",om=new RegExp(`^(?:(?:${XS})[\\s,]+|(?:${JS})\\s*(?:${Dr})\\s*)+(.+)$`,"i"),rm=/^(?: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,im=/^(?:(?:maybe|possibly|perhaps)\s+)+(.+)$/i,QS=/^(?:please[\s,]+)+(.+)$/i,ZS=/,?\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,ek=/^(?:can|could|would|will)\s+you\s+(?:please\s+)?(.+?)(?:[,\s]+please)?\??$/i,tk=/^explain\s+(?:to\s+me\s+|please\s+)*(.+?)\??$/i,nk=/^tell\s+me\s+(?:please\s+)?(.+?)\??$/i,sk=/^(?:(?:would|do)\s+you\s+)?mind\s+telling\s+(?:me|us)\s+(?:please\s+)?(.+?)\??$/i,ok=/^do\s+you\s+know\s+(.+?)\??$/i,rk=/^i(?:'d|\s+would)?\s+(?:(?:like|want|need)\s+to|wanna)\s+know\s+(.+?)\??$/i,ik=/^i(?:\s+was|\s+am|'m)?\s+(?:just\s+)?(?:wonder(?:ing|ed)?|curious)(?:\s+(?:if|whether|about))?\s+(.+?)\??$/i,ak=/^what\s+((?:an?\s+|the\s+)?[\w'-]+(?:\s+[\w'-]+){0,2})\s+(is|are)\??$/i,ck=/^what\s+((?:an?\s+|the\s+)?[\w'-]+(?:\s+[\w'-]+){0,2})\s+means\??$/i,lk=/^what\s+you\s+(know|remember)\s+about\s+(.+?)\??$/i,uk=/^(?:show|give)\s+me\s+(?:the\s+)?(.+?)\??$/i,dk=/^everything\s+i(?:'d|\s+would)?\s+need\b/i,pk=/^(?:and|also|so|then|now|but)\s+(.+)$/i,fk=/^(?:does|do|did|is|are|was|were|has|have|had|can|could|will|would|should)\b/i,hk=/^(?:the|its|their|his|her|our|my)\s+[\w'-]+(?:\s+[\w'-]+){0,2}\s+(?:that|which|who)\s+\S/i,am=/^(?:(?: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;sa=e=>[...e].sort((t,n)=>n.length-t.length).map(Ke).join("|"),mk=Object.freeze(["oh","ah","aha","ooh","ohh","wow","huh","hm","hmm","mm","mmm","heh","ha","yay","ugh","oof","phew","whoa","oops","yikes","oi"]),gk=Object.freeze(["nice","cool","great","neat","lovely","interesting","good","ok","okay","fair enough","makes sense","i see","got it","fine"]),bk=Object.freeze(["um","umm","uhm","uh","uhh","er","err","erm","ehm","eh","well","anyway","anyhow","anyways","regardless","moving on"]),wk=Object.freeze(["quick question","quick q","one quick question","just a quick question","random question","random thing","one more random thing","another random thing","one more thing","one last thing","last thing","one more question","side note","side question","sidebar","off topic","unrelated","on a different note","different topic","changing the subject","new topic","just curious","out of curiosity","curious","genuinely curious","while i'm here","while i have you","before i forget"]),yk=`(?:${sa(mk)})(?:\\s+(?:${sa(gk)}))?\\s*(?:${Dr})\\s*`,$k=`(?:${sa(bk)})\\s*(?:(?:${Dr})\\s*|\\s+)`,vk=`(?:${sa(wk)})\\s*(?:${Dr})\\s*`,z1=new RegExp(`^(?:sorry\\s*(?:${Dr})?\\s*)?(?:${yk}|${$k}|${vk})+`,"i"),xk=/^(?:since|although|(?:even\s+)?though|while|because|whereas|given\s+that|now\s+that)\s+.+?,\s*(.+)$/i,Ek=/^(.+?),\s*(?:since|although|(?:even\s+)?though|while|because|whereas|given\s+that|now\s+that)\s+.+$/i;kk=/^.+?(?:\s*(?:--|—|-)\s*)?\b(?:sorry|i\s+mean)\b\s*(?:--|—|-|,|:)\s*(.+)$/i;dm=Object.freeze({imports:"importing",calls:"calling",touches:"touching",tests:"testing",exports:"exporting",contains:"containing",defines:"defining",uses:"using","inherits from":"inheriting from"}),pm=Object.freeze({module:"modules",class:"classes",function:"functions",method:"methods",attribute:"attributes",variable:"variables",commit:"commits",file:"files"}),Rk="public|private|protected|static|abstract|constant|re-?exported|exported|tested|covered|untested|uncovered",_k=new RegExp("^if\\s+(?:a|an|the)?\\s*("+Object.keys(pm).join("|")+")\\s+("+Object.keys(dm).join("|")+")\\s+(.+?),\\s*(?:is|are)\\s+(?:it|that|they|this)\\s+("+Rk+")\\??$","i"),fm=/^if\s+(.+?)\s+(?:were|was)\s+(?:deleted|removed),?\s*what\s+(?:would|might|could)\s+(?:break|fail|be\s+affected)\??$/i;Ak=new RegExp(`^(where\\s+(?:is|are|was|were)\\s+.+?)\\s+(?:${dl.map(Ke).join("|")})(\\s*[?.!]*)$`,"i");Ik=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+(?:${pl.map(Ke).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+(${WS})\\s+(?:anything|something)(?:\\s+else)?\\??$`,"i"),to:e=>`what does ${e[1]} ${e[2]}`}]);Ck=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");nt=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"]),Ht=e=>String(e).replace(/\?+\s*$/,"").replace(/,/g," ").split(/\s+/).filter(Boolean),fe=e=>e.flatMap(t=>String(t).toLowerCase().split(" "))});var gm,mm=C(()=>{gm={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","chappe","chapped","chappes","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","seiding","seifing","seiing","seined","seiths","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 as(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 Ml(e){return/^[a-z]+$/.test(e)&&!nt.has(e)&&!Pl.has(e)}function ym(e){return Pk(e)?null:ra(e,wm,cs(e))}function ra(e,t,n=cs(e)){let s=n+1,o=null,r=!1;for(let i of t){let a=as(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 Lk,cs,Pl,bm,wm,Nk,Pk,Wo=C(()=>{On();mm();vn();Lk=["used"];cs=e=>e.length<=5?1:2,Pl=new Set([...Object.keys(de),...Object.keys(Ge),...Object.keys(sn),...Lk].flatMap(e=>e.split(" "))),bm=4,wm=[...new Set([...Object.keys(de),...Object.keys(sn)].flatMap(e=>e.split(" ")).filter(e=>e.length>=bm))],Nk=new Set(gm.words),Pk=e=>Nk.has(e)});function Go(e){for(let t of zk){let n=e.match(t.re);if(n){let s=t.build(n);if(s)return s}}return null}var ia,Mk,Fk,Dk,Fl,zk,$m,aa=C(()=>{On();vn();ia=Object.keys(de).sort((e,t)=>t.length-e.length).map(Ke).join("|"),Mk=Object.keys(Ge).sort((e,t)=>t.length-e.length).map(Ke).join("|"),Fk=Object.keys(sn).sort((e,t)=>t.length-e.length).map(Ke).join("|"),Dk=Zs.slice().sort((e,t)=>t.length-e.length).map(Ke).join("|"),Fl=(e,t)=>e==="defines"&&Ir.has(t),zk=[{name:"ask",re:new RegExp(`^(?:does|do|did)\\s+(.+?)\\s+(${ia})\\s+(.+?)\\??$`,"i"),build:e=>{let t=e[2].toLowerCase(),n=de[t];if(Fl(n,t))return null;let s=e[1].trim(),o=e[3].trim();return Ar.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+(${Mk})\\s+(?:(${Fk})\\s+)?(${ia})\\s+(.+?)\\??$`,"i"),build:e=>{let t=e[3].toLowerCase(),n=de[t];return Fl(n,t)?null:{shape:"reverse",entityType:Ge[e[1].toLowerCase()],modifier:e[2]?sn[e[2].toLowerCase()]:"direct",kind:n,object:e[4].trim()}}},{name:"forward",re:new RegExp(`^what\\s+(?:does|do|did)\\s+(.+?)\\s+(${ia})\\??$`,"i"),build:e=>{let t=e[2].toLowerCase(),n=de[t];return Fl(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+(?:${Dk})\\??$`,"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=nn(e[2].trim()),s=!/\s/.test(n);if(t==="the"&&!s||!t&&!Ge[n.toLowerCase()])return null;let o=n.toLowerCase();return t&&t!=="the"&&Af.some(r=>o===r||o.startsWith(`${r} `))?null:{shape:"meta",entityType:null,modifier:"direct",kind:"meta",object:Es(n)}}},{name:"mention",re:new RegExp(`^where\\s+(?:is|are|was|were)\\s+(.+?)\\s+(?:${$n.map(Ke).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+(?:${tn.map(Ke).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+)?(${ia})\\??$`,"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()})}];$m={id:"grammar",class:"graph-query",run(e){let t=Go(e);return t?{strategyId:"grammar",class:"graph-query",candidates:[{parsed:t,confidence:.9}]}:null}}});function vm(e){let t=e.trim().split(/\s+/);return t.length>1&&Di.has(t[0].toLowerCase())}function Gk(e){return de[e.trim().toLowerCase()]==="calls"}function At(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 Br(e,t=null){let n=e.replace(/\?+\s*$/,"").replace(/,/g," ").split(/\s+/).filter(Boolean),s=n.map(E=>E.toLowerCase());if(s.includes("where")&&!At(s,de)){let E=s.some(R=>$n.includes(R)),S=new Set([...tn,...$n]),_=n.filter((R,I)=>!nt.has(s[I])&&!S.has(s[I])).join(" ").trim();if(_){let R=E?"mentions":"where";return{shape:R,entityType:null,modifier:"direct",kind:R,object:_}}}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 _=n.slice(1,E-1).filter((R,I)=>!nt.has(s[1+I])).join(" ").trim();if(_)return{shape:"when",entityType:null,modifier:"direct",kind:"touches",object:_}}}let r=s,i=At(s,de);if(!i&&t){let E=s.map(S=>{if(!Ml(S))return S;let _=t.lemma(S);return Pl.has(_)?_:S});i=At(E,de),i&&(r=E)}let a=null;if(!i){let E=s.map(S=>S.length>=4&&Ml(S)&&ym(S)||S);if(i=At(E,de),i){r=E;let S=s.slice(i.start,i.end).findIndex((R,I)=>R!==E[i.start+I]),_=i.start+Math.max(S,0);a={from:s[_],to:E[_]}}}let l=!1;if(!i)for(let E=0;E<s.length;E+=1){let S=Ss[s[E]];if(!(S&&s[E]==="used"&&s[E+1]==="for")&&S&&s.slice(0,E).some(_=>Ur.has(_))){i={kind:S,start:E,end:E+1},l=!0;break}}if(!i)return null;!l&&i.end-i.start===1&&Ss[s[i.start]]&&s.slice(0,i.start).some(E=>Ur.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 R=n.slice(E+2).filter((I,P)=>!nt.has(s[E+2+P])).join(" ").trim();if(R)return c({shape:"forward",entityType:null,modifier:"direct",kind:i.kind,object:R})}}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 _=E.split(" "),R=i.end;if(_.every((I,P)=>r[R+P]===I)){d({start:R,end:R+_.length});break}}let f=At(r,Ge,u);d(f);let p=At(r,sn,u);d(p);let h=(E,S)=>n.slice(E,S).filter((_,R)=>!u.has(E+R)&&!nt.has(s[E+R])).join(" ").trim(),m=h(0,i.start),b=h(i.end,n.length);l&&!s.includes("by")&&Wk.has(b.toLowerCase())&&(b="");let g=i.kind,y=f?Ge[r.slice(f.start,f.end).join(" ")]:null,w=p?sn[r.slice(p.start,p.end).join(" ")]:"direct";if(g==="touches"&&s.includes("when")){let E=m||b;if(E)return c({shape:"when",entityType:null,modifier:"direct",kind:"touches",object:E})}if(g==="touches"&&s.includes("who")&&s.includes("last")){let E=m||b;if(E)return c({shape:"whoLast",entityType:null,modifier:"direct",kind:"touches",object:E})}let v=s.indexOf("by"),k=s.slice(0,i.start).findIndex(E=>Ur.has(E)),$=k>=0,x=$&&k>v;if(v>=0&&!u.has(v)&&$){let E=(R,I)=>n.slice(R,I).filter((P,T)=>{let F=R+T,U=s[F];return!u.has(F)&&!nt.has(U)&&U!=="by"&&!Ur.has(U)&&!Uk.has(U)&&!Bk.has(U)}).join(" ").trim(),[S,_]=x?[E(k+1,n.length),E(v+1,k)]:[E(0,v),E(v+1,n.length)];if(S&&_)return g==="defines"&&Ir.has(r.slice(i.start,i.end).join(" "))?null:c({shape:"ask",entityType:null,modifier:"direct",kind:g,subject:_,object:S});if(_)return c({shape:"forward",entityType:y,modifier:w,kind:g,object:_});if(S)return c({shape:"reverse",entityType:y,modifier:w,kind:g,object:S})}if(l&&v<0&&b&&s[i.start]==="called")return null;if(m&&b){let E=r.slice(i.start,i.end).join(" ");if(g==="defines"&&Ir.has(E)||g==="calls"&&(vm(b)||Gk(m)))return null;let S=m,_=b;return Ar.includes(E)&&([S,_]=[_,S]),c({shape:"ask",entityType:null,modifier:"direct",kind:g,subject:S,object:_})}if(b){if(g==="calls"&&vm(b))return null;let E=f&&f.start>=i.end?null:y;return c({shape:"reverse",entityType:E,modifier:w,kind:g,object:b})}if(g==="inherits"&&!m&&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:g,object:E})}if(m&&!b&&$&&i.end-i.start===1&&Ss[s[i.start]]){if(m.split(/\s+/).length>1)return null;if(g==="touches")return c({shape:"when",entityType:null,modifier:"direct",kind:g,object:m});let E=Ur.has(s[0]);return c({shape:"reverse",entityType:y,modifier:w,kind:g,object:m,...E?{polar:!0}:{}})}return m?c({shape:"forward",entityType:y,modifier:"direct",kind:g,object:m}):null}var Ur,Uk,Bk,Wk,xm,ca=C(()=>{On();vn();Wo();Ur=new Set(["is","are","was","were","be","been","being","get","gets","got"]),Uk=new Set(["which","what","who","whom","whose"]),Bk=new Set(es.map(e=>e.toLowerCase())),Wk=new Set(["recently","lately","yet","already","ever","again"]);xm={id:"keyword-spot",class:"graph-query",run(e,t={}){let n=Br(e,t.nlp||null);return n?{strategyId:"keyword-spot",class:"graph-query",candidates:[{parsed:n,confidence:.7}]}:null}}});function qk(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)||Em.has(l)||!s.has(l)||o[i]==="VERB"&&r.push(l)}return r}function Hk(e,t=null){let n=Ht(e),s=[],o=[];for(let i of n){let a=i.toLowerCase();/^[a-z]+$/.test(i)&&!Em.has(a)&&(Vk.has(a)||t&&typeof t.isStopWord=="function"&&t.isStopWord(a))?o.push(i):s.push(i)}let r=qk(n,s,t);return{text:s.join(" "),dropped:o,maybeNoise:r}}var Em,Vk,Sm,km=C(()=>{On();vn();aa();ca();Em=new Set([...nt,...fe(Qs),...fe(Object.keys(de)),...fe(Object.keys(Ge)),...fe(Object.keys(sn)),...fe(Object.keys(Qe)),...fe(eo),...fe(to),...fe(Object.keys(In)),...fe(Object.keys(Cn)),...fe(Object.keys(Oo)),...fe(es),...fe(Or),...fe(Zs),...fe(tn),...fe($n),...fe(Zn),...fe(Object.keys(No))]),Vk=new Set([...fe(Cr),...fe(zi)]);Sm={id:"noise-strip",class:"noise-stripped",run(e,t={}){if(Go(e))return null;let{text:n,dropped:s,maybeNoise:o}=Hk(e,t.nlp||null);if(!s.length||!n)return null;let r=Go(n)||Br(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 jm=C(()=>{});var la,ua=C(()=>{la=()=>{}});function _m(e,t){return e.shape!==t.shape||e.kind!==t.kind?!1:e.shape==="ask"?Vo(e.subject)===Vo(t.subject)&&Vo(e.object)===Vo(t.object):Vo(e.object)===Vo(t.object)}function Dl(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=>!Tm(c))&&(n=n.filter(c=>!Tm(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(h=>_m(h.parsed,f.parsed)&&h.via===f.via);if(p){p.agreed+=1,p.confidence=Math.max(p.confidence,f.confidence),Rm(f.parsed)<Rm(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=>_m(u.parsed,c.parsed)));return{class:i.class,parsed:a,winner:i.candidates[0],alternates:l}}function Xk(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 Am(e,{describe:t=Xk,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 Vo,Kk,Rm,Yk,Tm,zl=C(()=>{Vo=e=>String(e||"").trim().toLowerCase().replace(/\s+/g," ").replace(/^(?:the|a|an)\s+/,"").replace(/^commit\s+(?=[0-9a-f]{7,40}$)/,""),Kk=/^\s*(?:the|a|an)\s+/i,Rm=e=>[e?.subject,e?.object].filter(t=>Kk.test(String(t||""))).length;Yk=new Set(["fuzzy","lemma","spell"]),Tm=e=>Yk.has(e.via)});function da(e){Ul=e}function pa(){return typeof Ul=="function"?Ul():null}var Ul,qo=C(()=>{Ul=null});function Om(e,t={},n=Qk){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 Jk,Qk,Lm=C(()=>{vn();aa();ca();km();jm();ua();zl();qo();Jk=[...typeof void 0<"u"?[void 0]:[],...typeof void 0<"u"?[void 0]:[]],Qk=[$m,xm,Sm,...Jk]});function Ho(e){return Zk.test(String(e||"").trim())?"an":"a"}function fa(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 Ko(e){let t=String(e||"");return t&&t[0].toUpperCase()+t.slice(1)}function Wr(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 Zk,ha=C(()=>{Zk=/^[aeiou]/i});var Gr,Bl=C(()=>{Gr=(e,t,n)=>n});var Eg={};Gt(Eg,{DYNAMIC_TAIL_OK_RE:()=>gu,applyNegationFrames:()=>zr,ask:()=>Os,classDisplayName:()=>ls,degreeMetric:()=>hg,metaFallbackEntityAnswer:()=>ag,normalizeQuery:()=>io,parseQuery:()=>uo,parseQueryFull:()=>su,render:()=>En,rephraseHint:()=>uu,resolveObject:()=>Sn,traverse:()=>Kt,worldRelationGraphPayload:()=>HR});function Xe(e,t){let n=Nm.get(e);n||(n=new Map,Nm.set(e,n));let s=n.get(t);if(s)return s;let o=[];for(let r of e.relations)if(is(r)===t)for(let i of r.edges)o.push(i);return n.set(t,o),o}function Fe(e,t){let[n,s]=Kl[e]||["result","results"];return t===1?n:s}function Xr(e,t,n,s={}){return!e||!t.length?[]:[{kind:"set",class:e,label:`${t.length} ${Fe(e,t.length)}`,ids:t.map(o=>o.id),attrs:{count:t.length},lane:n,...s}]}function ls(e){let t=String(e||"");if(typeof Ln=="function"){let n=Ln(t).join(" ");if(n)return n}return t.replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase()}function ao(e){return tj[e]||e}function ij(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||rj.has(s))return e;let o=String(n.object||"").trim().toLowerCase();return fe(Zs).includes(o)?t:e}function lj(e,t){if(!e||e.shape!=="where"||e.altObject||!aj.test(t))return e;let n=Fi(t),s=Fi(String(e.object||"")),o=s===e.object?e:{...e,object:s},r=Ht(s);if(r.length<2)return o;let i=r[r.length-1].toLowerCase();if(!/^[a-z][a-z'-]*$/.test(i)||nt.has(i)||de[i]||i.endsWith("ing"))return o;let a=Ht(n).map(c=>c.toLowerCase());for(;a.length&&cj.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 uo(e,{nlp:t=void 0}={}){return su(e,{nlp:t}).parsed}function su(e,{nlp:t=void 0}={}){let n=t===void 0?pa():t,s=String(e||"").trim().replace(/\s+/g," ");if(!s)return{parsed:null,alternates:[],class:null};let o=Nl(zr(io(s)));if(!o)return{parsed:null,alternates:[],class:null};let r=dj(o,n);if(r)return{parsed:r,alternates:[],class:null};let i=Dl(Om(o,{nlp:n,raw:s}));return i?{parsed:lj(ij(i.parsed),o),alternates:i.alternates||[],class:i.class||null}:{parsed:null,alternates:[],class:null}}function Xl(e,t){return t.length&&Jm.has(t[0])?{bw:e.slice(1),blc:t.slice(1)}:{bw:e,blc:t}}function Jo(e,t){return Go(e)||Br(e,t)}function dj(e,t){let n=Ht(e),s=n.map(o=>o.toLowerCase());return Ij(n,s)||Oj(n,s)||mj(n,s,t)||Zm(e,t,0)||Lj(n,s,t)||bj(n,s,t)||Sj(n,s,t,0)||jj(n,s)||Tj(n,s,t)||Nj(n,s,t)||Fj(n,s,t)||zj(n,s,t,0)||Mj(n,s,t,0)||ru(n,s,t,0)||yj(n,s,t)||fj(n,s)||rg(n,s,t,0)}function fj(e,t){let n=0;pj.has(t[n])&&(n+=1);let s=It(t[n]);if(!s||s.placeholder||!s.entityType)return null;let o=s.entityType;n+=1;let r=h=>h+1<t.length?If[`${t[h]} ${t[h+1]}`]:void 0,i=r(n);if(!i)return null;let a=n+2,l=-1,c;for(let h=a;h+1<t.length;h+=1){let m=r(h);if(m){l=h,c=m;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=(h,m)=>h.role==="object"?{shape:"reverse",kind:h.kind,entityType:o,modifier:"direct",object:m}:{shape:"forward",kind:h.kind,modifier:"direct",object:m},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 ga(e,t){return{node:"boolean",entityType:e,atoms:[{op:"seed",kind:"set",ast:{node:"allOfClass",entityType:e}},t]}}function mj(e,t,n){if(!["do","does","did"].includes(t[0])||!hj.has(t[1]))return null;let s=It(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=At(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)&&!nt.has(a[p])&&a[p]!=="from").join(" ").trim();if(!u)return null;let d=Qo(`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:ga(o,{op:"difference",kind:"set",ast:d})}}function Zm(e,t,n=0){let s=hm(e);if(!s)return null;let o=It(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=Ht(s.predicate),a=i.map(d=>d.toLowerCase());if(a.length&&a.every(d=>Qe[d]))return ga(r,{op:"difference",kind:"qual",filters:a});let l=At(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)&&!nt.has(a[f])&&a[f]!=="from").length)return ga(r,{op:"difference",kind:"set",ast:{node:"existsEdge",entityType:r,kind:l.kind}});let u=Qo(`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"}:ga(r,{op:"difference",kind:"set",ast:u})}function bj(e,t,n){let s=0;for(;s<t.length&&gj.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=At(r,de);if(!a)return null;let c=o.filter((u,d)=>d!==i&&(d<a.start||d>=a.end)&&r[d]!=="from"&&!nt.has(r[d])).join(" ").trim();return c?{node:"forwardComplement",kind:a.kind,subjectTerm:c}:null}function eg(e,t){let n=new Set;for(let s of t)for(let o of Xe(e,s)){let r=e.byId.get(o.object);r&&r.class&&n.add(r.class)}return n}function tg(e,t){let n=Mt(t),s=n.filter(r=>!Ym.has(r)),o=eg(e,s.length?s:n);return o.size===1?[...o][0]:null}function Qo(e,t,n){if(n>Xm)return{node:"miss",reason:"too deep to resolve"};let s=Zm(e,t,n);if(s)return s;let o=Ht(e),r=o.map(c=>c.toLowerCase()),i=ru(o,r,t,n);if(i)return i;let a=rg(o,r,t,n);if(a)return a;let l=Jo(e,t);return l?{node:"clause",clause:l}:null}function ru(e,t,n,s){for(let o=1;o<t.length;o+=1){let r=Zn.includes(t[o]),i=!r&&Qm(t[o]);if(!r&&!i||r&&o+1>=t.length||!It(t[o-1]))continue;let l=e.slice(0,o-1);if(!l.length||l.every(f=>Qe[f.toLowerCase()]))continue;let c=Jo([...l,Yl].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=Qo(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 yj(e,t,n){for(let s=0;s<t.length;s+=1){if(!wj.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),Yl,...e.slice(s+1)],a=Jo(i.join(" "),n);if(!(!a||a.shape!=="reverse"&&a.shape!=="forward")&&a.object===Yl&&!(a.modifier&&a.modifier!=="direct"))return{node:a.shape==="reverse"?"reverseSet":"forwardSet",kind:a.kind,entityType:a.entityType,inner:{node:"prevSet"}}}return null}function Sj(e,t,n,s=0){if(t[0]!=="when")return null;let o=1;if(!$j.has(t[o]))return null;o+=1;let r=-1;for(let d=t.length-1;d>=o;d-=1)if(vj.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&&xj.has(a[a.length-1]);)i=i.slice(0,-1),a=a.slice(0,-1);for(;a.length&&Ej.has(a[0]);)i=i.slice(1),a=a.slice(1);if(!i.length||!a.some(d=>Zn.includes(d)))return null;let l=ou.has(a[0])?i.join(" "):`which ${i.join(" ")}`,c=Qo(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=It(a[0]);return{node:"temporal",inner:c,entityType:u&&u.entityType||null}}function jj(e,t){if(t[0]!=="what"||t[1]!=="changed")return null;let n=2;if(t[n]==="ever"&&(n+=1),!kj.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 _j(e){let t=new Set,n=[];for(let s of e){if(!s||!Rj.test(s))continue;let o=s.toLowerCase();t.has(o)||(t.add(o),n.push(s))}return n}function Tj(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(!Or.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&&(eo.includes(f)||to.includes(f))){s=d;break}}if(s<0)return null;let r=(o?t.slice(0,s-1):t.slice(0,s)).join(" "),i=eo.includes(r)||/^(how many|how much|count|number|quantity|total)\b/.test(r)?"count":"list",a=Aj(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=_j(e.slice(0,l)),u={node:"anaphora",mode:i,filter:a};return c.length>=2&&(u.candidateTerms=c),u}function Aj(e,t){let n=0,s=e.map(a=>a.toLowerCase());for(;n<s.length&&uj.has(s[n]);)n+=1;let o=e.slice(n),r=s.slice(n);if(!o.length)return{type:"all"};if(r.every(a=>Qe[a]))return{type:"qual",filters:r};if(o.length===1){let a=It(r[0]);if(a&&!a.placeholder&&a.entityType)return{type:"entity",entityType:a.entityType}}let i=Jo(`what ${o.join(" ")}`,t);if(i&&(i.shape==="reverse"||i.shape==="forward")&&i.object)return{type:"clause",clause:i}}function Ij(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?It(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 Cj(e,t){if(!t.length)return null;let n=`${e} ${t.join(" ")}`,s=Es(n).slice(e.length).trim(),o=Ht(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 Oj(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(Qe[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&&Ss[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&&!Nf.has(u))return null}let r=Cj(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 Lj(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=Jo(e.filter((r,i)=>i!==s).join(" "),n);return!o||o.shape!=="ask"?null:{...o,negated:!0}}function Nj(e,t,n){let s=eo.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&&Qe[t[o]];)r.push(t[o]),o+=1;let i=o<t.length?It(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=>!nt.has(d)&&!ng.has(d)),u;if(c){let d=Qo(`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 Mj(e,t,n,s){let o=0,r=!1,i=null;for(let y of sg){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&&iu.has(t[o]);)o+=1;let a=[];for(;o<t.length&&Qe[t[o]];)a.push(t[o]),o+=1;let l=o<t.length?It(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]]&&!es.includes(t[o])?{node:"miss",reason:`"${t[o]}" isn't a listable kind \u2014 try ${og}`}:null;let c=l.entityType,u=t[o];o+=1;let d=e.slice(o),f=t.slice(o).some(y=>!nt.has(y)&&!ng.has(y)),p=t.slice(o),h=d;(p[0]==="is"||p[0]==="are")&&(p=p.slice(1),h=h.slice(1));let m=r&&Pj.has(p[0]);if(r&&(f&&!m||d.length===0))return null;let b,g=!1;if(f){let y=m?h:d,w=Qo(`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"};b=w,g=!0}else b={node:"allOfClass",entityType:c},a.length&&(b={node:"qualifier",filters:a,inner:b});return{node:"list",entityType:c,base:b,scoped:g}}function Fj(e,t,n){let s=null,o=-1;for(let h=0;h<t.length;h+=1){let m=t.slice(h,h+2).join(" ");if(In[m]){s=In[m],o=h;break}if(In[t[h]]){s=In[t[h]],o=h;break}}if(!s)return null;let r=null,i=null;for(let h=o;h<t.length;h+=1)if(Cn[t[h]]){r=Cn[t[h]],i=t[h];break}if(!r){for(let h=o-1;h>=0;h-=1)if(Cn[t[h]]){r=Cn[t[h]],i=t[h];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(h=>l.includes(h));!r&&(a||c)&&(r=Cn.connections,i="connections");let u,d=null;for(let h of t){let m=It(h);if(m&&!m.placeholder){u=m.entityType,d=h;break}}if(!d&&(u=i?Pf[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(h=>f.includes(h))?s==="most"?"fewest":"most":s;return{node:"superlative",entityType:u,metric:r,metricNoun:i,extreme:p}}function zj(e,t,n,s){if(t[0]!=="find")return null;let o=1;for(;o<t.length&&iu.has(t[o]);)o+=1;if(o>=t.length)return null;let r=It(t[o]);if(r&&!r.placeholder&&r.entityType!=="Change"&&o+1<t.length&&Dj.has(t[o+1])){let a=e.slice(o+2).join(" ").trim();if(a)return{node:"find",entityType:r.entityType,term:a}}let i=It(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=>Zn.includes(a))?null:o===t.length-1&&/^[a-z]+$/.test(t[o])&&!de[t[o]]&&!es.includes(t[o])?{node:"miss",reason:`"${t[o]}" isn't a listable kind \u2014 try ${og}`}:null}function Uj(e,t){if(t[0]!=="find")return null;let n=1;for(;n<t.length&&iu.has(t[n]);)n+=1;let s=-1;for(let i=n+1;i<t.length;i+=1)if(Zn.includes(t[i])){s=i;break}if(s<0)return null;let o=It(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 Bj(e,t,n,s,o,r){let{branches:i,ops:a}=ba(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],h=Xl(d,f);if(h.blc.length&&h.blc.every(y=>Qe[y])){c.push({op:p,kind:"qual",filters:h.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 m=d,b=At(f,de);b?l=d.slice(b.start,b.end):l&&(m=[...l,...d]);let g=ig(`${t} ${m.join(" ")}`,o,r);if(!g||g.node==="miss")return{miss:g&&g.reason||"a clause in the combination didn't parse"};c.push({op:p,kind:"set",ast:g})}return{atoms:c}}function rg(e,t,n,s){let o=Uj(e,t);if(o){let{entityType:_,term:R,relIdx:I}=o,P=t.slice(I+1),T=e.slice(I+1);if(!P.length)return{node:"miss",reason:`a relative clause needs a predicate after "${t[I]}"`};let F=Bj(_,`which ${t[I-1]}`,P,T,n,s+1);if(F.miss)return{node:"miss",reason:F.miss};let U=[{op:"seed",kind:"set",ast:{node:"find",entityType:_,term:R}},...F.atoms];return U.length===1?U[0].ast:{node:"boolean",entityType:_,atoms:U}}let r=0;for(;r<t.length&&ou.has(t[r]);)r+=1;let i=r>0,a=[];for(;r<t.length&&Qe[t[r]];)a.push(t[r]),r+=1;let l=r<t.length?It(t[r]):null;if(!l){let _=r+1<t.length?It(t[r+1]):null;if(Pm.has(t[r])&&_&&_.entityType==="Commit"&&r+2===t.length)return{node:"recentCommits"};if(Jm.has(t[r])){let R=r+1;R<t.length&&(t[R]==="the"||t[R]==="a"||t[R]==="an")&&(R+=1);let I=R+1<t.length?It(t[R+1]):null;if(Pm.has(t[R])&&I&&I.entityType==="Commit"&&R+2===t.length)return{node:"recentCommits"}}return(i||a.length)&&_&&/^[a-z]+$/.test(t[r])&&!de[t[r]]&&!nt.has(t[r])&&!hu.has(t[r])?{node:"find",entityType:_.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&&Zn.includes(d[0])&&(p=!0,d=d.slice(1),f=f.slice(1));let h=d[0]==="of"||d[0]==="in",m=d.length>0&&Qm(d[0]),b=f.length>0&&ba(d,f).branches.some(_=>{let{blc:R}=Xl(_,_.map(I=>I.toLowerCase()));return R.length&&R.every(I=>Qe[I])}),g=f.length>0?ba(d,f).branches:[],y=!1;if(g.length>1){let _=g[0].map(I=>I.toLowerCase()),R=At(_,de);R&&R.start===0&&(y=g.slice(1).every(I=>{let P=I.map(F=>F.toLowerCase()),T=At(P,de);return T&&T.start===0?T.kind===R.kind:!T}))}let w=!1;if(g.length>1){let _=g[0].map(I=>I.toLowerCase()),R=At(_,de);R&&R.start===0&&(w=g.slice(1).every(I=>{let P=I.map(F=>F.toLowerCase()),T=At(P,de);return!!T&&T.start===0&&T.end-T.start===1}))}if(!(a.length||p||h||m||b||y||w))return null;if(!f.length){let _={node:"allOfClass",entityType:c};return a.length?{node:"qualifier",filters:a,inner:_,entityType:c}:{node:"miss",reason:"nothing to filter or traverse"}}let v=l.placeholder?"what":`which ${u}`,{branches:k,ops:$}=ba(d,f),x=null,E=[];for(let _=0;_<k.length;_+=1){let R=k[_],I=R.map(ce=>ce.toLowerCase()),P=_===0?"seed":$[_-1],T=Xl(R,I);if(T.blc.length&&T.blc.every(ce=>Qe[ce])){E.push({op:P,kind:"qual",filters:T.blc});continue}if(I[0]==="of"||I[0]==="in"){E.push({op:P,kind:"set",ast:{node:"membership",entityType:c,term:R.slice(1).join(" ")}});continue}let F=R,U=At(I,de);U?x=R.slice(U.start,U.end):x&&(F=[...x,...R]);let K=ig(`${v} ${F.join(" ")}`,n,s+1);if(!K||K.node==="miss")return{node:"miss",reason:K&&K.reason||"a clause in the combination didn't parse"};E.push({op:P,kind:"set",ast:K})}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 ig(e,t,n){if(n>Xm)return{node:"miss",reason:"too deep to resolve"};let s=Ht(e),o=s.map(a=>a.toLowerCase()),r=ru(s,o,t,n);if(r)return r;let i=Jo(e,t);return i?{node:"clause",clause:i}:null}function ba(e,t){let n=Object.keys(Oo).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(Oo[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 au(e,t,n,s){let o=Yo[t];if(o&&Cs.has(n)){let u=Xe(e,o).filter(d=>s.has(d.object));return ds(u.map(d=>e.byId.get(d.subject)).filter(d=>d&&d.class===n))}let a=(!!o&&[...s].some(u=>Cs.has(e.byId.get(u)?.class))?[...Mt(t),o]:Mt(t)).flatMap(u=>Xe(e,u)).filter(u=>s.has(u.object)),l=ds(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")?du(e,new Set(l.filter(u=>u.class==="Module").map(u=>u.id)),n):[]}function Gj(e,t){let n=new Set(au(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=Wj.exec(String(o||""));r&&n.add(r[1].toLowerCase())}return n.size}function Hr(e,t,n){let s=Mt(t).flatMap(o=>Xe(e,o)).filter(o=>n.has(o.subject));return ds(s.map(o=>e.byId.get(o.object)).filter(Boolean))}function ds(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 Vj(e,t){let n=os(t);if(!n)return[];let s=`${n}/`;return e.individuals.filter(o=>o.class==="Module"&&os(o.label).startsWith(s))}function Jl(e){let t=Mm.get(e);if(t)return t;let n=new Set;for(let i of Xe(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 Xe(e,"tests"))s.add(i.object),o.add(i.subject);let r=new Map;for(let i of Xe(e,"defines"))r.set(i.object,i.subject);return t={exported:n,testedModules:s,testModules:o,moduleOfSymbol:r},Mm.set(e,t),t}function Xo(e,t){return t?t.class==="Module"?t.id:Jl(e).moduleOfSymbol.get(t.id)||null:null}function ag(e,t){let n=String(t||"").trim().toLowerCase();if(!n)return null;let s=(e?.individuals||[]).filter(d=>qj.has(d.class)&&String(d.label).toLowerCase()===n);if(s.length!==1)return null;let o=s[0],r=Xo(e,o),i=r&&e.byId.get(r)?.label||String((o.attributes||[]).find(d=>d.key==="site")?.value||"").split(":")[0]||null,a=Fe(o.class,1),l=a==="attribute"?"an":"a",c=i?`, ${Gr("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 Ql(e,t,n){let s=ds(Lo.flatMap(o=>Hr(e,o,new Set([t]))));return n?s.filter(o=>o.class===n):s}function cu(e,t,n=null){let s=us(e,t,n);if(!(s.match&&s.tier===1)){let o=Vj(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 cg(e,t,n,s,o){let r=o||(()=>!0),i=Ql(e,t,s).filter(r);if(i.length||!ug(e,n))return{own:i,inherited:[],viaId:null,viaLabel:null};for(let a of lg(e,t)){let l=e.byId.get(a);if(!l)continue;let c=Ql(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 co(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=Jl(e).exported;return s.has(String(t.label).toLowerCase())||s.has(String(t.id).toLowerCase())}case"tested":{let s=Xo(e,t),o=Jl(e),r=s?e.byId?.get?.(s):null;return s&&(o.testModules.has(s)||r&&oo(String(r.label).toLowerCase()))?!1:(!!s&&o.testedModules.has(s))===n.value}default:return!1}}function lu(e){return Xe(e,"inherits")}function Zl(e,t){return lu(e).filter(n=>n.object===t).map(n=>n.subject)}function Fm(e,t){return lu(e).filter(n=>n.subject===t).map(n=>n.object)}function Hj(e,t){let n=new Set,s=[...Zl(e,t)];for(;s.length;){let o=s.shift();if(!n.has(o)){n.add(o);for(let r of Zl(e,o))n.has(r)||s.push(r)}}return n}function lg(e,t){let n=new Set,s=[...Fm(e,t)];for(;s.length;){let o=s.shift();if(!n.has(o)){n.add(o);for(let r of Fm(e,o))n.has(r)||s.push(r)}}return n}function ug(e,t){let n=Dm.get(e);if(n||(n=new Map,Dm.set(e,n)),n.has(t))return n.get(t);let s=lu(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 zm(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 Bm(e){return e.slice().sort((t,n)=>Um[n.via]-Um[t.via]||String(t.ind.label).length-String(n.ind.label).length).map(t=>t.ind)}function Wm(e,t){let n=String(t||"").trim().toLowerCase();if(n.length<4)return!1;let s=cs(n);if(as(String(e.label||"").toLowerCase(),n,s)<=s)return!0;for(let o of lo(e.label))if(as(o,n,s)<=s)return!0;return!1}function dg(e,t,n){let s=e.individuals.filter(l=>l.class===t),o=[...lo(n)];if(!o.length||!s.length)return{narrow:[],broad:[]};let r=ug(e,t),i=[];for(let l of s){let c=zm(l,o);if(c){i.push({ind:l,via:c});continue}if(!r)continue;[...Hj(e,l.id)].some(d=>{let f=e.byId.get(d);return!!f&&!!zm(f,o)})&&i.push({ind:l,via:"chain"})}if(i.length||!r)return{narrow:Bm(i),broad:[]};let a=new Map;for(let l of s)for(let c of lg(e,l.id)){if(!a.has(c)){let u=e.byId.get(c);u&&u.class===t&&Wm(u,n)&&a.set(c,{ind:u,via:"chain"})}for(let u of Zl(e,c)){if(u===l.id||a.has(u))continue;let d=e.byId.get(u);d&&d.class===t&&Wm(d,n)&&a.set(u,{ind:d,via:"chain"})}}return{narrow:[],broad:Bm([...a.values()])}}function Kj(e){return[...Zi(ea(e)).entries()].sort((t,n)=>n[1]-t[1]||t[0].localeCompare(n[0])).map(([t])=>({id:`pkg:${t}`,label:t,class:"Package"}))}function pn(e,t,n){switch(t.node){case"clause":return Kt(e,t.clause,n).matches||[];case"allOfClass":return t.entityType==="Package"?Kj(e):e.individuals.filter(s=>s.class===t.entityType);case"find":{let{narrow:s,broad:o}=dg(e,t.entityType,t.term);return s.length?s:o}case"existsEdge":{let s=new Set(Mt(t.kind).flatMap(o=>Xe(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=us(e,t.subjectTerm,n&&n.contextId);if(!s.match)return[];let o=tg(e,t.kind);if(!o)return[];let r=new Set(Hr(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(pn(e,t.inner,n).map(o=>o.id));return au(e,t.kind,t.entityType,s)}case"forwardSet":{let s=new Set(pn(e,t.inner,n).map(o=>o.id));return Hr(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=cu(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 ds(Lo.flatMap(l=>Hr(e,l,i))).filter(l=>l.class===t.entityType)}if(s.kind==="miss")return[];let{own:o,inherited:r}=cg(e,s.id,s.entityClass,t.entityType);return o.length?o:r}case"qualifier":return t.inner.node==="membership"?mg(e,t,n).matches:pn(e,t.inner,n).filter(o=>t.filters.every(r=>co(e,o,Qe[r])));case"boolean":return pg(e,t,n);case"anaphora":return fg(e,t,n).matches;default:return[]}}function pg(e,t,n){let s=[];for(let o of t.atoms){if(o.op==="seed"){s=pn(e,o.ast,n);continue}if(o.kind==="qual"){let i=l=>o.filters.every(c=>co(e,l,Qe[c])),a=l=>o.filters.every(c=>{let u=Yj(Qe[c]);return u?co(e,l,u):!co(e,l,Qe[c])});s=o.op==="difference"?s.filter(a):s.filter(i);continue}let r=new Set(pn(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 pn(e,o.ast,n))i.has(a.id)||(i.add(a.id),s.push(a))}}return s}function Xj(e,t){if(!Array.isArray(t)||t.length<2)return null;let n=new Set,s=[];for(let o of t){let r=Sn(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 fg(e,t,n){let o=Xj(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=>co(e,d,Qe[f])));else if(i&&i.type==="entity")r=r.filter(d=>d.class===i.entityType);else if(i&&i.type==="clause"){let d=Sn(e,i.clause.object);if(!d.match)r=[];else{let f=Yo[i.clause.kind],p=[...Mt(i.clause.kind),...f?[f]:[]],h=new Set(p.flatMap(m=>Xe(e,m)).filter(m=>m.object===d.match.id).map(m=>m.subject));r=r.filter(m=>h.has(m.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=Xr(c,r,"anaphora",{bound:!0});return{compositeKind:"set",matches:r,entityType:c,referents:u}}function hg(e,t,n){let s=n.kind==="*"?Jj:[n.kind,...n.sibling?[n.sibling]:[]],o=0;for(let r of s)for(let i of Xe(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 Qj(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 eR(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(Zj.test(s))r=s;else{let{match:u,ambiguous:d}=Sn(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 tR(e,t,n){let s=pn(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=au(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 nR(e,t){let n=e.individuals.filter(a=>a.class===t.entityType);if(t.metric?.kind==="tests"&&t.entityType==="Module"){let a=new Set(Xe(e,"tests").map(l=>l.subject));n=n.filter(l=>!a.has(l.id)&&!oo(String(l.label).toLowerCase()))}let s=n.map(a=>({ind:a,score:hg(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?Xr(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 mg(e,t,n){let s=t.node==="qualifier"&&t.inner.node==="membership"?t:null,o=s?s.inner:t,r=o.entityType,i=s?h=>s.filters.every(m=>co(e,h,Qe[m])):null,a=h=>Xr(r,h,"membership"),l=cu(e,o.term,n&&n.contextId);if(l.kind==="dir"){let h;if(!r||r==="Module")h=l.mods;else{let m=new Set(l.mods.map(b=>b.id));h=ds(Lo.flatMap(b=>Hr(e,b,m))).filter(b=>b.class===r)}return i&&(h=h.filter(i)),{compositeKind:"set",matches:h,entityType:r,referents:a(h)}}if(l.kind==="miss")return{compositeKind:"set",matches:[],entityType:r};let{own:c,inherited:u,viaLabel:d}=cg(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 sR(e,t){let{entityType:n,term:s,scopeModule:o}=t,r=null;if(o){let a=Sn(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=Sn(e,s,{expectedClass:n}),l=!r||a.match&&Xo(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?du(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 oR(e,t,n){let s=Xo(e,t);return n.kind==="dir"?n.mods.some(o=>o.id===t.id||o.id===s):s===n.id||Ql(e,n.id).some(o=>o.id===t.id)}function rR(e,t,n){let{term:s,qualifier:o,negated:r,scope:i}=t,a=us(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=cu(e,i,n.contextId);if(d.kind==="miss")return{compositeKind:"qualCheck",qualCheckMiss:"scope",term:s,scope:i,matches:[]};if(!oR(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=co(e,a.match,Qe[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 iR(e,t,n){let s=Sn(e,t.object);if(!s||!s.match)return{compositeKind:"universal",universalMiss:"unresolved",object:t.object,matches:[]};let o=pn(e,{node:"allOfClass",entityType:t.entityType},n),r=pg(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 aR(e,t,n){if(t.node==="reverseSet"&&t.kind==="touches"&&t.entityType==="Commit")return new Set(pn(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}=Kt(e,t.clause,n);return s&&!o?new Set([s.id]):null}return null}function cR(e,t,n={}){if(t.node==="miss")return{compositeMiss:!0,reason:t.reason||null,matches:[]};if(t.node==="exists")return sR(e,t);if(t.node==="qualCheck")return rR(e,t,n);if(t.node==="universal")return iR(e,t,n);if(t.node==="count"){let i=aR(e,t.base,n);return i?{compositeKind:"count",count:Gj(e,i),entityType:t.entityType,matches:[]}:{compositeKind:"count",count:pn(e,t.base,n).length,entityType:t.entityType,matches:[]}}if(t.node==="list")return{compositeKind:"list",matches:pn(e,t.base,n),entityType:t.entityType,scoped:t.scoped};if(t.node==="worldRelation")return GR(e,t);if(t.node==="superlative")return nR(e,t);if(t.node==="temporal")return tR(e,t,n);if(t.node==="recentCommits")return Qj(e);if(t.node==="commitFilter")return eR(e,t);if(t.node==="anaphora")return fg(e,t,n);if(t.node==="membership"||t.node==="qualifier"&&t.inner.node==="membership")return mg(e,t,n);if(t.node==="find"){let{narrow:i,broad:a}=dg(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=pn(e,t,n),o=t.entityType||null,r=Xr(o,s,t.node==="qualifier"?"qualifierListing":"compositeSet");return{compositeKind:"set",matches:s,entityType:o,referents:r}}function gg(){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 lR(e){let t=["Function","Method"].includes(e.class)?`${e.label}()`:e.label;if(e.class==="Module")return t;let n=Yr(e);return n?`${t} in ${n}`:t}function eu(e){return!e||typeof e!="object"?!1:Array.isArray(e)?e.some(eu):Array.isArray(e.filters)&&e.filters.some(t=>Qe[String(t).toLowerCase()]?.via==="tested")?!0:Object.values(e).some(eu)}function uR(e,t){return!["Function","Method"].includes(t)||!eu(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 dR(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})`:""}. ${gg()}.`,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=Fe(t.entityType,1),o=Fe(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=Yr(i),l=i.class==="Module"?"":a?`, ${Gr("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 ${As(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=Fe(t.entityType,t.total),o=sj(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}: ${As(t.counter)}.`,miss:!1,ambiguous:!1,matches:t.counter}}if(t.compositeKind==="count"){let s=t.entityType?Fe(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 ${Fe(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>Ye?` \u2014 narrow with "${Fe(t.entityType,2)} in <module>"`:"";return{content:`${As(t.matches)}${o}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="worldRelation"){let s=xn(t.asked),o=Js[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?` (${Fe(t.entityType,2)})`:""}. ${Is(n)}`,miss:!0,ambiguous:!1,matches:[]};if(t.inheritedNotOwn){let s=Fe(t.entityType,2);return{content:`${t.ownerLabel?`${t.ownerLabel} has no own ${s}`:`no own ${s}`} \u2014 inherited from ${t.viaLabel}: ${As(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches,inheritedNotOwn:!0}}return{content:`${As(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="find"){let s=Fe(t.entityType,1);if(!t.matches.length)return{content:`no ${Fe(t.entityType,2)} found matching "${t.term}".`,miss:!0,ambiguous:!1,matches:[]};let o=t.matches.length===1?lR(t.matches[0]):As(t.matches);return t.broad?{content:`no exact ${s} named "${t.term}", but found a related ${t.matches.length===1?s:Fe(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,qt).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>qt?` \u2026+${t.matches.length-qt} 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,qt).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>qt?` \u2026+${t.matches.length-qt} 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 ${Fe(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:`${As(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?Fe(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. ${Is(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. ${Is(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=uR(e,t.entityType)||Is(n);return{content:`nothing in the index matches that${t.entityType?` (${Fe(t.entityType,2)})`:""}. ${s}`,miss:!0,ambiguous:!1,matches:[]}}return{content:`${As(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches}}function uu(){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). `+gg()}function Is(e=null){return e&&Mr(e)===0?Tl:`Try "who touched <a module that actually has commits>" or "/describe <module>" to see what's in the index.`}function lo(e){return new Set(String(e).toLowerCase().split(/[^a-z0-9]+/).filter(Boolean))}function ya(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 bg(e){return String(e||"").replace(/\.[a-z0-9]+$/i,"").toLowerCase().replace(/[/\-_.]+/g,"")}function pR(e){return String(e||"").trim().replace(/^(?:the|a|an)\s+/i,"").toLowerCase().replace(/[\s\-_]+/g,"")}function Vr(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(b=>b.class===n):e.individuals,i=o.match(/^(commit[:\s])?([0-9a-f]{7,40})$/);if(i){let b=i[2],g=r.filter(y=>y.class==="Commit"&&(String(y.id).toLowerCase().startsWith(`commit:${b}`)||String(y.label).toLowerCase().startsWith(b)));if(g.length===1)return{match:g[0],candidates:[],tier:1,ambiguous:!1};if(g.length>1)return{match:g[0],candidates:g.slice(1,5),tier:1,ambiguous:!0};if(i[1])return{match:null,candidates:[],tier:null,ambiguous:!1}}let a=r.find(b=>String(b.label).toLowerCase()===o||String(b.id).toLowerCase()===o);if(a)return{match:a,candidates:[],tier:1,ambiguous:!1};let l=`ext:${o}`,c=null;e:for(let b of e.relations)for(let g of b.edges)if(String(g.object).toLowerCase()===l){c=g.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(b=>b.trim()).filter(Boolean);if(u.length>1){let b=new Set;for(let g of u){let y=Vr(e,g,{expectedClass:n});y.match&&!y.ambiguous&&b.add(y.match.id)}if(b.size>1)return{match:null,candidates:[],tier:null,ambiguous:!1}}let d=[],f=!o.includes("/")&&/^[\w$]+(\.[\w$]+)+$/.test(o);if(f){let b=o.split(".").pop();for(let g of r){let y=String(g.label||"").toLowerCase();g.class==="Module"?y.split("/").pop()===o&&d.push({ind:g,score:1e3-Math.abs(y.length-o.length)}):y.includes(o)?d.push({ind:g,score:2e3-Math.abs(y.length-o.length)}):y.endsWith(`.${b}`)&&d.push({ind:g,score:1500-Math.abs(y.length-o.length)})}}else{let b=[...lo(s)],g=o.split(/\s+/).find($=>$.includes("/")),y=g?g.split("/").pop().replace(/\.[a-z0-9]+$/,""):null,v=s.trim().replace(/^(?:the|a|an)\s+/i,"").trim().split(/\s+/).filter(Boolean).length>=2,k=v?pR(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 R=bg($.label);if(R&&R===k){d.push({ind:$,score:5e3});continue}let I=/[/_-]/.test($.label)||/\.[a-z0-9]+$/i.test(String($.label||""));if(R&&I&&k.length>=4&&R.includes(k)){d.push({ind:$,score:2e3-Math.abs(R.length-k.length)});continue}}if($.class==="Module"){let R=ya(o);if(R!==o&&R===ya(E)){let I=cs(o);if(as(E,o,I)>I){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=lo($.label),_=b.filter(R=>S.has(R)).length;_>0&&(!y||S.has(y))&&d.push({ind:$,score:_/b.length*Gl})}}if(d.sort((b,g)=>g.score-b.score),d.length){let[b,...g]=d,y=g.filter(v=>v.score===b.score),w=b.score>=Gl?g.filter(v=>v.score>=Gl):g;return{match:b.ind,candidates:w.slice(0,4).map(v=>v.ind),tier:3,ambiguous:y.length>0}}let p=f||o.includes("/"),h=null,m=!p&&typeof no=="function"?no(e.proseIndex,s).filter(b=>!n||e.byId.get(b.id)?.class===n):[];if(m.length){let[b,...g]=m,y=e.byId.get(b.id);if(y){let w=g.filter(v=>v.score===b.score);if(h={match:y,candidates:g.slice(0,4).map(v=>e.byId.get(v.id)).filter(Boolean),tier:4,ambiguous:w.length>0,matchedVia:"prose"},!h.ambiguous&&b.via!=="spell")return h}}if(!i&&o.length>=4){let b=cs(o),g=b+1,y=[];for(let w of r){let v=as(String(w.label||"").toLowerCase(),o,b);if(v>0)for(let k of lo(w.label)){if(v<=0)break;v=Math.min(v,as(k,o,b))}v<g?(g=v,y=[w]):v===g&&v<=b&&y.push(w)}if(g<=b&&y.length===1)return{match:y[0],candidates:[],tier:5,ambiguous:!1,matchedVia:"fuzzy"};if(g<=b&&y.length>1&&!h){let[w,...v]=y;return{match:w,candidates:v.slice(0,4),tier:5,ambiguous:!0,matchedVia:"fuzzy"}}}return h||{match:null,candidates:[],tier:null,ambiguous:!1}}function Vl(e,t){let n=bg(t),s=[...lo(t)],o=[];for(let r of lo(e))n.includes(r)||s.some(i=>ya(i)===ya(r))||wa.has(r)||$g.has(r)||o.push(r);return o}function ma(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(Vl(t,r.label))).reduce((r,i)=>r.filter(a=>i.has(a)),Vl(t,s[0].label));return o.length?{match:null,candidates:[],tier:null,ambiguous:!1,unplacedWords:o,nearestLabel:xn(s.slice(0,4).map(r=>r.label))}:e}let n=Vl(t,e.match.label);return n.length?{match:null,candidates:[],tier:null,ambiguous:!1,unplacedWords:n,nearestLabel:e.match.label}:e}function Sn(e,t,n={}){let{expectedClass:s=null}=n;if(!s){let o=String(t||"").trim(),r=o.replace(fR,"").trim(),i=r.match(hR);if(i){let a=r.slice(0,i.index).trim(),l=Ge[i[1].toLowerCase()];if(a&&l){let c=ma(Vr(e,a,{expectedClass:l}),a);if(c?.match?.id&&!c.ambiguous)return c}}if(r&&r!==o){let a=ma(Vr(e,r,n),r);if(a?.match?.id&&!a.ambiguous)return a}return ma(Vr(e,t,n),t)}return ma(Vr(e,t,n),t)}function us(e,t,n){if(Qs.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 Sn(e,t)}function du(e,t,n){let s=[];for(let o of Xe(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 mR(e,t,n,s={}){let o=!n||n==="Change"||n==="Commit",r=o||n==="Module",i=o||Cs.has(n),a=[...r?["touches"]:[],...i?["touchesSymbol"]:[]],l=a.flatMap(c=>Xe(e,c)).filter(c=>c.subject===t.id).map(c=>e.byId.get(c.object)).filter(Boolean);return n&&Cs.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 yR(e,t){let n=new Set(String(t||"").toLowerCase().split(/[\s-]+/).filter(Boolean));return(e.individuals||[]).filter(s=>s.class==="Module"&&pu.has(Gm(s.label))).map(s=>({ind:s,named:n.has(Gm(s.label))?1:0,depth:String(s.label).split("/").length,fixture:wR(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 $R(e,t,n){return e==="reverse"&&(t==="imports"||t==="calls")&&(!n||n==="Module")}function fu(e){return(e?.attributes||[]).find(t=>t.prop===vR)?.value||null}function xR(e){return e==="SchemaClass"?"a class in the graph's schema":e==="SchemaPredicate"?"a predicate (relation) in the graph's schema":`${Ho(e)} ${e} in this graph's vocabulary`}function Kt(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 cR(e,t,{contextId:n,prev:s});if(t.ambiguousParse){let T=t.candidates.map(F=>{let U=Kt(e,F,{contextId:n,prev:s});return{parsed:F,result:U,rendered:En(F,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(),F=T.toLowerCase(),U=(e.individuals||[]).find(K=>{if(!fu(K))return!1;if(String(K.label).toLowerCase()===F)return!0;let ce=(K.attributes||[]).find(ie=>ie.key==="token")?.value;return ce&&String(ce).toLowerCase()===F});if(!U){let K=ag(e,T);return K?{matches:[K.hit],objMatch:K.hit,candidates:[],ambiguous:!1,metaCodeClass:!0,metaFallbackText:K.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 no=="function"?no(e.proseIndex,T):[]).map(K=>e.byId.get(K.id)).filter(Boolean),objMatch:null,candidates:[],ambiguous:!1,mentionsShape:!0,traversal:`proseIndex word lookup for "${T}"`}}if(r==="where"&&gR.test(String(t.object||"").trim())){let T=yR(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 (${[...pu].join("/")}), ranked query-named basename first, then shallower path, then non-test path`}}if(t.modifier&&t.modifier!=="direct"&&!$R(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=us(e,t.subject,n),F=us(e,t.object,n);if(!T.match||!F.match||T.ambiguous||F.ambiguous)return{matches:[],objMatch:F.match,candidates:F.candidates,traversal:null,ambiguous:!1,answer:null,unresolvedPronoun:!!(T.unresolvedPronoun||F.unresolvedPronoun)};let[U,K]=[T.match,F.match];i==="touches"&&K.class==="Commit"&&U.class!=="Commit"&&([U,K]=[K,U]);let ce=Yo[i],ie=[...new Set(ce?[...Mt(i),ce]:Mt(i))],D=ie.flatMap(B=>Xe(e,B)).filter(B=>B.subject===U.id&&B.object===K.id);return{matches:D,answer:t.negated?D.length===0:D.length>0,objMatch:F.match,subjMatch:T.match,candidates:[],traversal:`${ie.join("+")} edge from ${U.label} to ${K.label}`,ambiguous:!1}}let l;if(o)l={match:o,candidates:[],ambiguous:!1,matchedVia:null};else{if(l=us(e,t.object,n),t.altObject&&t.altObject!==t.object){let T=us(e,t.altObject,n),F=!!l.match&&!l.ambiguous,U=!!T.match&&!T.ambiguous;!F&&U?l=T:F&&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=K=>K.replace(/\.(?:test|spec|tests)(?=\.[^.]+$)/,""),F=T(String(t.object||"").trim().toLowerCase()),U=(e.individuals||[]).find(K=>{if(K.class!=="Module"||K.id===l.match.id)return!1;let ce=String(K.label||"").toLowerCase().split("/").pop();return ce!==T(ce)&&T(ce)===F});U&&(l={...l,ambiguous:!0,candidates:[U,...l.candidates||[]]})}}let{match:c,candidates:u,ambiguous:d,unresolvedPronoun:f,matchedVia:p,unplacedWords:h,nearestLabel:m}=l;if(!c)return{matches:[],objMatch:null,candidates:u,traversal:null,ambiguous:!1,unresolvedPronoun:f,unplacedWords:h,nearestLabel:m};if(d){let F=ds([c,...u||[]]).slice(0,Ye).map(U=>{let K=Kt(e,t,{contextId:n,prev:s,pinnedObjMatch:U});return{candidate:U,result:K,rendered:En(t,K,e)}});return{matches:[],objMatch:c,candidates:u,traversal:null,ambiguous:!0,branches:F}}if(r==="where"){let T=(c.attributes||[]).find(F=>F.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=K=>String((K.attributes||[]).find(ce=>ce.key==="date")?.value||""),F;if(c.class==="Commit")F=[c];else{let K=["touches","touchesSymbol"].flatMap(ie=>Xe(e,ie)).filter(ie=>ie.object===c.id),ce=new Set;F=[];for(let ie of K){if(ce.has(ie.subject))continue;ce.add(ie.subject);let D=e.byId.get(ie.subject);D&&D.class==="Commit"&&F.push(D)}F.sort((ie,D)=>T(D).localeCompare(T(ie)))}let U=F.length&&T(F[0])?[{kind:"event",class:"Commit",label:F[0].label,ids:[F[0].id],attrs:{date:T(F[0]).slice(0,10)},lane:"when"}]:[];return{matches:F,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=ie=>String((ie.attributes||[]).find(D=>D.key==="date")?.value||""),F=["touches","touchesSymbol"].flatMap(ie=>Xe(e,ie)).filter(ie=>ie.object===c.id),U=new Set,K=[];for(let ie of F){if(U.has(ie.subject))continue;U.add(ie.subject);let D=e.byId.get(ie.subject);D&&D.class==="Commit"&&K.push(D)}K.sort((ie,D)=>T(D).localeCompare(T(ie)));let ce=K.length&&T(K[0])?[{kind:"event",class:"Commit",label:K[0].label,ids:[K[0].id],attrs:{date:T(K[0]).slice(0,10)},lane:"whoLast"}]:[];return{matches:K,objMatch:c,candidates:u,ambiguous:d,matchedVia:p,whoLastShape:!0,referents:ce,traversal:`touches+touchesSymbol edges where object = ${c.label}, newest commit's author`}}if(i==="touches"&&c.class==="Commit")return mR(e,c,a,{candidates:u,ambiguous:d,matchedVia:p});if(r==="forward"){let T=Yo[i],U=!!(T&&c.class&&Cs.has(c.class))?[...new Set([...Mt(i),T])]:Mt(i);if(a&&a!=="Change"){let W=eg(e,U),A=Wl[a];if(W.size&&!W.has(a)&&!(A&&W.has(A)))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 ${ls(a)})`}}let ce=U.flatMap(W=>Xe(e,W)).filter(W=>W.subject===c.id).map(W=>e.byId.get(W.object)).filter(Boolean),ie=ds(ce),D=ie,B="";if(a&&a!=="Change"){D=ie.filter(A=>A.class===a);let W=Wl[a];if(!D.length&&W){let A=ie.filter(L=>L.class===W);A.length&&(D=A,B=`, widened to ${W} subjects (no ${a} recorded)`)}}return{matches:D,objMatch:c,candidates:u,traversal:`${U.join("+")} edges where subject = ${c.label}${B}`,ambiguous:d,matchedVia:p}}if(t.modifier==="transitive")return{matches:Uo(e,c,{maxDepth:Vm}).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=${Vm})`};let b=Yo[i]||Mt(i).find(T=>Ym.has(T))||null,g=!!(c.class&&Cs.has(c.class));if(b&&(Cs.has(a)||g)){let T=Xe(e,b).filter(B=>B.object===c.id),F=ds(T.map(B=>e.byId.get(B.subject)).filter(Boolean)),U=!a||a==="Change"?F:F.filter(B=>B.class===a),K="",ce=Wl[a];if(!U.length&&ce){let B=F.filter(W=>W.class===ce);B.length&&(U=B,K=`, widened to ${ce} subjects (no ${a} recorded)`)}let ie=(i==="touches"||i==="calls"||i==="uses")&&c.class==="Class"&&!Xe(e,"contains").some(B=>B.subject===c.id),D=ie?e.byId.get(Xo(e,c)||""):null;if(U.length||!(ie&&D))return{matches:U,objMatch:c,candidates:u,traversal:`${b} edges where object = ${c.label}${K}`,ambiguous:d,matchedVia:p}}let y=c,w=u,v=d,k=p,$="",x=tg(e,i);if(x&&y.class&&y.class!==x){let T=Sn(e,t.object,{expectedClass:x});if(T.match&&!T.ambiguous)y=T.match,w=T.candidates,v=T.ambiguous,k=T.matchedVia;else if(x==="Module"){let F=Xo(e,y),U=F&&e.byId.get(F);if(U)$=`, refined from ${y.label} to its containing module`,y=U;else return{matches:[],objMatch:y,candidates:w,ambiguous:v,matchedVia:k,wrongGrainMiss:!0,wantClass:x,traversal:`"${t.object}" resolved to ${ls(y.class)} ${y.label} (grain mismatch: this "${i}" question needs a ${ls(x)}, and no containing module could be found to refine to)`}}else return{matches:[],objMatch:y,candidates:w,ambiguous:v,matchedVia:k,wrongGrainMiss:!0,wantClass:x,traversal:`"${t.object}" resolved to ${ls(y.class)} ${y.label} (grain mismatch: this "${i}" question needs a ${ls(x)})`}}let E=Mt(i).flatMap(T=>Xe(e,T)).filter(T=>T.object===y.id);i==="cochange"&&(E=E.concat(Mt(i).flatMap(T=>Xe(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=Mt(i).flatMap(F=>Xe(e,F)).filter(F=>String(F.object).toLowerCase()===T),E.length&&(S=` (by name, via unresolved ${T} references)`)}let _=[],R=new Set;for(let T of E){let F=e.byId.get(T.subject);F&&!R.has(F.id)&&(R.add(F.id),_.push(F))}let I,P="";if(!a||a==="Change")I=_;else{let T=_.filter(F=>F.class===a);if(T.length)I=T;else if(a!=="Module"&&_.some(F=>F.class==="Module")){let F=new Set(_.filter(U=>U.class==="Module").map(U=>U.id));I=du(e,F,a),P=`, then ${ls(a)} defined in the matched module(s)`}else I=[]}return{matches:I,objMatch:y,candidates:w,traversal:`${Mt(i).join("+")} edges where object = ${y.label}${S}${P}${$}`,ambiguous:v,matchedVia:k}}function Yr(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 ql(e){let t=String(e.label||e.id||"");return["Function","Method"].includes(e.class)?`function ${t}()`:t}function ER(e){let t=String(e.label||e.id||""),n=(e.attributes||[]).find(s=>s.key==="author")?.value;return n?`${t} (${n})`:t}function xn(e){return e.length>1?`${e.slice(0,-1).join(", ")} and ${e[e.length-1]}`:e[0]}function qr(e){let t=e.object??e.subject??"?";return`${e.entityType?Fe(e.entityType,2)+" that ":""}${e.kind} "${t}"`}function tu(e){return Tr[e]?.bare||e}function SR(e){let t=tu(e);return t.endsWith("e")?`${t}d`:`${t}ed`}function kR(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=Fe(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 ${tu(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 ${tu(o.kind)} ${JSON.stringify(String(r))}`}function wg(e){if(!e)return null;if(e.ambiguousParse)return{english:`ambiguous: ${e.candidates.map(qr).join(" \u2014 or \u2014 ")}`,machine:`ambiguousParse(${e.candidates.map(r=>wg(r)?.machine).join(", ")})`};if(e.node)return{english:(e.node==="boolean"?kR(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 ":""}${ao(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?Fe(e.entityType,2)+" that ":"";o=e.shape==="forward"?`what "${e.object}" itself ${ao(e.kind)}`:`${r}${ao(e.kind)} "${e.object}"`}return{english:o,machine:s}}function En(e,t,n=null){let s=yg(e,t,n);return t&&t.matchedVia==="fuzzy"&&t.objMatch&&!s.ambiguous&&(s.content=`assuming you meant ${t.objMatch.label}: ${s.content}`),s}function yg(e,t,n){if(!e)return{content:`couldn't parse this as a graph question. Try: ${uu()}`,miss:!0,ambiguous:!1};if(e.node)return dR(e,t,n);if(e.ambiguousParse)return t.branches&&t.branches.length?{content:`this could mean more than one thing:
|
|
54
|
+
\u2026+${o.length-_l} more`:"")}var Tl,ch,vh,dh,_E,AE,kl,IE,Qi,CE,OE,LE,Sh,NE,PE,ME,FE,DE,zE,UE,BE,WE,GE,VE,qE,HE,KE,YE,XE,JE,QE,ZE,eS,tS,nS,sS,oS,rS,ph,iS,aS,kh,jh,Rh,cS,lS,uS,dS,pS,hh,mh,mS,gh,Xi,bh,wh,yh,Fr,Me,bS,wS,Ph,yS,qt,zh,$S,Xh,xS,ES,SS,kS,jS,RS,_S,TS,jl,$h,ta,AS,Rl,_l,Ie=C(()=>{js();ns();vl();Pr();_s();Tl="This store holds no code index, so it records no modules or commits to look through.",ch={"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"};vh=e=>/^(git|turn):/.test(String(e||""));dh=30,_E=8;AE=2,kl=25,IE=3;Qi=10,CE=8,OE=3,LE=2,Sh=5,NE=4,PE=.2,ME=.35,FE=.15,DE=e=>/(^|\/)(examples?|fixtures?|samples?|demos?|benchmarks?|test-[^/]+)(\/|$)/.test(e),zE=.2,UE=.35,BE=.2,WE=.35,GE=e=>/\.cs$/i.test(e),VE=e=>/^I[A-Z]/.test(String(e||"")),qE=.2,HE=.35,KE=50,YE=.2,XE=.35,JE=.5,QE=Sh,ZE=3,eS=4,tS=1,nS=.9,sS=.5,oS=.2,rS=.35,ph=4,iS=2,aS=[["imports"],["calls","callsSymbol"],["inherits"],["cochange"]],kh=3,jh=12,Rh=.9,cS=["imports","calls","callsSymbol","inherits"],lS=.5,uS=.6,dS=.2,pS=.35;hh=128,mh=4,mS=64,gh=250,Xi=class extends Error{};bh=new WeakMap;wh=40,yh=40,Fr=30;Me=(e,t)=>(e?.attributes||[]).find(n=>n.key===t)?.value||"";bS=25,wS=15;Ph=40,yS="tests edges are recorded module to module, so this is module-grain coverage.";qt=15;zh=new Set(["Function","Method"]);$S=8;Xh={function:"Function",class:"Class",method:"Method",attribute:"Attribute"};xS=8,ES=16,SS=4,kS=6,jS=12,RS=2,_S=8,TS=3,jl=e=>String(e||"").split(",").map(t=>t.trim()).filter(Boolean),$h=e=>String(e||"").replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean),ta=e=>{let t=String(e||"").trim();return t?t.split(",").map(n=>n.trim()).filter(Boolean).length:0},AS=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};Rl=20;_l=40});function Ke(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function lm(e){let t=String(e||"");return sm&&(t=t.replace(sm," ")),t.replace(/\s+/g," ").trim()}function um(e){let t=String(e||"");t=t.replace(ZS," ").replace(/\s+/g," ").trim();for(let n=0;n<3;n++){let s=t,o=t.match(KS);if(o&&(t=o[1].trim()),o=t.match(YS),o&&(t=o[1].trim()),o=t.match(om),o&&(t=o[1].trim()),o=t.match(rm),o&&(t=o[1].trim()),o=t.match(im),o&&(t=o[1].trim()),o=t.match(QS),o&&(t=o[1].trim()),o=t.match(am),o&&(t=o[1].trim()),o=t.match(ek),o&&(t=o[1].trim()),o=t.match(tk),o&&Ts.test(o[1].trim())&&(t=o[1].trim()),o=t.match(nk),o&&Ts.test(o[1].trim())&&(t=o[1].trim()),o=t.match(sk),o&&Ts.test(o[1].trim())&&(t=o[1].trim()),o=t.match(ok),o&&Ts.test(o[1].trim())&&(t=o[1].trim()),o=t.match(rk),o&&Ts.test(o[1].trim())&&(t=o[1].trim()),o=t.match(ik),o&&Ts.test(o[1].trim())&&(t=o[1].trim()),o=t.match(ak),o&&(t=`what ${o[2].toLowerCase()} ${o[1].trim()}`),o=t.match(ck),o&&(t=`what does ${o[1].trim()} mean`),o=t.match(lk),o&&(t=`what do you ${o[1].toLowerCase()} about ${o[2].trim()}`),o=t.match(uk),o){let r=o[1].trim();HS(r)||(t=!dk.test(r)&&(GS.test(r)||Ts.test(r))?r:`describe ${r}`)}if(o=t.match(pk),o){let r=o[1].trim();(Ts.test(r)||fk.test(r)||am.test(r)||om.test(r)||im.test(r)||rm.test(r)||hk.test(r))&&(t=r)}if(t===s)break}return t}function Sk(e){let t=String(e||"");for(let n=0;n<3;n++){let s=t,o=t.match(xk);if(o&&(t=o[1].trim()),o=t.match(Ek),o&&(t=o[1].trim()),t===s)break}return t}function jk(e){let t=String(e||"");for(let n=0;n<3;n++){let s=t.match(kk);if(!s)break;let o=s[1].trim();if(!o||o===t)break;t=o}return t}function Tk(e){let t=String(e||""),n=t.match(_k);if(n){let o=pm[n[1].toLowerCase()],r=dm[n[2].toLowerCase()];return`${o} ${r} ${n[3].trim()} and ${n[4].toLowerCase()}`}let s=t.match(fm);return s?`which modules transitively import ${s[1].trim()}`:t}function oa(e){return String(e||"").replace(PS,t=>fl[t.toLowerCase()])}function io(e){let t=oa(e);return t=t.replace(MS,n=>hl[n.toLowerCase()]),t=t.replace(FS,n=>ml[n.toLowerCase()]),t=t.replace(DS,"with"),t=t.replace(zS,(n,s)=>`${s} for`),t=t.replace(US,(n,s)=>`for ${s}`),t=t.replace(BS,(n,s)=>s),t=t.replace(Ak,"$1$2"),t=t.replace(Cf,"$1ing"),t=um(t),t=jk(t),t=Sk(t),t=Tk(t),t=lm(t),t=nn(t),t=t.replace(/\?{2,}\s*$/,"?"),t.replace(/\s+/g," ").trim()}function zr(e){for(let t of[...Lf,...Of]){let n=e.match(t.re);if(n)return t.to(n).replace(/\s+/g," ").trim()}return e}function Nl(e){for(let t of Ik){let n=e.match(t.re);if(n)return t.to(n).replace(/\s+/g," ").trim()}return e}function hm(e){let t=String(e||"").match(Ck);if(!t)return null;let n=t[1].toLowerCase(),s=t[2].trim();return s?{entWord:n,predicate:s}:null}var NS,PS,cm,MS,FS,DS,zS,US,BS,WS,sm,GS,Ts,VS,qS,HS,Dr,KS,YS,XS,JS,om,rm,im,QS,ZS,ek,tk,nk,sk,ok,rk,ik,ak,ck,lk,uk,dk,pk,fk,hk,am,sa,mk,gk,bk,wk,yk,$k,vk,U1,xk,Ek,kk,dm,pm,Rk,_k,fm,Ak,Ik,Ck,nt,Ht,fe,vn=C(()=>{On();NS=e=>new RegExp("\\b("+Object.keys(e).sort((t,n)=>n.length-t.length).map(Ke).join("|")+")\\b","gi"),PS=NS(fl),cm=e=>new RegExp("\\b("+Object.keys(e).sort((t,n)=>n.length-t.length).map(Ke).join("|")+")\\b(?!\\.[a-z0-9])","gi"),MS=cm(hl),FS=cm(ml),DS=/(?<=^|\s)w\/(?=\s|$)/gi,zS=/\b(thx|thanks|thank\s+you|many\s+thanks|ty|cheers)\s+4\b/gi,US=/\b4\s+(example|instance)\b(?!\s*[a-z])/gi,BS=/\b(this|that)\s+(class|module|function|method|attribute|variable|file|commit)\b/gi,WS=Object.keys(de).sort((e,t)=>t.length-e.length).map(Ke).join("|"),sm=Cr.length?new RegExp("\\b("+[...Cr].sort((e,t)=>t.length-e.length).map(Ke).join("|")+")\\b\\s*,?","gi"):null;GS=new RegExp("\\b(?:"+Object.keys(de).sort((e,t)=>t.length-e.length).map(Ke).join("|")+")\\b","i"),Ts=/^(?:which|what|who|whose|where|when|why|how)\b/i,VS=new Set(["modules","files","packages","functions","methods","classes","attributes","fields","properties","variables","globals","commits","changes","tests","members"]),qS=/^(?:all\s+|the\s+)?(?:module|file|package|function|method|class|attribute|field|property|variable|global|commit|change|test|member)\??$/i,HS=e=>{if(qS.test(e))return!0;let t=e.replace(/\?+\s*$/,"").trim().split(/\s+/);return VS.has((t[t.length-1]||"").toLowerCase())},Dr="[,.;:!]|\u2014|\u2013|-",KS=/^(?: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,YS=/^(?: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,XS="ok(?:ay)?|aight|cool|alright|sure|right|fine|great|nice|got it|gotcha|sounds good|no worries|no problem|another\\s+one",JS="(?:just\\s+)?(?:one|another)\\s+more",om=new RegExp(`^(?:(?:${XS})[\\s,]+|(?:${JS})\\s*(?:${Dr})\\s*)+(.+)$`,"i"),rm=/^(?: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,im=/^(?:(?:maybe|possibly|perhaps)\s+)+(.+)$/i,QS=/^(?:please[\s,]+)+(.+)$/i,ZS=/,?\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,ek=/^(?:can|could|would|will)\s+you\s+(?:please\s+)?(.+?)(?:[,\s]+please)?\??$/i,tk=/^explain\s+(?:to\s+me\s+|please\s+)*(.+?)\??$/i,nk=/^tell\s+me\s+(?:please\s+)?(.+?)\??$/i,sk=/^(?:(?:would|do)\s+you\s+)?mind\s+telling\s+(?:me|us)\s+(?:please\s+)?(.+?)\??$/i,ok=/^do\s+you\s+know\s+(.+?)\??$/i,rk=/^i(?:'d|\s+would)?\s+(?:(?:like|want|need)\s+to|wanna)\s+know\s+(.+?)\??$/i,ik=/^i(?:\s+was|\s+am|'m)?\s+(?:just\s+)?(?:wonder(?:ing|ed)?|curious)(?:\s+(?:if|whether|about))?\s+(.+?)\??$/i,ak=/^what\s+((?:an?\s+|the\s+)?[\w'-]+(?:\s+[\w'-]+){0,2})\s+(is|are)\??$/i,ck=/^what\s+((?:an?\s+|the\s+)?[\w'-]+(?:\s+[\w'-]+){0,2})\s+means\??$/i,lk=/^what\s+you\s+(know|remember)\s+about\s+(.+?)\??$/i,uk=/^(?:show|give)\s+me\s+(?:the\s+)?(.+?)\??$/i,dk=/^everything\s+i(?:'d|\s+would)?\s+need\b/i,pk=/^(?:and|also|so|then|now|but)\s+(.+)$/i,fk=/^(?:does|do|did|is|are|was|were|has|have|had|can|could|will|would|should)\b/i,hk=/^(?:the|its|their|his|her|our|my)\s+[\w'-]+(?:\s+[\w'-]+){0,2}\s+(?:that|which|who)\s+\S/i,am=/^(?:(?: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;sa=e=>[...e].sort((t,n)=>n.length-t.length).map(Ke).join("|"),mk=Object.freeze(["oh","ah","aha","ooh","ohh","wow","huh","hm","hmm","mm","mmm","heh","ha","yay","ugh","oof","phew","whoa","oops","yikes","oi"]),gk=Object.freeze(["nice","cool","great","neat","lovely","interesting","good","ok","okay","fair enough","makes sense","i see","got it","fine"]),bk=Object.freeze(["um","umm","uhm","uh","uhh","er","err","erm","ehm","eh","well","anyway","anyhow","anyways","regardless","moving on"]),wk=Object.freeze(["quick question","quick q","one quick question","just a quick question","random question","random thing","one more random thing","another random thing","one more thing","one last thing","last thing","one more question","side note","side question","sidebar","off topic","unrelated","on a different note","different topic","changing the subject","new topic","just curious","out of curiosity","curious","genuinely curious","while i'm here","while i have you","before i forget"]),yk=`(?:${sa(mk)})(?:\\s+(?:${sa(gk)}))?\\s*(?:${Dr})\\s*`,$k=`(?:${sa(bk)})\\s*(?:(?:${Dr})\\s*|\\s+)`,vk=`(?:${sa(wk)})\\s*(?:${Dr})\\s*`,U1=new RegExp(`^(?:sorry\\s*(?:${Dr})?\\s*)?(?:${yk}|${$k}|${vk})+`,"i"),xk=/^(?:since|although|(?:even\s+)?though|while|because|whereas|given\s+that|now\s+that)\s+.+?,\s*(.+)$/i,Ek=/^(.+?),\s*(?:since|although|(?:even\s+)?though|while|because|whereas|given\s+that|now\s+that)\s+.+$/i;kk=/^.+?(?:\s*(?:--|—|-)\s*)?\b(?:sorry|i\s+mean)\b\s*(?:--|—|-|,|:)\s*(.+)$/i;dm=Object.freeze({imports:"importing",calls:"calling",touches:"touching",tests:"testing",exports:"exporting",contains:"containing",defines:"defining",uses:"using","inherits from":"inheriting from"}),pm=Object.freeze({module:"modules",class:"classes",function:"functions",method:"methods",attribute:"attributes",variable:"variables",commit:"commits",file:"files"}),Rk="public|private|protected|static|abstract|constant|re-?exported|exported|tested|covered|untested|uncovered",_k=new RegExp("^if\\s+(?:a|an|the)?\\s*("+Object.keys(pm).join("|")+")\\s+("+Object.keys(dm).join("|")+")\\s+(.+?),\\s*(?:is|are)\\s+(?:it|that|they|this)\\s+("+Rk+")\\??$","i"),fm=/^if\s+(.+?)\s+(?:were|was)\s+(?:deleted|removed),?\s*what\s+(?:would|might|could)\s+(?:break|fail|be\s+affected)\??$/i;Ak=new RegExp(`^(where\\s+(?:is|are|was|were)\\s+.+?)\\s+(?:${dl.map(Ke).join("|")})(\\s*[?.!]*)$`,"i");Ik=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+(?:${pl.map(Ke).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+(${WS})\\s+(?:anything|something)(?:\\s+else)?\\??$`,"i"),to:e=>`what does ${e[1]} ${e[2]}`}]);Ck=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");nt=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"]),Ht=e=>String(e).replace(/\?+\s*$/,"").replace(/,/g," ").split(/\s+/).filter(Boolean),fe=e=>e.flatMap(t=>String(t).toLowerCase().split(" "))});var gm,mm=C(()=>{gm={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","chappe","chapped","chappes","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","seiding","seifing","seiing","seined","seiths","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 as(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 Ml(e){return/^[a-z]+$/.test(e)&&!nt.has(e)&&!Pl.has(e)}function ym(e){return Pk(e)?null:ra(e,wm,cs(e))}function ra(e,t,n=cs(e)){let s=n+1,o=null,r=!1;for(let i of t){let a=as(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 Lk,cs,Pl,bm,wm,Nk,Pk,Wo=C(()=>{On();mm();vn();Lk=["used"];cs=e=>e.length<=5?1:2,Pl=new Set([...Object.keys(de),...Object.keys(Ge),...Object.keys(sn),...Lk].flatMap(e=>e.split(" "))),bm=4,wm=[...new Set([...Object.keys(de),...Object.keys(sn)].flatMap(e=>e.split(" ")).filter(e=>e.length>=bm))],Nk=new Set(gm.words),Pk=e=>Nk.has(e)});function Go(e){for(let t of zk){let n=e.match(t.re);if(n){let s=t.build(n);if(s)return s}}return null}var ia,Mk,Fk,Dk,Fl,zk,$m,aa=C(()=>{On();vn();ia=Object.keys(de).sort((e,t)=>t.length-e.length).map(Ke).join("|"),Mk=Object.keys(Ge).sort((e,t)=>t.length-e.length).map(Ke).join("|"),Fk=Object.keys(sn).sort((e,t)=>t.length-e.length).map(Ke).join("|"),Dk=Zs.slice().sort((e,t)=>t.length-e.length).map(Ke).join("|"),Fl=(e,t)=>e==="defines"&&Ir.has(t),zk=[{name:"ask",re:new RegExp(`^(?:does|do|did)\\s+(.+?)\\s+(${ia})\\s+(.+?)\\??$`,"i"),build:e=>{let t=e[2].toLowerCase(),n=de[t];if(Fl(n,t))return null;let s=e[1].trim(),o=e[3].trim();return Ar.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+(${Mk})\\s+(?:(${Fk})\\s+)?(${ia})\\s+(.+?)\\??$`,"i"),build:e=>{let t=e[3].toLowerCase(),n=de[t];return Fl(n,t)?null:{shape:"reverse",entityType:Ge[e[1].toLowerCase()],modifier:e[2]?sn[e[2].toLowerCase()]:"direct",kind:n,object:e[4].trim()}}},{name:"forward",re:new RegExp(`^what\\s+(?:does|do|did)\\s+(.+?)\\s+(${ia})\\??$`,"i"),build:e=>{let t=e[2].toLowerCase(),n=de[t];return Fl(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+(?:${Dk})\\??$`,"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=nn(e[2].trim()),s=!/\s/.test(n);if(t==="the"&&!s||!t&&!Ge[n.toLowerCase()])return null;let o=n.toLowerCase();return t&&t!=="the"&&Af.some(r=>o===r||o.startsWith(`${r} `))?null:{shape:"meta",entityType:null,modifier:"direct",kind:"meta",object:Es(n)}}},{name:"mention",re:new RegExp(`^where\\s+(?:is|are|was|were)\\s+(.+?)\\s+(?:${$n.map(Ke).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+(?:${tn.map(Ke).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+)?(${ia})\\??$`,"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()})}];$m={id:"grammar",class:"graph-query",run(e){let t=Go(e);return t?{strategyId:"grammar",class:"graph-query",candidates:[{parsed:t,confidence:.9}]}:null}}});function vm(e){let t=e.trim().split(/\s+/);return t.length>1&&Di.has(t[0].toLowerCase())}function Gk(e){return de[e.trim().toLowerCase()]==="calls"}function At(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 Br(e,t=null){let n=e.replace(/\?+\s*$/,"").replace(/,/g," ").split(/\s+/).filter(Boolean),s=n.map(E=>E.toLowerCase());if(s.includes("where")&&!At(s,de)){let E=s.some(R=>$n.includes(R)),S=new Set([...tn,...$n]),_=n.filter((R,I)=>!nt.has(s[I])&&!S.has(s[I])).join(" ").trim();if(_){let R=E?"mentions":"where";return{shape:R,entityType:null,modifier:"direct",kind:R,object:_}}}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 _=n.slice(1,E-1).filter((R,I)=>!nt.has(s[1+I])).join(" ").trim();if(_)return{shape:"when",entityType:null,modifier:"direct",kind:"touches",object:_}}}let r=s,i=At(s,de);if(!i&&t){let E=s.map(S=>{if(!Ml(S))return S;let _=t.lemma(S);return Pl.has(_)?_:S});i=At(E,de),i&&(r=E)}let a=null;if(!i){let E=s.map(S=>S.length>=4&&Ml(S)&&ym(S)||S);if(i=At(E,de),i){r=E;let S=s.slice(i.start,i.end).findIndex((R,I)=>R!==E[i.start+I]),_=i.start+Math.max(S,0);a={from:s[_],to:E[_]}}}let l=!1;if(!i)for(let E=0;E<s.length;E+=1){let S=Ss[s[E]];if(!(S&&s[E]==="used"&&s[E+1]==="for")&&S&&s.slice(0,E).some(_=>Ur.has(_))){i={kind:S,start:E,end:E+1},l=!0;break}}if(!i)return null;!l&&i.end-i.start===1&&Ss[s[i.start]]&&s.slice(0,i.start).some(E=>Ur.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 R=n.slice(E+2).filter((I,P)=>!nt.has(s[E+2+P])).join(" ").trim();if(R)return c({shape:"forward",entityType:null,modifier:"direct",kind:i.kind,object:R})}}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 _=E.split(" "),R=i.end;if(_.every((I,P)=>r[R+P]===I)){d({start:R,end:R+_.length});break}}let f=At(r,Ge,u);d(f);let p=At(r,sn,u);d(p);let h=(E,S)=>n.slice(E,S).filter((_,R)=>!u.has(E+R)&&!nt.has(s[E+R])).join(" ").trim(),m=h(0,i.start),b=h(i.end,n.length);l&&!s.includes("by")&&Wk.has(b.toLowerCase())&&(b="");let g=i.kind,y=f?Ge[r.slice(f.start,f.end).join(" ")]:null,w=p?sn[r.slice(p.start,p.end).join(" ")]:"direct";if(g==="touches"&&s.includes("when")){let E=m||b;if(E)return c({shape:"when",entityType:null,modifier:"direct",kind:"touches",object:E})}if(g==="touches"&&s.includes("who")&&s.includes("last")){let E=m||b;if(E)return c({shape:"whoLast",entityType:null,modifier:"direct",kind:"touches",object:E})}let v=s.indexOf("by"),k=s.slice(0,i.start).findIndex(E=>Ur.has(E)),$=k>=0,x=$&&k>v;if(v>=0&&!u.has(v)&&$){let E=(R,I)=>n.slice(R,I).filter((P,T)=>{let F=R+T,U=s[F];return!u.has(F)&&!nt.has(U)&&U!=="by"&&!Ur.has(U)&&!Uk.has(U)&&!Bk.has(U)}).join(" ").trim(),[S,_]=x?[E(k+1,n.length),E(v+1,k)]:[E(0,v),E(v+1,n.length)];if(S&&_)return g==="defines"&&Ir.has(r.slice(i.start,i.end).join(" "))?null:c({shape:"ask",entityType:null,modifier:"direct",kind:g,subject:_,object:S});if(_)return c({shape:"forward",entityType:y,modifier:w,kind:g,object:_});if(S)return c({shape:"reverse",entityType:y,modifier:w,kind:g,object:S})}if(l&&v<0&&b&&s[i.start]==="called")return null;if(m&&b){let E=r.slice(i.start,i.end).join(" ");if(g==="defines"&&Ir.has(E)||g==="calls"&&(vm(b)||Gk(m)))return null;let S=m,_=b;return Ar.includes(E)&&([S,_]=[_,S]),c({shape:"ask",entityType:null,modifier:"direct",kind:g,subject:S,object:_})}if(b){if(g==="calls"&&vm(b))return null;let E=f&&f.start>=i.end?null:y;return c({shape:"reverse",entityType:E,modifier:w,kind:g,object:b})}if(g==="inherits"&&!m&&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:g,object:E})}if(m&&!b&&$&&i.end-i.start===1&&Ss[s[i.start]]){if(m.split(/\s+/).length>1)return null;if(g==="touches")return c({shape:"when",entityType:null,modifier:"direct",kind:g,object:m});let E=Ur.has(s[0]);return c({shape:"reverse",entityType:y,modifier:w,kind:g,object:m,...E?{polar:!0}:{}})}return m?c({shape:"forward",entityType:y,modifier:"direct",kind:g,object:m}):null}var Ur,Uk,Bk,Wk,xm,ca=C(()=>{On();vn();Wo();Ur=new Set(["is","are","was","were","be","been","being","get","gets","got"]),Uk=new Set(["which","what","who","whom","whose"]),Bk=new Set(es.map(e=>e.toLowerCase())),Wk=new Set(["recently","lately","yet","already","ever","again"]);xm={id:"keyword-spot",class:"graph-query",run(e,t={}){let n=Br(e,t.nlp||null);return n?{strategyId:"keyword-spot",class:"graph-query",candidates:[{parsed:n,confidence:.7}]}:null}}});function qk(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)||Em.has(l)||!s.has(l)||o[i]==="VERB"&&r.push(l)}return r}function Hk(e,t=null){let n=Ht(e),s=[],o=[];for(let i of n){let a=i.toLowerCase();/^[a-z]+$/.test(i)&&!Em.has(a)&&(Vk.has(a)||t&&typeof t.isStopWord=="function"&&t.isStopWord(a))?o.push(i):s.push(i)}let r=qk(n,s,t);return{text:s.join(" "),dropped:o,maybeNoise:r}}var Em,Vk,Sm,km=C(()=>{On();vn();aa();ca();Em=new Set([...nt,...fe(Qs),...fe(Object.keys(de)),...fe(Object.keys(Ge)),...fe(Object.keys(sn)),...fe(Object.keys(Qe)),...fe(eo),...fe(to),...fe(Object.keys(In)),...fe(Object.keys(Cn)),...fe(Object.keys(Oo)),...fe(es),...fe(Or),...fe(Zs),...fe(tn),...fe($n),...fe(Zn),...fe(Object.keys(No))]),Vk=new Set([...fe(Cr),...fe(zi)]);Sm={id:"noise-strip",class:"noise-stripped",run(e,t={}){if(Go(e))return null;let{text:n,dropped:s,maybeNoise:o}=Hk(e,t.nlp||null);if(!s.length||!n)return null;let r=Go(n)||Br(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 jm=C(()=>{});var la,ua=C(()=>{la=()=>{}});function _m(e,t){return e.shape!==t.shape||e.kind!==t.kind?!1:e.shape==="ask"?Vo(e.subject)===Vo(t.subject)&&Vo(e.object)===Vo(t.object):Vo(e.object)===Vo(t.object)}function Dl(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=>!Tm(c))&&(n=n.filter(c=>!Tm(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(h=>_m(h.parsed,f.parsed)&&h.via===f.via);if(p){p.agreed+=1,p.confidence=Math.max(p.confidence,f.confidence),Rm(f.parsed)<Rm(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=>_m(u.parsed,c.parsed)));return{class:i.class,parsed:a,winner:i.candidates[0],alternates:l}}function Xk(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 Am(e,{describe:t=Xk,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 Vo,Kk,Rm,Yk,Tm,zl=C(()=>{Vo=e=>String(e||"").trim().toLowerCase().replace(/\s+/g," ").replace(/^(?:the|a|an)\s+/,"").replace(/^commit\s+(?=[0-9a-f]{7,40}$)/,""),Kk=/^\s*(?:the|a|an)\s+/i,Rm=e=>[e?.subject,e?.object].filter(t=>Kk.test(String(t||""))).length;Yk=new Set(["fuzzy","lemma","spell"]),Tm=e=>Yk.has(e.via)});function da(e){Ul=e}function pa(){return typeof Ul=="function"?Ul():null}var Ul,qo=C(()=>{Ul=null});function Om(e,t={},n=Qk){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 Jk,Qk,Lm=C(()=>{vn();aa();ca();km();jm();ua();zl();qo();Jk=[...typeof void 0<"u"?[void 0]:[],...typeof void 0<"u"?[void 0]:[]],Qk=[$m,xm,Sm,...Jk]});function Ho(e){return Zk.test(String(e||"").trim())?"an":"a"}function fa(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 Ko(e){let t=String(e||"");return t&&t[0].toUpperCase()+t.slice(1)}function Wr(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 Zk,ha=C(()=>{Zk=/^[aeiou]/i});var Gr,Bl=C(()=>{Gr=(e,t,n)=>n});var Eg={};Gt(Eg,{DYNAMIC_TAIL_OK_RE:()=>gu,applyNegationFrames:()=>zr,ask:()=>Os,classDisplayName:()=>ls,degreeMetric:()=>hg,metaFallbackEntityAnswer:()=>ag,normalizeQuery:()=>io,parseQuery:()=>uo,parseQueryFull:()=>su,render:()=>En,rephraseHint:()=>uu,resolveObject:()=>Sn,traverse:()=>Kt,worldRelationGraphPayload:()=>HR});function Xe(e,t){let n=Nm.get(e);n||(n=new Map,Nm.set(e,n));let s=n.get(t);if(s)return s;let o=[];for(let r of e.relations)if(is(r)===t)for(let i of r.edges)o.push(i);return n.set(t,o),o}function Fe(e,t){let[n,s]=Kl[e]||["result","results"];return t===1?n:s}function Xr(e,t,n,s={}){return!e||!t.length?[]:[{kind:"set",class:e,label:`${t.length} ${Fe(e,t.length)}`,ids:t.map(o=>o.id),attrs:{count:t.length},lane:n,...s}]}function ls(e){let t=String(e||"");if(typeof Ln=="function"){let n=Ln(t).join(" ");if(n)return n}return t.replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase()}function ao(e){return tj[e]||e}function ij(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||rj.has(s))return e;let o=String(n.object||"").trim().toLowerCase();return fe(Zs).includes(o)?t:e}function lj(e,t){if(!e||e.shape!=="where"||e.altObject||!aj.test(t))return e;let n=Fi(t),s=Fi(String(e.object||"")),o=s===e.object?e:{...e,object:s},r=Ht(s);if(r.length<2)return o;let i=r[r.length-1].toLowerCase();if(!/^[a-z][a-z'-]*$/.test(i)||nt.has(i)||de[i]||i.endsWith("ing"))return o;let a=Ht(n).map(c=>c.toLowerCase());for(;a.length&&cj.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 uo(e,{nlp:t=void 0}={}){return su(e,{nlp:t}).parsed}function su(e,{nlp:t=void 0}={}){let n=t===void 0?pa():t,s=String(e||"").trim().replace(/\s+/g," ");if(!s)return{parsed:null,alternates:[],class:null};let o=Nl(zr(io(s)));if(!o)return{parsed:null,alternates:[],class:null};let r=dj(o,n);if(r)return{parsed:r,alternates:[],class:null};let i=Dl(Om(o,{nlp:n,raw:s}));return i?{parsed:lj(ij(i.parsed),o),alternates:i.alternates||[],class:i.class||null}:{parsed:null,alternates:[],class:null}}function Xl(e,t){return t.length&&Jm.has(t[0])?{bw:e.slice(1),blc:t.slice(1)}:{bw:e,blc:t}}function Jo(e,t){return Go(e)||Br(e,t)}function dj(e,t){let n=Ht(e),s=n.map(o=>o.toLowerCase());return Ij(n,s)||Oj(n,s)||mj(n,s,t)||Zm(e,t,0)||Lj(n,s,t)||bj(n,s,t)||Sj(n,s,t,0)||jj(n,s)||Tj(n,s,t)||Nj(n,s,t)||Fj(n,s,t)||zj(n,s,t,0)||Mj(n,s,t,0)||ru(n,s,t,0)||yj(n,s,t)||fj(n,s)||rg(n,s,t,0)}function fj(e,t){let n=0;pj.has(t[n])&&(n+=1);let s=It(t[n]);if(!s||s.placeholder||!s.entityType)return null;let o=s.entityType;n+=1;let r=h=>h+1<t.length?If[`${t[h]} ${t[h+1]}`]:void 0,i=r(n);if(!i)return null;let a=n+2,l=-1,c;for(let h=a;h+1<t.length;h+=1){let m=r(h);if(m){l=h,c=m;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=(h,m)=>h.role==="object"?{shape:"reverse",kind:h.kind,entityType:o,modifier:"direct",object:m}:{shape:"forward",kind:h.kind,modifier:"direct",object:m},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 ga(e,t){return{node:"boolean",entityType:e,atoms:[{op:"seed",kind:"set",ast:{node:"allOfClass",entityType:e}},t]}}function mj(e,t,n){if(!["do","does","did"].includes(t[0])||!hj.has(t[1]))return null;let s=It(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=At(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)&&!nt.has(a[p])&&a[p]!=="from").join(" ").trim();if(!u)return null;let d=Qo(`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:ga(o,{op:"difference",kind:"set",ast:d})}}function Zm(e,t,n=0){let s=hm(e);if(!s)return null;let o=It(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=Ht(s.predicate),a=i.map(d=>d.toLowerCase());if(a.length&&a.every(d=>Qe[d]))return ga(r,{op:"difference",kind:"qual",filters:a});let l=At(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)&&!nt.has(a[f])&&a[f]!=="from").length)return ga(r,{op:"difference",kind:"set",ast:{node:"existsEdge",entityType:r,kind:l.kind}});let u=Qo(`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"}:ga(r,{op:"difference",kind:"set",ast:u})}function bj(e,t,n){let s=0;for(;s<t.length&&gj.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=At(r,de);if(!a)return null;let c=o.filter((u,d)=>d!==i&&(d<a.start||d>=a.end)&&r[d]!=="from"&&!nt.has(r[d])).join(" ").trim();return c?{node:"forwardComplement",kind:a.kind,subjectTerm:c}:null}function eg(e,t){let n=new Set;for(let s of t)for(let o of Xe(e,s)){let r=e.byId.get(o.object);r&&r.class&&n.add(r.class)}return n}function tg(e,t){let n=Mt(t),s=n.filter(r=>!Ym.has(r)),o=eg(e,s.length?s:n);return o.size===1?[...o][0]:null}function Qo(e,t,n){if(n>Xm)return{node:"miss",reason:"too deep to resolve"};let s=Zm(e,t,n);if(s)return s;let o=Ht(e),r=o.map(c=>c.toLowerCase()),i=ru(o,r,t,n);if(i)return i;let a=rg(o,r,t,n);if(a)return a;let l=Jo(e,t);return l?{node:"clause",clause:l}:null}function ru(e,t,n,s){for(let o=1;o<t.length;o+=1){let r=Zn.includes(t[o]),i=!r&&Qm(t[o]);if(!r&&!i||r&&o+1>=t.length||!It(t[o-1]))continue;let l=e.slice(0,o-1);if(!l.length||l.every(f=>Qe[f.toLowerCase()]))continue;let c=Jo([...l,Yl].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=Qo(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 yj(e,t,n){for(let s=0;s<t.length;s+=1){if(!wj.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),Yl,...e.slice(s+1)],a=Jo(i.join(" "),n);if(!(!a||a.shape!=="reverse"&&a.shape!=="forward")&&a.object===Yl&&!(a.modifier&&a.modifier!=="direct"))return{node:a.shape==="reverse"?"reverseSet":"forwardSet",kind:a.kind,entityType:a.entityType,inner:{node:"prevSet"}}}return null}function Sj(e,t,n,s=0){if(t[0]!=="when")return null;let o=1;if(!$j.has(t[o]))return null;o+=1;let r=-1;for(let d=t.length-1;d>=o;d-=1)if(vj.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&&xj.has(a[a.length-1]);)i=i.slice(0,-1),a=a.slice(0,-1);for(;a.length&&Ej.has(a[0]);)i=i.slice(1),a=a.slice(1);if(!i.length||!a.some(d=>Zn.includes(d)))return null;let l=ou.has(a[0])?i.join(" "):`which ${i.join(" ")}`,c=Qo(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=It(a[0]);return{node:"temporal",inner:c,entityType:u&&u.entityType||null}}function jj(e,t){if(t[0]!=="what"||t[1]!=="changed")return null;let n=2;if(t[n]==="ever"&&(n+=1),!kj.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 _j(e){let t=new Set,n=[];for(let s of e){if(!s||!Rj.test(s))continue;let o=s.toLowerCase();t.has(o)||(t.add(o),n.push(s))}return n}function Tj(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(!Or.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&&(eo.includes(f)||to.includes(f))){s=d;break}}if(s<0)return null;let r=(o?t.slice(0,s-1):t.slice(0,s)).join(" "),i=eo.includes(r)||/^(how many|how much|count|number|quantity|total)\b/.test(r)?"count":"list",a=Aj(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=_j(e.slice(0,l)),u={node:"anaphora",mode:i,filter:a};return c.length>=2&&(u.candidateTerms=c),u}function Aj(e,t){let n=0,s=e.map(a=>a.toLowerCase());for(;n<s.length&&uj.has(s[n]);)n+=1;let o=e.slice(n),r=s.slice(n);if(!o.length)return{type:"all"};if(r.every(a=>Qe[a]))return{type:"qual",filters:r};if(o.length===1){let a=It(r[0]);if(a&&!a.placeholder&&a.entityType)return{type:"entity",entityType:a.entityType}}let i=Jo(`what ${o.join(" ")}`,t);if(i&&(i.shape==="reverse"||i.shape==="forward")&&i.object)return{type:"clause",clause:i}}function Ij(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?It(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 Cj(e,t){if(!t.length)return null;let n=`${e} ${t.join(" ")}`,s=Es(n).slice(e.length).trim(),o=Ht(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 Oj(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(Qe[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&&Ss[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&&!Nf.has(u))return null}let r=Cj(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 Lj(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=Jo(e.filter((r,i)=>i!==s).join(" "),n);return!o||o.shape!=="ask"?null:{...o,negated:!0}}function Nj(e,t,n){let s=eo.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&&Qe[t[o]];)r.push(t[o]),o+=1;let i=o<t.length?It(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=>!nt.has(d)&&!ng.has(d)),u;if(c){let d=Qo(`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 Mj(e,t,n,s){let o=0,r=!1,i=null;for(let y of sg){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&&iu.has(t[o]);)o+=1;let a=[];for(;o<t.length&&Qe[t[o]];)a.push(t[o]),o+=1;let l=o<t.length?It(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]]&&!es.includes(t[o])?{node:"miss",reason:`"${t[o]}" isn't a listable kind \u2014 try ${og}`}:null;let c=l.entityType,u=t[o];o+=1;let d=e.slice(o),f=t.slice(o).some(y=>!nt.has(y)&&!ng.has(y)),p=t.slice(o),h=d;(p[0]==="is"||p[0]==="are")&&(p=p.slice(1),h=h.slice(1));let m=r&&Pj.has(p[0]);if(r&&(f&&!m||d.length===0))return null;let b,g=!1;if(f){let y=m?h:d,w=Qo(`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"};b=w,g=!0}else b={node:"allOfClass",entityType:c},a.length&&(b={node:"qualifier",filters:a,inner:b});return{node:"list",entityType:c,base:b,scoped:g}}function Fj(e,t,n){let s=null,o=-1;for(let h=0;h<t.length;h+=1){let m=t.slice(h,h+2).join(" ");if(In[m]){s=In[m],o=h;break}if(In[t[h]]){s=In[t[h]],o=h;break}}if(!s)return null;let r=null,i=null;for(let h=o;h<t.length;h+=1)if(Cn[t[h]]){r=Cn[t[h]],i=t[h];break}if(!r){for(let h=o-1;h>=0;h-=1)if(Cn[t[h]]){r=Cn[t[h]],i=t[h];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(h=>l.includes(h));!r&&(a||c)&&(r=Cn.connections,i="connections");let u,d=null;for(let h of t){let m=It(h);if(m&&!m.placeholder){u=m.entityType,d=h;break}}if(!d&&(u=i?Pf[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(h=>f.includes(h))?s==="most"?"fewest":"most":s;return{node:"superlative",entityType:u,metric:r,metricNoun:i,extreme:p}}function zj(e,t,n,s){if(t[0]!=="find")return null;let o=1;for(;o<t.length&&iu.has(t[o]);)o+=1;if(o>=t.length)return null;let r=It(t[o]);if(r&&!r.placeholder&&r.entityType!=="Change"&&o+1<t.length&&Dj.has(t[o+1])){let a=e.slice(o+2).join(" ").trim();if(a)return{node:"find",entityType:r.entityType,term:a}}let i=It(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=>Zn.includes(a))?null:o===t.length-1&&/^[a-z]+$/.test(t[o])&&!de[t[o]]&&!es.includes(t[o])?{node:"miss",reason:`"${t[o]}" isn't a listable kind \u2014 try ${og}`}:null}function Uj(e,t){if(t[0]!=="find")return null;let n=1;for(;n<t.length&&iu.has(t[n]);)n+=1;let s=-1;for(let i=n+1;i<t.length;i+=1)if(Zn.includes(t[i])){s=i;break}if(s<0)return null;let o=It(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 Bj(e,t,n,s,o,r){let{branches:i,ops:a}=ba(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],h=Xl(d,f);if(h.blc.length&&h.blc.every(y=>Qe[y])){c.push({op:p,kind:"qual",filters:h.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 m=d,b=At(f,de);b?l=d.slice(b.start,b.end):l&&(m=[...l,...d]);let g=ig(`${t} ${m.join(" ")}`,o,r);if(!g||g.node==="miss")return{miss:g&&g.reason||"a clause in the combination didn't parse"};c.push({op:p,kind:"set",ast:g})}return{atoms:c}}function rg(e,t,n,s){let o=Uj(e,t);if(o){let{entityType:_,term:R,relIdx:I}=o,P=t.slice(I+1),T=e.slice(I+1);if(!P.length)return{node:"miss",reason:`a relative clause needs a predicate after "${t[I]}"`};let F=Bj(_,`which ${t[I-1]}`,P,T,n,s+1);if(F.miss)return{node:"miss",reason:F.miss};let U=[{op:"seed",kind:"set",ast:{node:"find",entityType:_,term:R}},...F.atoms];return U.length===1?U[0].ast:{node:"boolean",entityType:_,atoms:U}}let r=0;for(;r<t.length&&ou.has(t[r]);)r+=1;let i=r>0,a=[];for(;r<t.length&&Qe[t[r]];)a.push(t[r]),r+=1;let l=r<t.length?It(t[r]):null;if(!l){let _=r+1<t.length?It(t[r+1]):null;if(Pm.has(t[r])&&_&&_.entityType==="Commit"&&r+2===t.length)return{node:"recentCommits"};if(Jm.has(t[r])){let R=r+1;R<t.length&&(t[R]==="the"||t[R]==="a"||t[R]==="an")&&(R+=1);let I=R+1<t.length?It(t[R+1]):null;if(Pm.has(t[R])&&I&&I.entityType==="Commit"&&R+2===t.length)return{node:"recentCommits"}}return(i||a.length)&&_&&/^[a-z]+$/.test(t[r])&&!de[t[r]]&&!nt.has(t[r])&&!hu.has(t[r])?{node:"find",entityType:_.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&&Zn.includes(d[0])&&(p=!0,d=d.slice(1),f=f.slice(1));let h=d[0]==="of"||d[0]==="in",m=d.length>0&&Qm(d[0]),b=f.length>0&&ba(d,f).branches.some(_=>{let{blc:R}=Xl(_,_.map(I=>I.toLowerCase()));return R.length&&R.every(I=>Qe[I])}),g=f.length>0?ba(d,f).branches:[],y=!1;if(g.length>1){let _=g[0].map(I=>I.toLowerCase()),R=At(_,de);R&&R.start===0&&(y=g.slice(1).every(I=>{let P=I.map(F=>F.toLowerCase()),T=At(P,de);return T&&T.start===0?T.kind===R.kind:!T}))}let w=!1;if(g.length>1){let _=g[0].map(I=>I.toLowerCase()),R=At(_,de);R&&R.start===0&&(w=g.slice(1).every(I=>{let P=I.map(F=>F.toLowerCase()),T=At(P,de);return!!T&&T.start===0&&T.end-T.start===1}))}if(!(a.length||p||h||m||b||y||w))return null;if(!f.length){let _={node:"allOfClass",entityType:c};return a.length?{node:"qualifier",filters:a,inner:_,entityType:c}:{node:"miss",reason:"nothing to filter or traverse"}}let v=l.placeholder?"what":`which ${u}`,{branches:k,ops:$}=ba(d,f),x=null,E=[];for(let _=0;_<k.length;_+=1){let R=k[_],I=R.map(ce=>ce.toLowerCase()),P=_===0?"seed":$[_-1],T=Xl(R,I);if(T.blc.length&&T.blc.every(ce=>Qe[ce])){E.push({op:P,kind:"qual",filters:T.blc});continue}if(I[0]==="of"||I[0]==="in"){E.push({op:P,kind:"set",ast:{node:"membership",entityType:c,term:R.slice(1).join(" ")}});continue}let F=R,U=At(I,de);U?x=R.slice(U.start,U.end):x&&(F=[...x,...R]);let K=ig(`${v} ${F.join(" ")}`,n,s+1);if(!K||K.node==="miss")return{node:"miss",reason:K&&K.reason||"a clause in the combination didn't parse"};E.push({op:P,kind:"set",ast:K})}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 ig(e,t,n){if(n>Xm)return{node:"miss",reason:"too deep to resolve"};let s=Ht(e),o=s.map(a=>a.toLowerCase()),r=ru(s,o,t,n);if(r)return r;let i=Jo(e,t);return i?{node:"clause",clause:i}:null}function ba(e,t){let n=Object.keys(Oo).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(Oo[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 au(e,t,n,s){let o=Yo[t];if(o&&Cs.has(n)){let u=Xe(e,o).filter(d=>s.has(d.object));return ds(u.map(d=>e.byId.get(d.subject)).filter(d=>d&&d.class===n))}let a=(!!o&&[...s].some(u=>Cs.has(e.byId.get(u)?.class))?[...Mt(t),o]:Mt(t)).flatMap(u=>Xe(e,u)).filter(u=>s.has(u.object)),l=ds(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")?du(e,new Set(l.filter(u=>u.class==="Module").map(u=>u.id)),n):[]}function Gj(e,t){let n=new Set(au(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=Wj.exec(String(o||""));r&&n.add(r[1].toLowerCase())}return n.size}function Hr(e,t,n){let s=Mt(t).flatMap(o=>Xe(e,o)).filter(o=>n.has(o.subject));return ds(s.map(o=>e.byId.get(o.object)).filter(Boolean))}function ds(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 Vj(e,t){let n=os(t);if(!n)return[];let s=`${n}/`;return e.individuals.filter(o=>o.class==="Module"&&os(o.label).startsWith(s))}function Jl(e){let t=Mm.get(e);if(t)return t;let n=new Set;for(let i of Xe(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 Xe(e,"tests"))s.add(i.object),o.add(i.subject);let r=new Map;for(let i of Xe(e,"defines"))r.set(i.object,i.subject);return t={exported:n,testedModules:s,testModules:o,moduleOfSymbol:r},Mm.set(e,t),t}function Xo(e,t){return t?t.class==="Module"?t.id:Jl(e).moduleOfSymbol.get(t.id)||null:null}function ag(e,t){let n=String(t||"").trim().toLowerCase();if(!n)return null;let s=(e?.individuals||[]).filter(d=>qj.has(d.class)&&String(d.label).toLowerCase()===n);if(s.length!==1)return null;let o=s[0],r=Xo(e,o),i=r&&e.byId.get(r)?.label||String((o.attributes||[]).find(d=>d.key==="site")?.value||"").split(":")[0]||null,a=Fe(o.class,1),l=a==="attribute"?"an":"a",c=i?`, ${Gr("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 Ql(e,t,n){let s=ds(Lo.flatMap(o=>Hr(e,o,new Set([t]))));return n?s.filter(o=>o.class===n):s}function cu(e,t,n=null){let s=us(e,t,n);if(!(s.match&&s.tier===1)){let o=Vj(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 cg(e,t,n,s,o){let r=o||(()=>!0),i=Ql(e,t,s).filter(r);if(i.length||!ug(e,n))return{own:i,inherited:[],viaId:null,viaLabel:null};for(let a of lg(e,t)){let l=e.byId.get(a);if(!l)continue;let c=Ql(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 co(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=Jl(e).exported;return s.has(String(t.label).toLowerCase())||s.has(String(t.id).toLowerCase())}case"tested":{let s=Xo(e,t),o=Jl(e),r=s?e.byId?.get?.(s):null;return s&&(o.testModules.has(s)||r&&oo(String(r.label).toLowerCase()))?!1:(!!s&&o.testedModules.has(s))===n.value}default:return!1}}function lu(e){return Xe(e,"inherits")}function Zl(e,t){return lu(e).filter(n=>n.object===t).map(n=>n.subject)}function Fm(e,t){return lu(e).filter(n=>n.subject===t).map(n=>n.object)}function Hj(e,t){let n=new Set,s=[...Zl(e,t)];for(;s.length;){let o=s.shift();if(!n.has(o)){n.add(o);for(let r of Zl(e,o))n.has(r)||s.push(r)}}return n}function lg(e,t){let n=new Set,s=[...Fm(e,t)];for(;s.length;){let o=s.shift();if(!n.has(o)){n.add(o);for(let r of Fm(e,o))n.has(r)||s.push(r)}}return n}function ug(e,t){let n=Dm.get(e);if(n||(n=new Map,Dm.set(e,n)),n.has(t))return n.get(t);let s=lu(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 zm(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 Bm(e){return e.slice().sort((t,n)=>Um[n.via]-Um[t.via]||String(t.ind.label).length-String(n.ind.label).length).map(t=>t.ind)}function Wm(e,t){let n=String(t||"").trim().toLowerCase();if(n.length<4)return!1;let s=cs(n);if(as(String(e.label||"").toLowerCase(),n,s)<=s)return!0;for(let o of lo(e.label))if(as(o,n,s)<=s)return!0;return!1}function dg(e,t,n){let s=e.individuals.filter(l=>l.class===t),o=[...lo(n)];if(!o.length||!s.length)return{narrow:[],broad:[]};let r=ug(e,t),i=[];for(let l of s){let c=zm(l,o);if(c){i.push({ind:l,via:c});continue}if(!r)continue;[...Hj(e,l.id)].some(d=>{let f=e.byId.get(d);return!!f&&!!zm(f,o)})&&i.push({ind:l,via:"chain"})}if(i.length||!r)return{narrow:Bm(i),broad:[]};let a=new Map;for(let l of s)for(let c of lg(e,l.id)){if(!a.has(c)){let u=e.byId.get(c);u&&u.class===t&&Wm(u,n)&&a.set(c,{ind:u,via:"chain"})}for(let u of Zl(e,c)){if(u===l.id||a.has(u))continue;let d=e.byId.get(u);d&&d.class===t&&Wm(d,n)&&a.set(u,{ind:d,via:"chain"})}}return{narrow:[],broad:Bm([...a.values()])}}function Kj(e){return[...Zi(ea(e)).entries()].sort((t,n)=>n[1]-t[1]||t[0].localeCompare(n[0])).map(([t])=>({id:`pkg:${t}`,label:t,class:"Package"}))}function pn(e,t,n){switch(t.node){case"clause":return Kt(e,t.clause,n).matches||[];case"allOfClass":return t.entityType==="Package"?Kj(e):e.individuals.filter(s=>s.class===t.entityType);case"find":{let{narrow:s,broad:o}=dg(e,t.entityType,t.term);return s.length?s:o}case"existsEdge":{let s=new Set(Mt(t.kind).flatMap(o=>Xe(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=us(e,t.subjectTerm,n&&n.contextId);if(!s.match)return[];let o=tg(e,t.kind);if(!o)return[];let r=new Set(Hr(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(pn(e,t.inner,n).map(o=>o.id));return au(e,t.kind,t.entityType,s)}case"forwardSet":{let s=new Set(pn(e,t.inner,n).map(o=>o.id));return Hr(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=cu(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 ds(Lo.flatMap(l=>Hr(e,l,i))).filter(l=>l.class===t.entityType)}if(s.kind==="miss")return[];let{own:o,inherited:r}=cg(e,s.id,s.entityClass,t.entityType);return o.length?o:r}case"qualifier":return t.inner.node==="membership"?mg(e,t,n).matches:pn(e,t.inner,n).filter(o=>t.filters.every(r=>co(e,o,Qe[r])));case"boolean":return pg(e,t,n);case"anaphora":return fg(e,t,n).matches;default:return[]}}function pg(e,t,n){let s=[];for(let o of t.atoms){if(o.op==="seed"){s=pn(e,o.ast,n);continue}if(o.kind==="qual"){let i=l=>o.filters.every(c=>co(e,l,Qe[c])),a=l=>o.filters.every(c=>{let u=Yj(Qe[c]);return u?co(e,l,u):!co(e,l,Qe[c])});s=o.op==="difference"?s.filter(a):s.filter(i);continue}let r=new Set(pn(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 pn(e,o.ast,n))i.has(a.id)||(i.add(a.id),s.push(a))}}return s}function Xj(e,t){if(!Array.isArray(t)||t.length<2)return null;let n=new Set,s=[];for(let o of t){let r=Sn(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 fg(e,t,n){let o=Xj(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=>co(e,d,Qe[f])));else if(i&&i.type==="entity")r=r.filter(d=>d.class===i.entityType);else if(i&&i.type==="clause"){let d=Sn(e,i.clause.object);if(!d.match)r=[];else{let f=Yo[i.clause.kind],p=[...Mt(i.clause.kind),...f?[f]:[]],h=new Set(p.flatMap(m=>Xe(e,m)).filter(m=>m.object===d.match.id).map(m=>m.subject));r=r.filter(m=>h.has(m.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=Xr(c,r,"anaphora",{bound:!0});return{compositeKind:"set",matches:r,entityType:c,referents:u}}function hg(e,t,n){let s=n.kind==="*"?Jj:[n.kind,...n.sibling?[n.sibling]:[]],o=0;for(let r of s)for(let i of Xe(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 Qj(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 eR(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(Zj.test(s))r=s;else{let{match:u,ambiguous:d}=Sn(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 tR(e,t,n){let s=pn(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=au(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 nR(e,t){let n=e.individuals.filter(a=>a.class===t.entityType);if(t.metric?.kind==="tests"&&t.entityType==="Module"){let a=new Set(Xe(e,"tests").map(l=>l.subject));n=n.filter(l=>!a.has(l.id)&&!oo(String(l.label).toLowerCase()))}let s=n.map(a=>({ind:a,score:hg(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?Xr(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 mg(e,t,n){let s=t.node==="qualifier"&&t.inner.node==="membership"?t:null,o=s?s.inner:t,r=o.entityType,i=s?h=>s.filters.every(m=>co(e,h,Qe[m])):null,a=h=>Xr(r,h,"membership"),l=cu(e,o.term,n&&n.contextId);if(l.kind==="dir"){let h;if(!r||r==="Module")h=l.mods;else{let m=new Set(l.mods.map(b=>b.id));h=ds(Lo.flatMap(b=>Hr(e,b,m))).filter(b=>b.class===r)}return i&&(h=h.filter(i)),{compositeKind:"set",matches:h,entityType:r,referents:a(h)}}if(l.kind==="miss")return{compositeKind:"set",matches:[],entityType:r};let{own:c,inherited:u,viaLabel:d}=cg(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 sR(e,t){let{entityType:n,term:s,scopeModule:o}=t,r=null;if(o){let a=Sn(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=Sn(e,s,{expectedClass:n}),l=!r||a.match&&Xo(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?du(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 oR(e,t,n){let s=Xo(e,t);return n.kind==="dir"?n.mods.some(o=>o.id===t.id||o.id===s):s===n.id||Ql(e,n.id).some(o=>o.id===t.id)}function rR(e,t,n){let{term:s,qualifier:o,negated:r,scope:i}=t,a=us(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=cu(e,i,n.contextId);if(d.kind==="miss")return{compositeKind:"qualCheck",qualCheckMiss:"scope",term:s,scope:i,matches:[]};if(!oR(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=co(e,a.match,Qe[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 iR(e,t,n){let s=Sn(e,t.object);if(!s||!s.match)return{compositeKind:"universal",universalMiss:"unresolved",object:t.object,matches:[]};let o=pn(e,{node:"allOfClass",entityType:t.entityType},n),r=pg(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 aR(e,t,n){if(t.node==="reverseSet"&&t.kind==="touches"&&t.entityType==="Commit")return new Set(pn(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}=Kt(e,t.clause,n);return s&&!o?new Set([s.id]):null}return null}function cR(e,t,n={}){if(t.node==="miss")return{compositeMiss:!0,reason:t.reason||null,matches:[]};if(t.node==="exists")return sR(e,t);if(t.node==="qualCheck")return rR(e,t,n);if(t.node==="universal")return iR(e,t,n);if(t.node==="count"){let i=aR(e,t.base,n);return i?{compositeKind:"count",count:Gj(e,i),entityType:t.entityType,matches:[]}:{compositeKind:"count",count:pn(e,t.base,n).length,entityType:t.entityType,matches:[]}}if(t.node==="list")return{compositeKind:"list",matches:pn(e,t.base,n),entityType:t.entityType,scoped:t.scoped};if(t.node==="worldRelation")return GR(e,t);if(t.node==="superlative")return nR(e,t);if(t.node==="temporal")return tR(e,t,n);if(t.node==="recentCommits")return Qj(e);if(t.node==="commitFilter")return eR(e,t);if(t.node==="anaphora")return fg(e,t,n);if(t.node==="membership"||t.node==="qualifier"&&t.inner.node==="membership")return mg(e,t,n);if(t.node==="find"){let{narrow:i,broad:a}=dg(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=pn(e,t,n),o=t.entityType||null,r=Xr(o,s,t.node==="qualifier"?"qualifierListing":"compositeSet");return{compositeKind:"set",matches:s,entityType:o,referents:r}}function gg(){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 lR(e){let t=["Function","Method"].includes(e.class)?`${e.label}()`:e.label;if(e.class==="Module")return t;let n=Yr(e);return n?`${t} in ${n}`:t}function eu(e){return!e||typeof e!="object"?!1:Array.isArray(e)?e.some(eu):Array.isArray(e.filters)&&e.filters.some(t=>Qe[String(t).toLowerCase()]?.via==="tested")?!0:Object.values(e).some(eu)}function uR(e,t){return!["Function","Method"].includes(t)||!eu(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 dR(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})`:""}. ${gg()}.`,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=Fe(t.entityType,1),o=Fe(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=Yr(i),l=i.class==="Module"?"":a?`, ${Gr("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 ${As(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=Fe(t.entityType,t.total),o=sj(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}: ${As(t.counter)}.`,miss:!1,ambiguous:!1,matches:t.counter}}if(t.compositeKind==="count"){let s=t.entityType?Fe(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 ${Fe(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>Ye?` \u2014 narrow with "${Fe(t.entityType,2)} in <module>"`:"";return{content:`${As(t.matches)}${o}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="worldRelation"){let s=xn(t.asked),o=Js[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?` (${Fe(t.entityType,2)})`:""}. ${Is(n)}`,miss:!0,ambiguous:!1,matches:[]};if(t.inheritedNotOwn){let s=Fe(t.entityType,2);return{content:`${t.ownerLabel?`${t.ownerLabel} has no own ${s}`:`no own ${s}`} \u2014 inherited from ${t.viaLabel}: ${As(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches,inheritedNotOwn:!0}}return{content:`${As(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="find"){let s=Fe(t.entityType,1);if(!t.matches.length)return{content:`no ${Fe(t.entityType,2)} found matching "${t.term}".`,miss:!0,ambiguous:!1,matches:[]};let o=t.matches.length===1?lR(t.matches[0]):As(t.matches);return t.broad?{content:`no exact ${s} named "${t.term}", but found a related ${t.matches.length===1?s:Fe(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,qt).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>qt?` \u2026+${t.matches.length-qt} 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,qt).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>qt?` \u2026+${t.matches.length-qt} 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 ${Fe(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:`${As(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?Fe(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. ${Is(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. ${Is(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=uR(e,t.entityType)||Is(n);return{content:`nothing in the index matches that${t.entityType?` (${Fe(t.entityType,2)})`:""}. ${s}`,miss:!0,ambiguous:!1,matches:[]}}return{content:`${As(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches}}function uu(){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). `+gg()}function Is(e=null){return e&&Mr(e)===0?Tl:`Try "who touched <a module that actually has commits>" or "/describe <module>" to see what's in the index.`}function lo(e){return new Set(String(e).toLowerCase().split(/[^a-z0-9]+/).filter(Boolean))}function ya(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 bg(e){return String(e||"").replace(/\.[a-z0-9]+$/i,"").toLowerCase().replace(/[/\-_.]+/g,"")}function pR(e){return String(e||"").trim().replace(/^(?:the|a|an)\s+/i,"").toLowerCase().replace(/[\s\-_]+/g,"")}function Vr(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(b=>b.class===n):e.individuals,i=o.match(/^(commit[:\s])?([0-9a-f]{7,40})$/);if(i){let b=i[2],g=r.filter(y=>y.class==="Commit"&&(String(y.id).toLowerCase().startsWith(`commit:${b}`)||String(y.label).toLowerCase().startsWith(b)));if(g.length===1)return{match:g[0],candidates:[],tier:1,ambiguous:!1};if(g.length>1)return{match:g[0],candidates:g.slice(1,5),tier:1,ambiguous:!0};if(i[1])return{match:null,candidates:[],tier:null,ambiguous:!1}}let a=r.find(b=>String(b.label).toLowerCase()===o||String(b.id).toLowerCase()===o);if(a)return{match:a,candidates:[],tier:1,ambiguous:!1};let l=`ext:${o}`,c=null;e:for(let b of e.relations)for(let g of b.edges)if(String(g.object).toLowerCase()===l){c=g.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(b=>b.trim()).filter(Boolean);if(u.length>1){let b=new Set;for(let g of u){let y=Vr(e,g,{expectedClass:n});y.match&&!y.ambiguous&&b.add(y.match.id)}if(b.size>1)return{match:null,candidates:[],tier:null,ambiguous:!1}}let d=[],f=!o.includes("/")&&/^[\w$]+(\.[\w$]+)+$/.test(o);if(f){let b=o.split(".").pop();for(let g of r){let y=String(g.label||"").toLowerCase();g.class==="Module"?y.split("/").pop()===o&&d.push({ind:g,score:1e3-Math.abs(y.length-o.length)}):y.includes(o)?d.push({ind:g,score:2e3-Math.abs(y.length-o.length)}):y.endsWith(`.${b}`)&&d.push({ind:g,score:1500-Math.abs(y.length-o.length)})}}else{let b=[...lo(s)],g=o.split(/\s+/).find($=>$.includes("/")),y=g?g.split("/").pop().replace(/\.[a-z0-9]+$/,""):null,v=s.trim().replace(/^(?:the|a|an)\s+/i,"").trim().split(/\s+/).filter(Boolean).length>=2,k=v?pR(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 R=bg($.label);if(R&&R===k){d.push({ind:$,score:5e3});continue}let I=/[/_-]/.test($.label)||/\.[a-z0-9]+$/i.test(String($.label||""));if(R&&I&&k.length>=4&&R.includes(k)){d.push({ind:$,score:2e3-Math.abs(R.length-k.length)});continue}}if($.class==="Module"){let R=ya(o);if(R!==o&&R===ya(E)){let I=cs(o);if(as(E,o,I)>I){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=lo($.label),_=b.filter(R=>S.has(R)).length;_>0&&(!y||S.has(y))&&d.push({ind:$,score:_/b.length*Gl})}}if(d.sort((b,g)=>g.score-b.score),d.length){let[b,...g]=d,y=g.filter(v=>v.score===b.score),w=b.score>=Gl?g.filter(v=>v.score>=Gl):g;return{match:b.ind,candidates:w.slice(0,4).map(v=>v.ind),tier:3,ambiguous:y.length>0}}let p=f||o.includes("/"),h=null,m=!p&&typeof no=="function"?no(e.proseIndex,s).filter(b=>!n||e.byId.get(b.id)?.class===n):[];if(m.length){let[b,...g]=m,y=e.byId.get(b.id);if(y){let w=g.filter(v=>v.score===b.score);if(h={match:y,candidates:g.slice(0,4).map(v=>e.byId.get(v.id)).filter(Boolean),tier:4,ambiguous:w.length>0,matchedVia:"prose"},!h.ambiguous&&b.via!=="spell")return h}}if(!i&&o.length>=4){let b=cs(o),g=b+1,y=[];for(let w of r){let v=as(String(w.label||"").toLowerCase(),o,b);if(v>0)for(let k of lo(w.label)){if(v<=0)break;v=Math.min(v,as(k,o,b))}v<g?(g=v,y=[w]):v===g&&v<=b&&y.push(w)}if(g<=b&&y.length===1)return{match:y[0],candidates:[],tier:5,ambiguous:!1,matchedVia:"fuzzy"};if(g<=b&&y.length>1&&!h){let[w,...v]=y;return{match:w,candidates:v.slice(0,4),tier:5,ambiguous:!0,matchedVia:"fuzzy"}}}return h||{match:null,candidates:[],tier:null,ambiguous:!1}}function Vl(e,t){let n=bg(t),s=[...lo(t)],o=[];for(let r of lo(e))n.includes(r)||s.some(i=>ya(i)===ya(r))||wa.has(r)||$g.has(r)||o.push(r);return o}function ma(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(Vl(t,r.label))).reduce((r,i)=>r.filter(a=>i.has(a)),Vl(t,s[0].label));return o.length?{match:null,candidates:[],tier:null,ambiguous:!1,unplacedWords:o,nearestLabel:xn(s.slice(0,4).map(r=>r.label))}:e}let n=Vl(t,e.match.label);return n.length?{match:null,candidates:[],tier:null,ambiguous:!1,unplacedWords:n,nearestLabel:e.match.label}:e}function Sn(e,t,n={}){let{expectedClass:s=null}=n;if(!s){let o=String(t||"").trim(),r=o.replace(fR,"").trim(),i=r.match(hR);if(i){let a=r.slice(0,i.index).trim(),l=Ge[i[1].toLowerCase()];if(a&&l){let c=ma(Vr(e,a,{expectedClass:l}),a);if(c?.match?.id&&!c.ambiguous)return c}}if(r&&r!==o){let a=ma(Vr(e,r,n),r);if(a?.match?.id&&!a.ambiguous)return a}return ma(Vr(e,t,n),t)}return ma(Vr(e,t,n),t)}function us(e,t,n){if(Qs.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 Sn(e,t)}function du(e,t,n){let s=[];for(let o of Xe(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 mR(e,t,n,s={}){let o=!n||n==="Change"||n==="Commit",r=o||n==="Module",i=o||Cs.has(n),a=[...r?["touches"]:[],...i?["touchesSymbol"]:[]],l=a.flatMap(c=>Xe(e,c)).filter(c=>c.subject===t.id).map(c=>e.byId.get(c.object)).filter(Boolean);return n&&Cs.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 yR(e,t){let n=new Set(String(t||"").toLowerCase().split(/[\s-]+/).filter(Boolean));return(e.individuals||[]).filter(s=>s.class==="Module"&&pu.has(Gm(s.label))).map(s=>({ind:s,named:n.has(Gm(s.label))?1:0,depth:String(s.label).split("/").length,fixture:wR(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 $R(e,t,n){return e==="reverse"&&(t==="imports"||t==="calls")&&(!n||n==="Module")}function fu(e){return(e?.attributes||[]).find(t=>t.prop===vR)?.value||null}function xR(e){return e==="SchemaClass"?"a class in the graph's schema":e==="SchemaPredicate"?"a predicate (relation) in the graph's schema":`${Ho(e)} ${e} in this graph's vocabulary`}function Kt(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 cR(e,t,{contextId:n,prev:s});if(t.ambiguousParse){let T=t.candidates.map(F=>{let U=Kt(e,F,{contextId:n,prev:s});return{parsed:F,result:U,rendered:En(F,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(),F=T.toLowerCase(),U=(e.individuals||[]).find(K=>{if(!fu(K))return!1;if(String(K.label).toLowerCase()===F)return!0;let ce=(K.attributes||[]).find(ie=>ie.key==="token")?.value;return ce&&String(ce).toLowerCase()===F});if(!U){let K=ag(e,T);return K?{matches:[K.hit],objMatch:K.hit,candidates:[],ambiguous:!1,metaCodeClass:!0,metaFallbackText:K.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 no=="function"?no(e.proseIndex,T):[]).map(K=>e.byId.get(K.id)).filter(Boolean),objMatch:null,candidates:[],ambiguous:!1,mentionsShape:!0,traversal:`proseIndex word lookup for "${T}"`}}if(r==="where"&&gR.test(String(t.object||"").trim())){let T=yR(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 (${[...pu].join("/")}), ranked query-named basename first, then shallower path, then non-test path`}}if(t.modifier&&t.modifier!=="direct"&&!$R(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=us(e,t.subject,n),F=us(e,t.object,n);if(!T.match||!F.match||T.ambiguous||F.ambiguous)return{matches:[],objMatch:F.match,candidates:F.candidates,traversal:null,ambiguous:!1,answer:null,unresolvedPronoun:!!(T.unresolvedPronoun||F.unresolvedPronoun)};let[U,K]=[T.match,F.match];i==="touches"&&K.class==="Commit"&&U.class!=="Commit"&&([U,K]=[K,U]);let ce=Yo[i],ie=[...new Set(ce?[...Mt(i),ce]:Mt(i))],D=ie.flatMap(B=>Xe(e,B)).filter(B=>B.subject===U.id&&B.object===K.id);return{matches:D,answer:t.negated?D.length===0:D.length>0,objMatch:F.match,subjMatch:T.match,candidates:[],traversal:`${ie.join("+")} edge from ${U.label} to ${K.label}`,ambiguous:!1}}let l;if(o)l={match:o,candidates:[],ambiguous:!1,matchedVia:null};else{if(l=us(e,t.object,n),t.altObject&&t.altObject!==t.object){let T=us(e,t.altObject,n),F=!!l.match&&!l.ambiguous,U=!!T.match&&!T.ambiguous;!F&&U?l=T:F&&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=K=>K.replace(/\.(?:test|spec|tests)(?=\.[^.]+$)/,""),F=T(String(t.object||"").trim().toLowerCase()),U=(e.individuals||[]).find(K=>{if(K.class!=="Module"||K.id===l.match.id)return!1;let ce=String(K.label||"").toLowerCase().split("/").pop();return ce!==T(ce)&&T(ce)===F});U&&(l={...l,ambiguous:!0,candidates:[U,...l.candidates||[]]})}}let{match:c,candidates:u,ambiguous:d,unresolvedPronoun:f,matchedVia:p,unplacedWords:h,nearestLabel:m}=l;if(!c)return{matches:[],objMatch:null,candidates:u,traversal:null,ambiguous:!1,unresolvedPronoun:f,unplacedWords:h,nearestLabel:m};if(d){let F=ds([c,...u||[]]).slice(0,Ye).map(U=>{let K=Kt(e,t,{contextId:n,prev:s,pinnedObjMatch:U});return{candidate:U,result:K,rendered:En(t,K,e)}});return{matches:[],objMatch:c,candidates:u,traversal:null,ambiguous:!0,branches:F}}if(r==="where"){let T=(c.attributes||[]).find(F=>F.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=K=>String((K.attributes||[]).find(ce=>ce.key==="date")?.value||""),F;if(c.class==="Commit")F=[c];else{let K=["touches","touchesSymbol"].flatMap(ie=>Xe(e,ie)).filter(ie=>ie.object===c.id),ce=new Set;F=[];for(let ie of K){if(ce.has(ie.subject))continue;ce.add(ie.subject);let D=e.byId.get(ie.subject);D&&D.class==="Commit"&&F.push(D)}F.sort((ie,D)=>T(D).localeCompare(T(ie)))}let U=F.length&&T(F[0])?[{kind:"event",class:"Commit",label:F[0].label,ids:[F[0].id],attrs:{date:T(F[0]).slice(0,10)},lane:"when"}]:[];return{matches:F,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=ie=>String((ie.attributes||[]).find(D=>D.key==="date")?.value||""),F=["touches","touchesSymbol"].flatMap(ie=>Xe(e,ie)).filter(ie=>ie.object===c.id),U=new Set,K=[];for(let ie of F){if(U.has(ie.subject))continue;U.add(ie.subject);let D=e.byId.get(ie.subject);D&&D.class==="Commit"&&K.push(D)}K.sort((ie,D)=>T(D).localeCompare(T(ie)));let ce=K.length&&T(K[0])?[{kind:"event",class:"Commit",label:K[0].label,ids:[K[0].id],attrs:{date:T(K[0]).slice(0,10)},lane:"whoLast"}]:[];return{matches:K,objMatch:c,candidates:u,ambiguous:d,matchedVia:p,whoLastShape:!0,referents:ce,traversal:`touches+touchesSymbol edges where object = ${c.label}, newest commit's author`}}if(i==="touches"&&c.class==="Commit")return mR(e,c,a,{candidates:u,ambiguous:d,matchedVia:p});if(r==="forward"){let T=Yo[i],U=!!(T&&c.class&&Cs.has(c.class))?[...new Set([...Mt(i),T])]:Mt(i);if(a&&a!=="Change"){let W=eg(e,U),A=Wl[a];if(W.size&&!W.has(a)&&!(A&&W.has(A)))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 ${ls(a)})`}}let ce=U.flatMap(W=>Xe(e,W)).filter(W=>W.subject===c.id).map(W=>e.byId.get(W.object)).filter(Boolean),ie=ds(ce),D=ie,B="";if(a&&a!=="Change"){D=ie.filter(A=>A.class===a);let W=Wl[a];if(!D.length&&W){let A=ie.filter(L=>L.class===W);A.length&&(D=A,B=`, widened to ${W} subjects (no ${a} recorded)`)}}return{matches:D,objMatch:c,candidates:u,traversal:`${U.join("+")} edges where subject = ${c.label}${B}`,ambiguous:d,matchedVia:p}}if(t.modifier==="transitive")return{matches:Uo(e,c,{maxDepth:Vm}).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=${Vm})`};let b=Yo[i]||Mt(i).find(T=>Ym.has(T))||null,g=!!(c.class&&Cs.has(c.class));if(b&&(Cs.has(a)||g)){let T=Xe(e,b).filter(B=>B.object===c.id),F=ds(T.map(B=>e.byId.get(B.subject)).filter(Boolean)),U=!a||a==="Change"?F:F.filter(B=>B.class===a),K="",ce=Wl[a];if(!U.length&&ce){let B=F.filter(W=>W.class===ce);B.length&&(U=B,K=`, widened to ${ce} subjects (no ${a} recorded)`)}let ie=(i==="touches"||i==="calls"||i==="uses")&&c.class==="Class"&&!Xe(e,"contains").some(B=>B.subject===c.id),D=ie?e.byId.get(Xo(e,c)||""):null;if(U.length||!(ie&&D))return{matches:U,objMatch:c,candidates:u,traversal:`${b} edges where object = ${c.label}${K}`,ambiguous:d,matchedVia:p}}let y=c,w=u,v=d,k=p,$="",x=tg(e,i);if(x&&y.class&&y.class!==x){let T=Sn(e,t.object,{expectedClass:x});if(T.match&&!T.ambiguous)y=T.match,w=T.candidates,v=T.ambiguous,k=T.matchedVia;else if(x==="Module"){let F=Xo(e,y),U=F&&e.byId.get(F);if(U)$=`, refined from ${y.label} to its containing module`,y=U;else return{matches:[],objMatch:y,candidates:w,ambiguous:v,matchedVia:k,wrongGrainMiss:!0,wantClass:x,traversal:`"${t.object}" resolved to ${ls(y.class)} ${y.label} (grain mismatch: this "${i}" question needs a ${ls(x)}, and no containing module could be found to refine to)`}}else return{matches:[],objMatch:y,candidates:w,ambiguous:v,matchedVia:k,wrongGrainMiss:!0,wantClass:x,traversal:`"${t.object}" resolved to ${ls(y.class)} ${y.label} (grain mismatch: this "${i}" question needs a ${ls(x)})`}}let E=Mt(i).flatMap(T=>Xe(e,T)).filter(T=>T.object===y.id);i==="cochange"&&(E=E.concat(Mt(i).flatMap(T=>Xe(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=Mt(i).flatMap(F=>Xe(e,F)).filter(F=>String(F.object).toLowerCase()===T),E.length&&(S=` (by name, via unresolved ${T} references)`)}let _=[],R=new Set;for(let T of E){let F=e.byId.get(T.subject);F&&!R.has(F.id)&&(R.add(F.id),_.push(F))}let I,P="";if(!a||a==="Change")I=_;else{let T=_.filter(F=>F.class===a);if(T.length)I=T;else if(a!=="Module"&&_.some(F=>F.class==="Module")){let F=new Set(_.filter(U=>U.class==="Module").map(U=>U.id));I=du(e,F,a),P=`, then ${ls(a)} defined in the matched module(s)`}else I=[]}return{matches:I,objMatch:y,candidates:w,traversal:`${Mt(i).join("+")} edges where object = ${y.label}${S}${P}${$}`,ambiguous:v,matchedVia:k}}function Yr(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 ql(e){let t=String(e.label||e.id||"");return["Function","Method"].includes(e.class)?`function ${t}()`:t}function ER(e){let t=String(e.label||e.id||""),n=(e.attributes||[]).find(s=>s.key==="author")?.value;return n?`${t} (${n})`:t}function xn(e){return e.length>1?`${e.slice(0,-1).join(", ")} and ${e[e.length-1]}`:e[0]}function qr(e){let t=e.object??e.subject??"?";return`${e.entityType?Fe(e.entityType,2)+" that ":""}${e.kind} "${t}"`}function tu(e){return Tr[e]?.bare||e}function SR(e){let t=tu(e);return t.endsWith("e")?`${t}d`:`${t}ed`}function kR(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=Fe(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 ${tu(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 ${tu(o.kind)} ${JSON.stringify(String(r))}`}function wg(e){if(!e)return null;if(e.ambiguousParse)return{english:`ambiguous: ${e.candidates.map(qr).join(" \u2014 or \u2014 ")}`,machine:`ambiguousParse(${e.candidates.map(r=>wg(r)?.machine).join(", ")})`};if(e.node)return{english:(e.node==="boolean"?kR(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 ":""}${ao(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?Fe(e.entityType,2)+" that ":"";o=e.shape==="forward"?`what "${e.object}" itself ${ao(e.kind)}`:`${r}${ao(e.kind)} "${e.object}"`}return{english:o,machine:s}}function En(e,t,n=null){let s=yg(e,t,n);return t&&t.matchedVia==="fuzzy"&&t.objMatch&&!s.ambiguous&&(s.content=`assuming you meant ${t.objMatch.label}: ${s.content}`),s}function yg(e,t,n){if(!e)return{content:`couldn't parse this as a graph question. Try: ${uu()}`,miss:!0,ambiguous:!1};if(e.node)return dR(e,t,n);if(e.ambiguousParse)return t.branches&&t.branches.length?{content:`this could mean more than one thing:
|
|
55
55
|
${t.branches.map((l,c)=>`${c+1}) as ${qr(l.parsed)}: ${l.rendered.content}`).join(`
|
|
56
56
|
`)}
|
|
57
57
|
(ask one of these directly, or try rephrasing more specifically, to get just that reading)`,miss:!1,ambiguous:!0,candidates:e.candidates.map(qr),candidateParses:e.candidates}:{content:`this could mean more than one thing: ${e.candidates.map((a,l)=>`${l+1}) ${qr(a)}`).join(" or ")} \u2014 try rephrasing more specifically.`,miss:!1,ambiguous:!0,candidates:e.candidates.map(qr),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?Fe(t.objMatch.class,1):"term",a=Fe(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=>Fe(a,2));return{content:`${t.objMatch.label}'s "${ao(e.kind)}" relation in this index never produces ${Fe(e.entityType,2)} \u2014 only ${xn(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=fu(t.objMatch)||"";return{content:`${t.objMatch.label} is ${xR(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,Ye).map(l=>`${l.label} (${Fe(l.class,1)})`),a=t.matches.length>Ye?`, \u2026and ${t.matches.length-Ye} more`:"";return{content:`"${e.object}" is mentioned in the prose tokens of ${xn(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 ${xn([...pu])}.`,miss:!0,ambiguous:!1,candidates:[]};let[i,...a]=t.matches,l=a.slice(0,Ye).map(d=>d.label),c=a.length>Ye?`, \u2026and ${a.length-Ye} more`:"",u=a.length?` \u2014 also matched: ${xn(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&&Kl[e.entityType]?Fe(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=xn(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. ${Is(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(g=>g.class==="Commit")){let g=w=>!["Commit","Session","Source","Utterance"].includes(w?.class),y=i.filter(g);y.length&&(i=y,a?.length&&(a=a.filter(w=>g(w.candidate))))}if(n&&!/[/.]/.test(String(e.object||""))){let g=String(e.object||"").toLowerCase(),y=new Set(Ln(String(e.object||"")).filter(x=>x.length>=3)),w=new Set(i.map(x=>x.id)),v=null,k=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=Ln(String(x.label)).filter(_=>y.has(_)).length;if(!E||E<k)continue;let S=as(String(x.label).toLowerCase(),g,8);(E>k||S<$)&&(v=x,k=E,$=S)}if(v&&(i=[...i,v],a)){let x=Kt(n,e,{pinnedObjMatch:v});a=[...a,{candidate:v,result:x,rendered:En(e,x,n)}]}}let l=i.length&&i.every(g=>g.class===i[0].class)?i[0].class:null,c=l?Kl[l]?Fe(l,1):ls(l):"module",u=i.slice(0,Ye).map(g=>g.label),d=i.length>Ye?`, \u2026and ${i.length-Ye} more`:"",f=`"${e.object}" matches more than one ${c} ambiguously \u2014 did you mean ${xn(u)}${d}? Try one of those. If you're not sure, narrow it to one name.`,p=String(e.object||""),h=p?new RegExp(`\\b${Ke(p)}\\b`,"gi"):null,m=g=>{let y=String(g.candidate.label||"");return!h||!y?g.rendered.content:g.rendered.content.split(y).map(w=>w.replace(h,y)).join(y)};return{content:a&&a.length?`${f}
|
|
@@ -61,7 +61,7 @@ ${p.join(`
|
|
|
61
61
|
`)}`}}if(!u.ambiguous&&c.objMatch&&Array.isArray(c.candidates)&&c.candidates.length){let f=new Set((c.matches||[]).map(h=>h&&h.id)),p=c.candidates.filter(h=>h&&h.id&&h.id!==c.objMatch.id&&!f.has(h.id));if(p.length){let h=p.slice(0,3).map(g=>g.label).filter(Boolean),m=p.length-h.length,b=h.join(", ")+(m>0?`, +${m} more`:"");d=`${d}
|
|
62
62
|
(answering for ${c.objMatch.label} \u2014 ${p.length} other match${p.length===1?"":"es"}: ${b})`}}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:Xr(a.entityType,c.matches,"relationListing")}),{content:d,tmct_ask:{mechanical:!0,parsed:a&&!a.ambiguousParse?a:null,canonical:wg(a),matches:(c.matches||[]).map(f=>({id:f.id,label:f.label,type:f.class,module:f.class?Yr(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 Nm,Yo,Cs,Wl,ej,Mt,Ym,Ye,Kl,tj,nj,sj,oj,rj,aj,cj,Xm,Yl,uj,ou,Jm,It,Qm,pj,hj,gj,wj,$j,vj,xj,Ej,kj,Rj,ng,iu,sg,og,Pj,Dj,Pm,Wj,Mm,qj,Dm,Um,Yj,Jj,Zj,As,Gl,fR,hR,gR,pu,bR,Gm,wR,Vm,vR,wa,nu,hu,$g,jR,RR,_R,Hm,IR,LR,NR,gu,FR,DR,zR,Kr,VR,qR,KR,YR,Km,Pn=C(()=>{Ie();vl();On();vn();Wo();aa();ca();Lm();zl();js();ha();Bl();qo();Nm=new WeakMap;Yo={calls:"callsSymbol",touches:"touchesSymbol"},Cs=new Set(["Function","Method","Class","Attribute","GlobalVariable"]),Wl={Function:"Method",Method:"Function"},ej={uses:["imports","calls","callsSymbol"]},Mt=e=>ej[e]||[e],Ym=new Set(Object.values(Yo)),Ye=12,Kl={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"]};tj={cochange:"cochanges",reexports:"export"};nj={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"},sj=e=>nj[e]||ao(e),oj=new RegExp(`^(?:${Object.keys(de).sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})(?:s|ing|ed)?\\s+`,"i"),rj=new Set(["imports"]);aj=/^where\s+(?:does|do|did)\s+/i,cj=new Set(fe(tn));Xm=4,Yl="zzinnerset",uj=new Set(["that","which","who","are","is","was","were","do","does","also","still","both","and","then","though"]),ou=new Set(["which","what","who","list","show","find","give","me","us","all"]),Jm=new Set(["are","is","was","were"]);It=e=>Ge[e]?{entityType:Ge[e],placeholder:!1}:es.includes(e)?{entityType:null,placeholder:!0}:null,Qm=e=>!!de[e]&&e.endsWith("ing");pj=new Set(["which","the","all"]);hj=new Set(["all","every","each"]);gj=new Set(["what","which","thing","things","one","ones","stuff"]);wj=new Set(["those","them"]);$j=new Set(["did","was","were","do","does","has","have","had"]),vj=new Set(["change","changed","changes","update","updated","updates","modify","modified","modifies","touch","touched","touches","edit","edited","revise","revised"]),xj=new Set(["last","recently","ever","get","got","been","then","now","already"]),Ej=new Set(["the","a","an","all","those","these","any"]);kj=new Set(["since","before","after","on"]);Rj=/\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/;ng=new Set(["total","altogether","overall","exist","exists","existing","present","here","now","currently","graph","index","codebase","repo","repository","this","that"]);iu=new Set(["the","a","an","all","me","us"]),sg=[...to].sort((e,t)=>t.split(" ").length-e.split(" ").length),og="functions, classes, methods, modules, packages, attributes, variables, or commits",Pj=new Set(["in","inside","under"]);Dj=new Set(["called","named","about","like","containing","matching","with"]);Pm=new Set(["recent","latest","newest"]);Wj=/^git:(.+)$/i;Mm=new WeakMap;qj=new Set(["Class","Function","Method","GlobalVariable","Attribute"]);Dm=new WeakMap;Um={label:3,chain:2,attr:1};Yj=e=>e&&typeof e.value=="boolean"?{...e,value:!e.value}:null;Jj=["imports","calls","callsSymbol","inherits","contains","tests"];Zj=/^\d{4}-\d{2}-\d{2}$/;As=e=>xn(e.slice(0,Ye).map(t=>["Function","Method"].includes(t.class)?`${t.label}()`:t.label))+(e.length>Ye?`, \u2026and ${e.length-Ye} more`:"");Gl=10;fR=/^(?:the|a|an)\s+/i,hR=new RegExp(`\\s+(${Object.keys(Ge).join("|")})$`,"i");gR=/^(?:the\s+)?(?:main\s+|primary\s+)?entry[\s-]?points?(?:\s+(?:of|to|for)\s+(?:this|the)\s+(?:codebase|code|repo|repository|project|app))?$/i,pu=new Set(["index","main","app","server","cli","__main__"]),bR=new Set(["test","tests","__tests__","fixture","fixtures","spec","specs","testdata"]),Gm=e=>String(e).toLowerCase().split("/").pop().replace(/\.[a-z0-9]+$/,""),wR=e=>String(e).toLowerCase().split("/").slice(0,-1).some(t=>bR.has(t));Vm=8,vR="mgx:schemaDoc";wa=new Set([...fe(Object.keys(de)),...fe(Object.keys(Ge)),...fe(Object.keys(sn)),...fe(Object.keys(Qe)),...fe(eo),...fe(Object.keys(In)),...fe(Object.keys(Cn)),...fe(Object.keys(Oo)),...fe(es),...fe(Or),...fe(Zs),...fe(tn),...fe($n),...fe(Zn),...fe(Object.keys(No)),...fe([...Di])]),nu=new Set([...nt,...ou,...Qs]),hu=new Set(fe(zi)),$g=new Set([...hu,...nu]),jR=["many","count","number","quantity","total","tally","list","show","display","print","dump","enumerate","name"],RR=[...new Set([...fe(Object.keys(de)),...Object.keys(Ge),...jR])].filter(e=>/^[a-z]+$/.test(e)&&e.length>=4&&!nt.has(e)),_R=new Set(["impact","impacts","impacted"]);Hm=/\b(?:the\s+)?(?:last|latest|most\s+recent)\s+commit\b/i,IR=/^when\s+(?:was|were|is|did|does|do)\s+commit\s+[0-9a-fA-F:]+$/i;LR=/^(?:list|show(?:\s+me)?)\s+(?:all\s+|the\s+)?([a-z][a-z'-]*)\s*(.*)$/i,NR=/^(?:how\s+many|number\s+of|count(?:\s+the)?)\s+([a-z][a-z'-]*)\s*(.*)$/i,gu=/^(?: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;FR=new RegExp(`^(?:${sg.map(Ke).join("|")})\\s+(?:all\\s+)?(?:the\\s+)?([a-z][a-z'-]*)\\s+(?:of|for)\\s+(.+?)[?.!\\s]*$`,"i"),DR=/^where(?:'s|\s+is|\s+are)\s+(?:all\s+)?(?:the\s+)?(.+?)[?.!\s]*$/i,zR=/^where\s+(?:does|do|did)\s+(?:all\s+)?(?:the\s+)?(.+?)\s+[a-z][a-z'-]*[?.!\s]*$/i;Kr=e=>String(e||"").toLowerCase();VR=/^(.+?)@(?:epoch(\d+)@)?(?:turn|step)(\d+)$/;qR=(e,t,n)=>!e||e.epoch<t||e.epoch===t&&e.stamp<=n;KR=/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,YR=/^what\s+is\s+(?:the\s+)?(?!(?:an?|it|this|that|these|those)\s)(.+?)\s+(?:used\s+)?for[?.!\s]*$/i;Km=(e,t,n,s)=>s.ambiguous?XR(e,t,n):!!s.miss});function Ls(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
63
|
`);return{start:o,end:r,text:a,truncated:i}}async function ps({readFile:e,repoRoot:t,path:n,start:s,end:o,maxLines:r}){let i=Pt(t),a=Pt(i,n);if(a!==i&&!a.startsWith(i+jf))throw new _e(`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,...Ls(c,s,o,r)}}var $a=C(()=>{We();Vt()});function xt(e){return{ok:!0,value:e}}function Et(e,{detail:t="",term:n=null}={}){if(!rt[e])throw new TypeError(`miss(): unknown reason "${e}" (not in MISS_REASONS)`);return{ok:!1,miss:{reason:e,detail:t,term:n}}}function Mn(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 va(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 wu,JR,rt,yu,
|
|
64
|
+
`);return s==null||o==null?{lines:c}:{lines:c,...Ls(c,s,o,r)}}var $a=C(()=>{We();Vt()});function xt(e){return{ok:!0,value:e}}function Et(e,{detail:t="",term:n=null}={}){if(!rt[e])throw new TypeError(`miss(): unknown reason "${e}" (not in MISS_REASONS)`);return{ok:!1,miss:{reason:e,detail:t,term:n}}}function Mn(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 va(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 wu,JR,rt,yu,MP,Sg,$u,QR,kn,bu,Ct,FP,kg=C(()=>{wu="1.1.0",JR="urn:tmct:core",rt=Object.freeze({UNRESOLVED_TERM:"UNRESOLVED_TERM",CAPABILITY_ABSENT:"CAPABILITY_ABSENT",TRUNCATED_GRAPH:"TRUNCATED_GRAPH",NO_SOURCE:"NO_SOURCE"}),yu=Object.freeze(["imports","calls","callsSymbol","defines","tests","touches","touchesSymbol","contains","inherits","cochange","reexports","serves","denotes"]),MP=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"}),Sg=Object.freeze({resolution:["resolve","describe","members","subclasses","exports","signature"],traversal:["edges","impact"],source:["snippet","context"],aggregate:["architecture","untested","stats"],temporal:["history"],search:["search","ask"]}),$u=Object.freeze(Object.values(Sg).flat()),QR=Object.freeze(new Set(Sg.source));kn="Individual",bu="Edge",Ct="concurrent-safe: reads immutable graph truth; no shared mutable state",FP=Object.freeze({version:wu,ontology:JR,missReasons:Object.values(rt),edgeKinds:[...yu],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: ${kn}, candidates: ${kn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:Ct,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: ${kn}, out: ${bu}[], incoming: ${bu}[] }`,misses:["UNRESOLVED_TERM"],concurrency:Ct,purpose:"Full typed portrait of one individual: its attributes and its outgoing/incoming edges."},members:{group:"resolution",args:{classId:"string"},result:`{ methods: ${kn}[], attributes: ${kn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:Ct,purpose:"A class's methods + attributes (via the contains relation) \u2014 replaces reading the class body."},subclasses:{group:"resolution",args:{classId:"string"},result:`{ bases: ${kn}[], subclasses: ${kn}[], levels: Array<${kn}[]> }`,misses:["UNRESOLVED_TERM"],concurrency:Ct,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: ${kn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:Ct,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:Ct,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: ${bu}[] }`,misses:["UNRESOLVED_TERM"],concurrency:Ct,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:Ct,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:Ct,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:Ct,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:Ct,purpose:"Package/module shape + the most-imported hub modules. Optional package prefix scopes it."},untested:{group:"aggregate",args:{},result:`{ modules: ${kn}[] }`,misses:[],concurrency:Ct,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:Ct,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:Ct,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: ${kn}[] }`,misses:[],concurrency:Ct,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:Ct,purpose:"The mechanical, zero-model NL query over the graph \u2014 tmct's whole reason to exist."}}})});function ZR(e,t){let n=[],s=[];for(let o of e.relations)for(let r of o.edges)r.subject===t&&n.push(va(r,{predicate:o.predicate,prop:o.prop})),r.object===t&&s.push(va(r,{predicate:o.predicate,prop:o.prop}));return{out:n,incoming:s}}function e_(e,t){for(let n of e.relations)if(is(n)===t)return{predicate:n.predicate,prop:n.prop};return{predicate:t,prop:null}}async function n_(e,t,{readFile:n,repoRoot:s}){if(!e.moduleLabel)return"";let o=null;try{({lines:o}=await ps({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
65
|
## anchor: ${e.anchor.label} (${e.anchor.class}) @ ${e.moduleLabel}:${i}-${a}`),r.push(Ls(o,i,a,vu).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
66
|
## closest example (full body) \u2014 copy this style: ${e.exemplar.label} (${e.exemplar.class})${l} @ ${e.moduleLabel}:${i}-${a}`),r.push(Ls(o,i,a,vu).text),e.callHint&&r.push(e.callHint)}if(t.inlinedCallees&&e.calleeBodies.length){let i=t_;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 ps({readFile:n,repoRoot:s,path:a.site.path}))}catch{u=null}if(!u)continue;let d=Ls(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(`
|
|
@@ -82,7 +82,7 @@ ${g}`:b,tier:h})},architecture({package:c=""}={}){let u=String(c||"").trim().toL
|
|
|
82
82
|
## covering tests: ${m.tests.join(", ")}`),g.cochange&&m.cochange&&m.cochange.length&&$.push(`
|
|
83
83
|
## usually changed together (consider editing these too): ${m.cochange.map(x=>`${x.label} (\xD7${x.weight})`).join(", ")}`),$.push(`
|
|
84
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 ${m.moduleLabel}.`),b!=="FULL"&&$.push(`(bundle tier ${b}; for any omitted sections run ${u}context_more {"symbol":"${r}"}, or ${u}context with depth="full".)`),{text:$.join(`
|
|
85
|
-
`),tier:b,topup:y}}async function xu(e,{config:t,source:n,tel:s}){return(await Rg(e,{config:t,source:n,tel:s})).text}var Eu=C(()=>{_t();We();Vt();$a();Nr();Ie();Pn();Ea();Sa();qe();xu.ownsGraphLoad=!0});function _g(e,{graph:t,svc:n}){let{match:s}=St(n,st(e,"symbol"),"symbol");return Qh(Bo(t,s))}var Tg=C(()=>{Ie();qe()});function ka(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 Zr(e){return ka(e).toString(16).padStart(8,"0")}function r_(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,k=a(i[w-2],17)^a(i[w-2],19)^i[w-2]>>>10;i[w]=i[w-16]+v+i[w-7]+k>>>0}let[d,f,p,h,m,b,g,y]=r;for(let w=0;w<64;w+=1){let v=a(m,6)^a(m,11)^a(m,25),k=m&b^~m&g,$=y+v+k+o_[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=g,g=b,b=m,m=h+$>>>0,h=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]+h>>>0,r[4]=r[4]+m>>>0,r[5]=r[5]+b>>>0,r[6]=r[6]+g>>>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 i_(e,t){let n=r_(e),s="";for(let o=0;o<t;o+=1)s+=n[o].toString(16).padStart(2,"0");return s}function V(e){let t=fs(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 hs(e){let t=fs(e);return c_.get(t)??t}function ge(e,t,n){return Zo(V(e),hs(t),V(n))}var o_,a_,fs,c_,Zo,Ot=C(()=>{o_=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]);a_=2e3,fs=e=>String(e??"").replace(/\s+/g," ").trim().slice(0,a_);c_=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"]]);Zo=(e,t,n)=>`fact:${i_(`${e}\0${t}\0${n}`,8)}`});var fn={};Gt(fn,{CARDINALITY_RULE_CONFIDENCE:()=>m_,CAX_DW_RULE:()=>ku,CAX_DW_RULE_CONFIDENCE:()=>Ru,CAX_MAXC0_RULE_CONFIDENCE:()=>b_,CLS_SVF1_RULE:()=>_u,CLS_SVF1_RULE_CONFIDENCE:()=>Au,DEFAULT_MAX_ENVIRONMENTS:()=>ja,DISJOINT_PREDICATE:()=>er,ENTAILED_DISJOINT_PROVENANCE:()=>ju,ENTAILED_PROVENANCE:()=>Cg,ENTAILED_SCM_SVF_PROVENANCE:()=>Ou,ENTAILED_SVF1_PROVENANCE:()=>Tu,ENTAILED_TYPE_PROVENANCE:()=>Lg,ON_PROPERTY_PREDICATE:()=>Fn,SCM_SVF_RULE:()=>Cu,SCM_SVF_RULE_CONFIDENCE:()=>Lu,SOME_VALUES_FROM_PREDICATE:()=>Dn,SUBCLASS_PREDICATE:()=>ze,TYPE_PREDICATE:()=>Ft,buildCardinalityRestrictions:()=>h_,buildRelevanceFrontier:()=>Su,buildSubClassSuccessors:()=>Ra,deriveDisjointViolations:()=>Fg,deriveSomeValuesFromApplication:()=>Dg,deriveSomeValuesFromSubsumption:()=>zg,deriveSubClassClosure:()=>Ng,deriveSubClassClosureDelta:()=>Pg,deriveTypePropagation:()=>Mg,entailedTrustFrom:()=>u_,findConsistencyViolations:()=>y_,findIsaChain:()=>Nu,proveCardinalityAtLeast:()=>g_,proveMaxCardinalityZeroDenial:()=>w_,retractSubClassOf:()=>S_,syllogise:()=>$_});function Ag(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 u_(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 ms(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=V(s);o&&n.add(o)}return n.size?n:null}function Ng(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}${Ne}${d}`),r.has(u)||r.set(u,new Set),r.get(u).add(d));let i=s instanceof Set?s.size?s:null:ms(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,h]of r)for(let m of h){let b=r.get(m);if(b)for(let g of b){if(p===g)continue;let y=`${p}${Ne}${g}`;o.has(y)||c.has(y)||a(p,m,g)&&d.push([p,m,g,y])}}if(!d.length)break;d.sort((p,h)=>p[0].localeCompare(h[0])||p[2].localeCompare(h[2])||p[1].localeCompare(h[1]));let f=!1;for(let[p,h,m,b]of d)if(!c.has(b)){if(l.length>=n)break;c.add(b),l.push({subject:p,object:m,via:h}),r.has(p)||r.set(p,new Set),r.get(p).add(m),f=!0}if(l.length>=n||!f)break}return l}function Pg(e,t,{depth:n=32,budget:s=50,focus:o=null}={}){let r=new Set,i=new Map,a=new Map;for(let[h,m]of e||[])!h||!m||h===m||(r.add(`${h}${Ne}${m}`),i.has(h)||i.set(h,new Set),i.get(h).add(m),a.has(m)||a.set(m,new Set),a.get(m).add(h));let l=[],c=new Set;for(let[h,m]of t||[]){if(!h||!m||h===m)continue;let b=`${h}${Ne}${m}`;c.has(b)||(c.add(b),l.push([h,m]))}let u=o instanceof Set?o.size?o:null:ms(o),d=(h,m,b)=>!u||u.has(h)||u.has(m)||u.has(b),f=[],p=new Set;for(let h=0;h<n&&l.length;h+=1){let m=[],b=(w,v,k)=>{if(w===k)return;let $=`${w}${Ne}${k}`;r.has($)||p.has($)||d(w,v,k)&&m.push([w,v,k,$])};for(let[w,v]of l){for(let k of i.get(v)||[])b(w,v,k);for(let k of a.get(w)||[])b(k,w,v)}if(!m.length)break;m.sort((w,v)=>w[0].localeCompare(v[0])||w[2].localeCompare(v[2])||w[1].localeCompare(v[1]));let g=!1,y=[];for(let[w,v,k,$]of m)if(!p.has($)){if(f.length>=s)break;p.add($),f.push({subject:w,object:k,via:v}),i.has(w)||i.set(w,new Set),i.get(w).add(k),a.has(k)||a.set(k,new Set),a.get(k).add(w),y.push([w,k]),g=!0}if(f.length>=s||!g)break;l=y}return f}function zn(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 d_(e){return zn((e||[]).map(([t,n])=>[n,t]))}function Su(e,t){let n=[],s=[],o=new Map,r=new Map;for(let c of e||[])!c||!c.subject||!c.predicate||!c.object||(Ps(c.predicate)?n.push([c.subject,c.object]):fo(c.predicate)?s.push([c.subject,c.object]):tr(c.predicate)?o.set(c.subject,c.object):ti(c.predicate)&&r.set(c.subject,c.object));let i=d_(n),a=new Set;for(let c of t||[]){let u=V(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 Mg(e,t,{budget:n=50,focus:s=null,presentTypeEdges:o=e}={}){let r=zn(t),i=new Set,a=new Set;for(let[p,h]of o||[])p&&h&&i.add(`${p}${Ne}${h}`);let l=s instanceof Set?s.size?s:null:ms(s),c=(p,h,m)=>!l||l.has(p)||l.has(h)||l.has(m),u=[];for(let[p,h]of e||[]){if(!p||!h)continue;let m=`${p}${Ne}${h}`;if(!a.has(m)){a.add(m);for(let b of r(h)){if(b===h||b===p)continue;let g=`${p}${Ne}${b}`;i.has(g)||c(p,h,b)&&u.push([p,h,b,g])}}}u.sort((p,h)=>p[0].localeCompare(h[0])||p[2].localeCompare(h[2])||p[1].localeCompare(h[1]));let d=[],f=new Set;for(let[p,h,m,b]of u)if(!f.has(b)){if(d.length>=n)break;f.add(b),d.push({subject:p,object:m,via:h})}return d}function Fg(e,t,n,{budget:s=50,focus:o=null}={}){let r=zn(t),i=new Map,a=new Set;for(let[h,m]of n||[])!h||!m||h===m||(a.add(`${h}${Ne}${m}`),a.add(`${m}${Ne}${h}`),i.has(h)||i.set(h,new Set),i.get(h).add(m),i.has(m)||i.set(m,new Set),i.get(m).add(h));if(!i.size)return[];let l=new Set,c=o instanceof Set?o.size?o:null:ms(o),u=(h,m,b)=>!c||c.has(h)||c.has(m)||c.has(b),d=[];for(let[h,m]of e||[]){if(!h||!m)continue;let b=`${h}${Ne}${m}`;if(!l.has(b)){l.add(b);for(let g of[m,...r(m)]){let y=i.get(g);if(y)for(let w of y){if(w===h)continue;let v=`${h}${Ne}${w}`;a.has(v)||u(h,m,w)&&d.push([h,m,g,w,v])}}}}d.sort((h,m)=>h[0].localeCompare(m[0])||h[3].localeCompare(m[3])||h[2].localeCompare(m[2])||h[1].localeCompare(m[1]));let f=[],p=new Set;for(let[h,m,b,g,y]of d)if(!p.has(y)){if(f.length>=s)break;p.add(y),f.push({subject:h,object:g,viaType:m,viaClass:b})}return f}function Dg(e,t,n,s,{budget:o=50,focus:r=null}={}){let i=zn(n),a=new Map;for(let b of s||[]){if(!b||!b.restriction||!b.property||!b.target)continue;let g=`${b.property}${Ne}${b.target}`;a.has(g)||a.set(g,new Set),a.get(g).add(b.restriction)}if(!a.size)return[];let l=new Set,c=new Map;for(let[b,g]of t||[])!b||!g||(l.add(`${b}${Ne}${g}`),c.has(b)||c.set(b,new Set),c.get(b).add(g));let u=r instanceof Set?r.size?r:null:ms(r),d=(b,g,y)=>!u||u.has(b)||u.has(g)||u.has(y),f=new Set,p=[];for(let[b,g,y]of e||[]){if(!b||!g||!y)continue;let w=V(g),v=`${b}${Ne}${w}${Ne}${y}`;if(f.has(v))continue;f.add(v);let k=c.get(y);if(k)for(let $ of k)for(let x of[$,...i($)]){let E=a.get(`${w}${Ne}${x}`);if(E)for(let S of E){if(b===S)continue;let _=`${b}${Ne}${S}`;l.has(_)||d(b,y,S)&&p.push([b,g,w,y,$,x,S,_])}}}p.sort((b,g)=>b[0].localeCompare(g[0])||b[6].localeCompare(g[6])||b[1].localeCompare(g[1])||b[3].localeCompare(g[3]));let h=[],m=new Set;for(let[b,g,y,w,v,k,$,x]of p)if(!m.has(x)){if(h.length>=o)break;m.add(x),h.push({subject:b,object:$,viaProperty:g,viaPropertyKey:y,viaValue:w,viaType:v,viaTarget:k})}return h}function h_(e){let t=new Map,n=new Map,s=new Map;for(let r of e||[])if(!(!r||!r.subject||!r.predicate))if(tr(r.predicate))t.set(r.subject,r.object);else if(l_(r.predicate))s.set(r.subject,r.object);else{let i=f_[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)!==p_)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 zg(e,t,{budget:n=50,focus:s=null}={}){let o=zn(t),r=new Map;for(let f of e||[]){if(!f||!f.restriction||!f.property||!f.target)continue;let p=V(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}${Ne}${p}`);let a=s instanceof Set?s.size?s:null:ms(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 h of f){if(p.restriction===h.restriction||p.target===h.target||!o(p.target).has(h.target))continue;let m=`${p.restriction}${Ne}${h.restriction}`;i.has(m)||l(p.restriction,h.restriction)&&c.push([p.restriction,h.restriction,p.target,h.target,m])}c.sort((f,p)=>f[0].localeCompare(p[0])||f[1].localeCompare(p[1]));let u=[],d=new Set;for(let[f,p,h,m,b]of c)if(!d.has(b)){if(u.length>=n)break;d.add(b),u.push({subject:f,object:p,viaY1:h,viaY2:m})}return u}function Ug(e,t,n,s,{budget:o=20,focus:r=null}={}){if(!n)return null;let i=zn(e),a=r instanceof Set?r.size?r:null:ms(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 h=u.get(p);if(h&&s(h))return{viaClass:f,viaRestriction:p,record:h}}}return null}function g_(e,t,n,s,o,r={}){if(!s||!Number.isFinite(o))return null;let i=Ug(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 w_(e,t,n,s,o={}){if(!s)return null;let r=Ug(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 y_(e,t,n,{budget:s=50,focus:o=null}={}){let r=zn(t),i=new Map;for(let[p,h]of n||[])!p||!h||p===h||(i.has(p)||i.set(p,new Set),i.get(p).add(h),i.has(h)||i.set(h,new Set),i.get(h).add(p));if(!i.size)return[];let a=new Map;for(let[p,h]of e||[])!p||!h||(a.has(p)||a.set(p,new Set),a.get(p).add(h));let l=o instanceof Set?o.size?o:null:ms(o),c=p=>!l||l.has(p),u=[],d=new Set;for(let[p,h]of a){if(!c(p))continue;let m=[...h].sort();for(let b=0;b<m.length;b+=1)for(let g=b+1;g<m.length;g+=1){let[y,w]=[m[b],m[g]],v=[y,...r(y)],k=[w,...r(w)],$=null;for(let E of v){let S=i.get(E);if(S){for(let _ of k)if(S.has(_)){$=[E,_];break}if($)break}}if(!$)continue;let x=`${p}${Ne}${y}${Ne}${w}`;d.has(x)||(d.add(x),u.push([p,y,w,$[0],$[1]]))}}u.sort((p,h)=>p[0].localeCompare(h[0])||p[1].localeCompare(h[1])||p[2].localeCompare(h[2]));let f=[];for(let[p,h,m,b,g]of u){if(f.length>=s)break;f.push({subject:p,classA:h,classB:m,viaA:b,viaB:g})}return f}async function $_(e,{depth:t=32,budget:n=50,focus:s=null,expandFocus:o=!1,maxEnvironments:r=ja,full:i=!1,store:a}={}){let{loadMemory:l,readFactRows:c,appendFacts:u}=Ag(a,["loadMemory","readFactRows","appendFacts"],"syllogise"),d=typeof a?.loadSyllogiseState=="function"&&typeof a?.saveSyllogiseState=="function",f=await l(e),p=c(f),h=p.filter(j=>Ps(j.predicate)).map(j=>[j.subject,j.object]),m=p.filter(j=>fo(j.predicate)).map(j=>[j.subject,j.object]),b=p.filter(j=>po(j.predicate)).map(j=>[j.subject,j.object]),g=new Map,y=new Map,w=[];for(let j of p){let pe=String(j.predicate||"").trim().toLowerCase();tr(j.predicate)?g.set(j.subject,j.object):ti(j.predicate)?y.set(j.subject,j.object):Iu.has(pe)||w.push([j.subject,j.predicate,j.object])}let v=[];for(let[j,pe]of g){let Ae=y.get(j);Ae&&v.push({restriction:j,property:pe,target:Ae})}let k=ms(s),$=o&&k?Su(p,[...k]):k,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)):[],_=x&&Array.isArray(x.factIds)&&!S.length&&!i?"delta":"full",R=_==="delta"?new Set(x.factIds):null,I=_==="delta"?p.filter(j=>!R.has(j.id)):p,P=I.length,T=new Map;for(let j of p)T.set(`${j.subject}${Ne}${j.predicate}${Ne}${j.object}`,j.trust);let F=(j,pe,Ae)=>T.get(`${j}${Ne}${pe}${Ne}${Ae}`),U=(j,pe,Ae)=>T.has(`${j}${Ne}${pe}${Ne}${Ae}`),K=j=>j.filter(pe=>typeof pe=="number"),ce=_==="delta"&&!I.length,ie=_==="delta"?I.filter(j=>Ps(j.predicate)).map(j=>[j.subject,j.object]):[],D=_==="delta"?ie.length?Pg(h,ie,{depth:t,budget:n,focus:$}):[]:Ng(h,{depth:t,budget:n,focus:$}),B=h.concat(D.map(j=>[j.subject,j.object])),W=$,A=null;if(_==="delta"&&!ce){let j=p.concat(D.map(Ae=>({subject:Ae.subject,predicate:ze,object:Ae.object}))),pe=[];for(let Ae of I)pe.push(Ae.subject,Ae.object);A=Su(j,pe),W=A}let L=j=>!A||A.has(j),O=A?m.filter(([j,pe])=>L(j)||L(pe)):m,N=new Set;if(A)for(let j of I)po(j.predicate)&&(N.add(j.subject),N.add(j.object));let M=A&&N.size?zn(B):null,z=A?m.filter(([j,pe])=>L(j)||L(pe)||M&&[...M(pe)].some(Ae=>N.has(Ae))):m,H=new Set;if(A){for(let j of I)if(tr(j.predicate)||ti(j.predicate)){let pe=g.get(j.subject);pe&&H.add(V(pe))}}let Q=A?w.filter(([j,pe,Ae])=>L(j)||L(Ae)||H.has(V(pe))):w,ae=Math.max(0,n-D.length),te=ae>0&&!ce?Mg(O,B,{budget:ae,focus:W,presentTypeEdges:m}):[],ee=Math.max(0,n-D.length-te.length),Y=ee>0&&!ce?Fg(z,B,b,{budget:ee,focus:W}):[],J=Math.max(0,n-D.length-te.length-Y.length),ne=J>0&&v.length&&!ce?Dg(Q,m,B,v,{budget:J,focus:W}):[],Ee=Math.max(0,n-D.length-te.length-Y.length-ne.length),Te=Ee>0&&v.length>1&&!ce?zg(v,B,{budget:Ee,focus:W}):[],ue=new Map(v.map(j=>[j.restriction,j])),Ce=[...D.map(j=>({subject:j.subject,predicate:ze,object:j.object,provenance:Cg,justification:[[ge(j.subject,ze,j.via),ge(j.via,ze,j.object)]]})),...te.map(j=>({subject:j.subject,predicate:Ft,object:j.object,provenance:Lg,justification:[[ge(j.subject,Ft,j.via),ge(j.via,ze,j.object)]]})),...Y.map(j=>{let pe=U(j.viaClass,er,j.object),[Ae,un]=pe?[j.viaClass,j.object]:[j.object,j.viaClass],Qn=K([F(j.subject,Ft,j.viaType),F(Ae,er,un),...j.viaClass!==j.viaType?[F(j.viaType,ze,j.viaClass)]:[]]);return{subject:j.subject,predicate:er,object:j.object,provenance:ju,justification:[[ge(j.subject,Ft,j.viaType),ge(Ae,er,un),...j.viaClass!==j.viaType?[ge(j.viaType,ze,j.viaClass)]:[]]],...Qn.length?{premiseTrusts:Qn,ruleConfidence:Ru}:{}}}),...ne.map(j=>{let pe=K([F(j.subject,j.viaProperty,j.viaValue),F(j.viaValue,Ft,j.viaType),F(j.object,Fn,j.viaPropertyKey),F(j.object,Dn,j.viaTarget),...j.viaType!==j.viaTarget?[F(j.viaType,ze,j.viaTarget)]:[]]);return{subject:j.subject,predicate:Ft,object:j.object,provenance:Tu,justification:[[ge(j.subject,j.viaProperty,j.viaValue),ge(j.viaValue,Ft,j.viaType),ge(j.object,Fn,j.viaPropertyKey),ge(j.object,Dn,j.viaTarget),...j.viaType!==j.viaTarget?[ge(j.viaType,ze,j.viaTarget)]:[]]],...pe.length?{premiseTrusts:pe,ruleConfidence:Au}:{}}}),...Te.map(j=>{let pe=ue.get(j.subject),Ae=ue.get(j.object),un=K([pe&&F(j.subject,Fn,pe.property),F(j.subject,Dn,j.viaY1),Ae&&F(j.object,Fn,Ae.property),F(j.object,Dn,j.viaY2),F(j.viaY1,ze,j.viaY2)]);return{subject:j.subject,predicate:ze,object:j.object,provenance:Ou,justification:[[...pe?[ge(j.subject,Fn,pe.property)]:[],ge(j.subject,Dn,j.viaY1),...Ae?[ge(j.object,Fn,Ae.property)]:[],ge(j.object,Dn,j.viaY2),ge(j.viaY1,ze,j.viaY2)]],...un.length?{premiseTrusts:un,ruleConfidence:Lu}:{}}})],Oe=Ce.map(j=>({id:ge(j.subject,j.predicate,j.object),subject:j.subject,predicate:j.predicate,object:j.object,environments:j.justification,write:j})),oe=Wg(p.concat(Oe.map(j=>({id:j.id,subject:j.subject,predicate:j.predicate,object:j.object})))),ke=new Map(p.map(j=>[j.id,j])),le=j=>Ps(j)||fo(j)||po(j),q=j=>_!=="delta"||A!==null&&(A.has(j.subject)||A.has(j.object)),se=p.filter(j=>le(j.predicate)&&Bg(j.provenance)&&ei(j).length<r&&q(j)).map(j=>({id:j.id,subject:j.subject,predicate:j.predicate,object:j.object,environments:ei(j),provenance:j.provenance})),He=[...Oe,...se].sort((j,pe)=>j.subject.localeCompare(pe.subject)||j.predicate.localeCompare(pe.predicate)||j.object.localeCompare(pe.object)),De=0,tt=!1,cn=0;for(let j of He){if(cn>=n){tt=!0;break}cn+=1;let pe=oe(j,{maxEnvironments:r+1}),{kept:Ae,truncated:un}=x_(j.environments,pe,r);if(un&&(tt=!0),!(Ae.length<=j.environments.length)){if(De+=Ae.length-j.environments.length,j.write){j.write.justification=Ae;continue}Ce.push({subject:j.subject,predicate:j.predicate,object:j.object,justification:Ae,...Gg(j.provenance,Ae,Qn=>ke.get(Qn)?.trust)||{}})}}let{ids:Qt}=await u(e,Ce),Zt=[],ln=0;for(let j of D)Zt.push({id:Qt[ln],subject:j.subject,object:j.object,via:j.via,rule:Ig}),ln+=1;for(let j of te)Zt.push({id:Qt[ln],subject:j.subject,object:j.object,via:j.via,rule:Og}),ln+=1;for(let j of Y)Zt.push({id:Qt[ln],subject:j.subject,object:j.object,via:j.viaClass,rule:ku}),ln+=1;for(let j of ne)Zt.push({id:Qt[ln],subject:j.subject,object:j.object,via:j.viaValue,rule:_u}),ln+=1;for(let j of Te)Zt.push({id:Qt[ln],subject:j.subject,object:j.object,via:j.viaY1,rule:Cu}),ln+=1;let Ni=Zt.length>=n;if($===null&&d&&!Ni){let j=new Set(E);for(let pe of Qt)j.add(pe);await a.saveSyllogiseState(e,{version:1,factIds:[...j].sort(),completedAt:new Date().toISOString()})}return{derived:Zt,count:Zt.length,budget:n,depth:t,truncated:Ni,mode:_,deltaSize:P,environmentsAdded:De,alternatesTruncated:tt}}function Bg(e){let t=String(e||"").split(" | ").filter(Boolean);return t.length>0&&t.every(n=>n.startsWith("entailed:"))}function v_(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();Ps(u.predicate)?t.push([u.subject,u.object]):fo(u.predicate)?(n.has(u.subject)||n.set(u.subject,new Set),n.get(u.subject).add(u.object)):po(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)):tr(u.predicate)?o.set(u.subject,u.object):ti(u.predicate)?r.set(u.subject,u.object):Iu.has(d)||(i.has(u.subject)||i.set(u.subject,[]),i.get(u.subject).push([V(u.predicate),u.object]))}let a=zn(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:V(d),target:f}:null};return u=>{if(Ps(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(fo(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 h of n.get(p)||[])if(h===d.target||l(h,d.target))return!0}}return!1}if(po(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 Wg(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 h=String(p.predicate||"").trim().toLowerCase();Ps(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)):fo(p.predicate)?(o.has(p.subject)||o.set(p.subject,new Set),o.get(p.subject).add(p.object)):po(p.predicate)?(r.add(`${p.subject}${Ne}${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)):tr(p.predicate)?a.set(p.subject,p.object):ti(p.predicate)?l.set(p.subject,p.object):Iu.has(h)||(c.has(p.subject)||c.set(p.subject,[]),c.get(p.subject).push([p.predicate,p.object]))}let u=zn(n),d=p=>s.get(p)||new Set,f=p=>{let h=a.get(p),m=l.get(p);return h&&m?{property:h,propertyKey:V(h),target:m}:null};return(p,{maxEnvironments:h=ja}={})=>{let m=[],b=new Set,g=y=>{if(m.length>=h||p.id&&y.includes(p.id)||!y.every(v=>t.has(v)))return;let w=[...y].sort().join(" ");b.has(w)||(b.add(w),m.push(y))};if(Ps(p.predicate)){for(let y of[...d(p.subject)].sort()){if(m.length>=h)break;y===p.subject||y===p.object||d(y).has(p.object)&&g([ge(p.subject,ze,y),ge(y,ze,p.object)])}if(m.length<h){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)&&g([ge(p.subject,Fn,y.property),ge(p.subject,Dn,y.target),ge(p.object,Fn,w.property),ge(p.object,Dn,w.target),ge(y.target,ze,w.target)])}return m}if(fo(p.predicate)){for(let w of[...o.get(p.subject)||[]].sort()){if(m.length>=h)break;w!==p.object&&d(w).has(p.object)&&g([ge(p.subject,Ft,w),ge(w,ze,p.object)])}let y=f(p.object);if(y){let w=[...c.get(p.subject)||[]].filter(([v])=>V(v)===y.propertyKey).sort((v,k)=>v[0].localeCompare(k[0])||v[1].localeCompare(k[1]));for(let[v,k]of w){if(m.length>=h)break;for(let $ of[...o.get(k)||[]].sort()){if(m.length>=h)break;$!==y.target&&!d($).has(y.target)||g([ge(p.subject,v,k),ge(k,Ft,$),ge(p.object,Fn,y.propertyKey),ge(p.object,Dn,y.target),...$!==y.target?[ge($,ze,y.target)]:[]])}}}return m}if(po(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(m.length>=h)break;let k=r.has(`${v}${Ne}${p.object}`),[$,x]=k?[v,p.object]:[p.object,v];g([ge(p.subject,Ft,w),ge($,er,x),...v!==w?[ge(w,ze,v)]:[]])}return m}return m}}function x_(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 Gg(e,t,n){let s;for(let i of String(e||"").split(" | ")){let a=E_.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 S_(e,t,n,{budget:s=50,depth:o=32,maxEnvironments:r=ja,store:i,sourceTags:a=[],predicate:l=ze}={}){let{loadMemory:c,readFactRows:u,removeFacts:d}=Ag(i,["loadMemory","readFactRows","removeFacts"],"retractSubClassOf"),f=typeof i?.appendFacts=="function"?i.appendFacts:null,p=typeof i?.factRecordIdForTag=="function"?i.factRecordIdForTag:null,h=(a||[]).filter(Boolean);if(h.length&&!p)throw new TypeError("retractSubClassOf needs a store option carrying factRecordIdForTag (memory/core.mjs's) to scope a retraction to sourceTags");let m=V(t),b=V(n),g=ge(m,l,b),y=await c(e),w=u(y),v=new Map(w.map(U=>[U.id,U]));if(!v.has(g))return{retracted:[],count:0,budget:s,depth:o,truncated:!1,found:!1};let k=v.get(g).sourceIds||[],$=h.map(U=>p(g,U).slice(g.length+1)),x=h.length?k.filter(U=>$.includes(U)):[],E=!h.length||x.length>0;if(h.length&&!E)return{retracted:[],count:0,budget:s,depth:o,truncated:!1,found:!0,ownRecord:!1,stillStands:!0};let S=h.length>0&&x.length<k.length,_=new Set([g]),R=[g],I=new Map,P=!1;if(!S){let U=w.filter(D=>ei(D).length&&Bg(D.provenance)),K=new Map;for(let D of U)for(let B of ei(D))for(let W of B)K.has(W)||K.set(W,new Set),K.get(W).add(D.id);let ce=0,ie=[g];for(;ce<o;ce+=1){let D=new Set;for(let z of ie)for(let H of K.get(z)||[])_.has(H)||D.add(H);let B=[...D].map(z=>v.get(z)).sort((z,H)=>z.subject.localeCompare(H.subject)||z.predicate.localeCompare(H.predicate)||z.object.localeCompare(H.object));if(!B.length)break;let W=w.filter(z=>!_.has(z.id)&&!D.has(z.id)),A=new Set(W.map(z=>z.id)),L=Wg(W),O=v_(W),N=!1,M=!1;ie=[];for(let z of B){if(_.size>=s){M=!0;break}let H=ei(z),Q=H.filter(te=>te.every(ee=>A.has(ee)));if(Q.length){Q.length!==H.length&&I.set(z.id,Q);continue}let ae=L(z,{maxEnvironments:r});if(ae.length){I.set(z.id,ae);continue}O(z)||(_.add(z.id),R.push(z.id),ie.push(z.id),N=!0)}if(M){P=!0;break}if(!N)break}!P&&ce>=o&&(P=U.some(D=>!_.has(D.id)&&D.justification.some(B=>_.has(B))))}let T=h.length?[...x.map(U=>`${g}@${U}`),...R.slice(1)]:R,{removed:F}=await d(e,T);if(f){let U=[...I.entries()].filter(([K])=>!_.has(K)).sort((K,ce)=>K[0].localeCompare(ce[0])).map(([K,ce])=>{let ie=v.get(K);return{subject:ie.subject,predicate:ie.predicate,object:ie.object,justification:ce,...Gg(ie.provenance,ce,D=>v.get(D)?.trust)||{}}});U.length&&await f(e,U)}return{retracted:F,count:F.length,budget:s,depth:o,truncated:P,found:!0,...h.length?{ownRecord:!0,stillStands:S}:{}}}function Ra(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 Nu(e,t,n,s,{maxHops:o=6}={}){let r=t instanceof Set?t:new Set(t||[]),i=s instanceof Map?s:Ra(s),a=[];for(let[c,u]of n||[])c===e&&u&&a.push({node:u,path:[{subject:c,predicate:Ft,object:u}]});for(let c of i.get(e)||[])a.push({node:c,path:[{subject:e,predicate:ze,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:ze,object:p}]})}a=u}return null}var ze,Ig,Cg,Ft,Og,Lg,er,ku,ju,Ru,Fn,Dn,_u,Tu,Au,ja,Ne,Ps,fo,po,tr,ti,l_,Iu,p_,f_,Cu,Ou,Lu,m_,b_,ei,E_,Xt=C(()=>{Ot();ze="rdfs:subClassOf",Ig="subClassOf",Cg=`entailed:${Ig}`,Ft="rdf:type",Og="type",Lg=`entailed:${Og}`,er="owl:disjointWith",ku="disjointWith",ju=`entailed:${ku}`,Ru=.95,Fn="owl:onProperty",Dn="owl:someValuesFrom",_u="someValuesFrom",Tu=`entailed:${_u}`,Au=.95,ja=4,Ne="\u241F",Ps=e=>String(e||"").trim().toLowerCase()==="rdfs:subclassof",fo=e=>String(e||"").trim().toLowerCase()==="rdf:type",po=e=>String(e||"").trim().toLowerCase()==="owl:disjointwith",tr=e=>String(e||"").trim().toLowerCase()==="owl:onproperty",ti=e=>String(e||"").trim().toLowerCase()==="owl:somevaluesfrom",l_=e=>String(e||"").trim().toLowerCase()==="owl:onclass",Iu=new Set(["rdfs:subclassof","rdf:type","owl:disjointwith","owl:onproperty","owl:somevaluesfrom","owl:intersectionof"]);p_="has",f_={"owl:cardinality":"exactly","owl:mincardinality":"min","owl:maxcardinality":"max"};Cu="someValuesFromSubsumption",Ou=`entailed:${Cu}`,Lu=.95;m_=.95;b_=.95;ei=e=>e.environments||(Array.isArray(e.justification)&&e.justification.length?[e.justification]:[]);E_=new Map([[ju,Ru],[Tu,Au],[Ou,Lu]])});function rr(e){let t=String(e||""),n=Vg.get(t);return n||(t.startsWith(Pu)?nr+t.slice(Pu.length):t)}function qg(e){let t=String(e||""),n=k_.get(t);return n||(t.startsWith(nr)?Pu+t.slice(nr.length):null)}function Yg(e,t,n,s,o){let r=null;for(let i of e){if(i===t)return[];let a=Nu(i,new Set([t]),n,s,{maxHops:o});a&&(!r||a.length<r.length)&&(r=a)}return r}function Aa(e,t,n,{maxHops:s=3}={}){let o=or(e),r=or(t),i=Array.isArray(n)?n:[],{typeEdges:a,subClassSucc:l}=Kg(i),c=i.filter(g=>(g.predicate===Ta||g.predicate===sr)&&r.has(g.object)),u=[];for(let g of c){let y=g.predicate===sr?"negative":"positive";if(o.has(g.subject)){u.push({fact:g,polarity:y,hops:0,chain:null});continue}let w=Yg(o,g.subject,a,l,s);w&&w.length&&u.push({fact:g,polarity:y,hops:w.length,chain:w})}if(!u.length)return{verdict:"none",hops:0,positive:[],negative:[],chain:null,overrides:null,baseRate:Fu(o,r,i,{maxHops:s})};u.sort((g,y)=>g.hops-y.hops||(y.fact.trust||0)-(g.fact.trust||0));let d=u[0].hops,f=u.filter(g=>g.hops===d),p=f.filter(g=>g.polarity==="positive").map(g=>g.fact),h=f.filter(g=>g.polarity==="negative").map(g=>g.fact),m=h.length&&!p.length?"negative":"positive",b=u.find(g=>g.hops>d&&g.polarity!==m)||null;return{verdict:p.length&&h.length?"both":h.length?"no":"yes",hops:d,positive:p,negative:h,chain:u[0].chain,overrides:b?{fact:b.fact,chain:b.chain}:null,baseRate:null}}function Fu(e,t,n,{maxHops:s=3}={}){let o=or(e),r=or(t),i=Array.isArray(n)?n:[],a=i.filter(m=>m.predicate===ze||m.predicate===Ft),l=a.filter(m=>o.has(m.subject)).map(m=>m.object);if(!l.length)return null;let c=l[0],u=[...new Set(a.filter(m=>m.object===c&&!o.has(m.subject)).map(m=>m.subject))],d=m=>{let b=i.find(g=>g.subject===m&&r.has(g.object)&&(g.predicate===Ta||g.predicate===sr));return b?{name:m,polarity:b.predicate===sr?"negative":"positive",fact:b}:{name:m,polarity:"unknown",fact:null}},f=u.map(d),{typeEdges:p,subClassSucc:h}=Kg(i);return{klass:c,kinds:u.length,positive:f.filter(m=>m.polarity==="positive"),negative:f.filter(m=>m.polarity==="negative"),unknown:f.filter(m=>m.polarity==="unknown"),chain:Yg(o,c,p,h,s)}}function Du(e,t,{exclude:n=[],maxHops:s=3}={}){let o=or(e),r=or(n),i=Array.isArray(t)?t:[],a=new Set,l=[];for(let c of i)c.predicate!==Ta||!o.has(c.object)||r.has(c.subject)||a.has(c.subject)||(a.add(c.subject),Aa(new Set([c.subject]),o,i,{maxHops:s}).verdict==="yes"&&l.push(c));return l.sort(j_)}var nr,Pu,_a,Vg,k_,Hg,Ta,sr,Mu,j_,or,Kg,Ia=C(()=>{Xt();nr="mgxneg:",Pu="mgx:",_a="mgxneg:subClassOf",Vg=new Map([[ze,_a]]),k_=new Map([...Vg].map(([e,t])=>[t,e]));Hg=e=>String(e||"").startsWith(nr),Ta="mgx:capableOf",sr=rr(Ta),Mu=6,j_=(e,t)=>(t.trust||0)-(e.trust||0)||String(e.subject).localeCompare(String(t.subject)),or=e=>e instanceof Set?e:new Set(Array.isArray(e)?e:[e]),Kg=e=>{let t=e.filter(s=>s.predicate===Ft).map(s=>[s.subject,s.object]),n=e.filter(s=>s.predicate===ze).map(s=>[s.subject,s.object]);return{typeEdges:t,subClassSucc:Ra(n)}}});function Ca(e){let t=String(e||"");return Bu.has(t)?zu:__.has(t)||T_.test(t)?ni:A_.has(t)?Xg:Uu}function I_(e){let t=e?.observedAt;if(t&&Number.isFinite(Date.parse(t)))return String(t);if(Zf.has(e?.sourceType)){for(let n of[e?.assertedAt,e?.createdAt])if(n&&Number.isFinite(Date.parse(n)))return String(n)}}function C_(e,t){let n=null;for(let s of e?.assertions||[]){let o=Date.parse(I_(s)??"");Number.isFinite(o)&&(n===null||(t?o<n:o>n))&&(n=o)}return n}function Wu(e,t){let n=t===Xg;if(!n&&t!==ni)return null;let s=(e||[]).map(r=>({row:r,at:C_(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 zu,ni,Xg,Uu,R_,Bu,__,T_,A_,Jg=C(()=>{Ia();ns();zu="merge",ni="latest-observation-wins",Xg="first-claim-wins",Uu="contradiction",R_=["mgx:hasA","mgx:capableOf","rdfs:subClassOf","rdf:type","owl:disjointWith","mgx:partOf","mgx:memberOf","mgx:collectionOf","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"],Bu=new Set(R_.flatMap(e=>[e,rr(e)])),__=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"]),T_=/^mgx:has-exit-([a-z]+)$/,A_=new Set(["mgx:playedBy"])});function ri(e){let t=String(e||""),n=t.indexOf(Oa);return n<0?"":t.slice(n+Oa.length)}function M_(e){let t=1,n=0;for(let s of e)t*=1-N_(s),n+=1;return n?P_(Math.min(1,1-t)):0}function nb(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 rb(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 ib(e,t="",n=""){let s=t,o=n;for(let r of e)s=sb(s,r.assertedAt),o=ob(o,r.assertedAt);return{earliest:s,latest:o}}function Hu({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?M_(l.map(u=>a(u))):void 0;return{id:e,label:n?.label||"",class:O_,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===ir?"rollupSourceIds":"rollupRecordIds",value:l.join(" ")},{prop:oi,key:"rollupCount",value:String(l.length)},{prop:Un,key:"rollupEarliest",value:r},{prop:Bn,key:"rollupLatest",value:i},...c===void 0?[]:[{prop:ar,key:"rollupPrior",value:String(c)}]]}}function ab({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(rb).slice(8);if(!i.length)return null;let{earliest:a,latest:l}=ib(i,kt(s,Un),kt(s,Bn));return{rollup:Hu({id:Gu(e,t),sourceKey:`rollup:${t}`,template:Ku(i[0].record||s),idsProp:ir,ids:[...Pa(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 cb({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(rb),r=o.slice(0,2),i=o.slice(2);if(!i.length)return null;let{earliest:a,latest:l}=ib(i,kt(s,Un),kt(s,Bn));return{rollup:Hu({id:Vu(e,t),sourceKey:t,template:Ku(i[0].record||s),idsProp:si,ids:[...L_(s),...i.map(u=>u.id)],earliest:a,latest:l}),absorbed:i.map(u=>u.id),rewire:r[r.length-1]?.id||""}}function Yu(e,t,{priorFor:n}={}){let s=e?.id||t?.id,o=Ms(s),r=o?ir:si,i=a=>qu(kt(a,r));return Hu({id:s,sourceKey:kt(e,"mgx:sourceId")||kt(t,"mgx:sourceId"),template:Ku(kt(e,"rdf:subject")?e:t),idsProp:r,ids:[...i(e),...i(t)],earliest:sb(kt(e,Un),kt(t,Un)),latest:ob(kt(e,Bn),kt(t,Bn)),priorFor:o?n:void 0})}function lb(e,t){if(!t)return!1;for(let n of e||[])if(Pa(n).includes(t))return!0;return!1}var O_,Qg,Zg,La,eb,ir,si,oi,Un,Bn,ar,Oa,tb,Gu,Vu,Ms,cr,Na,kt,qu,Pa,L_,N_,P_,sb,ob,Ku,Xu=C(()=>{O_="Fact",Qg=64,Zg=8,La=8,eb=2,ir="mgx:rollupSourceIds",si="mgx:rollupRecordIds",oi="mgx:rollupCount",Un="mgx:rollupEarliest",Bn="mgx:rollupLatest",ar="mgx:rollupPrior",Oa="@rollup:",tb="#rollup",Gu=(e,t)=>`${e}${Oa}${t}`,Vu=(e,t)=>`${e}@${t}${tb}`,Ms=e=>String(e||"").includes(Oa),cr=e=>String(e||"").endsWith(tb),Na=e=>Ms(e)||cr(e);kt=(e,t)=>(e?.attributes||[]).find(n=>n?.prop===t)?.value||"",qu=e=>String(e||"").split(" ").filter(Boolean),Pa=e=>qu(kt(e,ir)),L_=e=>qu(kt(e,si)),N_=e=>Math.max(0,Math.min(1,Number(e)||0)),P_=e=>Number(e.toFixed(6));sb=(e,t)=>nb(e,t,Math.min),ob=(e,t)=>nb(e,t,Math.max);Ku=e=>({label:e?.label||"",subject:kt(e,"rdf:subject"),predicate:kt(e,"rdf:predicate"),object:kt(e,"rdf:object")})});function ed(e){let t=String(e||"");return Zu(t)?t.slice(0,-za.length):""}function ub(e,t){let n=Date.parse(e),s=Date.parse(t);return Number.isFinite(n)?Number.isFinite(s)&&s>n?String(t):String(e):Number.isFinite(s)?String(t):""}function td({id:e,sourceId:t,template:n,ids:s,retractedAt:o,tags:r}){let i=[...new Set(s)].filter(Boolean).sort(),a=[...new Set(r)].filter(Boolean).sort();return{id:e,label:n?.label||"",class:rn,derived_from:[],mentions:[],attributes:[{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:sourceId",key:"sourceId",value:t||""},{prop:Fa,key:"retractedRecordIds",value:i.join(" ")},{prop:Ju,key:"retractedCount",value:String(i.length)},{prop:Da,key:"retractedAt",value:o||""},...a.length?[{prop:ii,key:"provenance",value:a.join(" | ")}]:[]]}}function pb({groupId:e,sourceId:t,recordIds:n=[],retractedAt:s="",existing:o=null,template:r=null,provenance:i=""}){if(!e||!t)return null;let a=[...ho(o),...n].filter(Boolean);return a.length?td({id:Qu(e,t),sourceId:t,template:r||db(o),ids:a,retractedAt:ub(mo(o),s),tags:[...ai(hn(o,ii)),...ai(i)]}):null}function fb(e,t){let n=db(hn(e,"rdf:subject")?e:t);return td({id:e?.id||t?.id,sourceId:hn(e,"mgx:sourceId")||hn(t,"mgx:sourceId"),template:n,ids:[...ho(e),...ho(t)],retractedAt:ub(mo(e),mo(t)),tags:[...ai(hn(e,ii)),...ai(hn(t,ii))]})}function D_(e,t){let n=Date.parse(e),s=Date.parse(t);return!Number.isFinite(s)||!Number.isFinite(n)?!0:n<=s}function z_(e,t,n=""){return!e||!t||!ho(e).includes(t)?!1:D_(n,mo(e))}function Ua(e,t,n=""){for(let s of e||[])if(z_(s,t,n))return!0;return!1}function U_(e,t){let n=[...new Set(t||[])].filter(Boolean).sort();return[e||"-",...n].join(" ")}function B_(e){let t=String(e||"").split(" ").filter(Boolean),n=t[0]||"",s=n==="-"||!Number.isFinite(Date.parse(n))?"":n,o=s||n==="-"?t.slice(1):t;return{retractedAt:s,ids:o}}function Ba(e){let t=ed(e?.id);return t?{id:e.id,subject:t,predicate:Ma,object:U_(mo(e),ho(e)),provenance:hn(e,ii)}:null}function Wa(e){if(!e||e.predicate!==Ma)return null;let t=String(e.subject||""),n=t.indexOf("@");if(n<=0||n===t.length-1)return null;let{retractedAt:s,ids:o}=B_(e.object);return o.length?td({id:`${t}${za}`,sourceId:t.slice(n+1),template:null,ids:o,retractedAt:s,tags:ai(e.provenance)}):null}var rn,Ma,Fa,Da,Ju,za,ii,Qu,Zu,hn,F_,ai,ho,mo,db,nd=C(()=>{rn="Retraction",Ma="mgx:retracted",Fa="mgx:retractedRecordIds",Da="mgx:retractedAt",Ju="mgx:retractedCount",za="#retracted",ii="mgx:factProvenance",Qu=(e,t)=>`${e}@${t}${za}`,Zu=e=>String(e||"").endsWith(za);hn=(e,t)=>(e?.attributes||[]).find(n=>n?.prop===t)?.value||"",F_=e=>String(e||"").split(" ").filter(Boolean),ai=e=>String(e||"").split(" | ").filter(Boolean),ho=e=>F_(hn(e,Fa)),mo=e=>hn(e,Da);db=e=>({label:e?.label||"",subject:hn(e,"rdf:subject"),predicate:hn(e,"rdf:predicate"),object:hn(e,"rdf:object")})});var W_,G_,V_,q_,sd,wM,hb=C(()=>{ns();W_="mgx:worldName",G_="mgx:nodeName",V_="mgx:playedBy",q_="mgx:waved",sd="mgx:invitedBy",wM=Object.freeze([W_,G_,V_,q_,sd])});function Ga(e){let t=new Set;for(let n of e||[])n?.predicate===sd&&(n.subject&&t.add(String(n.subject)),n.object&&t.add(String(n.object)));return[...t].sort()}function od(e,t=""){let n=String(t||"");return(e||[]).map(String).filter(s=>s&&s!==n)}function Va({recordIds:e=[],roster:t=[],self:n="",acknowledgedBy:s=null}={}){let o=od(t,n);if(!o.length)return[];if(typeof s!="function")return[];let r=new Map;for(let a of o){let l=s(a);r.set(a,new Set([...l||[]].map(String)))}return[...new Set((e||[]).map(String).filter(Boolean))].sort().filter(a=>o.every(l=>r.get(l).has(a)))}var rd=C(()=>{hb()});function gs(e,t){let n=(e?.attributes||[]).find(s=>s?.prop===t);return n?String(n.value??""):void 0}function Q_(e,t){(!e?.class||!H_.has(e.class))&&t.push(`must have a class from the closed vocabulary Utterance | Fact | Session | Source | Rule (got ${JSON.stringify(e?.class)})`)}function Z_(e,t){for(let i of["rdf:subject","rdf:predicate","rdf:object"])ci(gs(e,i))||t.push(`a Fact needs a non-empty ${i}`);for(let i of["rdf:subject","rdf:object"]){let a=gs(e,i);a!==void 0&&Y_.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=gs(e,"mgx:factProvenance");n!==void 0&&!ci(n)&&t.push("mgx:factProvenance, when present, must be non-empty");let s=typeof e?.id=="string"?e.id:"";X_(s)&&!gb.test(s)&&t.push(`a Fact record id must read <groupId>@<sourceId>, optionally suffixed #v<n> once superseded (got ${JSON.stringify(s)})`);let o=gs(e,"mgx:sourceId");o!==void 0&&!ci(o)&&t.push("mgx:sourceId, when present, must be non-empty (every assertion record has a key, src:none included)");let r=gs(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 J_){let a=gs(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)gb.test(c)||t.push(`${i} must name Fact record ids (got ${JSON.stringify(c)})`)}}function eT(e,t){ci(gs(e,"mgx:ruleName"))||t.push("a Rule needs a non-empty mgx:ruleName");let n=gs(e,"mgx:ruleKind");if(!n||!mb.has(n)){t.push(`a Rule's mgx:ruleKind must be one of ${[...mb].join(" | ")} (got ${JSON.stringify(n)})`);return}for(let s of K_[n])ci(gs(e,s))||t.push(`a ${n} Rule needs a non-empty ${s}`)}function tT(e){let t=[];return Q_(e,t),e?.class==="Fact"&&Z_(e,t),e?.class==="Rule"&&eT(e,t),{ok:t.length===0,violations:t}}function id(e){let t=tT(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 H_,mb,K_,Y_,gb,X_,J_,ci,bb=C(()=>{H_=new Set(["Utterance","Fact","Session","Source","Rule"]),mb=new Set(["compose2","filter","recursive","action-signature","action-precond","action-effect","action-constraint"]),K_={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"]},Y_=/[.!?]\s+\w/,gb=/^[^@]+@(.+?)(#v[1-9][0-9]*)?$/,X_=e=>e.includes("@")||/#v\d/.test(e),J_=["mgx:supersedes","mgx:supersededBy"];ci=e=>typeof e=="string"&&e.trim().length>0});var wb={};Gt(wb,{access:()=>oT,appendFile:()=>aT,basename:()=>ET,copyFile:()=>hT,createInterface:()=>_T,createReadStream:()=>gT,createRequire:()=>nT,createWriteStream:()=>bT,default:()=>AT,dirname:()=>$T,existsSync:()=>wT,fileURLToPath:()=>kT,isAbsolute:()=>xT,join:()=>yT,mkdir:()=>cT,mkdtemp:()=>lT,randomBytes:()=>jT,readFile:()=>rT,readFileSync:()=>sT,readdir:()=>mT,rename:()=>uT,resolve:()=>vT,rm:()=>pT,sep:()=>ST,spawnSync:()=>RT,stat:()=>fT,tmpdir:()=>TT,unlink:()=>dT,writeFile:()=>iT});var pt,nT,sT,oT,rT,iT,aT,cT,lT,uT,dT,pT,fT,hT,mT,gT,bT,wT,yT,$T,vT,xT,ET,ST,kT,jT,RT,_T,TT,AT,yb=C(()=>{pt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},nT=pt("createRequire"),sT=pt("readFileSync"),oT=pt("access"),rT=pt("readFile"),iT=pt("writeFile"),aT=pt("appendFile"),cT=pt("mkdir"),lT=pt("mkdtemp"),uT=pt("rename"),dT=pt("unlink"),pT=pt("rm"),fT=pt("stat"),hT=pt("copyFile"),mT=pt("readdir"),gT=pt("createReadStream"),bT=pt("createWriteStream"),wT=()=>!1,yT=(...e)=>e.join("/"),$T=e=>String(e).replace(/\/[^/]*$/,""),vT=(...e)=>e.join("/"),xT=e=>String(e).startsWith("/"),ET=e=>String(e).split("/").pop(),ST="/",kT=e=>String(e),jT=pt("randomBytes"),RT=pt("spawnSync"),_T=pt("createInterface"),TT=()=>"/tmp",AT={}});var IT,li,ad=C(()=>{IT=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i,li=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(IT);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 CT(e,t){let n=e.slice(0,t).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function OT(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+=`
|
|
85
|
+
`),tier:b,topup:y}}async function xu(e,{config:t,source:n,tel:s}){return(await Rg(e,{config:t,source:n,tel:s})).text}var Eu=C(()=>{_t();We();Vt();$a();Nr();Ie();Pn();Ea();Sa();qe();xu.ownsGraphLoad=!0});function _g(e,{graph:t,svc:n}){let{match:s}=St(n,st(e,"symbol"),"symbol");return Qh(Bo(t,s))}var Tg=C(()=>{Ie();qe()});function ka(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 Zr(e){return ka(e).toString(16).padStart(8,"0")}function r_(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,k=a(i[w-2],17)^a(i[w-2],19)^i[w-2]>>>10;i[w]=i[w-16]+v+i[w-7]+k>>>0}let[d,f,p,h,m,b,g,y]=r;for(let w=0;w<64;w+=1){let v=a(m,6)^a(m,11)^a(m,25),k=m&b^~m&g,$=y+v+k+o_[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=g,g=b,b=m,m=h+$>>>0,h=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]+h>>>0,r[4]=r[4]+m>>>0,r[5]=r[5]+b>>>0,r[6]=r[6]+g>>>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 i_(e,t){let n=r_(e),s="";for(let o=0;o<t;o+=1)s+=n[o].toString(16).padStart(2,"0");return s}function V(e){let t=fs(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 hs(e){let t=fs(e);return c_.get(t)??t}function ge(e,t,n){return Zo(V(e),hs(t),V(n))}var o_,a_,fs,c_,Zo,Ot=C(()=>{o_=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]);a_=2e3,fs=e=>String(e??"").replace(/\s+/g," ").trim().slice(0,a_);c_=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"]]);Zo=(e,t,n)=>`fact:${i_(`${e}\0${t}\0${n}`,8)}`});var fn={};Gt(fn,{CARDINALITY_RULE_CONFIDENCE:()=>m_,CAX_DW_RULE:()=>ku,CAX_DW_RULE_CONFIDENCE:()=>Ru,CAX_MAXC0_RULE_CONFIDENCE:()=>b_,CLS_SVF1_RULE:()=>_u,CLS_SVF1_RULE_CONFIDENCE:()=>Au,DEFAULT_MAX_ENVIRONMENTS:()=>ja,DISJOINT_PREDICATE:()=>er,ENTAILED_DISJOINT_PROVENANCE:()=>ju,ENTAILED_PROVENANCE:()=>Cg,ENTAILED_SCM_SVF_PROVENANCE:()=>Ou,ENTAILED_SVF1_PROVENANCE:()=>Tu,ENTAILED_TYPE_PROVENANCE:()=>Lg,ON_PROPERTY_PREDICATE:()=>Fn,SCM_SVF_RULE:()=>Cu,SCM_SVF_RULE_CONFIDENCE:()=>Lu,SOME_VALUES_FROM_PREDICATE:()=>Dn,SUBCLASS_PREDICATE:()=>Ue,TYPE_PREDICATE:()=>Ft,buildCardinalityRestrictions:()=>h_,buildRelevanceFrontier:()=>Su,buildSubClassSuccessors:()=>Ra,deriveDisjointViolations:()=>Fg,deriveSomeValuesFromApplication:()=>Dg,deriveSomeValuesFromSubsumption:()=>zg,deriveSubClassClosure:()=>Ng,deriveSubClassClosureDelta:()=>Pg,deriveTypePropagation:()=>Mg,entailedTrustFrom:()=>u_,findConsistencyViolations:()=>y_,findIsaChain:()=>Nu,proveCardinalityAtLeast:()=>g_,proveMaxCardinalityZeroDenial:()=>w_,retractSubClassOf:()=>S_,syllogise:()=>$_});function Ag(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 u_(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 ms(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=V(s);o&&n.add(o)}return n.size?n:null}function Ng(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}${Ne}${d}`),r.has(u)||r.set(u,new Set),r.get(u).add(d));let i=s instanceof Set?s.size?s:null:ms(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,h]of r)for(let m of h){let b=r.get(m);if(b)for(let g of b){if(p===g)continue;let y=`${p}${Ne}${g}`;o.has(y)||c.has(y)||a(p,m,g)&&d.push([p,m,g,y])}}if(!d.length)break;d.sort((p,h)=>p[0].localeCompare(h[0])||p[2].localeCompare(h[2])||p[1].localeCompare(h[1]));let f=!1;for(let[p,h,m,b]of d)if(!c.has(b)){if(l.length>=n)break;c.add(b),l.push({subject:p,object:m,via:h}),r.has(p)||r.set(p,new Set),r.get(p).add(m),f=!0}if(l.length>=n||!f)break}return l}function Pg(e,t,{depth:n=32,budget:s=50,focus:o=null}={}){let r=new Set,i=new Map,a=new Map;for(let[h,m]of e||[])!h||!m||h===m||(r.add(`${h}${Ne}${m}`),i.has(h)||i.set(h,new Set),i.get(h).add(m),a.has(m)||a.set(m,new Set),a.get(m).add(h));let l=[],c=new Set;for(let[h,m]of t||[]){if(!h||!m||h===m)continue;let b=`${h}${Ne}${m}`;c.has(b)||(c.add(b),l.push([h,m]))}let u=o instanceof Set?o.size?o:null:ms(o),d=(h,m,b)=>!u||u.has(h)||u.has(m)||u.has(b),f=[],p=new Set;for(let h=0;h<n&&l.length;h+=1){let m=[],b=(w,v,k)=>{if(w===k)return;let $=`${w}${Ne}${k}`;r.has($)||p.has($)||d(w,v,k)&&m.push([w,v,k,$])};for(let[w,v]of l){for(let k of i.get(v)||[])b(w,v,k);for(let k of a.get(w)||[])b(k,w,v)}if(!m.length)break;m.sort((w,v)=>w[0].localeCompare(v[0])||w[2].localeCompare(v[2])||w[1].localeCompare(v[1]));let g=!1,y=[];for(let[w,v,k,$]of m)if(!p.has($)){if(f.length>=s)break;p.add($),f.push({subject:w,object:k,via:v}),i.has(w)||i.set(w,new Set),i.get(w).add(k),a.has(k)||a.set(k,new Set),a.get(k).add(w),y.push([w,k]),g=!0}if(f.length>=s||!g)break;l=y}return f}function zn(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 d_(e){return zn((e||[]).map(([t,n])=>[n,t]))}function Su(e,t){let n=[],s=[],o=new Map,r=new Map;for(let c of e||[])!c||!c.subject||!c.predicate||!c.object||(Ps(c.predicate)?n.push([c.subject,c.object]):fo(c.predicate)?s.push([c.subject,c.object]):tr(c.predicate)?o.set(c.subject,c.object):ti(c.predicate)&&r.set(c.subject,c.object));let i=d_(n),a=new Set;for(let c of t||[]){let u=V(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 Mg(e,t,{budget:n=50,focus:s=null,presentTypeEdges:o=e}={}){let r=zn(t),i=new Set,a=new Set;for(let[p,h]of o||[])p&&h&&i.add(`${p}${Ne}${h}`);let l=s instanceof Set?s.size?s:null:ms(s),c=(p,h,m)=>!l||l.has(p)||l.has(h)||l.has(m),u=[];for(let[p,h]of e||[]){if(!p||!h)continue;let m=`${p}${Ne}${h}`;if(!a.has(m)){a.add(m);for(let b of r(h)){if(b===h||b===p)continue;let g=`${p}${Ne}${b}`;i.has(g)||c(p,h,b)&&u.push([p,h,b,g])}}}u.sort((p,h)=>p[0].localeCompare(h[0])||p[2].localeCompare(h[2])||p[1].localeCompare(h[1]));let d=[],f=new Set;for(let[p,h,m,b]of u)if(!f.has(b)){if(d.length>=n)break;f.add(b),d.push({subject:p,object:m,via:h})}return d}function Fg(e,t,n,{budget:s=50,focus:o=null}={}){let r=zn(t),i=new Map,a=new Set;for(let[h,m]of n||[])!h||!m||h===m||(a.add(`${h}${Ne}${m}`),a.add(`${m}${Ne}${h}`),i.has(h)||i.set(h,new Set),i.get(h).add(m),i.has(m)||i.set(m,new Set),i.get(m).add(h));if(!i.size)return[];let l=new Set,c=o instanceof Set?o.size?o:null:ms(o),u=(h,m,b)=>!c||c.has(h)||c.has(m)||c.has(b),d=[];for(let[h,m]of e||[]){if(!h||!m)continue;let b=`${h}${Ne}${m}`;if(!l.has(b)){l.add(b);for(let g of[m,...r(m)]){let y=i.get(g);if(y)for(let w of y){if(w===h)continue;let v=`${h}${Ne}${w}`;a.has(v)||u(h,m,w)&&d.push([h,m,g,w,v])}}}}d.sort((h,m)=>h[0].localeCompare(m[0])||h[3].localeCompare(m[3])||h[2].localeCompare(m[2])||h[1].localeCompare(m[1]));let f=[],p=new Set;for(let[h,m,b,g,y]of d)if(!p.has(y)){if(f.length>=s)break;p.add(y),f.push({subject:h,object:g,viaType:m,viaClass:b})}return f}function Dg(e,t,n,s,{budget:o=50,focus:r=null}={}){let i=zn(n),a=new Map;for(let b of s||[]){if(!b||!b.restriction||!b.property||!b.target)continue;let g=`${b.property}${Ne}${b.target}`;a.has(g)||a.set(g,new Set),a.get(g).add(b.restriction)}if(!a.size)return[];let l=new Set,c=new Map;for(let[b,g]of t||[])!b||!g||(l.add(`${b}${Ne}${g}`),c.has(b)||c.set(b,new Set),c.get(b).add(g));let u=r instanceof Set?r.size?r:null:ms(r),d=(b,g,y)=>!u||u.has(b)||u.has(g)||u.has(y),f=new Set,p=[];for(let[b,g,y]of e||[]){if(!b||!g||!y)continue;let w=V(g),v=`${b}${Ne}${w}${Ne}${y}`;if(f.has(v))continue;f.add(v);let k=c.get(y);if(k)for(let $ of k)for(let x of[$,...i($)]){let E=a.get(`${w}${Ne}${x}`);if(E)for(let S of E){if(b===S)continue;let _=`${b}${Ne}${S}`;l.has(_)||d(b,y,S)&&p.push([b,g,w,y,$,x,S,_])}}}p.sort((b,g)=>b[0].localeCompare(g[0])||b[6].localeCompare(g[6])||b[1].localeCompare(g[1])||b[3].localeCompare(g[3]));let h=[],m=new Set;for(let[b,g,y,w,v,k,$,x]of p)if(!m.has(x)){if(h.length>=o)break;m.add(x),h.push({subject:b,object:$,viaProperty:g,viaPropertyKey:y,viaValue:w,viaType:v,viaTarget:k})}return h}function h_(e){let t=new Map,n=new Map,s=new Map;for(let r of e||[])if(!(!r||!r.subject||!r.predicate))if(tr(r.predicate))t.set(r.subject,r.object);else if(l_(r.predicate))s.set(r.subject,r.object);else{let i=f_[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)!==p_)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 zg(e,t,{budget:n=50,focus:s=null}={}){let o=zn(t),r=new Map;for(let f of e||[]){if(!f||!f.restriction||!f.property||!f.target)continue;let p=V(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}${Ne}${p}`);let a=s instanceof Set?s.size?s:null:ms(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 h of f){if(p.restriction===h.restriction||p.target===h.target||!o(p.target).has(h.target))continue;let m=`${p.restriction}${Ne}${h.restriction}`;i.has(m)||l(p.restriction,h.restriction)&&c.push([p.restriction,h.restriction,p.target,h.target,m])}c.sort((f,p)=>f[0].localeCompare(p[0])||f[1].localeCompare(p[1]));let u=[],d=new Set;for(let[f,p,h,m,b]of c)if(!d.has(b)){if(u.length>=n)break;d.add(b),u.push({subject:f,object:p,viaY1:h,viaY2:m})}return u}function Ug(e,t,n,s,{budget:o=20,focus:r=null}={}){if(!n)return null;let i=zn(e),a=r instanceof Set?r.size?r:null:ms(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 h=u.get(p);if(h&&s(h))return{viaClass:f,viaRestriction:p,record:h}}}return null}function g_(e,t,n,s,o,r={}){if(!s||!Number.isFinite(o))return null;let i=Ug(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 w_(e,t,n,s,o={}){if(!s)return null;let r=Ug(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 y_(e,t,n,{budget:s=50,focus:o=null}={}){let r=zn(t),i=new Map;for(let[p,h]of n||[])!p||!h||p===h||(i.has(p)||i.set(p,new Set),i.get(p).add(h),i.has(h)||i.set(h,new Set),i.get(h).add(p));if(!i.size)return[];let a=new Map;for(let[p,h]of e||[])!p||!h||(a.has(p)||a.set(p,new Set),a.get(p).add(h));let l=o instanceof Set?o.size?o:null:ms(o),c=p=>!l||l.has(p),u=[],d=new Set;for(let[p,h]of a){if(!c(p))continue;let m=[...h].sort();for(let b=0;b<m.length;b+=1)for(let g=b+1;g<m.length;g+=1){let[y,w]=[m[b],m[g]],v=[y,...r(y)],k=[w,...r(w)],$=null;for(let E of v){let S=i.get(E);if(S){for(let _ of k)if(S.has(_)){$=[E,_];break}if($)break}}if(!$)continue;let x=`${p}${Ne}${y}${Ne}${w}`;d.has(x)||(d.add(x),u.push([p,y,w,$[0],$[1]]))}}u.sort((p,h)=>p[0].localeCompare(h[0])||p[1].localeCompare(h[1])||p[2].localeCompare(h[2]));let f=[];for(let[p,h,m,b,g]of u){if(f.length>=s)break;f.push({subject:p,classA:h,classB:m,viaA:b,viaB:g})}return f}async function $_(e,{depth:t=32,budget:n=50,focus:s=null,expandFocus:o=!1,maxEnvironments:r=ja,full:i=!1,store:a}={}){let{loadMemory:l,readFactRows:c,appendFacts:u}=Ag(a,["loadMemory","readFactRows","appendFacts"],"syllogise"),d=typeof a?.loadSyllogiseState=="function"&&typeof a?.saveSyllogiseState=="function",f=await l(e),p=c(f),h=p.filter(j=>Ps(j.predicate)).map(j=>[j.subject,j.object]),m=p.filter(j=>fo(j.predicate)).map(j=>[j.subject,j.object]),b=p.filter(j=>po(j.predicate)).map(j=>[j.subject,j.object]),g=new Map,y=new Map,w=[];for(let j of p){let pe=String(j.predicate||"").trim().toLowerCase();tr(j.predicate)?g.set(j.subject,j.object):ti(j.predicate)?y.set(j.subject,j.object):Iu.has(pe)||w.push([j.subject,j.predicate,j.object])}let v=[];for(let[j,pe]of g){let Ae=y.get(j);Ae&&v.push({restriction:j,property:pe,target:Ae})}let k=ms(s),$=o&&k?Su(p,[...k]):k,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)):[],_=x&&Array.isArray(x.factIds)&&!S.length&&!i?"delta":"full",R=_==="delta"?new Set(x.factIds):null,I=_==="delta"?p.filter(j=>!R.has(j.id)):p,P=I.length,T=new Map;for(let j of p)T.set(`${j.subject}${Ne}${j.predicate}${Ne}${j.object}`,j.trust);let F=(j,pe,Ae)=>T.get(`${j}${Ne}${pe}${Ne}${Ae}`),U=(j,pe,Ae)=>T.has(`${j}${Ne}${pe}${Ne}${Ae}`),K=j=>j.filter(pe=>typeof pe=="number"),ce=_==="delta"&&!I.length,ie=_==="delta"?I.filter(j=>Ps(j.predicate)).map(j=>[j.subject,j.object]):[],D=_==="delta"?ie.length?Pg(h,ie,{depth:t,budget:n,focus:$}):[]:Ng(h,{depth:t,budget:n,focus:$}),B=h.concat(D.map(j=>[j.subject,j.object])),W=$,A=null;if(_==="delta"&&!ce){let j=p.concat(D.map(Ae=>({subject:Ae.subject,predicate:Ue,object:Ae.object}))),pe=[];for(let Ae of I)pe.push(Ae.subject,Ae.object);A=Su(j,pe),W=A}let L=j=>!A||A.has(j),O=A?m.filter(([j,pe])=>L(j)||L(pe)):m,N=new Set;if(A)for(let j of I)po(j.predicate)&&(N.add(j.subject),N.add(j.object));let M=A&&N.size?zn(B):null,z=A?m.filter(([j,pe])=>L(j)||L(pe)||M&&[...M(pe)].some(Ae=>N.has(Ae))):m,H=new Set;if(A){for(let j of I)if(tr(j.predicate)||ti(j.predicate)){let pe=g.get(j.subject);pe&&H.add(V(pe))}}let Q=A?w.filter(([j,pe,Ae])=>L(j)||L(Ae)||H.has(V(pe))):w,ae=Math.max(0,n-D.length),te=ae>0&&!ce?Mg(O,B,{budget:ae,focus:W,presentTypeEdges:m}):[],ee=Math.max(0,n-D.length-te.length),Y=ee>0&&!ce?Fg(z,B,b,{budget:ee,focus:W}):[],J=Math.max(0,n-D.length-te.length-Y.length),ne=J>0&&v.length&&!ce?Dg(Q,m,B,v,{budget:J,focus:W}):[],Ee=Math.max(0,n-D.length-te.length-Y.length-ne.length),Te=Ee>0&&v.length>1&&!ce?zg(v,B,{budget:Ee,focus:W}):[],ue=new Map(v.map(j=>[j.restriction,j])),Ce=[...D.map(j=>({subject:j.subject,predicate:Ue,object:j.object,provenance:Cg,justification:[[ge(j.subject,Ue,j.via),ge(j.via,Ue,j.object)]]})),...te.map(j=>({subject:j.subject,predicate:Ft,object:j.object,provenance:Lg,justification:[[ge(j.subject,Ft,j.via),ge(j.via,Ue,j.object)]]})),...Y.map(j=>{let pe=U(j.viaClass,er,j.object),[Ae,un]=pe?[j.viaClass,j.object]:[j.object,j.viaClass],Qn=K([F(j.subject,Ft,j.viaType),F(Ae,er,un),...j.viaClass!==j.viaType?[F(j.viaType,Ue,j.viaClass)]:[]]);return{subject:j.subject,predicate:er,object:j.object,provenance:ju,justification:[[ge(j.subject,Ft,j.viaType),ge(Ae,er,un),...j.viaClass!==j.viaType?[ge(j.viaType,Ue,j.viaClass)]:[]]],...Qn.length?{premiseTrusts:Qn,ruleConfidence:Ru}:{}}}),...ne.map(j=>{let pe=K([F(j.subject,j.viaProperty,j.viaValue),F(j.viaValue,Ft,j.viaType),F(j.object,Fn,j.viaPropertyKey),F(j.object,Dn,j.viaTarget),...j.viaType!==j.viaTarget?[F(j.viaType,Ue,j.viaTarget)]:[]]);return{subject:j.subject,predicate:Ft,object:j.object,provenance:Tu,justification:[[ge(j.subject,j.viaProperty,j.viaValue),ge(j.viaValue,Ft,j.viaType),ge(j.object,Fn,j.viaPropertyKey),ge(j.object,Dn,j.viaTarget),...j.viaType!==j.viaTarget?[ge(j.viaType,Ue,j.viaTarget)]:[]]],...pe.length?{premiseTrusts:pe,ruleConfidence:Au}:{}}}),...Te.map(j=>{let pe=ue.get(j.subject),Ae=ue.get(j.object),un=K([pe&&F(j.subject,Fn,pe.property),F(j.subject,Dn,j.viaY1),Ae&&F(j.object,Fn,Ae.property),F(j.object,Dn,j.viaY2),F(j.viaY1,Ue,j.viaY2)]);return{subject:j.subject,predicate:Ue,object:j.object,provenance:Ou,justification:[[...pe?[ge(j.subject,Fn,pe.property)]:[],ge(j.subject,Dn,j.viaY1),...Ae?[ge(j.object,Fn,Ae.property)]:[],ge(j.object,Dn,j.viaY2),ge(j.viaY1,Ue,j.viaY2)]],...un.length?{premiseTrusts:un,ruleConfidence:Lu}:{}}})],Oe=Ce.map(j=>({id:ge(j.subject,j.predicate,j.object),subject:j.subject,predicate:j.predicate,object:j.object,environments:j.justification,write:j})),oe=Wg(p.concat(Oe.map(j=>({id:j.id,subject:j.subject,predicate:j.predicate,object:j.object})))),ke=new Map(p.map(j=>[j.id,j])),le=j=>Ps(j)||fo(j)||po(j),q=j=>_!=="delta"||A!==null&&(A.has(j.subject)||A.has(j.object)),se=p.filter(j=>le(j.predicate)&&Bg(j.provenance)&&ei(j).length<r&&q(j)).map(j=>({id:j.id,subject:j.subject,predicate:j.predicate,object:j.object,environments:ei(j),provenance:j.provenance})),He=[...Oe,...se].sort((j,pe)=>j.subject.localeCompare(pe.subject)||j.predicate.localeCompare(pe.predicate)||j.object.localeCompare(pe.object)),ze=0,tt=!1,cn=0;for(let j of He){if(cn>=n){tt=!0;break}cn+=1;let pe=oe(j,{maxEnvironments:r+1}),{kept:Ae,truncated:un}=x_(j.environments,pe,r);if(un&&(tt=!0),!(Ae.length<=j.environments.length)){if(ze+=Ae.length-j.environments.length,j.write){j.write.justification=Ae;continue}Ce.push({subject:j.subject,predicate:j.predicate,object:j.object,justification:Ae,...Gg(j.provenance,Ae,Qn=>ke.get(Qn)?.trust)||{}})}}let{ids:Qt}=await u(e,Ce),Zt=[],ln=0;for(let j of D)Zt.push({id:Qt[ln],subject:j.subject,object:j.object,via:j.via,rule:Ig}),ln+=1;for(let j of te)Zt.push({id:Qt[ln],subject:j.subject,object:j.object,via:j.via,rule:Og}),ln+=1;for(let j of Y)Zt.push({id:Qt[ln],subject:j.subject,object:j.object,via:j.viaClass,rule:ku}),ln+=1;for(let j of ne)Zt.push({id:Qt[ln],subject:j.subject,object:j.object,via:j.viaValue,rule:_u}),ln+=1;for(let j of Te)Zt.push({id:Qt[ln],subject:j.subject,object:j.object,via:j.viaY1,rule:Cu}),ln+=1;let Ni=Zt.length>=n;if($===null&&d&&!Ni){let j=new Set(E);for(let pe of Qt)j.add(pe);await a.saveSyllogiseState(e,{version:1,factIds:[...j].sort(),completedAt:new Date().toISOString()})}return{derived:Zt,count:Zt.length,budget:n,depth:t,truncated:Ni,mode:_,deltaSize:P,environmentsAdded:ze,alternatesTruncated:tt}}function Bg(e){let t=String(e||"").split(" | ").filter(Boolean);return t.length>0&&t.every(n=>n.startsWith("entailed:"))}function v_(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();Ps(u.predicate)?t.push([u.subject,u.object]):fo(u.predicate)?(n.has(u.subject)||n.set(u.subject,new Set),n.get(u.subject).add(u.object)):po(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)):tr(u.predicate)?o.set(u.subject,u.object):ti(u.predicate)?r.set(u.subject,u.object):Iu.has(d)||(i.has(u.subject)||i.set(u.subject,[]),i.get(u.subject).push([V(u.predicate),u.object]))}let a=zn(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:V(d),target:f}:null};return u=>{if(Ps(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(fo(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 h of n.get(p)||[])if(h===d.target||l(h,d.target))return!0}}return!1}if(po(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 Wg(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 h=String(p.predicate||"").trim().toLowerCase();Ps(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)):fo(p.predicate)?(o.has(p.subject)||o.set(p.subject,new Set),o.get(p.subject).add(p.object)):po(p.predicate)?(r.add(`${p.subject}${Ne}${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)):tr(p.predicate)?a.set(p.subject,p.object):ti(p.predicate)?l.set(p.subject,p.object):Iu.has(h)||(c.has(p.subject)||c.set(p.subject,[]),c.get(p.subject).push([p.predicate,p.object]))}let u=zn(n),d=p=>s.get(p)||new Set,f=p=>{let h=a.get(p),m=l.get(p);return h&&m?{property:h,propertyKey:V(h),target:m}:null};return(p,{maxEnvironments:h=ja}={})=>{let m=[],b=new Set,g=y=>{if(m.length>=h||p.id&&y.includes(p.id)||!y.every(v=>t.has(v)))return;let w=[...y].sort().join(" ");b.has(w)||(b.add(w),m.push(y))};if(Ps(p.predicate)){for(let y of[...d(p.subject)].sort()){if(m.length>=h)break;y===p.subject||y===p.object||d(y).has(p.object)&&g([ge(p.subject,Ue,y),ge(y,Ue,p.object)])}if(m.length<h){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)&&g([ge(p.subject,Fn,y.property),ge(p.subject,Dn,y.target),ge(p.object,Fn,w.property),ge(p.object,Dn,w.target),ge(y.target,Ue,w.target)])}return m}if(fo(p.predicate)){for(let w of[...o.get(p.subject)||[]].sort()){if(m.length>=h)break;w!==p.object&&d(w).has(p.object)&&g([ge(p.subject,Ft,w),ge(w,Ue,p.object)])}let y=f(p.object);if(y){let w=[...c.get(p.subject)||[]].filter(([v])=>V(v)===y.propertyKey).sort((v,k)=>v[0].localeCompare(k[0])||v[1].localeCompare(k[1]));for(let[v,k]of w){if(m.length>=h)break;for(let $ of[...o.get(k)||[]].sort()){if(m.length>=h)break;$!==y.target&&!d($).has(y.target)||g([ge(p.subject,v,k),ge(k,Ft,$),ge(p.object,Fn,y.propertyKey),ge(p.object,Dn,y.target),...$!==y.target?[ge($,Ue,y.target)]:[]])}}}return m}if(po(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(m.length>=h)break;let k=r.has(`${v}${Ne}${p.object}`),[$,x]=k?[v,p.object]:[p.object,v];g([ge(p.subject,Ft,w),ge($,er,x),...v!==w?[ge(w,Ue,v)]:[]])}return m}return m}}function x_(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 Gg(e,t,n){let s;for(let i of String(e||"").split(" | ")){let a=E_.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 S_(e,t,n,{budget:s=50,depth:o=32,maxEnvironments:r=ja,store:i,sourceTags:a=[],predicate:l=Ue}={}){let{loadMemory:c,readFactRows:u,removeFacts:d}=Ag(i,["loadMemory","readFactRows","removeFacts"],"retractSubClassOf"),f=typeof i?.appendFacts=="function"?i.appendFacts:null,p=typeof i?.factRecordIdForTag=="function"?i.factRecordIdForTag:null,h=(a||[]).filter(Boolean);if(h.length&&!p)throw new TypeError("retractSubClassOf needs a store option carrying factRecordIdForTag (memory/core.mjs's) to scope a retraction to sourceTags");let m=V(t),b=V(n),g=ge(m,l,b),y=await c(e),w=u(y),v=new Map(w.map(U=>[U.id,U]));if(!v.has(g))return{retracted:[],count:0,budget:s,depth:o,truncated:!1,found:!1};let k=v.get(g).sourceIds||[],$=h.map(U=>p(g,U).slice(g.length+1)),x=h.length?k.filter(U=>$.includes(U)):[],E=!h.length||x.length>0;if(h.length&&!E)return{retracted:[],count:0,budget:s,depth:o,truncated:!1,found:!0,ownRecord:!1,stillStands:!0};let S=h.length>0&&x.length<k.length,_=new Set([g]),R=[g],I=new Map,P=!1;if(!S){let U=w.filter(D=>ei(D).length&&Bg(D.provenance)),K=new Map;for(let D of U)for(let B of ei(D))for(let W of B)K.has(W)||K.set(W,new Set),K.get(W).add(D.id);let ce=0,ie=[g];for(;ce<o;ce+=1){let D=new Set;for(let z of ie)for(let H of K.get(z)||[])_.has(H)||D.add(H);let B=[...D].map(z=>v.get(z)).sort((z,H)=>z.subject.localeCompare(H.subject)||z.predicate.localeCompare(H.predicate)||z.object.localeCompare(H.object));if(!B.length)break;let W=w.filter(z=>!_.has(z.id)&&!D.has(z.id)),A=new Set(W.map(z=>z.id)),L=Wg(W),O=v_(W),N=!1,M=!1;ie=[];for(let z of B){if(_.size>=s){M=!0;break}let H=ei(z),Q=H.filter(te=>te.every(ee=>A.has(ee)));if(Q.length){Q.length!==H.length&&I.set(z.id,Q);continue}let ae=L(z,{maxEnvironments:r});if(ae.length){I.set(z.id,ae);continue}O(z)||(_.add(z.id),R.push(z.id),ie.push(z.id),N=!0)}if(M){P=!0;break}if(!N)break}!P&&ce>=o&&(P=U.some(D=>!_.has(D.id)&&D.justification.some(B=>_.has(B))))}let T=h.length?[...x.map(U=>`${g}@${U}`),...R.slice(1)]:R,{removed:F}=await d(e,T);if(f){let U=[...I.entries()].filter(([K])=>!_.has(K)).sort((K,ce)=>K[0].localeCompare(ce[0])).map(([K,ce])=>{let ie=v.get(K);return{subject:ie.subject,predicate:ie.predicate,object:ie.object,justification:ce,...Gg(ie.provenance,ce,D=>v.get(D)?.trust)||{}}});U.length&&await f(e,U)}return{retracted:F,count:F.length,budget:s,depth:o,truncated:P,found:!0,...h.length?{ownRecord:!0,stillStands:S}:{}}}function Ra(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 Nu(e,t,n,s,{maxHops:o=6}={}){let r=t instanceof Set?t:new Set(t||[]),i=s instanceof Map?s:Ra(s),a=[];for(let[c,u]of n||[])c===e&&u&&a.push({node:u,path:[{subject:c,predicate:Ft,object:u}]});for(let c of i.get(e)||[])a.push({node:c,path:[{subject:e,predicate:Ue,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:Ue,object:p}]})}a=u}return null}var Ue,Ig,Cg,Ft,Og,Lg,er,ku,ju,Ru,Fn,Dn,_u,Tu,Au,ja,Ne,Ps,fo,po,tr,ti,l_,Iu,p_,f_,Cu,Ou,Lu,m_,b_,ei,E_,Xt=C(()=>{Ot();Ue="rdfs:subClassOf",Ig="subClassOf",Cg=`entailed:${Ig}`,Ft="rdf:type",Og="type",Lg=`entailed:${Og}`,er="owl:disjointWith",ku="disjointWith",ju=`entailed:${ku}`,Ru=.95,Fn="owl:onProperty",Dn="owl:someValuesFrom",_u="someValuesFrom",Tu=`entailed:${_u}`,Au=.95,ja=4,Ne="\u241F",Ps=e=>String(e||"").trim().toLowerCase()==="rdfs:subclassof",fo=e=>String(e||"").trim().toLowerCase()==="rdf:type",po=e=>String(e||"").trim().toLowerCase()==="owl:disjointwith",tr=e=>String(e||"").trim().toLowerCase()==="owl:onproperty",ti=e=>String(e||"").trim().toLowerCase()==="owl:somevaluesfrom",l_=e=>String(e||"").trim().toLowerCase()==="owl:onclass",Iu=new Set(["rdfs:subclassof","rdf:type","owl:disjointwith","owl:onproperty","owl:somevaluesfrom","owl:intersectionof"]);p_="has",f_={"owl:cardinality":"exactly","owl:mincardinality":"min","owl:maxcardinality":"max"};Cu="someValuesFromSubsumption",Ou=`entailed:${Cu}`,Lu=.95;m_=.95;b_=.95;ei=e=>e.environments||(Array.isArray(e.justification)&&e.justification.length?[e.justification]:[]);E_=new Map([[ju,Ru],[Tu,Au],[Ou,Lu]])});function rr(e){let t=String(e||""),n=Vg.get(t);return n||(t.startsWith(Pu)?nr+t.slice(Pu.length):t)}function qg(e){let t=String(e||""),n=k_.get(t);return n||(t.startsWith(nr)?Pu+t.slice(nr.length):null)}function Yg(e,t,n,s,o){let r=null;for(let i of e){if(i===t)return[];let a=Nu(i,new Set([t]),n,s,{maxHops:o});a&&(!r||a.length<r.length)&&(r=a)}return r}function Aa(e,t,n,{maxHops:s=3}={}){let o=or(e),r=or(t),i=Array.isArray(n)?n:[],{typeEdges:a,subClassSucc:l}=Kg(i),c=i.filter(g=>(g.predicate===Ta||g.predicate===sr)&&r.has(g.object)),u=[];for(let g of c){let y=g.predicate===sr?"negative":"positive";if(o.has(g.subject)){u.push({fact:g,polarity:y,hops:0,chain:null});continue}let w=Yg(o,g.subject,a,l,s);w&&w.length&&u.push({fact:g,polarity:y,hops:w.length,chain:w})}if(!u.length)return{verdict:"none",hops:0,positive:[],negative:[],chain:null,overrides:null,baseRate:Fu(o,r,i,{maxHops:s})};u.sort((g,y)=>g.hops-y.hops||(y.fact.trust||0)-(g.fact.trust||0));let d=u[0].hops,f=u.filter(g=>g.hops===d),p=f.filter(g=>g.polarity==="positive").map(g=>g.fact),h=f.filter(g=>g.polarity==="negative").map(g=>g.fact),m=h.length&&!p.length?"negative":"positive",b=u.find(g=>g.hops>d&&g.polarity!==m)||null;return{verdict:p.length&&h.length?"both":h.length?"no":"yes",hops:d,positive:p,negative:h,chain:u[0].chain,overrides:b?{fact:b.fact,chain:b.chain}:null,baseRate:null}}function Fu(e,t,n,{maxHops:s=3}={}){let o=or(e),r=or(t),i=Array.isArray(n)?n:[],a=i.filter(m=>m.predicate===Ue||m.predicate===Ft),l=a.filter(m=>o.has(m.subject)).map(m=>m.object);if(!l.length)return null;let c=l[0],u=[...new Set(a.filter(m=>m.object===c&&!o.has(m.subject)).map(m=>m.subject))],d=m=>{let b=i.find(g=>g.subject===m&&r.has(g.object)&&(g.predicate===Ta||g.predicate===sr));return b?{name:m,polarity:b.predicate===sr?"negative":"positive",fact:b}:{name:m,polarity:"unknown",fact:null}},f=u.map(d),{typeEdges:p,subClassSucc:h}=Kg(i);return{klass:c,kinds:u.length,positive:f.filter(m=>m.polarity==="positive"),negative:f.filter(m=>m.polarity==="negative"),unknown:f.filter(m=>m.polarity==="unknown"),chain:Yg(o,c,p,h,s)}}function Du(e,t,{exclude:n=[],maxHops:s=3}={}){let o=or(e),r=or(n),i=Array.isArray(t)?t:[],a=new Set,l=[];for(let c of i)c.predicate!==Ta||!o.has(c.object)||r.has(c.subject)||a.has(c.subject)||(a.add(c.subject),Aa(new Set([c.subject]),o,i,{maxHops:s}).verdict==="yes"&&l.push(c));return l.sort(j_)}var nr,Pu,_a,Vg,k_,Hg,Ta,sr,Mu,j_,or,Kg,Ia=C(()=>{Xt();nr="mgxneg:",Pu="mgx:",_a="mgxneg:subClassOf",Vg=new Map([[Ue,_a]]),k_=new Map([...Vg].map(([e,t])=>[t,e]));Hg=e=>String(e||"").startsWith(nr),Ta="mgx:capableOf",sr=rr(Ta),Mu=6,j_=(e,t)=>(t.trust||0)-(e.trust||0)||String(e.subject).localeCompare(String(t.subject)),or=e=>e instanceof Set?e:new Set(Array.isArray(e)?e:[e]),Kg=e=>{let t=e.filter(s=>s.predicate===Ft).map(s=>[s.subject,s.object]),n=e.filter(s=>s.predicate===Ue).map(s=>[s.subject,s.object]);return{typeEdges:t,subClassSucc:Ra(n)}}});function Ca(e){let t=String(e||"");return Bu.has(t)?zu:__.has(t)||T_.test(t)?ni:A_.has(t)?Xg:Uu}function I_(e){let t=e?.observedAt;if(t&&Number.isFinite(Date.parse(t)))return String(t);if(Zf.has(e?.sourceType)){for(let n of[e?.assertedAt,e?.createdAt])if(n&&Number.isFinite(Date.parse(n)))return String(n)}}function C_(e,t){let n=null;for(let s of e?.assertions||[]){let o=Date.parse(I_(s)??"");Number.isFinite(o)&&(n===null||(t?o<n:o>n))&&(n=o)}return n}function Wu(e,t){let n=t===Xg;if(!n&&t!==ni)return null;let s=(e||[]).map(r=>({row:r,at:C_(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 zu,ni,Xg,Uu,R_,Bu,__,T_,A_,Jg=C(()=>{Ia();ns();zu="merge",ni="latest-observation-wins",Xg="first-claim-wins",Uu="contradiction",R_=["mgx:hasA","mgx:capableOf","rdfs:subClassOf","rdf:type","owl:disjointWith","mgx:partOf","mgx:memberOf","mgx:collectionOf","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"],Bu=new Set(R_.flatMap(e=>[e,rr(e)])),__=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"]),T_=/^mgx:has-exit-([a-z]+)$/,A_=new Set(["mgx:playedBy"])});function ri(e){let t=String(e||""),n=t.indexOf(Oa);return n<0?"":t.slice(n+Oa.length)}function M_(e){let t=1,n=0;for(let s of e)t*=1-N_(s),n+=1;return n?P_(Math.min(1,1-t)):0}function nb(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 rb(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 ib(e,t="",n=""){let s=t,o=n;for(let r of e)s=sb(s,r.assertedAt),o=ob(o,r.assertedAt);return{earliest:s,latest:o}}function Hu({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?M_(l.map(u=>a(u))):void 0;return{id:e,label:n?.label||"",class:O_,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===ir?"rollupSourceIds":"rollupRecordIds",value:l.join(" ")},{prop:oi,key:"rollupCount",value:String(l.length)},{prop:Un,key:"rollupEarliest",value:r},{prop:Bn,key:"rollupLatest",value:i},...c===void 0?[]:[{prop:ar,key:"rollupPrior",value:String(c)}]]}}function ab({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(rb).slice(8);if(!i.length)return null;let{earliest:a,latest:l}=ib(i,kt(s,Un),kt(s,Bn));return{rollup:Hu({id:Gu(e,t),sourceKey:`rollup:${t}`,template:Ku(i[0].record||s),idsProp:ir,ids:[...Pa(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 cb({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(rb),r=o.slice(0,2),i=o.slice(2);if(!i.length)return null;let{earliest:a,latest:l}=ib(i,kt(s,Un),kt(s,Bn));return{rollup:Hu({id:Vu(e,t),sourceKey:t,template:Ku(i[0].record||s),idsProp:si,ids:[...L_(s),...i.map(u=>u.id)],earliest:a,latest:l}),absorbed:i.map(u=>u.id),rewire:r[r.length-1]?.id||""}}function Yu(e,t,{priorFor:n}={}){let s=e?.id||t?.id,o=Ms(s),r=o?ir:si,i=a=>qu(kt(a,r));return Hu({id:s,sourceKey:kt(e,"mgx:sourceId")||kt(t,"mgx:sourceId"),template:Ku(kt(e,"rdf:subject")?e:t),idsProp:r,ids:[...i(e),...i(t)],earliest:sb(kt(e,Un),kt(t,Un)),latest:ob(kt(e,Bn),kt(t,Bn)),priorFor:o?n:void 0})}function lb(e,t){if(!t)return!1;for(let n of e||[])if(Pa(n).includes(t))return!0;return!1}var O_,Qg,Zg,La,eb,ir,si,oi,Un,Bn,ar,Oa,tb,Gu,Vu,Ms,cr,Na,kt,qu,Pa,L_,N_,P_,sb,ob,Ku,Xu=C(()=>{O_="Fact",Qg=64,Zg=8,La=8,eb=2,ir="mgx:rollupSourceIds",si="mgx:rollupRecordIds",oi="mgx:rollupCount",Un="mgx:rollupEarliest",Bn="mgx:rollupLatest",ar="mgx:rollupPrior",Oa="@rollup:",tb="#rollup",Gu=(e,t)=>`${e}${Oa}${t}`,Vu=(e,t)=>`${e}@${t}${tb}`,Ms=e=>String(e||"").includes(Oa),cr=e=>String(e||"").endsWith(tb),Na=e=>Ms(e)||cr(e);kt=(e,t)=>(e?.attributes||[]).find(n=>n?.prop===t)?.value||"",qu=e=>String(e||"").split(" ").filter(Boolean),Pa=e=>qu(kt(e,ir)),L_=e=>qu(kt(e,si)),N_=e=>Math.max(0,Math.min(1,Number(e)||0)),P_=e=>Number(e.toFixed(6));sb=(e,t)=>nb(e,t,Math.min),ob=(e,t)=>nb(e,t,Math.max);Ku=e=>({label:e?.label||"",subject:kt(e,"rdf:subject"),predicate:kt(e,"rdf:predicate"),object:kt(e,"rdf:object")})});function ed(e){let t=String(e||"");return Zu(t)?t.slice(0,-za.length):""}function ub(e,t){let n=Date.parse(e),s=Date.parse(t);return Number.isFinite(n)?Number.isFinite(s)&&s>n?String(t):String(e):Number.isFinite(s)?String(t):""}function td({id:e,sourceId:t,template:n,ids:s,retractedAt:o,tags:r}){let i=[...new Set(s)].filter(Boolean).sort(),a=[...new Set(r)].filter(Boolean).sort();return{id:e,label:n?.label||"",class:rn,derived_from:[],mentions:[],attributes:[{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:sourceId",key:"sourceId",value:t||""},{prop:Fa,key:"retractedRecordIds",value:i.join(" ")},{prop:Ju,key:"retractedCount",value:String(i.length)},{prop:Da,key:"retractedAt",value:o||""},...a.length?[{prop:ii,key:"provenance",value:a.join(" | ")}]:[]]}}function pb({groupId:e,sourceId:t,recordIds:n=[],retractedAt:s="",existing:o=null,template:r=null,provenance:i=""}){if(!e||!t)return null;let a=[...ho(o),...n].filter(Boolean);return a.length?td({id:Qu(e,t),sourceId:t,template:r||db(o),ids:a,retractedAt:ub(mo(o),s),tags:[...ai(hn(o,ii)),...ai(i)]}):null}function fb(e,t){let n=db(hn(e,"rdf:subject")?e:t);return td({id:e?.id||t?.id,sourceId:hn(e,"mgx:sourceId")||hn(t,"mgx:sourceId"),template:n,ids:[...ho(e),...ho(t)],retractedAt:ub(mo(e),mo(t)),tags:[...ai(hn(e,ii)),...ai(hn(t,ii))]})}function D_(e,t){let n=Date.parse(e),s=Date.parse(t);return!Number.isFinite(s)||!Number.isFinite(n)?!0:n<=s}function z_(e,t,n=""){return!e||!t||!ho(e).includes(t)?!1:D_(n,mo(e))}function Ua(e,t,n=""){for(let s of e||[])if(z_(s,t,n))return!0;return!1}function U_(e,t){let n=[...new Set(t||[])].filter(Boolean).sort();return[e||"-",...n].join(" ")}function B_(e){let t=String(e||"").split(" ").filter(Boolean),n=t[0]||"",s=n==="-"||!Number.isFinite(Date.parse(n))?"":n,o=s||n==="-"?t.slice(1):t;return{retractedAt:s,ids:o}}function Ba(e){let t=ed(e?.id);return t?{id:e.id,subject:t,predicate:Ma,object:U_(mo(e),ho(e)),provenance:hn(e,ii)}:null}function Wa(e){if(!e||e.predicate!==Ma)return null;let t=String(e.subject||""),n=t.indexOf("@");if(n<=0||n===t.length-1)return null;let{retractedAt:s,ids:o}=B_(e.object);return o.length?td({id:`${t}${za}`,sourceId:t.slice(n+1),template:null,ids:o,retractedAt:s,tags:ai(e.provenance)}):null}var rn,Ma,Fa,Da,Ju,za,ii,Qu,Zu,hn,F_,ai,ho,mo,db,nd=C(()=>{rn="Retraction",Ma="mgx:retracted",Fa="mgx:retractedRecordIds",Da="mgx:retractedAt",Ju="mgx:retractedCount",za="#retracted",ii="mgx:factProvenance",Qu=(e,t)=>`${e}@${t}${za}`,Zu=e=>String(e||"").endsWith(za);hn=(e,t)=>(e?.attributes||[]).find(n=>n?.prop===t)?.value||"",F_=e=>String(e||"").split(" ").filter(Boolean),ai=e=>String(e||"").split(" | ").filter(Boolean),ho=e=>F_(hn(e,Fa)),mo=e=>hn(e,Da);db=e=>({label:e?.label||"",subject:hn(e,"rdf:subject"),predicate:hn(e,"rdf:predicate"),object:hn(e,"rdf:object")})});var W_,G_,V_,q_,sd,yM,hb=C(()=>{ns();W_="mgx:worldName",G_="mgx:nodeName",V_="mgx:playedBy",q_="mgx:waved",sd="mgx:invitedBy",yM=Object.freeze([W_,G_,V_,q_,sd])});function Ga(e){let t=new Set;for(let n of e||[])n?.predicate===sd&&(n.subject&&t.add(String(n.subject)),n.object&&t.add(String(n.object)));return[...t].sort()}function od(e,t=""){let n=String(t||"");return(e||[]).map(String).filter(s=>s&&s!==n)}function Va({recordIds:e=[],roster:t=[],self:n="",acknowledgedBy:s=null}={}){let o=od(t,n);if(!o.length)return[];if(typeof s!="function")return[];let r=new Map;for(let a of o){let l=s(a);r.set(a,new Set([...l||[]].map(String)))}return[...new Set((e||[]).map(String).filter(Boolean))].sort().filter(a=>o.every(l=>r.get(l).has(a)))}var rd=C(()=>{hb()});function gs(e,t){let n=(e?.attributes||[]).find(s=>s?.prop===t);return n?String(n.value??""):void 0}function Q_(e,t){(!e?.class||!H_.has(e.class))&&t.push(`must have a class from the closed vocabulary Utterance | Fact | Session | Source | Rule (got ${JSON.stringify(e?.class)})`)}function Z_(e,t){for(let i of["rdf:subject","rdf:predicate","rdf:object"])ci(gs(e,i))||t.push(`a Fact needs a non-empty ${i}`);for(let i of["rdf:subject","rdf:object"]){let a=gs(e,i);a!==void 0&&Y_.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=gs(e,"mgx:factProvenance");n!==void 0&&!ci(n)&&t.push("mgx:factProvenance, when present, must be non-empty");let s=typeof e?.id=="string"?e.id:"";X_(s)&&!gb.test(s)&&t.push(`a Fact record id must read <groupId>@<sourceId>, optionally suffixed #v<n> once superseded (got ${JSON.stringify(s)})`);let o=gs(e,"mgx:sourceId");o!==void 0&&!ci(o)&&t.push("mgx:sourceId, when present, must be non-empty (every assertion record has a key, src:none included)");let r=gs(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 J_){let a=gs(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)gb.test(c)||t.push(`${i} must name Fact record ids (got ${JSON.stringify(c)})`)}}function eT(e,t){ci(gs(e,"mgx:ruleName"))||t.push("a Rule needs a non-empty mgx:ruleName");let n=gs(e,"mgx:ruleKind");if(!n||!mb.has(n)){t.push(`a Rule's mgx:ruleKind must be one of ${[...mb].join(" | ")} (got ${JSON.stringify(n)})`);return}for(let s of K_[n])ci(gs(e,s))||t.push(`a ${n} Rule needs a non-empty ${s}`)}function tT(e){let t=[];return Q_(e,t),e?.class==="Fact"&&Z_(e,t),e?.class==="Rule"&&eT(e,t),{ok:t.length===0,violations:t}}function id(e){let t=tT(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 H_,mb,K_,Y_,gb,X_,J_,ci,bb=C(()=>{H_=new Set(["Utterance","Fact","Session","Source","Rule"]),mb=new Set(["compose2","filter","recursive","action-signature","action-precond","action-effect","action-constraint"]),K_={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"]},Y_=/[.!?]\s+\w/,gb=/^[^@]+@(.+?)(#v[1-9][0-9]*)?$/,X_=e=>e.includes("@")||/#v\d/.test(e),J_=["mgx:supersedes","mgx:supersededBy"];ci=e=>typeof e=="string"&&e.trim().length>0});var wb={};Gt(wb,{access:()=>oT,appendFile:()=>aT,basename:()=>ET,copyFile:()=>hT,createInterface:()=>_T,createReadStream:()=>gT,createRequire:()=>nT,createWriteStream:()=>bT,default:()=>AT,dirname:()=>$T,existsSync:()=>wT,fileURLToPath:()=>kT,isAbsolute:()=>xT,join:()=>yT,mkdir:()=>cT,mkdtemp:()=>lT,randomBytes:()=>jT,readFile:()=>rT,readFileSync:()=>sT,readdir:()=>mT,rename:()=>uT,resolve:()=>vT,rm:()=>pT,sep:()=>ST,spawnSync:()=>RT,stat:()=>fT,tmpdir:()=>TT,unlink:()=>dT,writeFile:()=>iT});var pt,nT,sT,oT,rT,iT,aT,cT,lT,uT,dT,pT,fT,hT,mT,gT,bT,wT,yT,$T,vT,xT,ET,ST,kT,jT,RT,_T,TT,AT,yb=C(()=>{pt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},nT=pt("createRequire"),sT=pt("readFileSync"),oT=pt("access"),rT=pt("readFile"),iT=pt("writeFile"),aT=pt("appendFile"),cT=pt("mkdir"),lT=pt("mkdtemp"),uT=pt("rename"),dT=pt("unlink"),pT=pt("rm"),fT=pt("stat"),hT=pt("copyFile"),mT=pt("readdir"),gT=pt("createReadStream"),bT=pt("createWriteStream"),wT=()=>!1,yT=(...e)=>e.join("/"),$T=e=>String(e).replace(/\/[^/]*$/,""),vT=(...e)=>e.join("/"),xT=e=>String(e).startsWith("/"),ET=e=>String(e).split("/").pop(),ST="/",kT=e=>String(e),jT=pt("randomBytes"),RT=pt("spawnSync"),_T=pt("createInterface"),TT=()=>"/tmp",AT={}});var IT,li,ad=C(()=>{IT=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i,li=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(IT);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 CT(e,t){let n=e.slice(0,t).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function OT(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
87
|
`))}return o}var me,go=C(()=>{me=class extends Error{line;column;codeblock;constructor(t,n){let[s,o]=CT(n.toml,n.ptr),r=OT(n.toml,s,o);super(`Invalid TOML document: ${t}
|
|
88
88
|
|
|
@@ -104,7 +104,7 @@ ${r}`,n),this.line=s,this.column=o,this.codeblock=r}}});function qa(e,t){let n=e
|
|
|
104
104
|
`&&r!=="\r"){let i=ui(e,t-1,"]",n-1,s);o.push(i[0]),t=i[1]}}if(!r)throw new me("unfinished array encountered",{toml:e,ptr:t});return[o,t]}var FT,ud=C(()=>{cd();ld();Ka();go();FT=/^[a-zA-Z0-9-_]+[ \t]*$/});function Sb(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 bo(e,{maxDepth:t=1e3,integersAsBigInt:n}={}){let s={},o={},r=s,i=o;for(let a=Wn(e,0);a<e.length;){if(e[a]==="["){let l=e[++a]==="[",c=Ya(e,a+=+l,"]");if(l){if(e[c[1]-1]!=="]")throw new me("expected end of table declaration",{toml:e,ptr:c[1]-1});c[1]++}let u=Sb(c[0],s,o,l?2:1);if(!u)throw new me("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=Ya(e,a),c=Sb(l[0],r,i,0);if(!c)throw new me("trying to redefine an already defined table or value",{toml:e,ptr:a});let u=ui(e,l[1],void 0,t,n);c[1][c[0]]=u[0],a=u[1]}if(a=Wn(e,a,!0),e[a]&&e[a]!==`
|
|
105
105
|
`&&e[a]!=="\r")throw new me("each key-value declaration must be followed by an end-of-line",{toml:e,ptr:a});a=Wn(e,a)}return s}var kb=C(()=>{ud();ld();Ka();go();});var jb=C(()=>{});var Xa=C(()=>{kb();jb();ad();go();});var Tb={};Gt(Tb,{CONFIG_FILE:()=>Qa,loadTomlConfig:()=>Za,mergeEffective:()=>_b,normalizeConfig:()=>Rb});async function Za(e,{file:t}={}){let n=t||Z(e,Qa),s;try{s=await Re(n,"utf8")}catch(o){if(o&&o.code==="ENOENT")return null;throw o}try{return bo(s)}catch(o){throw new Error(`Invalid ${Qa} at ${n}: ${o&&o.message?o.message:o}`)}}async function DT(e,t){let n;if(Array.isArray(e))n=e;else{let o=Pt(t,String(e));n=(await Re(o,"utf8")).split(`
|
|
106
106
|
`)}let s=[];for(let o of n){let r=String(o).trim();!r||r.startsWith("#")||s.push(Pt(t,r))}return s}async function Rb(e,{configDir:t}={}){let n=e||{},s=t||process.cwd(),o={};if(n.repositories!==void 0&&(o.repositories=await DT(n.repositories,s)),n.out_root!==void 0&&(o.outRoot=Pt(s,String(n.out_root))),n.graph_file!==void 0&&(o.graphFile=Pt(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=>Pt(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),n.recognition!==void 0&&(o.recognition=n.recognition);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||{},h={};p.strategy!==void 0&&(h.strategy=p.strategy),p.nodes!==void 0&&(h.nodes=p.nodes),p.q!==void 0&&(h.q=p.q),p.depth!==void 0&&(h.depth=p.depth),Object.keys(h).length&&(f.expansion=h),Object.keys(f).length&&(o.tune=f);let m=n.telemetry||{};m.enabled!==void 0&&(o.telemetry={enabled:m.enabled});let b=n.memory||{},g={};b.retention_versions!==void 0&&(g.retentionVersions=b.retention_versions),b.backend!==void 0&&(g.backend=b.backend),Object.keys(g).length&&(o.memory=g);let y=[];for(let[w,v]of zT)n[w]&&n[w][v]!==void 0&&y.push(`${w}.${v}`);return o.unwired=y,o}function Ja(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:Ja(o,r,n)}return n}function _b({args:e={},toml:t=null,defaults:n={}}={}){let s=Ja(n),o=null;if(t){let{unwired:u,...d}=t;o=d}let r=o?Ja(o):{},i=Ja(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 Qa,zT,ec=C(()=>{_t();We();Xa();Qa="tmct.toml";zT=[["index","include_text"],["index","include_structure"],["index","respect_gitignore"],["index","markdown_sections"],["index","vue"]]});var Us={};Gt(Us,{CANONICALISED_FROM_PROP:()=>Sd,CAPABLE_OF_PREDICATE:()=>XA,CHAIN_KEEP_DEPTH:()=>eb,CHAIN_ROLLUP_THRESHOLD:()=>La,CREATED_AT_PROP:()=>Ze,DEFAULT_RETENTION:()=>gd,FACT_CLASS:()=>ft,GROUP_ROLLUP_THRESHOLD:()=>Qg,HAS_A_PREDICATE:()=>gr,IN_REPLY_TO_PROP:()=>Ed,MEMORY_DIR_REL:()=>dr,MEMORY_GRAPH_REL:()=>yd,MEMORY_MANIFEST_REL:()=>Jb,MEMORY_SESSION_CLASS:()=>vd,MULTI_VALUED_PREDICATES:()=>JA,NODE_ID_REL:()=>Td,OPERATOR_SOURCE_ID:()=>tc,RETRACTED_AT_PROP:()=>Da,RETRACTED_COUNT_PROP:()=>Ju,RETRACTED_RECORD_IDS_PROP:()=>Fa,RETRACTION_CLASS:()=>rn,RETRACTION_PREDICATE:()=>Ma,ROLLUP_COUNT_PROP:()=>oi,ROLLUP_EARLIEST_PROP:()=>Un,ROLLUP_KEEP_PER_TYPE:()=>Zg,ROLLUP_LATEST_PROP:()=>Bn,ROLLUP_PRIOR_PROP:()=>ar,ROLLUP_RECORD_IDS_PROP:()=>si,ROLLUP_SOURCE_IDS_PROP:()=>ir,RULE_CLASS:()=>fr,RULE_KIND_ACTION_CONSTRAINT:()=>Pd,RULE_KIND_ACTION_EFFECT:()=>yi,RULE_KIND_ACTION_PRECOND:()=>ac,RULE_KIND_ACTION_SIGNATURE:()=>Nd,RULE_KIND_COMPOSE2:()=>bi,RULE_KIND_FILTER:()=>wi,RULE_KIND_PROP:()=>mr,RULE_KIND_RECURSIVE:()=>Ld,SAID_IN_SESSION_PROP:()=>xd,SOURCE_CLASS:()=>pr,SOURCE_RELIABILITY_PROP:()=>Ob,STATED_BY_PROP:()=>mn,SYLLOGISE_STATE_REL:()=>_d,UPDATED_AT_PROP:()=>Rs,UTTERANCE_CLASS:()=>$d,admittedNodes:()=>Ga,appendCanonicalisedFromEdges:()=>OA,appendFact:()=>MA,appendFacts:()=>Hn,appendRetractions:()=>qA,appendRule:()=>lc,appendUtterance:()=>CA,appendUtterances:()=>ow,applySeedPayload:()=>Pb,attachFactHeads:()=>Gb,chainRollupIdFor:()=>Vu,cloneMemoryPayload:()=>Mb,closeSqliteMemoryStore:()=>Kb,createInMemoryStore:()=>mi,createSqliteMemoryStore:()=>Hb,emptyMemory:()=>hi,factGroupId:()=>Dt,factHeadsOf:()=>Vb,factIdForTriple:()=>ge,factRecordIdForTag:()=>VT,factRecordIdsFor:()=>yo,findContradictions:()=>pw,findRuleByName:()=>Md,findRulesByName:()=>BA,headRollupIdFor:()=>Gu,isChainRollupId:()=>cr,isHeadRollupId:()=>Ms,isMemoryOrSqliteHandle:()=>jd,isRetractionId:()=>Zu,isRollupId:()=>Na,loadMemory:()=>at,loadNodeId:()=>$A,loadSyllogiseState:()=>wA,normFactPredicate:()=>hs,normFactTerm:()=>V,openConfiguredMemoryBackend:()=>zs,openExistingMemoryBackend:()=>nA,openMemoryBackend:()=>Rd,peersToConvince:()=>od,provSourceClassFor:()=>EA,provenanceTagToSource:()=>ts,readFactRows:()=>ht,readObjectSupersessions:()=>ZT,readOnlyMemorySnapshot:()=>sA,readRetractions:()=>VA,readRuleRows:()=>Fd,removeFacts:()=>GA,resolveMemoryGraphFile:()=>di,resolveRelationChase:()=>Dd,resolveRelationChaseReverse:()=>dw,retirableRetractions:()=>HA,retireRetractions:()=>KA,retractedAtOf:()=>mo,retractedRecordIds:()=>ho,retractionFromWire:()=>Wa,retractionIdFor:()=>Qu,retractionScopeOf:()=>ed,retractionWireFact:()=>Ba,saveNodeId:()=>vA,saveSyllogiseState:()=>yA,snapshotMemory:()=>fA,stableRecordIds:()=>Va});function hi(){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:WT.map(e=>({...e})),classes:[],objectProperties:[],individuals:[],proseIndex:{}}}function di(e,t=null){if(Ds(e)||Vn(e))throw new Error("resolveMemoryGraphFile: dir is a memory/sqlite handle, not a file path (Backend A only)");return t===null?Z(e,yd):Z(e,dr,`graph.v${t}.json`)}function Ds(e){return!!e&&typeof e=="object"&&e.backend===kd}function Vn(e){return!!e&&typeof e=="object"&&e.backend===Nb}function jd(e){return Ds(e)||Vn(e)}function mi(){return{backend:kd,payload:hi()}}function Pb(e,t){t&&(e.payload={...e.payload,...t})}function Mb(e){if(!e)return null;try{return structuredClone(e)}catch{return JSON.parse(JSON.stringify(e))}}function Fb(e){for(let t of String(e||"").split(" | ")){if(!t)continue;let n=Id(ts(t));if(n)return n}return{id:bs,type:""}}function Dt(e){let t=String(e||""),n=t.indexOf("@");return n<0?t:t.slice(0,n)}function VT(e,t){return`${e}@${Db(t).id}`}function Db(e){return Id(ts(e))||{id:bs,type:""}}function zb(e){let t=new Map;for(let n of String(e||"").split(" | ")){let s=n.trim();if(!s)continue;let{id:o,type:r}=Db(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(bs,{sourceId:bs,sourceType:"",tags:[]}),[...t.values()]}function hd(e,t=Math.max){let n="",s=null;for(let o of e||[]){let r=ts(o)?.createdAt||"",i=Date.parse(r);Number.isFinite(i)&&(s===null||t(i,s)===i)&&(n=r,s=i)}return n}function hr(e,t="",n=Math.max){return hd(e,n)||(Number.isFinite(Date.parse(t))?String(t):"")}function qT(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 Ub(e,t){let n=i=>(e.attributes||[]).find(a=>a?.prop===i)?.value||"",s=Fb(n("mgx:factProvenance")),o=n(gi).split(" ").filter(Boolean)[0]||null,r=ri(e.id);return[e.id,Dt(e.id),n("rdf:subject"),n("rdf:predicate"),n("rdf:object"),n(wo)||s.id,r||s.type,Number(n(r?ar:Do))||0,n(Ze),n(pi)||null,o,t]}function HT(e){if(e.prepare("SELECT id FROM facts LIMIT 1").get()||!e.prepare("SELECT id FROM individuals WHERE class = ? LIMIT 1").get(ft))return;let t=e.prepare(Bb);e.exec("BEGIN IMMEDIATE");try{for(let n of e.prepare("SELECT json FROM individuals WHERE class = ?").all(ft))t.run(...Ub(JSON.parse(n.json),n.json));e.exec("COMMIT")}catch(n){throw e.exec("ROLLBACK"),n}}function KT(e){return(e||[]).map(t=>({sourceId:t.sourceId||"",sourceType:t.sourceType||"",ownTrust:t.ownTrust,assertedAt:t.assertedAt||""}))}function Gb(e,t){return e&&t&&(e[Wb]=t),e}function XT(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 qb(e,t,n,s){let o=e.prepare(YT),r=e.prepare("DELETE FROM fact_heads WHERE triple_hash = ?"),i=ws();for(let a of n){let l=t.groups.get(a);if(!l?.length){r.run(a),s?.delete(a);continue}let c=KT(Ud(a,l,t).assertions),u=oh(c).score;o.run(a,u,JSON.stringify(c),i),s?.set(a,{trustBase:u,inputs:c})}}function JT(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(ft))return;let n=zd(Yb(e));t.exec("BEGIN IMMEDIATE");try{qb(t,n,n.groups.keys(),null),t.exec("COMMIT")}catch(s){throw t.exec("ROLLBACK"),s}}function QT(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=ws();for(let i of n){let[a,l]=i.split("\0");if(Ca(l)!==ni)continue;let c=t.groupsByPair.get(i)||[];if(c.length<2)continue;let u=c.map(p=>{let h=Ud(p,t.groups.get(p),t);return h.trust=qi(h.assertions).score,h});if(new Set(u.map(p=>p.object)).size<2)continue;let d=Wu(u,ni)?.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 ZT(e,{subject:t,predicate:n}={}){if(!Vn(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 tA(){if(Ib)return;Ib=!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 Hb(e){tA();let{DatabaseSync:t}=await Promise.resolve().then(()=>(yb(),wb)),n=new t(e);n.exec("PRAGMA journal_mode = WAL"),n.exec("PRAGMA synchronous = NORMAL"),n.exec(GT),HT(n);let s={backend:Nb,db:n,dbPath:e};return JT(s),s}function Kb(e){Vn(e)&&e.db.close()}async function Rd(e,t){if(t===kd)return{dir:mi(),close:async()=>{}};let n=Z(e,".tmct","memory","graph.sqlite"),s=r=>ll(r).then(()=>!0,()=>!1);!await s(n)&&await s(Z(e,yd))&&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 An(he(n),{recursive:!0});let o=await Hb(n);return{dir:o,close:async()=>Kb(o)}}async function nA(e,t=""){if(!e||typeof e!="string")return null;let n=Z(e,".tmct","memory","graph.sqlite");try{await ll(n)}catch{return null}return Rd(e,t)}async function sA(e){if(!e)return null;let t=mi();return Pb(t,Mb(await at(e))),t}async function zs(e,t=process.env){let n=String(t?.TMCT_MEMORY_BACKEND||"").trim().toLowerCase();if(!n)try{let{loadTomlConfig:s}=await Promise.resolve().then(()=>(ec(),Tb));n=String((await s(e))?.memory?.backend||"").trim().toLowerCase()}catch{n=""}return Rd(e,n)}function oA(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=Yb(e),e.cachedFactHeads=XT(e.db),e.cachedDataVersion=t),Gb(jn(e.cachedPayload),e.cachedFactHeads)}function Yb(e){let t=e.db,n=hi(),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 rA(e,t){let n=jn(t),s=e.individuals.findIndex(o=>o?.id===t.id);s>=0?e.individuals[s]=n:e.individuals.push(n)}function iA(e,t){e.individuals=e.individuals.filter(n=>t.has(n?.id))}function aA(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 cA(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,jn(Object.fromEntries(n.map(r=>[r,t[r]])))),e.examples.push(o)}function lA(e,t){e.examples=e.examples.filter(n=>t.has(`${n.subject}\0${n.object}`))}function uA(e,t){e.objectProperties=e.objectProperties.filter(n=>t.has(n?.prop))}function dA(e,t){let n=e.db,s=hi(),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=jn(t.generated_at??s.generated_at),o.memory=jn(t.memory??s.memory),o.prefixes=jn(t.prefixes??s.prefixes),o.vocabulary=jn(t.vocabulary??s.vocabulary),o.classes=jn(t.classes??s.classes),o.proseIndex=jn(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(Bb),d=new Set,f=new Set,p=new Set;for(let S of t.individuals||[]){d.add(S.id);let _=JSON.stringify(S),R=i.get(S.id);if(R&&R.json===_)continue;let I=R?R.ord:l++;c.run(S.id,I,S.class??null,S.label??null,_),S.class===ft&&(u.run(...Ub(S,_)),f.add(Dt(S.id)),p.add(md(fi(S,"subject"),fi(S,"predicate")))),o&&rA(o,S)}let h=n.prepare("DELETE FROM individuals WHERE id = ?"),m=n.prepare("DELETE FROM facts WHERE id = ?"),b=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 _=b.get(S.id);_&&(f.add(_.triple_hash),p.add(md(_.subject,_.predicate))),h.run(S.id),m.run(S.id)}o&&iA(o,d);let g=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 (?, ?, ?, ?)"),k=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 _=k.all(S.prop),R=new Map(_.map(U=>[`${U.subject}\0${U.object}`,U])),I=new Set,P=o?aA(o,S.prop):null;for(let U of S.examples||[]){let K=`${U.subject}\0${U.object}`;I.add(K);let ce=Object.keys(U).filter(W=>!eA.has(W)),ie=ce.length?JSON.stringify(Object.fromEntries(ce.map(W=>[W,U[W]]))):null,D=R.get(K);D&&(D.subject_label??null)===(U.subjectLabel??null)&&(D.object_label??null)===(U.objectLabel??null)&&(D.extra??null)===(ie??null)||($.run(S.prop,U.subject,U.object,U.subjectLabel??null,U.objectLabel??null,ie),P&&cA(P,U,ce))}for(let U of R.keys()){if(I.has(U))continue;let[K,ce]=U.split("\0");x.run(S.prop,K,ce)}P&&lA(P,I);let T=Number.isFinite(S.count)?S.count:(S.examples||[]).length,F=g.get(S.prop)?.ord??w++;v.run(S.prop,F,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&&uA(o,E),f.size){let S=zd(t);qb(n,S,f,e.cachedFactHeads),QT(n,S,p)}n.exec("COMMIT")}catch(r){throw n.exec("ROLLBACK"),e.cachedPayload=void 0,e.cachedFactHeads=void 0,r}}async function Xb(e,t){let n=`${e}.tmp-${process.pid}-${Math.random().toString(36).slice(2,10)}`;await _r(n,t),await Mi(n,e)}async function oc(e,t){await Xb(e,JSON.stringify(t))}async function fA(e,{retentionVersions:t}={}){if(jd(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=di(e),s;try{s=await Re(n,"utf8")}catch(u){if(u?.code==="ENOENT")return{skipped:!0,version:null,prunedVersion:null};throw u}let o=pA(e),r;try{r=JSON.parse(await Re(o,"utf8"))}catch(u){if(u?.code!=="ENOENT")throw u;r={version:0,retentionVersions:t??gd}}Number.isInteger(r.version)||(r.version=0),Number.isInteger(r.retentionVersions)||(r.retentionVersions=t??gd);let i=r.version,a=di(e,i);await An(he(a),{recursive:!0}),await Xb(a,s),r.version=i+1;let l=null,c=i-r.retentionVersions;if(c>=0)try{await ul(di(e,c)),l=c}catch(u){if(u?.code!=="ENOENT")throw u}return await oc(o,r),{skipped:!1,version:i,prunedVersion:l}}async function at(e){if(Ds(e))return dd(e.payload);if(Vn(e))return dd(oA(e));let t;try{t=await Re(fd(e),"utf8")}catch(n){if(n?.code==="ENOENT")return hi();throw n}return dd(JSON.parse(t))}function mA(e){if(!Array.isArray(e?.individuals))return e;let t=new Map;for(let s of e.individuals){if(s?.class!==ft||!hA.test(s.id||""))continue;let o=i=>(s.attributes||[]).find(a=>a?.key===i)?.value||"",r=Zo(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 gA(e){if(!Array.isArray(e?.individuals))return e;let t=(e.objectProperties||[]).find(l=>l?.prop===mn),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!==ft||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=Zo(u,d,f),h=c(Ze),m=c("mgx:factProvenance"),b=n.get(l.id)||[],g=m?zb(m):[];for(let w of b)g.some(v=>v.sourceId===w.object)||g.push({sourceId:w.object,sourceType:"",tags:[]});g.length||g.push({sourceId:bs,sourceType:"",tags:[]});let y=[];for(let w of g){let v={id:`${p}@${w.sourceId}`,label:l.label,class:ft,derived_from:jn(l.derived_from)||[],mentions:jn(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:Ze,key:"createdAt",value:hr(w.tags,h,Math.min)||h||ws()},{prop:wo,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!==bs){let k=b.find($=>$?.object===w.sourceId);i.push({...k||{},subject:v.id,object:w.sourceId,subjectLabel:v.label,objectLabel:Cd(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:mn,count:i.length,examples:i}));for(let l of e.objectProperties||[]){if(l?.prop===mn||!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 h of f)c.push({...u,subject:p,object:h})}l.examples=c,l.count=c.length}e.individuals=a,ew(e);for(let l of r)ur(e,l);return qn(e),e}async function bA(e,t){if(Ds(e)){e.payload=t;return}if(Vn(e)){dA(e,t);return}await An(he(fd(e)),{recursive:!0}),await oc(fd(e),t)}async function wA(e){if(Ds(e))return e.syllogiseState?structuredClone(e.syllogiseState):null;if(Vn(e)){let t=e.db.prepare("SELECT v FROM meta WHERE k = ?").get(Qb);return t?.v?JSON.parse(t.v):null}try{return JSON.parse(await Re(Z(e,_d),"utf8"))}catch(t){if(t?.code==="ENOENT")return null;throw t}}async function yA(e,t){if(Ds(e)){e.syllogiseState=structuredClone(t);return}if(Vn(e)){e.db.prepare("INSERT OR REPLACE INTO meta(k, v) VALUES (?, ?)").run(Qb,JSON.stringify(t));return}let n=Z(e,_d);await An(he(n),{recursive:!0}),await oc(n,t)}async function $A(e){if(Ds(e))return e.nodeId||null;if(Vn(e)){let t=e.db.prepare("SELECT v FROM meta WHERE k = ?").get(Zb);return t?.v&&JSON.parse(t.v).nodeId||null}try{return JSON.parse(await Re(Z(e,Td),"utf8")).nodeId||null}catch(t){if(t?.code==="ENOENT")return null;throw t}}async function vA(e,t){if(Ds(e)){e.nodeId=t;return}if(Vn(e)){e.db.prepare("INSERT OR REPLACE INTO meta(k, v) VALUES (?, ?)").run(Zb,JSON.stringify({nodeId:t}));return}let n=Z(e,Td);await An(he(n),{recursive:!0}),await oc(n,{nodeId:t})}function ew(e){let t=new Map,n=new Map,s=new Map,o=new Map,r=new Map;for(let a of e.individuals||[])if(a?.id&&(t.set(a.id,a),a.class===pr&&n.set(a.id,a),a.class===rn&&wd(r,a),a.class===ft)){let l=Dt(a.id),c=o.get(l);c?c.push(a.id):o.set(l,[a.id])}let i=(e.objectProperties||[]).find(a=>a?.prop===mn);for(let a of i?.examples||[]){if(!a?.subject)continue;let l=s.get(a.subject);l?l.push(a.object):s.set(a.subject,[a.object])}return e[bd]={individualsById:t,sourcesById:n,statedByBySubject:s,factRecordsByGroup:o,retractionsByGroup:r},e[bd]}function wd(e,t){let n=Dt(t.id),s=(e.get(n)||[]).filter(o=>o.id!==t.id);s.push(t),e.set(n,s)}function xA(e,t){let n=zt(e);return n?n.retractionsByGroup.get(t)||[]:(e?.individuals||[]).filter(s=>s?.class===rn&&Dt(s.id)===t)}async function $s(e,t){let n=await at(e);ew(n);let s=await t(n)??n;return RA(s),TA(s),s.proseIndex=qf(s.individuals),await bA(e,s),s}function Ad(e,t){return e?.attributes?.find(n=>n?.prop===Ze)?.value||t||ws()}function gn(e,t,n,s){e.attributes=(e.attributes||[]).filter(o=>o?.prop!==t),e.attributes.push({prop:t,key:n,value:s})}function Id(e){switch(e?.kind){case"operator":return{id:e.sessionId?`${tc}:${e.sessionId}`:tc,type:"operator"};case"teach":return{id:e.sessionId?`${pd}:${e.sessionId}`:pd,type:"teach"};case"teachNode":return{id:`${Lb}:${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:${Zr(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 EA(e){return $l[e]||null}function SA(e,t,n){let s=Id(t);if(!s)return null;let o=zt(e),r=o?o.individualsById.get(s.id):e.individuals.find(c=>c?.id===s.id),i=Ad(r,t?.createdAt||n),a={id:s.id,label:Cd(s.id),class:pr,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:"mgx:sourceType",key:"sourceType",value:s.type},{prop:Ze,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=ys(e,a);return o&&o.sourcesById.set(s.id,l),s.id}function ic(e){let t=zt(e),n={};if(t){for(let[s,o]of t.sourcesById)n[s]=o;return n}for(let s of e.individuals)s?.class===pr&&(n[s.id]=s);return n}function tw(e,t){let n=zt(e);return n?(n.statedByBySubject.get(t)||[]).slice():(e.objectProperties.find(o=>o?.prop===mn)?.examples||[]).filter(o=>o?.subject===t).map(o=>o.object)}function kA(e,t,n=Date.now(),s={}){let o=tw(e,t.id),r=(t.attributes||[]).find(l=>l?.prop===Ze)?.value||"",{score:i,inputs:a}=sh({sourceIds:o,createdAt:r},ic(e),{now:n,...Array.isArray(s?.premiseTrusts)?{premiseTrusts:s.premiseTrusts}:{},...typeof s?.ruleConfidence=="number"?{ruleConfidence:s.ruleConfidence}:{}});gn(t,Do,"trustScore",String(i)),gn(t,Gi,"trustInputs",JSON.stringify(a)),gn(t,Rs,"updatedAt",new Date(n).toISOString())}function jA(e,t,n=Date.now(),s={}){let[o]=tw(e,t.id),r=o?ic(e)[o]:null,i=(r?.attributes||[]).find(c=>c?.prop==="mgx:sourceType")?.value||"",a=Vi(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===Ze)?.value||"";gn(t,Do,"trustScore",String(a)),gn(t,Gi,"trustInputs",JSON.stringify({sourceType:i,sourceId:o||"",createdAt:l})),gn(t,Rs,"updatedAt",new Date(n).toISOString())}function nw(e,t,n,s){t?.class===ft?jA(e,t,n,s):kA(e,t,n,s)}function ur(e,t,n=Date.now(),s={}){let o=(t.attributes||[]).find(i=>i?.prop==="mgx:factProvenance")?.value||"",r=(t.attributes||[]).find(i=>i?.prop===Ze)?.value||new Date(n).toISOString();for(let i of o.split(" | ").filter(Boolean)){let a=ts(i);if(!a)continue;let l=SA(e,a,r);l&&sc(e,{predicate:"statedBy",prop:mn},{subject:t.id,object:l,subjectLabel:t.label,objectLabel:Cd(l)})}nw(e,t,n,s)}function RA(e){if(!Array.isArray(e?.individuals)||!Array.isArray(e?.objectProperties))return;let t=e.objectProperties.find(r=>r?.prop===mn),n=new Set((t?.examples||[]).map(r=>r.subject)),s=!1,o=Date.now();for(let r of e.individuals)r?.class!==ft||n.has(r.id)||!(r.attributes||[]).find(a=>a?.prop==="mgx:factProvenance")?.value||(ur(e,r,o),s=!0);s&&qn(e)}function TA(e){if(!Array.isArray(e?.individuals)||!Array.isArray(e?.objectProperties))return;let t=ht(e),n=new Set;for(let a of pw(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(!_A(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=zt(e);for(let[a,l]of s){let c=o?o.individualsById.get(a):e.individuals.find(u=>u?.id===a);c&&(gn(c,Ob,"sourceReliability",String(rh(l))),gn(c,Rs,"updatedAt",new Date().toISOString()))}let r=e.objectProperties.find(a=>a?.prop===mn),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&&nw(e,l)}}function AA(e,t,n){if(!Na(n?.id))return n;let s=ri(n.id);if(!s)return Yu(t,n);let o=ic(e);return Yu(t,n,{priorFor:r=>Vi(s,o[r])})}function Cb(e,t,n){return n?.class===rn?fb(t,n):AA(e,t,n)}function ys(e,t){let n=zt(e);if(n){let o=n.individualsById.get(t.id);if(o)return Object.assign(o,Cb(e,o,t)),o.class===rn&&wd(n.retractionsByGroup,o),o;if(e.individuals.push(t),n.individualsById.set(t.id,t),t.class===rn&&wd(n.retractionsByGroup,t),t.class===ft){let r=Dt(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]=Cb(e,e.individuals[s],t),e.individuals[s]):(e.individuals.push(t),t)}function sc(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===mn?zt(e):null;if(r){let l=r.statedByBySubject.get(s.subject);if(!l||!l.includes(s.object)){o.examples.push({...s,createdAt:s.createdAt||ws()}),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||ws();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 qn(e){let t=[vd,$d,ft,pr,fr];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 IA(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:vd,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:Ze,key:"createdAt",value:n||ws()},...n?[{prop:"mgx:sessionStarted",key:"started",value:n}]:[]]}),s}function sw(e,{role:t,text:n,ts:s,sessionId:o,sessionStarted:r="",parsed:i=null,replyTo:a=null,createdAt:l=""}){if(!BT.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=fs(n),d=`utt:${o}#${c}#${t}`,f=rc(u)||(t==="visitor"?"a-visitor-said":"a-tmct-said"),p=Wi({doc:u}),h=e.individuals.find(y=>y?.id===d),m=Ad(h,l||c),b={id:d,label:f,class:$d,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:Ze,key:"createdAt",value:m},...i!=null?[{prop:"mgx:utteranceParsed",key:"parsed",value:JSON.stringify(i)}]:[],...p.length?[{prop:"mgx:hasProseTokens",key:"prose_tokens",value:p.join(" ")}]:[]]};ys(e,b);let g=IA(e,o,r);if(sc(e,{predicate:"saidInSession",prop:xd},{subject:d,object:g,subjectLabel:f,objectLabel:String(o).slice(0,8)}),a){let y=e.individuals.find(w=>w?.id===a);y&&sc(e,{predicate:"inReplyTo",prop:Ed},{subject:d,object:a,subjectLabel:f,objectLabel:y.label})}return c&&c>String(e.generated_at||"")&&(e.generated_at=c),d}async function CA(e,t){let n;return await $s(e,s=>{n=sw(s,t),qn(s)}),{id:n}}async function ow(e,t){let n=[];return t?.length?(await $s(e,s=>{for(let o of t)n.push(sw(s,o));qn(s)}),{ids:n}):{ids:n}}async function OA(e,t){t?.length&&await $s(e,n=>{for(let s of t)for(let o of yo(n,s.factId))sc(n,{predicate:"canonicalisedFrom",prop:Sd},{subject:o,object:s.uttId,subjectLabel:s.factLabel,objectLabel:s.uttLabel})})}function yo(e,t){let n=zt(e);return n?(n.factRecordsByGroup.get(t)||[]).slice():(e?.individuals||[]).filter(s=>s?.class===ft&&Dt(s.id)===t).map(s=>s.id)}function rw(e,t,n,s=""){let o=zb(n);if(o.length===1&&o[0].sourceId===bs&&yo(e,t).length)return[];let r=xA(e,t);if(r.length&&(o=o.filter(a=>!Ua(r,`${t}@${a.sourceId}`,hr(a.tags,s))),!o.length))return o;let i=LA(e,t);return i.length?o.filter(a=>!lb(i,a.sourceId)):o}function LA(e,t){let n=zt(e),s=n?n.factRecordsByGroup.get(t):yo(e,t),o=[];for(let r of s||[]){if(!Ms(r))continue;let i=Fs(e,r);i&&o.push(i)}return o}function iw(e,t,{quantifier:n,environments:s}){let o=yo(e,t).map(i=>Fs(e,i)).filter(i=>i&&!(i.attributes||[]).some(a=>a?.prop===gi)),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)gn(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")||(gn(i,"mgx:factQuantifier","quantifier",n),r.add(i.id));return[...r]}function NA(e){let t=0,n=(e.attributes||[]).find(s=>s?.prop===nc)?.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 aw(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}`,h=zt(e),m=h?h.individualsById.get(p):e.individuals.find(_=>_?.id===p),b=_=>(m?.attributes||[]).find(R=>R?.prop===_)?.value||"",g=b("mgx:factProvenance").split(" | ").filter(Boolean),y={assertedAt:hd(l.tags),observedAt:u},w=null,v=l.tags,k=y.assertedAt||c||ws(),$=u,x=[],E=d;if(m){let _={assertedAt:hd(g),observedAt:b(pi)};qT(y,_)?(w={head:m,id:`${p}#v${NA(m)}`},x=[w.id]):(v=[...new Set([...g,...l.tags])],k=b(Ze)||k,$=u||b(pi),x=b(nc).split(" ").filter(Boolean)),E=d||b("mgx:factQuantifier")}return{candidate:{id:p,label:i,class:ft,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:Ze,key:"createdAt",value:k},{prop:wo,key:"sourceId",value:l.sourceId},...v.length?[{prop:"mgx:factProvenance",key:"provenance",value:v.join(" | ")}]:[],...$?[{prop:pi,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(_=>_.join(" ")).join(" | ")}]:[],...x.length?[{prop:nc,key:"supersedes",value:x.join(" ")}]:[]]},demote:w}}function PA(e,t){let n=`${t}@${bs}`,s=zt(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 cw(e,{candidate:t,demote:n}){let s=[];if(t.id.endsWith(`@${bs}`)||PA(e,Dt(t.id)),n){let o={...n.head,id:n.id,attributes:(n.head.attributes||[]).map(r=>({...r}))};gn(o,gi,"supersededBy",t.id),ys(e,o),s.push(o.id)}return ys(e,t),s.push(t.id),s}function Fs(e,t){let n=zt(e);return n?n.individualsById.get(t):e.individuals.find(s=>s?.id===t)}function Od(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=zt(e);if(s)for(let o of n){s.individualsById.delete(o),s.statedByBySubject.delete(o);let r=Dt(o),i=(s.factRecordsByGroup.get(r)||[]).filter(a=>a!==o);i.length?s.factRecordsByGroup.set(r,i):s.factRecordsByGroup.delete(r)}}function lw(e,t){let n=zt(e),s=(n?n.factRecordsByGroup.get(t):yo(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=Fs(e,u);if(!d)continue;let f=y=>(d.attributes||[]).find(w=>w?.prop===y)?.value||"";if(Ms(u)){i.set(ri(u),d);continue}if(cr(u)){a.set(f(wo),d);continue}let p=f("mgx:factProvenance"),h=Fb(p),m=p.split(" | ").filter(Boolean),b={id:u,sourceId:f(wo)||h.id,assertedAt:hr(m,f(Ze)),record:d};if(f(gi)){let y=r.get(b.sourceId);y?y.push(b):r.set(b.sourceId,[b]);continue}if(!h.type)continue;let g=o.get(h.type);g?g.push(b):o.set(h.type,[b])}let l=ic(e),c=[];for(let[u,d]of o){let f=ab({groupId:t,sourceType:u,heads:d,existing:i.get(u)||null,priorFor:p=>Vi(u,l[p])});if(f){ys(e,f.rollup),c.push(...f.absorbed);for(let p of f.absorbedSourceIds){for(let m of r.get(p)||[])c.push(m.id);r.delete(p);let h=a.get(p);h&&c.push(h.id),a.delete(p)}}}for(let[u,d]of r){let f=cb({groupId:t,sourceId:u,leaves:d,existing:a.get(u)||null});if(!f)continue;ys(e,f.rollup),c.push(...f.absorbed);let p=Fs(e,f.rewire);p&&gn(p,nc,"supersedes",f.rollup.id)}return c}async function MA(e,{subject:t,predicate:n,object:s,provenance:o="",createdAt:r="",observedAt:i="",quantifier:a="",premiseTrusts:l,ruleConfidence:c}={}){let u=V(t),d=hs(n),f=V(s);if(!u||!d||!f)throw new Error("a fact needs subject, predicate and object");let p=Zo(u,d,f),h=`${u} ${d} ${f}`,m=Wi({doc:h}),b=fs(a);return await $s(e,async g=>{let y=rw(g,p,fs(o),r);for(let w of y.length?[]:iw(g,p,{quantifier:b}))ur(g,Fs(g,w),void 0,{premiseTrusts:l,ruleConfidence:c});for(let w of y){let v=aw(g,{groupId:p,s:u,p:d,o:f,label:rc(h),tokens:m,group:w,createdAt:r,observedAt:i,quantifier:b});await id(v.candidate);for(let k of cw(g,v))ur(g,Fs(g,k),void 0,k===v.candidate.id?{premiseTrusts:l,ruleConfidence:c}:void 0)}Od(g,lw(g,p)),qn(g)}),{id:p}}function FA(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 Hn(e,t){let n=[],s=0;for(let r of t||[]){let i=V(r?.subject),a=hs(r?.predicate),l=V(r?.object);if(!i||!a||!l){s+=1;continue}let c=`${i} ${a} ${l}`;n.push({id:Zo(i,a,l),s:i,p:a,o:l,text:c,tokens:Wi({doc:c}),provenance:fs(r?.provenance),createdAt:r?.createdAt||"",observedAt:r?.observedAt||"",quantifier:fs(r?.quantifier),premiseTrusts:Array.isArray(r?.premiseTrusts)?r.premiseTrusts:void 0,ruleConfidence:typeof r?.ruleConfidence=="number"?r.ruleConfidence:void 0,environments:FA(r?.justification)})}let o=[];return n.length?(await $s(e,r=>{let i=[],a=new Set,l=new Map;for(let u of n){let d=rw(r,u.id,u.provenance,u.createdAt);for(let f of d.length?[]:iw(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=aw(r,{groupId:u.id,s:u.s,p:u.p,o:u.o,label:rc(u.text),tokens:u.tokens,group:f,createdAt:u.createdAt,observedAt:u.observedAt,quantifier:u.quantifier,environments:u.environments});for(let h of cw(r,p))a.has(h)||(a.add(h),i.push(h));(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)ur(r,Fs(r,u),void 0,l.get(u));let c=[];for(let u of new Set(o))c.push(...lw(r,u));Od(r,c),qn(r)}),{ids:o,appended:o.length,skipped:s}):{ids:o,appended:0,skipped:s}}async function lc(e,{name:t,kind:n,slots:s,provenance:o="",createdAt:r=""}={}){let i=uw[n];if(!i)throw new Error(`a rule kind must be one of ${DA.join(", ")}, got ${JSON.stringify(n)}`);let a=V(t);if(!a)throw new Error("a rule needs a name");let l=zA[n]||new Set,c=i.map(([p])=>V(s?.[p])),u=i.filter(([p],h)=>!l.has(p)&&!c[h]);if(u.length)throw new Error(`a ${n} rule needs ${u.map(([p])=>p).join(" + ")}`);if(n===yi){let p=c[i.findIndex(([m])=>m==="objectRole")],h=c[i.findIndex(([m])=>m==="value")];if(!p&&!h)throw new Error(`a ${n} rule needs an objectRole or a value`)}let d=UA(n,a,c),f=rc(`${a} = ${n}(${c.join(", ")})`);return await $s(e,async p=>{let h=p.individuals.find(w=>w?.id===d),m=h?.attributes?.find(w=>w?.prop==="mgx:factProvenance")?.value||"",b=[...new Set([...m.split(" | "),fs(o)].filter(Boolean))],g=Ad(h,r),y={id:d,label:f,class:fr,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:cc,key:"ruleName",value:a},{prop:mr,key:"ruleKind",value:n},...i.map(([w,v],k)=>({prop:v,key:w,value:c[k],skip:!c[k]&&l.has(w)})).filter(w=>!w.skip).map(({skip:w,...v})=>v),{prop:Ze,key:"createdAt",value:g},...b.length?[{prop:"mgx:factProvenance",key:"provenance",value:b.join(" | ")}]:[]]};await id(y),ys(p,y),ur(p,p.individuals.find(w=>w?.id===d)),qn(p)}),{id:d}}function Md(e,t){let n=V(t);return(e?.individuals||[]).find(s=>s?.class===fr&&(s.attributes||[]).find(o=>o?.prop===cc)?.value===n)}function BA(e,t){let n=V(t),s=o=>(o.attributes||[]).find(r=>r?.prop===mr)?.value||"";return(e?.individuals||[]).filter(o=>o?.class===fr&&(o.attributes||[]).find(r=>r?.prop===cc)?.value===n).sort((o,r)=>s(o).localeCompare(s(r))||String(o.id).localeCompare(String(r.id)))}function Fd(e){let t=[];for(let n of e?.individuals||[]){if(n?.class!==fr)continue;let s=a=>(n.attributes||[]).find(l=>l?.prop===a)?.value,o=s(mr),r=uw[o];if(!r)continue;let i={};for(let[a,l]of r)i[a]=s(l)??"";t.push({id:n.id,name:s(cc)||"",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 Dd(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(),h=l(V,n),m=l(V,s),b=r(p).filter(w=>h.has(w.fact.subject)&&m.has(w.fact.object));if(b.length){let w=b.slice().sort((v,k)=>c(v.fact,k.fact))[0];return{citation:[i(w.fact),...w.aliasFacts.map(v=>`${a(v)}${v.provenance?` (source: ${v.provenance})`:""}`)]}}let g=Md(e,p),y=g?.attributes?.find(w=>w.prop===mr)?.value;if(g&&y===bi){let w=g.attributes.find(P=>P.prop==="mgx:ruleBase1")?.value,v=g.attributes.find(P=>P.prop==="mgx:ruleBase2")?.value,k=V(n),$=V(s);if(!w||!v||!k||!$)return null;let _=f({entity:k,hopsTaken:0},P=>P.hopsTaken===2&&P.entity===$,P=>{if(P.hopsTaken>=2)return[];let T=P.hopsTaken===0?w:v;return r(T).filter(F=>F.fact.subject===P.entity).map(F=>({action:F,nextState:{entity:F.fact.object,hopsTaken:P.hopsTaken+1}}))},{maxDepth:2,stateKey:P=>`${P.entity}#${P.hopsTaken}`});if(!_)return null;let R=new Set,I=[];for(let P of _.actions){I.push(i(P.fact));for(let T of P.aliasFacts){let F=T.id||`${T.subject}|${T.predicate}|${T.object}`;R.has(F)||(R.add(F),I.push(`${a(T)}${T.provenance?` (source: ${T.provenance})`:""}`))}}return{citation:I}}if(g&&y===wi){let w=g.attributes.find(S=>S.prop==="mgx:ruleBase1")?.value,v=g.attributes.find(S=>S.prop==="mgx:ruleFilterProperty")?.value;if(!w||!v)return null;let k=await Dd(e,w,n,s,o);if(!k)return null;let $=V(n),x=V(v),E=u.find(S=>S.predicate===d&&S.subject===$&&V(S.object)===x);return E?{citation:[...k.citation,i(E)]}:null}return null}async function dw(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(V,n),h=o(f).filter(g=>p.has(g.fact.object));if(h.length){let g=new Map;for(let y of h)g.has(y.fact.subject)||g.set(y.fact.subject,[]),g.get(y.fact.subject).push(y);return[...g.entries()].map(([y,w])=>{let v=w.slice().sort((k,$)=>l(k.fact,$.fact))[0];return{subject:y,citation:[r(v.fact),...v.aliasFacts.map(k=>`${i(k)}${k.provenance?` (source: ${k.provenance})`:""}`)]}})}let m=Md(e,f),b=m?.attributes?.find(g=>g.prop===mr)?.value;if(m&&b===bi){let g=m.attributes.find(x=>x.prop==="mgx:ruleBase1")?.value,y=m.attributes.find(x=>x.prop==="mgx:ruleBase2")?.value,w=V(n);return!g||!y||!w?[]:d({entity:w,hopsTaken:0},x=>{if(x.hopsTaken>=2)return[];let E=x.hopsTaken===0?y:g;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,_=[];for(let R of E.actions.slice().reverse()){_.push(r(R.fact));for(let I of R.aliasFacts){let P=I.id||`${I.subject}|${I.predicate}|${I.object}`;S.has(P)||(S.add(P),_.push(`${i(I)}${I.provenance?` (source: ${I.provenance})`:""}`))}}return{subject:x.entity,citation:_}})}if(m&&b===wi){let g=m.attributes.find($=>$.prop==="mgx:ruleBase1")?.value,y=m.attributes.find($=>$.prop==="mgx:ruleFilterProperty")?.value;if(!g||!y)return[];let w=await dw(e,g,n,s),v=V(y),k=[];for(let $ of w){let x=V($.subject),E=c.find(S=>S.predicate===u&&S.subject===x&&V(S.object)===v);E&&k.push({subject:$.subject,citation:[...$.citation,r(E)]})}return k}return[]}function ht(e,t={}){let n=zd(e),s=Vb(e),o=[];for(let[r,i]of n.groups){let a=Ud(r,i,n),l=s?.get(r);a.trust=qi(l?l.inputs:a.assertions,t).score,o.push(a)}return o}function zd(e){let t=e?.individuals||[],n=new Map(t.filter(l=>l?.class===pr).map(l=>[l.id,l])),s=(e?.objectProperties||[]).find(l=>l?.prop===mn),o=new Map;for(let l of s?.examples||[])o.has(l.subject)||o.set(l.subject,[]),o.get(l.subject).push(l.object);let r=new Map,i=new Map;for(let l of t){if(l?.class===rn){let d=Dt(l.id),f=i.get(d);f?f.push(l):i.set(d,[l]);continue}if(l?.class!==ft||(l.attributes||[]).some(d=>d?.prop===gi)||cr(l.id))continue;let c=Dt(l.id),u=r.get(c);u?u.push(l):r.set(c,[l])}for(let[l,c]of i){let u=r.get(l);if(!u)continue;let d=u.filter(f=>!Ua(c,f.id,hr(Gn(f,"mgx:factProvenance").split(" | ").filter(Boolean),Gn(f,Ze))));d.length!==u.length&&(d.length?r.set(l,d):r.delete(l))}let a=new Map;for(let[l,c]of r){c.sort((f,p)=>f.id<p.id?-1:f.id>p.id?1:0);let u=md(fi(c[0],"subject"),fi(c[0],"predicate")),d=a.get(u);d?d.push(l):a.set(u,[l])}return{groups:r,groupsByPair:a,statedByRecord:o,sourceTypeOf:l=>(n.get(l)?.attributes||[]).find(c=>c?.prop==="mgx:sourceType")?.value||""}}function Ud(e,t,n){let{statedByRecord:s,sourceTypeOf:o}=n,r=Gn,i=fi,a=[],l=[],c=[],u=new Set,d=[],f=new Set,p="";for(let b of t){if(Ms(b.id)){let x=ri(b.id),E=Pa(b);for(let S of E)l.includes(S)||(l.push(S),x&&c.push(x));a.push({id:b.id,sourceId:"",sourceType:x,provenance:"",createdAt:r(b,Un),ownTrust:Number(r(b,ar))||0,assertedAt:r(b,Bn),rollup:{count:Number(r(b,oi))||E.length,sourceIds:E,earliest:r(b,Un),latest:r(b,Bn)}});continue}let g=r(b,"mgx:factProvenance").split(" | ").filter(Boolean);for(let x of g)u.add(x);let[y]=s.get(b.id)||[],w=y||r(b,wo),v=o(w);y&&!l.includes(y)&&(l.push(y),v&&c.push(v));let k=r(b,Ze),$=r(b,pi);a.push({id:b.id,sourceId:w,sourceType:v,provenance:g.join(" | "),createdAt:k,...$?{observedAt:$}:{},ownTrust:Number(r(b,Do))||0,assertedAt:hr(g,k)}),p=p||i(b,"quantifier");for(let x of i(b,"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 h=[],m=new Set;for(let b of d)for(let g of b)m.has(g)||(m.add(g),h.push(g));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:h,assertions:a}}function WA(e){let t=Gn(e,wo);if(t)return t;let n=String(e?.id||""),s=n.indexOf("@");if(s<0)return"";let o=n.slice(s+1),r=o.indexOf("#");return r<0?o:o.slice(0,r)}async function GA(e,t,{provenance:n="",retractedAt:s=""}={}){let o=new Set((t||[]).filter(Boolean)),r=[],i=[];if(!o.size)return{removed:r,records:i};let a=s||ws();return await $s(e,l=>{let c=new Set,u=new Set,d=new Map;l.individuals=(l.individuals||[]).filter(f=>{if(f?.class!==ft)return!0;let p=Dt(f.id),h=o.has(f.id)?f.id:o.has(p)?p:"";if(!h)return!0;u.add(h),c.add(f.id);let m=WA(f),b=`${p}\0${m}`,g=Gn(f,"mgx:factProvenance"),y=d.get(b);return y?(y.ids.push(f.id),g&&y.tags.push(g)):d.set(b,{groupId:p,sourceId:m,ids:[f.id],tags:g?[g]:[],template:{label:f.label||"",subject:Gn(f,"rdf:subject"),predicate:Gn(f,"rdf:predicate"),object:Gn(f,"rdf:object")}}),!1});for(let f of u)r.push(f);if(r.length){for(let f of c)i.push(f);for(let f of l.objectProperties||[]){let p=f.examples||[];f.examples=p.filter(h=>!c.has(h?.subject)&&!c.has(h?.object)),f.count=f.examples.length}for(let f of d.values()){let p=pb({groupId:f.groupId,sourceId:f.sourceId,recordIds:f.ids,retractedAt:a,template:f.template,provenance:[...f.tags,n].filter(Boolean).join(" | ")});p&&ys(l,p)}qn(l)}}),{removed:r,records:i}}function VA(e){let t=[];for(let n of e?.individuals||[]){if(n?.class!==rn)continue;let s=Ba(n);s&&t.push(s)}return t.sort((n,s)=>n.id<s.id?-1:n.id>s.id?1:0)}async function qA(e,t){let n=[];for(let o of t||[]){let r=Wa(o);r&&n.push(r)}let s=[];return n.length?(await $s(e,o=>{let r=new Map;for(let a of n){let l=ys(o,a),c=Dt(l.id),u=r.get(c);u?u.push(l):r.set(c,[l])}let i=new Set;for(let[a,l]of r)for(let c of yo(o,a)){let u=Fs(o,c);if(!u)continue;let d=Gn(u,"mgx:factProvenance").split(" | ").filter(Boolean);Ua(l,c,hr(d,Gn(u,Ze)))&&i.add(c)}if(i.size){Od(o,i);for(let a of i)s.push(a)}qn(o)}),{merged:n.length,removed:s}):{merged:0,removed:s}}function HA(e,{self:t="",acknowledgedBy:n=null}={}){let s=Ga(ht(e)),o=[];for(let r of e?.individuals||[])r?.class===rn&&r.id&&o.push(r.id);return{roster:s,retirable:Va({recordIds:o,roster:s,self:t,acknowledgedBy:n})}}async function KA(e,t){let n=new Set((t||[]).filter(Boolean)),s=[];return n.size?(await $s(e,o=>{let r=new Set;if(o.individuals=(o.individuals||[]).filter(a=>a?.class!==rn||!n.has(a.id)?!0:(r.add(a.id),!1)),!r.size)return;for(let a of r)s.push(a);let i=zt(o);if(i)for(let a of r){i.individualsById.delete(a);let l=Dt(a),c=(i.retractionsByGroup.get(l)||[]).filter(u=>!r.has(u.id));c.length?i.retractionsByGroup.set(l,c):i.retractionsByGroup.delete(l)}qn(o)}),{retired:s}):{retired:s}}function pw(e,{floor:t=YA}={}){let n=ht(e).filter(r=>r.trust>=t),s=new Map;for(let r of n){if(Ca(r.predicate)===zu)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=Ca(r[0].predicate);i!==Uu&&!Wu(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 dr,yd,$d,ft,vd,pr,fr,xd,Ed,UT,mn,Sd,Ob,tc,pd,Lb,BT,Ab,WT,fd,kd,Nb,GT,bs,pi,wo,nc,gi,Bb,Gn,fi,md,Wb,Vb,YT,eA,Ib,jn,Jb,gd,pA,dd,hA,_d,Qb,Td,Zb,bd,zt,rc,ws,Cd,_A,bi,wi,Ld,Nd,ac,yi,Pd,DA,cc,mr,uw,zA,UA,YA,gr,XA,JA,Ue=C(()=>{_t();We();js();Ot();Ot();ns();Jg();ns();Ia();Xu();nd();rd();bb();Xu();nd();rd();dr=Z(".tmct","memory"),yd=Z(dr,"graph.json"),$d="Utterance",ft="Fact",vd="Session",pr="Source",fr="Rule",xd="mgx:saidInSession",Ed="mgx:inReplyTo",UT="mgx:derivedFrom",mn="mgx:statedBy",Sd="mgx:canonicalisedFrom",Ob="mgx:sourceReliability",tc="src:operator-chat",pd="src:teach-chat",Lb="src:teach-node",BT=new Set(["visitor","tmct"]),Ab=48,WT=[{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:xd,predicate:"saidInSession",note:"Utterance \u2192 Session it was said in; runtime observation, owned (no SEON term)"},{prop:Ed,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:Ze,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:Rs,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:UT,predicate:"derivedFrom",note:"umbrella: a Fact derived from a Source (or another Fact). ext ref prov:wasDerivedFrom (UNVERIFIED-pending-web-check)"},{prop:mn,predicate:"statedBy",note:"subPropertyOf derivedFrom: a Source directly asserts this Fact (one edge per independent source \u2014 replaces the factProvenance union)"},{prop:Sd,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:Do,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:Gi,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:nr,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)"}];fd=e=>di(e),kd="memory",Nb="sqlite";GT=`
|
|
107
|
+
`),await An(he(n),{recursive:!0});let o=await Hb(n);return{dir:o,close:async()=>Kb(o)}}async function nA(e,t=""){if(!e||typeof e!="string")return null;let n=Z(e,".tmct","memory","graph.sqlite");try{await ll(n)}catch{return null}return Rd(e,t)}async function sA(e){if(!e)return null;let t=mi();return Pb(t,Mb(await at(e))),t}async function zs(e,t=process.env){let n=String(t?.TMCT_MEMORY_BACKEND||"").trim().toLowerCase();if(!n)try{let{loadTomlConfig:s}=await Promise.resolve().then(()=>(ec(),Tb));n=String((await s(e))?.memory?.backend||"").trim().toLowerCase()}catch{n=""}return Rd(e,n)}function oA(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=Yb(e),e.cachedFactHeads=XT(e.db),e.cachedDataVersion=t),Gb(jn(e.cachedPayload),e.cachedFactHeads)}function Yb(e){let t=e.db,n=hi(),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 rA(e,t){let n=jn(t),s=e.individuals.findIndex(o=>o?.id===t.id);s>=0?e.individuals[s]=n:e.individuals.push(n)}function iA(e,t){e.individuals=e.individuals.filter(n=>t.has(n?.id))}function aA(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 cA(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,jn(Object.fromEntries(n.map(r=>[r,t[r]])))),e.examples.push(o)}function lA(e,t){e.examples=e.examples.filter(n=>t.has(`${n.subject}\0${n.object}`))}function uA(e,t){e.objectProperties=e.objectProperties.filter(n=>t.has(n?.prop))}function dA(e,t){let n=e.db,s=hi(),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=jn(t.generated_at??s.generated_at),o.memory=jn(t.memory??s.memory),o.prefixes=jn(t.prefixes??s.prefixes),o.vocabulary=jn(t.vocabulary??s.vocabulary),o.classes=jn(t.classes??s.classes),o.proseIndex=jn(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(Bb),d=new Set,f=new Set,p=new Set;for(let S of t.individuals||[]){d.add(S.id);let _=JSON.stringify(S),R=i.get(S.id);if(R&&R.json===_)continue;let I=R?R.ord:l++;c.run(S.id,I,S.class??null,S.label??null,_),S.class===ft&&(u.run(...Ub(S,_)),f.add(Dt(S.id)),p.add(md(fi(S,"subject"),fi(S,"predicate")))),o&&rA(o,S)}let h=n.prepare("DELETE FROM individuals WHERE id = ?"),m=n.prepare("DELETE FROM facts WHERE id = ?"),b=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 _=b.get(S.id);_&&(f.add(_.triple_hash),p.add(md(_.subject,_.predicate))),h.run(S.id),m.run(S.id)}o&&iA(o,d);let g=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 (?, ?, ?, ?)"),k=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 _=k.all(S.prop),R=new Map(_.map(U=>[`${U.subject}\0${U.object}`,U])),I=new Set,P=o?aA(o,S.prop):null;for(let U of S.examples||[]){let K=`${U.subject}\0${U.object}`;I.add(K);let ce=Object.keys(U).filter(W=>!eA.has(W)),ie=ce.length?JSON.stringify(Object.fromEntries(ce.map(W=>[W,U[W]]))):null,D=R.get(K);D&&(D.subject_label??null)===(U.subjectLabel??null)&&(D.object_label??null)===(U.objectLabel??null)&&(D.extra??null)===(ie??null)||($.run(S.prop,U.subject,U.object,U.subjectLabel??null,U.objectLabel??null,ie),P&&cA(P,U,ce))}for(let U of R.keys()){if(I.has(U))continue;let[K,ce]=U.split("\0");x.run(S.prop,K,ce)}P&&lA(P,I);let T=Number.isFinite(S.count)?S.count:(S.examples||[]).length,F=g.get(S.prop)?.ord??w++;v.run(S.prop,F,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&&uA(o,E),f.size){let S=zd(t);qb(n,S,f,e.cachedFactHeads),QT(n,S,p)}n.exec("COMMIT")}catch(r){throw n.exec("ROLLBACK"),e.cachedPayload=void 0,e.cachedFactHeads=void 0,r}}async function Xb(e,t){let n=`${e}.tmp-${process.pid}-${Math.random().toString(36).slice(2,10)}`;await _r(n,t),await Mi(n,e)}async function oc(e,t){await Xb(e,JSON.stringify(t))}async function fA(e,{retentionVersions:t}={}){if(jd(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=di(e),s;try{s=await Re(n,"utf8")}catch(u){if(u?.code==="ENOENT")return{skipped:!0,version:null,prunedVersion:null};throw u}let o=pA(e),r;try{r=JSON.parse(await Re(o,"utf8"))}catch(u){if(u?.code!=="ENOENT")throw u;r={version:0,retentionVersions:t??gd}}Number.isInteger(r.version)||(r.version=0),Number.isInteger(r.retentionVersions)||(r.retentionVersions=t??gd);let i=r.version,a=di(e,i);await An(he(a),{recursive:!0}),await Xb(a,s),r.version=i+1;let l=null,c=i-r.retentionVersions;if(c>=0)try{await ul(di(e,c)),l=c}catch(u){if(u?.code!=="ENOENT")throw u}return await oc(o,r),{skipped:!1,version:i,prunedVersion:l}}async function at(e){if(Ds(e))return dd(e.payload);if(Vn(e))return dd(oA(e));let t;try{t=await Re(fd(e),"utf8")}catch(n){if(n?.code==="ENOENT")return hi();throw n}return dd(JSON.parse(t))}function mA(e){if(!Array.isArray(e?.individuals))return e;let t=new Map;for(let s of e.individuals){if(s?.class!==ft||!hA.test(s.id||""))continue;let o=i=>(s.attributes||[]).find(a=>a?.key===i)?.value||"",r=Zo(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 gA(e){if(!Array.isArray(e?.individuals))return e;let t=(e.objectProperties||[]).find(l=>l?.prop===mn),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!==ft||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=Zo(u,d,f),h=c(Ze),m=c("mgx:factProvenance"),b=n.get(l.id)||[],g=m?zb(m):[];for(let w of b)g.some(v=>v.sourceId===w.object)||g.push({sourceId:w.object,sourceType:"",tags:[]});g.length||g.push({sourceId:bs,sourceType:"",tags:[]});let y=[];for(let w of g){let v={id:`${p}@${w.sourceId}`,label:l.label,class:ft,derived_from:jn(l.derived_from)||[],mentions:jn(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:Ze,key:"createdAt",value:hr(w.tags,h,Math.min)||h||ws()},{prop:wo,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!==bs){let k=b.find($=>$?.object===w.sourceId);i.push({...k||{},subject:v.id,object:w.sourceId,subjectLabel:v.label,objectLabel:Cd(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:mn,count:i.length,examples:i}));for(let l of e.objectProperties||[]){if(l?.prop===mn||!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 h of f)c.push({...u,subject:p,object:h})}l.examples=c,l.count=c.length}e.individuals=a,ew(e);for(let l of r)ur(e,l);return qn(e),e}async function bA(e,t){if(Ds(e)){e.payload=t;return}if(Vn(e)){dA(e,t);return}await An(he(fd(e)),{recursive:!0}),await oc(fd(e),t)}async function wA(e){if(Ds(e))return e.syllogiseState?structuredClone(e.syllogiseState):null;if(Vn(e)){let t=e.db.prepare("SELECT v FROM meta WHERE k = ?").get(Qb);return t?.v?JSON.parse(t.v):null}try{return JSON.parse(await Re(Z(e,_d),"utf8"))}catch(t){if(t?.code==="ENOENT")return null;throw t}}async function yA(e,t){if(Ds(e)){e.syllogiseState=structuredClone(t);return}if(Vn(e)){e.db.prepare("INSERT OR REPLACE INTO meta(k, v) VALUES (?, ?)").run(Qb,JSON.stringify(t));return}let n=Z(e,_d);await An(he(n),{recursive:!0}),await oc(n,t)}async function $A(e){if(Ds(e))return e.nodeId||null;if(Vn(e)){let t=e.db.prepare("SELECT v FROM meta WHERE k = ?").get(Zb);return t?.v&&JSON.parse(t.v).nodeId||null}try{return JSON.parse(await Re(Z(e,Td),"utf8")).nodeId||null}catch(t){if(t?.code==="ENOENT")return null;throw t}}async function vA(e,t){if(Ds(e)){e.nodeId=t;return}if(Vn(e)){e.db.prepare("INSERT OR REPLACE INTO meta(k, v) VALUES (?, ?)").run(Zb,JSON.stringify({nodeId:t}));return}let n=Z(e,Td);await An(he(n),{recursive:!0}),await oc(n,{nodeId:t})}function ew(e){let t=new Map,n=new Map,s=new Map,o=new Map,r=new Map;for(let a of e.individuals||[])if(a?.id&&(t.set(a.id,a),a.class===pr&&n.set(a.id,a),a.class===rn&&wd(r,a),a.class===ft)){let l=Dt(a.id),c=o.get(l);c?c.push(a.id):o.set(l,[a.id])}let i=(e.objectProperties||[]).find(a=>a?.prop===mn);for(let a of i?.examples||[]){if(!a?.subject)continue;let l=s.get(a.subject);l?l.push(a.object):s.set(a.subject,[a.object])}return e[bd]={individualsById:t,sourcesById:n,statedByBySubject:s,factRecordsByGroup:o,retractionsByGroup:r},e[bd]}function wd(e,t){let n=Dt(t.id),s=(e.get(n)||[]).filter(o=>o.id!==t.id);s.push(t),e.set(n,s)}function xA(e,t){let n=zt(e);return n?n.retractionsByGroup.get(t)||[]:(e?.individuals||[]).filter(s=>s?.class===rn&&Dt(s.id)===t)}async function $s(e,t){let n=await at(e);ew(n);let s=await t(n)??n;return RA(s),TA(s),s.proseIndex=qf(s.individuals),await bA(e,s),s}function Ad(e,t){return e?.attributes?.find(n=>n?.prop===Ze)?.value||t||ws()}function gn(e,t,n,s){e.attributes=(e.attributes||[]).filter(o=>o?.prop!==t),e.attributes.push({prop:t,key:n,value:s})}function Id(e){switch(e?.kind){case"operator":return{id:e.sessionId?`${tc}:${e.sessionId}`:tc,type:"operator"};case"teach":return{id:e.sessionId?`${pd}:${e.sessionId}`:pd,type:"teach"};case"teachNode":return{id:`${Lb}:${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:${Zr(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 EA(e){return $l[e]||null}function SA(e,t,n){let s=Id(t);if(!s)return null;let o=zt(e),r=o?o.individualsById.get(s.id):e.individuals.find(c=>c?.id===s.id),i=Ad(r,t?.createdAt||n),a={id:s.id,label:Cd(s.id),class:pr,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:"mgx:sourceType",key:"sourceType",value:s.type},{prop:Ze,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=ys(e,a);return o&&o.sourcesById.set(s.id,l),s.id}function ic(e){let t=zt(e),n={};if(t){for(let[s,o]of t.sourcesById)n[s]=o;return n}for(let s of e.individuals)s?.class===pr&&(n[s.id]=s);return n}function tw(e,t){let n=zt(e);return n?(n.statedByBySubject.get(t)||[]).slice():(e.objectProperties.find(o=>o?.prop===mn)?.examples||[]).filter(o=>o?.subject===t).map(o=>o.object)}function kA(e,t,n=Date.now(),s={}){let o=tw(e,t.id),r=(t.attributes||[]).find(l=>l?.prop===Ze)?.value||"",{score:i,inputs:a}=sh({sourceIds:o,createdAt:r},ic(e),{now:n,...Array.isArray(s?.premiseTrusts)?{premiseTrusts:s.premiseTrusts}:{},...typeof s?.ruleConfidence=="number"?{ruleConfidence:s.ruleConfidence}:{}});gn(t,Do,"trustScore",String(i)),gn(t,Gi,"trustInputs",JSON.stringify(a)),gn(t,Rs,"updatedAt",new Date(n).toISOString())}function jA(e,t,n=Date.now(),s={}){let[o]=tw(e,t.id),r=o?ic(e)[o]:null,i=(r?.attributes||[]).find(c=>c?.prop==="mgx:sourceType")?.value||"",a=Vi(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===Ze)?.value||"";gn(t,Do,"trustScore",String(a)),gn(t,Gi,"trustInputs",JSON.stringify({sourceType:i,sourceId:o||"",createdAt:l})),gn(t,Rs,"updatedAt",new Date(n).toISOString())}function nw(e,t,n,s){t?.class===ft?jA(e,t,n,s):kA(e,t,n,s)}function ur(e,t,n=Date.now(),s={}){let o=(t.attributes||[]).find(i=>i?.prop==="mgx:factProvenance")?.value||"",r=(t.attributes||[]).find(i=>i?.prop===Ze)?.value||new Date(n).toISOString();for(let i of o.split(" | ").filter(Boolean)){let a=ts(i);if(!a)continue;let l=SA(e,a,r);l&&sc(e,{predicate:"statedBy",prop:mn},{subject:t.id,object:l,subjectLabel:t.label,objectLabel:Cd(l)})}nw(e,t,n,s)}function RA(e){if(!Array.isArray(e?.individuals)||!Array.isArray(e?.objectProperties))return;let t=e.objectProperties.find(r=>r?.prop===mn),n=new Set((t?.examples||[]).map(r=>r.subject)),s=!1,o=Date.now();for(let r of e.individuals)r?.class!==ft||n.has(r.id)||!(r.attributes||[]).find(a=>a?.prop==="mgx:factProvenance")?.value||(ur(e,r,o),s=!0);s&&qn(e)}function TA(e){if(!Array.isArray(e?.individuals)||!Array.isArray(e?.objectProperties))return;let t=ht(e),n=new Set;for(let a of pw(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(!_A(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=zt(e);for(let[a,l]of s){let c=o?o.individualsById.get(a):e.individuals.find(u=>u?.id===a);c&&(gn(c,Ob,"sourceReliability",String(rh(l))),gn(c,Rs,"updatedAt",new Date().toISOString()))}let r=e.objectProperties.find(a=>a?.prop===mn),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&&nw(e,l)}}function AA(e,t,n){if(!Na(n?.id))return n;let s=ri(n.id);if(!s)return Yu(t,n);let o=ic(e);return Yu(t,n,{priorFor:r=>Vi(s,o[r])})}function Cb(e,t,n){return n?.class===rn?fb(t,n):AA(e,t,n)}function ys(e,t){let n=zt(e);if(n){let o=n.individualsById.get(t.id);if(o)return Object.assign(o,Cb(e,o,t)),o.class===rn&&wd(n.retractionsByGroup,o),o;if(e.individuals.push(t),n.individualsById.set(t.id,t),t.class===rn&&wd(n.retractionsByGroup,t),t.class===ft){let r=Dt(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]=Cb(e,e.individuals[s],t),e.individuals[s]):(e.individuals.push(t),t)}function sc(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===mn?zt(e):null;if(r){let l=r.statedByBySubject.get(s.subject);if(!l||!l.includes(s.object)){o.examples.push({...s,createdAt:s.createdAt||ws()}),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||ws();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 qn(e){let t=[vd,$d,ft,pr,fr];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 IA(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:vd,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:Ze,key:"createdAt",value:n||ws()},...n?[{prop:"mgx:sessionStarted",key:"started",value:n}]:[]]}),s}function sw(e,{role:t,text:n,ts:s,sessionId:o,sessionStarted:r="",parsed:i=null,replyTo:a=null,createdAt:l=""}){if(!BT.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=fs(n),d=`utt:${o}#${c}#${t}`,f=rc(u)||(t==="visitor"?"a-visitor-said":"a-tmct-said"),p=Wi({doc:u}),h=e.individuals.find(y=>y?.id===d),m=Ad(h,l||c),b={id:d,label:f,class:$d,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:Ze,key:"createdAt",value:m},...i!=null?[{prop:"mgx:utteranceParsed",key:"parsed",value:JSON.stringify(i)}]:[],...p.length?[{prop:"mgx:hasProseTokens",key:"prose_tokens",value:p.join(" ")}]:[]]};ys(e,b);let g=IA(e,o,r);if(sc(e,{predicate:"saidInSession",prop:xd},{subject:d,object:g,subjectLabel:f,objectLabel:String(o).slice(0,8)}),a){let y=e.individuals.find(w=>w?.id===a);y&&sc(e,{predicate:"inReplyTo",prop:Ed},{subject:d,object:a,subjectLabel:f,objectLabel:y.label})}return c&&c>String(e.generated_at||"")&&(e.generated_at=c),d}async function CA(e,t){let n;return await $s(e,s=>{n=sw(s,t),qn(s)}),{id:n}}async function ow(e,t){let n=[];return t?.length?(await $s(e,s=>{for(let o of t)n.push(sw(s,o));qn(s)}),{ids:n}):{ids:n}}async function OA(e,t){t?.length&&await $s(e,n=>{for(let s of t)for(let o of yo(n,s.factId))sc(n,{predicate:"canonicalisedFrom",prop:Sd},{subject:o,object:s.uttId,subjectLabel:s.factLabel,objectLabel:s.uttLabel})})}function yo(e,t){let n=zt(e);return n?(n.factRecordsByGroup.get(t)||[]).slice():(e?.individuals||[]).filter(s=>s?.class===ft&&Dt(s.id)===t).map(s=>s.id)}function rw(e,t,n,s=""){let o=zb(n);if(o.length===1&&o[0].sourceId===bs&&yo(e,t).length)return[];let r=xA(e,t);if(r.length&&(o=o.filter(a=>!Ua(r,`${t}@${a.sourceId}`,hr(a.tags,s))),!o.length))return o;let i=LA(e,t);return i.length?o.filter(a=>!lb(i,a.sourceId)):o}function LA(e,t){let n=zt(e),s=n?n.factRecordsByGroup.get(t):yo(e,t),o=[];for(let r of s||[]){if(!Ms(r))continue;let i=Fs(e,r);i&&o.push(i)}return o}function iw(e,t,{quantifier:n,environments:s}){let o=yo(e,t).map(i=>Fs(e,i)).filter(i=>i&&!(i.attributes||[]).some(a=>a?.prop===gi)),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)gn(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")||(gn(i,"mgx:factQuantifier","quantifier",n),r.add(i.id));return[...r]}function NA(e){let t=0,n=(e.attributes||[]).find(s=>s?.prop===nc)?.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 aw(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}`,h=zt(e),m=h?h.individualsById.get(p):e.individuals.find(_=>_?.id===p),b=_=>(m?.attributes||[]).find(R=>R?.prop===_)?.value||"",g=b("mgx:factProvenance").split(" | ").filter(Boolean),y={assertedAt:hd(l.tags),observedAt:u},w=null,v=l.tags,k=y.assertedAt||c||ws(),$=u,x=[],E=d;if(m){let _={assertedAt:hd(g),observedAt:b(pi)};qT(y,_)?(w={head:m,id:`${p}#v${NA(m)}`},x=[w.id]):(v=[...new Set([...g,...l.tags])],k=b(Ze)||k,$=u||b(pi),x=b(nc).split(" ").filter(Boolean)),E=d||b("mgx:factQuantifier")}return{candidate:{id:p,label:i,class:ft,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:Ze,key:"createdAt",value:k},{prop:wo,key:"sourceId",value:l.sourceId},...v.length?[{prop:"mgx:factProvenance",key:"provenance",value:v.join(" | ")}]:[],...$?[{prop:pi,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(_=>_.join(" ")).join(" | ")}]:[],...x.length?[{prop:nc,key:"supersedes",value:x.join(" ")}]:[]]},demote:w}}function PA(e,t){let n=`${t}@${bs}`,s=zt(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 cw(e,{candidate:t,demote:n}){let s=[];if(t.id.endsWith(`@${bs}`)||PA(e,Dt(t.id)),n){let o={...n.head,id:n.id,attributes:(n.head.attributes||[]).map(r=>({...r}))};gn(o,gi,"supersededBy",t.id),ys(e,o),s.push(o.id)}return ys(e,t),s.push(t.id),s}function Fs(e,t){let n=zt(e);return n?n.individualsById.get(t):e.individuals.find(s=>s?.id===t)}function Od(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=zt(e);if(s)for(let o of n){s.individualsById.delete(o),s.statedByBySubject.delete(o);let r=Dt(o),i=(s.factRecordsByGroup.get(r)||[]).filter(a=>a!==o);i.length?s.factRecordsByGroup.set(r,i):s.factRecordsByGroup.delete(r)}}function lw(e,t){let n=zt(e),s=(n?n.factRecordsByGroup.get(t):yo(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=Fs(e,u);if(!d)continue;let f=y=>(d.attributes||[]).find(w=>w?.prop===y)?.value||"";if(Ms(u)){i.set(ri(u),d);continue}if(cr(u)){a.set(f(wo),d);continue}let p=f("mgx:factProvenance"),h=Fb(p),m=p.split(" | ").filter(Boolean),b={id:u,sourceId:f(wo)||h.id,assertedAt:hr(m,f(Ze)),record:d};if(f(gi)){let y=r.get(b.sourceId);y?y.push(b):r.set(b.sourceId,[b]);continue}if(!h.type)continue;let g=o.get(h.type);g?g.push(b):o.set(h.type,[b])}let l=ic(e),c=[];for(let[u,d]of o){let f=ab({groupId:t,sourceType:u,heads:d,existing:i.get(u)||null,priorFor:p=>Vi(u,l[p])});if(f){ys(e,f.rollup),c.push(...f.absorbed);for(let p of f.absorbedSourceIds){for(let m of r.get(p)||[])c.push(m.id);r.delete(p);let h=a.get(p);h&&c.push(h.id),a.delete(p)}}}for(let[u,d]of r){let f=cb({groupId:t,sourceId:u,leaves:d,existing:a.get(u)||null});if(!f)continue;ys(e,f.rollup),c.push(...f.absorbed);let p=Fs(e,f.rewire);p&&gn(p,nc,"supersedes",f.rollup.id)}return c}async function MA(e,{subject:t,predicate:n,object:s,provenance:o="",createdAt:r="",observedAt:i="",quantifier:a="",premiseTrusts:l,ruleConfidence:c}={}){let u=V(t),d=hs(n),f=V(s);if(!u||!d||!f)throw new Error("a fact needs subject, predicate and object");let p=Zo(u,d,f),h=`${u} ${d} ${f}`,m=Wi({doc:h}),b=fs(a);return await $s(e,async g=>{let y=rw(g,p,fs(o),r);for(let w of y.length?[]:iw(g,p,{quantifier:b}))ur(g,Fs(g,w),void 0,{premiseTrusts:l,ruleConfidence:c});for(let w of y){let v=aw(g,{groupId:p,s:u,p:d,o:f,label:rc(h),tokens:m,group:w,createdAt:r,observedAt:i,quantifier:b});await id(v.candidate);for(let k of cw(g,v))ur(g,Fs(g,k),void 0,k===v.candidate.id?{premiseTrusts:l,ruleConfidence:c}:void 0)}Od(g,lw(g,p)),qn(g)}),{id:p}}function FA(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 Hn(e,t){let n=[],s=0;for(let r of t||[]){let i=V(r?.subject),a=hs(r?.predicate),l=V(r?.object);if(!i||!a||!l){s+=1;continue}let c=`${i} ${a} ${l}`;n.push({id:Zo(i,a,l),s:i,p:a,o:l,text:c,tokens:Wi({doc:c}),provenance:fs(r?.provenance),createdAt:r?.createdAt||"",observedAt:r?.observedAt||"",quantifier:fs(r?.quantifier),premiseTrusts:Array.isArray(r?.premiseTrusts)?r.premiseTrusts:void 0,ruleConfidence:typeof r?.ruleConfidence=="number"?r.ruleConfidence:void 0,environments:FA(r?.justification)})}let o=[];return n.length?(await $s(e,r=>{let i=[],a=new Set,l=new Map;for(let u of n){let d=rw(r,u.id,u.provenance,u.createdAt);for(let f of d.length?[]:iw(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=aw(r,{groupId:u.id,s:u.s,p:u.p,o:u.o,label:rc(u.text),tokens:u.tokens,group:f,createdAt:u.createdAt,observedAt:u.observedAt,quantifier:u.quantifier,environments:u.environments});for(let h of cw(r,p))a.has(h)||(a.add(h),i.push(h));(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)ur(r,Fs(r,u),void 0,l.get(u));let c=[];for(let u of new Set(o))c.push(...lw(r,u));Od(r,c),qn(r)}),{ids:o,appended:o.length,skipped:s}):{ids:o,appended:0,skipped:s}}async function lc(e,{name:t,kind:n,slots:s,provenance:o="",createdAt:r=""}={}){let i=uw[n];if(!i)throw new Error(`a rule kind must be one of ${DA.join(", ")}, got ${JSON.stringify(n)}`);let a=V(t);if(!a)throw new Error("a rule needs a name");let l=zA[n]||new Set,c=i.map(([p])=>V(s?.[p])),u=i.filter(([p],h)=>!l.has(p)&&!c[h]);if(u.length)throw new Error(`a ${n} rule needs ${u.map(([p])=>p).join(" + ")}`);if(n===yi){let p=c[i.findIndex(([m])=>m==="objectRole")],h=c[i.findIndex(([m])=>m==="value")];if(!p&&!h)throw new Error(`a ${n} rule needs an objectRole or a value`)}let d=UA(n,a,c),f=rc(`${a} = ${n}(${c.join(", ")})`);return await $s(e,async p=>{let h=p.individuals.find(w=>w?.id===d),m=h?.attributes?.find(w=>w?.prop==="mgx:factProvenance")?.value||"",b=[...new Set([...m.split(" | "),fs(o)].filter(Boolean))],g=Ad(h,r),y={id:d,label:f,class:fr,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:cc,key:"ruleName",value:a},{prop:mr,key:"ruleKind",value:n},...i.map(([w,v],k)=>({prop:v,key:w,value:c[k],skip:!c[k]&&l.has(w)})).filter(w=>!w.skip).map(({skip:w,...v})=>v),{prop:Ze,key:"createdAt",value:g},...b.length?[{prop:"mgx:factProvenance",key:"provenance",value:b.join(" | ")}]:[]]};await id(y),ys(p,y),ur(p,p.individuals.find(w=>w?.id===d)),qn(p)}),{id:d}}function Md(e,t){let n=V(t);return(e?.individuals||[]).find(s=>s?.class===fr&&(s.attributes||[]).find(o=>o?.prop===cc)?.value===n)}function BA(e,t){let n=V(t),s=o=>(o.attributes||[]).find(r=>r?.prop===mr)?.value||"";return(e?.individuals||[]).filter(o=>o?.class===fr&&(o.attributes||[]).find(r=>r?.prop===cc)?.value===n).sort((o,r)=>s(o).localeCompare(s(r))||String(o.id).localeCompare(String(r.id)))}function Fd(e){let t=[];for(let n of e?.individuals||[]){if(n?.class!==fr)continue;let s=a=>(n.attributes||[]).find(l=>l?.prop===a)?.value,o=s(mr),r=uw[o];if(!r)continue;let i={};for(let[a,l]of r)i[a]=s(l)??"";t.push({id:n.id,name:s(cc)||"",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 Dd(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(),h=l(V,n),m=l(V,s),b=r(p).filter(w=>h.has(w.fact.subject)&&m.has(w.fact.object));if(b.length){let w=b.slice().sort((v,k)=>c(v.fact,k.fact))[0];return{citation:[i(w.fact),...w.aliasFacts.map(v=>`${a(v)}${v.provenance?` (source: ${v.provenance})`:""}`)]}}let g=Md(e,p),y=g?.attributes?.find(w=>w.prop===mr)?.value;if(g&&y===bi){let w=g.attributes.find(P=>P.prop==="mgx:ruleBase1")?.value,v=g.attributes.find(P=>P.prop==="mgx:ruleBase2")?.value,k=V(n),$=V(s);if(!w||!v||!k||!$)return null;let _=f({entity:k,hopsTaken:0},P=>P.hopsTaken===2&&P.entity===$,P=>{if(P.hopsTaken>=2)return[];let T=P.hopsTaken===0?w:v;return r(T).filter(F=>F.fact.subject===P.entity).map(F=>({action:F,nextState:{entity:F.fact.object,hopsTaken:P.hopsTaken+1}}))},{maxDepth:2,stateKey:P=>`${P.entity}#${P.hopsTaken}`});if(!_)return null;let R=new Set,I=[];for(let P of _.actions){I.push(i(P.fact));for(let T of P.aliasFacts){let F=T.id||`${T.subject}|${T.predicate}|${T.object}`;R.has(F)||(R.add(F),I.push(`${a(T)}${T.provenance?` (source: ${T.provenance})`:""}`))}}return{citation:I}}if(g&&y===wi){let w=g.attributes.find(S=>S.prop==="mgx:ruleBase1")?.value,v=g.attributes.find(S=>S.prop==="mgx:ruleFilterProperty")?.value;if(!w||!v)return null;let k=await Dd(e,w,n,s,o);if(!k)return null;let $=V(n),x=V(v),E=u.find(S=>S.predicate===d&&S.subject===$&&V(S.object)===x);return E?{citation:[...k.citation,i(E)]}:null}return null}async function dw(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(V,n),h=o(f).filter(g=>p.has(g.fact.object));if(h.length){let g=new Map;for(let y of h)g.has(y.fact.subject)||g.set(y.fact.subject,[]),g.get(y.fact.subject).push(y);return[...g.entries()].map(([y,w])=>{let v=w.slice().sort((k,$)=>l(k.fact,$.fact))[0];return{subject:y,citation:[r(v.fact),...v.aliasFacts.map(k=>`${i(k)}${k.provenance?` (source: ${k.provenance})`:""}`)]}})}let m=Md(e,f),b=m?.attributes?.find(g=>g.prop===mr)?.value;if(m&&b===bi){let g=m.attributes.find(x=>x.prop==="mgx:ruleBase1")?.value,y=m.attributes.find(x=>x.prop==="mgx:ruleBase2")?.value,w=V(n);return!g||!y||!w?[]:d({entity:w,hopsTaken:0},x=>{if(x.hopsTaken>=2)return[];let E=x.hopsTaken===0?y:g;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,_=[];for(let R of E.actions.slice().reverse()){_.push(r(R.fact));for(let I of R.aliasFacts){let P=I.id||`${I.subject}|${I.predicate}|${I.object}`;S.has(P)||(S.add(P),_.push(`${i(I)}${I.provenance?` (source: ${I.provenance})`:""}`))}}return{subject:x.entity,citation:_}})}if(m&&b===wi){let g=m.attributes.find($=>$.prop==="mgx:ruleBase1")?.value,y=m.attributes.find($=>$.prop==="mgx:ruleFilterProperty")?.value;if(!g||!y)return[];let w=await dw(e,g,n,s),v=V(y),k=[];for(let $ of w){let x=V($.subject),E=c.find(S=>S.predicate===u&&S.subject===x&&V(S.object)===v);E&&k.push({subject:$.subject,citation:[...$.citation,r(E)]})}return k}return[]}function ht(e,t={}){let n=zd(e),s=Vb(e),o=[];for(let[r,i]of n.groups){let a=Ud(r,i,n),l=s?.get(r);a.trust=qi(l?l.inputs:a.assertions,t).score,o.push(a)}return o}function zd(e){let t=e?.individuals||[],n=new Map(t.filter(l=>l?.class===pr).map(l=>[l.id,l])),s=(e?.objectProperties||[]).find(l=>l?.prop===mn),o=new Map;for(let l of s?.examples||[])o.has(l.subject)||o.set(l.subject,[]),o.get(l.subject).push(l.object);let r=new Map,i=new Map;for(let l of t){if(l?.class===rn){let d=Dt(l.id),f=i.get(d);f?f.push(l):i.set(d,[l]);continue}if(l?.class!==ft||(l.attributes||[]).some(d=>d?.prop===gi)||cr(l.id))continue;let c=Dt(l.id),u=r.get(c);u?u.push(l):r.set(c,[l])}for(let[l,c]of i){let u=r.get(l);if(!u)continue;let d=u.filter(f=>!Ua(c,f.id,hr(Gn(f,"mgx:factProvenance").split(" | ").filter(Boolean),Gn(f,Ze))));d.length!==u.length&&(d.length?r.set(l,d):r.delete(l))}let a=new Map;for(let[l,c]of r){c.sort((f,p)=>f.id<p.id?-1:f.id>p.id?1:0);let u=md(fi(c[0],"subject"),fi(c[0],"predicate")),d=a.get(u);d?d.push(l):a.set(u,[l])}return{groups:r,groupsByPair:a,statedByRecord:o,sourceTypeOf:l=>(n.get(l)?.attributes||[]).find(c=>c?.prop==="mgx:sourceType")?.value||""}}function Ud(e,t,n){let{statedByRecord:s,sourceTypeOf:o}=n,r=Gn,i=fi,a=[],l=[],c=[],u=new Set,d=[],f=new Set,p="";for(let b of t){if(Ms(b.id)){let x=ri(b.id),E=Pa(b);for(let S of E)l.includes(S)||(l.push(S),x&&c.push(x));a.push({id:b.id,sourceId:"",sourceType:x,provenance:"",createdAt:r(b,Un),ownTrust:Number(r(b,ar))||0,assertedAt:r(b,Bn),rollup:{count:Number(r(b,oi))||E.length,sourceIds:E,earliest:r(b,Un),latest:r(b,Bn)}});continue}let g=r(b,"mgx:factProvenance").split(" | ").filter(Boolean);for(let x of g)u.add(x);let[y]=s.get(b.id)||[],w=y||r(b,wo),v=o(w);y&&!l.includes(y)&&(l.push(y),v&&c.push(v));let k=r(b,Ze),$=r(b,pi);a.push({id:b.id,sourceId:w,sourceType:v,provenance:g.join(" | "),createdAt:k,...$?{observedAt:$}:{},ownTrust:Number(r(b,Do))||0,assertedAt:hr(g,k)}),p=p||i(b,"quantifier");for(let x of i(b,"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 h=[],m=new Set;for(let b of d)for(let g of b)m.has(g)||(m.add(g),h.push(g));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:h,assertions:a}}function WA(e){let t=Gn(e,wo);if(t)return t;let n=String(e?.id||""),s=n.indexOf("@");if(s<0)return"";let o=n.slice(s+1),r=o.indexOf("#");return r<0?o:o.slice(0,r)}async function GA(e,t,{provenance:n="",retractedAt:s=""}={}){let o=new Set((t||[]).filter(Boolean)),r=[],i=[];if(!o.size)return{removed:r,records:i};let a=s||ws();return await $s(e,l=>{let c=new Set,u=new Set,d=new Map;l.individuals=(l.individuals||[]).filter(f=>{if(f?.class!==ft)return!0;let p=Dt(f.id),h=o.has(f.id)?f.id:o.has(p)?p:"";if(!h)return!0;u.add(h),c.add(f.id);let m=WA(f),b=`${p}\0${m}`,g=Gn(f,"mgx:factProvenance"),y=d.get(b);return y?(y.ids.push(f.id),g&&y.tags.push(g)):d.set(b,{groupId:p,sourceId:m,ids:[f.id],tags:g?[g]:[],template:{label:f.label||"",subject:Gn(f,"rdf:subject"),predicate:Gn(f,"rdf:predicate"),object:Gn(f,"rdf:object")}}),!1});for(let f of u)r.push(f);if(r.length){for(let f of c)i.push(f);for(let f of l.objectProperties||[]){let p=f.examples||[];f.examples=p.filter(h=>!c.has(h?.subject)&&!c.has(h?.object)),f.count=f.examples.length}for(let f of d.values()){let p=pb({groupId:f.groupId,sourceId:f.sourceId,recordIds:f.ids,retractedAt:a,template:f.template,provenance:[...f.tags,n].filter(Boolean).join(" | ")});p&&ys(l,p)}qn(l)}}),{removed:r,records:i}}function VA(e){let t=[];for(let n of e?.individuals||[]){if(n?.class!==rn)continue;let s=Ba(n);s&&t.push(s)}return t.sort((n,s)=>n.id<s.id?-1:n.id>s.id?1:0)}async function qA(e,t){let n=[];for(let o of t||[]){let r=Wa(o);r&&n.push(r)}let s=[];return n.length?(await $s(e,o=>{let r=new Map;for(let a of n){let l=ys(o,a),c=Dt(l.id),u=r.get(c);u?u.push(l):r.set(c,[l])}let i=new Set;for(let[a,l]of r)for(let c of yo(o,a)){let u=Fs(o,c);if(!u)continue;let d=Gn(u,"mgx:factProvenance").split(" | ").filter(Boolean);Ua(l,c,hr(d,Gn(u,Ze)))&&i.add(c)}if(i.size){Od(o,i);for(let a of i)s.push(a)}qn(o)}),{merged:n.length,removed:s}):{merged:0,removed:s}}function HA(e,{self:t="",acknowledgedBy:n=null}={}){let s=Ga(ht(e)),o=[];for(let r of e?.individuals||[])r?.class===rn&&r.id&&o.push(r.id);return{roster:s,retirable:Va({recordIds:o,roster:s,self:t,acknowledgedBy:n})}}async function KA(e,t){let n=new Set((t||[]).filter(Boolean)),s=[];return n.size?(await $s(e,o=>{let r=new Set;if(o.individuals=(o.individuals||[]).filter(a=>a?.class!==rn||!n.has(a.id)?!0:(r.add(a.id),!1)),!r.size)return;for(let a of r)s.push(a);let i=zt(o);if(i)for(let a of r){i.individualsById.delete(a);let l=Dt(a),c=(i.retractionsByGroup.get(l)||[]).filter(u=>!r.has(u.id));c.length?i.retractionsByGroup.set(l,c):i.retractionsByGroup.delete(l)}qn(o)}),{retired:s}):{retired:s}}function pw(e,{floor:t=YA}={}){let n=ht(e).filter(r=>r.trust>=t),s=new Map;for(let r of n){if(Ca(r.predicate)===zu)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=Ca(r[0].predicate);i!==Uu&&!Wu(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 dr,yd,$d,ft,vd,pr,fr,xd,Ed,UT,mn,Sd,Ob,tc,pd,Lb,BT,Ab,WT,fd,kd,Nb,GT,bs,pi,wo,nc,gi,Bb,Gn,fi,md,Wb,Vb,YT,eA,Ib,jn,Jb,gd,pA,dd,hA,_d,Qb,Td,Zb,bd,zt,rc,ws,Cd,_A,bi,wi,Ld,Nd,ac,yi,Pd,DA,cc,mr,uw,zA,UA,YA,gr,XA,JA,Be=C(()=>{_t();We();js();Ot();Ot();ns();Jg();ns();Ia();Xu();nd();rd();bb();Xu();nd();rd();dr=Z(".tmct","memory"),yd=Z(dr,"graph.json"),$d="Utterance",ft="Fact",vd="Session",pr="Source",fr="Rule",xd="mgx:saidInSession",Ed="mgx:inReplyTo",UT="mgx:derivedFrom",mn="mgx:statedBy",Sd="mgx:canonicalisedFrom",Ob="mgx:sourceReliability",tc="src:operator-chat",pd="src:teach-chat",Lb="src:teach-node",BT=new Set(["visitor","tmct"]),Ab=48,WT=[{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:xd,predicate:"saidInSession",note:"Utterance \u2192 Session it was said in; runtime observation, owned (no SEON term)"},{prop:Ed,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:Ze,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:Rs,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:UT,predicate:"derivedFrom",note:"umbrella: a Fact derived from a Source (or another Fact). ext ref prov:wasDerivedFrom (UNVERIFIED-pending-web-check)"},{prop:mn,predicate:"statedBy",note:"subPropertyOf derivedFrom: a Source directly asserts this Fact (one edge per independent source \u2014 replaces the factProvenance union)"},{prop:Sd,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:Do,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:Gi,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:nr,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)"}];fd=e=>di(e),kd="memory",Nb="sqlite";GT=`
|
|
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);
|
|
@@ -148,84 +148,84 @@ CREATE TABLE IF NOT EXISTS fact_object_supersessions (
|
|
|
148
148
|
${r.join(`
|
|
149
149
|
`)}${i}
|
|
150
150
|
(${hw(s)})`}function dc(e,t){let n=V(t),s=e.filter(a=>fw.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,$o).join(", ")}`),r.length){let a=r.length>$o?`, +${r.length-$o} more`:"";i.push(`known subclasses (${r.length}): ${r.slice(0,$o).join(", ")}${a}`)}return i.push(`(${hw(s)})`),i.join(`
|
|
151
|
-
`)}var fw,$o,vo=C(()=>{We();
|
|
151
|
+
`)}var fw,$o,vo=C(()=>{We();Be();fw=new Set(["rdfs:subClassOf","rdf:type"]),$o=40});async function mw(e,{graph:t,svc:n,config:s}){let o=st(e,"symbol"),{match:r,candidates:i}=on(n.graph,o);if(r)return Al(t,r,{candidates:i});let a=dc(await bn(s),o);if(a)return a;St(n,o,"symbol")}var gw=C(()=>{Ie();vo();qe()});async function bw(e,{graph:t,svc:n,repoRoot:s}){let o=st(e,"symbol"),{match:r,candidates:i}=St(n,o,"symbol"),a=Tt(r);if(!a)throw new _e(`"${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 ps({readFile:Re,repoRoot:s,path:a.path,start:a.start,end:a.end,maxLines:Qr})}catch(b){throw b instanceof _e?b:new _e(`could not read ${a.path} (${b?.code||b?.message||b})`)}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
152
|
\u2026 (truncated to ${Qr} lines; full span ${d})`:"",h=i.length?`
|
|
153
153
|
(other matches: ${i.map(b=>b.label).join(", ")})`:"",m=Ol(t,r);return`${f}
|
|
154
154
|
${c}${p}${m?`
|
|
155
155
|
${m}`:""}${h}`}var ww=C(()=>{_t();Vt();$a();Ie();qe()});var yw,$w=C(()=>{Ie();qe();yw=it(Oh)});function vw(e,{graph:t,svc:n}){let{match:s}=St(n,st(e,"module"),"module");return xh(t,s)}var xw=C(()=>{Ie();qe()});async function Ew(e,{graph:t,config:n}){let s=String(e?.query||"").trim(),o=String(e?.kind||"").trim();if(!s&&!o)throw new _e("query is required");let r=Ih(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=dc(await bn(n),s);if(i)return i}return r}var Sw=C(()=>{Vt();Ie();vo()});async function kw(e,{graph:t,svc:n,config:s}){let o=st(e,"class"),{match:r}=on(n.graph,o);if(r)return Ch(t,r,{toolNamePrefix:s?.toolNamePrefix});let i=uc(await bn(s),o);if(i)return i;St(n,o,"class")}var jw=C(()=>{Ie();vo();qe()});async function Rw(e,{graph:t,svc:n,config:s}){let o=st(e,"class"),{match:r}=on(n.graph,o);if(r)return Lh(t,r);let i=uc(await bn(s),o);if(i)return i;St(n,o,"class")}var _w=C(()=>{Ie();vo();qe()});function Tw(e,{conceptBase:t="concept:",relationMap:n=ZA}={}){let s=new Set(n.synonym||[]),o=new Set(n.related||[]),r=new Map,i=b=>{r.has(b)||r.set(b,b)},a=b=>{let g=b;for(;r.get(g)!==g;)g=r.get(g);for(;r.get(b)!==g;){let y=r.get(b);r.set(b,g),b=y}return g},l=(b,g)=>{let y=a(b),w=a(g);y!==w&&(y<w?r.set(w,y):r.set(y,w))},c=[];for(let b of e){let g=b.predicate;if(!s.has(g)&&!o.has(g))continue;let y=V(b.subject),w=V(b.object);!y||!w||(i(y),i(w),s.has(g)?l(y,w):c.push({s:y,o:w}))}let u=b=>t+b.replace(/ /g,"_"),d=new Map;for(let b of r.keys()){let g=a(b);d.has(g)||d.set(g,new Set),d.get(g).add(b)}let f=[];for(let[b,g]of d){let y=[...g].sort();f.push({id:u(b),prefLabel:b,altLabels:y.filter(w=>w!==b)})}f.sort((b,g)=>b.id<g.id?-1:b.id>g.id?1:0);let p=new Set,h=[];for(let{s:b,o:g}of c){let y=u(a(b)),w=u(a(g));if(y===w)continue;let v=y<w?`${y}\0${w}`:`${w}\0${y}`;p.has(v)||(p.add(v),h.push({subject:y,object:w}))}return h.sort((b,g)=>`${b.subject}${b.object}`<`${g.subject}${g.object}`?-1:1),{concepts:f,related:h,conceptIdForTerm:b=>{let g=V(b);return r.has(g)?u(a(g)):null},namespace:QA}}function Bd(e,t,n={}){let s=Tw(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=V(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 QA,ZA,pc=C(()=>{Ot();QA="http://www.w3.org/2004/02/skos/core#",ZA={synonym:["mgx:synonym"],related:["mgx:relatedTo","mgx:similarTo"]}});async function Wd(e,{config:t,memoryBackend:n=null}){let s=st(e,"term"),o=Bd(await bn(t,n),s);if(!o)throw new _e(`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)"),Ns({content:r.join(`
|
|
156
|
-
`),data:o})}var Aw=C(()=>{Vt();pc();vo();qe();Wd.ownsGraphLoad=!0});function fI(e,t){let n=[];for(let s of t||[])s?.predicate===eI&&V(s.subject)===e&&n.push(V(s.object));return n}function fc(e,t){let n=V(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 fI(i,t))s.has(a)||o.push(a)}}return r}var eI,tI,nI,sI,oI,rI,iI,aI,cI,lI,uI,dI,pI,Iw,Gd=C(()=>{Ot();eI="rdfs:subClassOf",tI='<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>',nI='<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>',sI='<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>',oI='<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>',rI='<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>',iI='<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>',aI='<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>',cI='<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>',lI='<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>',uI='<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>',dI='<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>',pI='<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>',Iw=Object.freeze({spider:tI,fly:nI,egg:sI,poodle:oI,dog:rI,animal:iI,room:aI,furniture:cI,portable:lI,person:uI,adventurer:dI,container:pI})});function hI(e){return[...new Set([...e.matchAll(/\bid="([^"]+)"/g)].map(t=>t[1]))]}function Cw(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 hI(e)){let r=`${o}-${n}`;s=s.split(`id="${o}"`).join(`id="${r}"`),s=s.split(`url(#${o})`).join(`url(#${r})`)}return s}var Ow=C(()=>{});function mI(e,t){return(t||[]).filter(n=>Array.isArray(n?.classes)&&n.classes.includes(e))}function gI(e){let t=e?.match;return t?Array.isArray(t)?t:[t]:[]}function Mw(e){return gI(e).filter(t=>t?.property&&t.value!==void 0)}function bI(e,t){return e.length?e.every(n=>(t||[]).some(s=>s.predicate===n.property&&s.object===n.value)):!1}function wI(e,t){let n=null,s=0;for(let o of e){let r=Mw(o);r.length<=s||bI(r,t)&&(n=o,s=r.length)}return n}function yI(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 Lw(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=yI(n,o,r[i.object]);a&&(n=a,s+=1)}return s>0?n:null}function $I(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 Nw(e,t){let n=t;for(let s of $I(e))n=n.split(s).join("");return n}function Pw(e,t,n){let s=mI(e,n),o=wI(s,t);if(o&&!o.parameters)return o.svg;if(o)return Nw(o,Lw(o,t)||o.svg);for(let a of s){if(a.match||!a.parameters)continue;let l=Lw(a,t);if(l)return l}let r=s.find(a=>!a.match&&!a.parameters);if(r)return r.svg;let i=s.find(a=>!a.match&&a.parameters);return i?Nw(i,i.svg):null}function vI(e,t,n,s,o,r){for(let a of fc(e,t)){let l=Pw(a,n,s);if(l)return l;if(Object.prototype.hasOwnProperty.call(o,a))return o[a]}let i=Pw(r,n,s);return i||o[r]}function Fw(e,t,n,s,o,{rootFallback:r="animal",instanceKey:i}={}){let a=vI(e,t,n,s,o,r);return i?Cw(a,i):a}var cD,lD,Vd=C(()=>{Gd();Ow();cD=Object.freeze(["left","half-left","half-right","right"]),lD=Object.freeze(["moving"])});function $i(e){for(let t of e||[])if(t?.predicate===xI&&Object.prototype.hasOwnProperty.call(Dw,t.object))return Dw[t.object];return 1}var xI,Dw,qd=C(()=>{xI="mgx:hasProperty",Dw=Object.freeze({small:.8,large:1.3,long:1.2,tall:1.25})});function zw(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,h=a.sizeScaleFor,m=a.expressionPalette,b=[];r&&b.push({predicate:n,object:r}),i&&b.push({predicate:s,object:i});let g={rootFallback:f};a.instanceKey&&(g.instanceKey=a.instanceKey);let y=l(o,d,b,c,u,g),w=_=>l(_,[],b,c,{},{rootFallback:_}),v=_=>Object.prototype.hasOwnProperty.call(u,_),k=(_,R)=>{let I=c.filter(F=>F&&Array.isArray(F.classes)&&F.classes.indexOf(_)>=0),T=I.find(F=>F.svg===R)||I.find(F=>!F.match&&F.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 _ of p(o,d)){let R=w(_);if($.push({term:_,template:!!R,registry:v(_)}),R){x={term:_,via:"template",hops:$.length-1,root:!1,template:k(_,R)};break}if(v(_)){x={term:_,via:"registry",hops:$.length-1,root:!1,template:null};break}}if(!x){let _=w(f);$.push({term:f,template:!!_,registry:v(f),root:!0}),x={term:f,via:_?"template":"registry",hops:$.length-1,root:!0,template:_?k(f,_):null}}}let E=a.instanceKey?l(o,d,b,c,u,{rootFallback:f}):y,S=r?l(o,d,b.filter(_=>_.predicate!==n),c,u,{rootFallback:f}):null;return{class:o,expression:r||null,size:i||null,svg:y,scale:typeof h=="function"?h(b):1,sizeKnown:i&&typeof h=="function"?h([{predicate:s,object:i}])!==1:null,expressionKnown:r&&m?Object.prototype.hasOwnProperty.call(m,r):null,expressionApplied:r?E!==S:null,rootFallback:f,fellBackToRoot:x?!!x.root:null,chain:$,matched:x}}var Uw=C(()=>{});var Bw,Ww,EI,hD,Gw=C(()=>{Vd();Bw="icon tier",Ww="sprite tier",EI=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."})}),hD=Object.freeze(Object.values(EI).map(e=>e.predicate))});var Vw,qw=C(()=>{Vw=()=>[]});var Hw,Kw=C(()=>{Hw=()=>[]});function RI(){let e=Hw();return e.length?{templates:e,tier:Ww}:{templates:Vw(),tier:Bw}}function Yw(e){return e.map(t=>t.term).join(" -> ")}async function Hd(e,{config:t,memoryBackend:n=null}){let s=st(e,"class").toLowerCase(),o=String(e?.expression||"").trim().toLowerCase(),r=String(e?.size||"").trim().toLowerCase();if(o&&!Object.hasOwn(ks,o))throw new _e(`"${o}" is not a sprite expression. The palette holds: ${kI().join(", ")}.`);if(r&&!jI(r))throw new _e(`"${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}=RI(),l=await bn(t,n),c=zw({class:s,expression:o,size:r},{factRows:l,templates:i,spriteRegistry:Iw,resolveSpriteAsset:Fw,classAncestorChain:fc,sizeScaleFor:$i,expressionPalette:ks});if(!c.svg||c.fellBackToRoot)throw new _e(`no sprite for "${s}" \u2014 neither it nor any rdfs:subClassOf ancestor the memory graph knows (${Yw(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 _e(`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: ${Yw(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`),Ns({content:d.join(`
|
|
156
|
+
`),data:o})}var Aw=C(()=>{Vt();pc();vo();qe();Wd.ownsGraphLoad=!0});function fI(e,t){let n=[];for(let s of t||[])s?.predicate===eI&&V(s.subject)===e&&n.push(V(s.object));return n}function fc(e,t){let n=V(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 fI(i,t))s.has(a)||o.push(a)}}return r}var eI,tI,nI,sI,oI,rI,iI,aI,cI,lI,uI,dI,pI,Iw,Gd=C(()=>{Ot();eI="rdfs:subClassOf",tI='<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>',nI='<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>',sI='<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>',oI='<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>',rI='<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>',iI='<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>',aI='<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>',cI='<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>',lI='<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>',uI='<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>',dI='<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>',pI='<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>',Iw=Object.freeze({spider:tI,fly:nI,egg:sI,poodle:oI,dog:rI,animal:iI,room:aI,furniture:cI,portable:lI,person:uI,adventurer:dI,container:pI})});function hI(e){return[...new Set([...e.matchAll(/\bid="([^"]+)"/g)].map(t=>t[1]))]}function Cw(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 hI(e)){let r=`${o}-${n}`;s=s.split(`id="${o}"`).join(`id="${r}"`),s=s.split(`url(#${o})`).join(`url(#${r})`)}return s}var Ow=C(()=>{});function mI(e,t){return(t||[]).filter(n=>Array.isArray(n?.classes)&&n.classes.includes(e))}function gI(e){let t=e?.match;return t?Array.isArray(t)?t:[t]:[]}function Mw(e){return gI(e).filter(t=>t?.property&&t.value!==void 0)}function bI(e,t){return e.length?e.every(n=>(t||[]).some(s=>s.predicate===n.property&&s.object===n.value)):!1}function wI(e,t){let n=null,s=0;for(let o of e){let r=Mw(o);r.length<=s||bI(r,t)&&(n=o,s=r.length)}return n}function yI(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 Lw(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=yI(n,o,r[i.object]);a&&(n=a,s+=1)}return s>0?n:null}function $I(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 Nw(e,t){let n=t;for(let s of $I(e))n=n.split(s).join("");return n}function Pw(e,t,n){let s=mI(e,n),o=wI(s,t);if(o&&!o.parameters)return o.svg;if(o)return Nw(o,Lw(o,t)||o.svg);for(let a of s){if(a.match||!a.parameters)continue;let l=Lw(a,t);if(l)return l}let r=s.find(a=>!a.match&&!a.parameters);if(r)return r.svg;let i=s.find(a=>!a.match&&a.parameters);return i?Nw(i,i.svg):null}function vI(e,t,n,s,o,r){for(let a of fc(e,t)){let l=Pw(a,n,s);if(l)return l;if(Object.prototype.hasOwnProperty.call(o,a))return o[a]}let i=Pw(r,n,s);return i||o[r]}function Fw(e,t,n,s,o,{rootFallback:r="animal",instanceKey:i}={}){let a=vI(e,t,n,s,o,r);return i?Cw(a,i):a}var lD,uD,Vd=C(()=>{Gd();Ow();lD=Object.freeze(["left","half-left","half-right","right"]),uD=Object.freeze(["moving"])});function $i(e){for(let t of e||[])if(t?.predicate===xI&&Object.prototype.hasOwnProperty.call(Dw,t.object))return Dw[t.object];return 1}var xI,Dw,qd=C(()=>{xI="mgx:hasProperty",Dw=Object.freeze({small:.8,large:1.3,long:1.2,tall:1.25})});function zw(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,h=a.sizeScaleFor,m=a.expressionPalette,b=[];r&&b.push({predicate:n,object:r}),i&&b.push({predicate:s,object:i});let g={rootFallback:f};a.instanceKey&&(g.instanceKey=a.instanceKey);let y=l(o,d,b,c,u,g),w=_=>l(_,[],b,c,{},{rootFallback:_}),v=_=>Object.prototype.hasOwnProperty.call(u,_),k=(_,R)=>{let I=c.filter(F=>F&&Array.isArray(F.classes)&&F.classes.indexOf(_)>=0),T=I.find(F=>F.svg===R)||I.find(F=>!F.match&&F.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 _ of p(o,d)){let R=w(_);if($.push({term:_,template:!!R,registry:v(_)}),R){x={term:_,via:"template",hops:$.length-1,root:!1,template:k(_,R)};break}if(v(_)){x={term:_,via:"registry",hops:$.length-1,root:!1,template:null};break}}if(!x){let _=w(f);$.push({term:f,template:!!_,registry:v(f),root:!0}),x={term:f,via:_?"template":"registry",hops:$.length-1,root:!0,template:_?k(f,_):null}}}let E=a.instanceKey?l(o,d,b,c,u,{rootFallback:f}):y,S=r?l(o,d,b.filter(_=>_.predicate!==n),c,u,{rootFallback:f}):null;return{class:o,expression:r||null,size:i||null,svg:y,scale:typeof h=="function"?h(b):1,sizeKnown:i&&typeof h=="function"?h([{predicate:s,object:i}])!==1:null,expressionKnown:r&&m?Object.prototype.hasOwnProperty.call(m,r):null,expressionApplied:r?E!==S:null,rootFallback:f,fellBackToRoot:x?!!x.root:null,chain:$,matched:x}}var Uw=C(()=>{});var Bw,Ww,EI,mD,Gw=C(()=>{Vd();Bw="icon tier",Ww="sprite tier",EI=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."})}),mD=Object.freeze(Object.values(EI).map(e=>e.predicate))});var Vw,qw=C(()=>{Vw=()=>[]});var Hw,Kw=C(()=>{Hw=()=>[]});function RI(){let e=Hw();return e.length?{templates:e,tier:Ww}:{templates:Vw(),tier:Bw}}function Yw(e){return e.map(t=>t.term).join(" -> ")}async function Hd(e,{config:t,memoryBackend:n=null}){let s=st(e,"class").toLowerCase(),o=String(e?.expression||"").trim().toLowerCase(),r=String(e?.size||"").trim().toLowerCase();if(o&&!Object.hasOwn(ks,o))throw new _e(`"${o}" is not a sprite expression. The palette holds: ${kI().join(", ")}.`);if(r&&!jI(r))throw new _e(`"${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}=RI(),l=await bn(t,n),c=zw({class:s,expression:o,size:r},{factRows:l,templates:i,spriteRegistry:Iw,resolveSpriteAsset:Fw,classAncestorChain:fc,sizeScaleFor:$i,expressionPalette:ks});if(!c.svg||c.fellBackToRoot)throw new _e(`no sprite for "${s}" \u2014 neither it nor any rdfs:subClassOf ancestor the memory graph knows (${Yw(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 _e(`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: ${Yw(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`),Ns({content:d.join(`
|
|
157
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 SI,kI,jI,Xw=C(()=>{Vt();Gd();Vd();Ui();qd();Uw();Gw();qw();Kw();vo();qe();SI="mgx:hasProperty",kI=()=>Object.keys(ks).sort(),jI=e=>!!e&&$i([{predicate:SI,object:String(e)}])!==1;Hd.ownsGraphLoad=!0});function Jw(e,{graph:t}){return Nh(t,{pkg:String(e?.package||"").trim()})}var Qw=C(()=>{Ie()});function Zw(e,{graph:t,svc:n}){let{match:s}=St(n,st(e,"module"),"module");return nm(t,s)}var ey=C(()=>{Ie();qe()});function ty(e,{graph:t,codeDomainActive:n=null}){return Fh(t,{codeDomainActive:n})}var ny=C(()=>{Ie()});function oy(e,t){return Ns({content:e,data:t,text:`${e}${sy}${JSON.stringify(t,null,2)}`})}function ry(e,{graph:t}){let{content:n,tmct_ask:s}=Os(t,st(e,"query"));return oy(n,s)}var sy,hc=C(()=>{Pn();qe();sy=`
|
|
158
158
|
|
|
159
159
|
---tmct_ask---
|
|
160
160
|
`});var iy,ay=C(()=>{Ie();qe();iy=it(Mh)});var cy,ly=C(()=>{Ie();qe();cy=it(Dh)});var uy,dy=C(()=>{Ie();qe();uy=it(qh)});var py,fy=C(()=>{Ie();qe();py=it(Kh)});var hy,my=C(()=>{Ie();qe();hy=it(Yh)});var gy,by=C(()=>{Ie();qe();gy=it(Uh)});var wy,yy=C(()=>{Ie();qe();wy=it(Bh)});var $y,vy=C(()=>{Ie();qe();$y=it(Gh)});var xy,Ey=C(()=>{Ie();qe();xy=it(tm)});function _I(e){let t={subject:e.subject,predicate:e.predicate,object:e.object,provenance:e.provenance||""};return e.quantifier&&(t.quantifier=e.quantifier),t}function TI(e){let t=(e||[]).map(_I);return t.map(n=>JSON.stringify(n)).join(`
|
|
161
161
|
`)+(t.length?`
|
|
162
|
-
`:"")}function Sy(e){return TI(ht(e))}var ky=C(()=>{
|
|
162
|
+
`:"")}function Sy(e){return TI(ht(e))}var ky=C(()=>{Be()});async function Kd(e,{config:t,memoryBackend:n=null}){let s=n?null:await zs(he(he(t.graphFile))),o=n||s.dir;try{return Sy(await at(o))||"(the memory store holds no facts to export)"}finally{s&&await s.close()}}var jy=C(()=>{ky();We();Be();Kd.ownsGraphLoad=!0});async function Yd(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 zs(he(he(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 Ns({content:l?`${c}
|
|
163
163
|
${a.canonical.join(`
|
|
164
|
-
`)}`:c,data:{...a,grounded:l}})}finally{await i()}}var Ry=C(()=>{We();
|
|
164
|
+
`)}`:c,data:{...a,grounded:l}})}finally{await i()}}var Ry=C(()=>{We();Be();qe();Yd.ownsGraphLoad=!0});var AI,_y=C(()=>{Eu();Tg();gw();ww();$w();xw();Sw();jw();_w();Aw();Xw();Qw();ey();ny();hc();ay();ly();dy();fy();my();by();yy();vy();Ey();jy();Ry();AI=Object.freeze({tmct_context:xu,tmct_context_more:_g,tmct_describe:mw,tmct_snippet:bw,tmct_signature:yw,tmct_impact:vw,tmct_search:Ew,tmct_members:kw,tmct_subclasses:Rw,tmct_related:Wd,tmct_sprite:Hd,tmct_architecture:Jw,tmct_exports:Zw,tmct_untested:ty,tmct_ask:ry,tmct_tests_for:iy,tmct_history:cy,tmct_file_history:uy,tmct_method_history:py,tmct_class_history:hy,tmct_callers:gy,tmct_callees:wy,tmct_calls:$y,tmct_cochanges:xy,tmct_export:Kd,tmct_ingest:Yd})});var Xd=C(()=>{});var mc,Jd=C(()=>{mc=()=>({relations:[],constructions:[]})});var Ty,Ay=C(()=>{_t();We();Uf();Vt();Nr();Pn();Ea();Sa();_y();hc();qe();qo();ua();Xd();Jd();Sa();Eu();hc();da(void 0);la(mc);Ty=zf.map(({name:e,agentDescription:t,inputSchema:n})=>({name:e,description:t,inputSchema:n}))});var wU,yU,$U,gc=C(()=>{wU=Object.freeze(["entity","set","event","measure"]),yU=Object.freeze(["date","count","op","pivot","metric","kind","provenance"]),$U=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 mt,xU,EU,SU,kU,jU,RU,_U,TU,AU,IU,CU,OU,LU,NU,PU,MU,II,FU,DU,Iy=C(()=>{mt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},xU=mt("createRequire"),EU=mt("readFileSync"),SU=mt("access"),kU=mt("readFile"),jU=mt("writeFile"),RU=mt("appendFile"),_U=mt("mkdir"),TU=mt("mkdtemp"),AU=mt("rename"),IU=mt("unlink"),CU=mt("rm"),OU=mt("stat"),LU=mt("copyFile"),NU=mt("readdir"),PU=mt("createReadStream"),MU=mt("createWriteStream"),II=mt("randomBytes"),FU=mt("spawnSync"),DU=mt("createInterface")});var bc=C(()=>{Iy()});var gt,WU,GU,VU,qU,HU,KU,YU,XU,JU,QU,ZU,e2,t2,n2,s2,o2,Lt,r2,i2,a2,Bs=C(()=>{gt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},WU=gt("createRequire"),GU=gt("readFileSync"),VU=gt("access"),qU=gt("readFile"),HU=gt("writeFile"),KU=gt("appendFile"),YU=gt("mkdir"),XU=gt("mkdtemp"),JU=gt("rename"),QU=gt("unlink"),ZU=gt("rm"),e2=gt("stat"),t2=gt("copyFile"),n2=gt("readdir"),s2=gt("createReadStream"),o2=gt("createWriteStream"),Lt=e=>String(e),r2=gt("randomBytes"),i2=gt("spawnSync"),a2=gt("createInterface")});var Dy={};Gt(Dy,{PHRASEBOOK_FILE:()=>Ly,TECHNICAL_SLOTS:()=>Zd,TEMPLATES_FILE:()=>Oy,flatten:()=>tp,loadPhrasebook:()=>NI,loadTemplates:()=>np,loadTemplatesMerged:()=>LI,render:()=>Fy,renderSegments:()=>My,slotKind:()=>Py,slotsOf:()=>ep});function ep(e){let t=[];for(let n of String(e).matchAll(Ny))t.includes(n[1])||t.push(n[1]);return t}function Py(e){return OI[e]||"entity"}function tp(e){let t="";for(let n of e)t+=n.text;return t}function My(e,t={},n=vi){if(!n)throw new Error("renderSegments() before loadTemplates() \u2014 load the template library first");let s=n.get(e);if(!s)throw new Error(`unknown template id "${e}"`);let o=s.slots.filter(u=>t[u]===void 0||t[u]===null);if(o.length)throw new Error(`template "${e}" missing slot${o.length>1?"s":""}: ${o.join(", ")}`);let r=s.template,i=new RegExp(Ny.source,"g"),a=[],l=0,c;for(;(c=i.exec(r))!==null;)c.index>l&&a.push({type:"prose",text:r.slice(l,c.index)}),a.push({type:Py(c[1]),text:String(t[c[1]])}),l=c.index+c[0].length;return l<r.length&&a.push({type:"prose",text:r.slice(l)}),a}async function np(e=Oy){let t=await Re(e,"utf8"),n=new Map,s=t.split(`
|
|
165
165
|
`);for(let o=0;o<s.length;o+=1){let r=s[o].trim();if(!r)continue;let i;try{i=JSON.parse(r)}catch(l){throw new Error(`${e}:${o+1}: not valid JSON: ${l.message}`)}for(let l of["id","class","template","register"])if(typeof i[l]!="string"||!i[l])throw new Error(`${e}:${o+1}: missing/empty "${l}"`);if(!CI.has(i.register))throw new Error(`${e}:${o+1}: register must be terse|friendly|technical, got "${i.register}"`);if(n.has(i.id))throw new Error(`${e}:${o+1}: duplicate template id "${i.id}"`);let a=ep(i.template);if(i.register==="technical"){let l=a.filter(c=>!Zd.has(c));if(l.length)throw new Error(`${e}:${o+1}: technical template "${i.id}" uses non-mechanical slot${l.length>1?"s":""}: ${l.join(", ")} (allowed: ${[...Zd].join(", ")})`);if(!a.includes("provenance"))throw new Error(`${e}:${o+1}: technical template "${i.id}" must carry a {provenance} fill (an advanced claim always shows its source)`)}n.set(i.id,{...i,slots:a})}return vi=n,n}async function LI(e=[]){let t=vi,n=new Map;try{for(let s of e){let o=await np(s);for(let[r,i]of o){if(!r.includes(":"))throw new Error(`${s}: extension-pack template id "${r}" is not namespaced ("<packname>:<id>")`);if(n.has(r))throw new Error(`${s}: duplicate template id "${r}" already loaded from an earlier path`);n.set(r,i)}}}finally{vi=t}return n}function Fy(e,t={},n=vi){if(!n)throw new Error("render() before loadTemplates() \u2014 load the template library first");return tp(My(e,t,n))}async function NI(e=Ly){let t=await Re(e,"utf8"),n=[],s=[],o=t.split(`
|
|
166
|
-
`);for(let r=0;r<o.length;r+=1){let i=o[r].trim();if(!(!i||i.startsWith("#"))){if(i.startsWith("~")){let a=i.slice(1).split(",").map(l=>l.trim().toLowerCase()).filter(Boolean);if(a.length<2)throw new Error(`${e}:${r+1}: a synonym family needs at least 2 entries`);s.push(a);continue}n.push({pattern:i,slots:ep(i)})}}return{patterns:n,synonyms:s}}var PI,Cy,Oy,Ly,CI,Ny,Zd,OI,vi,wc=C(()=>{_t();Bs();We();PI={},Cy=Z(he(Lt(PI.url)),"..","..",".."),Oy=Z(Cy,"data","templates","responses.jsonl"),Ly=Z(Cy,"data","phrasebook","software-phrases.txt"),CI=new Set(["terse","friendly","technical"]),Ny=/\{([A-Za-z][A-Za-z0-9]*)\}/g,Zd=Object.freeze(new Set(["subject","count","noun","scope","comparison","metric","unit","superlative","provenance"]));OI={count:"number",when:"number",location:"path",commit:"path",provenance:"provenance"};vi=null});function FI(e,t={}){let n=MI.exec(String(e||""));if(!n)return 1;let s=t?.[n[1]];return typeof s=="number"&&Number.isFinite(s)?s:1}function DI(e,t={}){let n=Array.isArray(e?.sourceIds)?e.sourceIds:[];return n.length?Math.max(...n.map(s=>FI(s,t))):1}function Je(e,t={}){return(Array.isArray(e)?e:[]).map((s,o)=>({row:s,index:o,bias:DI(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 MI,zy=C(()=>{MI=/^src:corpus:(.+)$/});var bt,p2,br,f2,h2,m2,g2,b2,w2,y2,$2,v2,x2,E2,S2,Uy,zI,k2,j2,R2,xo=C(()=>{bt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},p2=bt("createRequire"),br=bt("readFileSync"),f2=bt("access"),h2=bt("readFile"),m2=bt("writeFile"),g2=bt("appendFile"),b2=bt("mkdir"),w2=bt("mkdtemp"),y2=bt("rename"),$2=bt("unlink"),v2=bt("rm"),x2=bt("stat"),E2=bt("copyFile"),S2=bt("readdir"),Uy=bt("createReadStream"),zI=bt("createWriteStream"),k2=bt("randomBytes"),j2=bt("spawnSync"),R2=bt("createInterface")});function By(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 GI(e=BI){let t=bo(br(e,"utf8"));return Array.isArray(t.rule)?t.rule:[]}function sp(){if(yc===null)try{yc=GI()}catch{yc=[]}return yc}var VI,UI,BI,WI,L2,yc,op=C(()=>{xo();Bs();We();Xa();wc();VI={},UI=he(Lt(VI.url)),BI=Z(UI,"..","..","data","templates","grammar-rules.toml"),WI=Object.freeze(["prose","entity","path","number","code","provenance","receipt"]),L2=Object.freeze(new Set(WI.filter(e=>e!=="prose")));yc=null});function qI(){if(xi!==void 0)return xi;try{let e=Wy?Wy():HI();xi=e&&e.winkNLP&&e.model?e:null}catch{xi=null}return xi}function HI(){let e=process.getBuiltinModule("node:module").createRequire(KI.url);return{winkNLP:e("wink-nlp"),model:e("wink-eng-lite-web-model")}}function rp(){if(wr!==void 0)return wr;let e=qI();if(!e)return wr=null,null;try{wr=e.winkNLP(e.model)}catch{wr=null}return wr}var KI,Wy,xi,wr,ip=C(()=>{KI={}});var Gy=C(()=>{ip()});var qy,Vy=C(()=>{qy={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:{},rodent:{},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",predicate:"mgx:partOf"},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"]}});var e$={};Gt(e$,{CODE_REF_SHAPE:()=>pp,DETERMINERS:()=>cp,OF_CLASSIFIER_HEADS:()=>Yy,OF_PARTITIVE_HEADS:()=>Xy,QUANTIFIERS:()=>lp,classify:()=>hp,loadLexicon:()=>Rn,lookupAdjective:()=>vc,lookupNoun:()=>Kn,lookupProperName:()=>Ei,lookupVerb:()=>$c,numberOf:()=>up,predicateOf:()=>dp,readsAsIndividualName:()=>fp,thirdPerson:()=>Jy,withProperNames:()=>Zy});function up(e){let t=String(e??"").trim().toLowerCase();return/^\d+$/.test(t)?Number(t):XI[t]??null}function Jy(e){let t=String(e);return t==="have"?"has":/[^aeiou]y$/.test(t)?`${t.slice(0,-1)}ies`:/(s|x|z|ch|sh)$/.test(t)?`${t}es`:`${t}s`}function dp(e,t=Ky){if(e.predicate)return e.predicate;let n=e.prep?e.prep[0].toUpperCase()+e.prep.slice(1):"";return`${t}${Jy(e.lemma)}${n}`}function Qy(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 Hy(e,t={}){for(let[n,s]of Object.entries(t.nouns||{})){let o={lemma:n,...s||{}};if(o.property&&!JI.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(!QI.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 Rn(e,t=Ky){if(!e&&ap.has(t))return ap.get(t);let n=qy,s={nouns:new Map,nounPlurals:new Map,verbs:new Map,adjectives:new Map,properNames:new Map,ns:t};return Hy(s,n),e?(Hy(s,e),s):(ap.set(t,s),s)}function Zy(e,t){let n=new Map(e.properNames);for(let s of t)n.set(String(s).toLowerCase(),String(s));return{...e,properNames:n}}function Kn(e,t,n={}){return ZI(e,t,n)[0]??null}function ZI(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 Qy(s))l(e.nouns.get(c));return i}function $c(e,t){return eC(e,t)[0]??null}function eC(e,t){let n=String(t??"").toLowerCase(),s=[],o=new Set;for(let r of Qy(n)){let i=e.verbs.get(r);i&&!o.has(i.lemma)&&(o.add(i.lemma),s.push(i))}return s}function vc(e,t){return e.adjectives.get(String(t??"").toLowerCase())??null}function Ei(e,t){return e.properNames.get(String(t??"").toLowerCase())??null}function fp(e,t){let n=String(e??"");if(!n)return!1;if(Ei(t,n)||pp.test(n)||/^[a-z][\w]*(?:-[\w]+)+$/i.test(n)||/^[A-Z]/.test(n))return!0;let s=Kn(t,n);return s?s.lemma.toLowerCase()!==n.toLowerCase():!0}function hp(e,t=Rn()){let n=String(e??"").trim();if(!n)return null;let s=n.toLowerCase();if(cp[s])return{pos:"determiner",type:cp[s]};if(lp[s])return{pos:"quantifier",type:lp[s]};let o=up(s);if(o!=null)return{pos:"number",type:"cardinal",value:o};let r=Ei(t,n);if(r)return{pos:"properName",type:"individual",canonical:r};let i=Kn(t,s);if(i)return i.property?{pos:"noun",type:`${i.property}-property`,lemma:i.lemma,property:i.property}:{pos:"noun",type:"class",lemma:i.lemma};let a=$c(t,s);if(a)return{pos:"verb",type:"objectProperty",lemma:a.lemma,predicate:dp(a,t.ns),...a.prep?{prep:a.prep}:{}};let l=vc(t,s);return l?{pos:"adjective",type:l.type,lemma:l.lemma}:null}var Ky,cp,lp,Yy,Xy,XI,JI,QI,ap,pp,Ws=C(()=>{Vy();Ky="tmct:",cp=Object.freeze({every:"universal",a:"indefinite",an:"indefinite",the:"definite",no:"negative"}),lp=Object.freeze({"at least":"owl:minCardinality","at most":"owl:maxCardinality",exactly:"owl:cardinality"}),Yy=Object.freeze(new Set(["type","kind","sort","form","class","variety","species","breed","genus"])),Xy=Object.freeze(new Set(["body","mass","group","collection","set","series","number","amount","piece","part","lot","pair","bunch","pile"])),XI=Object.freeze({one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10});JI=new Set(["data","object"]),QI=new Set(["subclass","data"]);ap=new Map;pp=/[./\\#:@]/});var W2,G2,V2,tC,q2,H2,K2,t$=C(()=>{Pn();Ie();W2=Object.freeze({class:"Class",module:"Module",function:"Function",method:"Method",attribute:"Attribute",variable:"GlobalVariable",constant:"GlobalVariable",commit:"Commit"}),G2=Object.freeze({Class:["class","classes"],Module:["module","modules"],Function:["function","functions"],Method:["method","methods"],Attribute:["attribute","attributes"],GlobalVariable:["variable","variables"],Commit:["commit","commits"]}),V2=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`]}),tC=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"}),q2=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"]}),H2=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"}}),K2=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}`}]})});function Si(e){if(!e||typeof e!="object")return!1;for(let t of["term","title","text","summary","url"])if(typeof e[t]!="string"||!e[t])return!1;if(!Number.isInteger(e.revid)||e.revid<=0)return!1;for(let t of["isa","source","licence"])if(e[t]!==void 0&&(typeof e[t]!="string"||!e[t]))return!1;return!0}function Ec(e,t){let n=String(e??"").split(/(?<=[.!?])\s+/),s="";for(let o of n){let r=s?`${s} ${o}`:o;if(r.length>t)break;s=r}return s||String(e??"").slice(0,t)}function sC(e){let t=e,n;do n=t,t=t.replace(/\s*\([^()]*\)/g,"");while(t!==n);return t}function s$(e,t){let n=Kn(t,e);return n?V(n.lemma):e}function o$(e,t){let n=sC(String(e??"")).match(nC);if(!n)return null;let s=!n[1],o=[];for(let u of n[2].trim().split(/\s+/))if(oC.has(u)||(o.push(u),o.length>=6))break;let r=o;for(let u=r.indexOf("of");u>0;u=r.indexOf("of")){let d=r[u-1]?.split("-").pop(),f=d&&s$(d,t);if(f&&(iC.has(f)||aC.has(f))){r=r.slice(u+1);continue}r=r.slice(0,u);break}for(;r.length&&rC.has(r[0]);)r=r.slice(1);if(!r.length)return null;let i=r[r.length-1].split("-").pop();if(!i)return null;let a=s$(i,t);if(n$.has(i)||n$.has(a))return null;let l=Kn(t,i);if(!l)return null;let c=V(l.lemma);return s&&(!/s$/.test(i)||V(i)===c)?null:c}var xc,nC,oC,n$,rC,iC,aC,yr=C(()=>{Ot();Ws();t$();xc=400;nC=/^[A-Z][^.!?]*? (?:is|are) (?:(a|an|the) )?([a-z][a-z -]{1,60})/;oC=new Set(["that","which","where","who","whose","whom","when","used","found","made","with","in","on","for","from","by","to","and","or"]),n$=new Set(["type","kind","sort","form","class","variety","group","part","piece","member","way","term","name","word","thing","example","family","genus","species","unit","series","set","list","number","amount","body","mass"]),rC=new Set(["a","an","the"]),iC=new Set(["type","kind","sort","form","class","variety","species","breed","genus","group","part","parts","piece","bunch","bit","name","set","way","unit","family","ability","color","series","mammal","practice","list","amount","mass","reworking","blockage","goddess","aura","development","consisting","announcement","messengers","subset","carrying","photograph","adding","use","science","songbird","symptom","accumulation","number","suborder","falling","management","evaluation","superorder","activity","interlacing","introduction"]),aC=new Set(["either","one","each","both","any"])});var Sc,kc=C(()=>{Sc=()=>{throw new Error("gunzipSync unavailable in a browser bundle")}});var cC,aB,r$=C(()=>{xo();kc();Bs();We();yr();cC={},aB=Z(he(Lt(cC.url)),"..","..","..")});function uC(e){if(!e||typeof e!="object")return!1;for(let t of["subject","predicate","object","provenance"])if(typeof e[t]!="string"||!e[t])return!1;return lC.includes(e.predicate)}function i$(e){return Si(e)?e.facts===void 0?!0:Array.isArray(e.facts)&&e.facts.length>0&&e.facts.every(uC):!1}function ki(e,t){return`research:${e}:${V(t)}`}function jc(e){if(!e||typeof e.name!="string"||!e.name||typeof e.create!="function")throw new Error("registerResearchSource: expected { name, create(options) }");dC.set(e.name,{name:e.name,create:e.create})}var lC,dC,dB,pB,ji=C(()=>{Ot();yr();lC=Object.freeze(["rdf:type","rdfs:subClassOf","mgx:partOf","mgx:hasA","mgx:usedFor","mgx:capableOf","mgx:atLocation","mgx:causes","mgx:madeOf","mgx:createdBy","mgx:locatedNear","mgx:hasProperty"]);dC=new Map;dB=Object.freeze(["wikipedia","wikidata"]),pB=Object.freeze({wikipedia:"simple-wikipedia",wikidata:"wikidata"})});function Rc({fetchImpl:e,timeoutMs:t=4e3,minIntervalMs:n=2e3,retryAfterFloorMs:s=5e3,userAgent:o,waitForSlot:r=!1}={}){let i=e??((...g)=>globalThis.fetch(...g)),a=new Map,l=0,c=0,u=!1,d=()=>{if(!o)return null;let g={"Api-User-Agent":o};return typeof document>"u"&&(g["User-Agent"]=o),g};function f(g){let y=Number(g)*1e3;c=Date.now()+Math.max(y||0,s)}async function p(g){let y=typeof AbortController=="function"?new AbortController:null,w=y?setTimeout(()=>y.abort(),t):null;try{let v={};y&&(v.signal=y.signal);let k=d();k&&(v.headers=k);let $=await i(g,v);if($.status===429)return f($.headers?.get?.("retry-after")),null;if(!$.ok)return null;let x=await $.json();return x?.error?.code==="maxlag"?(f($.headers?.get?.("retry-after")),null):x}catch{return null}finally{w!==null&&clearTimeout(w)}}let h=()=>Math.max(c,l+n);async function m(){for(;;){let g=Date.now();if(!u&&g>=h())return l=g,u=!0,!0;if(!r)return!1;await new Promise(y=>setTimeout(y,Math.max(h()-g,25)))}}async function b(g,y){if(a.has(g))return a.get(g);if(!await m())return null;let w=null;try{w=await y()}catch{w=null}finally{u=!1}return a.set(g,w),w}return{fetchJson:p,cachedFetch:b}}var mp=C(()=>{});function gC({fetchImpl:e,origin:t=pC,timeoutMs:n=4e3,minIntervalMs:s=2e3,lexicon:o=null,userAgent:r=mC,waitForSlot:i=!1,sourceName:a=hC}={}){let l=Rc({fetchImpl:e,timeoutMs:n,minIntervalMs:s,userAgent:r,waitForSlot:i});function c(f,p){let h=Array.isArray(p?.[1])?p[1]:[];for(let m of h){let b=V(m);if(b===f||b.startsWith(f))return String(m)}return null}async function u(f,p){let h=await l.fetchJson(`${t}/api/rest_v1/page/summary/${encodeURIComponent(p.replace(/ /g,"_"))}`);if(!h)return null;let m=String(h.extract??""),b=Number(h.revision),g={term:f,title:String(h.title??p),text:m,summary:Ec(m,xc),url:String(h.content_urls?.desktop?.page??`${t}/wiki/${encodeURIComponent(p.replace(/ /g,"_"))}`),revid:b},y=o;if(!y)try{y=Rn()}catch{y=null}let w=y?o$(m,y):null;return w&&(g.isa=w),Si(g)?g:null}async function d(f){let p=await l.fetchJson(`${t}/w/api.php?action=opensearch&format=json&origin=*&maxlag=${5}&search=${encodeURIComponent(f)}&limit=3`),h=p?c(f,p):null;return h?u(f,h):null}return{name:a,origin:t,provenanceTag(f){return ki(a,f)},async lookup(f){let p=String(f??"");return p?l.cachedFetch(p,()=>d(p)):null},async pageByTitle(f){let p=String(f??"").trim();return p?l.cachedFetch(`title\0${V(p)}`,()=>u(V(p),p)):null},async linkedTitles(f,{limit:p=25}={}){let h=String(f??"").trim();if(!h)return null;let m=await l.cachedFetch(`links\0${V(h)}`,async()=>{let g=(await l.fetchJson(`${t}/w/api.php?action=parse&format=json&formatversion=2&origin=*&maxlag=${5}&prop=links&redirects=1&page=${encodeURIComponent(h)}§ion=0`))?.parse?.links;if(!Array.isArray(g))return null;let y=new Set,w=[];for(let v of g){if(!v||v.ns!==0||v.exists===!1)continue;let k=String(v.title??v["*"]??"").trim(),$=V(k);!k||!$||y.has($)||(y.add($),w.push(k))}return w});return Array.isArray(m)?m.slice(0,Math.max(0,p)):null}}}function bC(e={}){return gC({origin:fC,sourceName:c$,waitForSlot:!0,...e})}var pC,fC,hC,c$,mC,l$=C(()=>{Ot();Ws();yr();ji();mp();pC="https://en.wikipedia.org",fC="https://simple.wikipedia.org",hC="wikipedia-live",c$="simple-wikipedia",mC="the-mechanical-code-talker (+https://tmct.polycode.co.uk/)";jc({name:c$,create:bC})});function jC(e,t){let n=Array.isArray(t?.search)?t.search:[],s=null;for(let o of n){let r=String(o?.id??"");if(!d$.test(r))continue;let i=V(o?.label??"");if(i===e)return r;s===null&&i.startsWith(e)&&(s=r)}return s}function RC(e){let t=[];for(let[n,s]of Object.entries(xC)){let o=e?.claims?.[n];if(!Array.isArray(o))continue;let r=0;for(let i of o){if(t.length>=kC)return t;if(r>=SC)break;let a=i?.mainsnak;if(a?.snaktype!=="value")continue;let l=String(a?.datavalue?.value?.id??"");d$.test(l)&&(t.push({property:n,predicate:s,id:l}),r+=1)}}return t}function _C(e,t,n){for(let s of EC)for(let o of e){if(o.property!==s)continue;let r=t.get(o.id);if(r&&r!==n)return r}return null}function TC({fetchImpl:e,origin:t=wC,timeoutMs:n=4e3,minIntervalMs:s=2e3,userAgent:o=vC,waitForSlot:r=!1,sourceName:i=u$}={}){let a=Rc({fetchImpl:e,timeoutMs:n,minIntervalMs:s,userAgent:o,waitForSlot:r}),l=d=>`${t}/w/api.php?${new URLSearchParams({format:"json",origin:"*",maxlag:String(5),...d})}`;async function c(d){let f=new Map;if(!d.length)return f;let p=await a.fetchJson(l({action:"wbgetentities",languages:"en",props:"labels",ids:d.join("|")}));for(let[h,m]of Object.entries(p?.entities??{})){let b=V(m?.labels?.en?.value??"");b&&f.set(h,b)}return f}async function u(d){let f=await a.fetchJson(l({action:"wbsearchentities",language:"en",uselang:"en",type:"item",limit:"5",search:d})),p=f?jC(d,f):null;if(!p)return null;let m=(await a.fetchJson(l({action:"wbgetentities",languages:"en",props:"labels|descriptions|claims|info",ids:p})))?.entities?.[p];if(!m)return null;let b=RC(m),g=await c(b.map(E=>E.id)),y=ki(i,d),w=[],v=new Set;for(let E of b){let S=g.get(E.id);!S||S===d||v.has(`${E.predicate}\0${S}`)||(v.add(`${E.predicate}\0${S}`),w.push({subject:d,predicate:E.predicate,object:S,provenance:y}))}let k=String(m.descriptions?.en?.value??""),$={term:d,title:String(m.labels?.en?.value??""),text:k,summary:Ec(k,xc),url:`${t}/wiki/${p}`,revid:Number(m.lastrevid),source:yC,licence:$C},x=_C(b,g,d);return x&&($.isa=x),w.length&&($.facts=w),i$($)?$:null}return{name:i,origin:t,provenanceTag(d){return ki(i,d)},async lookup(d){let f=V(d??"");return f?a.cachedFetch(f,()=>u(f)):null}}}function AC(e={}){return TC({waitForSlot:!0,...e})}var wC,u$,yC,$C,vC,xC,EC,SC,kC,d$,p$=C(()=>{Ot();yr();ji();mp();wC="https://www.wikidata.org",u$="wikidata",yC="Wikidata",$C="CC0 1.0",vC="the-mechanical-code-talker (+https://tmct.polycode.co.uk/)",xC=Object.freeze({P31:"rdf:type",P279:"rdfs:subClassOf",P361:"mgx:partOf",P527:"mgx:hasA",P186:"mgx:madeOf",P366:"mgx:usedFor",P276:"mgx:atLocation",P1542:"mgx:causes",P170:"mgx:createdBy",P2670:"mgx:hasA"}),EC=["P279","P31"],SC=3,kC=12,d$=/^Q[1-9][0-9]*$/;jc({name:u$,create:AC})});var IC,CC,CB,wp=C(()=>{Ot();Ws();qo();ji();IC=Object.freeze({fanoutLimit:5,maxDepth:1,maxTopics:12,minIntervalMs:2e3,source:"wikipedia"}),CC=["this","is","about","the"],CB=CC.length});var f$=C(()=>{_t();We()});var yp=C(()=>{Ot()});var OC,HB,h$=C(()=>{xo();kc();Bs();We();yp();Ot();OC={},HB=Z(he(Lt(OC.url)),"..","..","..")});var YB,XB,JB,m$=C(()=>{YB=Object.freeze(["task","autoFeedback","alloFeedback","turnManagement","timeManagement","discourseStructuring","ownCommunicationManagement","partnerCommunicationManagement","socialObligationsManagement","contactManagement"]),XB=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"})}),JB=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"})});var g$,Tc,Ac=C(()=>{g$=new Set(["person","place","object","event","time","quantity","organization","group","animal","plant","furniture","vehicle","insect","emotion","metal","liquid","weather","planet","jewelry","cutlery","government","material","artifact","location","structure","food","drink","clothing","body","language","mind","family","meal","season","number","entity","abstraction","physical_entity","attribute","state","act","communication","cognition","measure","unit"]),Tc=new Set([...g$,"property","concept","idea","content"])});function Ri(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 Ic(e,t,{cap:n=6,stopAt:s=null,toward:o=null}={}){let r=[e],i=new Set([e]),a=e;for(;r.length<n&&!(o&&a===o);){let l=[...t.get(a)||[]].filter(d=>!i.has(d)).sort(LC);if(!l.length)break;let c=o?l.filter(d=>d===o||$p(d,t).has(o)):[];a=(c.length?c:l)[0];let u=s&&s.has(a);if(u&&r.length>1||(i.add(a),r.push(a),u))break}return r}function $p(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 vp(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,vp(a,t,n,s));r=i+1}return s.delete(e),n.set(e,r),r}function NC(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 PC(e,t,n,s,o,{threshold:r,rootDepth:i,icByTerm:a}){let l=$p(e,n),c=$p(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 m of l){let b=s.get(m);if(b){for(let g of c)if(b.has(g))return{distinct:!0,reason:"disjoint",lcs:null}}}let u=[...l].filter(m=>c.has(m));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=m=>vp(m,n,o,new Set),f=u[0],p=d(f);for(let m of u){let b=d(m);(b>p||b===p&&m<f)&&(f=m,p=b)}if(p<=i)return{distinct:!0,reason:"root-subsumer",lcs:f};if(a){let m=a.get(f);return typeof m=="number"&&m<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 Cc(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||Ri(t),c=NC(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),k=f(w);v!==k&&d.set(v<k?k:v,v<k?v:k)},h=[];for(let y=0;y<a.length;y+=1)for(let w=y+1;w<a.length;w+=1){let v=PC(a[y],a[w],l,c,u,{threshold:o,rootDepth:r,icByTerm:i});h.push({a:a[y],b:a[w],...v}),v.distinct||p(a[y],a[w])}let m=new Map;for(let y of a){let w=f(y);m.has(w)||m.set(w,[]),m.get(w).push(y)}let b=y=>vp(y,l,u,new Set),g=[...m.values()].map(y=>{let w=[...y].sort(),v=w[0],k=b(v);for(let $ of w){let x=b($);x>k&&(k=x,v=$)}return{objects:w,label:v}}).sort((y,w)=>y.label.localeCompare(w.label));return{split:g.length>1,clusters:g,pairs:h}}var LC,Oc=C(()=>{Xt();Ac();LC=(e,t)=>e<t?-1:e>t?1:0});function xp(e){return typeof e=="string"&&MC.test(e)}function b$(e){return!!e&&typeof e=="object"&&Eo(e.s)}function Ep(e){return!!e&&typeof e=="object"&&e.kind==="fact"&&xp(e.world)&&Eo(e.subject)&&Eo(e.predicate)&&Eo(e.object)}function Sp(e){if(!e||typeof e!="object"||e.kind!=="rule"||!xp(e.world)||!Eo(e.name)||!DC.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(Eo)}function kp(e){return!!e&&typeof e=="object"&&e.kind==="meta"&&xp(e.world)&&Eo(e.opening)}function w$(e){return Ep(e)||Sp(e)||kp(e)}function y$(e){let t=e||[],n=t.filter(c=>c.predicate===zC).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 MC,FC,DC,Eo,zC,So=C(()=>{MC=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,FC=Object.freeze(["action-signature","action-precond","action-effect","action-constraint"]),DC=new Set(FC),Eo=e=>typeof e=="string"&&e.trim()!=="";zC="mgx:default-contains"});var Lc=C(()=>{});var UC,BC,WC,GC,VC,qC,HC,KC,YC,aW,XC,$$,cW,lW,v$=C(()=>{Ws();Wo();UC="subClassOf",BC="typeAssertion",WC="relation",GC="someValuesFrom",VC="cardinality",qC="disjointWith",HC="possessive",KC="adjective",YC="capability",aW=Object.freeze([UC,BC,WC,GC,VC,qC,HC,KC,YC]),XC=new Set(["go","take","drop","open","unlock","close","give","look","talk","examine","dig","eat","put"]),$$=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"]]),cW=Math.max(...[...$$.keys()].map(e=>e.split(" ").length)),lW=[...new Set([...XC,...[...$$.keys()].map(e=>e.split(" ")[0])])]});var ko=C(()=>{});var jp=C(()=>{Ie();Pn();ko()});function Rt({name:e,label:t,question:n,params:s=[],preconditions:o=[],add:r=[],del:i=[]}){return Object.freeze({type:Gs.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 JC,Gs,$e,QC,jo,ot,Ut,Jt,ZC,x$,jt,eO,tO,E$,gW,bW,wW,$r=C(()=>{JC=Object.freeze({cap:"urn:tmct:cap#",taught:"urn:tmct:taught#",mgx:"urn:tmct:mgx#",seon:"http://se-on.org/ontologies/seon.owl#"}),Gs=Object.freeze({Capability:"cap:Capability",Parameter:"cap:Parameter",Precondition:"cap:Precondition",Effect:"cap:Effect"}),$e=Object.freeze({Symbol:"seon:CodeEntity",Module:"mgx:Module",Class:"seon:ClassType",MemoryTerm:"mgx:MemoryTerm",Query:"cap:FreeText",Kind:"cap:KindFilter",Package:"cap:PackageName"}),QC=Object.freeze([$e.MemoryTerm]),jo=Object.freeze({graphLoaded:"cap:graph-loaded",resolves:"cap:resolves",anyPresent:"cap:any-present",memoryFacts:"cap:memory-facts"}),ot=(e,t,{arg:n=e,required:s=!0,note:o=""}={})=>Object.freeze({type:Gs.Parameter,name:e,kind:t,arg:n,required:s,note:o}),Ut=()=>Object.freeze({type:Gs.Precondition,pred:jo.graphLoaded}),Jt=(e,t)=>Object.freeze({type:Gs.Precondition,pred:jo.resolves,param:e,as:t}),ZC=e=>Object.freeze({type:Gs.Precondition,pred:jo.anyPresent,params:Object.freeze([...e])}),x$=()=>Object.freeze({type:Gs.Precondition,pred:jo.memoryFacts}),jt=(e,t=null)=>Object.freeze({type:Gs.Effect,pred:"cap:knows",topic:e,of:t?`?${t}`:null});eO=Object.freeze([Rt({name:"tmct_search",label:"search",question:"lexical search across the graph",params:[ot("query",$e.Query,{required:!1,note:"required unless a kind filter is given"}),ot("kind",$e.Kind,{required:!1}),ot("name",$e.Query,{required:!1}),ot("decorator",$e.Query,{required:!1})],preconditions:[Ut(),ZC(["query","kind"])],add:[jt("matches","query")]}),Rt({name:"tmct_describe",label:"describe",question:"a symbol's definition, kind and relations",params:[ot("symbol",$e.Symbol)],preconditions:[Ut(),Jt("symbol",$e.Symbol)],add:[jt("description","symbol")]}),Rt({name:"tmct_signature",label:"signature",question:"a symbol's signature only",params:[ot("symbol",$e.Symbol)],preconditions:[Ut(),Jt("symbol",$e.Symbol)],add:[jt("signature","symbol")]}),Rt({name:"tmct_impact",label:"impact",question:"what a change to this module or symbol reaches (impact closure)",params:[ot("module",$e.Symbol,{note:"a Module, or any sited symbol \u2014 a fine-grained seed walks callsSymbol dependents and coarsens them to module grain"})],preconditions:[Ut(),Jt("module",$e.Symbol)],add:[jt("impact","module")]}),Rt({name:"tmct_members",label:"members",question:"the methods/attributes of a class",params:[ot("class",$e.Class,{arg:"class"})],preconditions:[Ut(),Jt("class",$e.Class)],add:[jt("members","class")]}),Rt({name:"tmct_subclasses",label:"subclasses",question:"the subclasses of a class",params:[ot("class",$e.Class,{arg:"class"})],preconditions:[Ut(),Jt("class",$e.Class)],add:[jt("subclasses","class")]}),Rt({name:"tmct_exports",label:"exports",question:"a module's public exports",params:[ot("module",$e.Module)],preconditions:[Ut(),Jt("module",$e.Module)],add:[jt("exports","module")]}),Rt({name:"tmct_callers",label:"callers",question:"functions that call this symbol",params:[ot("symbol",$e.Symbol)],preconditions:[Ut(),Jt("symbol",$e.Symbol)],add:[jt("callers","symbol")]}),Rt({name:"tmct_callees",label:"callees",question:"functions this symbol calls",params:[ot("symbol",$e.Symbol)],preconditions:[Ut(),Jt("symbol",$e.Symbol)],add:[jt("callees","symbol")]}),Rt({name:"tmct_calls",label:"calls",question:"the call edges out of this symbol/module",params:[ot("symbol",$e.Symbol)],preconditions:[Ut(),Jt("symbol",$e.Symbol)],add:[jt("calls","symbol")]}),Rt({name:"tmct_tests_for",label:"tests",question:"the tests covering this symbol",params:[ot("symbol",$e.Symbol)],preconditions:[Ut(),Jt("symbol",$e.Symbol)],add:[jt("tests","symbol")]}),Rt({name:"tmct_untested",label:"untested",question:"symbols with no covering test",params:[],preconditions:[Ut()],add:[jt("untested",null)]}),Rt({name:"tmct_history",label:"history",question:"the commit history of this symbol",params:[ot("symbol",$e.Symbol)],preconditions:[Ut(),Jt("symbol",$e.Symbol)],add:[jt("history","symbol")]}),Rt({name:"tmct_cochanges",label:"cochanges",question:"symbols that change together with this one",params:[ot("symbol",$e.Symbol)],preconditions:[Ut(),Jt("symbol",$e.Symbol)],add:[jt("cochanges","symbol")]}),Rt({name:"tmct_architecture",label:"arch",question:"the architecture overview (optional package filter)",params:[ot("package",$e.Package,{required:!1})],preconditions:[Ut()],add:[jt("architecture","package")]}),Rt({name:"tmct_related",label:"related",question:"a term's synonyms and related concepts (the SKOS view over the conversational-memory graph)",params:[ot("term",$e.MemoryTerm,{note:"a concept term, matched against memory relation facts rather than resolved in the code graph"})],preconditions:[x$(),Jt("term",$e.MemoryTerm)],add:[jt("related","term")]}),Rt({name:"tmct_sprite",label:"sprite",question:"the sprite for a class, with the expression and size asked for",params:[ot("class",$e.MemoryTerm,{arg:"class",note:"a world class, matched against the memory graph's own fact rows rather than resolved in the code graph"}),ot("expression",$e.Kind,{required:!1,note:"one of sprite-expressions.mjs's palette words, carried as an mgx:feels fact"}),ot("size",$e.Kind,{required:!1,note:"a taught mgx:hasProperty size word, resolved to a render scale \u2014 not a template tier"})],preconditions:[x$(),Jt("class",$e.MemoryTerm)],add:[jt("sprite","class")]})]),tO=e=>Object.freeze(e.reduce((t,n)=>(t[n.name]=n,t),Object.create(null))),E$=eO,gW=tO(E$),bW=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"}),wW=Object.freeze({prefixes:JC,vocab:Gs,kinds:$e,precond:jo,get capabilities(){return E$}})});var Rp=C(()=>{$r()});var _p=C(()=>{ns()});var Tp=C(()=>{$r()});function iO(e){let t={};for(let n of String(e).toLowerCase().match(/[a-z]+/g)||[])!t.expression&&Object.hasOwn(ks,n)&&(t.expression=n),!t.size&&$i([{predicate:rO,object:n}])!==1&&(t.size=n);return t}var zW,UW,BW,WW,rO,GW,Ap=C(()=>{Pn();On();pc();Ot();Ie();Ui();qd();$r();Tp();zW=new RegExp(`\\b(?:${Object.keys(In).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/\s+/g,"\\s+")).join("|")})\\b`,"i"),UW=Object.freeze({"reverse:calls":{topic:"callers",arg:"symbol"},"forward:calls":{topic:"callees",arg:"symbol"},"reverse:tests":{topic:"tests",arg:"symbol"},"forward:tests":{topic:"tests",arg:"symbol"},"reverse:inherits":{topic:"subclasses",arg:"class"},"forward:reexports":{topic:"exports",arg:"module"},"forward:contains":{topic:"members",arg:"class"},"when:touches":{topic:"history",arg:"symbol"},"forward:cochange":{topic:"cochanges",arg:"symbol"},"reverse:cochange":{topic:"cochanges",arg:"symbol"}}),BW=Object.freeze({imports:"no importer/imports query tool in the registry (there is no tmct_imports); refusing beats mis-routing to calls",uses:"a query-side UNION (imports+calls+callsSymbol) with no single capability; a router that must emit ONE call cannot honour it \u2014 refuse",defines:"Module->symbol `defines` has no dedicated capability (tmct_members is Class-scoped `contains`); refuse rather than answer a different grain",serves:"a provider-declared edge with no capability in the registry; the ask lane traverses it directly, so refusing here beats mis-routing to a code-grain tool",denotes:"a provider-declared edge with no capability in the registry; the ask lane traverses it directly, so refusing here beats mis-routing to a code-grain tool"}),WW=Object.freeze({}),rO="mgx:hasProperty";GW=Object.freeze([{re:/\buntested\b|\bwithout\s+(?:a\s+)?tests?\b|\bhas\s+no\s+tests?\b|\bneeds?\s+(?:a\s+)?tests?\b/i,topic:"untested",noArg:!0,skipIfSuperlative:!0},{re:/\bblast\s*radius\b|\bimpacts?\b|\bimpacted\b|what\s+(?:a\s+)?change.*(?:reach|affect|touch)|what\s+(?:depends?\s+on|dependents?)\b/i,topic:"impact",arg:"module"},{re:/\bcall[\s-]*edges?\b|\bcall[\s-]*graph\b|\boutgoing\s+calls?\b|\bcall[\s-]*sites?\s+(?:of|in|out|from)\b/i,topic:"calls",arg:"symbol"},{re:/\bcallees?\b|wh(?:at|o)\s+does\s+\S+\s+call\b/i,topic:"callees",arg:"symbol"},{re:/\bcallers?\b|who\s+calls\b|what\s+calls\b/i,topic:"callers",arg:"symbol"},{re:/\btests?\b.*\b(?:for|cover|covering|of)\b|which\s+tests?\b|covers?\b|covered\b|test\s+coverage\b/i,topic:"tests",arg:"symbol"},{re:/\bcochang|change[- ]coupl/i,topic:"cochanges",arg:"symbol"},{re:/\bexports?\b|\bpublic\s+api\b/i,topic:"exports",arg:"module"},{re:/\bsubclasses?\b|children\s+of\b|\bextends?\b/i,topic:"subclasses",arg:"class"},{re:/\bmembers?\b|\bmethods?\s+of\b|\battributes?\s+of\b/i,topic:"members",arg:"class"},{re:/\bhistory\b|who\s+changed\b|commits?\s+(?:that\s+)?touch/i,topic:"history",arg:"symbol"},{re:/\bsignature\b/i,topic:"signature",arg:"symbol"},{re:/\bsynonyms?\b|\banother\s+word\s+for\b|\brelated\s+(?:words?|concepts?|to)\b/i,topic:"related",arg:"term"},{re:/\bsprite\b|\bicon\b|\bavatar\b|\bpicture\s+of\b|\bwhat\s+does\s+.+\s+look\s+like\b/i,topic:"sprite",arg:"class",slots:iO},{re:/\bdescribe\b|\bexplain\b|what\s+is\b|tell\s+me\s+about\b|definition\s+of\b/i,topic:"description",arg:"symbol"},{re:/\bsearch\b|\bfind\b|look\s+for\b/i,topic:"matches",arg:"query"}])});var j$=C(()=>{});var cO,R$=C(()=>{Ap();$r();Tp();j$();Pn();cO=Object.freeze([Object.freeze({id:"coverage-invariant",kind:"maintenance",invariant:"an impactful module must be tested",focusClass:"Module",modes:Object.freeze(["scoped","global"]),subGoals:Object.freeze(["impact","untested"]),priorityTopic:"impact",coverageTopic:"untested",compose:Object.freeze({op:"intersect",a:Object.freeze({topic:"untested"}),b:Object.freeze({topic:"impact",of:"focus",withFocus:!0}),names:"the change's untested footprint",empty:"no coverage gap"}),achieves:"coverage-gap"}),Object.freeze({id:"cochange-risk-invariant",kind:"maintenance",invariant:"a module change-coupled with the focus must be tested",focusClass:"Module",modes:Object.freeze(["scoped"]),subGoals:Object.freeze(["cochanges","untested"]),priorityTopic:"cochanges",coverageTopic:"untested",compose:Object.freeze({op:"intersect",a:Object.freeze({topic:"cochanges",of:"focus"}),b:Object.freeze({topic:"untested"}),names:"the change-coupled untested set",empty:"every change-coupled module is tested"}),achieves:"cochange-risk"})])});var Nc=C(()=>{Lc();_p();Ap();R$();$r();Rp()});function dO(e=process.env){return e?.TMCT_WORLDS_PACK_DIR||Z(uO,"corpus","worlds")}function _$(e){try{return Sc(br(e))}catch{return null}}function T$(e){if(Cp.has(e))return Cp.get(e);let t=null,n=_$(Z(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 Cp.set(e,t),t}function pO(e,t){let n=T$(e);if(!n)return null;let s=n[String(t??"")];if(!b$(s))return null;let o=`${e}\0${t}`;if(Op.has(o))return Op.get(o);let r=null,i=_$(Z(e,"shards",`${s.s}.jsonl.gz`));if(i){let a=[],l=[],c=null;for(let u of i.toString("utf8").split(`
|
|
167
|
-
`))if(u.trim())try{let d=JSON.parse(u);if(!w$(d)||d.world!==t)continue;Ep(d)?a.push(d):Sp(d)?l.push(d):kp(d)&&!c&&(c=d)}catch{}(a.length||l.length||c)&&(r={name:t,facts:y$(a),rules:l,meta:c})}return Op.set(o,r),r}var hO,uO,Cp,Op,fO,
|
|
166
|
+
`);for(let r=0;r<o.length;r+=1){let i=o[r].trim();if(!(!i||i.startsWith("#"))){if(i.startsWith("~")){let a=i.slice(1).split(",").map(l=>l.trim().toLowerCase()).filter(Boolean);if(a.length<2)throw new Error(`${e}:${r+1}: a synonym family needs at least 2 entries`);s.push(a);continue}n.push({pattern:i,slots:ep(i)})}}return{patterns:n,synonyms:s}}var PI,Cy,Oy,Ly,CI,Ny,Zd,OI,vi,wc=C(()=>{_t();Bs();We();PI={},Cy=Z(he(Lt(PI.url)),"..","..",".."),Oy=Z(Cy,"data","templates","responses.jsonl"),Ly=Z(Cy,"data","phrasebook","software-phrases.txt"),CI=new Set(["terse","friendly","technical"]),Ny=/\{([A-Za-z][A-Za-z0-9]*)\}/g,Zd=Object.freeze(new Set(["subject","count","noun","scope","comparison","metric","unit","superlative","provenance"]));OI={count:"number",when:"number",location:"path",commit:"path",provenance:"provenance"};vi=null});function FI(e,t={}){let n=MI.exec(String(e||""));if(!n)return 1;let s=t?.[n[1]];return typeof s=="number"&&Number.isFinite(s)?s:1}function DI(e,t={}){let n=Array.isArray(e?.sourceIds)?e.sourceIds:[];return n.length?Math.max(...n.map(s=>FI(s,t))):1}function Je(e,t={}){return(Array.isArray(e)?e:[]).map((s,o)=>({row:s,index:o,bias:DI(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 MI,zy=C(()=>{MI=/^src:corpus:(.+)$/});var bt,f2,br,h2,m2,g2,b2,w2,y2,$2,v2,x2,E2,S2,k2,Uy,zI,j2,R2,_2,xo=C(()=>{bt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},f2=bt("createRequire"),br=bt("readFileSync"),h2=bt("access"),m2=bt("readFile"),g2=bt("writeFile"),b2=bt("appendFile"),w2=bt("mkdir"),y2=bt("mkdtemp"),$2=bt("rename"),v2=bt("unlink"),x2=bt("rm"),E2=bt("stat"),S2=bt("copyFile"),k2=bt("readdir"),Uy=bt("createReadStream"),zI=bt("createWriteStream"),j2=bt("randomBytes"),R2=bt("spawnSync"),_2=bt("createInterface")});function By(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 GI(e=BI){let t=bo(br(e,"utf8"));return Array.isArray(t.rule)?t.rule:[]}function sp(){if(yc===null)try{yc=GI()}catch{yc=[]}return yc}var VI,UI,BI,WI,N2,yc,op=C(()=>{xo();Bs();We();Xa();wc();VI={},UI=he(Lt(VI.url)),BI=Z(UI,"..","..","data","templates","grammar-rules.toml"),WI=Object.freeze(["prose","entity","path","number","code","provenance","receipt"]),N2=Object.freeze(new Set(WI.filter(e=>e!=="prose")));yc=null});function qI(){if(xi!==void 0)return xi;try{let e=Wy?Wy():HI();xi=e&&e.winkNLP&&e.model?e:null}catch{xi=null}return xi}function HI(){let e=process.getBuiltinModule("node:module").createRequire(KI.url);return{winkNLP:e("wink-nlp"),model:e("wink-eng-lite-web-model")}}function rp(){if(wr!==void 0)return wr;let e=qI();if(!e)return wr=null,null;try{wr=e.winkNLP(e.model)}catch{wr=null}return wr}var KI,Wy,xi,wr,ip=C(()=>{KI={}});var Gy=C(()=>{ip()});var qy,Vy=C(()=>{qy={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:{},rodent:{},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",predicate:"mgx:partOf"},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"]}});var e$={};Gt(e$,{CODE_REF_SHAPE:()=>pp,DETERMINERS:()=>cp,OF_CLASSIFIER_HEADS:()=>Yy,OF_PARTITIVE_HEADS:()=>Xy,QUANTIFIERS:()=>lp,classify:()=>hp,loadLexicon:()=>Rn,lookupAdjective:()=>vc,lookupNoun:()=>Kn,lookupProperName:()=>Ei,lookupVerb:()=>$c,numberOf:()=>up,predicateOf:()=>dp,readsAsIndividualName:()=>fp,thirdPerson:()=>Jy,withProperNames:()=>Zy});function up(e){let t=String(e??"").trim().toLowerCase();return/^\d+$/.test(t)?Number(t):XI[t]??null}function Jy(e){let t=String(e);return t==="have"?"has":/[^aeiou]y$/.test(t)?`${t.slice(0,-1)}ies`:/(s|x|z|ch|sh)$/.test(t)?`${t}es`:`${t}s`}function dp(e,t=Ky){if(e.predicate)return e.predicate;let n=e.prep?e.prep[0].toUpperCase()+e.prep.slice(1):"";return`${t}${Jy(e.lemma)}${n}`}function Qy(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 Hy(e,t={}){for(let[n,s]of Object.entries(t.nouns||{})){let o={lemma:n,...s||{}};if(o.property&&!JI.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(!QI.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 Rn(e,t=Ky){if(!e&&ap.has(t))return ap.get(t);let n=qy,s={nouns:new Map,nounPlurals:new Map,verbs:new Map,adjectives:new Map,properNames:new Map,ns:t};return Hy(s,n),e?(Hy(s,e),s):(ap.set(t,s),s)}function Zy(e,t){let n=new Map(e.properNames);for(let s of t)n.set(String(s).toLowerCase(),String(s));return{...e,properNames:n}}function Kn(e,t,n={}){return ZI(e,t,n)[0]??null}function ZI(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 Qy(s))l(e.nouns.get(c));return i}function $c(e,t){return eC(e,t)[0]??null}function eC(e,t){let n=String(t??"").toLowerCase(),s=[],o=new Set;for(let r of Qy(n)){let i=e.verbs.get(r);i&&!o.has(i.lemma)&&(o.add(i.lemma),s.push(i))}return s}function vc(e,t){return e.adjectives.get(String(t??"").toLowerCase())??null}function Ei(e,t){return e.properNames.get(String(t??"").toLowerCase())??null}function fp(e,t){let n=String(e??"");if(!n)return!1;if(Ei(t,n)||pp.test(n)||/^[a-z][\w]*(?:-[\w]+)+$/i.test(n)||/^[A-Z]/.test(n))return!0;let s=Kn(t,n);return s?s.lemma.toLowerCase()!==n.toLowerCase():!0}function hp(e,t=Rn()){let n=String(e??"").trim();if(!n)return null;let s=n.toLowerCase();if(cp[s])return{pos:"determiner",type:cp[s]};if(lp[s])return{pos:"quantifier",type:lp[s]};let o=up(s);if(o!=null)return{pos:"number",type:"cardinal",value:o};let r=Ei(t,n);if(r)return{pos:"properName",type:"individual",canonical:r};let i=Kn(t,s);if(i)return i.property?{pos:"noun",type:`${i.property}-property`,lemma:i.lemma,property:i.property}:{pos:"noun",type:"class",lemma:i.lemma};let a=$c(t,s);if(a)return{pos:"verb",type:"objectProperty",lemma:a.lemma,predicate:dp(a,t.ns),...a.prep?{prep:a.prep}:{}};let l=vc(t,s);return l?{pos:"adjective",type:l.type,lemma:l.lemma}:null}var Ky,cp,lp,Yy,Xy,XI,JI,QI,ap,pp,Ws=C(()=>{Vy();Ky="tmct:",cp=Object.freeze({every:"universal",a:"indefinite",an:"indefinite",the:"definite",no:"negative"}),lp=Object.freeze({"at least":"owl:minCardinality","at most":"owl:maxCardinality",exactly:"owl:cardinality"}),Yy=Object.freeze(new Set(["type","kind","sort","form","class","variety","species","breed","genus"])),Xy=Object.freeze(new Set(["body","mass","group","collection","set","series","number","amount","piece","part","lot","pair","bunch","pile"])),XI=Object.freeze({one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10});JI=new Set(["data","object"]),QI=new Set(["subclass","data"]);ap=new Map;pp=/[./\\#:@]/});var G2,V2,q2,tC,H2,K2,Y2,t$=C(()=>{Pn();Ie();G2=Object.freeze({class:"Class",module:"Module",function:"Function",method:"Method",attribute:"Attribute",variable:"GlobalVariable",constant:"GlobalVariable",commit:"Commit"}),V2=Object.freeze({Class:["class","classes"],Module:["module","modules"],Function:["function","functions"],Method:["method","methods"],Attribute:["attribute","attributes"],GlobalVariable:["variable","variables"],Commit:["commit","commits"]}),q2=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`]}),tC=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"}),H2=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"]}),K2=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"}}),Y2=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}`}]})});function Si(e){if(!e||typeof e!="object")return!1;for(let t of["term","title","text","summary","url"])if(typeof e[t]!="string"||!e[t])return!1;if(!Number.isInteger(e.revid)||e.revid<=0)return!1;for(let t of["isa","source","licence"])if(e[t]!==void 0&&(typeof e[t]!="string"||!e[t]))return!1;return!0}function Ec(e,t){let n=String(e??"").split(/(?<=[.!?])\s+/),s="";for(let o of n){let r=s?`${s} ${o}`:o;if(r.length>t)break;s=r}return s||String(e??"").slice(0,t)}function sC(e){let t=e,n;do n=t,t=t.replace(/\s*\([^()]*\)/g,"");while(t!==n);return t}function s$(e,t){let n=Kn(t,e);return n?V(n.lemma):e}function o$(e,t){let n=sC(String(e??"")).match(nC);if(!n)return null;let s=!n[1],o=[];for(let u of n[2].trim().split(/\s+/))if(oC.has(u)||(o.push(u),o.length>=6))break;let r=o;for(let u=r.indexOf("of");u>0;u=r.indexOf("of")){let d=r[u-1]?.split("-").pop(),f=d&&s$(d,t);if(f&&(iC.has(f)||aC.has(f))){r=r.slice(u+1);continue}r=r.slice(0,u);break}for(;r.length&&rC.has(r[0]);)r=r.slice(1);if(!r.length)return null;let i=r[r.length-1].split("-").pop();if(!i)return null;let a=s$(i,t);if(n$.has(i)||n$.has(a))return null;let l=Kn(t,i);if(!l)return null;let c=V(l.lemma);return s&&(!/s$/.test(i)||V(i)===c)?null:c}var xc,nC,oC,n$,rC,iC,aC,yr=C(()=>{Ot();Ws();t$();xc=400;nC=/^[A-Z][^.!?]*? (?:is|are) (?:(a|an|the) )?([a-z][a-z -]{1,60})/;oC=new Set(["that","which","where","who","whose","whom","when","used","found","made","with","in","on","for","from","by","to","and","or"]),n$=new Set(["type","kind","sort","form","class","variety","group","part","piece","member","way","term","name","word","thing","example","family","genus","species","unit","series","set","list","number","amount","body","mass"]),rC=new Set(["a","an","the"]),iC=new Set(["type","kind","sort","form","class","variety","species","breed","genus","group","part","parts","piece","bunch","bit","name","set","way","unit","family","ability","color","series","mammal","practice","list","amount","mass","reworking","blockage","goddess","aura","development","consisting","announcement","messengers","subset","carrying","photograph","adding","use","science","songbird","symptom","accumulation","number","suborder","falling","management","evaluation","superorder","activity","interlacing","introduction"]),aC=new Set(["either","one","each","both","any"])});var Sc,kc=C(()=>{Sc=()=>{throw new Error("gunzipSync unavailable in a browser bundle")}});var cC,cB,r$=C(()=>{xo();kc();Bs();We();yr();cC={},cB=Z(he(Lt(cC.url)),"..","..","..")});function uC(e){if(!e||typeof e!="object")return!1;for(let t of["subject","predicate","object","provenance"])if(typeof e[t]!="string"||!e[t])return!1;return lC.includes(e.predicate)}function i$(e){return Si(e)?e.facts===void 0?!0:Array.isArray(e.facts)&&e.facts.length>0&&e.facts.every(uC):!1}function ki(e,t){return`research:${e}:${V(t)}`}function jc(e){if(!e||typeof e.name!="string"||!e.name||typeof e.create!="function")throw new Error("registerResearchSource: expected { name, create(options) }");dC.set(e.name,{name:e.name,create:e.create})}var lC,dC,pB,fB,ji=C(()=>{Ot();yr();lC=Object.freeze(["rdf:type","rdfs:subClassOf","mgx:partOf","mgx:hasA","mgx:usedFor","mgx:capableOf","mgx:atLocation","mgx:causes","mgx:madeOf","mgx:createdBy","mgx:locatedNear","mgx:hasProperty"]);dC=new Map;pB=Object.freeze(["wikipedia","wikidata"]),fB=Object.freeze({wikipedia:"simple-wikipedia",wikidata:"wikidata"})});function Rc({fetchImpl:e,timeoutMs:t=4e3,minIntervalMs:n=2e3,retryAfterFloorMs:s=5e3,userAgent:o,waitForSlot:r=!1}={}){let i=e??((...g)=>globalThis.fetch(...g)),a=new Map,l=0,c=0,u=!1,d=()=>{if(!o)return null;let g={"Api-User-Agent":o};return typeof document>"u"&&(g["User-Agent"]=o),g};function f(g){let y=Number(g)*1e3;c=Date.now()+Math.max(y||0,s)}async function p(g){let y=typeof AbortController=="function"?new AbortController:null,w=y?setTimeout(()=>y.abort(),t):null;try{let v={};y&&(v.signal=y.signal);let k=d();k&&(v.headers=k);let $=await i(g,v);if($.status===429)return f($.headers?.get?.("retry-after")),null;if(!$.ok)return null;let x=await $.json();return x?.error?.code==="maxlag"?(f($.headers?.get?.("retry-after")),null):x}catch{return null}finally{w!==null&&clearTimeout(w)}}let h=()=>Math.max(c,l+n);async function m(){for(;;){let g=Date.now();if(!u&&g>=h())return l=g,u=!0,!0;if(!r)return!1;await new Promise(y=>setTimeout(y,Math.max(h()-g,25)))}}async function b(g,y){if(a.has(g))return a.get(g);if(!await m())return null;let w=null;try{w=await y()}catch{w=null}finally{u=!1}return a.set(g,w),w}return{fetchJson:p,cachedFetch:b}}var mp=C(()=>{});function gC({fetchImpl:e,origin:t=pC,timeoutMs:n=4e3,minIntervalMs:s=2e3,lexicon:o=null,userAgent:r=mC,waitForSlot:i=!1,sourceName:a=hC}={}){let l=Rc({fetchImpl:e,timeoutMs:n,minIntervalMs:s,userAgent:r,waitForSlot:i});function c(f,p){let h=Array.isArray(p?.[1])?p[1]:[];for(let m of h){let b=V(m);if(b===f||b.startsWith(f))return String(m)}return null}async function u(f,p){let h=await l.fetchJson(`${t}/api/rest_v1/page/summary/${encodeURIComponent(p.replace(/ /g,"_"))}`);if(!h)return null;let m=String(h.extract??""),b=Number(h.revision),g={term:f,title:String(h.title??p),text:m,summary:Ec(m,xc),url:String(h.content_urls?.desktop?.page??`${t}/wiki/${encodeURIComponent(p.replace(/ /g,"_"))}`),revid:b},y=o;if(!y)try{y=Rn()}catch{y=null}let w=y?o$(m,y):null;return w&&(g.isa=w),Si(g)?g:null}async function d(f){let p=await l.fetchJson(`${t}/w/api.php?action=opensearch&format=json&origin=*&maxlag=${5}&search=${encodeURIComponent(f)}&limit=3`),h=p?c(f,p):null;return h?u(f,h):null}return{name:a,origin:t,provenanceTag(f){return ki(a,f)},async lookup(f){let p=String(f??"");return p?l.cachedFetch(p,()=>d(p)):null},async pageByTitle(f){let p=String(f??"").trim();return p?l.cachedFetch(`title\0${V(p)}`,()=>u(V(p),p)):null},async linkedTitles(f,{limit:p=25}={}){let h=String(f??"").trim();if(!h)return null;let m=await l.cachedFetch(`links\0${V(h)}`,async()=>{let g=(await l.fetchJson(`${t}/w/api.php?action=parse&format=json&formatversion=2&origin=*&maxlag=${5}&prop=links&redirects=1&page=${encodeURIComponent(h)}§ion=0`))?.parse?.links;if(!Array.isArray(g))return null;let y=new Set,w=[];for(let v of g){if(!v||v.ns!==0||v.exists===!1)continue;let k=String(v.title??v["*"]??"").trim(),$=V(k);!k||!$||y.has($)||(y.add($),w.push(k))}return w});return Array.isArray(m)?m.slice(0,Math.max(0,p)):null}}}function bC(e={}){return gC({origin:fC,sourceName:c$,waitForSlot:!0,...e})}var pC,fC,hC,c$,mC,l$=C(()=>{Ot();Ws();yr();ji();mp();pC="https://en.wikipedia.org",fC="https://simple.wikipedia.org",hC="wikipedia-live",c$="simple-wikipedia",mC="the-mechanical-code-talker (+https://tmct.polycode.co.uk/)";jc({name:c$,create:bC})});function jC(e,t){let n=Array.isArray(t?.search)?t.search:[],s=null;for(let o of n){let r=String(o?.id??"");if(!d$.test(r))continue;let i=V(o?.label??"");if(i===e)return r;s===null&&i.startsWith(e)&&(s=r)}return s}function RC(e){let t=[];for(let[n,s]of Object.entries(xC)){let o=e?.claims?.[n];if(!Array.isArray(o))continue;let r=0;for(let i of o){if(t.length>=kC)return t;if(r>=SC)break;let a=i?.mainsnak;if(a?.snaktype!=="value")continue;let l=String(a?.datavalue?.value?.id??"");d$.test(l)&&(t.push({property:n,predicate:s,id:l}),r+=1)}}return t}function _C(e,t,n){for(let s of EC)for(let o of e){if(o.property!==s)continue;let r=t.get(o.id);if(r&&r!==n)return r}return null}function TC({fetchImpl:e,origin:t=wC,timeoutMs:n=4e3,minIntervalMs:s=2e3,userAgent:o=vC,waitForSlot:r=!1,sourceName:i=u$}={}){let a=Rc({fetchImpl:e,timeoutMs:n,minIntervalMs:s,userAgent:o,waitForSlot:r}),l=d=>`${t}/w/api.php?${new URLSearchParams({format:"json",origin:"*",maxlag:String(5),...d})}`;async function c(d){let f=new Map;if(!d.length)return f;let p=await a.fetchJson(l({action:"wbgetentities",languages:"en",props:"labels",ids:d.join("|")}));for(let[h,m]of Object.entries(p?.entities??{})){let b=V(m?.labels?.en?.value??"");b&&f.set(h,b)}return f}async function u(d){let f=await a.fetchJson(l({action:"wbsearchentities",language:"en",uselang:"en",type:"item",limit:"5",search:d})),p=f?jC(d,f):null;if(!p)return null;let m=(await a.fetchJson(l({action:"wbgetentities",languages:"en",props:"labels|descriptions|claims|info",ids:p})))?.entities?.[p];if(!m)return null;let b=RC(m),g=await c(b.map(E=>E.id)),y=ki(i,d),w=[],v=new Set;for(let E of b){let S=g.get(E.id);!S||S===d||v.has(`${E.predicate}\0${S}`)||(v.add(`${E.predicate}\0${S}`),w.push({subject:d,predicate:E.predicate,object:S,provenance:y}))}let k=String(m.descriptions?.en?.value??""),$={term:d,title:String(m.labels?.en?.value??""),text:k,summary:Ec(k,xc),url:`${t}/wiki/${p}`,revid:Number(m.lastrevid),source:yC,licence:$C},x=_C(b,g,d);return x&&($.isa=x),w.length&&($.facts=w),i$($)?$:null}return{name:i,origin:t,provenanceTag(d){return ki(i,d)},async lookup(d){let f=V(d??"");return f?a.cachedFetch(f,()=>u(f)):null}}}function AC(e={}){return TC({waitForSlot:!0,...e})}var wC,u$,yC,$C,vC,xC,EC,SC,kC,d$,p$=C(()=>{Ot();yr();ji();mp();wC="https://www.wikidata.org",u$="wikidata",yC="Wikidata",$C="CC0 1.0",vC="the-mechanical-code-talker (+https://tmct.polycode.co.uk/)",xC=Object.freeze({P31:"rdf:type",P279:"rdfs:subClassOf",P361:"mgx:partOf",P527:"mgx:hasA",P186:"mgx:madeOf",P366:"mgx:usedFor",P276:"mgx:atLocation",P1542:"mgx:causes",P170:"mgx:createdBy",P2670:"mgx:hasA"}),EC=["P279","P31"],SC=3,kC=12,d$=/^Q[1-9][0-9]*$/;jc({name:u$,create:AC})});var IC,CC,OB,wp=C(()=>{Ot();Ws();qo();ji();IC=Object.freeze({fanoutLimit:5,maxDepth:1,maxTopics:12,minIntervalMs:2e3,source:"wikipedia"}),CC=["this","is","about","the"],OB=CC.length});var f$=C(()=>{_t();We()});var yp=C(()=>{Ot()});var OC,KB,h$=C(()=>{xo();kc();Bs();We();yp();Ot();OC={},KB=Z(he(Lt(OC.url)),"..","..","..")});var XB,JB,QB,m$=C(()=>{XB=Object.freeze(["task","autoFeedback","alloFeedback","turnManagement","timeManagement","discourseStructuring","ownCommunicationManagement","partnerCommunicationManagement","socialObligationsManagement","contactManagement"]),JB=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"})}),QB=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"})});var g$,Tc,Ac=C(()=>{g$=new Set(["person","place","object","event","time","quantity","organization","group","animal","plant","furniture","vehicle","insect","emotion","metal","liquid","weather","planet","jewelry","cutlery","government","material","artifact","location","structure","food","drink","clothing","body","language","mind","family","meal","season","number","entity","abstraction","physical_entity","attribute","state","act","communication","cognition","measure","unit"]),Tc=new Set([...g$,"property","concept","idea","content"])});function Ri(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 Ic(e,t,{cap:n=6,stopAt:s=null,toward:o=null}={}){let r=[e],i=new Set([e]),a=e;for(;r.length<n&&!(o&&a===o);){let l=[...t.get(a)||[]].filter(d=>!i.has(d)).sort(LC);if(!l.length)break;let c=o?l.filter(d=>d===o||$p(d,t).has(o)):[];a=(c.length?c:l)[0];let u=s&&s.has(a);if(u&&r.length>1||(i.add(a),r.push(a),u))break}return r}function $p(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 vp(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,vp(a,t,n,s));r=i+1}return s.delete(e),n.set(e,r),r}function NC(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 PC(e,t,n,s,o,{threshold:r,rootDepth:i,icByTerm:a}){let l=$p(e,n),c=$p(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 m of l){let b=s.get(m);if(b){for(let g of c)if(b.has(g))return{distinct:!0,reason:"disjoint",lcs:null}}}let u=[...l].filter(m=>c.has(m));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=m=>vp(m,n,o,new Set),f=u[0],p=d(f);for(let m of u){let b=d(m);(b>p||b===p&&m<f)&&(f=m,p=b)}if(p<=i)return{distinct:!0,reason:"root-subsumer",lcs:f};if(a){let m=a.get(f);return typeof m=="number"&&m<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 Cc(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||Ri(t),c=NC(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),k=f(w);v!==k&&d.set(v<k?k:v,v<k?v:k)},h=[];for(let y=0;y<a.length;y+=1)for(let w=y+1;w<a.length;w+=1){let v=PC(a[y],a[w],l,c,u,{threshold:o,rootDepth:r,icByTerm:i});h.push({a:a[y],b:a[w],...v}),v.distinct||p(a[y],a[w])}let m=new Map;for(let y of a){let w=f(y);m.has(w)||m.set(w,[]),m.get(w).push(y)}let b=y=>vp(y,l,u,new Set),g=[...m.values()].map(y=>{let w=[...y].sort(),v=w[0],k=b(v);for(let $ of w){let x=b($);x>k&&(k=x,v=$)}return{objects:w,label:v}}).sort((y,w)=>y.label.localeCompare(w.label));return{split:g.length>1,clusters:g,pairs:h}}var LC,Oc=C(()=>{Xt();Ac();LC=(e,t)=>e<t?-1:e>t?1:0});function xp(e){return typeof e=="string"&&MC.test(e)}function b$(e){return!!e&&typeof e=="object"&&Eo(e.s)}function Ep(e){return!!e&&typeof e=="object"&&e.kind==="fact"&&xp(e.world)&&Eo(e.subject)&&Eo(e.predicate)&&Eo(e.object)}function Sp(e){if(!e||typeof e!="object"||e.kind!=="rule"||!xp(e.world)||!Eo(e.name)||!DC.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(Eo)}function kp(e){return!!e&&typeof e=="object"&&e.kind==="meta"&&xp(e.world)&&Eo(e.opening)}function w$(e){return Ep(e)||Sp(e)||kp(e)}function y$(e){let t=e||[],n=t.filter(c=>c.predicate===zC).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 MC,FC,DC,Eo,zC,So=C(()=>{MC=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,FC=Object.freeze(["action-signature","action-precond","action-effect","action-constraint"]),DC=new Set(FC),Eo=e=>typeof e=="string"&&e.trim()!=="";zC="mgx:default-contains"});var Lc=C(()=>{});var UC,BC,WC,GC,VC,qC,HC,KC,YC,cW,XC,$$,lW,uW,v$=C(()=>{Ws();Wo();UC="subClassOf",BC="typeAssertion",WC="relation",GC="someValuesFrom",VC="cardinality",qC="disjointWith",HC="possessive",KC="adjective",YC="capability",cW=Object.freeze([UC,BC,WC,GC,VC,qC,HC,KC,YC]),XC=new Set(["go","take","drop","open","unlock","close","give","look","talk","examine","dig","eat","put"]),$$=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"]]),lW=Math.max(...[...$$.keys()].map(e=>e.split(" ").length)),uW=[...new Set([...XC,...[...$$.keys()].map(e=>e.split(" ")[0])])]});var ko=C(()=>{});var jp=C(()=>{Ie();Pn();ko()});function Rt({name:e,label:t,question:n,params:s=[],preconditions:o=[],add:r=[],del:i=[]}){return Object.freeze({type:Gs.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 JC,Gs,$e,QC,jo,ot,Ut,Jt,ZC,x$,jt,eO,tO,E$,bW,wW,yW,$r=C(()=>{JC=Object.freeze({cap:"urn:tmct:cap#",taught:"urn:tmct:taught#",mgx:"urn:tmct:mgx#",seon:"http://se-on.org/ontologies/seon.owl#"}),Gs=Object.freeze({Capability:"cap:Capability",Parameter:"cap:Parameter",Precondition:"cap:Precondition",Effect:"cap:Effect"}),$e=Object.freeze({Symbol:"seon:CodeEntity",Module:"mgx:Module",Class:"seon:ClassType",MemoryTerm:"mgx:MemoryTerm",Query:"cap:FreeText",Kind:"cap:KindFilter",Package:"cap:PackageName"}),QC=Object.freeze([$e.MemoryTerm]),jo=Object.freeze({graphLoaded:"cap:graph-loaded",resolves:"cap:resolves",anyPresent:"cap:any-present",memoryFacts:"cap:memory-facts"}),ot=(e,t,{arg:n=e,required:s=!0,note:o=""}={})=>Object.freeze({type:Gs.Parameter,name:e,kind:t,arg:n,required:s,note:o}),Ut=()=>Object.freeze({type:Gs.Precondition,pred:jo.graphLoaded}),Jt=(e,t)=>Object.freeze({type:Gs.Precondition,pred:jo.resolves,param:e,as:t}),ZC=e=>Object.freeze({type:Gs.Precondition,pred:jo.anyPresent,params:Object.freeze([...e])}),x$=()=>Object.freeze({type:Gs.Precondition,pred:jo.memoryFacts}),jt=(e,t=null)=>Object.freeze({type:Gs.Effect,pred:"cap:knows",topic:e,of:t?`?${t}`:null});eO=Object.freeze([Rt({name:"tmct_search",label:"search",question:"lexical search across the graph",params:[ot("query",$e.Query,{required:!1,note:"required unless a kind filter is given"}),ot("kind",$e.Kind,{required:!1}),ot("name",$e.Query,{required:!1}),ot("decorator",$e.Query,{required:!1})],preconditions:[Ut(),ZC(["query","kind"])],add:[jt("matches","query")]}),Rt({name:"tmct_describe",label:"describe",question:"a symbol's definition, kind and relations",params:[ot("symbol",$e.Symbol)],preconditions:[Ut(),Jt("symbol",$e.Symbol)],add:[jt("description","symbol")]}),Rt({name:"tmct_signature",label:"signature",question:"a symbol's signature only",params:[ot("symbol",$e.Symbol)],preconditions:[Ut(),Jt("symbol",$e.Symbol)],add:[jt("signature","symbol")]}),Rt({name:"tmct_impact",label:"impact",question:"what a change to this module or symbol reaches (impact closure)",params:[ot("module",$e.Symbol,{note:"a Module, or any sited symbol \u2014 a fine-grained seed walks callsSymbol dependents and coarsens them to module grain"})],preconditions:[Ut(),Jt("module",$e.Symbol)],add:[jt("impact","module")]}),Rt({name:"tmct_members",label:"members",question:"the methods/attributes of a class",params:[ot("class",$e.Class,{arg:"class"})],preconditions:[Ut(),Jt("class",$e.Class)],add:[jt("members","class")]}),Rt({name:"tmct_subclasses",label:"subclasses",question:"the subclasses of a class",params:[ot("class",$e.Class,{arg:"class"})],preconditions:[Ut(),Jt("class",$e.Class)],add:[jt("subclasses","class")]}),Rt({name:"tmct_exports",label:"exports",question:"a module's public exports",params:[ot("module",$e.Module)],preconditions:[Ut(),Jt("module",$e.Module)],add:[jt("exports","module")]}),Rt({name:"tmct_callers",label:"callers",question:"functions that call this symbol",params:[ot("symbol",$e.Symbol)],preconditions:[Ut(),Jt("symbol",$e.Symbol)],add:[jt("callers","symbol")]}),Rt({name:"tmct_callees",label:"callees",question:"functions this symbol calls",params:[ot("symbol",$e.Symbol)],preconditions:[Ut(),Jt("symbol",$e.Symbol)],add:[jt("callees","symbol")]}),Rt({name:"tmct_calls",label:"calls",question:"the call edges out of this symbol/module",params:[ot("symbol",$e.Symbol)],preconditions:[Ut(),Jt("symbol",$e.Symbol)],add:[jt("calls","symbol")]}),Rt({name:"tmct_tests_for",label:"tests",question:"the tests covering this symbol",params:[ot("symbol",$e.Symbol)],preconditions:[Ut(),Jt("symbol",$e.Symbol)],add:[jt("tests","symbol")]}),Rt({name:"tmct_untested",label:"untested",question:"symbols with no covering test",params:[],preconditions:[Ut()],add:[jt("untested",null)]}),Rt({name:"tmct_history",label:"history",question:"the commit history of this symbol",params:[ot("symbol",$e.Symbol)],preconditions:[Ut(),Jt("symbol",$e.Symbol)],add:[jt("history","symbol")]}),Rt({name:"tmct_cochanges",label:"cochanges",question:"symbols that change together with this one",params:[ot("symbol",$e.Symbol)],preconditions:[Ut(),Jt("symbol",$e.Symbol)],add:[jt("cochanges","symbol")]}),Rt({name:"tmct_architecture",label:"arch",question:"the architecture overview (optional package filter)",params:[ot("package",$e.Package,{required:!1})],preconditions:[Ut()],add:[jt("architecture","package")]}),Rt({name:"tmct_related",label:"related",question:"a term's synonyms and related concepts (the SKOS view over the conversational-memory graph)",params:[ot("term",$e.MemoryTerm,{note:"a concept term, matched against memory relation facts rather than resolved in the code graph"})],preconditions:[x$(),Jt("term",$e.MemoryTerm)],add:[jt("related","term")]}),Rt({name:"tmct_sprite",label:"sprite",question:"the sprite for a class, with the expression and size asked for",params:[ot("class",$e.MemoryTerm,{arg:"class",note:"a world class, matched against the memory graph's own fact rows rather than resolved in the code graph"}),ot("expression",$e.Kind,{required:!1,note:"one of sprite-expressions.mjs's palette words, carried as an mgx:feels fact"}),ot("size",$e.Kind,{required:!1,note:"a taught mgx:hasProperty size word, resolved to a render scale \u2014 not a template tier"})],preconditions:[x$(),Jt("class",$e.MemoryTerm)],add:[jt("sprite","class")]})]),tO=e=>Object.freeze(e.reduce((t,n)=>(t[n.name]=n,t),Object.create(null))),E$=eO,bW=tO(E$),wW=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"}),yW=Object.freeze({prefixes:JC,vocab:Gs,kinds:$e,precond:jo,get capabilities(){return E$}})});var Rp=C(()=>{$r()});var _p=C(()=>{ns()});var Tp=C(()=>{$r()});function iO(e){let t={};for(let n of String(e).toLowerCase().match(/[a-z]+/g)||[])!t.expression&&Object.hasOwn(ks,n)&&(t.expression=n),!t.size&&$i([{predicate:rO,object:n}])!==1&&(t.size=n);return t}var UW,BW,WW,GW,rO,VW,Ap=C(()=>{Pn();On();pc();Ot();Ie();Ui();qd();$r();Tp();UW=new RegExp(`\\b(?:${Object.keys(In).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/\s+/g,"\\s+")).join("|")})\\b`,"i"),BW=Object.freeze({"reverse:calls":{topic:"callers",arg:"symbol"},"forward:calls":{topic:"callees",arg:"symbol"},"reverse:tests":{topic:"tests",arg:"symbol"},"forward:tests":{topic:"tests",arg:"symbol"},"reverse:inherits":{topic:"subclasses",arg:"class"},"forward:reexports":{topic:"exports",arg:"module"},"forward:contains":{topic:"members",arg:"class"},"when:touches":{topic:"history",arg:"symbol"},"forward:cochange":{topic:"cochanges",arg:"symbol"},"reverse:cochange":{topic:"cochanges",arg:"symbol"}}),WW=Object.freeze({imports:"no importer/imports query tool in the registry (there is no tmct_imports); refusing beats mis-routing to calls",uses:"a query-side UNION (imports+calls+callsSymbol) with no single capability; a router that must emit ONE call cannot honour it \u2014 refuse",defines:"Module->symbol `defines` has no dedicated capability (tmct_members is Class-scoped `contains`); refuse rather than answer a different grain",serves:"a provider-declared edge with no capability in the registry; the ask lane traverses it directly, so refusing here beats mis-routing to a code-grain tool",denotes:"a provider-declared edge with no capability in the registry; the ask lane traverses it directly, so refusing here beats mis-routing to a code-grain tool"}),GW=Object.freeze({}),rO="mgx:hasProperty";VW=Object.freeze([{re:/\buntested\b|\bwithout\s+(?:a\s+)?tests?\b|\bhas\s+no\s+tests?\b|\bneeds?\s+(?:a\s+)?tests?\b/i,topic:"untested",noArg:!0,skipIfSuperlative:!0},{re:/\bblast\s*radius\b|\bimpacts?\b|\bimpacted\b|what\s+(?:a\s+)?change.*(?:reach|affect|touch)|what\s+(?:depends?\s+on|dependents?)\b/i,topic:"impact",arg:"module"},{re:/\bcall[\s-]*edges?\b|\bcall[\s-]*graph\b|\boutgoing\s+calls?\b|\bcall[\s-]*sites?\s+(?:of|in|out|from)\b/i,topic:"calls",arg:"symbol"},{re:/\bcallees?\b|wh(?:at|o)\s+does\s+\S+\s+call\b/i,topic:"callees",arg:"symbol"},{re:/\bcallers?\b|who\s+calls\b|what\s+calls\b/i,topic:"callers",arg:"symbol"},{re:/\btests?\b.*\b(?:for|cover|covering|of)\b|which\s+tests?\b|covers?\b|covered\b|test\s+coverage\b/i,topic:"tests",arg:"symbol"},{re:/\bcochang|change[- ]coupl/i,topic:"cochanges",arg:"symbol"},{re:/\bexports?\b|\bpublic\s+api\b/i,topic:"exports",arg:"module"},{re:/\bsubclasses?\b|children\s+of\b|\bextends?\b/i,topic:"subclasses",arg:"class"},{re:/\bmembers?\b|\bmethods?\s+of\b|\battributes?\s+of\b/i,topic:"members",arg:"class"},{re:/\bhistory\b|who\s+changed\b|commits?\s+(?:that\s+)?touch/i,topic:"history",arg:"symbol"},{re:/\bsignature\b/i,topic:"signature",arg:"symbol"},{re:/\bsynonyms?\b|\banother\s+word\s+for\b|\brelated\s+(?:words?|concepts?|to)\b/i,topic:"related",arg:"term"},{re:/\bsprite\b|\bicon\b|\bavatar\b|\bpicture\s+of\b|\bwhat\s+does\s+.+\s+look\s+like\b/i,topic:"sprite",arg:"class",slots:iO},{re:/\bdescribe\b|\bexplain\b|what\s+is\b|tell\s+me\s+about\b|definition\s+of\b/i,topic:"description",arg:"symbol"},{re:/\bsearch\b|\bfind\b|look\s+for\b/i,topic:"matches",arg:"query"}])});var j$=C(()=>{});var cO,R$=C(()=>{Ap();$r();Tp();j$();Pn();cO=Object.freeze([Object.freeze({id:"coverage-invariant",kind:"maintenance",invariant:"an impactful module must be tested",focusClass:"Module",modes:Object.freeze(["scoped","global"]),subGoals:Object.freeze(["impact","untested"]),priorityTopic:"impact",coverageTopic:"untested",compose:Object.freeze({op:"intersect",a:Object.freeze({topic:"untested"}),b:Object.freeze({topic:"impact",of:"focus",withFocus:!0}),names:"the change's untested footprint",empty:"no coverage gap"}),achieves:"coverage-gap"}),Object.freeze({id:"cochange-risk-invariant",kind:"maintenance",invariant:"a module change-coupled with the focus must be tested",focusClass:"Module",modes:Object.freeze(["scoped"]),subGoals:Object.freeze(["cochanges","untested"]),priorityTopic:"cochanges",coverageTopic:"untested",compose:Object.freeze({op:"intersect",a:Object.freeze({topic:"cochanges",of:"focus"}),b:Object.freeze({topic:"untested"}),names:"the change-coupled untested set",empty:"every change-coupled module is tested"}),achieves:"cochange-risk"})])});var Nc=C(()=>{Lc();_p();Ap();R$();$r();Rp()});function dO(e=process.env){return e?.TMCT_WORLDS_PACK_DIR||Z(uO,"corpus","worlds")}function _$(e){try{return Sc(br(e))}catch{return null}}function T$(e){if(Cp.has(e))return Cp.get(e);let t=null,n=_$(Z(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 Cp.set(e,t),t}function pO(e,t){let n=T$(e);if(!n)return null;let s=n[String(t??"")];if(!b$(s))return null;let o=`${e}\0${t}`;if(Op.has(o))return Op.get(o);let r=null,i=_$(Z(e,"shards",`${s.s}.jsonl.gz`));if(i){let a=[],l=[],c=null;for(let u of i.toString("utf8").split(`
|
|
167
|
+
`))if(u.trim())try{let d=JSON.parse(u);if(!w$(d)||d.world!==t)continue;Ep(d)?a.push(d):Sp(d)?l.push(d):kp(d)&&!c&&(c=d)}catch{}(a.length||l.length||c)&&(r={name:t,facts:y$(a),rules:l,meta:c})}return Op.set(o,r),r}var hO,uO,Cp,Op,fO,mG,Pc=C(()=>{xo();kc();Bs();We();So();hO={},uO=Z(he(Lt(hO.url)),"..","..","..");Cp=new Map,Op=new Map;fO=e=>({list:async()=>{let t=T$(e());return t?Object.keys(t).sort():null},load:async t=>pO(e(),t)}),mG=fO(()=>dO())});var SG,A$=C(()=>{_t();We();js();Pr();ns();Be();SG=Z(".tmct","memory","blocks")});var I$=C(()=>{ko()});var O$=C(()=>{js();Pr();ko()});var Lp=C(()=>{js();Pr();ko()});var L$=C(()=>{Lp();js();_s();ko()});var N$=C(()=>{});var P$=C(()=>{I$();O$();Lp();L$();N$();ko()});var M$=C(()=>{A$();Be();Ea();op();P$();jp()});var F$=C(()=>{vn();Wo()});function vr(e,t){let n=parseInt(e.slice(1),16);return`rgba(${n>>16&255}, ${n>>8&255}, ${n&255}, ${t})`}function Fc(e){let t=n=>wO.map((s,o)=>`--${n}-t${o+1}: ${vr(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: ${vr(e.taught,.12)}; --corpus-soft: ${vr(e.corpus,.12)};`,`--entail-soft: ${vr(e.entail,.14)}; --alert-soft: ${vr(e.alert,.12)};`,`--sprite-pop: drop-shadow(0 0 .6px ${vr(e.ink,e.popRimAlpha)}) drop-shadow(${e.popShadow});`].join(" ")}var Mc,wO,$V,Np=C(()=>{F$();Mc=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)"})}),wO=[.35,.65,1];$V=`
|
|
168
168
|
:root { color-scheme: light dark; ${Fc(Mc.light)} }
|
|
169
169
|
@media (prefers-color-scheme: dark) { :root { ${Fc(Mc.dark)} } }
|
|
170
170
|
:root[data-theme="dark"] { ${Fc(Mc.dark)} }
|
|
171
171
|
:root[data-theme="light"] { ${Fc(Mc.light)} }
|
|
172
|
-
`});var D$=C(()=>{Np()});var z$=C(()=>{Np()});var W$=C(()=>{Ue();So();vn();xr()});var V$=C(()=>{_s();Ue();Lc();Nc();xr()});var Mp,kO,jO,RO,_O,TO,AO,bq,wq,xr=C(()=>{So();Lc();v$();Ws();gc();jp();Rp();Nc();_p();Pc();Ue();M$();D$();z$();W$();V$();Mp="mgx:world-epoch",kO=new Set(["mgx:currently-in","mgx:located-in","mgx:fixed-in","mgx:stands-locked-in","mgx:hidden-in"]),jO=new Set(["mgx:on-top-of","mgx:on-plane","mgx:under"]),RO="mgx:is-open",_O="mgx:hasMass",TO="mgx:knows-about",AO="mgx:display-name",bq=new Set([...kO,...jO,RO,_O,TO,AO,"rdf:type",Mp]),wq=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 Er,$q,vq,xq,Eq,Sq,kq,Vs=C(()=>{Er=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:2,placedFoodMass:2,maxPreyPopulation:6,maxFoodItems:8,foodVisionGated:!0,blendPreyDecision:!1,preyThreatWeight:.5,teach:!1}),guessNumber:Object.freeze({defaultLo:1,defaultHi:100,maxBound:1e9}),adventure:Object.freeze({teach:!1}),planning:Object.freeze({maxDepth:300})}),$q=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"}),vq=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"}),xq=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",food_vision_gated:"foodVisionGated",blend_prey_decision:"blendPreyDecision",prey_threat_weight:"preyThreatWeight",teach:"teach"}),Eq=Object.freeze({teach:"teach"}),Sq=Object.freeze({default_lo:"defaultLo",default_hi:"defaultHi",max_bound:"maxBound"}),kq=Object.freeze({max_depth:"maxDepth"})});var H$,IO,zc,CO,OO,K$,Y$,LO,NO,_q,PO,MO,X$=C(()=>{Vs();H$="spider-fly",IO=10,zc=Object.freeze({x:2,y:2}),CO=1,OO=Object.freeze({predator:Object.freeze({role:"predator",kind:"spider",idPrefix:"spider",hunts:"prey"}),prey:Object.freeze({role:"prey",kind:"fly",idPrefix:"fly",hunts:null}),food:null}),K$=(e,t)=>`cell-${e}-${t}`,Y$=(e,t,n,s)=>Math.max(Math.abs(e-n),Math.abs(t-s)),LO=(e,t)=>Y$(e,t,zc.x,zc.y)<=CO,NO=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})}),_q=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"])]),PO="a spider waits in its web; a fly drifts in from the edge of the board. Neither is yours to move. Watch, or address one by name in chat.",MO=Object.freeze({name:H$,gridSize:IO,opening:PO,boardNoun:"board",boardSubject:"board",cast:Object.freeze({predators:1,prey:1}),props:Object.freeze([]),staticWebAt:LO,webHomeCell:K$(zc.x,zc.y)})});var J$,tv,Iq,Cq,Oq,Fp,Q$,Z$,ev,Dp,Lq,Nq,Uc=C(()=>{Vs();J$=Object.freeze({predator:"fox",prey:"goblin",spawnedFood:"crumb",placedFood:"morsel"}),tv=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})}),Iq=Object.freeze(["north","northeast","east","southeast","south","southwest","west","northwest"]),Cq=Object.freeze(["blacksmith","bush","cart","fence","house","inn","oak","stall","well"]),Oq=Object.freeze([J$.spawnedFood,J$.placedFood]),Fp=e=>Object.freeze({...e,props:Object.freeze(e.props.map(t=>Object.freeze(t))),cast:Object.freeze(e.cast)}),Q$=Fp({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"}]}),Z$=Fp({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"}]}),ev=Fp({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"}]}),Dp=Object.freeze({[Q$.name]:Q$,[Z$.name]:Z$,[ev.name]:ev}),Lq=Object.freeze(Object.keys(Dp)),Nq=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 nv=C(()=>{});var sv=C(()=>{});var Ti,sH,GO,VO,qO,HO,KO,YO,XO,JO,QO,ZO,eL,tL,nL,sL,oL,rL,iL,oH,zp=C(()=>{Uc();nv();_s();Ue();So();sv();Ot();Vs();xr();Ti=Object.freeze({predator:{role:"predator",kind:"fox",idPrefix:"fox",hunts:"prey"},prey:{role:"prey",kind:"goblin",idPrefix:"goblin",hunts:null},food:{spawnedKind:"crumb",placedKind:"morsel"}}),sH=Object.freeze(["predator","prey"]),GO="mgx:currently-in",VO="mgx:hasMass",qO="mgx:feels",HO="mgx:facing",KO="mgx:driven-facing",YO="mgx:eaten-by",XO="mgx:starved",JO="mgx:placed-by",QO="mgx:model",ZO="mgx:rotation",eL="mgx:carrying",tL="mgx:prey-eaten",nL="mgx:web-built-at-turn",sL="mgx:laid-at-turn",oL="mgx:hatched-into",rL="mgx:turn-played",iL=new Set([GO,VO,qO,HO,KO,YO,XO,JO,QO,ZO,rL,eL,tL,nL,sL,oL,"rdf:type",Mp]),oH=Object.freeze([...iL].sort())});var xH,EH,rv=C(()=>{X$();Uc();zp();So();Pc();Ue();Vs();xH=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"),EH=Object.freeze({"catch-prey":"caught","eat-agent":"eaten",starve:"starved","lay-egg":"laid","hatch-egg":"hatched","spawn-prey":"spawned"})});var UH,BH,WH,GH,VH,qH,uL,dL,pL,fL,iv,av,hL,HH,KH,cv=C(()=>{Uc();zp();xr();vn();So();Pc();Ue();Vs();UH=Ti.predator.kind,BH=Ti.prey.kind,WH=Ti.food.spawnedKind,GH=Ti.food.placedKind,VH=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"),qH=new RegExp("^who\\s+(?:put|placed|dropped)\\s+(?:(?:the\\s+)?(morsel|crumb)(?:-(\\d+))?|(?:(?:the\\s+)?(?:food|morsel|crumb|that|it)\\s+)?(?:at|on)\\s+(cell-\\d+-\\d+))(?:\\s+there)?[?.!\\s]*$","i"),uL="mgx:currently-in",dL="mgx:hasMass",pL="mgx:feels",fL="mgx:facing",iv="(fox|goblin|crumb|morsel)(?:-(\\d+))?",av="(fox|goblin)(?:-(\\d+))?",hL="(crumb|morsel)(?:-(\\d+))?",HH=[{kind:"placement",predicate:uL,re:new RegExp(`^(?:the\\s+)?${iv}\\s+is\\s+at\\s+(cell-\\d+-\\d+)[.!\\s]*$`,"i")},{kind:"mass",predicate:dL,re:new RegExp(`^(?:the\\s+)?${iv}\\s+weighs\\s+(\\d+(?:\\.\\d+)?)[.!\\s]*$`,"i")},{kind:"mood",predicate:pL,re:new RegExp(`^(?:the\\s+)?${av}\\s+feels\\s+(calm|angry|scared|happy)[.!\\s]*$`,"i")},{kind:"facing",predicate:fL,re:new RegExp(`^(?:the\\s+)?${av}\\s+faces\\s+(north|south|east|west)[.!\\s]*$`,"i")}],KH=new RegExp(`^(?:the\\s+)?([a-z][a-z-]*)\\s+(?:put|placed|dropped)\\s+(?:the\\s+)?${hL}\\s+there[.!\\s]*$`,"i")});var wt,XH,JH,QH,ZH,eK,tK,nK,sK,oK,rK,iK,aK,cK,lK,uK,dK,pK,fK,hK,lv=C(()=>{wt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},XH=wt("createRequire"),JH=wt("readFileSync"),QH=wt("access"),ZH=wt("readFile"),eK=wt("writeFile"),tK=wt("appendFile"),nK=wt("mkdir"),sK=wt("mkdtemp"),oK=wt("rename"),rK=wt("unlink"),iK=wt("rm"),aK=wt("stat"),cK=wt("copyFile"),lK=wt("readdir"),uK=wt("createReadStream"),dK=wt("createWriteStream"),pK=wt("randomBytes"),fK=wt("spawnSync"),hK=wt("createInterface")});var yt,gK,bK,wK,yK,$K,vK,xK,EK,SK,kK,jK,RK,_K,TK,AK,IK,CK,OK,mL,uv=C(()=>{yt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},gK=yt("createRequire"),bK=yt("readFileSync"),wK=yt("access"),yK=yt("readFile"),$K=yt("writeFile"),vK=yt("appendFile"),xK=yt("mkdir"),EK=yt("mkdtemp"),SK=yt("rename"),kK=yt("unlink"),jK=yt("rm"),RK=yt("stat"),_K=yt("copyFile"),TK=yt("readdir"),AK=yt("createReadStream"),IK=yt("createWriteStream"),CK=yt("randomBytes"),OK=yt("spawnSync"),mL=yt("createInterface")});var $t,NK,PK,MK,FK,DK,zK,UK,BK,WK,GK,VK,qK,HK,KK,YK,XK,JK,dv,QK,Up=C(()=>{$t=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},NK=$t("createRequire"),PK=$t("readFileSync"),MK=$t("access"),FK=$t("readFile"),DK=$t("writeFile"),zK=$t("appendFile"),UK=$t("mkdir"),BK=$t("mkdtemp"),WK=$t("rename"),GK=$t("unlink"),VK=$t("rm"),qK=$t("stat"),HK=$t("copyFile"),KK=$t("readdir"),YK=$t("createReadStream"),XK=$t("createWriteStream"),JK=$t("randomBytes"),dv=$t("spawnSync"),QK=$t("createInterface")});var pv=C(()=>{Up();We();_t();We();ec();Vt()});var fv=C(()=>{});var gL,hv=C(()=>{_t();We();Ue();fv();gL=Z(".tmct","sessions")});var gv=C(()=>{_t();We();bc()});var bv,Bc,wv=C(()=>{bv=Object.freeze({countNouns:{class:"Class",classes:"Class",function:"Function",functions:"Function",func:"Function",funcs:"Function",module:"Module",modules:"Module",file:"Module",files:"Module",package:"Package",packages:"Package",method:"Method",methods:"Method",attribute:"Attribute",attributes:"Attribute",variable:"GlobalVariable",variables:"GlobalVariable",global:"GlobalVariable",globals:"GlobalVariable",commit:"Commit",commits:"Commit",session:"Session",sessions:"Session"},classLabels:{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"]},helpRows:[["/find <query>","lexical search across the graph"],["/search <query>","alias of /find"],["/context <symbol>","the sized edit bundle for a symbol (start here to change code)"],["/snippet <symbol>","exact source of one function/class/method"],["/describe <symbol>","a symbol's definition, kind and relations"],["/signature <symbol>","a symbol's signature only"],["/members <class>","the methods/attributes of a class"],["/subclasses <class>","the subclasses of a class"],["/impact <module>","what a change to this module or symbol reaches (impact closure)"],["/callers <symbol>","functions that call this symbol"],["/callees <symbol>","functions this symbol calls"],["/tests <symbol>","the tests covering this symbol"],["/untested","symbols with no covering test"],["/history <symbol>","the commit history of this symbol"],["/exports <module>","a module's public exports"],["/arch [package]","the architecture overview (optional package filter)"]],missRecoveryPointer:"for code structure, index this repo with `tmct index`, or point me at a .tmct/graph.json with --repo <path> (or try `npm run example:mini`)."}),Bc=Object.freeze({countNouns:{},classLabels:{},helpRows:[],missRecoveryPointer:""})});var vt,$Y,vY,xY,EY,SY,kY,jY,RY,_Y,TY,AY,IY,CY,OY,LY,NY,PY,MY,yv,$v=C(()=>{vt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},$Y=vt("createRequire"),vY=vt("readFileSync"),xY=vt("access"),EY=vt("readFile"),SY=vt("writeFile"),kY=vt("appendFile"),jY=vt("mkdir"),RY=vt("mkdtemp"),_Y=vt("rename"),TY=vt("unlink"),AY=vt("rm"),IY=vt("stat"),CY=vt("copyFile"),OY=vt("readdir"),LY=vt("createReadStream"),NY=vt("createWriteStream"),PY=vt("randomBytes"),MY=vt("spawnSync"),yv=vt("createInterface")});var kv={};Gt(kv,{CONTEXT_PASSAGE_PREDICATE:()=>xv,CO_OCCURS_PREDICATE:()=>Wc,ingestUnknownFromAssertions:()=>yL,knownTermsFrom:()=>Ev,passageFor:()=>Sv});function Ev(e,t){let n=new Set;for(let s of e?.individuals||[]){if(s?.class!==ft)continue;let o=a=>(s.attributes||[]).find(l=>l?.key===a)?.value,r=o("subject"),i=o("object");r&&n.add(V(r)),i&&n.add(V(i))}for(let s of t||[])s?.subject&&n.add(V(s.subject)),s?.object&&n.add(V(s.object));return n}function Sv(e,t){let n=e?.surfaceText;if(typeof n=="string"&&n.trim())return n.replace(/\[\[([^\]]+)\]\]/g,"$1").replace(/\s+/g," ").trim();let s=qs(e?.start),o=qs(e?.end);return t?.surface&&s&&o?t.surface.replace("{start}",s).replace("{end}",o):null}function wL(e,t,n){let s=String(e||"").toLowerCase().replace(/[^a-z0-9\s]/g," ").split(/\s+/).filter(Boolean),o=[],r=new Set;for(let i=0;i<s.length&&o.length<vv;i+=1){let a=[s[i]];i+1<s.length&&a.push(`${s[i]} ${s[i+1]}`);for(let l of a)if(!(bL.has(l)||r.has(l)||n.has(l))&&t.has(l)&&(o.push(l),r.add(l),o.length>=vv))break}return o}async function yL(e,{assertions:t,map:n,mappedFacts:s=[],memory:o,provenancePrefix:r="corpus:unknown",limit:i=500}={}){if(!Array.isArray(t)||!n)return{captured:0,linked:0,appended:0,skipped:0};let a=o||await at(e),l=Ev(a,s),c=new Set,u=[];for(let p of t){if(c.size>=i)break;let h=n.get(p.rel);if(!h||h.ace!=="none")continue;let m=qs(p.start),b=qs(p.end);if(!m||!b)continue;let g=V(m),y=V(b),w=!l.has(g),v=!l.has(y);if(!w&&!v)continue;let k=Sv(p,h);if(!k)continue;let $=[[m,b,w],[b,m,v]];for(let[x,E,S]of $){if(!S||c.size>=i)continue;let _=V(x);if(c.has(_))continue;let R=`${r} ${p.rel}`;u.push({subject:x,predicate:xv,object:k,provenance:R}),u.push({subject:x,predicate:Wc,object:E,provenance:R});let I=wL(k,l,new Set([g,y]));for(let P of I)u.push({subject:x,predicate:Wc,object:P,provenance:R});c.add(_),l.add(_)}}if(!u.length)return{captured:0,linked:0,appended:0,skipped:0};let d=await Hn(e,u),f=u.filter(p=>p.predicate===Wc).length;return{captured:c.size,linked:f,appended:d.appended,skipped:d.skipped}}var xv,Wc,bL,vv,jv=C(()=>{Ue();Gc();xv="mgx:contextPassage",Wc="mgx:coOccursWith",bL=new Set(["a","an","the","is","are","was","were","be","being","been","to","of","for","in","on","at","with","by","as","and","or","that","this","it","its","you","your","related","kind","used"]),vv=3});var Rv={};Gt(Rv,{MAP_FILE:()=>Ii,SEON_CONCEPTS_FILE:()=>Vc,SEON_DEFINITIONS_FILE:()=>$L,SLICE_FILE:()=>Ai,TIER2_DIR:()=>Yn,TIER2_MANIFEST_FILE:()=>vL,WORDNET_DIR:()=>Ci,loadMap:()=>Hc,loadSlice:()=>qc,seedMemory:()=>EL,termText:()=>qs,toFacts:()=>Kc});async function qc(e=Ai){let t=yv({input:Uy(e,"utf8"),crlfDelay:1/0}),n=[],s=0;for await(let o of t){s+=1;let r=o.trim();if(!r)continue;let i;try{i=JSON.parse(r)}catch(a){throw new Error(`${e}:${s}: not valid JSON: ${a.message}`)}for(let a of["start","rel","end"])if(typeof i[a]!="string"||!i[a])throw new Error(`${e}:${s}: assertion missing "${a}"`);n.push(i)}return n}async function Hc(e=Ii){let n=bo(await Re(e,"utf8")).relation||[],s=new Map;for(let o of n){if(!o.rel)throw new Error(`${e}: a [[relation]] row is missing "rel"`);if(s.has(o.rel))throw new Error(`${e}: duplicate mapping for ${o.rel}`);if(!xL.has(o.ace))throw new Error(`${e}: ${o.rel} has unknown ace pattern ${JSON.stringify(o.ace)}`);if(o.ace!=="none"&&!o.predicate)throw new Error(`${e}: ${o.rel} maps to ${o.ace} but names no predicate URI`);s.set(o.rel,o)}return s}function Kc(e,t,n="corpus:conceptnet"){let s=[];for(let o of e){let r=t.get(o.rel);if(!r)throw new Error(`slice/map drift: relation ${o.rel} has no row in conceptnet-map.toml`);if(r.ace==="none")continue;let i=qs(o.start),a=qs(o.end);if(!i||!a)continue;let l=r.predicate==="mgx:relatedTo"?n.replace(/^corpus:/,"corpus-weak:"):n;s.push({subject:i,predicate:r.predicate,object:a,provenance:`${l} ${o.rel}`})}return s}async function EL(e,{limit:t,slicePath:n=Ai,mapPath:s=Ii,prefer:o,provenancePrefix:r,captureUnknownContext:i=!1,unknownContextLimit:a}={}){let[l,c]=await Promise.all([qc(n),Hc(s)]),u=Kc(l,c,r);if(Array.isArray(o)&&o.length){let y=new Map(o.map((w,v)=>[w,v]));u=u.slice().sort((w,v)=>(y.get(w.predicate)??o.length)-(y.get(v.predicate)??o.length))}t!==void 0&&(u=u.slice(0,t));let d=(y,w,v)=>`${V(y)} ${w} ${V(v)}`,f=new Set,p=await at(e);for(let y of p.individuals||[]){if(y?.class!=="Fact")continue;let w=v=>(y.attributes||[]).find(k=>k.key===v)?.value;f.add(d(w("subject"),w("predicate"),w("object")))}let h=0,m=[];for(let y of u){let w=d(y.subject,y.predicate,y.object);if(f.has(w)){h+=1;continue}f.add(w),m.push(y)}let b=await Hn(e,m),g;if(i){let{ingestUnknownFromAssertions:y}=await Promise.resolve().then(()=>(jv(),kv));g=await y(e,{assertions:l,map:c,mappedFacts:u,memory:p,provenancePrefix:r?`${r}-unknown`:void 0,limit:a})}return{appended:b.appended,skipped:h+b.skipped,total:u.length,...g?{unknown:g}:{}}}var SL,Sr,Ai,Ii,Vc,$L,Yn,vL,Ci,KY,xL,qs,Gc=C(()=>{xo();_t();$v();Bs();We();Xa();Ue();SL={},Sr=Z(he(Lt(SL.url)),"..","..",".."),Ai=Z(Sr,"corpus","conceptnet","slice.jsonl"),Ii=Z(Sr,"src","adapters","corpus","conceptnet-map.toml"),Vc=Z(Sr,"corpus","domains","code","concepts.jsonl"),$L=Z(Sr,"corpus","domains","code","definitions.jsonl"),Yn=Z(Sr,"corpus","tier2"),vL=Z(Yn,"manifest.json"),Ci=Z(Sr,"corpus","wordnet"),KY=Z(Ci,"manifest.json"),xL=new Set(["subClassOf","type","ObjectProperty","someValuesFrom","disjointWith","property","none"]);qs=e=>{let t=/^\/c\/en\/([^/]+)/.exec(String(e||""));return t?t[1].replace(/_/g," "):null}});var Ov={};Gt(Ov,{BUILTIN_EXTENSIONS:()=>_L,EXTENSION_KINDS:()=>Yc,activeDomainPacks:()=>qp,defaultCodeDomainPacks:()=>Cv,defaultCodeLaneVocab:()=>Iv,mergedLaneVocab:()=>Vp,mergedLexiconExtra:()=>Av,resolveExtensions:()=>Tv,seedActiveCorpusEntries:()=>IL,validateExtensionEntry:()=>_v,validateExtensionPack:()=>OL});function Xc(){return{seon:{kind:"corpus",active:!1,corpusPath:Vc,provenancePrefix:"corpus:seon"},code:{kind:"pack",active:!1,corpusPath:Vc,provenancePrefix:"corpus:seon",vocabPath:jL,vocabData:bv,groundingKind:"extraction",groundingAdapter:"tmct index (the graphPaths provider seam)"},conceptnet:{kind:"corpus",active:!1,corpusPath:Ai,provenancePrefix:"corpus:conceptnet",limit:void 0,prefer:RL},human:{kind:"corpus",active:!0,corpusPath:Z(Yn,"human.jsonl"),provenancePrefix:"corpus:human"},"human-medium":{kind:"corpus",active:!1,corpusPath:Z(Yn,"human-medium.jsonl"),provenancePrefix:"corpus:human-medium"},"human-large":{kind:"corpus",active:!1,corpusPath:Z(Yn,"human-large.jsonl"),provenancePrefix:"corpus:human-large"},"tier2-aws":{kind:"pack",active:!1,corpusPath:Z(Yn,"aws.jsonl"),provenancePrefix:"corpus:tier2-aws",vocabPath:Bp,vocabData:Bc,groundingKind:"taught-only"},"tier2-python":{kind:"pack",active:!1,corpusPath:Z(Yn,"python.jsonl"),provenancePrefix:"corpus:tier2-python",vocabPath:Bp,vocabData:Bc,groundingKind:"taught-only"},"tier2-java":{kind:"pack",active:!1,corpusPath:Z(Yn,"java.jsonl"),provenancePrefix:"corpus:tier2-java",vocabPath:Bp,vocabData:Bc,groundingKind:"taught-only"},"tier2-general":{kind:"corpus",active:!1,corpusPath:Z(Yn,"general.jsonl"),provenancePrefix:"corpus:tier2-general"},"wordnet-xl":{kind:"corpus",active:!1,corpusPath:Z(Ci,"wordnet-xl.jsonl"),provenancePrefix:"corpus:wordnet-xl"},"wordnet-full":{kind:"corpus",active:!1,corpusPath:Z(Ci,"wordnet-full.jsonl"),provenancePrefix:"corpus:wordnet-full"},namenet:{kind:"corpus",active:!1,corpusPath:Z(kL,"namenet.jsonl"),provenancePrefix:"corpus:namenet"}}}function _v(e,t){if(!t||typeof t!="object")throw new Error(`extension "${e}": entry must be an object`);if(!Yc.includes(t.kind))throw new Error(`extension "${e}": unknown kind ${JSON.stringify(t.kind)} (must be one of ${Yc.join(", ")})`);if(t.active!==void 0&&typeof t.active!="boolean")throw new Error(`extension "${e}": "active" must be a boolean`);if(t.kind==="corpus"&&!t.corpusPath)throw new Error(`extension "${e}": a "corpus" entry needs corpus_path`);if(t.kind==="ontology"&&!t.corpusPath)throw new Error(`extension "${e}": an "ontology" entry needs ontology_path`);if(t.kind==="lexicon"&&!t.lexiconPath)throw new Error(`extension "${e}": a "lexicon" entry needs lexicon_path`);if(t.kind==="templates"&&!t.templatesPath)throw new Error(`extension "${e}": a "templates" entry needs templates_path`);if(t.kind==="pack"&&!t.corpusPath&&!t.lexiconPath&&!t.templatesPath&&!t.phrasebookPath)throw new Error(`extension "${e}": a "pack" entry needs at least one of corpus_path/lexicon_path/templates_path/phrasebook_path`);if(t.limit!==void 0&&!Number.isFinite(t.limit))throw new Error(`extension "${e}": "limit" must be a finite number`);if(t.prefer!==void 0&&!Array.isArray(t.prefer))throw new Error(`extension "${e}": "prefer" must be an array of predicate URIs`)}function AL(e,t,n,s){if(!t&&n.kind===void 0)throw new Error(`extension "${e}": an unrecognized extension needs a "kind" (one of ${Yc.join(", ")})`);let o={kind:n.kind!==void 0?n.kind:t?.kind,active:n.active!==void 0?!!n.active:!!t?.active},r=[["corpus_path","corpusPath"],["ontology_path","corpusPath"],["lexicon_path","lexiconPath"],["templates_path","templatesPath"],["phrasebook_path","phrasebookPath"],["map_path","mapPath"],["vocab_path","vocabPath"]];for(let[i,a]of r)n[i]!==void 0?o[a]=TL(s,n[i]):t?.[a]!==void 0&&(o[a]=t[a]);return o.provenancePrefix=n.provenance_prefix!==void 0?String(n.provenance_prefix):t?.provenancePrefix??`corpus:${e}`,n.limit!==void 0?o.limit=Number(n.limit):t?.limit!==void 0&&(o.limit=t.limit),n.prefer!==void 0?o.prefer=n.prefer:t?.prefer!==void 0&&(o.prefer=t.prefer),n.grounding_kind!==void 0?o.groundingKind=String(n.grounding_kind):t?.groundingKind!==void 0&&(o.groundingKind=t.groundingKind),n.grounding_adapter!==void 0?o.groundingAdapter=String(n.grounding_adapter):t?.groundingAdapter!==void 0&&(o.groundingAdapter=t.groundingAdapter),o}async function Tv(e,{configFile:t}={}){let n=e?await Za(e,t?{file:t}:{}):null,s=Xc(),o=n&&n.extensions&&typeof n.extensions=="object"?n.extensions:{},r=n&&n.bias&&typeof n.bias=="object"?n.bias:{},i=new Set([...Object.keys(s),...Object.keys(o)]),a=new Map;for(let f of i){let p=AL(f,s[f]||null,o[f]||{},e||process.cwd());_v(f,p),a.set(f,p)}let l={};for(let[f,p]of Object.entries(r)){if(typeof p!="number"||!Number.isFinite(p))throw new Error(`[bias] "${f}": bias must be a finite number, got ${JSON.stringify(p)}`);l[f]=p}let u=["seon","conceptnet",...[...a.keys()].filter(f=>f!=="seon"&&f!=="conceptnet").sort()].filter(f=>a.has(f));return{entries:new Map(u.map(f=>[f,a.get(f)])),biasByBundle:l}}async function IL(e,t,n={}){let{seedMemory:s}=await Promise.resolve().then(()=>(Gc(),Rv)),{captureUnknownContext:o,unknownContextLimit:r}=n,i={},a=0,l=0,c=0;for(let[u,d]of t instanceof Map?t:new Map)if(!(!d.active||!(d.kind==="corpus"||d.kind==="ontology"||d.kind==="pack"&&d.corpusPath)))try{let p=await s(e,{slicePath:d.corpusPath,mapPath:d.mapPath,provenancePrefix:d.provenancePrefix,limit:d.limit,prefer:d.prefer,captureUnknownContext:o,unknownContextLimit:r});i[u]={appended:p.appended,skipped:p.skipped,total:p.total},a+=p.appended,l+=p.skipped,c+=p.total}catch(p){i[u]={appended:0,skipped:0,total:0,error:p&&p.message?p.message:String(p)}}return{appended:a,skipped:l,total:c,perBundle:i}}async function Av(e,t={}){let n=[];for(let[o,r]of e instanceof Map?e:new Map)r.active&&(r.kind!=="lexicon"&&r.kind!=="pack"||r.lexiconPath&&n.push({name:o,path:r.lexiconPath,bias:t[o]??1}));if(!n.length)return null;n.sort((o,r)=>o.bias-r.bias);let s={nouns:{},verbs:{},adjectives:{},properNames:[]};for(let o of n){let r;try{r=JSON.parse(await Re(o.path,"utf8"))}catch(i){throw new Error(`extension "${o.name}": lexicon file ${o.path} \u2014 ${i&&i.message?i.message:i}`)}if(Object.assign(s.nouns,r.nouns||{}),Object.assign(s.verbs,r.verbs||{}),Object.assign(s.adjectives,r.adjectives||{}),Array.isArray(r.properNames))for(let i of r.properNames)s.properNames.includes(i)||s.properNames.push(i)}return s}async function Vp(e,t={}){let n=[];for(let[o,r]of e instanceof Map?e:new Map)r.active&&r.kind==="pack"&&(!r.vocabPath&&!r.vocabData||n.push({name:o,path:r.vocabPath,data:r.vocabData,bias:t[o]??1}));let s={countNouns:{},classLabels:{},helpRows:[],missRecoveryPointer:""};if(!n.length)return s;n.sort((o,r)=>o.bias-r.bias);for(let o of n){let r;if(o.data)r=o.data;else try{r=JSON.parse(await Re(o.path,"utf8"))}catch(i){throw new Error(`extension "${o.name}": vocab file ${o.path} \u2014 ${i&&i.message?i.message:i}`)}Object.assign(s.countNouns,r.countNouns||{}),Object.assign(s.classLabels,r.classLabels||{}),Array.isArray(r.helpRows)&&s.helpRows.push(...r.helpRows),r.missRecoveryPointer&&(s.missRecoveryPointer=r.missRecoveryPointer)}return s}function Iv(){if(!Wp){let e={...Xc().code,active:!0};Wp=Vp(new Map([["code",e]]),{})}return Wp}async function CL(e,t){let n={name:e,groundingKind:t.groundingKind||"",groundingAdapter:t.groundingAdapter||"",commandCount:0,countNounCount:0};if(!t.vocabPath)return n;try{let s=JSON.parse(await Re(t.vocabPath,"utf8"));n.commandCount=Array.isArray(s.helpRows)?s.helpRows.length:0,n.countNounCount=Object.keys(s.countNouns||{}).length}catch{}return n}async function qp(e,t={}){let n=[];for(let[o,r]of e instanceof Map?e:new Map)r.active&&r.kind==="pack"&&n.push({name:o,entry:r,bias:t[o]??1});n.sort((o,r)=>o.bias-r.bias||o.name.localeCompare(r.name));let s=[];for(let o of n)s.push(await CL(o.name,o.entry));return s}function Cv(){if(!Gp){let e={...Xc().code,active:!0};Gp=qp(new Map([["code",e]]),{})}return Gp}async function OL(e,t){let n=[],s=o=>o&&(cl(o)?o:Pt(e,o));if(t.corpusPath){let o=s(t.corpusPath);try{let r=await qc(o),i=await Hc(s(t.mapPath)||Ii),a=Kc(r,i,t.provenancePrefix||"corpus:pack");n.push({kind:"corpus",path:o,ok:!0,counts:{assertions:r.length,facts:a.length}})}catch(r){n.push({kind:"corpus",path:o,ok:!1,error:r&&r.message?r.message:String(r)})}}if(t.lexiconPath){let o=s(t.lexiconPath);try{let{loadLexicon:r}=await Promise.resolve().then(()=>(Ws(),e$)),i=JSON.parse(await Re(o,"utf8")),a=r(i);n.push({kind:"lexicon",path:o,ok:!0,counts:{nouns:a.nouns.size,verbs:a.verbs.size,adjectives:a.adjectives.size,properNames:a.properNames.size}})}catch(r){n.push({kind:"lexicon",path:o,ok:!1,error:r&&r.message?r.message:String(r)})}}if(t.templatesPath){let o=s(t.templatesPath);try{let{loadTemplates:r}=await Promise.resolve().then(()=>(wc(),Dy)),i=await r(o),a=[...i.keys()].filter(l=>!l.includes(":"));if(a.length)throw new Error(`template id${a.length>1?"s":""} not namespaced "<packname>:<id>": ${a.join(", ")}`);n.push({kind:"templates",path:o,ok:!0,counts:{templates:i.size}})}catch(r){n.push({kind:"templates",path:o,ok:!1,error:r&&r.message?r.message:String(r)})}}if(t.vocabPath){let o=s(t.vocabPath);try{let r=JSON.parse(await Re(o,"utf8")),i=r.countNouns&&typeof r.countNouns=="object"?Object.keys(r.countNouns).length:0,a=r.classLabels&&typeof r.classLabels=="object"?Object.keys(r.classLabels).length:0,l=Array.isArray(r.helpRows)?r.helpRows.length:0;n.push({kind:"vocab",path:o,ok:!0,counts:{countNouns:i,classLabels:a,helpRows:l}})}catch(r){n.push({kind:"vocab",path:o,ok:!1,error:r&&r.message?r.message:String(r)})}}if(t.kind==="pack"){let o=t.groundingKind;o!=="extraction"&&o!=="taught-only"?n.push({kind:"grounding",path:"(pack manifest)",ok:!1,error:`a "pack" entry needs "grounding_kind" of "extraction" or "taught-only" (got ${JSON.stringify(o??null)})`}):o==="extraction"&&!t.groundingAdapter?n.push({kind:"grounding",path:"(pack manifest)",ok:!1,error:'grounding_kind "extraction" needs "grounding_adapter" naming the adapter'}):n.push({kind:"grounding",path:"(pack manifest)",ok:!0,counts:o==="extraction"?{channel:o,adapter:t.groundingAdapter}:{channel:o}})}return{ok:n.length>0&&n.every(o=>o.ok),results:n}}var Hp,kL,jL,Bp,Yc,RL,_L,TL,Wp,Gp,Kp=C(()=>{We();_t();Bs();wv();ec();Gc();Hp={},kL=Z(he(Lt(Hp.url)),"..","..","corpus","namenet"),jL=Z(he(Lt(Hp.url)),"..","..","corpus","domains","code","vocab.json"),Bp=Z(he(Lt(Hp.url)),"..","..","corpus","tier2","vocab-empty.json"),Yc=Object.freeze(["corpus","lexicon","templates","pack","ontology"]),RL=["rdfs:subClassOf","rdf:type","mgx:usedFor","mgx:partOf","mgx:capableOf"];_L=Object.freeze(Xc());TL=(e,t)=>{if(t==null)return;let n=String(t);return cl(n)?n:Pt(e,n)};Wp=null;Gp=null});var Lv=C(()=>{});var Nv=C(()=>{We();xo();_t();lv();uv();Up();Vt();pv();Ie();hv();bc();gv();Nr();Kp();Jc();Vs();gc();Nc();wp();ji();Lv()});var Pv={};Gt(Pv,{proseLemma:()=>NL});function NL(){if(Ro!==void 0)return Ro;try{let e=rp();if(!e)return Ro=null,Ro;let t=e.its,n=new Map;Ro=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{Ro=null}return Ro}var Ro,Mv=C(()=>{ip()});var Fv={};Gt(Fv,{digestTermFromRows:()=>FL,loadDigestStructureTable:()=>ML,readDigestStructures:()=>PL});var PL,ML,FL,Dv=C(()=>{PL=()=>null,ML=()=>null,FL=()=>null});function cf(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 ${Qc(e.entityType)}`;if(t==="list")return`list/enumerate ${Qc(e.entityType)} matching a condition`;if(t==="superlative")return`rank/compare ${Qc(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 cf(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&&wn[o]?wn[o]:`filter/traverse ${Qc(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&&wn[s]||"check a specific subject/object relationship":(n==="reverse"||n==="forward")&&s?wn[s]||`understand a "${s}" relationship`:"understand a graph relationship"}function mf(e){let t=new Map;for(let n of e)t.has(Bv(n))||t.set(Bv(n),n);return t}function Jp(e,t=Li){let n=[],s=[];for(let l of e)l.predicate===t&&(s.push([l.subject,l.object]),_o(l)&&n.push([l.subject,l.object]));let o=new Map,r=new Map,i=new Set,a=(l,c,u)=>{!c||!u||c===u||(l.has(c)||l.set(c,new Set),l.get(c).add(u))};for(let[l,c]of s)a(r,l,c),c&&i.add(c);for(let[l,c]of n)a(o,l,c);return{strictEdges:n,broadEdges:s,strictSucc:o,broadSucc:r,reachableHeads:i}}function Qp(e,t,n,s,o){let r=s.reachableHeads,i=!1;for(let a of n)if(r.has(a)){i=!0;break}return i?e(t,n,[],s.strictSucc,o)||e(t,n,[],s.broadSucc,o):null}function VL(e,t){return!/ves$/i.test(e)||!/fe?$/i.test(t)?t:e.slice(0,-1)}async function qL(e){let t=String(e||"").toLowerCase();try{let{proseLemma:n}=await Promise.resolve().then(()=>(Mv(),Pv)),s=n();return s?VL(t,s(t)):t}catch{return t}}function bf(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)||HL.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 tf(e){let t=String(e||"").toLowerCase();if(t==="has"||t==="have")return gr;if(t==="can")return"mgx:capableOf";try{let n=await qL(t);return n==="have"?gr:hs(`mgx:${n}`)}catch{return hs(`mgx:${t}`)}}function ZL(e,t){let n=String(t||"").match(QL);return n&&/^mgx:[a-z]+$/.test(e)?{predicate:`${e}-${n[1].toLowerCase()}`,object:n[2].trim()}:{predicate:e,object:String(t||"").trim()}}async function Oi(e,t){if(!e||!t)return null;try{let{resolveObject:n}=await Promise.resolve().then(()=>(Pn(),Eg)),s=n(e,t);if(s?.match?.id&&!s.ambiguous)return{id:s.match.id,label:s.match.label}}catch{}return null}function rN(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 hx(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 mx(e){if(To[e])return To[e];let t=String(e||""),n=qg(t);if(n){let a=mx(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",hx(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:(${wf})-([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?`${rN(i[1])}${i[2]?` ${i[2]}`:""}`:e}function sf(e){let t=/^mgx:([a-z][\w-]*)$/i.exec(String(e||""));return t?t[1].toLowerCase():null}function aN(e){let t=String(e||"").trim(),n=t.toLowerCase();for(let{marker:s,predicate:o}of iN)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 Jn(e){return e.replace(/#node:[0-9a-f]+/g,"")}function re(e){let t=e.provenance?` (source: ${Jn(e.provenance)})`:"";return e.provenance.includes("ace:chat")||e.provenance.includes("teach:chat")?`you told me: ${Bt(e)}${t}`:e.provenance.includes("corpus-weak:")?`possibly: ${Bt(e)}${t}`:e.provenance.includes("corpus:")?`${Bt(e)}${t}`:e.provenance.includes("reference:")?`${Bt(e)}${t}`:`i learned: ${Bt(e)}${t}`}function Vv(e,t,n,{toward:s=null}={}){let o=re(e);if(!Xn.has(e.predicate)||!n.has(e.subject))return o;let r=Ic(e.object,t,{cap:6,stopAt:Tc,toward:s});if(r.length<=1)return o;let i=` \u2192 ${r.slice(1).join(" \u2192 ")}`,a=o.match(cN);return a?o.slice(0,a.index)+i+a[0]:o+i}function qv(e,t,n,{indent:s=""}={}){let o=t.filter(k=>k.predicate===Li).map(k=>[k.subject,k.object]),r=Ri(o),i=e.map(k=>`${s}${Vv(k,r,n)}`),a=e.filter(k=>Xn.has(k.predicate)&&n.has(k.subject)),l=[...new Set(a.map(k=>k.object))];if(l.length<2)return{lines:i,grouped:null};let c=t.filter(k=>k.predicate==="owl:disjointWith").map(k=>[k.subject,k.object]),{split:u,clusters:d}=Cc(l,{parents:r,disjointEdges:c});if(!u)return{lines:i,grouped:null};let f=a[0].subject,p=new Map;for(let k of d)for(let $ of k.objects)p.set($,k);let h=e.filter(k=>!(Xn.has(k.predicate)&&n.has(k.subject))),m=[],b=[],g=0,y=k=>{let $=Vv(k,r,n);return g<ve?(g+=1,`${s}${$}`):(b.push($),null)};for(let k of d){let $=a.filter(x=>p.get(x.object)===k).map(y).filter(Boolean);$.length&&m.push(`${s}${f}, the ${k.label}:
|
|
172
|
+
`});var D$=C(()=>{Np()});var z$=C(()=>{Np()});var W$=C(()=>{Be();So();vn();xr()});var V$=C(()=>{_s();Be();Lc();Nc();xr()});var Mp,kO,jO,RO,_O,TO,AO,wq,yq,xr=C(()=>{So();Lc();v$();Ws();gc();jp();Rp();Nc();_p();Pc();Be();M$();D$();z$();W$();V$();Mp="mgx:world-epoch",kO=new Set(["mgx:currently-in","mgx:located-in","mgx:fixed-in","mgx:stands-locked-in","mgx:hidden-in"]),jO=new Set(["mgx:on-top-of","mgx:on-plane","mgx:under"]),RO="mgx:is-open",_O="mgx:hasMass",TO="mgx:knows-about",AO="mgx:display-name",wq=new Set([...kO,...jO,RO,_O,TO,AO,"rdf:type",Mp]),yq=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 Er,vq,xq,Eq,Sq,kq,jq,Vs=C(()=>{Er=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:2,placedFoodMass:2,maxPreyPopulation:6,maxFoodItems:8,foodVisionGated:!0,blendPreyDecision:!1,preyThreatWeight:.5,teach:!1}),guessNumber:Object.freeze({defaultLo:1,defaultHi:100,maxBound:1e9}),adventure:Object.freeze({teach:!1}),planning:Object.freeze({maxDepth:300})}),vq=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"}),xq=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"}),Eq=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",food_vision_gated:"foodVisionGated",blend_prey_decision:"blendPreyDecision",prey_threat_weight:"preyThreatWeight",teach:"teach"}),Sq=Object.freeze({teach:"teach"}),kq=Object.freeze({default_lo:"defaultLo",default_hi:"defaultHi",max_bound:"maxBound"}),jq=Object.freeze({max_depth:"maxDepth"})});var H$,IO,zc,CO,OO,K$,Y$,LO,NO,Tq,PO,MO,X$=C(()=>{Vs();H$="spider-fly",IO=10,zc=Object.freeze({x:2,y:2}),CO=1,OO=Object.freeze({predator:Object.freeze({role:"predator",kind:"spider",idPrefix:"spider",hunts:"prey"}),prey:Object.freeze({role:"prey",kind:"fly",idPrefix:"fly",hunts:null}),food:null}),K$=(e,t)=>`cell-${e}-${t}`,Y$=(e,t,n,s)=>Math.max(Math.abs(e-n),Math.abs(t-s)),LO=(e,t)=>Y$(e,t,zc.x,zc.y)<=CO,NO=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})}),Tq=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"])]),PO="a spider waits in its web; a fly drifts in from the edge of the board. Neither is yours to move. Watch, or address one by name in chat.",MO=Object.freeze({name:H$,gridSize:IO,opening:PO,boardNoun:"board",boardSubject:"board",cast:Object.freeze({predators:1,prey:1}),props:Object.freeze([]),staticWebAt:LO,webHomeCell:K$(zc.x,zc.y)})});var J$,tv,Cq,Oq,Lq,Fp,Q$,Z$,ev,Dp,Nq,Pq,Uc=C(()=>{Vs();J$=Object.freeze({predator:"fox",prey:"goblin",spawnedFood:"crumb",placedFood:"morsel"}),tv=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})}),Cq=Object.freeze(["north","northeast","east","southeast","south","southwest","west","northwest"]),Oq=Object.freeze(["blacksmith","bush","cart","fence","house","inn","oak","stall","well"]),Lq=Object.freeze([J$.spawnedFood,J$.placedFood]),Fp=e=>Object.freeze({...e,props:Object.freeze(e.props.map(t=>Object.freeze(t))),cast:Object.freeze(e.cast)}),Q$=Fp({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"}]}),Z$=Fp({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"}]}),ev=Fp({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"}]}),Dp=Object.freeze({[Q$.name]:Q$,[Z$.name]:Z$,[ev.name]:ev}),Nq=Object.freeze(Object.keys(Dp)),Pq=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 nv=C(()=>{});var sv=C(()=>{});var Ti,oH,GO,VO,qO,HO,KO,YO,XO,JO,QO,ZO,eL,tL,nL,sL,oL,rL,iL,rH,zp=C(()=>{Uc();nv();_s();Be();So();sv();Ot();Vs();xr();Ti=Object.freeze({predator:{role:"predator",kind:"fox",idPrefix:"fox",hunts:"prey"},prey:{role:"prey",kind:"goblin",idPrefix:"goblin",hunts:null},food:{spawnedKind:"crumb",placedKind:"morsel"}}),oH=Object.freeze(["predator","prey"]),GO="mgx:currently-in",VO="mgx:hasMass",qO="mgx:feels",HO="mgx:facing",KO="mgx:driven-facing",YO="mgx:eaten-by",XO="mgx:starved",JO="mgx:placed-by",QO="mgx:model",ZO="mgx:rotation",eL="mgx:carrying",tL="mgx:prey-eaten",nL="mgx:web-built-at-turn",sL="mgx:laid-at-turn",oL="mgx:hatched-into",rL="mgx:turn-played",iL=new Set([GO,VO,qO,HO,KO,YO,XO,JO,QO,ZO,rL,eL,tL,nL,sL,oL,"rdf:type",Mp]),rH=Object.freeze([...iL].sort())});var EH,SH,rv=C(()=>{X$();Uc();zp();So();Pc();Be();Vs();EH=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"),SH=Object.freeze({"catch-prey":"caught","eat-agent":"eaten",starve:"starved","lay-egg":"laid","hatch-egg":"hatched","spawn-prey":"spawned"})});var BH,WH,GH,VH,qH,HH,uL,dL,pL,fL,iv,av,hL,KH,YH,cv=C(()=>{Uc();zp();xr();vn();So();Pc();Be();Vs();BH=Ti.predator.kind,WH=Ti.prey.kind,GH=Ti.food.spawnedKind,VH=Ti.food.placedKind,qH=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"),HH=new RegExp("^who\\s+(?:put|placed|dropped)\\s+(?:(?:the\\s+)?(morsel|crumb)(?:-(\\d+))?|(?:(?:the\\s+)?(?:food|morsel|crumb|that|it)\\s+)?(?:at|on)\\s+(cell-\\d+-\\d+))(?:\\s+there)?[?.!\\s]*$","i"),uL="mgx:currently-in",dL="mgx:hasMass",pL="mgx:feels",fL="mgx:facing",iv="(fox|goblin|crumb|morsel)(?:-(\\d+))?",av="(fox|goblin)(?:-(\\d+))?",hL="(crumb|morsel)(?:-(\\d+))?",KH=[{kind:"placement",predicate:uL,re:new RegExp(`^(?:the\\s+)?${iv}\\s+is\\s+at\\s+(cell-\\d+-\\d+)[.!\\s]*$`,"i")},{kind:"mass",predicate:dL,re:new RegExp(`^(?:the\\s+)?${iv}\\s+weighs\\s+(\\d+(?:\\.\\d+)?)[.!\\s]*$`,"i")},{kind:"mood",predicate:pL,re:new RegExp(`^(?:the\\s+)?${av}\\s+feels\\s+(calm|angry|scared|happy)[.!\\s]*$`,"i")},{kind:"facing",predicate:fL,re:new RegExp(`^(?:the\\s+)?${av}\\s+faces\\s+(north|south|east|west)[.!\\s]*$`,"i")}],YH=new RegExp(`^(?:the\\s+)?([a-z][a-z-]*)\\s+(?:put|placed|dropped)\\s+(?:the\\s+)?${hL}\\s+there[.!\\s]*$`,"i")});var wt,JH,QH,ZH,eK,tK,nK,sK,oK,rK,iK,aK,cK,lK,uK,dK,pK,fK,hK,mK,lv=C(()=>{wt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},JH=wt("createRequire"),QH=wt("readFileSync"),ZH=wt("access"),eK=wt("readFile"),tK=wt("writeFile"),nK=wt("appendFile"),sK=wt("mkdir"),oK=wt("mkdtemp"),rK=wt("rename"),iK=wt("unlink"),aK=wt("rm"),cK=wt("stat"),lK=wt("copyFile"),uK=wt("readdir"),dK=wt("createReadStream"),pK=wt("createWriteStream"),fK=wt("randomBytes"),hK=wt("spawnSync"),mK=wt("createInterface")});var yt,bK,wK,yK,$K,vK,xK,EK,SK,kK,jK,RK,_K,TK,AK,IK,CK,OK,LK,mL,uv=C(()=>{yt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},bK=yt("createRequire"),wK=yt("readFileSync"),yK=yt("access"),$K=yt("readFile"),vK=yt("writeFile"),xK=yt("appendFile"),EK=yt("mkdir"),SK=yt("mkdtemp"),kK=yt("rename"),jK=yt("unlink"),RK=yt("rm"),_K=yt("stat"),TK=yt("copyFile"),AK=yt("readdir"),IK=yt("createReadStream"),CK=yt("createWriteStream"),OK=yt("randomBytes"),LK=yt("spawnSync"),mL=yt("createInterface")});var $t,PK,MK,FK,DK,zK,UK,BK,WK,GK,VK,qK,HK,KK,YK,XK,JK,QK,dv,ZK,Up=C(()=>{$t=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},PK=$t("createRequire"),MK=$t("readFileSync"),FK=$t("access"),DK=$t("readFile"),zK=$t("writeFile"),UK=$t("appendFile"),BK=$t("mkdir"),WK=$t("mkdtemp"),GK=$t("rename"),VK=$t("unlink"),qK=$t("rm"),HK=$t("stat"),KK=$t("copyFile"),YK=$t("readdir"),XK=$t("createReadStream"),JK=$t("createWriteStream"),QK=$t("randomBytes"),dv=$t("spawnSync"),ZK=$t("createInterface")});var pv=C(()=>{Up();We();_t();We();ec();Vt()});var fv=C(()=>{});var gL,hv=C(()=>{_t();We();Be();fv();gL=Z(".tmct","sessions")});var gv=C(()=>{_t();We();bc()});var bv,Bc,wv=C(()=>{bv=Object.freeze({countNouns:{class:"Class",classes:"Class",function:"Function",functions:"Function",func:"Function",funcs:"Function",module:"Module",modules:"Module",file:"Module",files:"Module",package:"Package",packages:"Package",method:"Method",methods:"Method",attribute:"Attribute",attributes:"Attribute",variable:"GlobalVariable",variables:"GlobalVariable",global:"GlobalVariable",globals:"GlobalVariable",commit:"Commit",commits:"Commit",session:"Session",sessions:"Session"},classLabels:{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"]},helpRows:[["/find <query>","lexical search across the graph"],["/search <query>","alias of /find"],["/context <symbol>","the sized edit bundle for a symbol (start here to change code)"],["/snippet <symbol>","exact source of one function/class/method"],["/describe <symbol>","a symbol's definition, kind and relations"],["/signature <symbol>","a symbol's signature only"],["/members <class>","the methods/attributes of a class"],["/subclasses <class>","the subclasses of a class"],["/impact <module>","what a change to this module or symbol reaches (impact closure)"],["/callers <symbol>","functions that call this symbol"],["/callees <symbol>","functions this symbol calls"],["/tests <symbol>","the tests covering this symbol"],["/untested","symbols with no covering test"],["/history <symbol>","the commit history of this symbol"],["/exports <module>","a module's public exports"],["/arch [package]","the architecture overview (optional package filter)"]],missRecoveryPointer:"for code structure, index this repo with `tmct index`, or point me at a .tmct/graph.json with --repo <path> (or try `npm run example:mini`)."}),Bc=Object.freeze({countNouns:{},classLabels:{},helpRows:[],missRecoveryPointer:""})});var vt,vY,xY,EY,SY,kY,jY,RY,_Y,TY,AY,IY,CY,OY,LY,NY,PY,MY,FY,yv,$v=C(()=>{vt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},vY=vt("createRequire"),xY=vt("readFileSync"),EY=vt("access"),SY=vt("readFile"),kY=vt("writeFile"),jY=vt("appendFile"),RY=vt("mkdir"),_Y=vt("mkdtemp"),TY=vt("rename"),AY=vt("unlink"),IY=vt("rm"),CY=vt("stat"),OY=vt("copyFile"),LY=vt("readdir"),NY=vt("createReadStream"),PY=vt("createWriteStream"),MY=vt("randomBytes"),FY=vt("spawnSync"),yv=vt("createInterface")});var kv={};Gt(kv,{CONTEXT_PASSAGE_PREDICATE:()=>xv,CO_OCCURS_PREDICATE:()=>Wc,ingestUnknownFromAssertions:()=>yL,knownTermsFrom:()=>Ev,passageFor:()=>Sv});function Ev(e,t){let n=new Set;for(let s of e?.individuals||[]){if(s?.class!==ft)continue;let o=a=>(s.attributes||[]).find(l=>l?.key===a)?.value,r=o("subject"),i=o("object");r&&n.add(V(r)),i&&n.add(V(i))}for(let s of t||[])s?.subject&&n.add(V(s.subject)),s?.object&&n.add(V(s.object));return n}function Sv(e,t){let n=e?.surfaceText;if(typeof n=="string"&&n.trim())return n.replace(/\[\[([^\]]+)\]\]/g,"$1").replace(/\s+/g," ").trim();let s=qs(e?.start),o=qs(e?.end);return t?.surface&&s&&o?t.surface.replace("{start}",s).replace("{end}",o):null}function wL(e,t,n){let s=String(e||"").toLowerCase().replace(/[^a-z0-9\s]/g," ").split(/\s+/).filter(Boolean),o=[],r=new Set;for(let i=0;i<s.length&&o.length<vv;i+=1){let a=[s[i]];i+1<s.length&&a.push(`${s[i]} ${s[i+1]}`);for(let l of a)if(!(bL.has(l)||r.has(l)||n.has(l))&&t.has(l)&&(o.push(l),r.add(l),o.length>=vv))break}return o}async function yL(e,{assertions:t,map:n,mappedFacts:s=[],memory:o,provenancePrefix:r="corpus:unknown",limit:i=500}={}){if(!Array.isArray(t)||!n)return{captured:0,linked:0,appended:0,skipped:0};let a=o||await at(e),l=Ev(a,s),c=new Set,u=[];for(let p of t){if(c.size>=i)break;let h=n.get(p.rel);if(!h||h.ace!=="none")continue;let m=qs(p.start),b=qs(p.end);if(!m||!b)continue;let g=V(m),y=V(b),w=!l.has(g),v=!l.has(y);if(!w&&!v)continue;let k=Sv(p,h);if(!k)continue;let $=[[m,b,w],[b,m,v]];for(let[x,E,S]of $){if(!S||c.size>=i)continue;let _=V(x);if(c.has(_))continue;let R=`${r} ${p.rel}`;u.push({subject:x,predicate:xv,object:k,provenance:R}),u.push({subject:x,predicate:Wc,object:E,provenance:R});let I=wL(k,l,new Set([g,y]));for(let P of I)u.push({subject:x,predicate:Wc,object:P,provenance:R});c.add(_),l.add(_)}}if(!u.length)return{captured:0,linked:0,appended:0,skipped:0};let d=await Hn(e,u),f=u.filter(p=>p.predicate===Wc).length;return{captured:c.size,linked:f,appended:d.appended,skipped:d.skipped}}var xv,Wc,bL,vv,jv=C(()=>{Be();Gc();xv="mgx:contextPassage",Wc="mgx:coOccursWith",bL=new Set(["a","an","the","is","are","was","were","be","being","been","to","of","for","in","on","at","with","by","as","and","or","that","this","it","its","you","your","related","kind","used"]),vv=3});var Rv={};Gt(Rv,{MAP_FILE:()=>Ii,SEON_CONCEPTS_FILE:()=>Vc,SEON_DEFINITIONS_FILE:()=>$L,SLICE_FILE:()=>Ai,TIER2_DIR:()=>Yn,TIER2_MANIFEST_FILE:()=>vL,WORDNET_DIR:()=>Ci,loadMap:()=>Hc,loadSlice:()=>qc,seedMemory:()=>EL,termText:()=>qs,toFacts:()=>Kc});async function qc(e=Ai){let t=yv({input:Uy(e,"utf8"),crlfDelay:1/0}),n=[],s=0;for await(let o of t){s+=1;let r=o.trim();if(!r)continue;let i;try{i=JSON.parse(r)}catch(a){throw new Error(`${e}:${s}: not valid JSON: ${a.message}`)}for(let a of["start","rel","end"])if(typeof i[a]!="string"||!i[a])throw new Error(`${e}:${s}: assertion missing "${a}"`);n.push(i)}return n}async function Hc(e=Ii){let n=bo(await Re(e,"utf8")).relation||[],s=new Map;for(let o of n){if(!o.rel)throw new Error(`${e}: a [[relation]] row is missing "rel"`);if(s.has(o.rel))throw new Error(`${e}: duplicate mapping for ${o.rel}`);if(!xL.has(o.ace))throw new Error(`${e}: ${o.rel} has unknown ace pattern ${JSON.stringify(o.ace)}`);if(o.ace!=="none"&&!o.predicate)throw new Error(`${e}: ${o.rel} maps to ${o.ace} but names no predicate URI`);s.set(o.rel,o)}return s}function Kc(e,t,n="corpus:conceptnet"){let s=[];for(let o of e){let r=t.get(o.rel);if(!r)throw new Error(`slice/map drift: relation ${o.rel} has no row in conceptnet-map.toml`);if(r.ace==="none")continue;let i=qs(o.start),a=qs(o.end);if(!i||!a)continue;let l=r.predicate==="mgx:relatedTo"?n.replace(/^corpus:/,"corpus-weak:"):n;s.push({subject:i,predicate:r.predicate,object:a,provenance:`${l} ${o.rel}`})}return s}async function EL(e,{limit:t,slicePath:n=Ai,mapPath:s=Ii,prefer:o,provenancePrefix:r,captureUnknownContext:i=!1,unknownContextLimit:a}={}){let[l,c]=await Promise.all([qc(n),Hc(s)]),u=Kc(l,c,r);if(Array.isArray(o)&&o.length){let y=new Map(o.map((w,v)=>[w,v]));u=u.slice().sort((w,v)=>(y.get(w.predicate)??o.length)-(y.get(v.predicate)??o.length))}t!==void 0&&(u=u.slice(0,t));let d=(y,w,v)=>`${V(y)} ${w} ${V(v)}`,f=new Set,p=await at(e);for(let y of p.individuals||[]){if(y?.class!=="Fact")continue;let w=v=>(y.attributes||[]).find(k=>k.key===v)?.value;f.add(d(w("subject"),w("predicate"),w("object")))}let h=0,m=[];for(let y of u){let w=d(y.subject,y.predicate,y.object);if(f.has(w)){h+=1;continue}f.add(w),m.push(y)}let b=await Hn(e,m),g;if(i){let{ingestUnknownFromAssertions:y}=await Promise.resolve().then(()=>(jv(),kv));g=await y(e,{assertions:l,map:c,mappedFacts:u,memory:p,provenancePrefix:r?`${r}-unknown`:void 0,limit:a})}return{appended:b.appended,skipped:h+b.skipped,total:u.length,...g?{unknown:g}:{}}}var SL,Sr,Ai,Ii,Vc,$L,Yn,vL,Ci,YY,xL,qs,Gc=C(()=>{xo();_t();$v();Bs();We();Xa();Be();SL={},Sr=Z(he(Lt(SL.url)),"..","..",".."),Ai=Z(Sr,"corpus","conceptnet","slice.jsonl"),Ii=Z(Sr,"src","adapters","corpus","conceptnet-map.toml"),Vc=Z(Sr,"corpus","domains","code","concepts.jsonl"),$L=Z(Sr,"corpus","domains","code","definitions.jsonl"),Yn=Z(Sr,"corpus","tier2"),vL=Z(Yn,"manifest.json"),Ci=Z(Sr,"corpus","wordnet"),YY=Z(Ci,"manifest.json"),xL=new Set(["subClassOf","type","ObjectProperty","someValuesFrom","disjointWith","property","none"]);qs=e=>{let t=/^\/c\/en\/([^/]+)/.exec(String(e||""));return t?t[1].replace(/_/g," "):null}});var Ov={};Gt(Ov,{BUILTIN_EXTENSIONS:()=>_L,EXTENSION_KINDS:()=>Yc,activeDomainPacks:()=>qp,defaultCodeDomainPacks:()=>Cv,defaultCodeLaneVocab:()=>Iv,mergedLaneVocab:()=>Vp,mergedLexiconExtra:()=>Av,resolveExtensions:()=>Tv,seedActiveCorpusEntries:()=>IL,validateExtensionEntry:()=>_v,validateExtensionPack:()=>OL});function Xc(){return{seon:{kind:"corpus",active:!1,corpusPath:Vc,provenancePrefix:"corpus:seon"},code:{kind:"pack",active:!1,corpusPath:Vc,provenancePrefix:"corpus:seon",vocabPath:jL,vocabData:bv,groundingKind:"extraction",groundingAdapter:"tmct index (the graphPaths provider seam)"},conceptnet:{kind:"corpus",active:!1,corpusPath:Ai,provenancePrefix:"corpus:conceptnet",limit:void 0,prefer:RL},human:{kind:"corpus",active:!0,corpusPath:Z(Yn,"human.jsonl"),provenancePrefix:"corpus:human"},"human-medium":{kind:"corpus",active:!1,corpusPath:Z(Yn,"human-medium.jsonl"),provenancePrefix:"corpus:human-medium"},"human-large":{kind:"corpus",active:!1,corpusPath:Z(Yn,"human-large.jsonl"),provenancePrefix:"corpus:human-large"},"tier2-aws":{kind:"pack",active:!1,corpusPath:Z(Yn,"aws.jsonl"),provenancePrefix:"corpus:tier2-aws",vocabPath:Bp,vocabData:Bc,groundingKind:"taught-only"},"tier2-python":{kind:"pack",active:!1,corpusPath:Z(Yn,"python.jsonl"),provenancePrefix:"corpus:tier2-python",vocabPath:Bp,vocabData:Bc,groundingKind:"taught-only"},"tier2-java":{kind:"pack",active:!1,corpusPath:Z(Yn,"java.jsonl"),provenancePrefix:"corpus:tier2-java",vocabPath:Bp,vocabData:Bc,groundingKind:"taught-only"},"tier2-general":{kind:"corpus",active:!1,corpusPath:Z(Yn,"general.jsonl"),provenancePrefix:"corpus:tier2-general"},"wordnet-xl":{kind:"corpus",active:!1,corpusPath:Z(Ci,"wordnet-xl.jsonl"),provenancePrefix:"corpus:wordnet-xl"},"wordnet-full":{kind:"corpus",active:!1,corpusPath:Z(Ci,"wordnet-full.jsonl"),provenancePrefix:"corpus:wordnet-full"},namenet:{kind:"corpus",active:!1,corpusPath:Z(kL,"namenet.jsonl"),provenancePrefix:"corpus:namenet"}}}function _v(e,t){if(!t||typeof t!="object")throw new Error(`extension "${e}": entry must be an object`);if(!Yc.includes(t.kind))throw new Error(`extension "${e}": unknown kind ${JSON.stringify(t.kind)} (must be one of ${Yc.join(", ")})`);if(t.active!==void 0&&typeof t.active!="boolean")throw new Error(`extension "${e}": "active" must be a boolean`);if(t.kind==="corpus"&&!t.corpusPath)throw new Error(`extension "${e}": a "corpus" entry needs corpus_path`);if(t.kind==="ontology"&&!t.corpusPath)throw new Error(`extension "${e}": an "ontology" entry needs ontology_path`);if(t.kind==="lexicon"&&!t.lexiconPath)throw new Error(`extension "${e}": a "lexicon" entry needs lexicon_path`);if(t.kind==="templates"&&!t.templatesPath)throw new Error(`extension "${e}": a "templates" entry needs templates_path`);if(t.kind==="pack"&&!t.corpusPath&&!t.lexiconPath&&!t.templatesPath&&!t.phrasebookPath)throw new Error(`extension "${e}": a "pack" entry needs at least one of corpus_path/lexicon_path/templates_path/phrasebook_path`);if(t.limit!==void 0&&!Number.isFinite(t.limit))throw new Error(`extension "${e}": "limit" must be a finite number`);if(t.prefer!==void 0&&!Array.isArray(t.prefer))throw new Error(`extension "${e}": "prefer" must be an array of predicate URIs`)}function AL(e,t,n,s){if(!t&&n.kind===void 0)throw new Error(`extension "${e}": an unrecognized extension needs a "kind" (one of ${Yc.join(", ")})`);let o={kind:n.kind!==void 0?n.kind:t?.kind,active:n.active!==void 0?!!n.active:!!t?.active},r=[["corpus_path","corpusPath"],["ontology_path","corpusPath"],["lexicon_path","lexiconPath"],["templates_path","templatesPath"],["phrasebook_path","phrasebookPath"],["map_path","mapPath"],["vocab_path","vocabPath"]];for(let[i,a]of r)n[i]!==void 0?o[a]=TL(s,n[i]):t?.[a]!==void 0&&(o[a]=t[a]);return o.provenancePrefix=n.provenance_prefix!==void 0?String(n.provenance_prefix):t?.provenancePrefix??`corpus:${e}`,n.limit!==void 0?o.limit=Number(n.limit):t?.limit!==void 0&&(o.limit=t.limit),n.prefer!==void 0?o.prefer=n.prefer:t?.prefer!==void 0&&(o.prefer=t.prefer),n.grounding_kind!==void 0?o.groundingKind=String(n.grounding_kind):t?.groundingKind!==void 0&&(o.groundingKind=t.groundingKind),n.grounding_adapter!==void 0?o.groundingAdapter=String(n.grounding_adapter):t?.groundingAdapter!==void 0&&(o.groundingAdapter=t.groundingAdapter),o}async function Tv(e,{configFile:t}={}){let n=e?await Za(e,t?{file:t}:{}):null,s=Xc(),o=n&&n.extensions&&typeof n.extensions=="object"?n.extensions:{},r=n&&n.bias&&typeof n.bias=="object"?n.bias:{},i=new Set([...Object.keys(s),...Object.keys(o)]),a=new Map;for(let f of i){let p=AL(f,s[f]||null,o[f]||{},e||process.cwd());_v(f,p),a.set(f,p)}let l={};for(let[f,p]of Object.entries(r)){if(typeof p!="number"||!Number.isFinite(p))throw new Error(`[bias] "${f}": bias must be a finite number, got ${JSON.stringify(p)}`);l[f]=p}let u=["seon","conceptnet",...[...a.keys()].filter(f=>f!=="seon"&&f!=="conceptnet").sort()].filter(f=>a.has(f));return{entries:new Map(u.map(f=>[f,a.get(f)])),biasByBundle:l}}async function IL(e,t,n={}){let{seedMemory:s}=await Promise.resolve().then(()=>(Gc(),Rv)),{captureUnknownContext:o,unknownContextLimit:r}=n,i={},a=0,l=0,c=0;for(let[u,d]of t instanceof Map?t:new Map)if(!(!d.active||!(d.kind==="corpus"||d.kind==="ontology"||d.kind==="pack"&&d.corpusPath)))try{let p=await s(e,{slicePath:d.corpusPath,mapPath:d.mapPath,provenancePrefix:d.provenancePrefix,limit:d.limit,prefer:d.prefer,captureUnknownContext:o,unknownContextLimit:r});i[u]={appended:p.appended,skipped:p.skipped,total:p.total},a+=p.appended,l+=p.skipped,c+=p.total}catch(p){i[u]={appended:0,skipped:0,total:0,error:p&&p.message?p.message:String(p)}}return{appended:a,skipped:l,total:c,perBundle:i}}async function Av(e,t={}){let n=[];for(let[o,r]of e instanceof Map?e:new Map)r.active&&(r.kind!=="lexicon"&&r.kind!=="pack"||r.lexiconPath&&n.push({name:o,path:r.lexiconPath,bias:t[o]??1}));if(!n.length)return null;n.sort((o,r)=>o.bias-r.bias);let s={nouns:{},verbs:{},adjectives:{},properNames:[]};for(let o of n){let r;try{r=JSON.parse(await Re(o.path,"utf8"))}catch(i){throw new Error(`extension "${o.name}": lexicon file ${o.path} \u2014 ${i&&i.message?i.message:i}`)}if(Object.assign(s.nouns,r.nouns||{}),Object.assign(s.verbs,r.verbs||{}),Object.assign(s.adjectives,r.adjectives||{}),Array.isArray(r.properNames))for(let i of r.properNames)s.properNames.includes(i)||s.properNames.push(i)}return s}async function Vp(e,t={}){let n=[];for(let[o,r]of e instanceof Map?e:new Map)r.active&&r.kind==="pack"&&(!r.vocabPath&&!r.vocabData||n.push({name:o,path:r.vocabPath,data:r.vocabData,bias:t[o]??1}));let s={countNouns:{},classLabels:{},helpRows:[],missRecoveryPointer:""};if(!n.length)return s;n.sort((o,r)=>o.bias-r.bias);for(let o of n){let r;if(o.data)r=o.data;else try{r=JSON.parse(await Re(o.path,"utf8"))}catch(i){throw new Error(`extension "${o.name}": vocab file ${o.path} \u2014 ${i&&i.message?i.message:i}`)}Object.assign(s.countNouns,r.countNouns||{}),Object.assign(s.classLabels,r.classLabels||{}),Array.isArray(r.helpRows)&&s.helpRows.push(...r.helpRows),r.missRecoveryPointer&&(s.missRecoveryPointer=r.missRecoveryPointer)}return s}function Iv(){if(!Wp){let e={...Xc().code,active:!0};Wp=Vp(new Map([["code",e]]),{})}return Wp}async function CL(e,t){let n={name:e,groundingKind:t.groundingKind||"",groundingAdapter:t.groundingAdapter||"",commandCount:0,countNounCount:0};if(!t.vocabPath)return n;try{let s=JSON.parse(await Re(t.vocabPath,"utf8"));n.commandCount=Array.isArray(s.helpRows)?s.helpRows.length:0,n.countNounCount=Object.keys(s.countNouns||{}).length}catch{}return n}async function qp(e,t={}){let n=[];for(let[o,r]of e instanceof Map?e:new Map)r.active&&r.kind==="pack"&&n.push({name:o,entry:r,bias:t[o]??1});n.sort((o,r)=>o.bias-r.bias||o.name.localeCompare(r.name));let s=[];for(let o of n)s.push(await CL(o.name,o.entry));return s}function Cv(){if(!Gp){let e={...Xc().code,active:!0};Gp=qp(new Map([["code",e]]),{})}return Gp}async function OL(e,t){let n=[],s=o=>o&&(cl(o)?o:Pt(e,o));if(t.corpusPath){let o=s(t.corpusPath);try{let r=await qc(o),i=await Hc(s(t.mapPath)||Ii),a=Kc(r,i,t.provenancePrefix||"corpus:pack");n.push({kind:"corpus",path:o,ok:!0,counts:{assertions:r.length,facts:a.length}})}catch(r){n.push({kind:"corpus",path:o,ok:!1,error:r&&r.message?r.message:String(r)})}}if(t.lexiconPath){let o=s(t.lexiconPath);try{let{loadLexicon:r}=await Promise.resolve().then(()=>(Ws(),e$)),i=JSON.parse(await Re(o,"utf8")),a=r(i);n.push({kind:"lexicon",path:o,ok:!0,counts:{nouns:a.nouns.size,verbs:a.verbs.size,adjectives:a.adjectives.size,properNames:a.properNames.size}})}catch(r){n.push({kind:"lexicon",path:o,ok:!1,error:r&&r.message?r.message:String(r)})}}if(t.templatesPath){let o=s(t.templatesPath);try{let{loadTemplates:r}=await Promise.resolve().then(()=>(wc(),Dy)),i=await r(o),a=[...i.keys()].filter(l=>!l.includes(":"));if(a.length)throw new Error(`template id${a.length>1?"s":""} not namespaced "<packname>:<id>": ${a.join(", ")}`);n.push({kind:"templates",path:o,ok:!0,counts:{templates:i.size}})}catch(r){n.push({kind:"templates",path:o,ok:!1,error:r&&r.message?r.message:String(r)})}}if(t.vocabPath){let o=s(t.vocabPath);try{let r=JSON.parse(await Re(o,"utf8")),i=r.countNouns&&typeof r.countNouns=="object"?Object.keys(r.countNouns).length:0,a=r.classLabels&&typeof r.classLabels=="object"?Object.keys(r.classLabels).length:0,l=Array.isArray(r.helpRows)?r.helpRows.length:0;n.push({kind:"vocab",path:o,ok:!0,counts:{countNouns:i,classLabels:a,helpRows:l}})}catch(r){n.push({kind:"vocab",path:o,ok:!1,error:r&&r.message?r.message:String(r)})}}if(t.kind==="pack"){let o=t.groundingKind;o!=="extraction"&&o!=="taught-only"?n.push({kind:"grounding",path:"(pack manifest)",ok:!1,error:`a "pack" entry needs "grounding_kind" of "extraction" or "taught-only" (got ${JSON.stringify(o??null)})`}):o==="extraction"&&!t.groundingAdapter?n.push({kind:"grounding",path:"(pack manifest)",ok:!1,error:'grounding_kind "extraction" needs "grounding_adapter" naming the adapter'}):n.push({kind:"grounding",path:"(pack manifest)",ok:!0,counts:o==="extraction"?{channel:o,adapter:t.groundingAdapter}:{channel:o}})}return{ok:n.length>0&&n.every(o=>o.ok),results:n}}var Hp,kL,jL,Bp,Yc,RL,_L,TL,Wp,Gp,Kp=C(()=>{We();_t();Bs();wv();ec();Gc();Hp={},kL=Z(he(Lt(Hp.url)),"..","..","corpus","namenet"),jL=Z(he(Lt(Hp.url)),"..","..","corpus","domains","code","vocab.json"),Bp=Z(he(Lt(Hp.url)),"..","..","corpus","tier2","vocab-empty.json"),Yc=Object.freeze(["corpus","lexicon","templates","pack","ontology"]),RL=["rdfs:subClassOf","rdf:type","mgx:usedFor","mgx:partOf","mgx:capableOf"];_L=Object.freeze(Xc());TL=(e,t)=>{if(t==null)return;let n=String(t);return cl(n)?n:Pt(e,n)};Wp=null;Gp=null});var Lv=C(()=>{});var Nv=C(()=>{We();xo();_t();lv();uv();Up();Vt();pv();Ie();hv();bc();gv();Nr();Kp();Jc();Vs();gc();Nc();wp();ji();Lv()});var Pv={};Gt(Pv,{proseLemma:()=>NL});function NL(){if(Ro!==void 0)return Ro;try{let e=rp();if(!e)return Ro=null,Ro;let t=e.its,n=new Map;Ro=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{Ro=null}return Ro}var Ro,Mv=C(()=>{ip()});var Fv={};Gt(Fv,{digestTermFromRows:()=>FL,loadDigestStructureTable:()=>ML,readDigestStructures:()=>PL});var PL,ML,FL,Dv=C(()=>{PL=()=>null,ML=()=>null,FL=()=>null});function cf(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 ${Qc(e.entityType)}`;if(t==="list")return`list/enumerate ${Qc(e.entityType)} matching a condition`;if(t==="superlative")return`rank/compare ${Qc(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 cf(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&&wn[o]?wn[o]:`filter/traverse ${Qc(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&&wn[s]||"check a specific subject/object relationship":(n==="reverse"||n==="forward")&&s?wn[s]||`understand a "${s}" relationship`:"understand a graph relationship"}function mf(e){let t=new Map;for(let n of e)t.has(Bv(n))||t.set(Bv(n),n);return t}function Jp(e,t=Li){let n=[],s=[];for(let l of e)l.predicate===t&&(s.push([l.subject,l.object]),_o(l)&&n.push([l.subject,l.object]));let o=new Map,r=new Map,i=new Set,a=(l,c,u)=>{!c||!u||c===u||(l.has(c)||l.set(c,new Set),l.get(c).add(u))};for(let[l,c]of s)a(r,l,c),c&&i.add(c);for(let[l,c]of n)a(o,l,c);return{strictEdges:n,broadEdges:s,strictSucc:o,broadSucc:r,reachableHeads:i}}function Qp(e,t,n,s,o){let r=s.reachableHeads,i=!1;for(let a of n)if(r.has(a)){i=!0;break}return i?e(t,n,[],s.strictSucc,o)||e(t,n,[],s.broadSucc,o):null}function VL(e,t){return!/ves$/i.test(e)||!/fe?$/i.test(t)?t:e.slice(0,-1)}async function qL(e){let t=String(e||"").toLowerCase();try{let{proseLemma:n}=await Promise.resolve().then(()=>(Mv(),Pv)),s=n();return s?VL(t,s(t)):t}catch{return t}}function bf(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)||HL.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 tf(e){let t=String(e||"").toLowerCase();if(t==="has"||t==="have")return gr;if(t==="can")return"mgx:capableOf";try{let n=await qL(t);return n==="have"?gr:hs(`mgx:${n}`)}catch{return hs(`mgx:${t}`)}}function eN(e,t){let n=String(t||"").match(ZL);return n&&/^mgx:[a-z]+$/.test(e)?{predicate:`${e}-${n[1].toLowerCase()}`,object:n[2].trim()}:{predicate:e,object:String(t||"").trim()}}async function Oi(e,t){if(!e||!t)return null;try{let{resolveObject:n}=await Promise.resolve().then(()=>(Pn(),Eg)),s=n(e,t);if(s?.match?.id&&!s.ambiguous)return{id:s.match.id,label:s.match.label}}catch{}return null}function iN(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 hx(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 mx(e){if(To[e])return To[e];let t=String(e||""),n=qg(t);if(n){let a=mx(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",hx(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:(${wf})-([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?`${iN(i[1])}${i[2]?` ${i[2]}`:""}`:e}function sf(e){let t=/^mgx:([a-z][\w-]*)$/i.exec(String(e||""));return t?t[1].toLowerCase():null}function cN(e){let t=String(e||"").trim(),n=t.toLowerCase();for(let{marker:s,predicate:o}of aN)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 Jn(e){return e.replace(/#node:[0-9a-f]+/g,"")}function re(e){let t=e.provenance?` (source: ${Jn(e.provenance)})`:"";return e.provenance.includes("ace:chat")||e.provenance.includes("teach:chat")?`you told me: ${Bt(e)}${t}`:e.provenance.includes("corpus-weak:")?`possibly: ${Bt(e)}${t}`:e.provenance.includes("corpus:")?`${Bt(e)}${t}`:e.provenance.includes("reference:")?`${Bt(e)}${t}`:`i learned: ${Bt(e)}${t}`}function Vv(e,t,n,{toward:s=null}={}){let o=re(e);if(!Xn.has(e.predicate)||!n.has(e.subject))return o;let r=Ic(e.object,t,{cap:6,stopAt:Tc,toward:s});if(r.length<=1)return o;let i=` \u2192 ${r.slice(1).join(" \u2192 ")}`,a=o.match(lN);return a?o.slice(0,a.index)+i+a[0]:o+i}function qv(e,t,n,{indent:s=""}={}){let o=t.filter(k=>k.predicate===Li).map(k=>[k.subject,k.object]),r=Ri(o),i=e.map(k=>`${s}${Vv(k,r,n)}`),a=e.filter(k=>Xn.has(k.predicate)&&n.has(k.subject)),l=[...new Set(a.map(k=>k.object))];if(l.length<2)return{lines:i,grouped:null};let c=t.filter(k=>k.predicate==="owl:disjointWith").map(k=>[k.subject,k.object]),{split:u,clusters:d}=Cc(l,{parents:r,disjointEdges:c});if(!u)return{lines:i,grouped:null};let f=a[0].subject,p=new Map;for(let k of d)for(let $ of k.objects)p.set($,k);let h=e.filter(k=>!(Xn.has(k.predicate)&&n.has(k.subject))),m=[],b=[],g=0,y=k=>{let $=Vv(k,r,n);return g<ve?(g+=1,`${s}${$}`):(b.push($),null)};for(let k of d){let $=a.filter(x=>p.get(x.object)===k).map(y).filter(Boolean);$.length&&m.push(`${s}${f}, the ${k.label}:
|
|
173
173
|
${$.join(`
|
|
174
174
|
`)}`)}if(h.length){let k=h.map(y).filter(Boolean);k.length&&m.push(`${s}also about ${f}:
|
|
175
175
|
${k.join(`
|
|
176
176
|
`)}`)}let w=b.length?`
|
|
177
177
|
${s}\u2026and ${b.length} more \u2014 say 'more' to see them.`:"",v={text:m.join(`
|
|
178
|
-
`)+w,replace:!0,...b.length?{pending:{items:b,noun:"facts"}}:{}};return{lines:i,grouped:v}}async function
|
|
178
|
+
`)+w,replace:!0,...b.length?{pending:{items:b,noun:"facts"}}:{}};return{lines:i,grouped:v}}async function dN(e,t,n,s){let o;try{({digestTermFromRows:o}=await Promise.resolve().then(()=>(Dv(),Fv)))}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("; ")})
|
|
179
179
|
`:"",l=`Say 'show the facts' for all ${s.length} stored facts.`;return{text:`${r.paragraphs.join(`
|
|
180
180
|
|
|
181
181
|
`)}
|
|
182
182
|
|
|
183
|
-
${a}${l}`,pending:{items:s,noun:"facts"}}}function kr(e){let t=sp().find(n=>n.kind==="article");return t&&By(String(e||""),t)?"an":"a"}function gx(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 ${kr(e.object)} ${e.object}".`,replace:!0}:t?{text:`no \u2014 ${re(t)}`,replace:!0}:e?{text:`yes \u2014 ${re(e)}`,replace:!0}:null}function
|
|
183
|
+
${a}${l}`,pending:{items:s,noun:"facts"}}}function kr(e){let t=sp().find(n=>n.kind==="article");return t&&By(String(e||""),t)?"an":"a"}function gx(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 ${kr(e.object)} ${e.object}".`,replace:!0}:t?{text:`no \u2014 ${re(t)}`,replace:!0}:e?{text:`yes \u2014 ${re(e)}`,replace:!0}:null}function pN(e,t){let n=s=>`${Bt(s)}${s.provenance?` (source: ${Jn(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 ${kr(e.object)} ${e.object}".`,replace:!0}}function Zc(e){let t=o=>`${Bt(o)}${o.provenance?` (source: ${Jn(o.provenance)})`:""}`,n=e[0],s=e[e.length-1];return`${e.map(t).join("; ")}; so ${n.subject} is a ${s.object}`}async function of(e){try{let{loadMemory:t}=await Promise.resolve().then(()=>(Be(),Us)),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 et(e,t=null){if(t?.rows)return t.rows;try{let{loadMemory:n,readFactRows:s}=await Promise.resolve().then(()=>(Be(),Us)),o=s(await n(e));return t&&(t.rows=o,t.reloads=(t.reloads||0)+1),o}catch{return[]}}function fN(e){if(!el)try{el=Rn().nounPlurals}catch{el=new Map}return el.get(e)??null}function nl(e){let t=String(e||"").trim().toLowerCase();if(!t||/\s/.test(t))return t;try{return Kn(Rn(),t)?.lemma||t}catch{return t}}function hN(e){let t=String(e||"").trim().match(/^(?:all|every|each|both|most|some)\s+([\w-]+)$/i);if(!t)return nl(e);let n=nl(bf(t[1]));return`${kr(n)} ${n}`}function X(e,t){let n=e(t),s=new Set,o=new Set([n]),r=n.replace(mN,"").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=fN(i);a&&s.add(e(a))}return s}function Hv(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 yx(e,t=null){let n=sl(e),s=n.match(gN);if(s)return[s[0],s[2],s[1]];if(!t)return null;let o=n.match(wN);return o&&t(o[1])?[o[0],o[2],o[1]]:null}function uf(e){let t=String(e||"").replace(vN,"");if(t!==e){let s=t.match(Hs);if(s)return s}let n=String(e||"").match(xN);return n?`is ${n[1].trim()} a ${n[2].trim()}`.match(Hs):null}function SN(e,t,n){let s=String(e||"").trim().split(/\s+/).filter(Boolean);if(s.length<2)return null;let o=t.filter(r=>Xn.has(r.predicate));if(!o.length)return null;for(let r=1;r<s.length;r+=1){let i=X(n,s.slice(0,r).join(" ")),a=s.slice(r).join(" "),l=X(n,a);if(o.some(c=>l.has(c.subject)&&i.has(c.object)))return a}return null}function pf(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 Yv(e){let t=String(e.text||"").replace(/^(?:yes|no) — /i,"");return t===e.text?e:{...e,text:t}}function DN(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=>`${Bt(s)}${s.provenance?` (source: ${Jn(s.provenance)})`:""}`).join("; ")}function Jv(e,t,n,{maxHops:s=3}={}){let o=X(V,e),r=X(V,t),i=Aa(o,r,n,{maxHops:s}),a=l=>{let c=l&&l.length?DN(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:
|
|
184
184
|
${[...i.negative,...i.positive].map(re).join(`
|
|
185
185
|
`)}`,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 Qv(e,t,n,{maxHops:s=3}={}){let o=X(V,e),r=X(V,t),i=Fu(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,Mu).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}.
|
|
186
186
|
${d.join(`
|
|
187
187
|
`)}`,replace:!0,miss:!0}}let c=Du(r,n,{exclude:new Set([...o,i.klass])});if(c.length){let u=c.slice(0,Mu),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)`:""}:
|
|
188
188
|
${u.map(re).join(`
|
|
189
|
-
`)}`,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
|
|
189
|
+
`)}`,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 BN(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 an(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 vx(e,t,n,s,o={},r=null,i=null){return xx(await YN(e,t,n,s,o,r,i),n,t)}function xx(e,t,n){if(!e||e.goal!==void 0)return e;let s=String(n||"").trim(),o=cf(t?.parsed);if(!o&&e.generalVerbQuery&&(o=zv),!o){let r=s.match(lf),i=r?null:sl(s).match(wx)||yx(s),a=r?r[2]:i?i[1]:null;a&&!df.has(a.toLowerCase())&&(o=zv)}if(!o){let r=s.match(Sx);r&&(o=cf({shape:"meta",object:r[1]}))}return o?{...e,goal:o}:e}async function YN(e,t,n,s,o={},r=null,i=null){let a,l;try{({normFactTerm:a,normFactPredicate:l}=await Promise.resolve().then(()=>(Be(),Us)))}catch{return null}let c=String(t).trim(),u=c.match(TN);if(u){let D=X(a,u[1]),B=(await et(e,r)).filter(W=>W.predicate==="mgx:usedFor"&&D.has(W.object));if(B.length){let A=Je(an(B),o).map(re),L=A.slice(0,ve),O=A.slice(ve),N=O.length?`
|
|
190
190
|
\u2026and ${O.length} more \u2014 say 'more' to see them.`:"";return{text:L.join(`
|
|
191
|
-
`)+N,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}}for(let{predicate:D,re:B}of
|
|
191
|
+
`)+N,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}}for(let{predicate:D,re:B}of GN){let W=c.match(B);if(!W)continue;let A=X(a,W[1]),L=(await et(e,r)).filter(Q=>Q.predicate===D&&A.has(Q.object));if(!L.length)continue;let N=Je(an(L),o).map(re),M=N.slice(0,ve),z=N.slice(ve),H=z.length?`
|
|
192
192
|
\u2026and ${z.length} more \u2014 say 'more' to see them.`:"";return{text:M.join(`
|
|
193
|
-
`)+H,replace:!0,...z.length?{pending:{items:z,noun:"facts"}}:{}}}let d=c.match(
|
|
193
|
+
`)+H,replace:!0,...z.length?{pending:{items:z,noun:"facts"}}:{}}}let d=c.match(zN),f=d?null:c.match(UN),p=d?d[1]:f?.[2],h=d?d[2]:f?.[1],m=p&&h?BN(h):null;if(m){let D=`mgx:${m.replace(/\s+/g,"-")}-than`,B=await et(e,r),W=X(a,p),A=[...W].sort((N,M)=>N.length-M.length)[0],L=N=>W.has(N)||N.startsWith(`${A}-`)||N.startsWith(`${A} `)||B.some(M=>Xn.has(M.predicate)&&M.subject===N&&W.has(M.object)),O=an(B.filter(N=>N.predicate===D&&_o(N))).filter(N=>N.subject!==N.object&&L(N.subject)&&L(N.object));if(O.length){let N=new Set,M=new Map;for(let te of O)N.add(te.subject),N.add(te.object),M.set(te.object,(M.get(te.object)||0)+1),M.has(te.subject)||M.set(te.subject,M.get(te.subject)||0);let z=new Map(M),H=[],Q=null;for(;z.size;){let te=[...z.keys()].filter(Y=>z.get(Y)===0);if(te.length!==1){Q=te.length===0?{text:`I can't order the ${A}s \u2014 the "${m} than" facts I have loop back on themselves, so no ${h} exists. /memory to inspect them.`,replace:!0,miss:!0}:{text:`I can't pick the ${h} ${A} from what I know \u2014 nothing compares ${te[0]} and ${te[1]}. Teach me, e.g. "${te[0]} is ${m} than ${te[1]}".`,replace:!0,miss:!0};break}let ee=te[0];H.push(ee),z.delete(ee);for(let Y of O)Y.subject===ee&&z.has(Y.object)&&z.set(Y.object,z.get(Y.object)-1)}if(Q)return Q;let ae=H.slice(0,-1).map((te,ee)=>O.find(Y=>Y.subject===te&&Y.object===H[ee+1]));if(ae.every(Boolean)){let te=ae.map(ee=>`${Bt(ee)}${ee.provenance?` (source: ${Jn(ee.provenance)})`:""}`).join("; ");return{text:`${H[0]} \u2014 ${te}; so ${H[0]} is the ${h} ${A}`,replace:!0}}}}let b=s?c.match(AN)||c.match(IN):null;if(b){let D=X(a,b[1]),B=(await et(e,r)).filter(W=>Co(W.predicate)!==null&&D.has(W.subject));if(B.length){let A=Je(an(B),o).map(re),L=A.slice(0,ve),O=A.slice(ve),N=O.length?`
|
|
194
194
|
\u2026and ${O.length} more \u2014 say 'more' to see them.`:"";return{text:L.join(`
|
|
195
|
-
`)+N,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}}let g=c.match(
|
|
195
|
+
`)+N,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}}let g=c.match(CN);if(g){let D=g[1].toLowerCase(),B=X(a,g[2].replace(/^(?:an?|the)\s+/i,"").trim()),W=(await et(e,r)).filter(A=>Co(A.predicate)===D&&B.has(A.object));if(W.length){let L=Je(an(W),o).map(re),O=L.slice(0,ve),N=L.slice(ve),M=N.length?`
|
|
196
196
|
\u2026and ${N.length} more \u2014 say 'more' to see them.`:"";return{text:O.join(`
|
|
197
|
-
`)+M,replace:!0,...N.length?{pending:{items:N,noun:"facts"}}:{}}}}{let D=c.match(
|
|
197
|
+
`)+M,replace:!0,...N.length?{pending:{items:N,noun:"facts"}}:{}}}}{let D=c.match(ON),B=D?D[2]:g&&["in","inside"].includes(g[1].toLowerCase())?g[2]:null;if(B!=null){let W=D&&D[1].toLowerCase()==="parts"?["mgx:partOf"]:oN,A=X(a,B.replace(/^(?:an?|the)\s+/i,"").trim()),L=(await et(e,r)).filter(O=>W.includes(O.predicate)&&A.has(O.object)).sort(UL);if(L.length){let N=Je(an(L),o).map(re),M=N.slice(0,ve),z=N.slice(ve),H=z.length?`
|
|
198
198
|
\u2026and ${z.length} more \u2014 say 'more' to see them.`:"";return{text:M.join(`
|
|
199
|
-
`)+H,replace:!0,...z.length?{pending:{items:z,noun:"facts"}}:{}}}}}let y=c.match(
|
|
199
|
+
`)+H,replace:!0,...z.length?{pending:{items:z,noun:"facts"}}:{}}}}}let y=c.match(LN);if(y){let D=y[3].toLowerCase(),B=X(a,y[2]),W=new Set([...X(a,y[1])].map(L=>l(`mgx:${D}-${L.replace(/\s+/g,"-")}`))),A=(await et(e,r)).filter(L=>W.has(l(L.predicate))&&B.has(a(L.subject)));if(A.length){let O=Je(an(A),o).map(re),N=O.slice(0,ve),M=O.slice(ve),z=M.length?`
|
|
200
200
|
\u2026and ${M.length} more \u2014 say 'more' to see them.`:"";return{text:N.join(`
|
|
201
|
-
`)+z,replace:!0,...M.length?{pending:{items:M,noun:"facts"}}:{}}}}let w=n?.parsed?.shape==="meta"?n.parsed.object:null,v=n?.parsed&&n.parsed.node!=="miss";if(!w&&s&&!v&&!Zv.test(c)){let D=c.match(Sx)||c.match(/^what\s+(?:does|do)\s+(.+?)\s+means?[?.!\s]*$/i);D&&(w=Es(D[1]))}if(!w&&s){let D=c.match(
|
|
201
|
+
`)+z,replace:!0,...M.length?{pending:{items:M,noun:"facts"}}:{}}}}let w=n?.parsed?.shape==="meta"?n.parsed.object:null,v=n?.parsed&&n.parsed.node!=="miss";if(!w&&s&&!v&&!Zv.test(c)){let D=c.match(Sx)||c.match(/^what\s+(?:does|do)\s+(.+?)\s+means?[?.!\s]*$/i);D&&(w=Es(D[1]))}if(!w&&s){let D=c.match(p0);D&&(w=Es(nn(D[1].trim())))}if(!w&&n?.ambiguous&&Array.isArray(n.candidateParses)){let D=n.candidateParses.find(B=>B?.shape==="meta"&&B.object);D&&(w=Es(String(D.object)))}if(w){let D=cN(w),{predicate:B}=D,W=D.subject.replace(/^(?:the|an?)\s+/i,"").trim()||D.subject,A=!1;if(B&&vs.test(W)){if(!i){let J=String(To[B]||"").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>${J?` ${J}`:""}".`,replace:s,miss:!0,selfContainedMiss:!0}}W=i,A=!0}let L=X(a,W),O=await et(e,r);if(!O.some(J=>L.has(J.subject)||L.has(J.object))){let J=SN(W,O,a);J&&(W=J,L=X(a,W))}let N=(await et(e,r)).filter(J=>L.has(J.subject)&&!Gv.has(J.predicate)),M=B?N.filter(J=>l(J.predicate)===B):N;if(!B&&M.length&&!M.some(rf)&&(M=[]),!M.length){if(B&&(N.length||A))return{text:`I don't have any "${To[B]}" facts about ${W}.`,replace:s,...N.length?{}:{miss:!0}};if(!B){let J=Je((await et(e,r)).filter(ne=>L.has(ne.object)),o);if(J.length&&!J.some(rf)&&(J=[]),J.length){let ne=J.map(re),Ee=ne.slice(0,ve),Te=ne.slice(ve),ue=Te.length?`
|
|
202
202
|
\u2026and ${Te.length} more \u2014 say 'more' to see them.`:"";return{text:Ee.join(`
|
|
203
|
-
`)+ue,replace:s,...Te.length?{pending:{items:Te,noun:"facts"}}:{}}}}return null}M=Je(M,o);let z=await et(e,r),{lines:H,grouped:Q}=qv(M,z,L),ae=!B&&H.length>
|
|
203
|
+
`)+ue,replace:s,...Te.length?{pending:{items:Te,noun:"facts"}}:{}}}}return null}M=Je(M,o);let z=await et(e,r),{lines:H,grouped:Q}=qv(M,z,L),ae=!B&&H.length>uN?await dN(W,M,z,H):null;if(ae)return{...ae,replace:s};if(Q)return{...Q,replace:s};let te=H.slice(0,ve),ee=H.slice(ve),Y=ee.length?`
|
|
204
204
|
\u2026and ${ee.length} more \u2014 say 'more' to see them.`:"";return{text:te.join(`
|
|
205
|
-
`)+Y,replace:s,...ee.length?{pending:{items:ee,noun:"facts"}}:{}}}if(!s)return null;let k=c.match(WL);if(k){let B=`mgx:${k[2].toLowerCase().replace(/\s+/g,"-")}-than`,W=await of(e),A=ae=>{let te=ae.replace(/^(?:an?|the)\s+/i,"").trim();return i&&vs.test(te)?i:te},L=A(k[1]),O=A(k[3]),N=X(a,L),M=X(a,O),z=W.find(ae=>ae.predicate===B&&N.has(ae.subject)&&M.has(ae.object));if(z){let ae=W.find(ee=>ee.predicate===B&&N.has(ee.object)&&M.has(ee.subject)),te=ae?` \u2014 though you also told me the opposite: ${re(ae)}. Both are stored; I won't silently pick one.`:"";return{text:`yes \u2014 ${re(z)}${te}`,replace:!0}}let H=W.filter(ae=>ae.predicate===B&&(N.has(ae.subject)||N.has(ae.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 ${k[2].toLowerCase()} than ${O}".`,replace:!0,miss:!0}}for(let{predicate:D,phrase:B,re:W}of
|
|
205
|
+
`)+Y,replace:s,...ee.length?{pending:{items:ee,noun:"facts"}}:{}}}if(!s)return null;let k=c.match(WL);if(k){let B=`mgx:${k[2].toLowerCase().replace(/\s+/g,"-")}-than`,W=await of(e),A=ae=>{let te=ae.replace(/^(?:an?|the)\s+/i,"").trim();return i&&vs.test(te)?i:te},L=A(k[1]),O=A(k[3]),N=X(a,L),M=X(a,O),z=W.find(ae=>ae.predicate===B&&N.has(ae.subject)&&M.has(ae.object));if(z){let ae=W.find(ee=>ee.predicate===B&&N.has(ee.object)&&M.has(ee.subject)),te=ae?` \u2014 though you also told me the opposite: ${re(ae)}. Both are stored; I won't silently pick one.`:"";return{text:`yes \u2014 ${re(z)}${te}`,replace:!0}}let H=W.filter(ae=>ae.predicate===B&&(N.has(ae.subject)||N.has(ae.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 ${k[2].toLowerCase()} than ${O}".`,replace:!0,miss:!0}}for(let{predicate:D,phrase:B,re:W}of HN){let A=c.match(W);if(!A)continue;let L=await of(e),O=X(a,A[1]),N=X(a,A[2]),M=L.find(Q=>Q.predicate===D&&O.has(Q.subject)&&N.has(Q.object));if(M)return{text:`yes \u2014 ${re(M)}`,replace:!0};let z=qN.has(D)?` If it's true, teach me: "${A[1]} ${B} ${A[2]}".`:"",H=L.filter(Q=>Q.predicate===D&&O.has(Q.subject));if(H.length){let Q=H.slice(0,3).map(re).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${A[1]} ${B} ${A[2]}. I do know: ${Q}.${z}`,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 ${A[1]} ${B} ${A[2]}.${z}`,replace:!0,miss:!0};break}let $=c.match(Hs)||uf(c);if($){let D=X(a,$[1]),B=X(a,$[2]),W=await et(e,r),A=M=>D.has(M.subject)&&B.has(M.object),{DISJOINT_PREDICATE:L}=await Promise.resolve().then(()=>(Xt(),fn)),O=M=>D.has(M.subject)||D.has(M.object)||B.has(M.subject)||B.has(M.object);return W.some(M=>M.predicate===L&&_o(M)&&O(M))?null:gx(W.find(M=>Xn.has(M.predicate)&&A(M)),W.find(M=>M.predicate===_a&&A(M)))}let x=pf(c),E=x.match(kN);if(E){let D=await et(e,r),B=E[1],W=Jv(E[2],E[3],D);if(W&&x!==Xv(c)&&(W=Yv(W)),W&&B)return{text:`I can't speak for ${B.trim()} ${E[2]} \u2014 what I remember is generic, not universal. ${W.text}.`,replace:!0};if(W)return W;let A=X(a,E[2]),L=D.filter(O=>O.predicate==="mgx:capableOf"&&A.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 Qv(E[2],E[3],D)}let S=c.match(jN);if(S){let D=X(a,S[1]),B=X(a,S[2]),W=new Set(["mgx:hasA","tmct:has"]),A=await of(e),L=z=>A.find(H=>W.has(H.predicate)&&z.has(H.subject)&&B.has(H.object)),O=L(D);if(O)return{text:`yes \u2014 ${re(O)}`,replace:!0};let N=[{terms:D,chain:[]}],M=new Set;for(let z=0;z<4;z+=1){let H=[];for(let{terms:Q,chain:ae}of N){let te=A.filter(ee=>Xn.has(ee.predicate)&&Q.has(ee.subject)&&!M.has(ee.object));for(let ee of te){if(M.has(ee.object))continue;M.add(ee.object);let Y=[...ae,ee],J=L(X(a,ee.object));if(J)return{text:`yes \u2014 ${[...Y.map(re),re(J)].join("; ")}`,replace:!0};H.push({terms:X(a,ee.object),chain:Y})}}if(!H.length)break;N=H}return null}let _=pf(c),R=_.match(NN);if(R){let D=await et(e,r),B=!!R[1],W=X(a,R[2]),A=X(a,R[3]),L=Jv(R[2],R[3],D);if(L&&_!==Xv(c)&&(L=Yv(L)),L&&B)return{text:`I can't speak for ${R[1].trim()} ${R[2]} \u2014 what I remember is generic, not universal. ${L.text}.`,replace:!0};if(L)return L;if(s){let O=D.filter(M=>M.predicate==="mgx:capableOf"&&W.has(M.subject));if(O.length){let M=O.slice(0,3).map(re).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${R[2]} can ${R[3]}. I do know: ${M}. If it's true, teach me: "a ${O[0].subject} can ${R[3]}".`,replace:!0,miss:!0}}let N=Qv(R[2],R[3],D);if(N)return N;if(!/\s/.test(R[2].trim())&&!D.some(M=>W.has(M.subject)||W.has(M.object))){let M=bf(nl(R[2]));return{text:`I can't confirm that \u2014 I don't know anything about "${R[2]}" yet. Teach me "a ${M} can ${R[3]}" (or "a ${M} cannot ${R[3]}") and I'll remember it.`,replace:!0,miss:!0}}}}let I=c.match(RN);if(I){let D=X(a,I[1]),B=(await et(e,r)).filter(M=>(M.predicate==="mgx:capableOf"||M.predicate===sr)&&D.has(M.subject));if(!B.length)return null;let A=Je(an(B),o).map(re),L=A.slice(0,ve),O=A.slice(ve),N=O.length?`
|
|
206
206
|
\u2026and ${O.length} more \u2014 say 'more' to see them.`:"";return{text:L.join(`
|
|
207
|
-
`)+N,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}let P=c.match(
|
|
207
|
+
`)+N,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}let P=c.match(FN);if(P){let D=X(a,P[1]),B=X(a,P[2]),W=await et(e,r),A=an(W.filter(L=>L.predicate==="mgx:capableOf"&&B.has(L.object))).filter(L=>Aa(new Set([L.subject]),B,W).verdict==="yes");if(A.length){let{findIsaChain:L,buildSubClassSuccessors:O,SUBCLASS_PREDICATE:N,TYPE_PREDICATE:M}=await Promise.resolve().then(()=>(Xt(),fn)),z=W.filter(oe=>oe.predicate===N),H=W.filter(oe=>oe.predicate===M),Q=z.map(oe=>[oe.subject,oe.object]),ae=H.map(oe=>[oe.subject,oe.object]),te=O(Q),ee=oe=>(oe.predicate===N?z:H).find(ke=>ke.subject===oe.subject&&ke.object===oe.object),Y=new Map,J=A.filter(oe=>D.has(oe.subject)?!0:(Y.has(oe.subject)||Y.set(oe.subject,L(oe.subject,D,ae,te,{maxHops:3})),!!Y.get(oe.subject))),Ee=Je(J.length?J:A,o).map(oe=>{let ke=J.length?Y.get(oe.subject):null;if(!ke||ke.length<2)return re(oe);let le=ke.map(ee);if(!le.every(Boolean))return re(oe);let q=le.map(se=>`${Bt(se)}${se.provenance?` (source: ${Jn(se.provenance)})`:""}`).join("; ");return`${re(oe)} \u2014 via: ${q}`}),Te=Ee.slice(0,ve),ue=Ee.slice(ve),Ce=ue.length?`
|
|
208
208
|
\u2026and ${ue.length} more \u2014 say 'more' to see them.`:"";return{text:(J.length?"":`nothing I remember ties these to "${P[1]}", but:
|
|
209
209
|
`)+Te.join(`
|
|
210
|
-
`)+Ce,replace:!0,...ue.length?{pending:{items:ue,noun:"facts"}}:{}}}}let T=c.match(
|
|
210
|
+
`)+Ce,replace:!0,...ue.length?{pending:{items:ue,noun:"facts"}}:{}}}}let T=c.match(MN);if(T&&T[1].trim().split(/\s+/).at(-1)?.toLowerCase()!=="do"){let D=X(a,T[1]),B=(await et(e,r)).filter(W=>W.predicate==="mgxneg:capableOf"&&D.has(W.object));if(B.length){let A=Je(an(B),o).map(re),L=A.slice(0,ve),O=A.slice(ve),N=O.length?`
|
|
211
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"}}:{}}}return{text:`nothing I remember says anything cannot ${T[1].trim()}.`,replace:!0,miss:!0}}let F=c.match(
|
|
212
|
+
`)+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 F=c.match(PN);if(F&&F[1].trim().split(/\s+/).at(-1)?.toLowerCase()!=="do"){let D=X(a,F[1]),B=Du(D,await et(e,r));if(B.length){let A=Je(an(B),o).map(re),L=A.slice(0,ve),O=A.slice(ve),N=O.length?`
|
|
213
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 U=c.match(
|
|
214
|
+
`)+N,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}}let U=c.match(_N);if(U&&!KN.has(U[1].trim().split(/\s+/)[0]?.toLowerCase())){let D=X(a,U[1]),B=(await et(e,r)).filter(M=>M.predicate==="mgx:hasA"&&D.has(M.object));if(!B.length)return null;let A=Je(an(B),o).map(re),L=A.slice(0,ve),O=A.slice(ve),N=O.length?`
|
|
215
215
|
\u2026and ${O.length} more \u2014 say 'more' to see them.`:"";return{text:L.join(`
|
|
216
216
|
`)+N,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}let K=c.match(Zv),ce=n?.parsed?.shape==="reverse"&&n.parsed.kind==="inherits"?n.parsed.object:K?.[1];if(ce){let D=X(a,ce),B=(await et(e,r)).filter(M=>Xn.has(M.predicate)&&D.has(M.object));if(!B.length)return null;let A=Je(an(B),o).map(re),L=A.slice(0,ve),O=A.slice(ve),N=O.length?`
|
|
217
217
|
\u2026and ${O.length} more \u2014 say 'more' to see them.`:"";return{text:L.join(`
|
|
218
|
-
`)+N,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}let ie=c.match(
|
|
218
|
+
`)+N,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}let ie=c.match(EN);if(ie){let D=X(a,ie[1]),B=await et(e,r),W=q=>!String(q.provenance||"").includes("corpus:")&&!String(q.provenance||"").includes("web:"),A=B.filter(q=>Xn.has(q.predicate)&&W(q)),L=new Set,O=D;for(let q=0;q<8&&O.size;q+=1){let se=new Set;for(let ze of A)O.has(ze.object)&&!L.has(ze.subject)&&se.add(ze.subject);if(!se.size)break;for(let ze of se)L.add(ze);let He=new Set;for(let ze of se)for(let tt of X(a,ze))He.add(tt);O=He}let N=B.filter(q=>D.has(q.subject)||D.has(q.object)||L.has(q.subject));if(!N.length){let q=a(ie[1]).split(/\s+/).filter(se=>se.length>=4&&!bx.has(se));if(q.length){let se=ze=>new Set(String(ze||"").split(/\s+/)),He=ze=>{let tt=se(ze);return q.some(cn=>tt.has(cn))};N=B.filter(ze=>He(ze.subject)||He(ze.object))}}N=N.filter(q=>!Gv.has(q.predicate));let M=N.length>0&&!N.some(rf);if(!N.length)return null;let{findConsistencyViolations:z,TYPE_PREDICATE:H,SUBCLASS_PREDICATE:Q,DISJOINT_PREDICATE:ae}=await Promise.resolve().then(()=>(Xt(),fn)),te=q=>!q.provenance?.includes("corpus:")&&!q.provenance?.includes("web:"),ee=B.filter(q=>q.predicate===H&&te(q)).map(q=>[q.subject,q.object]),Y=B.filter(q=>q.predicate===Q&&te(q)).map(q=>[q.subject,q.object]),J=B.filter(q=>q.predicate===ae&&te(q)).map(q=>[q.subject,q.object]);if(J.length){let se=z(ee,Y,J,{focus:D,budget:5}).find(He=>D.has(He.subject));if(se)return{text:`I can't answer that \u2014 what I've been told about ${se.subject} is inconsistent: it's taught to be both ${se.classA} and ${se.classB}, but ${se.viaA} and ${se.viaB} are disjoint (${se.viaA} owl:disjointWith ${se.viaB}). I'd need one of those retracted before I can answer honestly.`,replace:!0}}let ne=N.find(q=>D.has(q.subject)||D.has(q.object)),Ee=ne?D.has(ne.subject)?ne.subject:ne.object:ie[1].trim(),Te=N.some(q=>L.has(q.subject)&&!D.has(q.subject)&&!D.has(q.object));N=Je(N,o);let ue=`${N.length} remembered fact${N.length===1?"":"s"} about ${Ee}${Te?" (including its known subtypes)":""}:`,{lines:Ce,grouped:Oe}=qv(N,B,D,{indent:" "});if(Oe)return{...Oe,text:`${ue}
|
|
219
219
|
${Oe.text}`,...M?{weakOnly:!0}:{}};let oe=Ce.slice(0,ve),ke=Ce.slice(ve),le=ke.length?`
|
|
220
220
|
\u2026and ${ke.length} more \u2014 say 'more' to see them.`:"";return{text:`${ue}
|
|
221
221
|
${oe.join(`
|
|
222
|
-
`)}${le}`,replace:!0,...ke.length?{pending:{items:ke.map(q=>q.trim()),noun:"facts"}}:{},...M?{weakOnly:!0}:{}}}return null}async function
|
|
222
|
+
`)}${le}`,replace:!0,...ke.length?{pending:{items:ke.map(q=>q.trim()),noun:"facts"}}:{},...M?{weakOnly:!0}:{}}}return null}async function a0(e,t){let n=await Oi(e,t);if(!n)return null;let s=(e?.byId?.get?.(n.id)||(e?.individuals||[]).find(i=>i?.id===n.id))?.class;if(!s)return null;let{defaultCodeLaneVocab:o}=await Promise.resolve().then(()=>(Kp(),Ov)),{classLabels:r}=await o();return r[s]?r[s][0]:null}function tl(e,t){let n=[];if(!e||!t)return n;let s=new Set([t]),o=t;for(let r=0;r<l0;r+=1){let i=null;for(let a of e.relations||[])if(c0.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 Ex(e,t,n,s,o=null,r=null,i={},a=null){return xx(await u0(e,t,n,s,o,r,i,a),n,t)}async function u0(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(),Us)))}catch{return null}let c=String(t).trim();if(o){let A=c.match(Hs);if(A){let L=await Oi(o,A[1]);if(L){let O=X(l,nn(A[2])),N=tl(o,L.id).find(z=>[...X(l,z.label)].some(H=>O.has(H)));if(N)return{text:`yes \u2014 the code graph says ${L.label} inherits ${N.label}.`,replace:!0};let M=await Oi(o,nn(A[2]));if(M&&tl(o,M.id).some(z=>z.id===L.id))return{text:`I can't confirm that \u2014 the code graph's stored direction runs the other way: ${M.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 et(e,a);if(!d.length){if(!Hs.test(u)&&!lf.test(u)){let L=u.match(tx);if(L){let O=L[1].trim(),N=vs.test(O)?r||null:O;if(N&&!/^there\b/i.test(N)&&!n?.parsed&&!sx.test(O)&&!nx.test(O)&&!Wv.test(L[2].trim()))return ox(N,L[2].trim().toLowerCase())}}let A=u.match(Hs)||uf(c);if(!(A&&!/^there\b/i.test(A[1].trim())||Kv.test(c)))return null}let f=d.filter(A=>Xn.has(A.predicate)),p=(A,L)=>L.trust-A.trust,h=A=>{let L=A.map(re),O=L.slice(0,ve),N=L.slice(ve),M=N.length?`
|
|
223
223
|
\u2026and ${N.length} more \u2014 say 'more' to see them.`:"";return{text:O.join(`
|
|
224
|
-
`)+M,replace:!0,...N.length?{pending:{items:N,noun:"facts"}}:{}}};if(
|
|
225
|
-
`),replace:!0}:z(A).length>0||!!Q(te,A)?{text:/^what\b/i.test(sl(u))?`I don't know what the ${A} of ${O} is from what you've told me.`:`I don't know anyone who is the ${A} of ${O} from what you've told me.`,replace:!0}:{text:`I don't know a relation or rule called '${A}' yet.`,replace:!0}}}{let A=u.match(
|
|
224
|
+
`)+M,replace:!0,...N.length?{pending:{items:N,noun:"facts"}}:{}}};if(i0.test(c)){let A=Je(f.length?f:d,i);return A.length?h(A):null}let m=u.match(lf);if(m){let A=m[1].trim(),L=vs.test(A)?r||null:A,O=m[2].trim().toLowerCase(),N=m[3].trim();if(L&&!df.has(O)){let M=Jp(d),{findIsaChain:z}=await Promise.resolve().then(()=>(Xt(),fn)),H=Te=>{let ue=String(Te||"").trim().toLowerCase(),Ce=[];for(let Oe of d){let oe=sf(Oe.predicate);if(!oe)continue;if(oe===ue){Ce.push({fact:Oe,aliasFacts:[]});continue}let ke=Qp(z,oe,new Set([ue]),M,{maxHops:2});if(!ke)continue;let le=ke.map(q=>d.find(se=>se.predicate===Li&&se.subject===q.subject&&se.object===q.object));le.every(Boolean)&&Ce.push({fact:Oe,aliasFacts:le})}return Ce},{loadMemory:Q,findRuleByName:ae,resolveRelationChase:te}=await Promise.resolve().then(()=>(Be(),Us)),{findActionPath:ee}=await Promise.resolve().then(()=>(_s(),Yi)),Y=await Q(e),ne=await te(Y,O,L,N,{relationFactsFor:H,renderFactLine:re,factPhrase:Bt,factTermVariants:X,byTrust:p,rows:d,HAS_PROPERTY_PREDICATE:Xp,findActionPath:ee});return ne?{text:`yes \u2014 ${ne.citation.join("; ")}`,replace:!0}:H(O).length>0||!!ae(Y,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 b=sl(u).match(wx)||yx(u,A=>{let L=X(l,A);return d.some(O=>L.has(O.subject)||L.has(O.object))});if(b){let A=b[1].trim().toLowerCase(),L=b[2].trim(),O=vs.test(L)?r||null:L;if(O&&!df.has(A)){let N=Jp(d),{findIsaChain:M}=await Promise.resolve().then(()=>(Xt(),fn)),z=Te=>{let ue=String(Te||"").trim().toLowerCase(),Ce=[];for(let Oe of d){let oe=sf(Oe.predicate);if(!oe)continue;if(oe===ue){Ce.push({fact:Oe,aliasFacts:[]});continue}let ke=Qp(M,oe,new Set([ue]),N,{maxHops:2});if(!ke)continue;let le=ke.map(q=>d.find(se=>se.predicate===Li&&se.subject===q.subject&&se.object===q.object));le.every(Boolean)&&Ce.push({fact:Oe,aliasFacts:le})}return Ce},{loadMemory:H,findRuleByName:Q,resolveRelationChaseReverse:ae}=await Promise.resolve().then(()=>(Be(),Us)),te=await H(e),{findReachableSet:ee}=await Promise.resolve().then(()=>(_s(),Yi)),J=await ae(te,A,O,{relationFactsFor:z,renderFactLine:re,factPhrase:Bt,factTermVariants:X,byTrust:p,rows:d,HAS_PROPERTY_PREDICATE:Xp,findReachableSet:ee});return J.length?{text:J.map(ue=>`${ue.subject} \u2014 ${ue.citation.join("; ")}`).join(`
|
|
225
|
+
`),replace:!0}:z(A).length>0||!!Q(te,A)?{text:/^what\b/i.test(sl(u))?`I don't know what the ${A} of ${O} is from what you've told me.`:`I don't know anyone who is the ${A} of ${O} from what you've told me.`,replace:!0}:{text:`I don't know a relation or rule called '${A}' yet.`,replace:!0}}}{let A=u.match(d0);if(A){let L=X(l,A[1]),O=Je(d.filter(N=>L.has(N.subject)||L.has(N.object)),i);if(O.length){let N=O.map(re),M=N.slice(0,ve),z=N.slice(ve),H=z.length?`
|
|
226
226
|
\u2026and ${z.length} more \u2014 say 'more' to see them.`:"";return{text:M.join(`
|
|
227
|
-
`)+H,replace:!0,...z.length?{pending:{items:z,noun:"facts"}}:{}}}}}let g=u.match(
|
|
228
|
-
`),replace:!0}}}return null}}let y=c.match(Kv),w=c.match(Hs)||uf(c)||y&&`is ${y[1].trim()} a ${y[2].trim()}`.match(Hs);if(w){let A=X(l,nn(w[2])),L=r&&vs.test(w[1].trim())?r:w[1],O=new Set(X(l,L));if([...O].some(G=>A.has(G))){let G=nn(w[2]).trim();return{text:`yes \u2014 ${kr(G)} ${G} is ${kr(G)} ${G}, trivially: every kind is a kind of itself.`,replace:!0}}let N=await i0(o,L);if(N)for(let G of X(l,N))O.add(G);let{findIsaChain:M,buildSubClassSuccessors:z,deriveDisjointViolations:H,SUBCLASS_PREDICATE:Q,TYPE_PREDICATE:ae,DISJOINT_PREDICATE:te}=await Promise.resolve().then(()=>(Xt(),fn)),ee=_o,Y=f.filter(G=>G.predicate===Q&&ee(G)),J=f.filter(G=>G.predicate===ae&&ee(G)),ne=Y.map(G=>[G.subject,G.object]),Ee=J.map(G=>[G.subject,G.object]),Te=f.filter(G=>G.predicate===Q),ue=f.filter(G=>G.predicate===ae),Ce=ue.map(G=>[G.subject,G.object]),Oe=Te.map(G=>[G.subject,G.object]),oe=z(ne),ke=z(Oe),le=d.filter(G=>G.predicate===te&&ee(G)),q=le.map(G=>[G.subject,G.object]),se=le.length?H(Ce.concat(Oe),Oe,q,{budget:20,focus:new Set([...O,...A])}):[],He=G=>{let be=se.find(Pe=>Pe.subject===G&&A.has(Pe.object));if(!be)return null;let we=f.filter(Pe=>A.has(Pe.object)&&(Pe.subject===be.viaClass||Pe.subject===be.subject)).sort(p)[0],je=le.find(Pe=>Pe.subject===be.viaClass&&Pe.object===be.object||Pe.subject===be.object&&Pe.object===be.viaClass);return!we||!je?null:dN(we,je)},De=f.filter(G=>O.has(G.subject)&&A.has(G.object)).sort(p)[0],tt=d.filter(G=>G.predicate===_a&&O.has(G.subject)&&A.has(G.object)).sort(p)[0],cn=le.find(G=>O.has(G.subject)&&A.has(G.object)||O.has(G.object)&&A.has(G.subject));if(De&&!tt){let G=He(De.subject);if(G)return G}let Qt=gx(De,tt||cn);if(Qt)return Qt;if(le.length){let G=je=>{let Pe=new Set(je),Nt=new Set(je);for(let Le=0;Le<8&&Nt.size;Le+=1){let ye=new Set;for(let[ct,Ys]of Oe)Nt.has(ct)&&!Pe.has(Ys)&&ye.add(Ys);if(!ye.size)break;for(let ct of ye)Pe.add(ct);Nt=ye}return Pe},be=G(A),we=se.find(je=>O.has(je.subject)&&be.has(je.object)&&!G([je.viaClass]).has(je.object)&&!G([je.object]).has(je.viaClass));if(we){let je=f.filter(ye=>O.has(ye.subject)&&ye.object===we.viaClass).sort(p)[0],Pe=le.find(ye=>ye.subject===we.viaClass&&ye.object===we.object||ye.subject===we.object&&ye.object===we.viaClass),Nt=!A.has(we.object),Le=Nt?f.filter(ye=>A.has(ye.subject)&&ye.object===we.object).sort(p)[0]:null;if(je&&Pe&&(!Nt||Le)){let ye=nn(w[2]).trim();return{text:`no \u2014 ${[je,...Le?[Le]:[]].map(re).join("; ")}; and ${Bt(Pe)}${Pe.provenance?` (source: ${Jn(Pe.provenance)})`:""} \u2014 so ${L} can never be ${kr(ye)} ${ye}.`,replace:!0}}}}let Zt=await Oi(o,L);if(Zt){let G=new Map;for(let we of tl(o,Zt.id))for(let je of X(l,we.label))!O.has(je)&&!G.has(je)&&G.set(je,we.label);let be=f.filter(we=>G.has(we.subject)&&A.has(we.object)).sort(p)[0];if(be)return{text:`yes \u2014 the code graph says ${Zt.label} inherits ${G.get(be.subject)}, and ${re(be)}`,replace:!0}}let ln=G=>(G.predicate===Q?Y:J).find(be=>be.subject===G.subject&&be.object===G.object);for(let G of O){let be=M(G,A,Ee,oe,{maxHops:2});if(!be)continue;let we=He(G);if(we)return we;let je=be.map(ln);if(je.every(Boolean))return{text:`yes \u2014 ${Zc(je)}`,replace:!0}}let Ni=G=>(G.predicate===Q?Te:ue).find(be=>be.subject===G.subject&&be.object===G.object);for(let G of O){let be=M(G,A,Ce,ke,{maxHops:2});if(!be)continue;let we=He(G);if(we)return we;let je=be.map(Ni);if(je.every(Boolean)&&je.some(ee))return{text:`yes \u2014 ${Zc(je)}`,replace:!0}}let j=L.match(/^(.*\S)\s+not$/i),pe=j&&[j[0],r&&vs.test(j[1].trim())?r:j[1]];if(pe){let G=X(l,pe[1]),be=A,we=f.filter(Le=>G.has(Le.subject)&&be.has(Le.object)).sort(p)[0];if(we)return{text:`no \u2014 ${re(we)}`,replace:!0};let je=le.find(Le=>G.has(Le.subject)&&be.has(Le.object)||G.has(Le.object)&&be.has(Le.subject));if(je)return{text:`yes \u2014 ${re(je)}`,replace:!0};let Pe=pe[1].trim(),Nt=nn(w[2]).trim();return{text:`I can't confirm that either way \u2014 nothing I remember links ${Pe} and ${Nt}. If no ${Pe} is a ${Nt}, teach me: "no ${Pe} is a ${Nt}".`,replace:!0,miss:!0}}if(le.length){let G=H(Ee.concat(ne),ne,q,{budget:10});for(let be of O){let we=G.find(Le=>Le.subject===be&&A.has(Le.object));if(!we)continue;let je=J.concat(Y).find(Le=>Le.subject===we.subject&&Le.object===we.viaType),Pe=le.find(Le=>Le.subject===we.viaClass&&Le.object===we.object||Le.subject===we.object&&Le.object===we.viaClass),Nt=[je,Pe].filter(Boolean).map(re);return{text:`no \u2014 ${Nt.length?Nt.join("; "):`${we.viaClass} and ${we.object} are disjoint.`}`,replace:!0}}}let{deriveSomeValuesFromApplication:Ae,ON_PROPERTY_PREDICATE:un,SOME_VALUES_FROM_PREDICATE:Qn,deriveSomeValuesFromSubsumption:Bx,ENTAILED_SCM_SVF_PROVENANCE:Wx,SCM_SVF_RULE_CONFIDENCE:Gx,entailedTrustFrom:vf}=await Promise.resolve().then(()=>(Xt(),fn)),xf=d.filter(G=>G.predicate===un&&ee(G)),Ef=d.filter(G=>G.predicate===Qn&&ee(G));if(xf.length&&Ef.length){let G=new Map(Ef.map(ye=>[ye.subject,ye.object])),be=xf.map(ye=>({restriction:ye.subject,property:ye.object,target:G.get(ye.subject)})).filter(ye=>ye.target),we=new Set([Q,ae,te,un,Qn,"owl:intersectionOf"]),je=d.filter(ye=>ee(ye)&&!we.has(ye.predicate)),Pe=je.map(ye=>[ye.subject,ye.predicate,ye.object]),Nt=Ae(Pe,Ee,ne,be,{budget:10});for(let ye of O){let ct=Nt.find(yn=>yn.subject===ye&&A.has(yn.object));if(!ct)continue;let Ys=je.find(yn=>yn.subject===ct.subject&&yn.predicate===ct.viaProperty&&yn.object===ct.viaValue),Xs=J.find(yn=>yn.subject===ct.viaValue&&yn.object===ct.viaType),Rr=[Ys,Xs].filter(Boolean).map(re);return{text:`yes \u2014 ${Rr.length?Rr.join("; "):`${ct.subject} ${ct.viaProperty} ${ct.viaValue}, and ${ct.viaValue} is a ${ct.viaType}.`}`,replace:!0}}let Le=be.length>1?Bx(be,ne,{budget:10}):[];if(Le.length){let ye=z(ne.concat(Le.map(Se=>[Se.subject,Se.object]))),ct=new Map(be.map(Se=>[Se.restriction,Se])),Ys=new Map;for(let Se of d)Ys.set(`${Se.subject}\0${Se.predicate}\0${Se.object}`,Se.trust);let Xs=(Se,Tn,Wt)=>Ys.get(`${Se}\0${Tn}\0${Wt}`),Rr=new Map;for(let Se of Le){let Tn=ct.get(Se.subject),Wt=ct.get(Se.object),en=[Tn&&Xs(Se.subject,un,Tn.property),Xs(Se.subject,Qn,Se.viaY1),Wt&&Xs(Se.object,un,Wt.property),Xs(Se.object,Qn,Se.viaY2),Xs(Se.viaY1,Q,Se.viaY2)].filter(Hx=>typeof Hx=="number"),Pi=vf(en,Gx);Pi!==null&&Rr.set(`${Se.subject}\0${Se.object}`,Pi)}let yn=Se=>{if(Se.predicate!==Q)return J.find(en=>en.subject===Se.subject&&en.object===Se.object);let Tn=Y.find(en=>en.subject===Se.subject&&en.object===Se.object);if(Tn)return Tn;let Wt=Le.find(en=>en.subject===Se.subject&&en.object===Se.object);return Wt?{subject:Wt.subject,predicate:Q,object:Wt.object,provenance:Wx,trust:Rr.get(`${Wt.subject}\0${Wt.object}`)}:void 0};for(let Se of O){let Tn=M(Se,A,Ee,ye,{maxHops:3});if(!Tn)continue;let Wt=Tn.map(yn);if(Wt.every(Boolean)){let en=vf(Wt.map(Pi=>Pi.trust),1);return{text:`yes \u2014 ${Zc(Wt)}`,replace:!0,...en!==null?{trust:en}:{}}}}}}let Vx=X(l,L),Sf=f.filter(G=>Vx.has(G.subject)).sort(p),_n=L.trim(),Ks=nn(w[2]).trim(),qx=[...O].some(G=>M(G,A,Ee,oe,{maxHops:yN}));if(Sf.length){let G=Sf.slice(0,3).map(re).join("; "),be=qx?`The facts to settle it are here, but the chain is longer than I follow while answering. Run "/syllogise ${_n}", then ask me again.`:`If it's true, teach me: "${_n} is a kind of ${Ks}". If it isn't, teach me: "no ${_n} is a ${Ks}".`;return{text:`I can't confirm that \u2014 nothing I remember says ${_n} is a ${Ks}. I do know: ${G}. ${be}`,replace:!0,miss:!0}}let kf=f.filter(G=>O.has(G.object)&&A.has(G.subject)).sort(p)[0];return kf?{text:`I can't confirm that \u2014 what I know runs the other way: ${re(kf)}. A kind doesn't reverse. If it's true, teach me: "every ${_n} is a ${Ks}". If it isn't, teach me: "no ${_n} is a ${Ks}".`,replace:!0,miss:!0}:!Zt&&!N&&!DL(_n)&&!d.some(G=>O.has(G.subject)||O.has(G.object))?{text:`I can't confirm that \u2014 I don't know "${_n}" at all yet. If it's true, teach me: "${_n} is a kind of ${Ks}". If it isn't, teach me: "no ${_n} is a ${Ks}".`,replace:!0,miss:!0}:null}let v=c.match(JN);if(v){let[,A,L,O]=v,{SUBCLASS_PREDICATE:N,ON_PROPERTY_PREDICATE:M,buildCardinalityRestrictions:z,proveCardinalityAtLeast:H,CARDINALITY_RULE_CONFIDENCE:Q,entailedTrustFrom:ae}=await Promise.resolve().then(()=>(Xt(),fn)),te=_o,ee=f.filter(ne=>ne.predicate===N&&te(ne)).map(ne=>[ne.subject,ne.object]),Y=d.filter(ne=>(ne.predicate===M||ex.has(ne.predicate))&&te(ne)),J=z(Y);if(J.length){let ne=X(l,A.trim()),Ee=X(l,O.trim()),Te=Number(L),ue=Hv(ne,Ee,(Ce,Oe)=>H(ee,J,Ce,Oe,Te,{}));if(ue){let Ce=d.find(se=>se.predicate===N&&se.subject===ue.viaClass&&se.object===ue.viaRestriction),Oe=Ce?.provenance?` (source: ${Jn(Ce.provenance)})`:"",oe=ue.kind==="exactly"?"exactly":"at least",ke=(se,He)=>`${se}${He===1?"":"s"}`,le=[Ce?.trust,...Y.filter(se=>se.subject===ue.viaRestriction).map(se=>se.trust),...ue.viaClass!==ue.subject?[f.find(se=>se.predicate===N&&se.subject===ue.subject&&se.object===ue.viaClass)?.trust]:[]].filter(se=>typeof se=="number"),q=ae(le,Q);return{text:`yes \u2014 every ${ue.viaClass} has ${oe} ${ue.n} ${ke(ue.object,ue.n)}${Oe}, so at least ${Te} follows.`,replace:!0,...q!==null?{trust:q}:{}}}}}let k=c.match(QN);if(k){let[,A,L]=k,{SUBCLASS_PREDICATE:O,ON_PROPERTY_PREDICATE:N,buildCardinalityRestrictions:M,proveMaxCardinalityZeroDenial:z,CAX_MAXC0_RULE_CONFIDENCE:H,entailedTrustFrom:Q}=await Promise.resolve().then(()=>(Xt(),fn)),ae=_o,te=f.filter(J=>J.predicate===O&&ae(J)).map(J=>[J.subject,J.object]),ee=d.filter(J=>(J.predicate===N||ex.has(J.predicate))&&ae(J)),Y=M(ee);if(Y.length){let J=X(l,A.trim()),ne=X(l,L.trim()),Ee=Hv(J,ne,(Te,ue)=>z(te,Y,Te,ue,{}));if(Ee){let Te=d.find(oe=>oe.predicate===O&&oe.subject===Ee.viaClass&&oe.object===Ee.viaRestriction),ue=Te?.provenance?` (source: ${Jn(Te.provenance)})`:"",Ce=[Te?.trust,...ee.filter(oe=>oe.subject===Ee.viaRestriction).map(oe=>oe.trust),...Ee.viaClass!==Ee.subject?[f.find(oe=>oe.predicate===O&&oe.subject===Ee.subject&&oe.object===Ee.viaClass)?.trust]:[]].filter(oe=>typeof oe=="number"),Oe=Q(Ce,H);return{text:`no \u2014 every ${Ee.viaClass} has at most 0 ${Ee.object}${ue}.`,replace:!0,...Oe!==null?{trust:Oe}:{}}}}}let $=c.match(ZN);if($){let A=X(l,$[1]),L=d.filter(O=>O.predicate===Yp&&A.has(O.subject)).sort(p);return L.length?h(L):null}let x=u.match(e0);if(x){let[,A,L]=x,O=X(l,A.trim()),N=X(l,L.replace(/^an?\s+/i,"").trim()),M=d.filter(z=>z.predicate===Yp&&N.has(z.subject)&&O.has(z.object)).sort(p)[0];return M?{text:`yes \u2014 ${re(M)}`,replace:!0}:{text:`no \u2014 no remembered fact says ${A.trim().toLowerCase()} owns/maintains ${L.trim()}.`,replace:!0}}let E=u.match(t0);if(E){let[,A,L]=E,O=X(l,A.replace(/^an?\s+/i,"").trim()),N=X(l,L.trim()),M=d.filter(z=>z.predicate===Yp&&O.has(z.subject)&&N.has(z.object)).sort(p)[0];return M?{text:`yes \u2014 ${re(M)}`,replace:!0}:{text:`no \u2014 no remembered fact says ${A.trim().toLowerCase()} is owned by ${L.trim()}.`,replace:!0}}let S=u.match(n0);if(S){let[,A,L]=S,O=X(l,A.trim()),N=X(l,`${L.trim()} method`),M=d.filter(z=>z.predicate===gr&&O.has(z.subject)&&N.has(z.object)).sort(p)[0];return M?{text:`yes \u2014 ${re(M)}`,replace:!0}:null}let _=u.match(s0);if(_){let A=X(l,_[1].trim()),L=d.filter(O=>O.predicate===gr&&A.has(O.subject)&&/ method$/.test(O.object)).sort(p);return L.length?h(L):null}let R=u.match(tx);if(R){let A=R[1].trim(),L=sx.test(A)||nx.test(A)?null:vs.test(A)?r||null:A,O=R[2].trim().toLowerCase();if(L){let N=X(l,L),M=new Map,z=null;if(o){let Y=await Oi(o,L);if(z=Y,Y)for(let J of tl(o,Y.id))for(let ne of X(l,J.label))!N.has(ne)&&!M.has(ne)&&M.set(ne,J.label),N.add(ne)}let H=Y=>Y.predicate===Xp&&l(Y.object)===O||Y.predicate===`tmct:${O}`&&Y.object==="true",Q=l(L).split(/\s+/).filter(Y=>Y.length>=4&&!bx.has(Y)),ae=Y=>Q.some(J=>new Set(String(Y.subject||"").split(/\s+/)).has(J)),te=Y=>N.has(Y.subject)||Q.length&&ae(Y),ee=d.filter(Y=>te(Y)&&H(Y)).sort(p)[0];if(ee){let Y=M.get(ee.subject);return{text:Y?`yes \u2014 the code graph says ${z.label} inherits ${Y}, and ${re(ee)}`:`yes \u2014 ${re(ee)}`,replace:!0}}{let{findIsaChain:Y,SUBCLASS_PREDICATE:J,TYPE_PREDICATE:ne}=await Promise.resolve().then(()=>(Xt(),fn)),Ee=_o,Te=d.filter(le=>le.predicate===J&&Ee(le)),ue=d.filter(le=>le.predicate===ne&&Ee(le)),Ce=Te.map(le=>[le.subject,le.object]),Oe=ue.map(le=>[le.subject,le.object]),oe=le=>(le.predicate===J?Te:ue).find(q=>q.subject===le.subject&&q.object===le.object),ke=X(l,O);for(let le of N){let q=Y(le,ke,Oe,Ce,{maxHops:2});if(!q)continue;let se=q.map(oe);if(se.every(Boolean))return{text:`yes \u2014 ${Zc(se)}`,replace:!0}}}if(d.some(te)&&!n?.parsed)return/^there\b/i.test(L)||o0.test(O)?null:{text:`I don't have a fact saying ${fN(L)} is ${O}.`,replace:!0};if(!n?.parsed&&!Wv.test(O))return ox(L,O)}}let I=pf(c).match(XL);if(I&&!ef.test(c)){let[,A,L,O]=I,N=L.toLowerCase();if(!Zp.test(N)&&!nf.test(N)){let M=A.trim(),z=ZL(await tf(N),O),H=z.object.replace(/^an?\s+/i,"").trim();if(M&&H){let Q=z.predicate,ae=X(l,M),te=X(l,H),ee=[Q,rr(Q)],Y=d.filter(ne=>ee.includes(ne.predicate)&&ae.has(ne.subject)&&te.has(ne.object)).sort(p)[0];if(Y)return{text:`${Hg(Y.predicate)?"no":"yes"} \u2014 ${re(Y)}`,replace:!0,generalVerbQuery:!0};let J=d.filter(ne=>ee.includes(ne.predicate)&&ae.has(ne.subject));if(J.length){let ne=J.slice(0,3).map(re).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${Bt({subject:M,predicate:Q,object:H})}. I do know: ${ne}.`,replace:!0,miss:!0}}return null}}}let P=c.match(JL);if(P&&!ef.test(c)){let[,A,L]=P,[O,N]=L.toLowerCase().split(/\s+/);if(!Zp.test(O)&&!nf.test(O)){let M=A.trim();if(M){let z=await tf(O);N&&/^mgx:[a-z]+$/.test(z)&&(z=`${z}-${N}`);let H=X(l,M),Q=[z,rr(z)],ae=Je(d.filter(te=>Q.includes(te.predicate)&&H.has(te.subject)),i);if(ae.length)return{...h(ae),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&&!ef.test(c)){let[,A,L,O]=T,N=A.toLowerCase();if(!Zp.test(N)&&!nf.test(N)&&!YL.test(N)){let M=await tf(N);/^mgx:[a-z]+$/.test(M)&&(M=`${M}-${L.toLowerCase()}`);let z=X(l,O.replace(/^(?:an?|the)\s+/i,"").trim()),H=Je(d.filter(Q=>Q.predicate===M&&z.has(Q.object)),i);if(H.length)return{...h(H),generalVerbQuery:!0}}}let F=c.match(YN);if(F){let A=X(l,F[1]),L=Je(d.filter(Q=>A.has(Q.subject)||A.has(Q.object)),i);if(!L.length)return null;let O=A.has(L[0].subject)?L[0].subject:L[0].object,N=L.map(Q=>` ${re(Q)}`),M=N.slice(0,ve),z=N.slice(ve),H=z.length?`
|
|
227
|
+
`)+H,replace:!0,...z.length?{pending:{items:z,noun:"facts"}}:{}}}}}let g=u.match(yN);if(g){let A=bf(g[1].trim().toLowerCase()),L=g[2].trim(),O=vs.test(L)?r||null:L;if(O){let{loadMemory:N,findRuleByName:M,RULE_KIND_PROP:z,RULE_KIND_RECURSIVE:H}=await Promise.resolve().then(()=>(Be(),Us)),Q=await N(e),ae=M(Q,A),te=ae?.attributes?.find(ee=>ee.prop===z)?.value;if(ae&&te===H){let ee=ae.attributes.find(ne=>ne.prop==="mgx:ruleBaseCase")?.value,Y=ae.attributes.find(ne=>ne.prop==="mgx:ruleRecStep")?.value,J=l(O);if(ee&&Y&&J){let ne=Jp(d),{findIsaChain:Ee}=await Promise.resolve().then(()=>(Xt(),fn)),Te=ke=>{let le=String(ke||"").trim().toLowerCase(),q=[];for(let se of d){let He=sf(se.predicate);if(!He)continue;if(He===le){q.push({fact:se,aliasFacts:[]});continue}let ze=Qp(Ee,He,new Set([le]),ne,{maxHops:2});if(!ze)continue;let tt=ze.map(cn=>d.find(Qt=>Qt.predicate===Li&&Qt.subject===cn.subject&&Qt.object===cn.object));tt.every(Boolean)&&q.push({fact:se,aliasFacts:tt})}return q},{findReachableSet:ue}=await Promise.resolve().then(()=>(_s(),Yi)),oe=ue({entity:J,hop:0},ke=>{let le=ke.hop===0?ee:Y;return Te(le).filter(q=>q.fact.subject===ke.entity).map(q=>({action:q,nextState:{entity:q.fact.object,hop:ke.hop+1}}))},{maxDepth:20,stateKey:ke=>ke.entity});if(oe.length)return{text:oe.map(({node:le,path:q})=>{let se=new Set,He=[];for(let ze of q.actions){He.push(re(ze.fact));for(let tt of ze.aliasFacts){let cn=tt.id||`${tt.subject}|${tt.predicate}|${tt.object}`;se.has(cn)||(se.add(cn),He.push(`${Bt(tt)}${tt.provenance?` (source: ${Jn(tt.provenance)})`:""}`))}}return`${le.entity} \u2014 ${He.join("; ")}`}).join(`
|
|
228
|
+
`),replace:!0}}}return null}}let y=c.match(Kv),w=c.match(Hs)||uf(c)||y&&`is ${y[1].trim()} a ${y[2].trim()}`.match(Hs);if(w){let A=X(l,nn(w[2])),L=r&&vs.test(w[1].trim())?r:w[1],O=new Set(X(l,L));if([...O].some(G=>A.has(G))){let G=nn(w[2]).trim();return{text:`yes \u2014 ${kr(G)} ${G} is ${kr(G)} ${G}, trivially: every kind is a kind of itself.`,replace:!0}}let N=await a0(o,L);if(N)for(let G of X(l,N))O.add(G);let{findIsaChain:M,buildSubClassSuccessors:z,deriveDisjointViolations:H,SUBCLASS_PREDICATE:Q,TYPE_PREDICATE:ae,DISJOINT_PREDICATE:te}=await Promise.resolve().then(()=>(Xt(),fn)),ee=_o,Y=f.filter(G=>G.predicate===Q&&ee(G)),J=f.filter(G=>G.predicate===ae&&ee(G)),ne=Y.map(G=>[G.subject,G.object]),Ee=J.map(G=>[G.subject,G.object]),Te=f.filter(G=>G.predicate===Q),ue=f.filter(G=>G.predicate===ae),Ce=ue.map(G=>[G.subject,G.object]),Oe=Te.map(G=>[G.subject,G.object]),oe=z(ne),ke=z(Oe),le=d.filter(G=>G.predicate===te&&ee(G)),q=le.map(G=>[G.subject,G.object]),se=le.length?H(Ce.concat(Oe),Oe,q,{budget:20,focus:new Set([...O,...A])}):[],He=G=>{let be=se.find(Pe=>Pe.subject===G&&A.has(Pe.object));if(!be)return null;let we=f.filter(Pe=>A.has(Pe.object)&&(Pe.subject===be.viaClass||Pe.subject===be.subject)).sort(p)[0],je=le.find(Pe=>Pe.subject===be.viaClass&&Pe.object===be.object||Pe.subject===be.object&&Pe.object===be.viaClass);return!we||!je?null:pN(we,je)},ze=f.filter(G=>O.has(G.subject)&&A.has(G.object)).sort(p)[0],tt=d.filter(G=>G.predicate===_a&&O.has(G.subject)&&A.has(G.object)).sort(p)[0],cn=le.find(G=>O.has(G.subject)&&A.has(G.object)||O.has(G.object)&&A.has(G.subject));if(ze&&!tt){let G=He(ze.subject);if(G)return G}let Qt=gx(ze,tt||cn);if(Qt)return Qt;if(le.length){let G=je=>{let Pe=new Set(je),Nt=new Set(je);for(let Le=0;Le<8&&Nt.size;Le+=1){let ye=new Set;for(let[ct,Ys]of Oe)Nt.has(ct)&&!Pe.has(Ys)&&ye.add(Ys);if(!ye.size)break;for(let ct of ye)Pe.add(ct);Nt=ye}return Pe},be=G(A),we=se.find(je=>O.has(je.subject)&&be.has(je.object)&&!G([je.viaClass]).has(je.object)&&!G([je.object]).has(je.viaClass));if(we){let je=f.filter(ye=>O.has(ye.subject)&&ye.object===we.viaClass).sort(p)[0],Pe=le.find(ye=>ye.subject===we.viaClass&&ye.object===we.object||ye.subject===we.object&&ye.object===we.viaClass),Nt=!A.has(we.object),Le=Nt?f.filter(ye=>A.has(ye.subject)&&ye.object===we.object).sort(p)[0]:null;if(je&&Pe&&(!Nt||Le)){let ye=nn(w[2]).trim();return{text:`no \u2014 ${[je,...Le?[Le]:[]].map(re).join("; ")}; and ${Bt(Pe)}${Pe.provenance?` (source: ${Jn(Pe.provenance)})`:""} \u2014 so ${L} can never be ${kr(ye)} ${ye}.`,replace:!0}}}}let Zt=await Oi(o,L);if(Zt){let G=new Map;for(let we of tl(o,Zt.id))for(let je of X(l,we.label))!O.has(je)&&!G.has(je)&&G.set(je,we.label);let be=f.filter(we=>G.has(we.subject)&&A.has(we.object)).sort(p)[0];if(be)return{text:`yes \u2014 the code graph says ${Zt.label} inherits ${G.get(be.subject)}, and ${re(be)}`,replace:!0}}let ln=G=>(G.predicate===Q?Y:J).find(be=>be.subject===G.subject&&be.object===G.object);for(let G of O){let be=M(G,A,Ee,oe,{maxHops:2});if(!be)continue;let we=He(G);if(we)return we;let je=be.map(ln);if(je.every(Boolean))return{text:`yes \u2014 ${Zc(je)}`,replace:!0}}let Ni=G=>(G.predicate===Q?Te:ue).find(be=>be.subject===G.subject&&be.object===G.object);for(let G of O){let be=M(G,A,Ce,ke,{maxHops:2});if(!be)continue;let we=He(G);if(we)return we;let je=be.map(Ni);if(je.every(Boolean)&&je.some(ee))return{text:`yes \u2014 ${Zc(je)}`,replace:!0}}let j=L.match(/^(.*\S)\s+not$/i),pe=j&&[j[0],r&&vs.test(j[1].trim())?r:j[1]];if(pe){let G=X(l,pe[1]),be=A,we=f.filter(Le=>G.has(Le.subject)&&be.has(Le.object)).sort(p)[0];if(we)return{text:`no \u2014 ${re(we)}`,replace:!0};let je=le.find(Le=>G.has(Le.subject)&&be.has(Le.object)||G.has(Le.object)&&be.has(Le.subject));if(je)return{text:`yes \u2014 ${re(je)}`,replace:!0};let Pe=pe[1].trim(),Nt=nn(w[2]).trim();return{text:`I can't confirm that either way \u2014 nothing I remember links ${Pe} and ${Nt}. If no ${Pe} is a ${Nt}, teach me: "no ${Pe} is a ${Nt}".`,replace:!0,miss:!0}}if(le.length){let G=H(Ee.concat(ne),ne,q,{budget:10});for(let be of O){let we=G.find(Le=>Le.subject===be&&A.has(Le.object));if(!we)continue;let je=J.concat(Y).find(Le=>Le.subject===we.subject&&Le.object===we.viaType),Pe=le.find(Le=>Le.subject===we.viaClass&&Le.object===we.object||Le.subject===we.object&&Le.object===we.viaClass),Nt=[je,Pe].filter(Boolean).map(re);return{text:`no \u2014 ${Nt.length?Nt.join("; "):`${we.viaClass} and ${we.object} are disjoint.`}`,replace:!0}}}let{deriveSomeValuesFromApplication:Ae,ON_PROPERTY_PREDICATE:un,SOME_VALUES_FROM_PREDICATE:Qn,deriveSomeValuesFromSubsumption:Bx,ENTAILED_SCM_SVF_PROVENANCE:Wx,SCM_SVF_RULE_CONFIDENCE:Gx,entailedTrustFrom:vf}=await Promise.resolve().then(()=>(Xt(),fn)),xf=d.filter(G=>G.predicate===un&&ee(G)),Ef=d.filter(G=>G.predicate===Qn&&ee(G));if(xf.length&&Ef.length){let G=new Map(Ef.map(ye=>[ye.subject,ye.object])),be=xf.map(ye=>({restriction:ye.subject,property:ye.object,target:G.get(ye.subject)})).filter(ye=>ye.target),we=new Set([Q,ae,te,un,Qn,"owl:intersectionOf"]),je=d.filter(ye=>ee(ye)&&!we.has(ye.predicate)),Pe=je.map(ye=>[ye.subject,ye.predicate,ye.object]),Nt=Ae(Pe,Ee,ne,be,{budget:10});for(let ye of O){let ct=Nt.find(yn=>yn.subject===ye&&A.has(yn.object));if(!ct)continue;let Ys=je.find(yn=>yn.subject===ct.subject&&yn.predicate===ct.viaProperty&&yn.object===ct.viaValue),Xs=J.find(yn=>yn.subject===ct.viaValue&&yn.object===ct.viaType),Rr=[Ys,Xs].filter(Boolean).map(re);return{text:`yes \u2014 ${Rr.length?Rr.join("; "):`${ct.subject} ${ct.viaProperty} ${ct.viaValue}, and ${ct.viaValue} is a ${ct.viaType}.`}`,replace:!0}}let Le=be.length>1?Bx(be,ne,{budget:10}):[];if(Le.length){let ye=z(ne.concat(Le.map(Se=>[Se.subject,Se.object]))),ct=new Map(be.map(Se=>[Se.restriction,Se])),Ys=new Map;for(let Se of d)Ys.set(`${Se.subject}\0${Se.predicate}\0${Se.object}`,Se.trust);let Xs=(Se,Tn,Wt)=>Ys.get(`${Se}\0${Tn}\0${Wt}`),Rr=new Map;for(let Se of Le){let Tn=ct.get(Se.subject),Wt=ct.get(Se.object),en=[Tn&&Xs(Se.subject,un,Tn.property),Xs(Se.subject,Qn,Se.viaY1),Wt&&Xs(Se.object,un,Wt.property),Xs(Se.object,Qn,Se.viaY2),Xs(Se.viaY1,Q,Se.viaY2)].filter(Hx=>typeof Hx=="number"),Pi=vf(en,Gx);Pi!==null&&Rr.set(`${Se.subject}\0${Se.object}`,Pi)}let yn=Se=>{if(Se.predicate!==Q)return J.find(en=>en.subject===Se.subject&&en.object===Se.object);let Tn=Y.find(en=>en.subject===Se.subject&&en.object===Se.object);if(Tn)return Tn;let Wt=Le.find(en=>en.subject===Se.subject&&en.object===Se.object);return Wt?{subject:Wt.subject,predicate:Q,object:Wt.object,provenance:Wx,trust:Rr.get(`${Wt.subject}\0${Wt.object}`)}:void 0};for(let Se of O){let Tn=M(Se,A,Ee,ye,{maxHops:3});if(!Tn)continue;let Wt=Tn.map(yn);if(Wt.every(Boolean)){let en=vf(Wt.map(Pi=>Pi.trust),1);return{text:`yes \u2014 ${Zc(Wt)}`,replace:!0,...en!==null?{trust:en}:{}}}}}}let Vx=X(l,L),Sf=f.filter(G=>Vx.has(G.subject)).sort(p),_n=L.trim(),Ks=nn(w[2]).trim(),qx=[...O].some(G=>M(G,A,Ee,oe,{maxHops:$N}));if(Sf.length){let G=Sf.slice(0,3).map(re).join("; "),be=qx?`The facts to settle it are here, but the chain is longer than I follow while answering. Run "/syllogise ${_n}", then ask me again.`:`If it's true, teach me: "${_n} is a kind of ${Ks}". If it isn't, teach me: "no ${_n} is a ${Ks}".`;return{text:`I can't confirm that \u2014 nothing I remember says ${_n} is a ${Ks}. I do know: ${G}. ${be}`,replace:!0,miss:!0}}let kf=f.filter(G=>O.has(G.object)&&A.has(G.subject)).sort(p)[0];return kf?{text:`I can't confirm that \u2014 what I know runs the other way: ${re(kf)}. A kind doesn't reverse. If it's true, teach me: "every ${_n} is a ${Ks}". If it isn't, teach me: "no ${_n} is a ${Ks}".`,replace:!0,miss:!0}:!Zt&&!N&&!DL(_n)&&!d.some(G=>O.has(G.subject)||O.has(G.object))?{text:`I can't confirm that \u2014 I don't know "${_n}" at all yet. If it's true, teach me: "${_n} is a kind of ${Ks}". If it isn't, teach me: "no ${_n} is a ${Ks}".`,replace:!0,miss:!0}:null}let v=c.match(QN);if(v){let[,A,L,O]=v,{SUBCLASS_PREDICATE:N,ON_PROPERTY_PREDICATE:M,buildCardinalityRestrictions:z,proveCardinalityAtLeast:H,CARDINALITY_RULE_CONFIDENCE:Q,entailedTrustFrom:ae}=await Promise.resolve().then(()=>(Xt(),fn)),te=_o,ee=f.filter(ne=>ne.predicate===N&&te(ne)).map(ne=>[ne.subject,ne.object]),Y=d.filter(ne=>(ne.predicate===M||ex.has(ne.predicate))&&te(ne)),J=z(Y);if(J.length){let ne=X(l,A.trim()),Ee=X(l,O.trim()),Te=Number(L),ue=Hv(ne,Ee,(Ce,Oe)=>H(ee,J,Ce,Oe,Te,{}));if(ue){let Ce=d.find(se=>se.predicate===N&&se.subject===ue.viaClass&&se.object===ue.viaRestriction),Oe=Ce?.provenance?` (source: ${Jn(Ce.provenance)})`:"",oe=ue.kind==="exactly"?"exactly":"at least",ke=(se,He)=>`${se}${He===1?"":"s"}`,le=[Ce?.trust,...Y.filter(se=>se.subject===ue.viaRestriction).map(se=>se.trust),...ue.viaClass!==ue.subject?[f.find(se=>se.predicate===N&&se.subject===ue.subject&&se.object===ue.viaClass)?.trust]:[]].filter(se=>typeof se=="number"),q=ae(le,Q);return{text:`yes \u2014 every ${ue.viaClass} has ${oe} ${ue.n} ${ke(ue.object,ue.n)}${Oe}, so at least ${Te} follows.`,replace:!0,...q!==null?{trust:q}:{}}}}}let k=c.match(ZN);if(k){let[,A,L]=k,{SUBCLASS_PREDICATE:O,ON_PROPERTY_PREDICATE:N,buildCardinalityRestrictions:M,proveMaxCardinalityZeroDenial:z,CAX_MAXC0_RULE_CONFIDENCE:H,entailedTrustFrom:Q}=await Promise.resolve().then(()=>(Xt(),fn)),ae=_o,te=f.filter(J=>J.predicate===O&&ae(J)).map(J=>[J.subject,J.object]),ee=d.filter(J=>(J.predicate===N||ex.has(J.predicate))&&ae(J)),Y=M(ee);if(Y.length){let J=X(l,A.trim()),ne=X(l,L.trim()),Ee=Hv(J,ne,(Te,ue)=>z(te,Y,Te,ue,{}));if(Ee){let Te=d.find(oe=>oe.predicate===O&&oe.subject===Ee.viaClass&&oe.object===Ee.viaRestriction),ue=Te?.provenance?` (source: ${Jn(Te.provenance)})`:"",Ce=[Te?.trust,...ee.filter(oe=>oe.subject===Ee.viaRestriction).map(oe=>oe.trust),...Ee.viaClass!==Ee.subject?[f.find(oe=>oe.predicate===O&&oe.subject===Ee.subject&&oe.object===Ee.viaClass)?.trust]:[]].filter(oe=>typeof oe=="number"),Oe=Q(Ce,H);return{text:`no \u2014 every ${Ee.viaClass} has at most 0 ${Ee.object}${ue}.`,replace:!0,...Oe!==null?{trust:Oe}:{}}}}}let $=c.match(e0);if($){let A=X(l,$[1]),L=d.filter(O=>O.predicate===Yp&&A.has(O.subject)).sort(p);return L.length?h(L):null}let x=u.match(t0);if(x){let[,A,L]=x,O=X(l,A.trim()),N=X(l,L.replace(/^an?\s+/i,"").trim()),M=d.filter(z=>z.predicate===Yp&&N.has(z.subject)&&O.has(z.object)).sort(p)[0];return M?{text:`yes \u2014 ${re(M)}`,replace:!0}:{text:`no \u2014 no remembered fact says ${A.trim().toLowerCase()} owns/maintains ${L.trim()}.`,replace:!0}}let E=u.match(n0);if(E){let[,A,L]=E,O=X(l,A.replace(/^an?\s+/i,"").trim()),N=X(l,L.trim()),M=d.filter(z=>z.predicate===Yp&&O.has(z.subject)&&N.has(z.object)).sort(p)[0];return M?{text:`yes \u2014 ${re(M)}`,replace:!0}:{text:`no \u2014 no remembered fact says ${A.trim().toLowerCase()} is owned by ${L.trim()}.`,replace:!0}}let S=u.match(s0);if(S){let[,A,L]=S,O=X(l,A.trim()),N=X(l,`${L.trim()} method`),M=d.filter(z=>z.predicate===gr&&O.has(z.subject)&&N.has(z.object)).sort(p)[0];return M?{text:`yes \u2014 ${re(M)}`,replace:!0}:null}let _=u.match(o0);if(_){let A=X(l,_[1].trim()),L=d.filter(O=>O.predicate===gr&&A.has(O.subject)&&/ method$/.test(O.object)).sort(p);return L.length?h(L):null}let R=u.match(tx);if(R){let A=R[1].trim(),L=sx.test(A)||nx.test(A)?null:vs.test(A)?r||null:A,O=R[2].trim().toLowerCase();if(L){let N=X(l,L),M=new Map,z=null;if(o){let Y=await Oi(o,L);if(z=Y,Y)for(let J of tl(o,Y.id))for(let ne of X(l,J.label))!N.has(ne)&&!M.has(ne)&&M.set(ne,J.label),N.add(ne)}let H=Y=>Y.predicate===Xp&&l(Y.object)===O||Y.predicate===`tmct:${O}`&&Y.object==="true",Q=l(L).split(/\s+/).filter(Y=>Y.length>=4&&!bx.has(Y)),ae=Y=>Q.some(J=>new Set(String(Y.subject||"").split(/\s+/)).has(J)),te=Y=>N.has(Y.subject)||Q.length&&ae(Y),ee=d.filter(Y=>te(Y)&&H(Y)).sort(p)[0];if(ee){let Y=M.get(ee.subject);return{text:Y?`yes \u2014 the code graph says ${z.label} inherits ${Y}, and ${re(ee)}`:`yes \u2014 ${re(ee)}`,replace:!0}}{let{findIsaChain:Y,SUBCLASS_PREDICATE:J,TYPE_PREDICATE:ne}=await Promise.resolve().then(()=>(Xt(),fn)),Ee=_o,Te=d.filter(le=>le.predicate===J&&Ee(le)),ue=d.filter(le=>le.predicate===ne&&Ee(le)),Ce=Te.map(le=>[le.subject,le.object]),Oe=ue.map(le=>[le.subject,le.object]),oe=le=>(le.predicate===J?Te:ue).find(q=>q.subject===le.subject&&q.object===le.object),ke=X(l,O);for(let le of N){let q=Y(le,ke,Oe,Ce,{maxHops:2});if(!q)continue;let se=q.map(oe);if(se.every(Boolean))return{text:`yes \u2014 ${Zc(se)}`,replace:!0}}}if(d.some(te)&&!n?.parsed)return/^there\b/i.test(L)||r0.test(O)?null:{text:`I don't have a fact saying ${hN(L)} is ${O}.`,replace:!0};if(!n?.parsed&&!Wv.test(O))return ox(L,O)}}let I=pf(c).match(JL);if(I&&!ef.test(c)){let[,A,L,O]=I,N=L.toLowerCase();if(!Zp.test(N)&&!nf.test(N)){let M=A.trim(),z=eN(await tf(N),O),H=z.object.replace(/^an?\s+/i,"").trim();if(M&&H){let Q=z.predicate,ae=X(l,M),te=X(l,H),ee=[Q,rr(Q)],Y=d.filter(ne=>ee.includes(ne.predicate)&&ae.has(ne.subject)&&te.has(ne.object)).sort(p)[0];if(Y)return{text:`${Hg(Y.predicate)?"no":"yes"} \u2014 ${re(Y)}`,replace:!0,generalVerbQuery:!0};let J=d.filter(ne=>ee.includes(ne.predicate)&&ae.has(ne.subject));if(J.length){let ne=J.slice(0,3).map(re).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${Bt({subject:M,predicate:Q,object:H})}. I do know: ${ne}.`,replace:!0,miss:!0}}return null}}}let P=c.match(QL);if(P&&!ef.test(c)){let[,A,L]=P,[O,N]=L.toLowerCase().split(/\s+/);if(!Zp.test(O)&&!nf.test(O)){let M=A.trim();if(M){let z=await tf(O);N&&/^mgx:[a-z]+$/.test(z)&&(z=`${z}-${N}`);let H=X(l,M),Q=[z,rr(z)],ae=Je(d.filter(te=>Q.includes(te.predicate)&&H.has(te.subject)),i);if(ae.length)return{...h(ae),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&&!ef.test(c)){let[,A,L,O]=T,N=A.toLowerCase();if(!Zp.test(N)&&!nf.test(N)&&!XL.test(N)){let M=await tf(N);/^mgx:[a-z]+$/.test(M)&&(M=`${M}-${L.toLowerCase()}`);let z=X(l,O.replace(/^(?:an?|the)\s+/i,"").trim()),H=Je(d.filter(Q=>Q.predicate===M&&z.has(Q.object)),i);if(H.length)return{...h(H),generalVerbQuery:!0}}}let F=c.match(XN);if(F){let A=X(l,F[1]),L=Je(d.filter(Q=>A.has(Q.subject)||A.has(Q.object)),i);if(!L.length)return null;let O=A.has(L[0].subject)?L[0].subject:L[0].object,N=L.map(Q=>` ${re(Q)}`),M=N.slice(0,ve),z=N.slice(ve),H=z.length?`
|
|
229
229
|
\u2026and ${z.length} more \u2014 say 'more' to see them.`:"";return{text:`${L.length} remembered fact${L.length===1?"":"s"} about ${O}:
|
|
230
230
|
${M.join(`
|
|
231
|
-
`)}${H}`,replace:!0,...z.length?{pending:{items:z.map(Q=>Q.trim()),noun:"facts"}}:{}}}let U=n?.parsed?.shape==="meta"?n.parsed.object:null,K=!1,ce=c.match(XN);if(ce)U=ce[1],K=!0;else if(!U&&!n?.parsed){let A=c.match(/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i);A&&(U=A[1])}if(!U)return null;let ie=X(l,U),D=Je(f.filter(A=>ie.has(A.subject)),i),B=Je(f.filter(A=>ie.has(A.object)),i),W=K?D.length?D:B:B.length?B:D;return W.length?h(W):null}function rf(e){let t=e.sourceTypes||[];return t.length===0||t.some(n=>n!=="corpusWeak")}var hf,DL,wn,Qc,zv,rx,h4,zL,m4,Uv,UL,g4,ix,ax,cx,BL,Bv,b4,w4,y4,$4,v4,gf,x4,WL,Be,Yp,Xp,Li,GL,_o,E4,S4,k4,j4,R4,_4,T4,A4,I4,C4,O4,L4,N4,P4,M4,F4,D4,z4,Wv,HL,ol,KL,U4,B4,wf,lx,W4,G4,V4,Zp,ef,YL,q4,XL,JL,nf,QL,eN,H4,ux,dx,tN,K4,Y4,px,X4,J4,Q4,nN,Z4,sN,jr,eX,tX,nX,fx,sX,oX,oN,rX,iX,aX,cX,To,Gv,yf,Bt,iN,cN,lN,el,hN,bx,lX,lf,wx,mN,gN,sl,bN,wN,Hs,Xn,yN,$N,vN,df,Kv,xN,ve,SN,kN,jN,RN,_N,TN,AN,IN,CN,ON,LN,NN,PN,MN,Xv,$x,DN,zN,BN,WN,GN,VN,qN,Zv,HN,YN,XN,JN,QN,ex,ZN,e0,t0,n0,s0,tx,vs,o0,nx,sx,ox,r0,a0,c0,uX,Sx,u0,d0,dX,af,ff,p0,pX,fX,kx,hX,mX,gX,bX,wX,rl,yX,$X,vX,xX,f0,EX,SX,Jc=C(()=>{We();Ay();Vt();Ie();Pn();gc();bc();Nr();wc();zy();Ue();Ia();op();Gy();On();vn();qo();ua();Xd();Jd();Wo();Ws();Bl();yr();r$();l$();p$();wp();f$();yp();h$();m$();Oc();Ac();pc();xr();rv();cv();Vs();Nv();da(void 0);la(mc);hf=new Set(["it","this","that","here"]),DL=e=>hf.has(String(e||"").trim().toLowerCase()),wn={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"},Qc=e=>e?`${String(e).toLowerCase()}(s)`:"entities",zv="look up a taught fact about a subject/verb/object";rx={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}},h4=new Set(["stats","memory","focus",...Object.keys(rx)]),zL=new Set(["have","has","holds","hold"]),m4=new RegExp(`\\b(?:${[...Object.keys(de),...Object.keys(Ss)].filter(e=>!zL.has(e)).sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})\\b`,"i"),Uv=e=>`${e.subject} ${e.predicate} ${e.object} ${e.provenance||""}`,UL=(e,t)=>{let n=Uv(e),s=Uv(t);return n<s?-1:n>s?1:0},g4=new Set([...Ty.map(e=>e.name),...Object.values(rx).map(e=>e.tool)]),ix=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"]),ax=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"]),cx=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"]),BL=new Set(["ok","okay","cool","aight","fair enough","got it","gotcha","noted","sounds good","sure","cool cool","right","haha ok fair enough"]),Bv=e=>e.replace(/(.)\1+/g,"$1");b4=mf(ix),w4=mf(ax),y4=mf(cx),$4=new RegExp(`^(?:${[...BL].map(Ke).join("|")})\\s+(.+)$`,"i"),v4=[...ix,...ax,...cx,"what can you do","what do you do","help","how do you work","who are you","what are you","what is your name"],gf="(?:[a-z]+er|better|worse|(?:more|less)\\s+[a-z]+)",x4=new RegExp(`^(?:the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(?:is|are)\\s+(${gf})\\s+than\\s+(.+)$`,"i"),WL=new RegExp(`^(?:is|are)\\s+(.+?)\\s+(${gf})\\s+than\\s+(.+?)[?.!\\s]*$`,"i"),Be="on|in|at|onto|upon|under|over|beside|near|behind|above|below|inside|outside",Yp="mgx:ownedBy",Xp="mgx:hasProperty",Li="rdfs:subClassOf",GL=new Set(["operator","teach","entailed"]),_o=e=>!!e.sourceTypes?.some(t=>GL.has(t));E4=new RegExp(`^you\\s+(?:can|may)\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Be})\\s+an?\\s+([a-z][\\w-]*)[.!?]*$`,"i"),S4=new RegExp(`^an?\\s+([a-z][\\w-]*)\\s+(?:can|may)\\s+be\\s+([a-z]+)\\s+(${Be})\\s+an?\\s+([a-z][\\w-]*)[.!?]*$`,"i"),k4=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Be})\\s+an?\\s+([a-z][\\w-]*)\\s*,?\\s*nothing\\s+may\\s+([a-z]+)\\s+(${Be})\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),j4=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Be})\\s+an?\\s+([a-z][\\w-]*)\\s*,?\\s*the\\s+([a-z][\\w-]*)\\s+must\\s+be\\s+(${gf})\\s+than\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),R4=new RegExp(`^([a-z]+ing)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Be})\\s+an?\\s+([a-z][\\w-]*)\\s+makes\\s+(?:it|the\\s+([a-z][\\w-]*))\\s+([a-z]+)\\s+(${Be})\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),_4=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Be})\\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");T4=new RegExp(`^the\\s+goal\\s+is\\s+that\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+([a-z]+s)\\s+(${Be})\\s+([\\w-]+)[.!?]*$`,"i"),A4=new RegExp(`^(?:the\\s+goal\\s+is\\s+for|i\\s+want)\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+to\\s+([a-z]+)\\s+(${Be})\\s+([\\w-]+)[.!?]*$`,"i"),I4=new RegExp(`^(?:the\\s+goal\\s+is\\s+for|i\\s+want)\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+(${Be})\\s+([\\w-]+)[.!?]*$`,"i"),C4=new RegExp(`^(?:can|could)\\s+you\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Be})\\s+an?\\s+([a-z][\\w-]*)[?.!]*$`,"i"),O4=new RegExp(`^(?:get|put|place|stack)\\s+(?:(every|each|all|both)\\s+)?(?:the\\s+)?([\\w-]+?)\\s+(${Be})\\s+([\\w-]+)[?.!]*$`,"i"),L4=new RegExp(`^the\\s+goal\\s+is\\s+(?:(every|each|all|both)\\s+)?(?:the\\s+)?([\\w-]+?)\\s+(${Be})\\s+([\\w-]+)[?.!]*$`,"i"),N4=new RegExp(`^(?:(every|each|all)\\s+)?([\\w-]+)\\s+([a-z]+s)\\s+(${Be})\\s+([\\w-]+)$`,"i"),P4=new RegExp(`^(?:and\\s+|so\\s+|but\\s+)?what\\s+if\\s+([\\w-]+)\\s+(?:had\\s+)?(?:started|start|starts|begun|began|begins|was|were|is|had\\s+been|rested|rests|sat|sits|stood|stands|lay|lies|lain)(?:\\s+(?:out|off))?\\s+(?:${Be})\\s+([\\w-]+)(?:\\s+(?:instead|initially|to\\s+start\\s+with|at\\s+the\\s+start|from\\s+the\\s+start|at\\s+the\\s+beginning))?[?.!\\s]*$`,"i"),M4=new RegExp(`^(?:and\\s+|so\\s+|but\\s+)?why\\s+(?:did\\s+you\\s+|do\\s+you\\s+|would\\s+you\\s+)?(?:choose\\s+to\\s+|decide\\s+to\\s+)?([a-z]+)\\s+([\\w-]+)(?:\\s+(?:${Be})\\s+([\\w-]+))?(?:\\s+(?:first|initially|at\\s+the\\s+start|to\\s+start(?:\\s+with)?|to\\s+begin(?:\\s+with)?))?\\s+(?:instead\\s+of|rather\\s+than|and\\s+not|not)\\s+([\\w-]+)[?.!\\s]*$`,"i"),F4=new RegExp(`^(?:and\\s+|so\\s+|but\\s+)?why\\s+(?:not|didn'?t\\s+you|did\\s+you\\s+not|couldn'?t\\s+you)\\s+([a-z]+)\\s+([\\w-]+)(?:\\s+(?:${Be})\\s+([\\w-]+))?(?:\\s+(?:first|initially|at\\s+the\\s+start|to\\s+start(?:\\s+with)?))?[?.!\\s]*$`,"i"),D4=new RegExp(`^(?:what|who)\\s+([a-z']+)\\s+(${Be})\\s+(.+?)[?.!\\s]*$`,"i"),z4=new RegExp(`^what\\s+(?:does|do|is)\\s+([\\w-]+)\\s+([a-z]+)(?:\\s+(${Be}))?[?.!\\s]*$`,"i"),Wv=/^(?:anywhere|everywhere|nowhere|somewhere)$/i,HL=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"]);ol="(?:(?:usually|often|sometimes|rarely|always|typically|generally|occasionally|frequently|normally|regularly|commonly|mostly|currently|still|also|really|actually|closely|strongly|directly)\\s+)?",KL="(?:cannot|can't|can not|does not|doesn't|do not|don't|never)",U4=new RegExp(`^(.+?)\\s+(${KL})\\s+(.+)$`,"i"),B4=new RegExp(`^([\\w'-]+)\\s+${ol}([a-z]+)\\s+(.+?)[.!?]*$`,"i"),wf="connected|related|associated|linked|based|derived|composed|made|used|known|located|found|involved|concerned",lx="with|to|from|by|of|in|on|for|as|about|into",W4=new RegExp(`^(?:the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(?:is|are|was|were)\\s+${ol}(${wf})\\s+(${lx})\\s+(.+)$`,"i"),G4=new RegExp(`^(the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(is|are|was|were)\\s+(?:an?\\s+)?([\\w'-]+)\\s+(${wf})\\s+(${lx})\\s+(.+)$`,"i"),V4=new RegExp(`^(?:the\\s+|an?\\s+)([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+([a-z]+)\\s+(${Be})\\s+(.+?)[.!?]*$`,"i"),Zp=/^(?:is|are|am|owns|maintains)$/i,ef=/\b(?:is|are|am|owns|maintains)\b/i,YL=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"),q4=new RegExp(`^(?:${to.filter(e=>!/\s/.test(e)).join("|")})$`,"i");XL=new RegExp(`^(?:does|did)\\s+([\\w'-]+)\\s+${ol}([a-z]+)\\s+(.+?)[?.!\\s]*$`,"i"),JL=new RegExp(`^what\\s+(?:does|did)\\s+([\\w'-]+)\\s+${ol}([a-z]+(?:\\s+(?:${Be}))?)[?.!\\s]*$`,"i"),nf=/^(?:be|own|maintain)$/i,QL=new RegExp(`^(${Be})\\s+(.+)$`,"i");eN=["first","second","third","then","next","finally","later","meanwhile","afterward","afterwards"],H4=new RegExp(`^(?:${eN.join("|")})\\b\\s*,?\\s+`,"i"),ux=Object.freeze(["you","i","it","they","he","she","we"]),dx=Object.freeze(["you're","i'm","it's","they're","he's","she's","we're"]),tN=Object.freeze([...dx,...ux]),K4=new RegExp(`^(?:every\\s+|each\\s+|all\\s+|some\\s+|a few\\s+|a\\s+|an\\s+)?(${tN.join("|")})\\s+\\S+`,"i"),Y4=new RegExp(`^(?:every\\s+|each\\s+|all\\s+|some\\s+|a few\\s+|a\\s+|an\\s+)?(?:(${ux.join("|")})\\s+(?:is|are|am|was|were)|(${dx.join("|")}))\\s+(?:an?\\s+)?[\\w'-]+[.!?]*$`,"i"),px="forget|unlearn|delete|remove",X4=new RegExp(`^(?:${px})\\s+(?:that\\s+)?(?:a\\s+|an\\s+)?([\\w-]+(?:\\s+[\\w-]+)?)\\s+(?:is|are)\\s+(?:an?\\s+)?(?:(?:kind|type)\\s+of\\s+)?([\\w-]+)$`,"i"),J4=new RegExp(`^([\\w-]+)\\s+([a-z]+)s\\s+(${Be})\\s+([\\w-]+)$`,"i"),Q4=new RegExp(`^(?:${px})\\s+(?:that\\s+)?([\\w-]+)\\s+([a-z]+)s\\s+(${Be})\\s+([\\w-]+)$`,"i"),nN="collection|set|group|family",Z4=new RegExp(`^(?:the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(?:is|are)\\s+an?\\s+(?:${nN})\\s+of\\s+(?:the\\s+)?([\\w'-]+)[.!?]*$`,"i"),sN=Object.freeze(["mgx:memberOf","mgx:partOf"]),jr="(?:\\s+(?:exactly|really|actually|truly|anyway|internally|properly))?",eX=new RegExp(`^what\\s+does\\s+(.+?)${jr}\\s+do${jr}\\??$`,"i"),tX=new RegExp(`^what\\s+(.+?)${jr}\\s+does${jr}\\??$`,"i"),nX=new RegExp(`^what(?:'s|s|\\s+is)\\s+(.+?)${jr}\\s+do${jr}\\??$`,"i"),fx="([A-Za-z][\\w'.-]*(?:\\s+[A-Za-z][\\w'.-]*){0,3})",sX=new RegExp(`^who\\s+(?:is|was)\\s+${fx}$`,"i"),oX=new RegExp(`^what\\s+(?:did|has)\\s+${fx}\\s+(?:touch(?:ed)?|chang(?:e|ed)|work(?:ed)?\\s+on|commit(?:ted)?)$`,"i"),oN="(?:good|bad|clean|messy|ugly|nice|great|terrible|awful|solid|elegant|readable|maintainable|well[- ]written|well[- ]structured|spaghetti|ok|okay|decent|healthy)",rX=new RegExp(`^is\\s+(?:this|the)\\s+code(?:base)?\\s+(?:any\\s+)?${oN}\\b`,"i"),iX=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"),aX=Object.freeze({game:["higher","lower","warmer","colder","hotter","up","down","guess"],spiderFly:["watch","step","tick","move","board","web"],adventure:["help","xyzzy","wait","hint","plugh"]});cX=new Set([...Object.keys(de).flatMap(e=>e.split(/[\s-]+/)),...tn,...$n,"owns","maintains"].filter(e=>e.length>=3)),To={"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:memberOf":"is a member of","mgx:collectionOf":"is a collection 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"},Gv=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"]),yf=new Set(["mgx:currently-in","mgx:located-in","mgx:fixed-in","mgx:stands-locked-in","mgx:works-in"]);Bt=e=>`${e.subject} ${mx(e.predicate)} ${e.object}`;iN=Object.entries(To).filter(([e])=>!yf.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);cN=/ \(source: [^)]*\)$/;lN=8;el=null;hN=/^(?:every|each|all|any)\s+/i;bx=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"]),lX=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("|"))),lf=/^(?: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,wx=/^(?:who|what)\s+(?:is|are)\s+(?:the|an?)\s+([a-z][\w-]*)\s+of\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,mN=/^(?:who|what)\s+(?:is|are|was|were)\s+([\w-]+(?:\s+[A-Z][\w-]*)?)'s\s+([a-z][\w-]*)[?.!\s]*$/i,gN=/^(who|what)'?s\s+/i,sl=e=>String(e).replace(gN,(t,n)=>`${n} is `),bN=/^(?:who|what)\s+(?:is|are|was|were)\s+([\w-]{2,}?)s\s+([a-z][\w-]*)[?.!\s]*$/i;wN=/^list\s+(?:the\s+|all\s+)?([a-z][\w-]*)\s+of\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,Hs=/^(?:is|are)\s+(?:an?\s+)?(.+?)\s+(?:a\s+kind\s+of|a\s+type\s+of|an?)\s+(.+?)[?.!\s]*$/i,Xn=new Set(["rdfs:subClassOf","rdf:type"]),yN=6,$N=/^why\s+(?=(?:is|are)\b)/i,vN=/^explain\s+how\s+you\s+know\s+(?:that\s+)?(.+?)\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i;df=new Set(["kind","sort","type","subclass","superclass"]),Kv=/^(?:so\s+)?(.+?)\s+(?:is|are)\s+(?:an?\s+)?(.+?)\s*,?\s*(?:now\s+)?(?:right|correct|yeah)\??$/i,xN=/^(?: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,ve=32;SN=/^(?:can|could)\s+(all\s+|every\s+)?(?:an?\s+)?([\w'-]+(?:\s+[\w'-]+)*?)\s+([a-z]+)[?.!\s]*$/i,kN=/^(?:does|do)\s+(?:an?\s+|the\s+)?(.+?)\s+have\s+(?:an?\s+|the\s+)?(.+?)[?.!\s]*$/i,jN=/^what\s+can\s+(?:an?\s+)?(.+?)\s+do[?.!\s]*$/i,RN=/^what\s+has\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,_N=/^what\s+(?:(?:can\s+be|is)\s+used\s+for|is\s+for)\s+(.+?)[?.!\s]*$/i,TN=/^where(?:'s|\s+is|\s+are)\s+(.+?)(?:\s+now)?\s*[?.!]*$/i,AN=/^where\s+(?:does|do|did)\s+(.+?)\s+[a-z][a-z'-]*(?:\s+now)?\s*[?.!]*$/i,IN=new RegExp(`^what(?:'s|\\s+is|\\s+are)\\s+(${Be})\\s+(.+?)\\s*[?.!]*$`,"i"),CN=/^what(?:'s|\s+is|\s+are)\s+(?:the\s+)?(parts|members|contents)\s+of\s+(?:the\s+|an?\s+)?(.+?)\s*[?.!]*$/i,ON=/^what\s+([a-z][\w-]*)\s+(?:does|do)\s+(?:an?\s+|the\s+)?(.+?)\s+([a-z][a-z-]*)\s*[?.!]*$/i,LN=/^(?:do|does)\s+(all\s+|every\s+)?(?:an?\s+|the\s+)?([\w'-]+(?:\s+[\w'-]+)*?)\s+([a-z-]+)[?.!\s]*$/i,NN=/^what\s+can\s+(?!be\s)(.+?)[?.!\s]*$/i,PN=/^what\s+(?:cannot|can't|cant|can\s+not)\s+(.+?)[?.!\s]*$/i,MN=/^(?:which|what)\s+([\w'-]+(?:\s+[\w'-]+)*?)\s+can\s+(.+?)[?.!\s]*$/i;Xv=e=>String(e||"").replace(/\s+/g," ").trim();$x="(?:most|least)\\s+[a-z][\\w-]*|[a-z][\\w-]*est|best|worst",DN=new RegExp(`^which\\s+([\\w'-]+)\\s+(?:is|are)\\s+(?:the\\s+)?(${$x})[?.!\\s]*$`,"i"),zN=new RegExp(`^what(?:'s|s|\\s+is)\\s+the\\s+(${$x})\\s+([\\w'-]+)[?.!\\s]*$`,"i");BN=new Set(["rdfs:subClassOf","rdf:type","mgx:hasA","mgx:capableOf","mgx:usedFor","mgx:ownedBy","owl:disjointWith","mgx:hasProperty","mgx:receivesAction"]),WN=Object.entries(To).filter(([e])=>!BN.has(e)&&!yf.has(e)).map(([e,t])=>({predicate:e,re:new RegExp(`^what\\s+${Ke(t)}\\s+(.+?)[?.!\\s]*$`,"i")})).sort((e,t)=>t.re.source.length-e.re.source.length),GN=new Set(["rdfs:subClassOf","rdf:type","owl:disjointWith","mgx:hasProperty","mgx:hasA","mgx:capableOf","mgx:ownedBy"]),VN=new Set(["mgx:partOf","mgx:memberOf"]),qN=Object.entries(To).filter(([e])=>!GN.has(e)&&!yf.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=Ke(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=[hx(s),...o].map(Ke).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),Zv=/^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,HN=new Set(["changed","change","changes","updated","modified","happened","occurred"]);YN=/^what\s+(?:did|have)\s+(?:i|we|you)\s+(?:told|tell|said|say)\s+(?:you|me|us)?\s*about\s+(.+?)[?.!\s]*$/i,XN=/^what\s+kind\s+of\s+(?:thing|class|type|category|entity)?\s*(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,JN=/^does\s+every\s+(.+?)\s+have\s+at\s+least\s+(\d+)\s+(.+?)[?.!\s]*$/i,QN=/^does\s+an?\s+(.+?)\s+have\s+an?\s+(.+?)[?.!\s]*$/i,ex=new Set(["owl:cardinality","owl:minCardinality","owl:maxCardinality","owl:onClass"]),ZN=/^who\s+(?:owns|maintains)\s+(.+?)[?.!\s]*$/i,e0=/^(?:does|did)\s+([\w'-]+)\s+(?:owns?|maintains?)\s+(.+?)[?.!\s]*$/i,t0=/^(?:is|are|was|were)\s+(.+?)\s+owned\s+by\s+([A-Za-z][\w'-]*(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,n0=/^(?:does|did)\s+([\w'-]+)\s+(?:has|have)\s+an?\s+([a-z][\w-]*)\s+method[?.!\s]*$/i,s0=/^what\s+methods\s+does\s+([\w'-]+)\s+have[?.!\s]*$/i,tx=/^(?:is|are|was|were)\s+(.+?)\s+([A-Za-z][\w-]*)[?.!\s]*$/i,vs=/^(?:it|this|that)$/i,o0=/^(?:it|them|this|that|in|on|of|to|at)$/i,nx=/^(?:it|this|that)(?:\s+one)?\s+(?:before|after)\b/i,sx=/^(?:you|i|they|he|she|we)\b/i,ox=(e,t)=>({text:`I don't know anything about "${e}" yet \u2014 teach me directly, e.g. "remember that ${nl(e)} is ${t}".`,replace:!0}),r0=/^(?: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;a0=/inherit|supertype|subclass|extend|specializ/i,c0=8;uX=new RegExp(`\\b(?:${[...hf].join("|")})\\b`,"i"),Sx=/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,u0=/^who\s+(?:is|are|was|were)\s+(?:an?\s+|the\s+)?([\w'-]+)[?.!\s]*$/i,d0=/^(?:please\s+|can\s+you\s+|could\s+you\s+)*(?:define|definition\s+of|give\s+me\s+the\s+definition\s+of)\s+(?:the\s+(?:term|word)\s+)?(?:an?\s+|the\s+)?(.+?)[?.!\s]*$/i;dX=new RegExp(`^(?:(?:the|a|an)\\s+)?(.+?)\\s+(${Object.keys(Ge).join("|")})$`,"i"),af="(?:(?:can|could|would)\\s+you\\s+(?:please\\s+)?)?(?:(?:show|give)\\s+(?:me|us)\\s+|describe\\s+|explain\\s+|what(?:'s|s|\\s+is)\\s+)?",ff="(?:of|for)\\s+(?:this|the)\\s+(?:app|codebase|repo|repository|project|code)",p0=`(?:\\s+${ff})?`,pX=[new RegExp(`^${af}the\\s+architecture(?:\\s+(?:overview|map|diagram))?${p0}(?:\\s+here)?\\??$`,"i"),new RegExp(`^${af}architecture\\s+(?:${ff}|overview|map|diagram)\\??$`,"i"),new RegExp(`^${af}(?:(?:an?|the)\\s+)?(?:overview|map|diagram)\\s+${ff}(?:\\s+here)?\\??$`,"i")],fX={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:wn.contains,subclasses:wn.inherits,impact:"understand what a change to this module would reach (impact closure)",callers:wn.calls,callees:wn.calls,tests:wn.tests,untested:wn.tests,history:wn.touches,exports:wn.reexports,arch:"understand the overall architecture (package/module boundaries)",capabilities:"see what /plan can plan over \u2014 built-in query tools and taught actions",goals:"see the declared goals a trace is recognized against, and where each one came from",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",wikipedia:"choose which source the research lane fetches from",wikidata:"choose which source the research lane fetches from",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"},kx="(?:changed?|modif(?:y|ied)|edits?|edited|touch(?:es|ed)?|updates?|updated|alters?|altered|deletes?|deleted|removes?|removed|drops?|dropped)",hX=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+${kx}\\s+(?:the\\s+)?(.+?)[?.!\\s]*$`,"i"),mX=new RegExp(`^if\\s+(?:i|we|you|one|someone)\\s+${kx}\\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"),gX=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"),bX=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"),wX=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"),rl="as\\s+(?:its|the|an?)?\\s*(?:base\\s+class|parent\\s+class|base|parent)",yX=new RegExp(`^(.+?)\\s+uses?\\s+(?:which\\s+[\\w'-]+|what)\\s+${rl}\\s*\\??$`,"i"),$X=new RegExp(`^what\\s+(?:does|do|did)\\s+(.+?)\\s+uses?\\s+${rl}\\s*\\??$`,"i"),vX=new RegExp(`^(?:does|do|did)\\s+(.+?)\\s+uses?\\s+(.+?)\\s+${rl}\\s*\\??$`,"i"),xX=new RegExp(`^(.+?)\\s+uses?\\s+(.+?)\\s+${rl}\\s*[.!]*$`,"i"),f0=Object.freeze([...hf].filter(e=>e!=="here").concat("they")),EX=new RegExp(`^((?:is|are|can|could|does|do)\\s+|what\\s+(?:is|are)\\s+)(${f0.join("|")})\\b(\\s+\\S.*)?$`,"i"),SX=Z(".tmct","memory","corpus-seed.json")});Jc();Ue();ns();Oc();var il={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 _x=Object.freeze({"rdfs:subClassOf":"isa","rdf:type":"isa","mgx:atLocation":"location","mgx:locatedNear":"location","mgx:partOf":"partOf","mgx:memberOf":"partOf","mgx:capableOf":"capableOf","mgx:usedFor":"usedFor"}),Ao=Object.freeze(["isa","location","partOf","capableOf","usedFor","other"]),al=e=>_x[e]||"other",m0=e=>Math.max(0,Math.min(1,e));function jx(e){let t=(e.sourceTypes||[]).map(n=>so[n]??0);return t.length?Math.max(...t):typeof e.trust=="number"&&e.trust>0?e.trust:so.entailed}function g0(e){return Array.isArray(e.environments)&&e.environments.length?!0:(e.sourceTypes||[]).includes("entailed")}function Rx(e,t){let n=Number(t?.totalSubjects)||0;return n<=0?0:(Number(t?.classSubjectCounts?.[e])||0)/n}function Tx(e,t,n={},s={}){let o={...il,...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(al($.predicate)==="isa"){let x=Rx($.object,n);if(l&&x>o.uninformativeClassMaxShare){a.push({row:$,family:"isa",reason:"uninformative-class",share:x});continue}}c.push($)}let u=c.filter($=>al($.predicate)==="isa").map($=>$.object),d=Cc(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(_=>_.object===E&&al(_.predicate)==="isa");x+=S?jx(S):0}f.set($.label,x)}let h=null,m=-1;for(let[$,x]of[...f].sort((E,S)=>E[0].localeCompare(S[0])))x>m&&(m=x,h=$);let b=[];for(let $ of c){let x=al($.predicate),E=jx($),S={provenance:E};if(g0($)&&(E-=o.entailedDepthPenalty,S.entailed=!0),x==="isa"){let R=.6+.4*(1-Rx($.object,n));E*=R,S.informativeness=R;let I=p.get($.object);h&&I&&I!==h&&(E-=o.minoritySensePenalty,S.minoritySense=I)}E=m0(E),b.push({row:$,family:x,score:E,reasons:S})}let g=[];for(let $ of b)$.score<o.minScore?a.push({row:$.row,family:$.family,reason:"below-floor",score:$.score}):g.push($);let y=new Map;for(let $ of g)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=Ao.filter($=>y.has($)).concat([...y.keys()].filter($=>!Ao.includes($)).sort()),v=[],k=!1;for(;v.length<r&&!k;){k=!0;for(let $ of w){let x=y.get($);if(x&&x.length&&(v.push(x.shift()),k=!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=Ao.indexOf($.family),S=Ao.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:h}}}ha();Ot();var b0=new Set(["isa","location","partOf","capableOf","usedFor"]),w0=new Set(["single","several","chained","group","closer"]),Ax=(e,t)=>`${e}:${t}`;function $f(e){let t=new Map;for(let n of e||[]){if(!n||typeof n.family!="string"||!b0.has(n.family)||typeof n.form!="string"||!w0.has(n.form)||typeof n.template!="string"||!n.template.trim())continue;let s=Ax(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 Io=e=>`${Ho(e)} ${e}`;function y0(e){let t=(e||[]).map(o=>String(o||"").trim()).filter(Boolean);if(!t.length)return"";let n=Io(t[0]),s=t.slice(1);return s.length?`${n}, and so ${Wr(s.map(Io))}`:n}function $0(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:Ko(o),A_TERM:Io(o),A_TERM_CAP:Ko(Io(o)),TERMS:fa(o),TERMS_CAP:Ko(fa(o)),PRONOUN:"it",PRONOUN_CAP:"It",PARENT:a,A_PARENT:a?Io(a):"",OBJECT:i,A_OBJECT:i?Io(i):"",OBJECTS_A:Wr(r.map(Io)),OBJECTS_PLURAL:Wr(r.map(fa)),OBJECTS_RAW:Wr(r),CHAIN:y0(n&&n.length?n:r.slice(0,1))}}function v0(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 xs(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(Ax(t,i)):null,l=a?a.templates:null;if(!l||!l.length)return null;let c=s.variantSeed??"",u=ka(`${r}|${t}|${i}|${c}`)%l.length,d=s.objectsOverride||o.map(p=>p.object),f=v0(l[u],$0(r,d,s.chain,s.parent));return f?{text:f,rows:o,family:t,form:i}:null}ha();var x0=Ao.filter(e=>e!=="isa"&&e!=="other");function E0(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 Ix(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 S0(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 k0(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 j0(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",h=xs(s,"isa",e,{term:n,form:p,chain:f});return h&&r.push({...h,role:"names-term",paragraph:"definition"}),r}if(e.length<=o.groupSplitThreshold){let f=xs(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=xs(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 S0(a,t))for(let p of Ix(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 h of c.slice(o.maxBodySentences))p.rows=p.rows.concat(h.rows);p.parent=null,c=f}for(let f of c){let p=f.parent?xs(s,"isa",f.rows,{term:n,form:"group",parent:f.parent,variantSeed:f.parent}):xs(s,"isa",f.rows,{term:n,form:"several",variantSeed:n});p&&r.push({...p,role:"describes-isa",paragraph:"definition"})}let{roots:u,rows:d}=k0(t,e,o.closerRootCount);if(u.length){let f=xs(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 R0(e,t){if(!e.length)return;let n=e[0];if(/\bnames-term\b/.test(n.role))return;let s=Ko(`${Ho(t)} ${t}`);n.text=n.text.replace(/^It\b/,s),n.role="names-term"}function _0(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 Cx(e,t,n={}){let s=e?.term||"",o=Number.isInteger(n.maxSentencesPerParagraph)?n.maxSentencesPerParagraph:3,r=n.chains||{},i={...il,...n.config||{}},a=E0(e?.selected||[]),l=[];for(let u of j0(a.get("isa")||[],r,s,t,i))l.push(u);for(let u of x0){let d=a.get(u);if(!(!d||!d.length))for(let f of Ix(d,i.maxObjectsPerBodySentence)){let p=xs(t,u,f,{term:s});p&&l.push({...p,role:"describes",paragraph:"description"})}}R0(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:_0(l,o),provenanceRows:[...c.values()]}}var T0=e=>({subject:e.subject,predicate:e.predicate,object:e.object,sourceTypes:e.sourceTypes||[],provenance:e.provenance||""});function A0(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 I0=Object.freeze({facts:"show the facts",chains:"show the chains"});function C0(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:I0,facts:n.map(T0),factCount:n.length,chains:s}}function Ox(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:A0(t?.provenanceRows||[]),detail:C0(e,n.chains),provenanceRows:t?.provenanceRows||[]}}function Lx(e,t,n={},s=new Map,o={}){let r=Tx(e,t,n,o),i=Cx(r,s,o);return Ox(r,i,o)}Oc();Ac();var Nx=new Set(["rdfs:subClassOf","rdf:type"]);function Px(e){let t=new Map,n=new Set,s=[],o=[];for(let i of e||[])!i||!i.predicate||(Nx.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 Mx(e,t,n=6){let s=Ri(e||[]),o={};for(let r of t||[]){if(r in o)continue;let i=Ic(r,s,{cap:n,stopAt:Tc});i.length>1&&(o[r]=i)}return o}function Fx(e){let t=[],n=new Set;for(let s of e||[])!s||!Nx.has(s.predicate)||n.has(s.object)||(n.add(s.object),t.push(s.object));return t}Ue();Jc();function O0(e,t,n,s,o={}){let r=$f(s||[]);if(!r||r.size===0)return null;let i=t||[],a=Px(n||i),l=Mx(a.subClassEdges,Fx(i));return Lx(e,i,a,r,{...o,chains:l})}function Dx(e,t,n,s={}){let o=ht(e||{individuals:[],objectProperties:[]}),r=X(V,t),i=o.filter(l=>r.has(l.subject));if(!i.length)return null;let a=O0(t,i,o,n,s);return L0(a)}function L0(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 N0="no session is open on this page yet \u2014 await tmct.open() first",zx=Symbol.for("tmct.surface.fallback");function Ux({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[zx])return a;let l=null,c=()=>{if(!l)throw new Error(N0);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[zx]=r,i.tmct=u,u}function P0({payload:e=null}={}){let t=mi();return e&&(t.payload=e),{memoryDir:t}}async function M0(e,t,n){let s=null;try{s=await vx(n.memoryDir,e,null,!0,{})}catch{s=null}if(!(s&&s.text))try{s=await Ex(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}}Ux({open:P0,ask:M0,page:{normFactTerm:V,digestTermFromPayloadBrowser:Dx},fallback:!0});})();
|
|
231
|
+
`)}${H}`,replace:!0,...z.length?{pending:{items:z.map(Q=>Q.trim()),noun:"facts"}}:{}}}let U=n?.parsed?.shape==="meta"?n.parsed.object:null,K=!1,ce=c.match(JN);if(ce)U=ce[1],K=!0;else if(!U&&!n?.parsed){let A=c.match(/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i);A&&(U=A[1])}if(!U)return null;let ie=X(l,U),D=Je(f.filter(A=>ie.has(A.subject)),i),B=Je(f.filter(A=>ie.has(A.object)),i),W=K?D.length?D:B:B.length?B:D;return W.length?h(W):null}function rf(e){let t=e.sourceTypes||[];return t.length===0||t.some(n=>n!=="corpusWeak")}var hf,DL,wn,Qc,zv,rx,m4,zL,g4,Uv,UL,b4,ix,ax,cx,BL,Bv,w4,y4,$4,v4,x4,gf,E4,WL,De,Yp,Xp,Li,GL,_o,S4,k4,j4,R4,_4,T4,A4,I4,C4,O4,L4,N4,P4,M4,F4,D4,z4,U4,Wv,HL,ol,KL,B4,W4,wf,lx,G4,V4,q4,H4,YL,K4,Zp,ef,XL,Y4,JL,QL,nf,ZL,tN,X4,ux,dx,nN,J4,Q4,px,Z4,eX,tX,sN,nX,oN,jr,sX,oX,rX,fx,iX,aX,rN,cX,lX,uX,dX,To,Gv,yf,Bt,aN,lN,uN,el,mN,bx,pX,lf,wx,gN,bN,sl,wN,yN,Hs,Xn,$N,vN,xN,df,Kv,EN,ve,kN,jN,RN,_N,TN,AN,IN,CN,ON,LN,NN,PN,MN,FN,Xv,$x,zN,UN,WN,GN,VN,qN,HN,Zv,KN,XN,JN,QN,ZN,ex,e0,t0,n0,s0,o0,tx,vs,r0,nx,sx,ox,i0,c0,l0,fX,Sx,d0,p0,hX,af,ff,f0,mX,gX,kx,bX,wX,yX,$X,vX,rl,xX,EX,SX,kX,h0,jX,RX,Jc=C(()=>{We();Ay();Vt();Ie();Pn();gc();bc();Nr();wc();zy();Be();Ia();op();Gy();On();vn();qo();ua();Xd();Jd();Wo();Ws();Bl();yr();r$();l$();p$();wp();f$();yp();h$();m$();Oc();Ac();pc();xr();rv();cv();Vs();Nv();da(void 0);la(mc);hf=new Set(["it","this","that","here"]),DL=e=>hf.has(String(e||"").trim().toLowerCase()),wn={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"},Qc=e=>e?`${String(e).toLowerCase()}(s)`:"entities",zv="look up a taught fact about a subject/verb/object";rx={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}},m4=new Set(["stats","memory","focus",...Object.keys(rx)]),zL=new Set(["have","has","holds","hold"]),g4=new RegExp(`\\b(?:${[...Object.keys(de),...Object.keys(Ss)].filter(e=>!zL.has(e)).sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})\\b`,"i"),Uv=e=>`${e.subject} ${e.predicate} ${e.object} ${e.provenance||""}`,UL=(e,t)=>{let n=Uv(e),s=Uv(t);return n<s?-1:n>s?1:0},b4=new Set([...Ty.map(e=>e.name),...Object.values(rx).map(e=>e.tool)]),ix=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"]),ax=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"]),cx=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"]),BL=new Set(["ok","okay","cool","aight","fair enough","got it","gotcha","noted","sounds good","sure","cool cool","right","haha ok fair enough"]),Bv=e=>e.replace(/(.)\1+/g,"$1");w4=mf(ix),y4=mf(ax),$4=mf(cx),v4=new RegExp(`^(?:${[...BL].map(Ke).join("|")})\\s+(.+)$`,"i"),x4=[...ix,...ax,...cx,"what can you do","what do you do","help","how do you work","who are you","what are you","what is your name"],gf="(?:[a-z]+er|better|worse|(?:more|less)\\s+[a-z]+)",E4=new RegExp(`^(?:the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(?:is|are)\\s+(${gf})\\s+than\\s+(.+)$`,"i"),WL=new RegExp(`^(?:is|are)\\s+(.+?)\\s+(${gf})\\s+than\\s+(.+?)[?.!\\s]*$`,"i"),De="on|in|at|onto|upon|under|over|beside|near|behind|above|below|inside|outside",Yp="mgx:ownedBy",Xp="mgx:hasProperty",Li="rdfs:subClassOf",GL=new Set(["operator","teach","entailed"]),_o=e=>!!e.sourceTypes?.some(t=>GL.has(t));S4=new RegExp(`^you\\s+(?:can|may)\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${De})\\s+an?\\s+([a-z][\\w-]*)[.!?]*$`,"i"),k4=new RegExp(`^an?\\s+([a-z][\\w-]*)\\s+(?:can|may)\\s+be\\s+([a-z]+)\\s+(${De})\\s+an?\\s+([a-z][\\w-]*)[.!?]*$`,"i"),j4=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${De})\\s+an?\\s+([a-z][\\w-]*)\\s*,?\\s*nothing\\s+may\\s+([a-z]+)\\s+(${De})\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),R4=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${De})\\s+an?\\s+([a-z][\\w-]*)\\s*,?\\s*the\\s+([a-z][\\w-]*)\\s+must\\s+be\\s+(${gf})\\s+than\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),_4=new RegExp(`^([a-z]+ing)\\s+an?\\s+([a-z][\\w-]*)\\s+(${De})\\s+an?\\s+([a-z][\\w-]*)\\s+makes\\s+(?:it|the\\s+([a-z][\\w-]*))\\s+([a-z]+)\\s+(${De})\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),T4=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${De})\\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");A4=new RegExp(`^the\\s+goal\\s+is\\s+that\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+([a-z]+s)\\s+(${De})\\s+([\\w-]+)[.!?]*$`,"i"),I4=new RegExp(`^(?:the\\s+goal\\s+is\\s+for|i\\s+want)\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+to\\s+([a-z]+)\\s+(${De})\\s+([\\w-]+)[.!?]*$`,"i"),C4=new RegExp(`^(?:the\\s+goal\\s+is\\s+for|i\\s+want)\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+(${De})\\s+([\\w-]+)[.!?]*$`,"i"),O4=new RegExp(`^(?:can|could)\\s+you\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${De})\\s+an?\\s+([a-z][\\w-]*)[?.!]*$`,"i"),L4=new RegExp(`^(?:get|put|place|stack)\\s+(?:(every|each|all|both)\\s+)?(?:the\\s+)?([\\w-]+?)\\s+(${De})\\s+([\\w-]+)[?.!]*$`,"i"),N4=new RegExp(`^the\\s+goal\\s+is\\s+(?:(every|each|all|both)\\s+)?(?:the\\s+)?([\\w-]+?)\\s+(${De})\\s+([\\w-]+)[?.!]*$`,"i"),P4=new RegExp(`^(?:(every|each|all)\\s+)?([\\w-]+)\\s+([a-z]+s)\\s+(${De})\\s+([\\w-]+)$`,"i"),M4=new RegExp(`^(?:and\\s+|so\\s+|but\\s+)?what\\s+if\\s+([\\w-]+)\\s+(?:had\\s+)?(?:started|start|starts|begun|began|begins|was|were|is|had\\s+been|rested|rests|sat|sits|stood|stands|lay|lies|lain)(?:\\s+(?:out|off))?\\s+(?:${De})\\s+([\\w-]+)(?:\\s+(?:instead|initially|to\\s+start\\s+with|at\\s+the\\s+start|from\\s+the\\s+start|at\\s+the\\s+beginning))?[?.!\\s]*$`,"i"),F4=new RegExp(`^(?:and\\s+|so\\s+|but\\s+)?why\\s+(?:did\\s+you\\s+|do\\s+you\\s+|would\\s+you\\s+)?(?:choose\\s+to\\s+|decide\\s+to\\s+)?([a-z]+)\\s+([\\w-]+)(?:\\s+(?:${De})\\s+([\\w-]+))?(?:\\s+(?:first|initially|at\\s+the\\s+start|to\\s+start(?:\\s+with)?|to\\s+begin(?:\\s+with)?))?\\s+(?:instead\\s+of|rather\\s+than|and\\s+not|not)\\s+([\\w-]+)[?.!\\s]*$`,"i"),D4=new RegExp(`^(?:and\\s+|so\\s+|but\\s+)?why\\s+(?:not|didn'?t\\s+you|did\\s+you\\s+not|couldn'?t\\s+you)\\s+([a-z]+)\\s+([\\w-]+)(?:\\s+(?:${De})\\s+([\\w-]+))?(?:\\s+(?:first|initially|at\\s+the\\s+start|to\\s+start(?:\\s+with)?))?[?.!\\s]*$`,"i"),z4=new RegExp(`^(?:what|who)\\s+([a-z']+)\\s+(${De})\\s+(.+?)[?.!\\s]*$`,"i"),U4=new RegExp(`^what\\s+(?:does|do|is)\\s+([\\w-]+)\\s+([a-z]+)(?:\\s+(${De}))?[?.!\\s]*$`,"i"),Wv=/^(?:anywhere|everywhere|nowhere|somewhere)$/i,HL=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"]);ol="(?:(?:usually|often|sometimes|rarely|always|typically|generally|occasionally|frequently|normally|regularly|commonly|mostly|currently|still|also|really|actually|closely|strongly|directly)\\s+)?",KL="(?:cannot|can't|can not|does not|doesn't|do not|don't|never)",B4=new RegExp(`^(.+?)\\s+(${KL})\\s+(.+)$`,"i"),W4=new RegExp(`^([\\w'-]+)\\s+${ol}([a-z]+)\\s+(.+?)[.!?]*$`,"i"),wf="connected|related|associated|linked|based|derived|composed|made|used|known|located|found|involved|concerned",lx="with|to|from|by|of|in|on|for|as|about|into",G4=new RegExp(`^(?:the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(?:is|are|was|were)\\s+${ol}(${wf})\\s+(${lx})\\s+(.+)$`,"i"),V4=new RegExp(`^(the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(is|are|was|were)\\s+(?:an?\\s+)?([\\w'-]+)\\s+(${wf})\\s+(${lx})\\s+(.+)$`,"i"),q4=new RegExp(`^(?:the\\s+|an?\\s+)([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+([a-z]+)\\s+(${De})\\s+(.+?)[.!?]*$`,"i"),H4=new RegExp(`^(every|each|all)\\s+([\\w'-]+)\\s+([a-z]+)\\s+(${De})\\s+(.+?)[.!?]*$`,"i"),YL="(?:just\\s+)?(?:one|another)\\s+more|another",K4=new RegExp(`^(?:${YL})\\s+([\\w'-]+)\\s+([a-z]+)\\s+(${De})\\s+(.+?)[.!?]*$`,"i"),Zp=/^(?:is|are|am|owns|maintains)$/i,ef=/\b(?:is|are|am|owns|maintains)\b/i,XL=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"),Y4=new RegExp(`^(?:${to.filter(e=>!/\s/.test(e)).join("|")})$`,"i");JL=new RegExp(`^(?:does|did)\\s+(?:(?:every|each|all|any)\\s+)?([\\w'-]+)\\s+${ol}([a-z]+)\\s+(.+?)[?.!\\s]*$`,"i"),QL=new RegExp(`^what\\s+(?:does|did)\\s+([\\w'-]+)\\s+${ol}([a-z]+(?:\\s+(?:${De}))?)[?.!\\s]*$`,"i"),nf=/^(?:be|own|maintain)$/i,ZL=new RegExp(`^(${De})\\s+(.+)$`,"i");tN=["first","second","third","then","next","finally","later","meanwhile","afterward","afterwards"],X4=new RegExp(`^(?:${tN.join("|")})\\b\\s*,?\\s+`,"i"),ux=Object.freeze(["you","i","it","they","he","she","we"]),dx=Object.freeze(["you're","i'm","it's","they're","he's","she's","we're"]),nN=Object.freeze([...dx,...ux]),J4=new RegExp(`^(?:every\\s+|each\\s+|all\\s+|some\\s+|a few\\s+|a\\s+|an\\s+)?(${nN.join("|")})\\s+\\S+`,"i"),Q4=new RegExp(`^(?:every\\s+|each\\s+|all\\s+|some\\s+|a few\\s+|a\\s+|an\\s+)?(?:(${ux.join("|")})\\s+(?:is|are|am|was|were)|(${dx.join("|")}))\\s+(?:an?\\s+)?[\\w'-]+[.!?]*$`,"i"),px="forget|unlearn|delete|remove",Z4=new RegExp(`^(?:${px})\\s+(?:that\\s+)?(?:a\\s+|an\\s+)?([\\w-]+(?:\\s+[\\w-]+)?)\\s+(?:is|are)\\s+(?:an?\\s+)?(?:(?:kind|type)\\s+of\\s+)?([\\w-]+)$`,"i"),eX=new RegExp(`^([\\w-]+)\\s+([a-z]+)s\\s+(${De})\\s+([\\w-]+)$`,"i"),tX=new RegExp(`^(?:${px})\\s+(?:that\\s+)?([\\w-]+)\\s+([a-z]+)s\\s+(${De})\\s+([\\w-]+)$`,"i"),sN="collection|set|group|family",nX=new RegExp(`^(?:the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(?:is|are)\\s+an?\\s+(?:${sN})\\s+of\\s+(?:the\\s+)?([\\w'-]+)[.!?]*$`,"i"),oN=Object.freeze(["mgx:memberOf","mgx:partOf"]),jr="(?:\\s+(?:exactly|really|actually|truly|anyway|internally|properly))?",sX=new RegExp(`^what\\s+does\\s+(.+?)${jr}\\s+do${jr}\\??$`,"i"),oX=new RegExp(`^what\\s+(.+?)${jr}\\s+does${jr}\\??$`,"i"),rX=new RegExp(`^what(?:'s|s|\\s+is)\\s+(.+?)${jr}\\s+do${jr}\\??$`,"i"),fx="([A-Za-z][\\w'.-]*(?:\\s+[A-Za-z][\\w'.-]*){0,3})",iX=new RegExp(`^who\\s+(?:is|was)\\s+${fx}$`,"i"),aX=new RegExp(`^what\\s+(?:did|has)\\s+${fx}\\s+(?:touch(?:ed)?|chang(?:e|ed)|work(?:ed)?\\s+on|commit(?:ted)?)$`,"i"),rN="(?:good|bad|clean|messy|ugly|nice|great|terrible|awful|solid|elegant|readable|maintainable|well[- ]written|well[- ]structured|spaghetti|ok|okay|decent|healthy)",cX=new RegExp(`^is\\s+(?:this|the)\\s+code(?:base)?\\s+(?:any\\s+)?${rN}\\b`,"i"),lX=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"),uX=Object.freeze({game:["higher","lower","warmer","colder","hotter","up","down","guess"],spiderFly:["watch","step","tick","move","board","web"],adventure:["help","xyzzy","wait","hint","plugh"]});dX=new Set([...Object.keys(de).flatMap(e=>e.split(/[\s-]+/)),...tn,...$n,"owns","maintains"].filter(e=>e.length>=3)),To={"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:memberOf":"is a member of","mgx:collectionOf":"is a collection 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"},Gv=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"]),yf=new Set(["mgx:currently-in","mgx:located-in","mgx:fixed-in","mgx:stands-locked-in","mgx:works-in"]);Bt=e=>`${e.subject} ${mx(e.predicate)} ${e.object}`;aN=Object.entries(To).filter(([e])=>!yf.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);lN=/ \(source: [^)]*\)$/;uN=8;el=null;mN=/^(?:every|each|all|any)\s+/i;bx=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"]),pX=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("|"))),lf=/^(?: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,wx=/^(?:who|what)\s+(?:is|are)\s+(?:the|an?)\s+([a-z][\w-]*)\s+of\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,gN=/^(?:who|what)\s+(?:is|are|was|were)\s+([\w-]+(?:\s+[A-Z][\w-]*)?)'s\s+([a-z][\w-]*)[?.!\s]*$/i,bN=/^(who|what)'?s\s+/i,sl=e=>String(e).replace(bN,(t,n)=>`${n} is `),wN=/^(?:who|what)\s+(?:is|are|was|were)\s+([\w-]{2,}?)s\s+([a-z][\w-]*)[?.!\s]*$/i;yN=/^list\s+(?:the\s+|all\s+)?([a-z][\w-]*)\s+of\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,Hs=/^(?:is|are)\s+(?:an?\s+)?(.+?)\s+(?:a\s+kind\s+of|a\s+type\s+of|an?)\s+(.+?)[?.!\s]*$/i,Xn=new Set(["rdfs:subClassOf","rdf:type"]),$N=6,vN=/^why\s+(?=(?:is|are)\b)/i,xN=/^explain\s+how\s+you\s+know\s+(?:that\s+)?(.+?)\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i;df=new Set(["kind","sort","type","subclass","superclass"]),Kv=/^(?:so\s+)?(.+?)\s+(?:is|are)\s+(?:an?\s+)?(.+?)\s*,?\s*(?:now\s+)?(?:right|correct|yeah)\??$/i,EN=/^(?: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,ve=32;kN=/^(?:can|could)\s+(all\s+|every\s+)?(?:an?\s+)?([\w'-]+(?:\s+[\w'-]+)*?)\s+([a-z]+)[?.!\s]*$/i,jN=/^(?:does|do)\s+(?:an?\s+|the\s+)?(.+?)\s+have\s+(?:an?\s+|the\s+)?(.+?)[?.!\s]*$/i,RN=/^what\s+can\s+(?:an?\s+)?(.+?)\s+do[?.!\s]*$/i,_N=/^what\s+has\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,TN=/^what\s+(?:(?:can\s+be|is)\s+used\s+for|is\s+for)\s+(.+?)[?.!\s]*$/i,AN=/^where(?:'s|\s+is|\s+are)\s+(.+?)(?:\s+now)?\s*[?.!]*$/i,IN=/^where\s+(?:does|do|did)\s+(.+?)\s+[a-z][a-z'-]*(?:\s+now)?\s*[?.!]*$/i,CN=new RegExp(`^what(?:'s|\\s+is|\\s+are)\\s+(${De})\\s+(.+?)\\s*[?.!]*$`,"i"),ON=/^what(?:'s|\s+is|\s+are)\s+(?:the\s+)?(parts|members|contents)\s+of\s+(?:the\s+|an?\s+)?(.+?)\s*[?.!]*$/i,LN=/^what\s+([a-z][\w-]*)\s+(?:does|do)\s+(?:an?\s+|the\s+)?(.+?)\s+([a-z][a-z-]*)\s*[?.!]*$/i,NN=/^(?:do|does)\s+(all\s+|every\s+)?(?:an?\s+|the\s+)?([\w'-]+(?:\s+[\w'-]+)*?)\s+([a-z-]+)[?.!\s]*$/i,PN=/^what\s+can\s+(?!be\s)(.+?)[?.!\s]*$/i,MN=/^what\s+(?:cannot|can't|cant|can\s+not)\s+(.+?)[?.!\s]*$/i,FN=/^(?:which|what)\s+([\w'-]+(?:\s+[\w'-]+)*?)\s+can\s+(.+?)[?.!\s]*$/i;Xv=e=>String(e||"").replace(/\s+/g," ").trim();$x="(?:most|least)\\s+[a-z][\\w-]*|[a-z][\\w-]*est|best|worst",zN=new RegExp(`^which\\s+([\\w'-]+)\\s+(?:is|are)\\s+(?:the\\s+)?(${$x})[?.!\\s]*$`,"i"),UN=new RegExp(`^what(?:'s|s|\\s+is)\\s+the\\s+(${$x})\\s+([\\w'-]+)[?.!\\s]*$`,"i");WN=new Set(["rdfs:subClassOf","rdf:type","mgx:hasA","mgx:capableOf","mgx:usedFor","mgx:ownedBy","owl:disjointWith","mgx:hasProperty","mgx:receivesAction"]),GN=Object.entries(To).filter(([e])=>!WN.has(e)&&!yf.has(e)).map(([e,t])=>({predicate:e,re:new RegExp(`^what\\s+${Ke(t)}\\s+(.+?)[?.!\\s]*$`,"i")})).sort((e,t)=>t.re.source.length-e.re.source.length),VN=new Set(["rdfs:subClassOf","rdf:type","owl:disjointWith","mgx:hasProperty","mgx:hasA","mgx:capableOf","mgx:ownedBy"]),qN=new Set(["mgx:partOf","mgx:memberOf"]),HN=Object.entries(To).filter(([e])=>!VN.has(e)&&!yf.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=Ke(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=[hx(s),...o].map(Ke).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),Zv=/^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,KN=new Set(["changed","change","changes","updated","modified","happened","occurred"]);XN=/^what\s+(?:did|have)\s+(?:i|we|you)\s+(?:told|tell|said|say)\s+(?:you|me|us)?\s*about\s+(.+?)[?.!\s]*$/i,JN=/^what\s+kind\s+of\s+(?:thing|class|type|category|entity)?\s*(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,QN=/^does\s+every\s+(.+?)\s+have\s+at\s+least\s+(\d+)\s+(.+?)[?.!\s]*$/i,ZN=/^does\s+an?\s+(.+?)\s+have\s+an?\s+(.+?)[?.!\s]*$/i,ex=new Set(["owl:cardinality","owl:minCardinality","owl:maxCardinality","owl:onClass"]),e0=/^who\s+(?:owns|maintains)\s+(.+?)[?.!\s]*$/i,t0=/^(?:does|did)\s+([\w'-]+)\s+(?:owns?|maintains?)\s+(.+?)[?.!\s]*$/i,n0=/^(?:is|are|was|were)\s+(.+?)\s+owned\s+by\s+([A-Za-z][\w'-]*(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,s0=/^(?:does|did)\s+([\w'-]+)\s+(?:has|have)\s+an?\s+([a-z][\w-]*)\s+method[?.!\s]*$/i,o0=/^what\s+methods\s+does\s+([\w'-]+)\s+have[?.!\s]*$/i,tx=/^(?:is|are|was|were)\s+(.+?)\s+([A-Za-z][\w-]*)[?.!\s]*$/i,vs=/^(?:it|this|that)$/i,r0=/^(?:it|them|this|that|in|on|of|to|at)$/i,nx=/^(?:it|this|that)(?:\s+one)?\s+(?:before|after)\b/i,sx=/^(?:you|i|they|he|she|we)\b/i,ox=(e,t)=>({text:`I don't know anything about "${e}" yet \u2014 teach me directly, e.g. "remember that ${nl(e)} is ${t}".`,replace:!0}),i0=/^(?: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;c0=/inherit|supertype|subclass|extend|specializ/i,l0=8;fX=new RegExp(`\\b(?:${[...hf].join("|")})\\b`,"i"),Sx=/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,d0=/^who\s+(?:is|are|was|were)\s+(?:an?\s+|the\s+)?([\w'-]+)[?.!\s]*$/i,p0=/^(?:please\s+|can\s+you\s+|could\s+you\s+)*(?:define|definition\s+of|give\s+me\s+the\s+definition\s+of)\s+(?:the\s+(?:term|word)\s+)?(?:an?\s+|the\s+)?(.+?)[?.!\s]*$/i;hX=new RegExp(`^(?:(?:the|a|an)\\s+)?(.+?)\\s+(${Object.keys(Ge).join("|")})$`,"i"),af="(?:(?:can|could|would)\\s+you\\s+(?:please\\s+)?)?(?:(?:show|give)\\s+(?:me|us)\\s+|describe\\s+|explain\\s+|what(?:'s|s|\\s+is)\\s+)?",ff="(?:of|for)\\s+(?:this|the)\\s+(?:app|codebase|repo|repository|project|code)",f0=`(?:\\s+${ff})?`,mX=[new RegExp(`^${af}the\\s+architecture(?:\\s+(?:overview|map|diagram))?${f0}(?:\\s+here)?\\??$`,"i"),new RegExp(`^${af}architecture\\s+(?:${ff}|overview|map|diagram)\\??$`,"i"),new RegExp(`^${af}(?:(?:an?|the)\\s+)?(?:overview|map|diagram)\\s+${ff}(?:\\s+here)?\\??$`,"i")],gX={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:wn.contains,subclasses:wn.inherits,impact:"understand what a change to this module would reach (impact closure)",callers:wn.calls,callees:wn.calls,tests:wn.tests,untested:wn.tests,history:wn.touches,exports:wn.reexports,arch:"understand the overall architecture (package/module boundaries)",capabilities:"see what /plan can plan over \u2014 built-in query tools and taught actions",goals:"see the declared goals a trace is recognized against, and where each one came from",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",wikipedia:"choose which source the research lane fetches from",wikidata:"choose which source the research lane fetches from",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"},kx="(?:changed?|modif(?:y|ied)|edits?|edited|touch(?:es|ed)?|updates?|updated|alters?|altered|deletes?|deleted|removes?|removed|drops?|dropped)",bX=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+${kx}\\s+(?:the\\s+)?(.+?)[?.!\\s]*$`,"i"),wX=new RegExp(`^if\\s+(?:i|we|you|one|someone)\\s+${kx}\\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"),yX=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"),$X=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"),vX=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"),rl="as\\s+(?:its|the|an?)?\\s*(?:base\\s+class|parent\\s+class|base|parent)",xX=new RegExp(`^(.+?)\\s+uses?\\s+(?:which\\s+[\\w'-]+|what)\\s+${rl}\\s*\\??$`,"i"),EX=new RegExp(`^what\\s+(?:does|do|did)\\s+(.+?)\\s+uses?\\s+${rl}\\s*\\??$`,"i"),SX=new RegExp(`^(?:does|do|did)\\s+(.+?)\\s+uses?\\s+(.+?)\\s+${rl}\\s*\\??$`,"i"),kX=new RegExp(`^(.+?)\\s+uses?\\s+(.+?)\\s+${rl}\\s*[.!]*$`,"i"),h0=Object.freeze([...hf].filter(e=>e!=="here").concat("they")),jX=new RegExp(`^((?:is|are|can|could|does|do)\\s+|what\\s+(?:is|are)\\s+)(${h0.join("|")})\\b(\\s+\\S.*)?$`,"i"),RX=Z(".tmct","memory","corpus-seed.json")});Jc();Be();ns();Oc();var il={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 _x=Object.freeze({"rdfs:subClassOf":"isa","rdf:type":"isa","mgx:atLocation":"location","mgx:locatedNear":"location","mgx:partOf":"partOf","mgx:memberOf":"partOf","mgx:capableOf":"capableOf","mgx:usedFor":"usedFor"}),Ao=Object.freeze(["isa","location","partOf","capableOf","usedFor","other"]),al=e=>_x[e]||"other",g0=e=>Math.max(0,Math.min(1,e));function jx(e){let t=(e.sourceTypes||[]).map(n=>so[n]??0);return t.length?Math.max(...t):typeof e.trust=="number"&&e.trust>0?e.trust:so.entailed}function b0(e){return Array.isArray(e.environments)&&e.environments.length?!0:(e.sourceTypes||[]).includes("entailed")}function Rx(e,t){let n=Number(t?.totalSubjects)||0;return n<=0?0:(Number(t?.classSubjectCounts?.[e])||0)/n}function Tx(e,t,n={},s={}){let o={...il,...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(al($.predicate)==="isa"){let x=Rx($.object,n);if(l&&x>o.uninformativeClassMaxShare){a.push({row:$,family:"isa",reason:"uninformative-class",share:x});continue}}c.push($)}let u=c.filter($=>al($.predicate)==="isa").map($=>$.object),d=Cc(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(_=>_.object===E&&al(_.predicate)==="isa");x+=S?jx(S):0}f.set($.label,x)}let h=null,m=-1;for(let[$,x]of[...f].sort((E,S)=>E[0].localeCompare(S[0])))x>m&&(m=x,h=$);let b=[];for(let $ of c){let x=al($.predicate),E=jx($),S={provenance:E};if(b0($)&&(E-=o.entailedDepthPenalty,S.entailed=!0),x==="isa"){let R=.6+.4*(1-Rx($.object,n));E*=R,S.informativeness=R;let I=p.get($.object);h&&I&&I!==h&&(E-=o.minoritySensePenalty,S.minoritySense=I)}E=g0(E),b.push({row:$,family:x,score:E,reasons:S})}let g=[];for(let $ of b)$.score<o.minScore?a.push({row:$.row,family:$.family,reason:"below-floor",score:$.score}):g.push($);let y=new Map;for(let $ of g)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=Ao.filter($=>y.has($)).concat([...y.keys()].filter($=>!Ao.includes($)).sort()),v=[],k=!1;for(;v.length<r&&!k;){k=!0;for(let $ of w){let x=y.get($);if(x&&x.length&&(v.push(x.shift()),k=!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=Ao.indexOf($.family),S=Ao.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:h}}}ha();Ot();var w0=new Set(["isa","location","partOf","capableOf","usedFor"]),y0=new Set(["single","several","chained","group","closer"]),Ax=(e,t)=>`${e}:${t}`;function $f(e){let t=new Map;for(let n of e||[]){if(!n||typeof n.family!="string"||!w0.has(n.family)||typeof n.form!="string"||!y0.has(n.form)||typeof n.template!="string"||!n.template.trim())continue;let s=Ax(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 Io=e=>`${Ho(e)} ${e}`;function $0(e){let t=(e||[]).map(o=>String(o||"").trim()).filter(Boolean);if(!t.length)return"";let n=Io(t[0]),s=t.slice(1);return s.length?`${n}, and so ${Wr(s.map(Io))}`:n}function v0(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:Ko(o),A_TERM:Io(o),A_TERM_CAP:Ko(Io(o)),TERMS:fa(o),TERMS_CAP:Ko(fa(o)),PRONOUN:"it",PRONOUN_CAP:"It",PARENT:a,A_PARENT:a?Io(a):"",OBJECT:i,A_OBJECT:i?Io(i):"",OBJECTS_A:Wr(r.map(Io)),OBJECTS_PLURAL:Wr(r.map(fa)),OBJECTS_RAW:Wr(r),CHAIN:$0(n&&n.length?n:r.slice(0,1))}}function x0(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 xs(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(Ax(t,i)):null,l=a?a.templates:null;if(!l||!l.length)return null;let c=s.variantSeed??"",u=ka(`${r}|${t}|${i}|${c}`)%l.length,d=s.objectsOverride||o.map(p=>p.object),f=x0(l[u],v0(r,d,s.chain,s.parent));return f?{text:f,rows:o,family:t,form:i}:null}ha();var E0=Ao.filter(e=>e!=="isa"&&e!=="other");function S0(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 Ix(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 k0(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 j0(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 R0(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",h=xs(s,"isa",e,{term:n,form:p,chain:f});return h&&r.push({...h,role:"names-term",paragraph:"definition"}),r}if(e.length<=o.groupSplitThreshold){let f=xs(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=xs(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 k0(a,t))for(let p of Ix(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 h of c.slice(o.maxBodySentences))p.rows=p.rows.concat(h.rows);p.parent=null,c=f}for(let f of c){let p=f.parent?xs(s,"isa",f.rows,{term:n,form:"group",parent:f.parent,variantSeed:f.parent}):xs(s,"isa",f.rows,{term:n,form:"several",variantSeed:n});p&&r.push({...p,role:"describes-isa",paragraph:"definition"})}let{roots:u,rows:d}=j0(t,e,o.closerRootCount);if(u.length){let f=xs(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 _0(e,t){if(!e.length)return;let n=e[0];if(/\bnames-term\b/.test(n.role))return;let s=Ko(`${Ho(t)} ${t}`);n.text=n.text.replace(/^It\b/,s),n.role="names-term"}function T0(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 Cx(e,t,n={}){let s=e?.term||"",o=Number.isInteger(n.maxSentencesPerParagraph)?n.maxSentencesPerParagraph:3,r=n.chains||{},i={...il,...n.config||{}},a=S0(e?.selected||[]),l=[];for(let u of R0(a.get("isa")||[],r,s,t,i))l.push(u);for(let u of E0){let d=a.get(u);if(!(!d||!d.length))for(let f of Ix(d,i.maxObjectsPerBodySentence)){let p=xs(t,u,f,{term:s});p&&l.push({...p,role:"describes",paragraph:"description"})}}_0(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:T0(l,o),provenanceRows:[...c.values()]}}var A0=e=>({subject:e.subject,predicate:e.predicate,object:e.object,sourceTypes:e.sourceTypes||[],provenance:e.provenance||""});function I0(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 C0=Object.freeze({facts:"show the facts",chains:"show the chains"});function O0(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:C0,facts:n.map(A0),factCount:n.length,chains:s}}function Ox(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:I0(t?.provenanceRows||[]),detail:O0(e,n.chains),provenanceRows:t?.provenanceRows||[]}}function Lx(e,t,n={},s=new Map,o={}){let r=Tx(e,t,n,o),i=Cx(r,s,o);return Ox(r,i,o)}Oc();Ac();var Nx=new Set(["rdfs:subClassOf","rdf:type"]);function Px(e){let t=new Map,n=new Set,s=[],o=[];for(let i of e||[])!i||!i.predicate||(Nx.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 Mx(e,t,n=6){let s=Ri(e||[]),o={};for(let r of t||[]){if(r in o)continue;let i=Ic(r,s,{cap:n,stopAt:Tc});i.length>1&&(o[r]=i)}return o}function Fx(e){let t=[],n=new Set;for(let s of e||[])!s||!Nx.has(s.predicate)||n.has(s.object)||(n.add(s.object),t.push(s.object));return t}Be();Jc();function L0(e,t,n,s,o={}){let r=$f(s||[]);if(!r||r.size===0)return null;let i=t||[],a=Px(n||i),l=Mx(a.subClassEdges,Fx(i));return Lx(e,i,a,r,{...o,chains:l})}function Dx(e,t,n,s={}){let o=ht(e||{individuals:[],objectProperties:[]}),r=X(V,t),i=o.filter(l=>r.has(l.subject));if(!i.length)return null;let a=L0(t,i,o,n,s);return N0(a)}function N0(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 P0="no session is open on this page yet \u2014 await tmct.open() first",zx=Symbol.for("tmct.surface.fallback");function Ux({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[zx])return a;let l=null,c=()=>{if(!l)throw new Error(P0);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[zx]=r,i.tmct=u,u}function M0({payload:e=null}={}){let t=mi();return e&&(t.payload=e),{memoryDir:t}}async function F0(e,t,n){let s=null;try{s=await vx(n.memoryDir,e,null,!0,{})}catch{s=null}if(!(s&&s.text))try{s=await Ex(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}}Ux({open:M0,ask:F0,page:{normFactTerm:V,digestTermFromPayloadBrowser:Dx},fallback:!0});})();
|