house-lights 1.6.0 → 1.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "house-lights",
3
- "version": "1.6.0",
3
+ "version": "1.9.2",
4
4
  "description": "The command behind the house-lights skills: draw a lesson or a pitch, play an incident drill, map a way of working or a customer journey, compare Copilot Studio agents — one offline HTML file each.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -128,54 +128,57 @@ body { margin: 0; }
128
128
  @media (max-width: 680px) { .cl-agent.wide { grid-column: auto; } }
129
129
  .cl-route { overflow-x: auto; }
130
130
  .cl-route h4 { margin: 6px 0 4px; font-size: 13px; color: var(--muted); }
131
+ a.cl-get { color: var(--ink); text-decoration: none; font-weight: 600; }
131
132
  </style>
132
133
  </head>
133
134
  <body>
134
135
  <div class="cl" id="app"></div>
135
136
  <script type="application/json" id="cast">{{CAST}}</script>
136
- <script>(()=>{var J="https://github.com/microsoft/skills-for-copilot-studio/blob/main/patterns",W=[{id:"orchestrator-variables",name:"Orchestrator-Generated Variables",sign:"an OnRecognizedIntent topic with an AutomaticTaskInput that has shouldPromptUser: false"},{id:"rai-error-handling",name:"RAI Error Handling",sign:"the OnError topic reads System.Error.SubCode"},{id:"knowledge-hold-message",name:"Knowledge Hold Message",sign:"an OnKnowledgeRequested topic that sends a message"},{id:"prevent-tool-call-leaks",name:"Prevent Tool Call Leaks",sign:"an OnGeneratedResponse topic that sets System.ContinueResponse"},{id:"dynamic-topic-redirect",name:"Dynamic Topic Redirect",sign:"a BeginDialog whose dialog is a =Switch( expression"},{id:"channel-aware-behavior",name:"Channel-Aware Behavior",sign:"a condition or SetVariable that reads System.Activity.ChannelId (not a tool input)"},{id:"date-context",name:"Date Context",sign:"the instructions use Today() or Now()"},{id:"line-breaks-in-messages",name:"Line Breaks in Messages",sign:"<br /> inside a SendActivity or Question"},{id:"conversation-history-variable",name:"Conversation History Variable"},{id:"chain-of-thought-logging",name:"Chain of Thought Logging"},{id:"deterministic-mcp-calls",name:"Deterministic MCP Calls"},{id:"prevent-child-agent-responses",name:"Prevent Child Agent Responses"},{id:"jit-glossary",name:"JIT Glossary"},{id:"jit-user-context",name:"JIT User Context"},{id:"teams-production-hardening",name:"Teams Production Hardening"}];var D={conversation:{en:"A. Conversation",pt:"A. Conversa"},integrations:{en:"B. Integrations",pt:"B. Integra\xE7\xF5es"},knowledge:{en:"C. Knowledge",pt:"C. Conhecimento"},orchestration:{en:"D. Orchestrator",pt:"D. Orquestrador"},governance:{en:"E. Governance",pt:"E. Governan\xE7a"},text:{en:"F. Text",pt:"F. Texto"},microsoft:{en:"Microsoft patterns",pt:"Padr\xF5es Microsoft"},declared:{en:"Declared",pt:"Declarado"}},ie={"trigger:OnConversationStart":{dim:"conversation",en:"Greeting",pt:"Boas-vindas"},"trigger:OnUnknownIntent":{dim:"conversation",en:"Fallback (when it does not understand)",pt:"Fallback (quando n\xE3o entende)"},"trigger:OnEscalate":{dim:"conversation",en:"Escalation to a person",pt:"Escalonamento para humano",lacks:{en:["does not escalate to a person","do not escalate to a person"],pt:["n\xE3o escala para humano","n\xE3o escalam para humano"]}},"trigger:OnError":{dim:"conversation",en:"Error handling",pt:"Tratamento de erro",lacks:{en:["does not handle errors","do not handle errors"],pt:["n\xE3o trata erro","n\xE3o tratam erro"]}},"trigger:OnRecognizedIntent":{dim:"conversation",en:"A topic of its own, by intent",pt:"T\xF3pico pr\xF3prio, por inten\xE7\xE3o"},"trigger:OnRedirect":{dim:"orchestration",en:"Takes a call from the orchestrator",pt:"Recebe chamada do orquestrador",lacks:{en:["takes no call from the orchestrator","take no call from the orchestrator"],pt:["n\xE3o recebe chamada do orquestrador","n\xE3o recebem chamada do orquestrador"]}},"trigger:OnSelectIntent":{dim:"conversation",en:"Disambiguation (\xABdid you mean\u2026\xBB)",pt:"Desambigua\xE7\xE3o (\xABvoc\xEA quis dizer\u2026\xBB)"},"trigger:OnSignIn":{dim:"conversation",en:"Sign-in",pt:"Login"},"trigger:OnGeneratedResponse":{dim:"conversation",en:"Reviews the generated answer",pt:"Revisa a resposta gerada"},"trigger:OnKnowledgeRequested":{dim:"knowledge",en:"Before searching knowledge",pt:"Antes de buscar no conhecimento"},"trigger:OnToolSelected":{dim:"orchestration",en:"Child chosen as a tool",pt:"Filho escolhido como ferramenta"},"trigger:OnActivity":{dim:"conversation",en:"On every message",pt:"Em toda mensagem"},"setting:generative=on":{dim:"conversation",en:"Generative orchestration on",pt:"Orquestra\xE7\xE3o generativa ligada"},"setting:generative=off":{dim:"conversation",en:"Generative orchestration off",pt:"Orquestra\xE7\xE3o generativa desligada"},"setting:model-knowledge=on":{dim:"governance",en:"The model's general knowledge on",pt:"Conhecimento geral do modelo ligado"},"setting:model-knowledge=off":{dim:"governance",en:"The model's general knowledge off",pt:"Conhecimento geral do modelo desligado"},"setting:semantic-search=on":{dim:"knowledge",en:"Semantic search on",pt:"Busca sem\xE2ntica ligada"},"setting:semantic-search=off":{dim:"knowledge",en:"Semantic search off",pt:"Busca sem\xE2ntica desligada"},"setting:web-browsing=on":{dim:"knowledge",en:"Web browsing on",pt:"Navega\xE7\xE3o na web ligada"},"setting:web-browsing=off":{dim:"knowledge",en:"Web browsing off",pt:"Navega\xE7\xE3o na web desligada"},"setting:connectable":{dim:"orchestration",en:"Can be called by an orchestrator",pt:"Pode ser chamado por um orquestrador"},"called-with:history":{dim:"orchestration",en:"Receives the conversation history",pt:"Recebe o hist\xF3rico da conversa",lacks:{en:["does not receive the conversation history from the orchestrator","do not receive the conversation history from the orchestrator"],pt:["n\xE3o recebe o hist\xF3rico da conversa do orquestrador","n\xE3o recebem o hist\xF3rico da conversa do orquestrador"]}},"routing:described":{dim:"orchestration",en:"Has a routing description",pt:"Tem descri\xE7\xE3o de roteamento",lacks:{en:["has no routing description","have no routing description"],pt:["n\xE3o tem descri\xE7\xE3o de roteamento","n\xE3o t\xEAm descri\xE7\xE3o de roteamento"]}},"flow-returns":{dim:"integrations",en:"The flow returns an answer",pt:"O fluxo devolve uma resposta",lacks:{en:["has a flow that returns nothing","have a flow that returns nothing"],pt:["tem fluxo que n\xE3o devolve nada","t\xEAm fluxo que n\xE3o devolve nada"]}},"flow-uses:child-flow":{dim:"integrations",en:"The flow calls another flow",pt:"O fluxo chama outro fluxo"},"topics:with-model-description":{dim:"conversation",en:"Topics described for the model",pt:"T\xF3picos descritos para o modelo"},"instructions:present":{dim:"governance",en:"Has instructions",pt:"Tem instru\xE7\xF5es",lacks:{en:["has no instructions","have no instructions"],pt:["n\xE3o tem instru\xE7\xF5es","n\xE3o t\xEAm instru\xE7\xF5es"]}},"node:LogCustomTelemetryEvent":{dim:"governance",en:"Logs telemetry",pt:"Registra telemetria",lacks:{en:["logs no telemetry","log no telemetry"],pt:["n\xE3o registra telemetria","n\xE3o registram telemetria"]}},"node:CSATQuestion":{dim:"governance",en:"Asks for satisfaction (CSAT)",pt:"Pergunta a satisfa\xE7\xE3o (CSAT)",lacks:{en:["does not ask for satisfaction","do not ask for satisfaction"],pt:["n\xE3o pergunta a satisfa\xE7\xE3o","n\xE3o perguntam a satisfa\xE7\xE3o"]}},"node:SearchAndSummarizeContent":{dim:"knowledge",en:"Generative answers from knowledge",pt:"Respostas generativas sobre o conhecimento"},"node:SearchKnowledgeSources":{dim:"knowledge",en:"Searches the knowledge sources",pt:"Busca nas fontes de conhecimento"},"yaml-only:triggerCondition":{dim:"knowledge",en:"Search condition only in YAML (the editor may erase it)",pt:"Condi\xE7\xE3o de busca s\xF3 no YAML (a tela pode apagar)"},"knowledge:SharePointSearchSource":{dim:"knowledge",en:"Knowledge in SharePoint",pt:"Conhecimento no SharePoint"},"declared:kpi":{dim:"declared",en:"KPI declared",pt:"KPI declarado",lacks:{en:["has no KPI declared","have no KPI declared"],pt:["n\xE3o tem KPI declarado","n\xE3o t\xEAm KPI declarado"]}},"declared:owner":{dim:"declared",en:"Owner declared",pt:"Dono declarado",lacks:{en:["has no owner declared","have no owner declared"],pt:["n\xE3o tem dono declarado","n\xE3o t\xEAm dono declarado"]}}},De=Object.fromEntries(W.map(e=>[e.id,e.name])),Ae=[["called-with:input:","orchestration","Receives <value> from the orchestrator","Recebe <valor> do orquestrador"],["flow-uses:http:","integrations","Flow calls","Fluxo chama"],["flow-uses:connector:","integrations","Flow uses the connector","Fluxo usa o conector"],["flow-uses:operation:","integrations","Flow uses the operation","Fluxo usa a opera\xE7\xE3o"],["orphan:topic:","governance","Topic nobody calls","T\xF3pico que ningu\xE9m chama"],["orphan:action:","governance","Tool nobody can choose","Ferramenta que ningu\xE9m escolhe"],["orphan:variable:","governance","Variable nobody uses","Vari\xE1vel que ningu\xE9m usa"],["orphan:flow:","governance","Flow nobody calls","Fluxo que ningu\xE9m chama"],["disabled:node:","governance","Switched-off node","N\xF3 desligado"],["telemetry:event:","governance","Logs the event","Registra o evento"],["telemetry:field:","governance","The event carries the field (<event>/<field>)","O evento leva o campo (<evento>/<campo>)"],["disabled:","governance","Switched off","Desligado"],["reaches:","conversation","A topic leads to it (part of trigger:<value>)","Um t\xF3pico leva a ele (parte de trigger:<valor>)"],["calls:topic:","conversation","Calls the topic (one not found)","Chama o t\xF3pico (n\xE3o encontrado)"],["trigger:","conversation","Trigger","Gatilho"],["setting:","conversation","Setting","Configura\xE7\xE3o"],["connector:","integrations","Connector","Conector"],["operation:","integrations","Operation","Opera\xE7\xE3o"],["connref:","integrations","Connection reference","Refer\xEAncia de conex\xE3o"],["mcp:","integrations","MCP server","Servidor MCP"],["flow:","integrations","Flow","Fluxo"],["knowledge:","knowledge","Knowledge","Conhecimento"],["node:","governance","Node","N\xF3"],["calls:","orchestration","Calls","Chama"],["child:","orchestration","Child","Filho"],["var-in:","orchestration","Receives from the orchestrator","Recebe do orquestrador"],["var:","orchestration","Global variable","Vari\xE1vel global"],["model:","governance","Model","Modelo"],["auth:","governance","Sign-in","Login"],["ms:","microsoft","Microsoft pattern:","Padr\xE3o Microsoft:"],["text:","text","Text:","Texto:"],["declared:","declared","Declared:","Declarado:"]],le=e=>Ae.find(([n])=>e.startsWith(n));function F(e){return e.startsWith("reaches:")?F(`trigger:${e.slice(8)}`):ie[e]?.dim??le(e)?.[1]??"governance"}var ce=80;function Z(e){if(e.startsWith("reaches:"))return`trigger:${e.slice(8)}`;if(e.startsWith("telemetry:event:"))return"node:LogCustomTelemetryEvent";if(e.startsWith("telemetry:field:"))return`telemetry:event:${e.slice(16,e.lastIndexOf("/"))}`}var A=(e,n)=>e.split("{agent}").join(n==="pt"?"\u2039nome\u203A":"\u2039name\u203A"),Me=e=>({form:e.slice(16,e.lastIndexOf("/")),field:e.slice(e.lastIndexOf("/")+1)}),re=(e,n)=>n?.[e]??e;function C(e,n,s){let r=ie[e];if(r)return r[n];if(e.startsWith("text:block:")){let p=e.endsWith("~variant"),y=p?e.slice(0,-8):e,g=s?.[y]??y.slice(11);return p?`${g} (${n==="pt"?"varia\xE7\xE3o":"variation"})`:g}if(e.startsWith("text:link-domain:"))return`${n==="pt"?"Link para":"Link to"} ${e.slice(17)}`;if(e==="text:email")return n==="pt"?"Cita um e-mail":"Mentions an e-mail";if(e.startsWith("text:")){let[p,y]=[e.slice(5).split("=")[0],e.includes("=")?e.slice(e.indexOf("=")+1):void 0],g=s?.[`text:${p}`]??p;return y===void 0?g:`${g} = ${y}`}if(e.startsWith("reaches:")){let p=C(`trigger:${e.slice(8)}`,n);return n==="pt"?`Um t\xF3pico leva a \xAB${p}\xBB`:`A topic leads to \xAB${p}\xBB`}if(e.startsWith("called-with:input:"))return n==="pt"?`Recebe \xAB${e.slice(18)}\xBB do orquestrador`:`Receives \xAB${e.slice(18)}\xBB from the orchestrator`;if(e.startsWith("telemetry:event:"))return n==="pt"?`Registra o evento \xAB${A(e.slice(16),n)}\xBB`:`Logs the event \xAB${A(e.slice(16),n)}\xBB`;if(e.startsWith("telemetry:field:")){let{form:p,field:y}=Me(e),g=A(p,n);return n==="pt"?`\xAB${g}\xBB leva \xAB${y}\xBB`:`\xAB${g}\xBB carries \xAB${y}\xBB`}let t=/^knowledge:count=(\d+)$/.exec(e);if(t){let p=Number(t[1]);return n==="pt"?`${p} ${p===1?"fonte":"fontes"} de conhecimento`:`${p} knowledge ${p===1?"source":"sources"}`}let a=le(e);if(!a)return e;let d=e.slice(a[0].length);if(a[0]==="ms:"&&(d=De[d]??d),a[0]==="auth:"&&d==="None")return n==="pt"?"Sem login":"No sign-in";if(e.startsWith("setting:moderation="))return n==="pt"?`Modera\xE7\xE3o de conte\xFAdo: ${e.slice(19)}`:`Content moderation: ${e.slice(19)}`;if(["connector:","connref:","mcp:","calls:","flow:","flow-uses:connector:","orphan:flow:"].includes(a[0])&&(d=re(d,s)),a[0]==="disabled:"&&(d=d.replace(":"," ")),a[0]==="operation:"||a[0]==="flow-uses:operation:"){let[p,y]=[d.slice(0,d.indexOf("/")),d.slice(d.indexOf("/")+1)];d=`${re(p,s)} \xB7 ${y}`}return`${a[n==="pt"?3:2]} ${d}`}var Ie={specialist:{en:["specialist","specialists"],pt:["especialista","especialistas"]},orchestrator:{en:["orchestrator","orchestrators"],pt:["orquestrador","orquestradores"]}},ee=(e,n,s)=>Ie[e][n][s===1?0:1],q={en:{summary:"Summary",matrix:"Matrix",patterns:"Patterns",text:"Text",off:"Off pattern",gaps:"Gaps",conflicts:"Conflicts",agents:"Cast",evidence:"Evidence",declared:"Declared",unknown:"Not understood",routing:"Routing",unused:"Unused",telemetry:"Telemetry",written:"As written",form:"Form",fields:"Fields",fired:e=>`Fired (${e} days)`,notRead:"not read",caller:"Caller",called:"Called",history:"History",inputs:"Inputs",routingText:"Routing description",chars:"Characters",notInFolder:"not in the folder",what:"What",how:"How",thing:{topic:"topic",action:"tool",variable:"variable",flow:"flow",node:"node",knowledge:"knowledge source"},orphan:"nobody uses it",disabled:"switched off",dimension:"Dimension",fact:"Fact",key:"Key",agent:"Who",name:"Name",role:"Role",scope:"Scope",share:"Share",have:"Who has it",lack:"Who lacks it",decision:"Decision",why:"Why",missing:"Missing",accepted:"Accepted pattern",rule:"Rule",says:"Says",notMet:"Who does not meet it",value:"Value",source:"Source",inYaml:"In the YAML",file:"File",line:"Line",facts:"Facts",alone:"Only it has",children:"Children",kind:"Kind",types:"Types",id:"Id",label:"Label",body:"Text",variant:"Variation",official:"Official",type:"type",yes:"yes",no:"no",accept:"accepted",reject:"rejected",platform:"platform",specialist:"specialist",orchestrator:"orchestrator",title:"The cast, compared",look:"To look at",nothing:"Nothing to look at",privacy:"This file holds the client\u2019s data: keep it in the client\u2019s environment.",count:{agents:"In the cast",orchestrators:"Orchestrators",specialists:"Specialists",patterns:"Patterns",off:"Off a pattern",gaps:"Rules not met",conflicts:"Conflicts",solos:"Only one has it",unused:"Unused or switched off"},why_:{yaml:"YAML that does not read",empty:"empty",kind:"a kind Copilot Studio does not have",file:"not a Copilot Studio file",json:"JSON that does not read",flow:"a flow in a shape the analysis does not know",telemetry:"a telemetry event whose name is a formula"}},pt:{summary:"Resumo",matrix:"Matriz",patterns:"Padr\xF5es",text:"Texto",off:"Fora do padr\xE3o",gaps:"Lacunas",conflicts:"Conflitos",agents:"Elenco",evidence:"Evid\xEAncias",declared:"Declarado",unknown:"N\xE3o entendeu",routing:"Roteamento",unused:"Sem uso",telemetry:"Telemetria",written:"Como est\xE1 escrito",form:"Forma",fields:"Campos",fired:e=>`Disparou (${e} dias)`,notRead:"n\xE3o lido",caller:"Quem chama",called:"Chamado",history:"Hist\xF3rico",inputs:"Entradas",routingText:"Descri\xE7\xE3o de roteamento",chars:"Caracteres",notInFolder:"n\xE3o est\xE1 na pasta",what:"O qu\xEA",how:"Como",thing:{topic:"t\xF3pico",action:"ferramenta",variable:"vari\xE1vel",flow:"fluxo",node:"n\xF3",knowledge:"fonte de conhecimento"},orphan:"ningu\xE9m usa",disabled:"desligado",dimension:"Dimens\xE3o",fact:"Fato",key:"Chave",agent:"Quem",name:"Nome",role:"Papel",scope:"Escopo",share:"Quantos",have:"Quem tem",lack:"Quem falta",decision:"Decis\xE3o",why:"Por qu\xEA",missing:"Falta",accepted:"Padr\xE3o aceito",rule:"Regra",says:"Diz",notMet:"Quem n\xE3o cumpre",value:"Valor",source:"Fonte",inYaml:"No YAML",file:"Arquivo",line:"Linha",facts:"Fatos",alone:"S\xF3 ele tem",children:"Filhos",kind:"Kind",types:"Tipos",id:"Id",label:"R\xF3tulo",body:"Texto",variant:"Varia\xE7\xE3o",official:"Oficial",type:"tipo",yes:"sim",no:"n\xE3o",accept:"aceito",reject:"rejeitado",platform:"plataforma",specialist:"especialista",orchestrator:"orquestrador",title:"Elenco comparado",look:"Para olhar",nothing:"Nada para olhar",privacy:"Este arquivo tem dados do cliente: deixe-o no ambiente dele.",count:{agents:"No elenco",orchestrators:"Orquestradores",specialists:"Especialistas",patterns:"Padr\xF5es",off:"Fora do padr\xE3o",gaps:"Regras n\xE3o cumpridas",conflicts:"Conflitos",solos:"S\xF3 um tem",unused:"Sem uso ou desligado"},why_:{yaml:"YAML que n\xE3o se l\xEA",empty:"vazio",kind:"um kind que o Copilot Studio n\xE3o tem",file:"n\xE3o \xE9 arquivo do Copilot Studio",json:"JSON que n\xE3o se l\xEA",flow:"um fluxo num formato que a an\xE1lise n\xE3o conhece",telemetry:"um evento de telemetria com o nome em f\xF3rmula"}}};var de=[{key:"contradictions",en:"Contradictions",pt:"Contradi\xE7\xF5es",keys:["conflict","contradiction"]},{key:"contract",en:"Contract and telemetry",pt:"Contrato e telemetria",keys:["spelling","contract","flow","telemetry"]},{key:"off",en:"Off pattern",pt:"Fora do padr\xE3o",keys:["off","values","twice","type"]},{key:"rules",en:"Rules",pt:"Regras",keys:["gap"]},{key:"solo",en:"Only one has it",pt:"S\xF3 um tem",keys:["solo"],folded:!0},{key:"unused",en:"Unused",pt:"Sem uso",keys:["unused"],folded:!0},{key:"unknown",en:"Not understood",pt:"N\xE3o entendeu",keys:["unknown","unmatched"]}],gt=de.flatMap(e=>e.keys);function V(e){return de.map(n=>({key:n.key,en:n.en,pt:n.pt,folded:!!n.folded,looks:e.flatMap((s,r)=>n.keys.includes(s.key)?[{look:s,at:r}]:[])})).filter(n=>n.looks.length)}function _(e){let n=t=>e.offPattern.some(a=>a.key===t.key||a.partOf===t.key),s=t=>t.share===1&&!t.decision&&!n(t),r=e.patterns.filter(t=>!t.partOf);return{look:r.filter(t=>!s(t)),everyone:r.filter(s)}}var pe=new TextEncoder,te=e=>e.replace(/[&<>"]/g,n=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[n]).replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F]/g,""),E=e=>e<26?String.fromCharCode(65+e):E(Math.floor(e/26)-1)+String.fromCharCode(65+e%26),Le=e=>e.replace(/[:\\/?*[\]]/g," ").slice(0,31)||"Sheet";function Ee(e){let n=[{}],s=l=>JSON.stringify([l.bold??!1,l.fill??"",l.color??"",l.center??!1,l.wrap??!1]),r=new Map([[s({}),0]]);for(let l of e)for(let c of l.rows)for(let $ of c){if(typeof $!="object")continue;let{v:S,...R}=$,P=s(R);r.has(P)||(r.set(P,n.length),n.push(R))}let t=new Map([["|",0]]),a=new Map([["",0]]),d=l=>{let c=`${l.bold?"b":""}|${l.color??""}`;return t.has(c)||t.set(c,t.size),t.get(c)},p=l=>l.fill?(a.has(l.fill)||a.set(l.fill,a.size+1),a.get(l.fill)):0,y=n.map(l=>{let c=l.center||l.wrap?`<alignment${l.center?' horizontal="center"':""}${l.wrap?' wrapText="1"':""} vertical="top"/>`:'<alignment vertical="top"/>';return`<xf numFmtId="0" fontId="${d(l)}" fillId="${p(l)}" borderId="${l.fill||l.bold?1:0}" xfId="0" applyFont="1" applyFill="1" applyBorder="1" applyAlignment="1">${c}</xf>`}),g=[...t.keys()].map(l=>{let[c,$]=l.split("|");return`<font>${c?"<b/>":""}<sz val="11"/>${$?`<color rgb="FF${$}"/>`:""}<name val="Calibri"/><family val="2"/></font>`}),m=['<fill><patternFill patternType="none"/></fill>','<fill><patternFill patternType="gray125"/></fill>',...[...a.keys()].filter(Boolean).map(l=>`<fill><patternFill patternType="solid"><fgColor rgb="FF${l}"/><bgColor indexed="64"/></patternFill></fill>`)];return{xml:`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
137
+ <script>(()=>{var ve="https://github.com/microsoft/skills-for-copilot-studio/blob/main/patterns",ee=[{id:"orchestrator-variables",name:"Orchestrator-Generated Variables",sign:"an OnRecognizedIntent topic with an AutomaticTaskInput that has shouldPromptUser: false"},{id:"rai-error-handling",name:"RAI Error Handling",sign:"the OnError topic reads System.Error.SubCode"},{id:"knowledge-hold-message",name:"Knowledge Hold Message",sign:"an OnKnowledgeRequested topic that sends a message"},{id:"prevent-tool-call-leaks",name:"Prevent Tool Call Leaks",sign:"an OnGeneratedResponse topic that sets System.ContinueResponse"},{id:"dynamic-topic-redirect",name:"Dynamic Topic Redirect",sign:"a BeginDialog whose dialog is a =Switch( expression"},{id:"channel-aware-behavior",name:"Channel-Aware Behavior",sign:"a condition or SetVariable that reads System.Activity.ChannelId (not a tool input)"},{id:"date-context",name:"Date Context",sign:"the instructions use Today() or Now()"},{id:"line-breaks-in-messages",name:"Line Breaks in Messages",sign:"<br /> inside a SendActivity or Question"},{id:"conversation-history-variable",name:"Conversation History Variable"},{id:"chain-of-thought-logging",name:"Chain of Thought Logging"},{id:"deterministic-mcp-calls",name:"Deterministic MCP Calls"},{id:"prevent-child-agent-responses",name:"Prevent Child Agent Responses"},{id:"jit-glossary",name:"JIT Glossary"},{id:"jit-user-context",name:"JIT User Context"},{id:"teams-production-hardening",name:"Teams Production Hardening"}];var G={conversation:{en:"A. Conversation",pt:"A. Conversa"},integrations:{en:"B. Integrations",pt:"B. Integra\xE7\xF5es"},knowledge:{en:"C. Knowledge",pt:"C. Conhecimento"},orchestration:{en:"D. Orchestrator",pt:"D. Orquestrador"},governance:{en:"E. Governance",pt:"E. Governan\xE7a"},text:{en:"F. Text",pt:"F. Texto"},microsoft:{en:"Microsoft patterns",pt:"Padr\xF5es Microsoft"},declared:{en:"Declared",pt:"Declarado"}},ke={"trigger:OnConversationStart":{dim:"conversation",en:"Greeting",pt:"Boas-vindas"},"trigger:OnUnknownIntent":{dim:"conversation",en:"Fallback (when it does not understand)",pt:"Fallback (quando n\xE3o entende)"},"trigger:OnEscalate":{dim:"conversation",en:"Escalation to a person",pt:"Escalonamento para humano",lacks:{en:["does not escalate to a person","do not escalate to a person"],pt:["n\xE3o escala para humano","n\xE3o escalam para humano"]}},"trigger:OnError":{dim:"conversation",en:"Error handling",pt:"Tratamento de erro",lacks:{en:["does not handle errors","do not handle errors"],pt:["n\xE3o trata erro","n\xE3o tratam erro"]}},"trigger:OnRecognizedIntent":{dim:"conversation",en:"A topic of its own, by intent",pt:"T\xF3pico pr\xF3prio, por inten\xE7\xE3o"},"trigger:OnRedirect":{dim:"orchestration",phrase:!0,en:"Takes a call from the orchestrator",pt:"Recebe chamada do orquestrador",lacks:{en:["takes no call from the orchestrator","take no call from the orchestrator"],pt:["n\xE3o recebe chamada do orquestrador","n\xE3o recebem chamada do orquestrador"]}},"trigger:OnSelectIntent":{dim:"conversation",en:"Disambiguation (\xABdid you mean\u2026\xBB)",pt:"Desambigua\xE7\xE3o (\xABvoc\xEA quis dizer\u2026\xBB)"},"trigger:OnSignIn":{dim:"conversation",en:"Sign-in",pt:"Login"},"trigger:OnGeneratedResponse":{dim:"conversation",phrase:!0,en:"Reviews the generated answer",pt:"Revisa a resposta gerada"},"trigger:OnKnowledgeRequested":{dim:"knowledge",en:"Before searching knowledge",pt:"Antes de buscar no conhecimento"},"trigger:OnToolSelected":{dim:"orchestration",en:"Child chosen as a tool",pt:"Filho escolhido como ferramenta"},"trigger:OnActivity":{dim:"conversation",en:"On every message",pt:"Em toda mensagem"},"setting:generative=on":{dim:"conversation",en:"Generative orchestration on",pt:"Orquestra\xE7\xE3o generativa ligada"},"setting:generative=off":{dim:"conversation",en:"Generative orchestration off",pt:"Orquestra\xE7\xE3o generativa desligada"},"setting:model-knowledge=on":{dim:"governance",en:"The model's general knowledge on",pt:"Conhecimento geral do modelo ligado"},"setting:model-knowledge=off":{dim:"governance",en:"The model's general knowledge off",pt:"Conhecimento geral do modelo desligado"},"setting:semantic-search=on":{dim:"knowledge",en:"Semantic search on",pt:"Busca sem\xE2ntica ligada"},"setting:semantic-search=off":{dim:"knowledge",en:"Semantic search off",pt:"Busca sem\xE2ntica desligada"},"setting:web-browsing=on":{dim:"knowledge",en:"Web browsing on",pt:"Navega\xE7\xE3o na web ligada"},"setting:web-browsing=off":{dim:"knowledge",en:"Web browsing off",pt:"Navega\xE7\xE3o na web desligada"},"setting:connectable":{dim:"orchestration",phrase:!0,en:"Can be called by an orchestrator",pt:"Pode ser chamado por um orquestrador"},"called-with:history":{dim:"orchestration",phrase:!0,en:"Receives the conversation history",pt:"Recebe o hist\xF3rico da conversa",lacks:{en:["does not receive the conversation history from the orchestrator","do not receive the conversation history from the orchestrator"],pt:["n\xE3o recebe o hist\xF3rico da conversa do orquestrador","n\xE3o recebem o hist\xF3rico da conversa do orquestrador"]}},"routing:described":{dim:"orchestration",phrase:!0,en:"Has a routing description",pt:"Tem descri\xE7\xE3o de roteamento",lacks:{en:["has no routing description","have no routing description"],pt:["n\xE3o tem descri\xE7\xE3o de roteamento","n\xE3o t\xEAm descri\xE7\xE3o de roteamento"]}},"flow-returns":{dim:"integrations",phrase:!0,en:"The flow returns an answer",pt:"O fluxo devolve uma resposta",lacks:{en:["has a flow that returns nothing","have a flow that returns nothing"],pt:["tem fluxo que n\xE3o devolve nada","t\xEAm fluxo que n\xE3o devolve nada"]}},"flow-uses:child-flow":{dim:"integrations",phrase:!0,en:"The flow calls another flow",pt:"O fluxo chama outro fluxo"},"topics:with-model-description":{dim:"conversation",en:"Topics described for the model",pt:"T\xF3picos descritos para o modelo"},"instructions:present":{dim:"governance",phrase:!0,en:"Has instructions",pt:"Tem instru\xE7\xF5es",lacks:{en:["has no instructions","have no instructions"],pt:["n\xE3o tem instru\xE7\xF5es","n\xE3o t\xEAm instru\xE7\xF5es"]}},"node:LogCustomTelemetryEvent":{dim:"governance",phrase:!0,en:"Logs telemetry",pt:"Registra telemetria",lacks:{en:["logs no telemetry","log no telemetry"],pt:["n\xE3o registra telemetria","n\xE3o registram telemetria"]}},"node:CSATQuestion":{dim:"governance",phrase:!0,en:"Asks for satisfaction (CSAT)",pt:"Pergunta a satisfa\xE7\xE3o (CSAT)",lacks:{en:["does not ask for satisfaction","do not ask for satisfaction"],pt:["n\xE3o pergunta a satisfa\xE7\xE3o","n\xE3o perguntam a satisfa\xE7\xE3o"]}},"node:SearchAndSummarizeContent":{dim:"knowledge",en:"Generative answers from knowledge",pt:"Respostas generativas sobre o conhecimento"},"node:SearchKnowledgeSources":{dim:"knowledge",phrase:!0,en:"Searches the knowledge sources",pt:"Busca nas fontes de conhecimento"},"yaml-only:triggerCondition":{dim:"knowledge",en:"Search condition only in YAML (the editor may erase it)",pt:"Condi\xE7\xE3o de busca s\xF3 no YAML (a tela pode apagar)"},"knowledge:SharePointSearchSource":{dim:"knowledge",en:"Knowledge in SharePoint",pt:"Conhecimento no SharePoint"},"declared:kpi":{dim:"declared",en:"KPI declared",pt:"KPI declarado",lacks:{en:["has no KPI declared","have no KPI declared"],pt:["n\xE3o tem KPI declarado","n\xE3o t\xEAm KPI declarado"]}},"eval:run":{dim:"governance",phrase:!0,en:"Passed through an evaluation",pt:"Passou por uma avalia\xE7\xE3o",lacks:{en:["has no evaluation","have no evaluation"],pt:["n\xE3o tem avalia\xE7\xE3o","n\xE3o t\xEAm avalia\xE7\xE3o"]}},"declared:team":{dim:"declared",en:"Team declared",pt:"Equipe declarada",lacks:{en:["has no team declared","have no team declared"],pt:["n\xE3o tem equipe declarada","n\xE3o t\xEAm equipe declarada"]}},"declared:owner":{dim:"declared",en:"Owner declared",pt:"Respons\xE1vel declarado",lacks:{en:["has no owner declared","have no owner declared"],pt:["n\xE3o tem respons\xE1vel declarado","n\xE3o t\xEAm respons\xE1vel declarado"]}}},Be=Object.fromEntries(ee.map(e=>[e.id,e.name])),Ke=[["called-with:input:","orchestration","Receives <value> from the orchestrator","Recebe <valor> do orquestrador"],["flow-uses:http:","integrations","Flow calls","Fluxo chama"],["flow-uses:connector:","integrations","Flow uses the connector","Fluxo usa o conector"],["flow-uses:operation:","integrations","Flow uses the operation","Fluxo usa a opera\xE7\xE3o"],["orphan:topic:","governance","Topic nobody calls","T\xF3pico que ningu\xE9m chama"],["orphan:action:","governance","Tool nobody can choose","Ferramenta que ningu\xE9m escolhe"],["orphan:variable:","governance","Variable nobody uses","Vari\xE1vel que ningu\xE9m usa"],["orphan:flow:","governance","Flow nobody calls","Fluxo que ningu\xE9m chama"],["disabled:node:","governance","Switched-off node","N\xF3 desligado"],["telemetry:event:","governance","Logs the event","Registra o evento"],["telemetry:field:","governance","The event carries the field (<event>/<field>)","O evento leva o campo (<evento>/<campo>)"],["disabled:","governance","Switched off","Desligado"],["reaches:","conversation","A topic leads to it (part of trigger:<value>)","Um t\xF3pico leva a ele (parte de trigger:<valor>)"],["calls:topic:","conversation","Calls the topic (one not found)","Chama o t\xF3pico (n\xE3o encontrado)"],["trigger:","conversation","Trigger","Gatilho"],["setting:","conversation","Setting","Configura\xE7\xE3o"],["connector:","integrations","Connector","Conector"],["operation:","integrations","Operation","Opera\xE7\xE3o"],["connref:","integrations","Connection reference","Refer\xEAncia de conex\xE3o"],["mcp:","integrations","MCP server","Servidor MCP"],["flow:","integrations","Flow","Fluxo"],["knowledge:","knowledge","Knowledge","Conhecimento"],["node:","governance","Node","N\xF3"],["calls:","orchestration","Calls","Chama"],["child:","orchestration","Child","Filho"],["var-in:","orchestration","Receives from the orchestrator","Recebe do orquestrador"],["var:","orchestration","Global variable","Vari\xE1vel global"],["model:","governance","Model","Modelo"],["auth:","governance","Sign-in","Login"],["ms:","microsoft","Microsoft pattern:","Padr\xE3o Microsoft:"],["text:","text","Text:","Texto:"],["declared:","declared","Declared:","Declarado:"]],Pe=e=>Ke.find(([n])=>e.startsWith(n));function _(e){return e.startsWith("reaches:")?_(`trigger:${e.slice(8)}`):ke[e]?.dim??Pe(e)?.[1]??"governance"}var je=80;function we(e){if(e.startsWith("reaches:"))return`trigger:${e.slice(8)}`;if(e.startsWith("telemetry:event:"))return"node:LogCustomTelemetryEvent";if(e.startsWith("telemetry:field:"))return`telemetry:event:${e.slice(16,e.lastIndexOf("/"))}`}var E=(e,n)=>e.split("{agent}").join(n==="pt"?"\u2039nome\u203A":"\u2039name\u203A"),Ye=e=>({form:e.slice(16,e.lastIndexOf("/")),field:e.slice(e.lastIndexOf("/")+1)}),Qe={shared_commondataserviceforapps:"Microsoft Dataverse",shared_sharepointonline:"SharePoint",shared_office365:"Office 365 Outlook",shared_office365users:"Office 365 Users",shared_teams:"Microsoft Teams",shared_approvals:"Approvals",shared_onedriveforbusiness:"OneDrive for Business",shared_excelonlinebusiness:"Excel Online (Business)",shared_sql:"SQL Server",shared_azureblob:"Azure Blob Storage",shared_planner:"Planner",shared_outlook:"Outlook.com",shared_webcontents:"HTTP with Microsoft Entra ID",shared_servicenow:"ServiceNow",shared_salesforce:"Salesforce"},Ce=(e,n)=>n?.[e]??Qe[e]??e,Xe=["called-with:input:","telemetry:event:","telemetry:field:","flow-uses:","var-in:","reaches:"],Ne=e=>!!ke[e]?.phrase||Xe.some(n=>e.startsWith(n));function T(e,n,a){let r=ke[e];if(r)return r[n];if(e.startsWith("text:block:")){let c=e.endsWith("~variant"),m=c?e.slice(0,-8):e,h=a?.[m]??m.slice(11);return c?`${h} (${n==="pt"?"varia\xE7\xE3o":"variation"})`:h}if(e.startsWith("text:link-domain:"))return`${n==="pt"?"Link para":"Link to"} ${e.slice(17)}`;if(e==="text:email")return n==="pt"?"Cita um e-mail":"Mentions an e-mail";if(e.startsWith("text:")){let[c,m]=[e.slice(5).split("=")[0],e.includes("=")?e.slice(e.indexOf("=")+1):void 0],h=a?.[`text:${c}`]??c;return m===void 0?h:`${h} = ${m}`}if(e.startsWith("reaches:")){let c=T(`trigger:${e.slice(8)}`,n);return n==="pt"?`Um t\xF3pico leva a \xAB${c}\xBB`:`A topic leads to \xAB${c}\xBB`}if(e.startsWith("called-with:input:"))return n==="pt"?`Recebe \xAB${e.slice(18)}\xBB do orquestrador`:`Receives \xAB${e.slice(18)}\xBB from the orchestrator`;if(e.startsWith("telemetry:event:"))return n==="pt"?`Registra o evento \xAB${E(e.slice(16),n)}\xBB`:`Logs the event \xAB${E(e.slice(16),n)}\xBB`;if(e.startsWith("telemetry:field:")){let{form:c,field:m}=Ye(e),h=E(c,n);return n==="pt"?`\xAB${h}\xBB leva \xAB${m}\xBB`:`\xAB${h}\xBB carries \xAB${m}\xBB`}let t=/^knowledge:count=(\d+)$/.exec(e);if(t){let c=Number(t[1]);return n==="pt"?`${c} ${c===1?"fonte":"fontes"} de conhecimento`:`${c} knowledge ${c===1?"source":"sources"}`}let s=Pe(e);if(!s)return e;let l=e.slice(s[0].length);if(s[0]==="ms:"&&(l=Be[l]??l),s[0]==="auth:"&&l==="None")return n==="pt"?"Sem login":"No sign-in";if(e.startsWith("setting:moderation="))return n==="pt"?`Modera\xE7\xE3o de conte\xFAdo: ${e.slice(19)}`:`Content moderation: ${e.slice(19)}`;if(["connector:","connref:","mcp:","calls:","flow:","flow-uses:connector:","orphan:flow:"].includes(s[0])&&(l=Ce(l,a)),s[0]==="disabled:"&&(l=l.replace(":"," ")),s[0]==="operation:"||s[0]==="flow-uses:operation:"){let[c,m]=[l.slice(0,l.indexOf("/")),l.slice(l.indexOf("/")+1)];l=`${Ce(c,a)} \xB7 ${m}`}return`${s[n==="pt"?3:2]} ${l}`}var Je={specialist:{en:["specialist","specialists"],pt:["especialista","especialistas"]},orchestrator:{en:["orchestrator","orchestrators"],pt:["orquestrador","orquestradores"]}},be=(e,n,a)=>Je[e][n][a===1?0:1],te={en:{summary:"Summary",matrix:"Matrix",patterns:"Patterns",text:"Text",off:"Off pattern",gaps:"Gaps",conflicts:"Conflicts",agents:"Cast",evidence:"Evidence",declared:"Declared",unknown:"Not understood",routing:"Routing",unused:"Unused",telemetry:"Telemetry",written:"As written",form:"Form",fields:"Fields",fired:e=>`Fired (${e} days)`,notRead:"not read",caller:"Caller",called:"Called",history:"History",inputs:"Inputs",routingText:"Routing description",chars:"Characters",notInFolder:"not in the folder",what:"What",how:"How",thing:{topic:"topic",action:"tool",variable:"variable",flow:"flow",node:"node",knowledge:"knowledge source"},orphan:"nobody uses it",disabled:"switched off",dimension:"Dimension",fact:"Fact",key:"Key",agent:"Who",name:"Name",role:"Role",scope:"Scope",share:"Share",have:"Who has it",lack:"Who lacks it",decision:"Decision",why:"Why",missing:"Missing",accepted:"Accepted pattern",rule:"Rule",says:"Says",notMet:"Who does not meet it",value:"Value",source:"Source",inYaml:"In the YAML",file:"File",line:"Line",facts:"Facts",alone:"Only it has",children:"Children",kind:"Kind",types:"Types",id:"Id",label:"Label",body:"Text",variant:"Variation",official:"Official",type:"type",yes:"yes",no:"no",accept:"accepted",reject:"rejected",platform:"platform",specialist:"specialist",orchestrator:"orchestrator",staff:"Staff",pdi:"Development plan",situation_:"Situation",manager:"Manager",teamCol:"Team",ownerCol:"Owner",hired:"Hired",publishedCol:"Published",items:"Plan items",item:"Item",group:"Group",situation:{hiring:"being hired",noOwner:"no owner",neverPublished:"never published",noEval:"no evaluation",pdi:"in a plan",ok:"in good standing"},pdiGroup:{contradictions:"contradiction",contract:"contract",off:"off pattern",rules:"rule",text:"text",telemetry:"telemetry",cleanup:"cleanup"},title:"The cast, compared",look:"To look at",nothing:"Nothing to look at",privacy:"This file holds the client\u2019s data: keep it in the client\u2019s environment.",count:{agents:"In the cast",orchestrators:"Orchestrators",specialists:"Specialists",patterns:"Patterns",off:"Off a pattern",gaps:"Rules not met",conflicts:"Conflicts",solos:"Only one has it",unused:"Unused or switched off"},why_:{yaml:"YAML that does not read",empty:"empty",kind:"a kind Copilot Studio does not have",file:"not a Copilot Studio file",json:"JSON that does not read",flow:"a flow in a shape the analysis does not know",telemetry:"a telemetry event whose name is a formula"}},pt:{summary:"Resumo",matrix:"Matriz",patterns:"Padr\xF5es",text:"Texto",off:"Fora do padr\xE3o",gaps:"Lacunas",conflicts:"Conflitos",agents:"Elenco",evidence:"Evid\xEAncias",declared:"Declarado",unknown:"N\xE3o entendeu",routing:"Roteamento",unused:"Sem uso",telemetry:"Telemetria",written:"Como est\xE1 escrito",form:"Forma",fields:"Campos",fired:e=>`Disparou (${e} dias)`,notRead:"n\xE3o lido",caller:"Quem chama",called:"Chamado",history:"Hist\xF3rico",inputs:"Entradas",routingText:"Descri\xE7\xE3o de roteamento",chars:"Caracteres",notInFolder:"n\xE3o est\xE1 na pasta",what:"O qu\xEA",how:"Como",thing:{topic:"t\xF3pico",action:"ferramenta",variable:"vari\xE1vel",flow:"fluxo",node:"n\xF3",knowledge:"fonte de conhecimento"},orphan:"ningu\xE9m usa",disabled:"desligado",dimension:"Dimens\xE3o",fact:"Fato",key:"Chave",agent:"Quem",name:"Nome",role:"Papel",scope:"Escopo",share:"Quantos",have:"Quem tem",lack:"Quem falta",decision:"Decis\xE3o",why:"Por qu\xEA",missing:"Falta",accepted:"Padr\xE3o aceito",rule:"Regra",says:"Diz",notMet:"Quem n\xE3o cumpre",value:"Valor",source:"Fonte",inYaml:"No YAML",file:"Arquivo",line:"Linha",facts:"Fatos",alone:"S\xF3 ele tem",children:"Filhos",kind:"Kind",types:"Tipos",id:"Id",label:"R\xF3tulo",body:"Texto",variant:"Varia\xE7\xE3o",official:"Oficial",type:"tipo",yes:"sim",no:"n\xE3o",accept:"aceito",reject:"rejeitado",platform:"plataforma",specialist:"especialista",orchestrator:"orquestrador",staff:"Quadro de pessoal",pdi:"PDI",situation_:"Situa\xE7\xE3o",manager:"Gestor",teamCol:"Equipe",ownerCol:"Respons\xE1vel",hired:"Admiss\xE3o",publishedCol:"Publica\xE7\xE3o",items:"Itens de PDI",item:"Item",group:"Grupo",situation:{hiring:"em admiss\xE3o",noOwner:"sem respons\xE1vel",neverPublished:"nunca publicado",noEval:"sem avalia\xE7\xE3o",pdi:"em PDI",ok:"em dia"},pdiGroup:{contradictions:"contradi\xE7\xE3o",contract:"contrato",off:"fora do padr\xE3o",rules:"regra",text:"texto",telemetry:"telemetria",cleanup:"limpeza"},title:"Elenco comparado",look:"Para olhar",nothing:"Nada para olhar",privacy:"Este arquivo tem dados do cliente: deixe-o no ambiente dele.",count:{agents:"No elenco",orchestrators:"Orquestradores",specialists:"Especialistas",patterns:"Padr\xF5es",off:"Fora do padr\xE3o",gaps:"Regras n\xE3o cumpridas",conflicts:"Conflitos",solos:"S\xF3 um tem",unused:"Sem uso ou desligado"},why_:{yaml:"YAML que n\xE3o se l\xEA",empty:"vazio",kind:"um kind que o Copilot Studio n\xE3o tem",file:"n\xE3o \xE9 arquivo do Copilot Studio",json:"JSON que n\xE3o se l\xEA",flow:"um fluxo num formato que a an\xE1lise n\xE3o conhece",telemetry:"um evento de telemetria com o nome em f\xF3rmula"}}};var Fe=[{key:"contradictions",en:"Contradictions",pt:"Contradi\xE7\xF5es",keys:["conflict","contradiction"]},{key:"contract",en:"Contract and telemetry",pt:"Contrato e telemetria",keys:["spelling","contract","flow","telemetry"]},{key:"off",en:"Off pattern",pt:"Fora do padr\xE3o",keys:["off","values","twice","type"]},{key:"rules",en:"Rules",pt:"Regras",keys:["gap"]},{key:"solo",en:"Only one has it",pt:"S\xF3 um tem",keys:["solo"],folded:!0},{key:"unused",en:"Unused",pt:"Sem uso",keys:["unused"],folded:!0},{key:"unknown",en:"Not understood",pt:"N\xE3o entendeu",keys:["unknown","unmatched"]}],Wt=Fe.flatMap(e=>e.keys);function ne(e){return Fe.map(n=>({key:n.key,en:n.en,pt:n.pt,folded:!!n.folded,looks:e.flatMap((a,r)=>n.keys.includes(a.key)?[{look:a,at:r}]:[])})).filter(n=>n.looks.length)}function oe(e){let n=t=>e.offPattern.some(s=>s.key===t.key||s.partOf===t.key),a=t=>t.share===1&&!t.decision&&!n(t),r=e.patterns.filter(t=>!t.partOf);return{look:r.filter(t=>!a(t)),everyone:r.filter(a)}}var Ie=new TextEncoder,xe=e=>e.replace(/[&<>"]/g,n=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[n]).replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F]/g,""),Q=e=>e<26?String.fromCharCode(65+e):Q(Math.floor(e/26)-1)+String.fromCharCode(65+e%26),Ze=e=>e.replace(/[:\\/?*[\]]/g," ").slice(0,31)||"Sheet";function et(e){let n=[{}],a=d=>JSON.stringify([d.bold??!1,d.fill??"",d.color??"",d.center??!1,d.wrap??!1]),r=new Map([[a({}),0]]);for(let d of e)for(let p of d.rows)for(let k of p){if(typeof k!="object")continue;let{v:j,...P}=k,W=a(P);r.has(W)||(r.set(W,n.length),n.push(P))}let t=new Map([["|",0]]),s=new Map([["",0]]),l=d=>{let p=`${d.bold?"b":""}|${d.color??""}`;return t.has(p)||t.set(p,t.size),t.get(p)},c=d=>d.fill?(s.has(d.fill)||s.set(d.fill,s.size+1),s.get(d.fill)):0,m=n.map(d=>{let p=d.center||d.wrap?`<alignment${d.center?' horizontal="center"':""}${d.wrap?' wrapText="1"':""} vertical="top"/>`:'<alignment vertical="top"/>';return`<xf numFmtId="0" fontId="${l(d)}" fillId="${c(d)}" borderId="${d.fill||d.bold?1:0}" xfId="0" applyFont="1" applyFill="1" applyBorder="1" applyAlignment="1">${p}</xf>`}),h=[...t.keys()].map(d=>{let[p,k]=d.split("|");return`<font>${p?"<b/>":""}<sz val="11"/>${k?`<color rgb="FF${k}"/>`:""}<name val="Calibri"/><family val="2"/></font>`}),f=['<fill><patternFill patternType="none"/></fill>','<fill><patternFill patternType="gray125"/></fill>',...[...s.keys()].filter(Boolean).map(d=>`<fill><patternFill patternType="solid"><fgColor rgb="FF${d}"/><bgColor indexed="64"/></patternFill></fill>`)];return{xml:`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
137
138
  <styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
138
- <fonts count="${g.length}">${g.join("")}</fonts>
139
- <fills count="${m.length}">${m.join("")}</fills>
139
+ <fonts count="${h.length}">${h.join("")}</fonts>
140
+ <fills count="${f.length}">${f.join("")}</fills>
140
141
  <borders count="2"><border><left/><right/><top/><bottom/><diagonal/></border><border><left style="thin"><color rgb="FFD0D7E2"/></left><right style="thin"><color rgb="FFD0D7E2"/></right><top style="thin"><color rgb="FFD0D7E2"/></top><bottom style="thin"><color rgb="FFD0D7E2"/></bottom><diagonal/></border></borders>
141
142
  <cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs>
142
- <cellXfs count="${y.length}">${y.join("")}</cellXfs>
143
+ <cellXfs count="${m.length}">${m.join("")}</cellXfs>
143
144
  <cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles>
144
- </styleSheet>`,styleOf:l=>typeof l=="object"?r.get(s((({v:c,...$})=>$)(l)))??0:0}}function Pe(e,n){let s=Math.max(e.columns.length,...e.rows.map(y=>y.length),1),r=e.rows.map((y,g)=>{let m=y.map((v,l)=>{let c=`${E(l)}${g+1}`,$=typeof v=="object"?v.v:v,S=n(v),R=S?` s="${S}"`:"";return $===""||$===void 0||$===null?S?`<c r="${c}"${R}/>`:"":typeof $=="number"?`<c r="${c}"${R}><v>${$}</v></c>`:`<c r="${c}"${R} t="inlineStr"><is><t xml:space="preserve">${te(String($))}</t></is></c>`}).join("");return`<row r="${g+1}">${m}</row>`}),t=`${E(s-1)}${Math.max(1,e.rows.length)}`,a=e.header?'<pane ySplit="1" topLeftCell="A2" activePane="bottomLeft" state="frozen"/><selection pane="bottomLeft" activeCell="A2" sqref="A2"/>':"",d=e.columns.length?`<cols>${e.columns.map((y,g)=>`<col min="${g+1}" max="${g+1}" width="${y.width}" customWidth="1"/>`).join("")}</cols>`:"",p=e.header&&e.rows.length>1?`<autoFilter ref="A1:${E(Math.max(0,e.columns.length-1))}${e.rows.length}"/>`:"";return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
145
+ </styleSheet>`,styleOf:d=>typeof d=="object"?r.get(a((({v:p,...k})=>k)(d)))??0:0}}function tt(e,n){let a=Math.max(e.columns.length,...e.rows.map(m=>m.length),1),r=e.rows.map((m,h)=>{let f=m.map((b,d)=>{let p=`${Q(d)}${h+1}`,k=typeof b=="object"?b.v:b,j=n(b),P=j?` s="${j}"`:"";return k===""||k===void 0||k===null?j?`<c r="${p}"${P}/>`:"":typeof k=="number"?`<c r="${p}"${P}><v>${k}</v></c>`:`<c r="${p}"${P} t="inlineStr"><is><t xml:space="preserve">${xe(String(k))}</t></is></c>`}).join("");return`<row r="${h+1}">${f}</row>`}),t=`${Q(a-1)}${Math.max(1,e.rows.length)}`,s=e.header?'<pane ySplit="1" topLeftCell="A2" activePane="bottomLeft" state="frozen"/><selection pane="bottomLeft" activeCell="A2" sqref="A2"/>':"",l=e.columns.length?`<cols>${e.columns.map((m,h)=>`<col min="${h+1}" max="${h+1}" width="${m.width}" customWidth="1"/>`).join("")}</cols>`:"",c=e.header&&e.rows.length>1?`<autoFilter ref="A1:${Q(Math.max(0,e.columns.length-1))}${e.rows.length}"/>`:"";return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
145
146
  <worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
146
- <dimension ref="A1:${t}"/><sheetViews><sheetView workbookViewId="0">${a}</sheetView></sheetViews><sheetFormatPr defaultRowHeight="15"/>${d}<sheetData>${r.join("")}</sheetData>${p}
147
- </worksheet>`}function me(e){let{xml:n,styleOf:s}=Ee(e),r=e.map(d=>Le(d.name)),t=e.map((d,p)=>d.header&&d.rows.length>1?`<definedName name="_xlnm._FilterDatabase" localSheetId="${p}" hidden="1">'${te(r[p]).replace(/'/g,"''")}'!$A$1:$${E(Math.max(0,d.columns.length-1))}$${d.rows.length}</definedName>`:"").join(""),a=[["[Content_Types].xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
148
- <Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/>${e.map((d,p)=>`<Override PartName="/xl/worksheets/sheet${p+1}.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/>`).join("")}</Types>`],["_rels/.rels",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
147
+ <dimension ref="A1:${t}"/><sheetViews><sheetView workbookViewId="0">${s}</sheetView></sheetViews><sheetFormatPr defaultRowHeight="15"/>${l}<sheetData>${r.join("")}</sheetData>${c}
148
+ </worksheet>`}function Ee(e){let{xml:n,styleOf:a}=et(e),r=e.map(l=>Ze(l.name)),t=e.map((l,c)=>l.header&&l.rows.length>1?`<definedName name="_xlnm._FilterDatabase" localSheetId="${c}" hidden="1">'${xe(r[c]).replace(/'/g,"''")}'!$A$1:$${Q(Math.max(0,l.columns.length-1))}$${l.rows.length}</definedName>`:"").join(""),s=[["[Content_Types].xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
149
+ <Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/>${e.map((l,c)=>`<Override PartName="/xl/worksheets/sheet${c+1}.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/>`).join("")}</Types>`],["_rels/.rels",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
149
150
  <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>`],["xl/workbook.xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
150
- <workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><bookViews><workbookView/></bookViews><sheets>${r.map((d,p)=>`<sheet name="${te(d)}" sheetId="${p+1}" r:id="rId${p+1}"/>`).join("")}</sheets>${t?`<definedNames>${t}</definedNames>`:""}</workbook>`],["xl/_rels/workbook.xml.rels",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
151
- <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">${e.map((d,p)=>`<Relationship Id="rId${p+1}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet${p+1}.xml"/>`).join("")}<Relationship Id="rId${e.length+1}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/></Relationships>`],["xl/styles.xml",n],...e.map((d,p)=>[`xl/worksheets/sheet${p+1}.xml`,Pe(d,s)])];return qe(a.map(([d,p])=>[d,pe.encode(p)]))}var Ue=(()=>{let e=new Uint32Array(256);for(let n=0;n<256;n++){let s=n;for(let r=0;r<8;r++)s=s&1?3988292384^s>>>1:s>>>1;e[n]=s>>>0}return e})();function We(e){let n=4294967295;for(let s=0;s<e.length;s++)n=Ue[(n^e[s])&255]^n>>>8;return(n^4294967295)>>>0}function qe(e){let n=[],s=[],r=0;for(let[g,m]of e){let v=pe.encode(g),l=We(m),c=new DataView(new ArrayBuffer(30));c.setUint32(0,67324752,!0),c.setUint16(4,20,!0),c.setUint16(6,2048,!0),c.setUint16(8,0,!0),c.setUint32(14,l,!0),c.setUint32(18,m.length,!0),c.setUint32(22,m.length,!0),c.setUint16(26,v.length,!0),n.push(new Uint8Array(c.buffer),v,m);let $=new DataView(new ArrayBuffer(46));$.setUint32(0,33639248,!0),$.setUint16(4,20,!0),$.setUint16(6,20,!0),$.setUint16(8,2048,!0),$.setUint32(16,l,!0),$.setUint32(20,m.length,!0),$.setUint32(24,m.length,!0),$.setUint16(28,v.length,!0),$.setUint32(42,r,!0),s.push(new Uint8Array($.buffer),v),r+=30+v.length+m.length}let t=s.reduce((g,m)=>g+m.length,0),a=new DataView(new ArrayBuffer(22));a.setUint32(0,101010256,!0),a.setUint16(8,e.length,!0),a.setUint16(10,e.length,!0),a.setUint32(12,t,!0),a.setUint32(16,r,!0);let d=[...n,...s,new Uint8Array(a.buffer)],p=new Uint8Array(d.reduce((g,m)=>g+m.length,0)),y=0;for(let g of d)p.set(g,y),y+=g.length;return p}var ue=e=>me(e),Ve={bold:!0,fill:"E8EEF7"},_e={v:"\u25CF",fill:"DDF3E6",center:!0},Be={v:"\xD7",fill:"FFD5CC",center:!0,bold:!0},ze={v:"\u25D0",fill:"FFF3C4",center:!0},Ge={v:"\u2248",fill:"FFF6DC",center:!0,bold:!0},fe=Object.keys(D);function he(e,n,s,r="en"){let t=q[r],a=(o,u,k)=>({key:o,name:t[o],header:!0,columns:u.map(([N,U])=>({title:N,width:U})),rows:[u.map(([N])=>({v:N,...Ve})),...k]}),d=o=>t[e.roles[o]],p=o=>o.startsWith("type:")?`${t.type}:${e.typeNames[o.slice(5)]??o.slice(5)}`:t[o],y=o=>(e.types[o]??[]).map(u=>e.typeNames[u]??u).join(" \xB7 "),g=o=>C(o,r,e.names),m=[...e.agents].sort((o,u)=>o.role===u.role?o.id.localeCompare(u.id):o.role==="orchestrator"?-1:1),v=[...new Set([...m.flatMap(o=>Object.keys(o.facts)),...e.patterns.map(o=>o.key)])].filter(o=>!o.endsWith("~variant")).sort((o,u)=>fe.indexOf(F(o))-fe.indexOf(F(u))||o.localeCompare(u)),l=new Set(e.offPattern.map(o=>`${o.agent} ${o.key}`)),c=o=>e.agents.filter(u=>u.role===o).length,$={key:"summary",name:t.summary,header:!1,columns:[{title:"",width:28},{title:"",width:100}],rows:[[{v:e.name??t.title,bold:!0},""],[{v:t.privacy,color:"B42318"},""],[t.count.agents,e.agents.length],[t.count.orchestrators,c("orchestrator")],[t.count.specialists,c("specialist")],[t.count.patterns,e.patterns.length],[t.count.off,new Set(e.offPattern.map(o=>o.agent)).size],[t.count.gaps,e.gaps.length],[t.count.conflicts,e.conflicts.length],[t.count.solos,n.filter(o=>o.key==="solo").length],[t.count.unused,e.unused.length],["",""],[{v:n.length?t.look:t.nothing,bold:!0},""],...V(n).flatMap(o=>[[{v:`${o[r]} \xB7 ${o.looks.length}`,bold:!0},""],...o.looks.map(({look:u})=>["",{v:u[r],wrap:!0}])])]},S=a("matrix",[[t.dimension,18],[t.fact,40],[t.key,34],...m.map(o=>[o.id,14])],v.map(o=>[D[F(o)][r],g(o),o,...m.map(u=>o in u.facts?o.startsWith("declared:")?ze:_e:`${o}~variant`in u.facts?Ge:l.has(`${u.id} ${o}`)?Be:"")])),{look:R,everyone:P}=_(e),we=a("patterns",[[t.key,34],[t.fact,40],[t.scope,14],[t.role,14],[t.share,10],[t.have,50],[t.lack,40],[t.decision,12],[t.why,50]],[...R,...P].map(o=>{let u=e.offPattern.filter(k=>k.key===o.key).map(k=>k.agent);return[o.key,g(o.key),p(o.scope),t[o.role],`${Math.round(o.share*100)}%`,o.agents.join(", "),u.join(", "),o.decision?t[o.decision.status==="accepted"?"accept":"reject"]:"",o.decision?.why??""]})),be=a("off",[[t.agent,24],[t.role,14],[t.missing,44],[t.key,34],[t.scope,14],[t.accepted,14]],e.offPattern.map(o=>[o.agent,d(o.agent),g(o.key),o.key,p(o.scope),e.patterns.find(u=>u.key===o.key)?.decision?.status==="accepted"?t.yes:""])),xe=a("gaps",[[t.rule,16],[t.says,50],[t.role,14],[t.notMet,60]],e.gaps.map(o=>[o.rule.id,o.rule.says,o.rule.role?t[o.rule.role]:"",o.agents.join(", ")])),Oe=a("conflicts",[[t.agent,24],[t.fact,40],[t.key,34],[t.declared,20],[t.source,40],[t.inYaml,12]],e.conflicts.map(o=>[o.agent,g(o.key),o.key,o.declared,o.source,o.observed?t.yes:t.no])),Se=a("agents",[[t.agent,24],[t.name,32],[t.role,14],[t.types,24],[t.facts,8],[t.off,44],[t.alone,44],[t.children,24],[t.unknown,12]],m.map(o=>[o.id,o.displayName??"",t[o.role],y(o.id),Object.keys(o.facts).length,e.offPattern.filter(u=>u.agent===o.id).map(u=>g(u.key)).join("; "),e.solos.filter(u=>u.agents[0]===o.id).map(u=>g(u.key)).join("; "),o.children.map(u=>u.name).join(", "),e.unknown.filter(u=>u.agent===o.id).length||""])),Te=a("evidence",[[t.agent,30],[t.fact,40],[t.key,34],[t.file,50],[t.line,8]],m.flatMap(o=>[{who:o.id,facts:o.facts},...o.children.map(u=>({who:`${o.id} \u203A ${u.name}`,facts:u.facts}))]).flatMap(({who:o,facts:u})=>Object.entries(u).sort(([k],[N])=>k.localeCompare(N)).flatMap(([k,N])=>N.map(U=>[o,g(k),k,U.file,U.line??""])))),Ce=a("declared",[[t.agent,24],[t.key,34],[t.value,40],[t.source,40]],s.declared.map(o=>[o.agent,o.key,o.value,o.source])),je=a("text",[[t.id,28],[t.label,36],[t.body,70],[t.have,50],[t.variant,40],[t.official,10]],e.blocks.map(o=>[o.id,o.official??o.label,{v:o.text,wrap:!0},Object.keys(o.holders).sort().join(", "),Object.entries(o.variants).sort(([u],[k])=>u.localeCompare(k)).map(([u,k])=>`${u} (${Math.round(k.similarity*100)}%)`).join(", "),o.official?t.yes:""])),Re=a("routing",[[t.caller,24],[t.called,30],[t.history,10],[t.inputs,30],[t.routingText,70],[t.chars,10],[t.file,44]],e.contract.routes.map(o=>[o.caller,o.agent??`${o.name??o.calls} (${t.notInFolder})`,o.history?t.yes:t.no,o.inputs.join(", "),{v:o.description,wrap:!0},o.description.length,`${o.file}${o.line?`:${o.line}`:""}`])),X=e.telemetry.days,Fe=a("telemetry",[[t.agent,24],[t.written,30],[t.form,28],[t.fields,50],[t.file,44],...X?[[t.fired(X),16]]:[]],e.telemetry.events.map(o=>[o.agent,o.name,A(o.as,r),o.fields?o.fields.join(", "):t.notRead,`${o.file}${o.line?`:${o.line}`:""}`,...X?[o.fired===void 0||e.telemetry.silent.includes(o.agent)?"\u2014":o.fired===0?{v:0,color:"B42318",bold:!0}:o.fired]:[]])),Ne=a("unused",[[t.agent,24],[t.what,16],[t.name,30],[t.how,14],[t.file,50]],e.unused.flatMap(o=>o.sources.map(u=>[o.agent,t.thing[o.what]??o.what,e.names[o.name]??o.name,t[o.how],`${u.file}${u.line?`:${u.line}`:""}`]))),ae=[$,S,we,...e.blocks.length?[je]:[],...e.contract.routes.length?[Re]:[],...e.telemetry.events.length?[Fe]:[],be,xe,Oe,...e.unused.length?[Ne]:[],Se,Te,Ce];return e.unknown.length&&ae.push(a("unknown",[[t.agent,24],[t.file,50],[t.why,40],[t.kind,24]],e.unknown.map(o=>[o.agent,o.file,t.why_[o.why],o.kind??""]))),ae}var He={en:{map:"Map",patterns:"Patterns",cast:"Cast",microsoft:"Microsoft",unknown:e=>`What the analysis did not understand (${e})`,matrix:"Who has what",candidates:"Patterns to decide",everyone:e=>`Everybody already does it (${e})`,all:"All",role:"Role",focus:"Focus",legend:"\u25CF has it (click for the file) \xB7 \xD7 off a pattern of its role or type \xB7 \u2248 a variation of the block \xB7 \u25D0 declared by people",pattern:"pattern",type:"Type",noType:"no type",alsoIn:"also in",official:"official block",variation:"Variation",alike:"alike",text:"The text",types:"Types",of:(e,n,s)=>`${e} of ${n} ${s}`,who:"Who has it",lacks:"Off it",none:"nobody",decision:"Decision",toDecide:"to decide \u2014 in the workbook or the cast file",alone:"Only one has it: innovation or debt?",orchestratorDoes:"Only the orchestrator does it",sign:"How cast-list knows",follows:"Who follows it",declaredOnly:"only declared",nothingUnknown:"Everything was understood.",facts:"Facts",off:"Off a pattern",solo:"Only it has",children:"Children",close:"Close \u2715",foot:"The facts come from the YAML files; nothing was made up.",summary:(e,n,s,r,t)=>`${e} in the cast \xB7 ${n} patterns \xB7 ${s} off a pattern \xB7 ${r} only one has \xB7 threshold ${t}% of each role`,excel:"\u2B07 Excel",yaml:"\u2B07 cast.yaml",png:"\u2B07 PNG",name:"Name",said:"declared",unused:e=>`Unused (${e})`,nothingUnused:"Everything is used, nothing is switched off.",flows:"Flows",returnsNothing:"returns nothing",otherFlow:"another flow",telemetry:"Telemetry",times:(e,n)=>`${e} ${e===1?"time":"times"} in ${n} days`,notFired:"did not fire",noLine:"no line in the telemetry",routing:"Routing",called:"Called",history:"History",inputs:"Inputs",description:"Description",notInFolder:"not in the folder",chars:e=>`${e} characters`},pt:{map:"Mapa",patterns:"Padr\xF5es",cast:"Elenco",microsoft:"Microsoft",unknown:e=>`O que a an\xE1lise n\xE3o entendeu (${e})`,matrix:"Quem tem o qu\xEA",candidates:"Padr\xF5es para decidir",everyone:e=>`Todos j\xE1 fazem (${e})`,all:"Todos",role:"Papel",focus:"Foco",legend:"\u25CF tem (clique para ver o arquivo) \xB7 \xD7 fora de um padr\xE3o do seu papel ou tipo \xB7 \u2248 tem uma varia\xE7\xE3o do bloco \xB7 \u25D0 declarado por pessoas",pattern:"padr\xE3o",type:"Tipo",noType:"sem tipo",alsoIn:"tamb\xE9m em",official:"bloco oficial",variation:"Varia\xE7\xE3o",alike:"parecido",text:"O texto",types:"Tipos",of:(e,n,s)=>`${e} de ${n} ${s}`,who:"Quem tem",lacks:"Fora",none:"ningu\xE9m",decision:"Decis\xE3o",toDecide:"a decidir \u2014 na planilha ou no cast.yaml",alone:"S\xF3 um tem: inova\xE7\xE3o ou d\xEDvida?",orchestratorDoes:"S\xF3 o orquestrador faz",sign:"Como a cast-list sabe",follows:"Quem segue",declaredOnly:"s\xF3 declarado",nothingUnknown:"Tudo foi entendido.",facts:"Fatos",off:"Fora do padr\xE3o",solo:"S\xF3 ele tem",children:"Filhos",close:"Fechar \u2715",foot:"Os fatos v\xEAm dos arquivos YAML; nada foi inventado.",summary:(e,n,s,r,t)=>`${e} no elenco \xB7 ${n} padr\xF5es \xB7 ${s} fora do padr\xE3o \xB7 ${r} s\xF3 um tem \xB7 limite ${t}% de cada papel`,excel:"\u2B07 Excel",yaml:"\u2B07 cast.yaml",png:"\u2B07 PNG",name:"Nome",said:"declarado",unused:e=>`Sem uso (${e})`,nothingUnused:"Tudo \xE9 usado, nada est\xE1 desligado.",flows:"Fluxos",returnsNothing:"n\xE3o devolve nada",otherFlow:"outro fluxo",telemetry:"Telemetria",times:(e,n)=>`${e} ${e===1?"vez":"vezes"} em ${n} dias`,notFired:"n\xE3o disparou",noLine:"nenhuma linha na telemetria",routing:"Roteamento",called:"Chamado",history:"Hist\xF3rico",inputs:"Entradas",description:"Descri\xE7\xE3o",notInFolder:"n\xE3o est\xE1 na pasta",chars:e=>`${e} caracteres`}},x=JSON.parse(document.getElementById("cast").textContent),{result:h,lang:b,looks:L}=x,i=He[b],w=q[b],Q=he(h,L,x.cast,b);document.documentElement.lang=b==="pt"?"pt-BR":"en";document.title=h.name??x.id;var f=e=>String(e??"").replace(/[&<>"']/g,n=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[n]),j=e=>f(C(e,b,h.names)),B=[...h.agents].sort((e,n)=>e.role===n.role?e.id.localeCompare(n.id):e.role==="orchestrator"?-1:1),ne=e=>h.patterns.find(n=>n.key===e),ge=e=>[...new Set(h.offPattern.filter(n=>n.key===e||n.partOf===e).map(n=>n.agent))],$e=e=>e.startsWith("type:")?h.typeNames[e.slice(5)]??e.slice(5):w[e],ye=e=>e.startsWith("type:")?"type":e,H=Object.keys(h.typeNames),Ke=e=>e.startsWith("text:block:")?h.blocks.find(n=>`text:block:${n.id}`===e):void 0,oe=e=>{let n=ne(e);if(!n)return"";let s=n.decision?`<span class="cl-badge ${n.decision.status}">${f(w[n.decision.status==="accepted"?"accept":"reject"])}</span>`:"";return`${n.official?`<span class="cl-badge official">${i.official}</span>`:""}<span class="cl-badge ${ye(n.scope)}">${i.pattern} \xB7 ${f($e(n.scope))}</span>${s}`},T="map",O,M="all",z,I,K=document.getElementById("app"),ve=V(L),G=new Set(ve.filter(e=>!e.folded).map(e=>e.key));function ke(){let e=[["map",i.map],["patterns",i.patterns],["cast",i.cast],["microsoft",i.microsoft],["unused",i.unused(h.unused.length)],["unknown",i.unknown(h.unknown.length)]],n=new Set(h.offPattern.map(s=>s.agent)).size;K.innerHTML=`<div class="cl-wrap">
152
- <header><h1 class="cl-title">${f(h.name??x.id)}</h1><p class="cl-sub">${i.summary(h.agents.length,h.patterns.length,n,L.filter(s=>s.key==="solo").length,Math.round(x.threshold*100))}</p><p class="cl-private">${f(w.privacy)}</p></header>
153
- <div class="cl-bar" role="tablist">${e.map(([s,r])=>`<button class="cl-tab" role="tab" aria-selected="${s===T}" data-tab="${s}">${f(r)}</button>`).join("")}
154
- <span class="cl-space"></span><button class="cl-get" data-get="xlsx">${i.excel}</button><button class="cl-get" data-get="yaml">${i.yaml}</button>${T==="map"?`<button class="cl-get" data-get="png">${i.png}</button>`:""}</div>
155
- ${T==="map"?Ye():T==="patterns"?se(Q.find(s=>s.key==="patterns")):T==="cast"?et():T==="microsoft"?at():T==="unused"?st():rt()}
156
- <p class="cl-foot">${i.foot}</p>
157
- </div>`}function Ye(){let e=s=>{let r=G.has(s.key),t=r?`<ul id="cl-group-${s.key}">${s.looks.map(({look:a,at:d})=>`<li><button data-look="${d}">${f(a[b])}</button></li>`).join("")}</ul>`:"";return`<div class="cl-group"><button class="cl-group-head" data-group="${s.key}" aria-expanded="${r}" aria-controls="cl-group-${s.key}"><span class="cl-caret">${r?"\u25BE":"\u25B8"}</span>${f(s[b])} <span class="cl-count">${s.looks.length}</span></button>${t}</div>`};return`${L.length?`<section class="cl-look"><h2>${f(w.look)} \xB7 ${L.length}</h2>${ve.map(e).join("")}</section>`:""}<div class="cl-body${O?" with-detail":""}"><div class="cl-wrap" style="gap:16px">${Xe()}${Je()}</div>${O?`<aside class="cl-card cl-detail" aria-live="polite">${Ze()}</aside>`:""}</div>`}function Qe(){let e=t=>M==="all"||t.role===M;if(!H.length)return[{id:"",name:"",cols:B.filter(e).map(t=>({a:t,also:[]}))}];let n=t=>h.types[t]??[],s=B.filter(t=>t.role==="specialist"&&e(t));return[{id:"orchestrator",name:w.orchestrator,cols:B.filter(t=>t.role==="orchestrator"&&e(t)).map(t=>({a:t,also:[]}))},...H.map(t=>({id:t,name:h.typeNames[t],cols:s.filter(a=>n(a.id).includes(t)).map(a=>({a,also:n(a.id).filter(d=>d!==t).map(d=>h.typeNames[d]??d)}))})),{id:"-",name:i.noType,cols:s.filter(t=>!n(t.id).length).map(t=>({a:t,also:[]}))}].filter(t=>t.cols.length&&(!I||t.id===I))}function Xe(){let e=Qe(),n=e.flatMap(m=>m.cols),s=x.focusAreas.find(m=>m.id===z),r=[...new Set([...h.agents.flatMap(m=>Object.keys(m.facts)),...h.patterns.map(m=>m.key)])].filter(m=>!m.endsWith("~variant")&&(!s||s.facts.includes(m))),t=new Set(h.offPattern.map(m=>`${m.agent} ${m.key}`)),a=(m,v,l,c)=>`<button class="cl-chip" ${m}="${f(v)}" aria-pressed="${l}">${f(c)}</button>`,d=`<div class="cl-filters">${i.role}: ${a("data-role","all",M==="all",i.all)}${a("data-role","specialist",M==="specialist",w.specialist)}${a("data-role","orchestrator",M==="orchestrator",w.orchestrator)}
158
- ${H.length?`<span style="margin-left:10px">${i.type}:</span> ${a("data-type","",!I,i.all)}${H.map(m=>a("data-type",m,I===m,h.typeNames[m])).join("")}${a("data-type","-",I==="-",i.noType)}`:""}
159
- ${x.focusAreas.length?`<span style="margin-left:10px">${i.focus}:</span> ${a("data-focus","",!z,i.all)}${x.focusAreas.map(m=>a("data-focus",m.id,z===m.id,m.name)).join("")}`:""}</div>`,p="";for(let m of Object.keys(D)){let v=c=>Z(c)?`${C(Z(c),b,h.names)}${C(c,b,h.names)}`:C(c,b,h.names),l=r.filter(c=>F(c)===m).sort((c,$)=>v(c).localeCompare(v($)));l.length&&(p+=`<tr class="cl-dim"><td colspan="${n.length+1}">${f(D[m][b])}</td></tr>`,p+=l.map(c=>`<tr><th scope="row" style="text-align:left;font-weight:400"><button class="cl-fact${O?.key===c&&!O.agent?" picked":""}" data-key="${f(c)}">${j(c)}</button>${oe(c)}</th>${n.map(({a:$})=>{let S=c in $.facts?c.startsWith("declared:")?["said","\u25D0"]:["has","\u25CF"]:`${c}~variant`in $.facts?["var","\u2248"]:t.has(`${$.id} ${c}`)?["off","\xD7"]:void 0;return`<td class="cl-mark${S?` ${S[0]}`:""}">${S?`<button data-key="${f(c)}" data-agent="${f($.id)}" aria-label="${f($.id)}: ${j(c)}">${S[1]}</button>`:""}</td>`}).join("")}</tr>`).join(""))}let y=e.some(m=>m.name)?`<tr class="cl-groups"><th></th>${e.map(m=>`<th colspan="${m.cols.length}" class="${m.id==="orchestrator"?"":"typed"}">${f(m.name)}</th>`).join("")}</tr>`:"",g=n.map(({a:m,also:v})=>`<th scope="col">${f(m.id)}<small>${f(v.length?`${i.alsoIn} ${v.join(", ")}`:w[m.role])}</small></th>`).join("");return`<section class="cl-card"><h2>${i.matrix}</h2>${d}<div class="cl-scroll"><table class="cl-matrix"><thead>${y}<tr><th></th>${g}</tr></thead><tbody>${p}</tbody></table></div><p class="cl-legend">${i.legend}</p></section>`}function Je(){let{look:e,everyone:n}=_(h),s=r=>{let t=ne(r),a=h.agents.filter(p=>p.role===t.role).length,d=ge(r);return`<button class="cl-pattern${O?.key===r?" picked":""}" data-pattern="${f(r)}"><b>${j(r)}</b><span>${oe(r)} ${i.of(t.agents.filter(p=>h.roles[p]===t.role).length,a,ee(t.role,b,a))}</span>
160
- ${d.length?`<span class="cl-lack">${i.lacks}: ${f(d.join(", "))}</span>`:""}<span>${i.decision}: ${t.decision?`${f(w[t.decision.status==="accepted"?"accept":"reject"])}${t.decision.why?` \u2014 ${f(t.decision.why)}`:""}`:`<i>${i.toDecide}</i>`}</span></button>`};return`<section class="cl-card"><h2>${i.candidates}</h2>${e.length?`<div class="cl-cards">${e.map(r=>s(r.key)).join("")}</div>`:'<p class="cl-empty">\u2014</p>'}
161
- ${n.length?`<details class="cl-everyone"><summary>${i.everyone(n.length)}</summary><ul>${n.map(r=>`<li><button class="cl-fact" data-pattern="${f(r.key)}">${j(r.key)}</button> <span class="cl-badge ${ye(r.scope)}">${f($e(r.scope))}</span></li>`).join("")}</ul></details>`:""}</section>`}function Ze(){let{key:e,agent:n}=O,s=ne(e),t=h.agents.filter(l=>e in l.facts&&(!n||l.id===n)).map(l=>`<li><b>${f(l.id)}</b>${l.facts[e].map(c=>`<div class="cl-file">${f(c.file)}${c.line?`:${c.line}`:""}</div>`).join("")}</li>`).join(""),a=ge(e).filter(l=>!n||l===n),d=h.solos.some(l=>l.key===e),p=h.orchestratorDoes.some(l=>l.key===e),y=Ke(e),g=l=>l.map(c=>c.op==="same"?f(c.text):`<span class="cl-${c.op}">${f(c.text)}</span>`).join(" "),m=y?Object.entries(y.variants).filter(([l])=>!n||l===n):[],v=y?`<div><b>${i.text}</b><pre class="cl-text">${f(y.text)}</pre></div>
162
- ${m.map(([l,c])=>`<div class="cl-variant"><b>${f(l)}</b> <span class="cl-file">${f(c.source.file)}${c.source.line?`:${c.source.line}`:""} \xB7 ${Math.round(c.similarity*100)}% ${i.alike}</span><div class="cl-diff">${g(c.diff)}</div></div>`).join("")}`:"";return`<button class="cl-close" data-close="1">${i.close}</button><span class="cl-kicker">${f(D[F(e)][b])}</span><h3>${j(e)}</h3><code>${f(e)}</code>
163
- ${s?`<div>${oe(e)}</div><div>${i.decision}: ${s.decision?`${f(w[s.decision.status==="accepted"?"accept":"reject"])}${s.decision.why?` \u2014 ${f(s.decision.why)}`:""}`:`<i>${i.toDecide}</i>`}</div>`:""}
164
- ${d?`<div>${i.alone}</div>`:p?`<div>${i.orchestratorDoes}</div>`:""}
165
- ${v}
166
- <div><b>${i.who}</b>${t?`<ul>${t}</ul>`:` \u2014 ${i.none}`}</div>
167
- ${h.patterns.filter(l=>l.partOf===e).map(l=>{let c=h.offPattern.filter($=>$.key===l.key).map($=>$.agent);return`<div><b>${j(l.key)}</b> \u2014 ${c.length?`<span style="color:var(--off)">${i.lacks}: ${f(c.join(", "))}</span>`:`${i.who}: ${l.agents.length}`}</div>`}).join("")}
168
- ${a.length?`<div><b>${i.lacks}</b>: <span style="color:var(--off)">${f(a.join(", "))}</span></div>`:""}`}function et(){return`<div class="cl-agents">${B.map(e=>{let n=h.offPattern.filter(a=>a.agent===e.id),s=h.solos.filter(a=>a.agents[0]===e.id),r=h.unknown.filter(a=>a.agent===e.id),t=ot(e.id);return`<section class="cl-card cl-agent${t?" wide":""}"><span class="cl-kicker">${f(w[e.role])}</span><h3>${f(e.id)}</h3>${e.displayName?`<code>${f(e.displayName)}</code>`:""}<dl>
169
- ${(h.types[e.id]??[]).length?`<dt>${i.types}</dt><dd>${f(h.types[e.id].map(a=>h.typeNames[a]??a).join(" \xB7 "))}</dd>`:""}
170
- <dt>${i.facts}</dt><dd>${Object.keys(e.facts).length}</dd>
171
- ${n.length?`<dt>${i.off}</dt><dd class="cl-lack">${n.map(a=>j(a.key)).join("<br>")}</dd>`:""}
172
- ${s.length?`<dt>${i.solo}</dt><dd>${s.map(a=>j(a.key)).join("<br>")}</dd>`:""}
173
- ${tt(e.id,e.displayName??e.id)}
174
- ${nt(e.id)}
175
- ${e.children.length?`<dt>${i.children}</dt><dd>${e.children.map(a=>`${f(a.name)} <span class="cl-sub">(${Object.keys(a.facts).map(j).join(", ")})</span>`).join("<br>")}</dd>`:""}
176
- ${r.length?`<dt>${f(w.unknown)}</dt><dd>${r.map(a=>f(a.file)).join("<br>")}</dd>`:""}</dl>${t}</section>`}).join("")}</div>`}function tt(e,n){let s=h.flows.filter(a=>a.agent===e&&a.called);if(!s.length)return"";let r=a=>a==="child-flow"?i.otherFlow:a.startsWith("http:")?a.slice(5):a.startsWith("connector:")?h.names[a.slice(10)]??a.slice(10):void 0,t=a=>{let d=a.uses.map(r).filter(p=>!!p);return`<div class="cl-chain">${[n,a.name,...d.length?[d.join(", ")]:[]].map(f).join(' <span aria-hidden="true">\u2192</span> ')}${a.returns?"":` <span class="cl-silent">\u2014 ${i.returnsNothing}</span>`}</div>`};return`<dt>${i.flows}</dt><dd>${s.map(t).join("")}</dd>`}function nt(e){let n=h.telemetry.events.filter(a=>a.agent===e),s=h.telemetry.days,r=h.telemetry.silent.includes(e);if(!n.length&&!r)return"";let t=a=>`<div class="cl-event"><code>${f(a.name)}</code>${!s||r?"":a.fired?` <span class="cl-sub">\u2014 ${f(i.times(a.fired,s))}</span>`:` <span class="cl-silent">\u2014 ${i.notFired}</span>`}</div>`;return`<dt>${i.telemetry}</dt><dd class="cl-events">${n.map(t).join("")}${r?`<div class="cl-silent">${i.noLine}</div>`:""}</dd>`}function ot(e){let n=h.contract.routes.filter(r=>r.caller===e);if(!n.length)return"";let s=n.map(r=>{let t=r.description.length<ce;return`<tr><td>${r.agent?f(r.agent):`<span class="cl-silent">${f(r.name??r.calls)} \u2014 ${i.notInFolder}</span>`}</td>
177
- <td${r.history?"":' class="cl-silent"'}>${r.history?w.yes:w.no}</td><td>${r.inputs.length?f(r.inputs.join(", ")):'<span class="cl-silent">\u2014</span>'}</td>
178
- <td${t?' class="cl-silent"':""} title="${f(r.description)}">${f(i.chars(r.description.length))}</td></tr>`}).join("");return`<div class="cl-route"><h4>${i.routing}</h4><table class="cl-routing"><thead><tr><th>${i.called}</th><th>${i.history}</th><th>${i.inputs}</th><th>${i.description}</th></tr></thead><tbody>${s}</tbody></table></div>`}function st(){let e=Q.find(n=>n.key==="unused");return e?se(e):`<section class="cl-card"><p class="cl-empty">${i.nothingUnused}</p></section>`}function at(){let e=W.map(n=>{let s=h.agents.filter(r=>`ms:${n.id}`in r.facts||`declared:ms:${n.id}`in r.facts).map(r=>r.id);return`<tr><td><a href="${J}/${n.id}.md" target="_blank" rel="noopener">${f(n.name)}</a></td><td>${f(n.sign??i.declaredOnly)}</td><td>${s.length?f(s.join(", ")):`<span class="cl-sub">${i.none}</span>`}</td></tr>`}).join("");return`<section class="cl-card cl-table"><table><thead><tr><th>${i.microsoft}</th><th>${i.sign}</th><th>${i.follows}</th></tr></thead><tbody>${e}</tbody></table></section>`}function rt(){let e=Q.find(n=>n.key==="unknown");return e?se(e):`<section class="cl-card"><p class="cl-empty">${i.nothingUnknown}</p></section>`}function se(e){let n=(t,a)=>{let d=typeof t=="object"&&t?t:{v:t},p=a?"th":"td";return`<${p}${d.fill&&!a?` style="background:#${d.fill};color:#1d2330"`:""}>${f(d.v)}</${p}>`},[s,...r]=e.rows;return`<section class="cl-card cl-table" role="tabpanel"><table><thead><tr>${s.map(t=>n(t,!0)).join("")}</tr></thead><tbody>${r.map(t=>`<tr>${t.map(a=>n(a,!1)).join("")}</tr>`).join("")}</tbody></table></section>`}function Y(e,n){let s=document.createElement("a");s.href=URL.createObjectURL(e),s.download=n,s.click(),setTimeout(()=>URL.revokeObjectURL(s.href),1e3)}async function it(){let e=K.querySelector(".cl-matrix"),[n,s]=[e.scrollWidth+32,e.scrollHeight+32],r=new XMLSerializer().serializeToString(e).replace(/ picked/g,""),t=`<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${s}"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" class="cl light" style="min-height:0;padding:16px;background:#fff;width:${n}px"><style>/* The cast map: tokens on .cl (not :root) so the PNG, drawn apart, carries them too. */
151
+ <workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><bookViews><workbookView/></bookViews><sheets>${r.map((l,c)=>`<sheet name="${xe(l)}" sheetId="${c+1}" r:id="rId${c+1}"/>`).join("")}</sheets>${t?`<definedNames>${t}</definedNames>`:""}</workbook>`],["xl/_rels/workbook.xml.rels",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
152
+ <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">${e.map((l,c)=>`<Relationship Id="rId${c+1}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet${c+1}.xml"/>`).join("")}<Relationship Id="rId${e.length+1}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/></Relationships>`],["xl/styles.xml",n],...e.map((l,c)=>[`xl/worksheets/sheet${c+1}.xml`,tt(l,a)])];return st(s.map(([l,c])=>[l,Ie.encode(c)]))}var nt=(()=>{let e=new Uint32Array(256);for(let n=0;n<256;n++){let a=n;for(let r=0;r<8;r++)a=a&1?3988292384^a>>>1:a>>>1;e[n]=a>>>0}return e})();function ot(e){let n=4294967295;for(let a=0;a<e.length;a++)n=nt[(n^e[a])&255]^n>>>8;return(n^4294967295)>>>0}function st(e){let n=[],a=[],r=0;for(let[h,f]of e){let b=Ie.encode(h),d=ot(f),p=new DataView(new ArrayBuffer(30));p.setUint32(0,67324752,!0),p.setUint16(4,20,!0),p.setUint16(6,2048,!0),p.setUint16(8,0,!0),p.setUint32(14,d,!0),p.setUint32(18,f.length,!0),p.setUint32(22,f.length,!0),p.setUint16(26,b.length,!0),n.push(new Uint8Array(p.buffer),b,f);let k=new DataView(new ArrayBuffer(46));k.setUint32(0,33639248,!0),k.setUint16(4,20,!0),k.setUint16(6,20,!0),k.setUint16(8,2048,!0),k.setUint32(16,d,!0),k.setUint32(20,f.length,!0),k.setUint32(24,f.length,!0),k.setUint16(28,b.length,!0),k.setUint32(42,r,!0),a.push(new Uint8Array(k.buffer),b),r+=30+b.length+f.length}let t=a.reduce((h,f)=>h+f.length,0),s=new DataView(new ArrayBuffer(22));s.setUint32(0,101010256,!0),s.setUint16(8,e.length,!0),s.setUint16(10,e.length,!0),s.setUint32(12,t,!0),s.setUint32(16,r,!0);let l=[...n,...a,new Uint8Array(s.buffer)],c=new Uint8Array(l.reduce((h,f)=>h+f.length,0)),m=0;for(let h of l)c.set(h,m),m+=h.length;return c}var Le=["contradictions","contract","off","rules","text","telemetry","cleanup"],at=e=>e.key==="spelling"||e.key==="telemetry"||!!e.fact?.startsWith("telemetry:")||e.fact==="node:LogCustomTelemetryEvent";function rt(e){if(e.key==="conflict"||e.key==="contradiction")return"contradictions";if(at(e))return"telemetry";if(e.key==="contract"||e.key==="flow"||e.key==="off"&&e.fact?.startsWith("called-with:"))return"contract";if(e.key==="off")return"off";if(e.key==="gap")return"rules";if(e.key==="twice")return"text";if(e.key==="unused")return"cleanup"}var se=e=>/«([^»]*)»/.exec(e)?.[1]??"";function it(e,n,a){let r=s=>T(e.fact??"",s,a.names),t=e.fact??"";if(t==="trigger:OnEscalate")return{en:"Learn to hand over to a person",pt:"Aprender a encaminhar para uma pessoa"};if(e.key==="contradiction")return{en:`Remove \xAB${r("en")}\xBB`,pt:`Tirar \xAB${r("pt")}\xBB`};if(e.key==="contract"&&t.startsWith("calls:")){let s=se(e.en);return{en:`Bring \xAB${s}\xBB into the folder, or remove the call`,pt:`Trazer \xAB${s}\xBB para a pasta, ou tirar a chamada`}}if(t==="routing:described")return{en:"Write the routing description: what it solves",pt:"Escrever a descri\xE7\xE3o de roteamento: o que ele resolve"};if(e.key==="flow"){let s=se(e.en);return{en:`Make the flow \xAB${s}\xBB return its result`,pt:`Fazer o fluxo \xAB${s}\xBB devolver o resultado`}}if(e.key==="spelling")return{en:`Name the event like the others: \xAB${E(t.slice(16),"en")}\xBB`,pt:`Chamar o evento como os outros: \xAB${E(t.slice(16),"pt")}\xBB`};if(e.key==="telemetry"&&!t)return{en:"Connect the telemetry to Application Insights",pt:"Ligar a telemetria ao Application Insights"};if(e.key==="telemetry"){let s=se(e.en);return{en:`Check that the event \xAB${s}\xBB fires`,pt:`Conferir se o evento \xAB${s}\xBB dispara`}}if(t.startsWith("telemetry:field:")){let[s,l]=t.slice(16).split("/");return{en:`Log \xAB${l}\xBB in the event \xAB${E(s,"en")}\xBB`,pt:`Registrar \xAB${l}\xBB no evento \xAB${E(s,"pt")}\xBB`}}if(t==="node:LogCustomTelemetryEvent")return{en:"Log telemetry",pt:"Registrar telemetria"};if(t.startsWith("text:block:")&&a.offPattern.some(s=>s.agent===n&&s.key===t&&s.variant))return{en:`Align the official block \xAB${r("en")}\xBB`,pt:`Alinhar o bloco oficial \xAB${r("pt")}\xBB`};if(t.startsWith("text:block:"))return{en:`Use the official block \xAB${r("en")}\xBB`,pt:`Usar o bloco oficial \xAB${r("pt")}\xBB`};if(t==="declared:kpi")return{en:"Declare a goal (KPI)",pt:"Declarar uma meta (KPI)"};if(e.key==="twice")return{en:`Settle on one \xAB${r("en")}\xBB`,pt:`Escolher um s\xF3 \xAB${r("pt")}\xBB`};if(e.key==="unused"){let s=a.unused.find(f=>f.agent===n&&f.key===t);if(s?.how==="disabled"&&t.startsWith("disabled:node:")){let f=(s.sources[0]?.file??"").replace(/(\.topic)?\.mcs\.ya?ml$/,"");return{en:`Remove the switched-off node in \xAB${f}\xBB`,pt:`Remover o n\xF3 desligado em \xAB${f}\xBB`}}let l=t.split(":")[1],c=s?.name??se(e.en);if(l==="variable")return{en:`Remove the variable \xAB${c}\xBB`,pt:`Remover a vari\xE1vel \xAB${c}\xBB`};let h={flow:{en:"the flow",pt:"o fluxo"},topic:{en:"the topic",pt:"o t\xF3pico"},action:{en:"the tool",pt:"a ferramenta"},knowledge:{en:"the knowledge source",pt:"a fonte de conhecimento"}}[l]??{en:"",pt:""};return{en:`Remove or switch on ${h.en} \xAB${c}\xBB`.replace(" "," "),pt:`Remover ou ligar ${h.pt} \xAB${c}\xBB`.replace(" "," ")}}return e.key==="conflict"?{en:`Check \xAB${r("en")}\xBB against what was declared`,pt:`Conferir \xAB${r("pt")}\xBB com o declarado`}:{en:`Have \xAB${r("en")}\xBB`,pt:`Ter \xAB${r("pt")}\xBB`}}function ae(e,n){let a=[];for(let t of e){let s=rt(t);if(s)for(let l of t.agents){let c=a.filter(m=>m.agent===l);if(!(t.fact&&c.some(m=>m.keys.includes(t.fact)))){if(t.fact?.startsWith("called-with:")){let m=c.find(d=>d.keys.some(p=>p.startsWith("called-with:"))),h=m??{agent:l,group:s,keys:[],en:"",pt:"",why:{en:"",pt:""}};m||a.push(h),h.keys.push(t.fact);let f=h.keys.map(d=>d==="called-with:history"?{en:"the conversation history",pt:"o hist\xF3rico da conversa"}:{en:`\xAB${d.slice(18)}\xBB`,pt:`\xAB${d.slice(18)}\xBB`}),b=d=>f.map(p=>p[d]).join(d==="pt"?" e ":" and ");h.en=`Receive ${b("en")} from the orchestrator`,h.pt=`Receber do gestor ${b("pt")}`,h.why={en:`${h.why.en} ${t.en}`.trim(),pt:`${h.why.pt} ${t.pt}`.trim()};continue}a.push({agent:l,group:s,keys:t.fact?[t.fact]:[],...it(t,l,n),why:{en:t.en,pt:t.pt}})}}}let r=[...new Set(n.agents.map(t=>t.id))];return a.sort((t,s)=>r.indexOf(t.agent)-r.indexOf(s.agent)||Le.indexOf(t.group)-Le.indexOf(s.group))}function lt(e){let n=new Map,a=/^(connector|operation|mcp|flow-uses):/;for(let t of Object.keys(e.typeNames)){let s=e.agents.filter(c=>c.role==="specialist"&&(e.types[c.id]??[]).includes(t));if(s.length<2)continue;let l=[...new Set(s.flatMap(c=>Object.keys(c.facts).filter(m=>a.test(m))))].sort();for(let c of l){let m=s.filter(b=>c in b.facts);if(m.length!==1)continue;let h=`${m[0].id} ${c}`,f=n.get(h)??{agent:m[0].id,key:c,types:[]};f.types.push(t),n.set(h,f)}}return[...n.values()].filter(t=>!(t.key.startsWith("operation:")&&n.has(`${t.agent} connector:${t.key.slice(10,t.key.indexOf("/"))}`))).map(t=>{let s=t.types.map(m=>e.typeNames[m]??m),l=m=>T(t.key,m,e.names),c=m=>s.map(h=>`\xAB${h}\xBB`).join(m==="pt"?" e ":" and ");return{agent:t.agent,types:t.types,typeNames:s,key:t.key,en:`\xAB${l("en")}\xBB \u2014 only it has this in ${s.length>1?"the types":"the type"} ${c("en")}: does the post need it?`,pt:`\xAB${l("pt")}\xBB \u2014 s\xF3 ele tem ${s.length>1?"nos tipos":"no tipo"} ${c("pt")}: o cargo precisa?`}})}var ct={"trigger:OnEscalate":{en:"Hands over to a person (escalation)",pt:"Sabe encaminhar para uma pessoa (escalonamento)"},"called-with:history":{en:"Gets the conversation history from the orchestrator",pt:"Recebe do gestor o hist\xF3rico da conversa"},"node:LogCustomTelemetryEvent":{en:"Logs its own errors (telemetry)",pt:"Registra os pr\xF3prios erros (telemetria)"},"declared:kpi":{en:"Has a goal (KPI)",pt:"Tem uma meta (KPI)"},"declared:owner":{en:"Has an owner",pt:"Tem um respons\xE1vel"},"declared:team":{en:"Has a team",pt:"Tem uma equipe"}},Ae=(e,n,a={})=>ct[e]?.[n]??(Ne(e)?T(e,n,a):n==="pt"?`Tem \xAB${T(e,n,a)}\xBB`:`Has \xAB${T(e,n,a)}\xBB`);var dt=["owner","environment","created-on","last-published"],pt=e=>/^\s*([^\n]*?[.!?])(\s|$)/.exec(e)?.[1].trim()??e.split(`
153
+ `)[0].trim(),mt=e=>{let n=e.split(`
154
+ `),a=n.findIndex(t=>/^\s*([-*•]|\d+[.)])\s+/.test(t));if(a<0)return[];let r=[];for(let t of n.slice(a)){let s=/^\s*(?:[-*•]|\d+[.)])\s+(.*)$/.exec(t);if(!s)break;r.push(s[1].trim())}return r.slice(0,5)};function De(e,n,a,r,t,s,l){let c=i=>e.agents.find(w=>w.id===i)?.displayName??i,m=(i,w)=>{let S=r.declared.find(R=>R.agent===i&&R.key===w);return S&&{value:S.value,source:S.source}},h=r.declared.some(i=>dt.includes(i.key)),f=r.declared.some(i=>i.key==="team"||i.key==="kpi"),b=lt(e),d=[...ae(n,e),...b.flatMap(i=>{let w=r.decisions.find(R=>R.key===i.key&&R.status==="rejected"&&i.types.some(A=>R.scope===`type:${A}`)),S=w?e.typeNames[w.scope.slice(5)]??w.scope.slice(5):"";return w?[{agent:i.agent,group:"cleanup",keys:[i.key],en:`Remove the access \xAB${T(i.key,"en",e.names)}\xBB`,pt:`Tirar o acesso \xAB${T(i.key,"pt",e.names)}\xBB`,why:{en:`The team decided the post \xAB${S}\xBB does not need it.`,pt:`O time decidiu que o cargo \xAB${S}\xBB n\xE3o precisa.`}}]:[]})],p=e.contract.missing.map(i=>({id:i.calls,name:i.name??i.calls,caller:i.caller})),k=e.agents.map(i=>m(i.id,"environment")?.value).filter(i=>!!i),j=[...new Set(k)].sort((i,w)=>k.filter(S=>S===w).length-k.filter(S=>S===i).length)[0],P=i=>{let w=[],S=m(i,"environment")?.value;return S&&j&&S!==j&&w.push("hiring"),h&&!m(i,"owner")&&w.push("noOwner"),h&&m(i,"created-on")&&!m(i,"last-published")&&w.push("neverPublished"),l&&!l.some(R=>R.agent===i)&&w.push("noEval"),w.push(d.some(R=>R.agent===i&&R.group!=="cleanup")?"pdi":"ok"),w},W=i=>({id:i,name:c(i),situation:P(i)}),D=e.agents.map(i=>i.id),M=i=>i.map(w=>({id:w,name:c(w)})),fe=p.map(i=>({id:i.id,name:i.name})),ue=[{key:"cast",people:M(D)},{key:"hiring",people:[...fe,...M(D.filter(i=>P(i).includes("hiring")))]},...h?[{key:"noOwner",people:M(D.filter(i=>P(i).includes("noOwner")))},{key:"neverPublished",people:M(D.filter(i=>P(i).includes("neverPublished")))}]:[],...l?[{key:"noEval",people:M(D.filter(i=>P(i).includes("noEval")))}]:[],{key:"pdi",people:M(D.filter(i=>P(i).includes("pdi")))},{key:"ok",people:M(D.filter(i=>P(i).includes("ok")))}],X=e.agents.filter(i=>i.role==="orchestrator").map(i=>W(i.id)),H=e.agents.filter(i=>i.role==="specialist"),J=[...new Set(H.flatMap(i=>e.types[i.id]??[]))],he=[...J.map(i=>({id:i,name:e.typeNames[i]??i,people:H.filter(w=>(e.types[w.id]??[])[0]===i).map(w=>({...W(w.id),...(e.types[w.id]??[]).length>1?{alsoIn:(e.types[w.id]??[]).slice(1).map(S=>e.typeNames[S]??S)}:{}}))})).filter(i=>i.people.length),...H.some(i=>!(e.types[i.id]??[]).length)?[{id:"",name:"",people:H.filter(i=>!(e.types[i.id]??[]).length).map(i=>W(i.id))}]:[]],Y=(i,w)=>({key:i,en:Ae(i,"en",e.names),pt:Ae(i,"pt",e.names),proposal:w}),V=(i,w,S)=>{let R=e.patterns.filter(x=>!x.partOf&&(x.scope===i||i!=="platform"&&x.scope==="platform")),A=R.filter(x=>x.decision?.status==="accepted"),o=new Set(e.offPattern.map(x=>x.key)),y=A.length?A.map(x=>Y(x.key,!1)):R.filter(x=>o.has(x.key)).map(x=>Y(x.key,!0)),O=t.filter(x=>x.has&&(!x.role||x.role===S)&&!y.some(q=>q.key===x.has)).map(x=>Y(x.has,!1));return{scope:i,name:w,requirements:[...y,...O]}},ge=[V("specialist",{en:"Specialist",pt:"Especialista"},"specialist"),...J.map(i=>V(`type:${i}`,{en:`Specialist \xB7 ${e.typeNames[i]??i}`,pt:`Especialista \xB7 ${e.typeNames[i]??i}`},"specialist")),...X.length?[V("orchestrator",{en:"Orchestrator",pt:"Orquestrador"},"orchestrator")]:[]],ye=e.agents.map(i=>{let S=a.find($=>$.id===i.id)?.texts.find($=>$.source==="instructions")?.text??"",R=Object.keys(i.facts),A=$=>({en:T($,"en",e.names),pt:T($,"pt",e.names)}),o=R.filter($=>/^(operation|mcp|flow-uses|knowledge):/.test($)&&!$.startsWith("knowledge:count")).map(A),y=R.filter($=>$.startsWith("text:")&&!$.endsWith("~variant")).map(A),O=e.contract.routes.find($=>$.agent===i.id)?.caller,x=e.telemetry.events.filter($=>$.agent===i.id),q=s&&{days:s.days,starts:s.rows.filter($=>$.agent===i.id&&$.event==="TopicStart").reduce(($,$e)=>$+$e.count,0),errors:x.reduce(($,$e)=>$+($e.fired??0),0),notFired:e.telemetry.notFired.filter($=>$.agent===i.id).map($=>$.name),silent:e.telemetry.silent.includes(i.id)},ze=[...new Set(["YAML",...s?[s.file]:[],...(l??[]).filter($=>$.agent===i.id).map($=>$.file),...r.declared.filter($=>$.agent===i.id).map($=>$.source.split(" \u203A ")[0])])],Re=d.filter($=>$.agent===i.id);return{id:i.id,name:c(i.id),role:i.role==="orchestrator"?"orchestrator":"specialist",types:(e.types[i.id]??[]).map($=>e.typeNames[$]??$),...S?{title:pt(S)}:{},...O?{manager:c(O)}:{},...m(i.id,"team")?{team:m(i.id,"team")}:{},...m(i.id,"owner")?{owner:m(i.id,"owner")}:{},...m(i.id,"created-on")?{created:m(i.id,"created-on")}:{},...m(i.id,"last-published")?{published:m(i.id,"last-published")}:{},...i.schemaName?{schemaName:i.schemaName}:{},...m(i.id,"environment")?{environment:m(i.id,"environment")}:{},summary:mt(S),tools:o,conduct:y,...m(i.id,"kpi")?{goal:m(i.id,"kpi")}:{},...q?{performance:q}:{},...l?{certifications:l.filter($=>$.agent===i.id)}:{},access:b.filter($=>$.agent===i.id),pdi:Re,sources:ze,seal:Re.some($=>$.group!=="cleanup")?"pdi":"ok"}}),Z=[...h?[]:["inventory"],...f?[]:["team"],...s?[]:["telemetry"]];return{...e.name?{name:e.name}:{},staff:ue,missing:Z,org:{orchestrators:X,types:he,ghosts:p},posts:ge,resumes:ye}}var qe=e=>Ee(e),ft={bold:!0,fill:"E8EEF7"},ut={v:"\u25CF",fill:"DDF3E6",center:!0},ht={v:"\xD7",fill:"FFD5CC",center:!0,bold:!0},gt={v:"\u25D0",fill:"FFF3C4",center:!0},yt={v:"\u2248",fill:"FFF6DC",center:!0,bold:!0},Me=Object.keys(G);function Ue(e,n,a,r="en"){let t=te[r],s=(o,y,O)=>({key:o,name:t[o],header:!0,columns:y.map(([x,q])=>({title:x,width:q})),rows:[y.map(([x])=>({v:x,...ft})),...O]}),l=o=>t[e.roles[o]],c=o=>o.startsWith("type:")?`${t.type}:${e.typeNames[o.slice(5)]??o.slice(5)}`:t[o],m=o=>(e.types[o]??[]).map(y=>e.typeNames[y]??y).join(" \xB7 "),h=o=>T(o,r,e.names),f=[...e.agents].sort((o,y)=>o.role===y.role?o.id.localeCompare(y.id):o.role==="orchestrator"?-1:1),b=[...new Set([...f.flatMap(o=>Object.keys(o.facts)),...e.patterns.map(o=>o.key)])].filter(o=>!o.endsWith("~variant")).sort((o,y)=>Me.indexOf(_(o))-Me.indexOf(_(y))||o.localeCompare(y)),d=new Set(e.offPattern.map(o=>`${o.agent} ${o.key}`)),p=o=>e.agents.filter(y=>y.role===o).length,k={key:"summary",name:t.summary,header:!1,columns:[{title:"",width:28},{title:"",width:100}],rows:[[{v:e.name??t.title,bold:!0},""],[{v:t.privacy,color:"B42318"},""],[t.count.agents,e.agents.length],[t.count.orchestrators,p("orchestrator")],[t.count.specialists,p("specialist")],[t.count.patterns,e.patterns.length],[t.count.off,new Set(e.offPattern.map(o=>o.agent)).size],[t.count.gaps,e.gaps.length],[t.count.conflicts,e.conflicts.length],[t.count.solos,n.filter(o=>o.key==="solo").length],[t.count.unused,e.unused.length],["",""],[{v:n.length?t.look:t.nothing,bold:!0},""],...ne(n).flatMap(o=>[[{v:`${o[r]} \xB7 ${o.looks.length}`,bold:!0},""],...o.looks.map(({look:y})=>["",{v:y[r],wrap:!0}])])]},j=s("matrix",[[t.dimension,18],[t.fact,40],[t.key,34],...f.map(o=>[o.id,14])],b.map(o=>[G[_(o)][r],h(o),o,...f.map(y=>o in y.facts?o.startsWith("declared:")?gt:ut:`${o}~variant`in y.facts?yt:d.has(`${y.id} ${o}`)?ht:"")])),{look:P,everyone:W}=oe(e),D=s("patterns",[[t.key,34],[t.fact,40],[t.scope,14],[t.role,14],[t.share,10],[t.have,50],[t.lack,40],[t.decision,12],[t.why,50]],[...P,...W].map(o=>{let y=e.offPattern.filter(O=>O.key===o.key).map(O=>O.agent);return[o.key,h(o.key),c(o.scope),t[o.role],`${Math.round(o.share*100)}%`,o.agents.join(", "),y.join(", "),o.decision?t[o.decision.status==="accepted"?"accept":"reject"]:"",o.decision?.why??""]})),M=s("off",[[t.agent,24],[t.role,14],[t.missing,44],[t.key,34],[t.scope,14],[t.accepted,14]],e.offPattern.map(o=>[o.agent,l(o.agent),h(o.key),o.key,c(o.scope),e.patterns.find(y=>y.key===o.key)?.decision?.status==="accepted"?t.yes:""])),fe=s("gaps",[[t.rule,16],[t.says,50],[t.role,14],[t.notMet,60]],e.gaps.map(o=>[o.rule.id,o.rule.says,o.rule.role?t[o.rule.role]:"",o.agents.join(", ")])),ue=s("conflicts",[[t.agent,24],[t.fact,40],[t.key,34],[t.declared,20],[t.source,40],[t.inYaml,12]],e.conflicts.map(o=>[o.agent,h(o.key),o.key,o.declared,o.source,o.observed?t.yes:t.no])),X=s("agents",[[t.agent,24],[t.name,32],[t.role,14],[t.types,24],[t.facts,8],[t.off,44],[t.alone,44],[t.children,24],[t.unknown,12]],f.map(o=>[o.id,o.displayName??"",t[o.role],m(o.id),Object.keys(o.facts).length,e.offPattern.filter(y=>y.agent===o.id).map(y=>h(y.key)).join("; "),e.solos.filter(y=>y.agents[0]===o.id).map(y=>h(y.key)).join("; "),o.children.map(y=>y.name).join(", "),e.unknown.filter(y=>y.agent===o.id).length||""])),H=s("evidence",[[t.agent,30],[t.fact,40],[t.key,34],[t.file,50],[t.line,8]],f.flatMap(o=>[{who:o.id,facts:o.facts},...o.children.map(y=>({who:`${o.id} \u203A ${y.name}`,facts:y.facts}))]).flatMap(({who:o,facts:y})=>Object.entries(y).sort(([O],[x])=>O.localeCompare(x)).flatMap(([O,x])=>x.map(q=>[o,h(O),O,q.file,q.line??""])))),J=s("declared",[[t.agent,24],[t.key,34],[t.value,40],[t.source,40]],a.declared.map(o=>[o.agent,o.key,o.value,o.source])),he=s("text",[[t.id,28],[t.label,36],[t.body,70],[t.have,50],[t.variant,40],[t.official,10]],e.blocks.map(o=>[o.id,o.official??o.label,{v:o.text,wrap:!0},Object.keys(o.holders).sort().join(", "),Object.entries(o.variants).sort(([y],[O])=>y.localeCompare(O)).map(([y,O])=>`${y} (${Math.round(O.similarity*100)}%)`).join(", "),o.official?t.yes:""])),Y=s("routing",[[t.caller,24],[t.called,30],[t.history,10],[t.inputs,30],[t.routingText,70],[t.chars,10],[t.file,44]],e.contract.routes.map(o=>[o.caller,o.agent??`${o.name??o.calls} (${t.notInFolder})`,o.history?t.yes:t.no,o.inputs.join(", "),{v:o.description,wrap:!0},o.description.length,`${o.file}${o.line?`:${o.line}`:""}`])),V=e.telemetry.days,ge=s("telemetry",[[t.agent,24],[t.written,30],[t.form,28],[t.fields,50],[t.file,44],...V?[[t.fired(V),16]]:[]],e.telemetry.events.map(o=>[o.agent,o.name,E(o.as,r),o.fields?o.fields.join(", "):t.notRead,`${o.file}${o.line?`:${o.line}`:""}`,...V?[o.fired===void 0||e.telemetry.silent.includes(o.agent)?"\u2014":o.fired===0?{v:0,color:"B42318",bold:!0}:o.fired]:[]])),ye=s("unused",[[t.agent,24],[t.what,16],[t.name,30],[t.how,14],[t.file,50]],e.unused.flatMap(o=>o.sources.map(y=>[o.agent,t.thing[o.what]??o.what,e.names[o.name]??o.name,t[o.how],`${y.file}${y.line?`:${y.line}`:""}`]))),Z=De(e,n,[],a,[]),i=o=>Z.staff.filter(y=>y.key!=="cast"&&y.people.some(O=>O.id===o)).map(y=>t.situation[y.key]).join(", "),w=ae(n,e),S=s("staff",[[t.agent,24],[t.name,32],[t.situation_,34],[t.manager,24],[t.teamCol,22],[t.ownerCol,30],[t.hired,14],[t.publishedCol,14],[t.items,10]],Z.resumes.map(o=>[o.id,o.name,i(o.id),o.manager??"",o.team?.value??"",o.owner?.value??"",o.created?.value??"",o.published?.value??"",w.filter(y=>y.agent===o.id).length||""])),R=s("pdi",[[t.agent,24],[t.item,60],[t.why,70],[t.key,40],[t.group,18]],w.map(o=>[o.agent,o[r],{v:o.why[r],wrap:!0},o.keys.join(", "),t.pdiGroup[o.group]])),A=[k,j,D,...e.blocks.length?[he]:[],...e.contract.routes.length?[Y]:[],...e.telemetry.events.length?[ge]:[],M,fe,ue,...e.unused.length?[ye]:[],X,S,...w.length?[R]:[],H,J];return e.unknown.length&&A.push(s("unknown",[[t.agent,24],[t.file,50],[t.why,40],[t.kind,24]],e.unknown.map(o=>[o.agent,o.file,t.why_[o.why],o.kind??""]))),A}var $t={en:{map:"Map",patterns:"Patterns",cast:"Cast",microsoft:"Microsoft",unknown:e=>`What the analysis did not understand (${e})`,matrix:"Who has what",candidates:"Patterns to decide",everyone:e=>`Everybody already does it (${e})`,all:"All",role:"Role",focus:"Focus",legend:"\u25CF has it (click for the file) \xB7 \xD7 off a pattern of its role or type \xB7 \u2248 a variation of the block \xB7 \u25D0 declared by people",pattern:"pattern",type:"Type",noType:"no type",alsoIn:"also in",official:"official block",variation:"Variation",alike:"alike",text:"The text",types:"Types",of:(e,n,a)=>`${e} of ${n} ${a}`,who:"Who has it",lacks:"Off it",none:"nobody",decision:"Decision",toDecide:"to decide \u2014 in the workbook or the cast file",alone:"Only one has it: innovation or debt?",orchestratorDoes:"Only the orchestrator does it",sign:"How cast-list knows",follows:"Who follows it",declaredOnly:"only declared",nothingUnknown:"Everything was understood.",facts:"Facts",off:"Off a pattern",solo:"Only it has",children:"Children",close:"Close \u2715",foot:"The facts come from the YAML files; nothing was made up.",summary:(e,n,a,r,t)=>`${e} in the cast \xB7 ${n} patterns \xB7 ${a} off a pattern \xB7 ${r} only one has \xB7 threshold ${t}% of each role`,excel:"\u2B07 Excel",yaml:"\u2B07 cast.yaml",png:"\u2B07 PNG",playbill:"The cast\u2019s HR \u2192",plot:"Stage \u2192",name:"Name",said:"declared",unused:e=>`Unused (${e})`,nothingUnused:"Everything is used, nothing is switched off.",flows:"Flows",returnsNothing:"returns nothing",otherFlow:"another flow",telemetry:"Telemetry",times:(e,n)=>`${e} ${e===1?"time":"times"} in ${n} days`,notFired:"did not fire",noLine:"no line in the telemetry",routing:"Routing",called:"Called",history:"History",inputs:"Inputs",description:"Description",notInFolder:"not in the folder",chars:e=>`${e} characters`},pt:{map:"Mapa",patterns:"Padr\xF5es",cast:"Elenco",microsoft:"Microsoft",unknown:e=>`O que a an\xE1lise n\xE3o entendeu (${e})`,matrix:"Quem tem o qu\xEA",candidates:"Padr\xF5es para decidir",everyone:e=>`Todos j\xE1 fazem (${e})`,all:"Todos",role:"Papel",focus:"Foco",legend:"\u25CF tem (clique para ver o arquivo) \xB7 \xD7 fora de um padr\xE3o do seu papel ou tipo \xB7 \u2248 tem uma varia\xE7\xE3o do bloco \xB7 \u25D0 declarado por pessoas",pattern:"padr\xE3o",type:"Tipo",noType:"sem tipo",alsoIn:"tamb\xE9m em",official:"bloco oficial",variation:"Varia\xE7\xE3o",alike:"parecido",text:"O texto",types:"Tipos",of:(e,n,a)=>`${e} de ${n} ${a}`,who:"Quem tem",lacks:"Fora",none:"ningu\xE9m",decision:"Decis\xE3o",toDecide:"a decidir \u2014 na planilha ou no cast.yaml",alone:"S\xF3 um tem: inova\xE7\xE3o ou d\xEDvida?",orchestratorDoes:"S\xF3 o orquestrador faz",sign:"Como a cast-list sabe",follows:"Quem segue",declaredOnly:"s\xF3 declarado",nothingUnknown:"Tudo foi entendido.",facts:"Fatos",off:"Fora do padr\xE3o",solo:"S\xF3 ele tem",children:"Filhos",close:"Fechar \u2715",foot:"Os fatos v\xEAm dos arquivos YAML; nada foi inventado.",summary:(e,n,a,r,t)=>`${e} no elenco \xB7 ${n} padr\xF5es \xB7 ${a} fora do padr\xE3o \xB7 ${r} s\xF3 um tem \xB7 limite ${t}% de cada papel`,excel:"\u2B07 Excel",yaml:"\u2B07 cast.yaml",png:"\u2B07 PNG",playbill:"RH do elenco \u2192",plot:"Palco \u2192",name:"Nome",said:"declarado",unused:e=>`Sem uso (${e})`,nothingUnused:"Tudo \xE9 usado, nada est\xE1 desligado.",flows:"Fluxos",returnsNothing:"n\xE3o devolve nada",otherFlow:"outro fluxo",telemetry:"Telemetria",times:(e,n)=>`${e} ${e===1?"vez":"vezes"} em ${n} dias`,notFired:"n\xE3o disparou",noLine:"nenhuma linha na telemetria",routing:"Roteamento",called:"Chamado",history:"Hist\xF3rico",inputs:"Entradas",description:"Descri\xE7\xE3o",notInFolder:"n\xE3o est\xE1 na pasta",chars:e=>`${e} caracteres`}},C=JSON.parse(document.getElementById("cast").textContent),{result:v,lang:F,looks:K}=C,u=$t[F],N=te[F],me=Ue(v,K,C.cast,F);document.documentElement.lang=F==="pt"?"pt-BR":"en";document.title=v.name??C.id;var g=e=>String(e??"").replace(/[&<>"']/g,n=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[n]),U=e=>g(T(e,F,v.names)),re=[...v.agents].sort((e,n)=>e.role===n.role?e.id.localeCompare(n.id):e.role==="orchestrator"?-1:1),Se=e=>v.patterns.find(n=>n.key===e),We=e=>[...new Set(v.offPattern.filter(n=>n.key===e||n.partOf===e).map(n=>n.agent))],_e=e=>e.startsWith("type:")?v.typeNames[e.slice(5)]??e.slice(5):N[e],Ve=e=>e.startsWith("type:")?"type":e,ce=Object.keys(v.typeNames),vt=e=>e.startsWith("text:block:")?v.blocks.find(n=>`text:block:${n.id}`===e):void 0,Oe=e=>{let n=Se(e);if(!n)return"";let a=n.decision?`<span class="cl-badge ${n.decision.status}">${g(N[n.decision.status==="accepted"?"accept":"reject"])}</span>`:"";return`${n.official?`<span class="cl-badge official">${u.official}</span>`:""}<span class="cl-badge ${Ve(n.scope)}">${u.pattern} \xB7 ${g(_e(n.scope))}</span>${a}`},L="map",I,z="all",ie,B,de=document.getElementById("app"),Ge=ne(K),le=new Set(Ge.filter(e=>!e.folded).map(e=>e.key));function He(){let e=[["map",u.map],["patterns",u.patterns],["cast",u.cast],["microsoft",u.microsoft],["unused",u.unused(v.unused.length)],["unknown",u.unknown(v.unknown.length)]],n=new Set(v.offPattern.map(a=>a.agent)).size;de.innerHTML=`<div class="cl-wrap">
155
+ <header><h1 class="cl-title">${g(v.name??C.id)}</h1><p class="cl-sub">${u.summary(v.agents.length,v.patterns.length,n,K.filter(a=>a.key==="solo").length,Math.round(C.threshold*100))}</p><p class="cl-private">${g(N.privacy)}</p></header>
156
+ <div class="cl-bar" role="tablist">${e.map(([a,r])=>`<button class="cl-tab" role="tab" aria-selected="${a===L}" data-tab="${a}">${g(r)}</button>`).join("")}
157
+ <span class="cl-space"></span>${C.plot?`<a class="cl-get" href="${g(C.plot)}">${g(u.plot)}</a>`:""}${C.playbill?`<a class="cl-get" href="${g(C.playbill)}">${g(u.playbill)}</a>`:""}<button class="cl-get" data-get="xlsx">${u.excel}</button><button class="cl-get" data-get="yaml">${u.yaml}</button>${L==="map"?`<button class="cl-get" data-get="png">${u.png}</button>`:""}</div>
158
+ ${L==="map"?kt():L==="patterns"?Te(me.find(a=>a.key==="patterns")):L==="cast"?Ot():L==="microsoft"?jt():L==="unused"?Pt():Nt()}
159
+ <p class="cl-foot">${u.foot}</p>
160
+ </div>`}function kt(){let e=a=>{let r=le.has(a.key),t=r?`<ul id="cl-group-${a.key}">${a.looks.map(({look:s,at:l})=>`<li><button data-look="${l}">${g(s[F])}</button></li>`).join("")}</ul>`:"";return`<div class="cl-group"><button class="cl-group-head" data-group="${a.key}" aria-expanded="${r}" aria-controls="cl-group-${a.key}"><span class="cl-caret">${r?"\u25BE":"\u25B8"}</span>${g(a[F])} <span class="cl-count">${a.looks.length}</span></button>${t}</div>`};return`${K.length?`<section class="cl-look"><h2>${g(N.look)} \xB7 ${K.length}</h2>${Ge.map(e).join("")}</section>`:""}<div class="cl-body${I?" with-detail":""}"><div class="cl-wrap" style="gap:16px">${bt()}${xt()}</div>${I?`<aside class="cl-card cl-detail" aria-live="polite">${St()}</aside>`:""}</div>`}function wt(){let e=t=>z==="all"||t.role===z;if(!ce.length)return[{id:"",name:"",cols:re.filter(e).map(t=>({a:t,also:[]}))}];let n=t=>v.types[t]??[],a=re.filter(t=>t.role==="specialist"&&e(t));return[{id:"orchestrator",name:N.orchestrator,cols:re.filter(t=>t.role==="orchestrator"&&e(t)).map(t=>({a:t,also:[]}))},...ce.map(t=>({id:t,name:v.typeNames[t],cols:a.filter(s=>n(s.id).includes(t)).map(s=>({a:s,also:n(s.id).filter(l=>l!==t).map(l=>v.typeNames[l]??l)}))})),{id:"-",name:u.noType,cols:a.filter(t=>!n(t.id).length).map(t=>({a:t,also:[]}))}].filter(t=>t.cols.length&&(!B||t.id===B))}function bt(){let e=wt(),n=e.flatMap(f=>f.cols),a=C.focusAreas.find(f=>f.id===ie),r=[...new Set([...v.agents.flatMap(f=>Object.keys(f.facts)),...v.patterns.map(f=>f.key)])].filter(f=>!f.endsWith("~variant")&&(!a||a.facts.includes(f))),t=new Set(v.offPattern.map(f=>`${f.agent} ${f.key}`)),s=(f,b,d,p)=>`<button class="cl-chip" ${f}="${g(b)}" aria-pressed="${d}">${g(p)}</button>`,l=`<div class="cl-filters">${u.role}: ${s("data-role","all",z==="all",u.all)}${s("data-role","specialist",z==="specialist",N.specialist)}${s("data-role","orchestrator",z==="orchestrator",N.orchestrator)}
161
+ ${ce.length?`<span style="margin-left:10px">${u.type}:</span> ${s("data-type","",!B,u.all)}${ce.map(f=>s("data-type",f,B===f,v.typeNames[f])).join("")}${s("data-type","-",B==="-",u.noType)}`:""}
162
+ ${C.focusAreas.length?`<span style="margin-left:10px">${u.focus}:</span> ${s("data-focus","",!ie,u.all)}${C.focusAreas.map(f=>s("data-focus",f.id,ie===f.id,f.name)).join("")}`:""}</div>`,c="";for(let f of Object.keys(G)){let b=p=>we(p)?`${T(we(p),F,v.names)}${T(p,F,v.names)}`:T(p,F,v.names),d=r.filter(p=>_(p)===f).sort((p,k)=>b(p).localeCompare(b(k)));d.length&&(c+=`<tr class="cl-dim"><td colspan="${n.length+1}">${g(G[f][F])}</td></tr>`,c+=d.map(p=>`<tr><th scope="row" style="text-align:left;font-weight:400"><button class="cl-fact${I?.key===p&&!I.agent?" picked":""}" data-key="${g(p)}">${U(p)}</button>${Oe(p)}</th>${n.map(({a:k})=>{let j=p in k.facts?p.startsWith("declared:")?["said","\u25D0"]:["has","\u25CF"]:`${p}~variant`in k.facts?["var","\u2248"]:t.has(`${k.id} ${p}`)?["off","\xD7"]:void 0;return`<td class="cl-mark${j?` ${j[0]}`:""}">${j?`<button data-key="${g(p)}" data-agent="${g(k.id)}" aria-label="${g(k.id)}: ${U(p)}">${j[1]}</button>`:""}</td>`}).join("")}</tr>`).join(""))}let m=e.some(f=>f.name)?`<tr class="cl-groups"><th></th>${e.map(f=>`<th colspan="${f.cols.length}" class="${f.id==="orchestrator"?"":"typed"}">${g(f.name)}</th>`).join("")}</tr>`:"",h=n.map(({a:f,also:b})=>`<th scope="col">${g(f.id)}<small>${g(b.length?`${u.alsoIn} ${b.join(", ")}`:N[f.role])}</small></th>`).join("");return`<section class="cl-card"><h2>${u.matrix}</h2>${l}<div class="cl-scroll"><table class="cl-matrix"><thead>${m}<tr><th></th>${h}</tr></thead><tbody>${c}</tbody></table></div><p class="cl-legend">${u.legend}</p></section>`}function xt(){let{look:e,everyone:n}=oe(v),a=r=>{let t=Se(r),s=v.agents.filter(c=>c.role===t.role).length,l=We(r);return`<button class="cl-pattern${I?.key===r?" picked":""}" data-pattern="${g(r)}"><b>${U(r)}</b><span>${Oe(r)} ${u.of(t.agents.filter(c=>v.roles[c]===t.role).length,s,be(t.role,F,s))}</span>
163
+ ${l.length?`<span class="cl-lack">${u.lacks}: ${g(l.join(", "))}</span>`:""}<span>${u.decision}: ${t.decision?`${g(N[t.decision.status==="accepted"?"accept":"reject"])}${t.decision.why?` \u2014 ${g(t.decision.why)}`:""}`:`<i>${u.toDecide}</i>`}</span></button>`};return`<section class="cl-card"><h2>${u.candidates}</h2>${e.length?`<div class="cl-cards">${e.map(r=>a(r.key)).join("")}</div>`:'<p class="cl-empty">\u2014</p>'}
164
+ ${n.length?`<details class="cl-everyone"><summary>${u.everyone(n.length)}</summary><ul>${n.map(r=>`<li><button class="cl-fact" data-pattern="${g(r.key)}">${U(r.key)}</button> <span class="cl-badge ${Ve(r.scope)}">${g(_e(r.scope))}</span></li>`).join("")}</ul></details>`:""}</section>`}function St(){let{key:e,agent:n}=I,a=Se(e),t=v.agents.filter(d=>e in d.facts&&(!n||d.id===n)).map(d=>`<li><b>${g(d.id)}</b>${d.facts[e].map(p=>`<div class="cl-file">${g(p.file)}${p.line?`:${p.line}`:""}</div>`).join("")}</li>`).join(""),s=We(e).filter(d=>!n||d===n),l=v.solos.some(d=>d.key===e),c=v.orchestratorDoes.some(d=>d.key===e),m=vt(e),h=d=>d.map(p=>p.op==="same"?g(p.text):`<span class="cl-${p.op}">${g(p.text)}</span>`).join(" "),f=m?Object.entries(m.variants).filter(([d])=>!n||d===n):[],b=m?`<div><b>${u.text}</b><pre class="cl-text">${g(m.text)}</pre></div>
165
+ ${f.map(([d,p])=>`<div class="cl-variant"><b>${g(d)}</b> <span class="cl-file">${g(p.source.file)}${p.source.line?`:${p.source.line}`:""} \xB7 ${Math.round(p.similarity*100)}% ${u.alike}</span><div class="cl-diff">${h(p.diff)}</div></div>`).join("")}`:"";return`<button class="cl-close" data-close="1">${u.close}</button><span class="cl-kicker">${g(G[_(e)][F])}</span><h3>${U(e)}</h3><code>${g(e)}</code>
166
+ ${a?`<div>${Oe(e)}</div><div>${u.decision}: ${a.decision?`${g(N[a.decision.status==="accepted"?"accept":"reject"])}${a.decision.why?` \u2014 ${g(a.decision.why)}`:""}`:`<i>${u.toDecide}</i>`}</div>`:""}
167
+ ${l?`<div>${u.alone}</div>`:c?`<div>${u.orchestratorDoes}</div>`:""}
168
+ ${b}
169
+ <div><b>${u.who}</b>${t?`<ul>${t}</ul>`:` \u2014 ${u.none}`}</div>
170
+ ${v.patterns.filter(d=>d.partOf===e).map(d=>{let p=v.offPattern.filter(k=>k.key===d.key).map(k=>k.agent);return`<div><b>${U(d.key)}</b> \u2014 ${p.length?`<span style="color:var(--off)">${u.lacks}: ${g(p.join(", "))}</span>`:`${u.who}: ${d.agents.length}`}</div>`}).join("")}
171
+ ${s.length?`<div><b>${u.lacks}</b>: <span style="color:var(--off)">${g(s.join(", "))}</span></div>`:""}`}function Ot(){return`<div class="cl-agents">${re.map(e=>{let n=v.offPattern.filter(s=>s.agent===e.id),a=v.solos.filter(s=>s.agents[0]===e.id),r=v.unknown.filter(s=>s.agent===e.id),t=Ct(e.id);return`<section class="cl-card cl-agent${t?" wide":""}"><span class="cl-kicker">${g(N[e.role])}</span><h3>${g(e.id)}</h3>${e.displayName?`<code>${g(e.displayName)}</code>`:""}<dl>
172
+ ${(v.types[e.id]??[]).length?`<dt>${u.types}</dt><dd>${g(v.types[e.id].map(s=>v.typeNames[s]??s).join(" \xB7 "))}</dd>`:""}
173
+ <dt>${u.facts}</dt><dd>${Object.keys(e.facts).length}</dd>
174
+ ${n.length?`<dt>${u.off}</dt><dd class="cl-lack">${n.map(s=>U(s.key)).join("<br>")}</dd>`:""}
175
+ ${a.length?`<dt>${u.solo}</dt><dd>${a.map(s=>U(s.key)).join("<br>")}</dd>`:""}
176
+ ${Tt(e.id,e.displayName??e.id)}
177
+ ${Rt(e.id)}
178
+ ${e.children.length?`<dt>${u.children}</dt><dd>${e.children.map(s=>`${g(s.name)} <span class="cl-sub">(${Object.keys(s.facts).map(U).join(", ")})</span>`).join("<br>")}</dd>`:""}
179
+ ${r.length?`<dt>${g(N.unknown)}</dt><dd>${r.map(s=>g(s.file)).join("<br>")}</dd>`:""}</dl>${t}</section>`}).join("")}</div>`}function Tt(e,n){let a=v.flows.filter(s=>s.agent===e&&s.called);if(!a.length)return"";let r=s=>s==="child-flow"?u.otherFlow:s.startsWith("http:")?s.slice(5):s.startsWith("connector:")?v.names[s.slice(10)]??s.slice(10):void 0,t=s=>{let l=s.uses.map(r).filter(c=>!!c);return`<div class="cl-chain">${[n,s.name,...l.length?[l.join(", ")]:[]].map(g).join(' <span aria-hidden="true">\u2192</span> ')}${s.returns?"":` <span class="cl-silent">\u2014 ${u.returnsNothing}</span>`}</div>`};return`<dt>${u.flows}</dt><dd>${a.map(t).join("")}</dd>`}function Rt(e){let n=v.telemetry.events.filter(s=>s.agent===e),a=v.telemetry.days,r=v.telemetry.silent.includes(e);if(!n.length&&!r)return"";let t=s=>`<div class="cl-event"><code>${g(s.name)}</code>${!a||r?"":s.fired?` <span class="cl-sub">\u2014 ${g(u.times(s.fired,a))}</span>`:` <span class="cl-silent">\u2014 ${u.notFired}</span>`}</div>`;return`<dt>${u.telemetry}</dt><dd class="cl-events">${n.map(t).join("")}${r?`<div class="cl-silent">${u.noLine}</div>`:""}</dd>`}function Ct(e){let n=v.contract.routes.filter(r=>r.caller===e);if(!n.length)return"";let a=n.map(r=>{let t=r.description.length<je;return`<tr><td>${r.agent?g(r.agent):`<span class="cl-silent">${g(r.name??r.calls)} \u2014 ${u.notInFolder}</span>`}</td>
180
+ <td${r.history?"":' class="cl-silent"'}>${r.history?N.yes:N.no}</td><td>${r.inputs.length?g(r.inputs.join(", ")):'<span class="cl-silent">\u2014</span>'}</td>
181
+ <td${t?' class="cl-silent"':""} title="${g(r.description)}">${g(u.chars(r.description.length))}</td></tr>`}).join("");return`<div class="cl-route"><h4>${u.routing}</h4><table class="cl-routing"><thead><tr><th>${u.called}</th><th>${u.history}</th><th>${u.inputs}</th><th>${u.description}</th></tr></thead><tbody>${a}</tbody></table></div>`}function Pt(){let e=me.find(n=>n.key==="unused");return e?Te(e):`<section class="cl-card"><p class="cl-empty">${u.nothingUnused}</p></section>`}function jt(){let e=ee.map(n=>{let a=v.agents.filter(r=>`ms:${n.id}`in r.facts||`declared:ms:${n.id}`in r.facts).map(r=>r.id);return`<tr><td><a href="${ve}/${n.id}.md" target="_blank" rel="noopener">${g(n.name)}</a></td><td>${g(n.sign??u.declaredOnly)}</td><td>${a.length?g(a.join(", ")):`<span class="cl-sub">${u.none}</span>`}</td></tr>`}).join("");return`<section class="cl-card cl-table"><table><thead><tr><th>${u.microsoft}</th><th>${u.sign}</th><th>${u.follows}</th></tr></thead><tbody>${e}</tbody></table></section>`}function Nt(){let e=me.find(n=>n.key==="unknown");return e?Te(e):`<section class="cl-card"><p class="cl-empty">${u.nothingUnknown}</p></section>`}function Te(e){let n=(t,s)=>{let l=typeof t=="object"&&t?t:{v:t},c=s?"th":"td";return`<${c}${l.fill&&!s?` style="background:#${l.fill};color:#1d2330"`:""}>${g(l.v)}</${c}>`},[a,...r]=e.rows;return`<section class="cl-card cl-table" role="tabpanel"><table><thead><tr>${a.map(t=>n(t,!0)).join("")}</tr></thead><tbody>${r.map(t=>`<tr>${t.map(s=>n(s,!1)).join("")}</tr>`).join("")}</tbody></table></section>`}function pe(e,n){let a=document.createElement("a");a.href=URL.createObjectURL(e),a.download=n,a.click(),setTimeout(()=>URL.revokeObjectURL(a.href),1e3)}async function Ft(){let e=de.querySelector(".cl-matrix"),[n,a]=[e.scrollWidth+32,e.scrollHeight+32],r=new XMLSerializer().serializeToString(e).replace(/ picked/g,""),t=`<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${a}"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" class="cl light" style="min-height:0;padding:16px;background:#fff;width:${n}px"><style>/* The cast map: tokens on .cl (not :root) so the PNG, drawn apart, carries them too. */
179
182
  .cl {
180
183
  --bg: #f6f6f3; --card: #ffffff; --ink: #1d2330; --muted: #5f6878; --line: #e2e4e8; --soft: #f3f4f1;
181
184
  --has: #2e7d55; --off: #c8442c; --off-bg: #fde8e3; --said: #b7791f;
@@ -297,7 +300,8 @@ body { margin: 0; }
297
300
  @media (max-width: 680px) { .cl-agent.wide { grid-column: auto; } }
298
301
  .cl-route { overflow-x: auto; }
299
302
  .cl-route h4 { margin: 6px 0 4px; font-size: 13px; color: var(--muted); }
300
- </style>${r}</div></foreignObject></svg>`;try{let a=new Image;a.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`,await a.decode();let d=document.createElement("canvas");d.width=n*2,d.height=s*2;let p=d.getContext("2d");p.scale(2,2),p.drawImage(a,0,0);let y=await new Promise(g=>d.toBlob(g,"image/png"));if(!y)throw new Error("no PNG");Y(y,`${x.id}.png`)}catch{Y(new Blob([t],{type:"image/svg+xml"}),`${x.id}.svg`)}}K.addEventListener("click",e=>{let n=e.target.closest("button");if(!n)return;let s=n.dataset;if(s.tab)T=s.tab;else if(s.role)M=s.role;else if(s.focus!==void 0)z=s.focus||void 0;else if(s.type!==void 0)I=s.type||void 0;else if(s.key)O={key:s.key,...s.agent?{agent:s.agent}:{}};else if(s.pattern)O={key:s.pattern};else if(s.close)O=void 0;else if(s.group)G.has(s.group)?G.delete(s.group):G.add(s.group);else if(s.look){let r=L[Number(s.look)];T="map",r.fact&&(O={key:r.fact,...r.agents.length===1?{agent:r.agents[0]}:{}}),(r.key==="off"||r.key==="gap"||r.key==="conflict")&&(O=r.fact?{key:r.fact}:O),r.key==="unknown"&&(T="unknown"),r.key==="unused"&&(T="unused")}else{if(s.get==="xlsx")return Y(new Blob([ue(Q)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),`${x.id}.xlsx`);if(s.get==="yaml")return Y(new Blob([x.castYaml],{type:"text/yaml"}),`${x.id}.cast.yaml`);if(s.get==="png")return void it()}ke(),(s.key||s.pattern||s.look)&&K.querySelector(".cl-detail")?.scrollIntoView({block:"nearest"})});ke();})();
303
+ a.cl-get { color: var(--ink); text-decoration: none; font-weight: 600; }
304
+ </style>${r}</div></foreignObject></svg>`;try{let s=new Image;s.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`,await s.decode();let l=document.createElement("canvas");l.width=n*2,l.height=a*2;let c=l.getContext("2d");c.scale(2,2),c.drawImage(s,0,0);let m=await new Promise(h=>l.toBlob(h,"image/png"));if(!m)throw new Error("no PNG");pe(m,`${C.id}.png`)}catch{pe(new Blob([t],{type:"image/svg+xml"}),`${C.id}.svg`)}}de.addEventListener("click",e=>{let n=e.target.closest("button");if(!n)return;let a=n.dataset;if(a.tab)L=a.tab;else if(a.role)z=a.role;else if(a.focus!==void 0)ie=a.focus||void 0;else if(a.type!==void 0)B=a.type||void 0;else if(a.key)I={key:a.key,...a.agent?{agent:a.agent}:{}};else if(a.pattern)I={key:a.pattern};else if(a.close)I=void 0;else if(a.group)le.has(a.group)?le.delete(a.group):le.add(a.group);else if(a.look){let r=K[Number(a.look)];L="map",r.fact&&(I={key:r.fact,...r.agents.length===1?{agent:r.agents[0]}:{}}),(r.key==="off"||r.key==="gap"||r.key==="conflict")&&(I=r.fact?{key:r.fact}:I),r.key==="unknown"&&(L="unknown"),r.key==="unused"&&(L="unused")}else{if(a.get==="xlsx")return pe(new Blob([qe(me)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),`${C.id}.xlsx`);if(a.get==="yaml")return pe(new Blob([C.castYaml],{type:"text/yaml"}),`${C.id}.cast.yaml`);if(a.get==="png")return void Ft()}He(),(a.key||a.pattern||a.look)&&de.querySelector(".cl-detail")?.scrollIntoView({block:"nearest"})});He();})();
301
305
  </script>
302
306
  </body>
303
307
  </html>