@opencxh/domain 1.221.0 → 1.224.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,32 +1,32 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const X=10,w=10,N=10,k=5,$n=new Set(["header","section","context","divider","image","list","actions","attachments"]);function H(e){if(typeof e=="string")return e.length>0;if(!e||typeof e!="object")return!1;const t=e;return typeof t.key=="string"||typeof t.value=="string"}function Kn(e,t=()=>{}){if(!Array.isArray(e))return[];const n=[];for(const r of e){if(n.length>=X){t(`more than ${X} blocks; the rest was dropped`);break}if(!r||typeof r!="object")continue;const i=r;if(!$n.has(i.type)){t(`unknown block type ${String(i.type)}`);continue}switch(i.type){case"header":if(!H(i.text)){t("a header without text");continue}break;case"context":if(!H(i.text)){t("a context block without text");continue}break;case"image":if(!i.url||!i.alt){t("an image without url or alt");continue}break;case"section":Array.isArray(i.fields)&&i.fields.length>w&&(t(`more than ${w} fields in a section`),i.fields=i.fields.slice(0,w));break;case"list":if(!Array.isArray(i.items)||i.items.length===0){t("a list without items");continue}i.items.length>N&&(t(`more than ${N} list items`),i.items=i.items.slice(0,N));break;case"actions":{const o=Array.isArray(i.elements)?i.elements:[],a=o.filter(s=>s?.action_id&&s.invoke&&H(s.text));if(a.length!==o.length&&t("an action without action_id, invoke or text"),a.length===0)continue;a.length>k&&t(`more than ${k} actions`),i.elements=a.slice(0,k);break}}n.push(i)}return n}const Bn=/(\*\*|__)(?=\S)([\s\S]*?\S)\1/g,Fn=/(\*|_)(?=\S)([^*_\n]*?\S)\1/g;function Fe(e){if(typeof e!="string"||!e)return"";let t=e;return t=t.replace(/```[a-z]*\n?/gi,"").replace(/~~~[a-z]*\n?/gi,""),t=t.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1"),t=t.replace(/\[([^\]]*)\]\([^)]*\)/g,"$1"),t=t.replace(/\[([^\]]*)\]\[[^\]]*\]/g,"$1"),t=t.replace(/<((?:https?|mailto):[^>\s]+)>/gi,"$1"),t=t.split(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const X=10,C=10,N=10,k=5,Bn=new Set(["header","section","context","divider","image","list","actions","attachments"]);function H(e){if(typeof e=="string")return e.length>0;if(!e||typeof e!="object")return!1;const t=e;return typeof t.key=="string"||typeof t.value=="string"}function Fn(e,t=()=>{}){if(!Array.isArray(e))return[];const n=[];for(const r of e){if(n.length>=X){t(`more than ${X} blocks; the rest was dropped`);break}if(!r||typeof r!="object")continue;const i=r;if(!Bn.has(i.type)){t(`unknown block type ${String(i.type)}`);continue}switch(i.type){case"header":if(!H(i.text)){t("a header without text");continue}break;case"context":if(!H(i.text)){t("a context block without text");continue}break;case"image":if(!i.url||!i.alt){t("an image without url or alt");continue}break;case"section":Array.isArray(i.fields)&&i.fields.length>C&&(t(`more than ${C} fields in a section`),i.fields=i.fields.slice(0,C));break;case"list":if(!Array.isArray(i.items)||i.items.length===0){t("a list without items");continue}i.items.length>N&&(t(`more than ${N} list items`),i.items=i.items.slice(0,N));break;case"actions":{const o=Array.isArray(i.elements)?i.elements:[],a=o.filter(s=>s?.action_id&&s.invoke&&H(s.text));if(a.length!==o.length&&t("an action without action_id, invoke or text"),a.length===0)continue;a.length>k&&t(`more than ${k} actions`),i.elements=a.slice(0,k);break}}n.push(i)}return n}const Gn=/(\*\*|__)(?=\S)([\s\S]*?\S)\1/g,Hn=/(\*|_)(?=\S)([^*_\n]*?\S)\1/g;function Ge(e){if(typeof e!="string"||!e)return"";let t=e;return t=t.replace(/```[a-z]*\n?/gi,"").replace(/~~~[a-z]*\n?/gi,""),t=t.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1"),t=t.replace(/\[([^\]]*)\]\([^)]*\)/g,"$1"),t=t.replace(/\[([^\]]*)\]\[[^\]]*\]/g,"$1"),t=t.replace(/<((?:https?|mailto):[^>\s]+)>/gi,"$1"),t=t.split(`
2
2
  `).map(n=>n.replace(/^\s{0,3}#{1,6}\s+/,"").replace(/^\s{0,3}>\s?/,"").replace(/^\s*[-*+]\s+/,"").replace(/^\s*\d+[.)]\s+/,"").replace(/^\s*(?:[-*_]\s*){3,}$/,"")).join(`
3
- `),t=t.replace(Bn,"$2"),t=t.replace(Fn,"$2"),t=t.replace(/~~(?=\S)([\s\S]*?\S)~~/g,"$1"),t=t.replace(/`([^`\n]+)`/g,"$1"),t.replace(/\s+/g," ").trim()}function Ge(e){return e.replace(/<style[\s\S]*?<\/style>/gi," ").replace(/<script[\s\S]*?<\/script>/gi," ").replace(/<[^>]+>/g," ").replace(/&nbsp;/g," ").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/\s+/g," ").trim()}function R(e){if(!e||e<0)return"";const t=Math.floor(e/60),n=Math.floor(e%60);return`${t}:${n.toString().padStart(2,"0")}`}function ye(e){return e?` — ${Math.floor(e/60)}m ${e%60}s`:""}function W(e){return e?.split("@")?.[0]||e||""}function C(e){return e.map(t=>t.name).join(", ")}function _e(e){return e==="meeting"?"Meeting":e==="video"?"Video call":"Audio call"}const S={VOICE_CALL_STARTED:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Gesprek gestart",timeline:e=>e.direction==="inbound"?`Inbound call started — ${W(e.payload.from)}`:`Outbound call started — ${W(e.payload.to)}`},VOICE_CALL_ANSWERED:{shape:"event",channelKind:"voice",icon:"phone",connected:!0,snippet:()=>"Gesprek aangenomen",timeline:(e,t)=>`Call answered — ${t}`},VOICE_CALL_HOLD:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"In de wacht",timeline:(e,t)=>`Call on hold — ${t}`},VOICE_CALL_UNHOLD:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Hervat"},VOICE_CALL_ENDED:{shape:"event",channelKind:"voice",icon:"phone",snippet:e=>`Gesprek beëindigd${e.payload.duration?` (${R(e.payload.duration)})`:""}`,timeline:e=>`Call ended${ye(e.payload.duration)}`},VOICE_CALL_MISSED:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Gemiste oproep",timeline:e=>`Missed call — ${W(e.payload.from)}`},VOICE_CALL_FAILED:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Gesprek mislukt",timeline:()=>"Call failed"},VOICE_CALL_VOICEMAIL:{shape:"artifact",channelKind:"voice",icon:"phone",snippet:e=>e.payload.transcription?.trim()?e.payload.transcription:"Voicemail ontvangen"},VIDEO_CALL_STARTED:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"Gesprek gestart",timeline:()=>"Video call started"},VIDEO_CALL_ANSWERED:{shape:"event",channelKind:"video",icon:"video",connected:!0,snippet:()=>"Gesprek aangenomen",timeline:()=>"Video call answered"},VIDEO_CALL_HOLD:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"In de wacht"},VIDEO_CALL_UNHOLD:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"Hervat"},VIDEO_CALL_ENDED:{shape:"event",channelKind:"video",icon:"video",snippet:e=>`Gesprek beëindigd${e.payload.duration?` (${R(e.payload.duration)})`:""}`,timeline:()=>"Video call ended"},VIDEO_CALL_MISSED:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"Gemiste oproep",timeline:()=>"Missed video call"},VIDEO_CALL_FAILED:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"Gesprek mislukt",timeline:()=>"Video call failed"},EMAIL_RECEIVED:{shape:"message",triggerable:!0,displayNameKey:"communication:activity.EMAIL_RECEIVED",component:"communication:EmailActivity",channelKind:"mail",icon:"mail",replyable:!0,carriesText:!0,countsAs:"inbound_message",snippet:Te},EMAIL_SENT:{shape:"message",component:"communication:EmailActivity",channelKind:"mail",icon:"mail",replyable:!0,carriesText:!0,countsAs:"outbound_message",snippet:Te},CHAT_MESSAGE_SENT:{shape:"message",component:"communication:ChatMessage",channelKind:"chat",icon:"message-circle",replyable:!0,carriesText:!0,countsAs:"outbound_message",snippet:e=>e.payload.text??""},CHAT_MESSAGE_RECEIVED:{shape:"message",triggerable:!0,displayNameKey:"communication:activity.CHAT_MESSAGE_RECEIVED",component:"communication:ChatMessage",channelKind:"chat",icon:"message-circle",replyable:!0,carriesText:!0,countsAs:"inbound_message",snippet:e=>e.payload.text??""},CHAT_MEMBER_JOINED:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>`${C(e.payload.members)} toegevoegd`,timeline:e=>{const t=C(e.payload.members)||"Someone",n=e.payload.initiator?.name?` · added by ${e.payload.initiator.name}`:"";return`${t} joined the chat${n}`}},CHAT_MEMBER_LEFT:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>`${C(e.payload.members)} verlaten`,timeline:e=>{const t=C(e.payload.members)||"Someone",n=e.payload.initiator?.name?` · removed by ${e.payload.initiator.name}`:"";return`${t} left the chat${n}`}},CHAT_RENAMED:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>`Hernoemd naar "${e.payload.newName}"`,timeline:e=>`Chat renamed to "${e.payload.newName}"${e.payload.initiator?` by ${e.payload.initiator.name}`:""}`},CHAT_CALL_STARTED:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:()=>"Gesprek gestart",timeline:e=>`${_e(e.payload.callType)} started${e.payload.initiator?` by ${e.payload.initiator.name}`:""}`,joinUrl:e=>e.payload.joinUrl},CHAT_CALL_ENDED:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>`Gesprek beëindigd${e.payload.duration?` (${R(e.payload.duration)})`:""}`,timeline:e=>`${_e(e.payload.callType)} ended${ye(e.payload.duration)}`,joinUrl:e=>e.payload.joinUrl},CHAT_EVENT:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>e.payload.text??e.payload.eventType,timeline:e=>e.payload.text||e.payload.eventType},TRANSCRIPT_ADDED:{shape:"artifact",triggerable:!0,displayNameKey:"communication:activity.TRANSCRIPT_ADDED",component:"communication:TranscriptionActivity",icon:"captions",carriesText:!0,snippet:e=>(e.payload.segments??[]).map(t=>t.text).join(" ")},COMMENT_ADDED:{shape:"note",component:"communication:CommentActivity",icon:"sticky-note",carriesText:!0,snippet:e=>e.payload.text??""},FILE_UPLOADED:{shape:"artifact",component:"communication:FileActivity",icon:"paperclip",snippet:e=>`Bestand: ${e.payload.fileName}`},AI_MESSAGE_ADDED:{shape:"event",triggerable:!0,displayNameKey:"communication:activity.AI_MESSAGE_ADDED",icon:"circle",snippet:e=>e.payload.output?.text??e.payload.input?.text??"",timeline:()=>"AI message added"},AI_ACTION_PROPOSED:{shape:"event",component:"communication:ProposedActionCard",icon:"circle",playbookAuthored:!0,snippet:e=>`Voorstel wacht op goedkeuring (${e.payload.actions?.length??0} actie(s))`},PLAYBOOK_STARTED:{shape:"event",icon:"circle",playbookAuthored:!0,snippet:e=>`Playbook gestart${e.payload.playbookName?`: ${e.payload.playbookName}`:""}`,timeline:e=>`Playbook gestart${e.payload.playbookName?` — ${e.payload.playbookName}`:""}`},PLAYBOOK_COMPLETED:{shape:"event",icon:"circle",playbookAuthored:!0,snippet:()=>"Playbook afgerond",timeline:()=>"Playbook afgerond"},PLAYBOOK_ESCALATED:{shape:"event",icon:"circle",playbookAuthored:!0,snippet:()=>"Playbook geëscaleerd naar een mens",timeline:()=>"Playbook geëscaleerd naar een mens"},MEETING_SCHEDULED:{shape:"event",icon:"calendar",snippet:e=>`Vergadering gepland: ${e.payload.title}`,timeline:()=>"Meeting scheduled",joinUrl:e=>e.payload.joinUrl},MEETING_STARTED:{shape:"event",icon:"calendar",connected:!0,snippet:e=>`Vergadering gestart: ${e.payload.title}`,timeline:()=>"Meeting started",joinUrl:e=>e.payload.joinUrl},MEETING_ENDED:{shape:"event",icon:"calendar",snippet:e=>`Vergadering beëindigd${e.payload.duration?` (${R(e.payload.duration)})`:""}`,timeline:()=>"Meeting ended"},MEETING_PARTICIPANT_JOINED:{shape:"event",icon:"calendar",snippet:e=>`${e.payload.name} deelgenomen`,timeline:(e,t)=>`${t} joined the meeting`},MEETING_PARTICIPANT_LEFT:{shape:"event",icon:"calendar",snippet:e=>`${e.payload.name} verlaten`,timeline:(e,t)=>`${t} left the meeting`},INTERACTION_CREATED:{shape:"event",icon:"circle",snippet:()=>"Interactie aangemaakt",timeline:(e,t)=>`Interaction started by ${t}`},INTERACTION_STATUS_CHANGED:{shape:"event",triggerable:!0,displayNameKey:"communication:activity.INTERACTION_STATUS_CHANGED",icon:"circle-dot",snippet:e=>`Status: ${e.payload.fromStatus} → ${e.payload.toStatus}`,timeline:(e,t)=>`Status changed to ${e.payload.toStatus} by ${t}`},INTERACTION_ASSIGNED:{shape:"event",icon:"user",snippet:()=>"Interactie toegewezen",timeline:(e,t)=>`Assigned by ${t}`},WORK_COMMENT_ADDED:{shape:"note",icon:"sticky-note",carriesText:!0,snippet:()=>"Reactie"},WORK_ITEM_ASSIGNED:{shape:"event",icon:"user",snippet:()=>"Taak toegewezen",timeline:(e,t)=>`Assigned by ${t}`},WORK_ITEM_STATUS_CHANGED:{shape:"event",triggerable:!0,icon:"circle-dot",snippet:()=>"Status gewijzigd",timeline:(e,t)=>`Status changed by ${t}`}};function Te(e){const t=e.payload,n=Fe(t.bodyText).trim()||t.bodySnippet?.trim()||Ge(t.body??"");return t.subject?`${t.subject} — ${n}`:n}function m(e){return S[e]}function Gn(e){return m(e)?.icon??"circle"}function Hn(e){return m(e)?.channelKind}function oe(e){return e==="message"||e==="note"}function Wn(e){return oe(m(e)?.shape)}function Vn(e){return m(e)?.replyable===!0}function jn(e){return m(e)?.carriesText===!0}function He(e){return m(e)?.countsAs}function Yn(e){return m(e)?.playbookAuthored===!0}function Xn(e){return m(e)?.connected===!0}function zn(e){const t=m(e);return t?.shape==="artifact"&&t?.carriesText===!0}function We(e){const t=m(e.type)?.snippet;return t?t(e):""}function qn(e,t){const n=m(e.type)?.timeline;return n?n(e,t):e.type.replace(/_/g," ").toLowerCase()}function Jn(e){const t=m(e.type)?.joinUrl;return t?t(e):void 0}function P(e,t){let n=e;for(const r of t.split(".")){if(n==null||typeof n!="object")return"";n=n[r]}return n==null?"":typeof n=="string"?n:typeof n=="number"||typeof n=="boolean"?String(n):""}function U(e,t,n){if(e===void 0)return null;if(typeof e=="string")return e||null;if("value"in e)return P(t,e.value)||null;const r={};for(const[o,a]of Object.entries(e.params??{}))r[o]=P(t,a);const i=n(e.key,r);return i===e.key?null:i}function Ve(e,t){if(!e||typeof e=="string"||"value"in e)return null;const n={};for(const[r,i]of Object.entries(e.params??{}))n[r]=P(t,i);return{key:e.key,params:n}}const be=140;function Zn(e){const t=e.trim();return t.length<=be?t:`${t.slice(0,be-1).trimEnd()}…`}function Qn(e,t){const n=Ve(t?.text,e),r=t?U(t.text,e,i=>i):null;return{activityId:e.id,type:e.type,snippet:Zn(r??We(e)),authorName:e.author?.name??"",direction:e.direction,createdAt:e.createdAt??Date.now(),...n?{snippetKey:n.key,snippetParams:n.params}:{}}}const er=e=>e;function Ie(e){const t=S[e];return{type:e,shape:t.shape,channelKind:t.channelKind,icon:t.icon,replyable:t.replyable===!0,countsAs:t.countsAs,carriesText:t.carriesText===!0,triggerable:t.triggerable===!0,component:t.component,builtIn:!0,displayNameKey:t.displayNameKey}}function Me(e){return{type:e.type,shape:e.shape,channelKind:e.channelKind,icon:e.icon||"circle",replyable:e.replyable===!0,countsAs:e.countsAs,carriesText:e.carriesText===!0,triggerable:e.triggerable===!0,component:e.component,builtIn:!1,displayNameKey:e.displayNameKey}}class je{constructor(t=[],n=er){this.translate=n;for(const r of t)r?.type&&(r.type in S||this.declared.has(r.type)||this.declared.set(r.type,r))}declared=new Map;get(t){if(t in S)return Ie(t);const n=this.declared.get(t);return n?Me(n):void 0}triggerable(){const t=Object.keys(S).filter(r=>S[r].triggerable).map(Ie),n=[...this.declared.values()].map(Me).filter(r=>r.triggerable);return[...t,...n]}timelineText(t,n){const r=S[t.type];if(r?.timeline)return r.timeline(t,n);const i=this.declared.get(t.type);return U(i?.text,t,this.translate)??t.type.replace(/_/g," ").toLowerCase()}snippet(t){const n=S[t.type];if(n?.snippet)return n.snippet(t);const r=this.declared.get(t.type);return U(r?.text,t,this.translate)??""}descriptor(t){return this.declared.get(t)}blocks(t){const n=this.declared.get(t)?.render;return n?.length?n:void 0}isMessage(t){return oe(this.get(t)?.shape)}isReplyable(t){return this.get(t)?.replyable===!0}carriesText(t){return this.get(t)?.carriesText===!0}countsAs(t){return this.get(t)?.countsAs}channelKind(t){return this.get(t)?.channelKind}isTranscript(t){const n=this.get(t);return n?.shape==="artifact"&&n.carriesText}get translator(){return this.translate}}const tr=new je;function nr(e,t,n=[]){const r=e.createdAt;if(!r)return[];const i=new Set(n);return e.author.type==="user"&&e.author.id&&i.add(e.author.id),Object.entries(t).filter(([o,a])=>a>=r&&!i.has(o)).map(([o])=>o)}function Ye(e){return e.createdAt??0}function rr(e){return e.type==="EMAIL_RECEIVED"||e.type==="EMAIL_SENT"}function ir(e){return e.type==="CHAT_MESSAGE_SENT"||e.type==="CHAT_MESSAGE_RECEIVED"}const ae=[{id:"openai",attachmentKinds:["image","pdf"],label:"OpenAI",capabilities:["chat","transcription","embedding"],defaultModel:"gpt-5-mini",baseUrl:"https://api.openai.com/v1"},{id:"gemini",attachmentKinds:["image","pdf"],label:"Google Gemini",capabilities:["chat","transcription","embedding"],defaultModel:"gemini-3.5-flash",baseUrl:"https://generativelanguage.googleapis.com/v1beta"},{id:"anthropic",attachmentKinds:["image","pdf"],label:"Anthropic",capabilities:["chat"],defaultModel:"claude-haiku-4-5",baseUrl:"https://api.anthropic.com/v1"},{id:"elevenlabs",label:"ElevenLabs",capabilities:["transcription"],baseUrl:"https://api.elevenlabs.io/v1"},{id:"moonshot",label:"Moonshot (Kimi)",capabilities:["chat"],defaultModel:"kimi-k3",baseUrl:"https://api.moonshot.ai/v1"},{id:"deepseek",label:"DeepSeek",capabilities:["chat"],defaultModel:"deepseek-v4-flash",baseUrl:"https://api.deepseek.com/v1"},{id:"groq",label:"Groq",capabilities:["chat"],defaultModel:"openai/gpt-oss-120b",baseUrl:"https://api.groq.com/openai/v1"},{id:"mistral",label:"Mistral",capabilities:["chat"],defaultModel:"mistral-large-latest",baseUrl:"https://api.mistral.ai/v1"},{id:"openrouter",label:"OpenRouter",capabilities:["chat"],defaultModel:"openrouter/auto",baseUrl:"https://openrouter.ai/api/v1"},{id:"ollama",label:"Ollama (self-hosted)",capabilities:["chat"],defaultModel:"llama3.3"},{id:"openai-compatible",label:"OpenAI-compatible (eigen endpoint)",capabilities:["chat"],defaultModel:"default"}];function M(e){return ae.find(t=>t.id===e)}function or(e){return M(e)?.label??e}function ar(e,t="gpt-5-mini"){return M(e)?.defaultModel??t}function sr(e){return ae.filter(t=>t.capabilities.includes(e))}function cr(e){const t=M(e);return!!t&&!t.baseUrl}function lr(e,t){return t==="text"?!0:M(e)?.attachmentKinds?.includes(t)===!0}function ur(e,t){if(!e.enabled)return"ok";const n=z(e.hardLimitNanos),r=z(e.softLimitNanos);return n!==void 0&&t>=n?"hard":r!==void 0&&t>=r?"soft":"ok"}function z(e){return typeof e=="number"?e:void 0}function Xe(e,t="month"){const n=new Date(e);return Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),1)}function dr(e,t="month"){const n=new Date(Xe(e,t));return`${n.getUTCFullYear()}-${String(n.getUTCMonth()+1).padStart(2,"0")}`}function pr(e){return e?.listeningEnabled!==!1}const fr=[{id:"agent",label:"Agent",labelSource:"user"},{id:"team",label:"Team",labelSource:"team"},{id:"inbox",label:"Inbox",labelSource:"inbox"},{id:"channel",label:"Kanaal",labelSource:"channel"},{id:"provider",label:"Provider",labelSource:"raw"},{id:"status",label:"Status",labelSource:"raw"},{id:"handledBy",label:"Afhandelaar",labelSource:"raw"},{id:"time",label:"Tijd",labelSource:"raw"}];function V(e){return e<10?`0${e}`:`${e}`}function ze(e,t){const n=new Date(e),r=`${n.getUTCFullYear()}-${V(n.getUTCMonth()+1)}-${V(n.getUTCDate())}`;return t==="day"?r:`${r}T${V(n.getUTCHours())}`}function qe(e,t){const n=new Date(e);return n.setUTCMinutes(0,0,0),t==="day"&&n.setUTCHours(0),n.getTime()}const mr=36e5,gr=864e5;function hr(e,t,n){const r=n==="hour"?mr:gr,i=[];for(let o=qe(e,n);o<=t;o+=r)i.push(ze(o,n));return i}const Je=[{id:"resource",label:"Resource",labelSource:"raw"},{id:"origin",label:"Herkomst",labelSource:"raw"}],Ze=Je.map(e=>e.id);function Qe(e,t){return`${e}.usage.${t}`}function Er(e,t){return t.map(n=>({id:Qe(e,n.unit),label:n.label,category:"Verbruik",valueType:n.valueType??"count",aggregation:"sum",supportedDimensions:["provider",...Ze,...n.extraDimensions??[],"time"]}))}const et=new Set(["info","success","warning","destructive"]),q=200,J=100,Z=200,Q=12,ee=4,se=4e3,v=500,Ar=256*1024,Sr=new Set(["heading","paragraph","list","quote","code","divider","table","kpi","callout"]),tt=["http:","https:","mailto:","tel:"],yr=/^[a-z][a-z0-9+.-]*:/i;function nt(e){const t=e.trim().replace(/^<|>$/g,"");if(!t)return!1;const n=yr.exec(t)?.[0];return n?tt.includes(n.toLowerCase()):!t.startsWith("//")}const _r=/^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;function Tr(e){let t="",n=0;for(;n<e.length;){const r=e[n]==="!"&&e[n+1]==="[";if(e[n]!=="["&&!r){t+=e[n],n+=1;continue}const i=n+(r?2:1),o=Oe(e,i,"[","]");if(o<0||e[o+1]!=="("){t+=e[n],n+=1;continue}const a=Oe(e,o+2,"(",")");if(a<0){t+=e[n],n+=1;continue}const s=e.slice(i,o),d=e.slice(o+2,a).trim().split(/\s+/)[0]??"";t+=r||!nt(d)?s:e.slice(n,a+1),n=a+1}return t}function Oe(e,t,n,r){let i=1;for(let o=t;o<e.length;o+=1){if(e[o]==="\\"){o+=1;continue}if(e[o]===n)i+=1;else if(e[o]===r&&(i-=1,i===0))return o}return-1}function rt(e){return Tr(e).replace(_r,(t,n,r)=>nt(r)?t:"")}function h(e,t=se){return typeof e=="string"?rt(e).slice(0,t):""}function br(e,t=se){return typeof e=="string"?e.slice(0,t):""}function Ir(e,t="info"){return typeof e=="string"&&et.has(e)?e:t}function Mr(e,t=()=>{}){if(!Array.isArray(e))return[];const n=[];for(const r of e){if(n.length>=q){t(`more than ${q} blocks; the rest was dropped`);break}if(!r||typeof r!="object")continue;const i=r;if(!Sr.has(i.type)){t(`unknown block type ${String(i.type)}`);continue}const o=typeof i.block_id=="string"?{block_id:i.block_id}:{};switch(i.type){case"heading":{const a=h(i.text);if(!a){t("a heading without text");continue}const s=i.level===2||i.level===3?i.level:1;n.push({...o,type:"heading",level:s,text:a});break}case"paragraph":{const a=h(i.text);if(!a){t("a paragraph without text");continue}n.push({...o,type:"paragraph",text:a});break}case"quote":{const a=h(i.text);if(!a){t("a quote without text");continue}n.push({...o,type:"quote",text:a});break}case"code":{const a=br(i.text);if(!a){t("a code block without text");continue}const s=typeof i.lang=="string"?{lang:i.lang.slice(0,32)}:{};n.push({...o,type:"code",...s,text:a});break}case"divider":n.push({...o,type:"divider"});break;case"list":{const a=Array.isArray(i.items)?i.items:[],s=[];for(const f of a){if(s.length>=J){t(`more than ${J} list items`);break}const A=h(f?.text);if(!A)continue;const g=h(f?.lead,200);s.push(g?{lead:g,text:A}:{text:A})}if(s.length===0){t("a list without usable items");continue}const d=i.style==="numbered"?"numbered":"bulleted";n.push({...o,type:"list",style:d,items:s});break}case"table":{const a=Array.isArray(i.columns)?i.columns:[],s=[];for(const g of a){if(s.length>=Q){t(`more than ${Q} table columns`);break}const O=h(g?.label,v),G=g?.align==="right"?"right":void 0;s.push(G?{label:O,align:G}:{label:O})}if(s.length===0){t("a table without columns");continue}const d=Array.isArray(i.rows)?i.rows:[],f=[];for(const g of d){if(f.length>=Z){t(`more than ${Z} table rows`);break}const O=Array.isArray(g)?g:[];f.push(s.map((G,Un)=>h(O[Un],v)))}const A=h(i.caption,v);n.push({...o,type:"table",columns:s,rows:f,...A?{caption:A}:{}});break}case"kpi":{const a=Array.isArray(i.items)?i.items:[],s=[];for(const d of a){if(s.length>=ee){t(`more than ${ee} kpi items`);break}const f=h(d?.value,40),A=h(d?.label,80);if(!f||!A)continue;const g=d?.tone;s.push(typeof g=="string"&&et.has(g)?{value:f,label:A,tone:g}:{value:f,label:A})}if(s.length===0){t("a kpi block without usable items");continue}n.push({...o,type:"kpi",items:s});break}case"callout":{const a=h(i.text);if(!a){t("a callout without text");continue}const s=h(i.title,200);n.push({...o,type:"callout",tone:Ir(i.tone),...s?{title:s}:{},text:a});break}}}return n}function Or(e){return JSON.stringify(e).length}function Rr(e){return{blocks:e.length,types:e.map(t=>t.type),headings:e.flatMap(t=>t.type==="heading"?[t.text]:[])}}function Re(e){return e.replace(/\|/g,"\\|").replace(/\r?\n/g," ").trim()}function Ce(e,t,n){const r=e.map((i,o)=>n?.[o]==="right"?"---:":"---");return[`| ${e.map(Re).join(" | ")} |`,`| ${r.join(" | ")} |`,...t.map(i=>`| ${i.map(Re).join(" | ")} |`)]}function Cr(e){switch(e.type){case"heading":return[`${"#".repeat(e.level)} ${e.text}`];case"paragraph":return[e.text];case"quote":return e.text.split(/\r?\n/).map(t=>`> ${t}`);case"code":return[`\`\`\`${e.lang??""}`,e.text,"```"];case"divider":return["---"];case"list":return e.items.map((t,n)=>{const r=e.style==="numbered"?`${n+1}.`:"-";return t.lead?`${r} **${t.lead}** ${t.text}`:`${r} ${t.text}`});case"table":{const t=Ce(e.columns.map(n=>n.label),e.rows,e.columns.map(n=>n.align??"left"));return e.caption?[...t,"",`*${e.caption}*`]:t}case"kpi":return Ce(e.items.map(t=>t.value),[e.items.map(t=>t.label)]);case"callout":return(e.title?`**${e.title}** ${e.text}`:e.text).split(/\r?\n/).map(n=>`> ${n}`)}}function wr(e,t){const n=[],r=e.some(i=>i.type==="heading"&&i.level===1);t&&!r&&n.push(`# ${t}`);for(const i of e){const o=Cr(i);o.length>0&&n.push(o.join(`
3
+ `),t=t.replace(Gn,"$2"),t=t.replace(Hn,"$2"),t=t.replace(/~~(?=\S)([\s\S]*?\S)~~/g,"$1"),t=t.replace(/`([^`\n]+)`/g,"$1"),t.replace(/\s+/g," ").trim()}function He(e){return e.replace(/<style[\s\S]*?<\/style>/gi," ").replace(/<script[\s\S]*?<\/script>/gi," ").replace(/<[^>]+>/g," ").replace(/&nbsp;/g," ").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/\s+/g," ").trim()}function w(e){if(!e||e<0)return"";const t=Math.floor(e/60),n=Math.floor(e%60);return`${t}:${n.toString().padStart(2,"0")}`}function _e(e){return e?` — ${Math.floor(e/60)}m ${e%60}s`:""}function W(e){return e?.split("@")?.[0]||e||""}function R(e){return e.map(t=>t.name).join(", ")}function Te(e){return e==="meeting"?"Meeting":e==="video"?"Video call":"Audio call"}const S={VOICE_CALL_STARTED:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Gesprek gestart",timeline:e=>e.direction==="inbound"?`Inbound call started — ${W(e.payload.from)}`:`Outbound call started — ${W(e.payload.to)}`},VOICE_CALL_ANSWERED:{shape:"event",channelKind:"voice",icon:"phone",connected:!0,snippet:()=>"Gesprek aangenomen",timeline:(e,t)=>`Call answered — ${t}`},VOICE_CALL_HOLD:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"In de wacht",timeline:(e,t)=>`Call on hold — ${t}`},VOICE_CALL_UNHOLD:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Hervat"},VOICE_CALL_ENDED:{shape:"event",channelKind:"voice",icon:"phone",snippet:e=>`Gesprek beëindigd${e.payload.duration?` (${w(e.payload.duration)})`:""}`,timeline:e=>`Call ended${_e(e.payload.duration)}`},VOICE_CALL_MISSED:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Gemiste oproep",timeline:e=>`Missed call — ${W(e.payload.from)}`},VOICE_CALL_FAILED:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Gesprek mislukt",timeline:()=>"Call failed"},VOICE_CALL_VOICEMAIL:{shape:"artifact",channelKind:"voice",icon:"phone",snippet:e=>e.payload.transcription?.trim()?e.payload.transcription:"Voicemail ontvangen"},VIDEO_CALL_STARTED:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"Gesprek gestart",timeline:()=>"Video call started"},VIDEO_CALL_ANSWERED:{shape:"event",channelKind:"video",icon:"video",connected:!0,snippet:()=>"Gesprek aangenomen",timeline:()=>"Video call answered"},VIDEO_CALL_HOLD:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"In de wacht"},VIDEO_CALL_UNHOLD:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"Hervat"},VIDEO_CALL_ENDED:{shape:"event",channelKind:"video",icon:"video",snippet:e=>`Gesprek beëindigd${e.payload.duration?` (${w(e.payload.duration)})`:""}`,timeline:()=>"Video call ended"},VIDEO_CALL_MISSED:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"Gemiste oproep",timeline:()=>"Missed video call"},VIDEO_CALL_FAILED:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"Gesprek mislukt",timeline:()=>"Video call failed"},EMAIL_RECEIVED:{shape:"message",triggerable:!0,displayNameKey:"communication:activity.EMAIL_RECEIVED",component:"communication:EmailActivity",channelKind:"mail",icon:"mail",replyable:!0,carriesText:!0,countsAs:"inbound_message",snippet:be},EMAIL_SENT:{shape:"message",component:"communication:EmailActivity",channelKind:"mail",icon:"mail",replyable:!0,carriesText:!0,countsAs:"outbound_message",snippet:be},CHAT_MESSAGE_SENT:{shape:"message",component:"communication:ChatMessage",channelKind:"chat",icon:"message-circle",replyable:!0,carriesText:!0,countsAs:"outbound_message",snippet:e=>e.payload.text??""},CHAT_MESSAGE_RECEIVED:{shape:"message",triggerable:!0,displayNameKey:"communication:activity.CHAT_MESSAGE_RECEIVED",component:"communication:ChatMessage",channelKind:"chat",icon:"message-circle",replyable:!0,carriesText:!0,countsAs:"inbound_message",snippet:e=>e.payload.text??""},CHAT_MEMBER_JOINED:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>`${R(e.payload.members)} toegevoegd`,timeline:e=>{const t=R(e.payload.members)||"Someone",n=e.payload.initiator?.name?` · added by ${e.payload.initiator.name}`:"";return`${t} joined the chat${n}`}},CHAT_MEMBER_LEFT:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>`${R(e.payload.members)} verlaten`,timeline:e=>{const t=R(e.payload.members)||"Someone",n=e.payload.initiator?.name?` · removed by ${e.payload.initiator.name}`:"";return`${t} left the chat${n}`}},CHAT_RENAMED:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>`Hernoemd naar "${e.payload.newName}"`,timeline:e=>`Chat renamed to "${e.payload.newName}"${e.payload.initiator?` by ${e.payload.initiator.name}`:""}`},CHAT_CALL_STARTED:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:()=>"Gesprek gestart",timeline:e=>`${Te(e.payload.callType)} started${e.payload.initiator?` by ${e.payload.initiator.name}`:""}`,joinUrl:e=>e.payload.joinUrl},CHAT_CALL_ENDED:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>`Gesprek beëindigd${e.payload.duration?` (${w(e.payload.duration)})`:""}`,timeline:e=>`${Te(e.payload.callType)} ended${_e(e.payload.duration)}`,joinUrl:e=>e.payload.joinUrl},CHAT_EVENT:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>e.payload.text??e.payload.eventType,timeline:e=>e.payload.text||e.payload.eventType},TRANSCRIPT_ADDED:{shape:"artifact",triggerable:!0,displayNameKey:"communication:activity.TRANSCRIPT_ADDED",component:"communication:TranscriptionActivity",icon:"captions",carriesText:!0,snippet:e=>(e.payload.segments??[]).map(t=>t.text).join(" ")},COMMENT_ADDED:{shape:"note",component:"communication:CommentActivity",icon:"sticky-note",carriesText:!0,snippet:e=>e.payload.text??""},FILE_UPLOADED:{shape:"artifact",component:"communication:FileActivity",icon:"paperclip",snippet:e=>`Bestand: ${e.payload.fileName}`},AI_MESSAGE_ADDED:{shape:"event",triggerable:!0,displayNameKey:"communication:activity.AI_MESSAGE_ADDED",icon:"circle",snippet:e=>e.payload.output?.text??e.payload.input?.text??"",timeline:()=>"AI message added"},AI_ACTION_PROPOSED:{shape:"event",component:"communication:ProposedActionCard",icon:"circle",playbookAuthored:!0,snippet:e=>`Voorstel wacht op goedkeuring (${e.payload.actions?.length??0} actie(s))`},PLAYBOOK_STARTED:{shape:"event",icon:"circle",playbookAuthored:!0,snippet:e=>`Playbook gestart${e.payload.playbookName?`: ${e.payload.playbookName}`:""}`,timeline:e=>`Playbook gestart${e.payload.playbookName?` — ${e.payload.playbookName}`:""}`},PLAYBOOK_COMPLETED:{shape:"event",icon:"circle",playbookAuthored:!0,snippet:()=>"Playbook afgerond",timeline:()=>"Playbook afgerond"},PLAYBOOK_ESCALATED:{shape:"event",icon:"circle",playbookAuthored:!0,snippet:()=>"Playbook geëscaleerd naar een mens",timeline:()=>"Playbook geëscaleerd naar een mens"},MEETING_SCHEDULED:{shape:"event",icon:"calendar",snippet:e=>`Vergadering gepland: ${e.payload.title}`,timeline:()=>"Meeting scheduled",joinUrl:e=>e.payload.joinUrl},MEETING_STARTED:{shape:"event",icon:"calendar",connected:!0,snippet:e=>`Vergadering gestart: ${e.payload.title}`,timeline:()=>"Meeting started",joinUrl:e=>e.payload.joinUrl},MEETING_ENDED:{shape:"event",icon:"calendar",snippet:e=>`Vergadering beëindigd${e.payload.duration?` (${w(e.payload.duration)})`:""}`,timeline:()=>"Meeting ended"},MEETING_PARTICIPANT_JOINED:{shape:"event",icon:"calendar",snippet:e=>`${e.payload.name} deelgenomen`,timeline:(e,t)=>`${t} joined the meeting`},MEETING_PARTICIPANT_LEFT:{shape:"event",icon:"calendar",snippet:e=>`${e.payload.name} verlaten`,timeline:(e,t)=>`${t} left the meeting`},INTERACTION_CREATED:{shape:"event",icon:"circle",snippet:()=>"Interactie aangemaakt",timeline:(e,t)=>`Interaction started by ${t}`},INTERACTION_STATUS_CHANGED:{shape:"event",triggerable:!0,displayNameKey:"communication:activity.INTERACTION_STATUS_CHANGED",icon:"circle-dot",snippet:e=>`Status: ${e.payload.fromStatus} → ${e.payload.toStatus}`,timeline:(e,t)=>`Status changed to ${e.payload.toStatus} by ${t}`},INTERACTION_ASSIGNED:{shape:"event",icon:"user",snippet:()=>"Interactie toegewezen",timeline:(e,t)=>`Assigned by ${t}`},WORK_COMMENT_ADDED:{shape:"note",icon:"sticky-note",carriesText:!0,snippet:()=>"Reactie"},WORK_ITEM_ASSIGNED:{shape:"event",icon:"user",snippet:()=>"Taak toegewezen",timeline:(e,t)=>`Assigned by ${t}`},WORK_ITEM_STATUS_CHANGED:{shape:"event",triggerable:!0,icon:"circle-dot",snippet:()=>"Status gewijzigd",timeline:(e,t)=>`Status changed by ${t}`}};function be(e){const t=e.payload,n=Ge(t.bodyText).trim()||t.bodySnippet?.trim()||He(t.body??"");return t.subject?`${t.subject} — ${n}`:n}function f(e){return S[e]}function Wn(e){return f(e)?.icon??"circle"}function Vn(e){return f(e)?.channelKind}function oe(e){return e==="message"||e==="note"}function jn(e){return oe(f(e)?.shape)}function ae(e){return e==="note"}function Yn(e){return ae(f(e)?.shape)}function Xn(e){return f(e)?.replyable===!0}function zn(e){return f(e)?.carriesText===!0}function We(e){return f(e)?.countsAs}function qn(e){return f(e)?.playbookAuthored===!0}function Jn(e){return f(e)?.connected===!0}function Zn(e){const t=f(e);return t?.shape==="artifact"&&t?.carriesText===!0}function Ve(e){const t=f(e.type)?.snippet;return t?t(e):""}function Qn(e,t){const n=f(e.type)?.timeline;return n?n(e,t):e.type.replace(/_/g," ").toLowerCase()}function er(e){const t=f(e.type)?.joinUrl;return t?t(e):void 0}function P(e,t){let n=e;for(const r of t.split(".")){if(n==null||typeof n!="object")return"";n=n[r]}return n==null?"":typeof n=="string"?n:typeof n=="number"||typeof n=="boolean"?String(n):""}function U(e,t,n){if(e===void 0)return null;if(typeof e=="string")return e||null;if("value"in e)return P(t,e.value)||null;const r={};for(const[o,a]of Object.entries(e.params??{}))r[o]=P(t,a);const i=n(e.key,r);return i===e.key?null:i}function je(e,t){if(!e||typeof e=="string"||"value"in e)return null;const n={};for(const[r,i]of Object.entries(e.params??{}))n[r]=P(t,i);return{key:e.key,params:n}}const Ie=140;function tr(e){const t=e.trim();return t.length<=Ie?t:`${t.slice(0,Ie-1).trimEnd()}…`}function nr(e,t){const n=je(t?.text,e),r=t?U(t.text,e,i=>i):null;return{activityId:e.id,type:e.type,snippet:tr(r??Ve(e)),authorName:e.author?.name??"",direction:e.direction,createdAt:e.createdAt??Date.now(),...n?{snippetKey:n.key,snippetParams:n.params}:{}}}const rr=e=>e;function Oe(e){const t=S[e];return{type:e,shape:t.shape,channelKind:t.channelKind,icon:t.icon,replyable:t.replyable===!0,countsAs:t.countsAs,carriesText:t.carriesText===!0,triggerable:t.triggerable===!0,component:t.component,builtIn:!0,displayNameKey:t.displayNameKey}}function Me(e){return{type:e.type,shape:e.shape,channelKind:e.channelKind,icon:e.icon||"circle",replyable:e.replyable===!0,countsAs:e.countsAs,carriesText:e.carriesText===!0,triggerable:e.triggerable===!0,component:e.component,builtIn:!1,displayNameKey:e.displayNameKey}}class Ye{constructor(t=[],n=rr){this.translate=n;for(const r of t)r?.type&&(r.type in S||this.declared.has(r.type)||this.declared.set(r.type,r))}declared=new Map;get(t){if(t in S)return Oe(t);const n=this.declared.get(t);return n?Me(n):void 0}triggerable(){const t=Object.keys(S).filter(r=>S[r].triggerable).map(Oe),n=[...this.declared.values()].map(Me).filter(r=>r.triggerable);return[...t,...n]}timelineText(t,n){const r=S[t.type];if(r?.timeline)return r.timeline(t,n);const i=this.declared.get(t.type);return U(i?.text,t,this.translate)??t.type.replace(/_/g," ").toLowerCase()}snippet(t){const n=S[t.type];if(n?.snippet)return n.snippet(t);const r=this.declared.get(t.type);return U(r?.text,t,this.translate)??""}descriptor(t){return this.declared.get(t)}blocks(t){const n=this.declared.get(t)?.render;return n?.length?n:void 0}isMessage(t){return oe(this.get(t)?.shape)}nestsUnderParent(t){return ae(this.get(t)?.shape)}isReplyable(t){return this.get(t)?.replyable===!0}carriesText(t){return this.get(t)?.carriesText===!0}countsAs(t){return this.get(t)?.countsAs}channelKind(t){return this.get(t)?.channelKind}isTranscript(t){const n=this.get(t);return n?.shape==="artifact"&&n.carriesText}get translator(){return this.translate}}const ir=new Ye;function or(e,t,n=[]){const r=e.createdAt;if(!r)return[];const i=new Set(n);return e.author.type==="user"&&e.author.id&&i.add(e.author.id),Object.entries(t).filter(([o,a])=>a>=r&&!i.has(o)).map(([o])=>o)}function Xe(e){return e.createdAt??0}function ar(e){return e.type==="EMAIL_RECEIVED"||e.type==="EMAIL_SENT"}function sr(e){return e.type==="CHAT_MESSAGE_SENT"||e.type==="CHAT_MESSAGE_RECEIVED"}const se=[{id:"openai",attachmentKinds:["image","pdf"],label:"OpenAI",capabilities:["chat","transcription","embedding"],defaultModel:"gpt-5-mini",baseUrl:"https://api.openai.com/v1"},{id:"gemini",attachmentKinds:["image","pdf"],label:"Google Gemini",capabilities:["chat","transcription","embedding"],defaultModel:"gemini-3.5-flash",baseUrl:"https://generativelanguage.googleapis.com/v1beta"},{id:"anthropic",attachmentKinds:["image","pdf"],label:"Anthropic",capabilities:["chat"],defaultModel:"claude-haiku-4-5",baseUrl:"https://api.anthropic.com/v1"},{id:"elevenlabs",label:"ElevenLabs",capabilities:["transcription"],baseUrl:"https://api.elevenlabs.io/v1"},{id:"moonshot",label:"Moonshot (Kimi)",capabilities:["chat"],defaultModel:"kimi-k3",baseUrl:"https://api.moonshot.ai/v1"},{id:"deepseek",label:"DeepSeek",capabilities:["chat"],defaultModel:"deepseek-v4-flash",baseUrl:"https://api.deepseek.com/v1"},{id:"groq",label:"Groq",capabilities:["chat"],defaultModel:"openai/gpt-oss-120b",baseUrl:"https://api.groq.com/openai/v1"},{id:"mistral",label:"Mistral",capabilities:["chat"],defaultModel:"mistral-large-latest",baseUrl:"https://api.mistral.ai/v1"},{id:"openrouter",label:"OpenRouter",capabilities:["chat"],defaultModel:"openrouter/auto",baseUrl:"https://openrouter.ai/api/v1"},{id:"ollama",label:"Ollama (self-hosted)",capabilities:["chat"],defaultModel:"llama3.3"},{id:"openai-compatible",label:"OpenAI-compatible (eigen endpoint)",capabilities:["chat"],defaultModel:"default"}];function O(e){return se.find(t=>t.id===e)}function cr(e){return O(e)?.label??e}function lr(e,t="gpt-5-mini"){return O(e)?.defaultModel??t}function ur(e){return se.filter(t=>t.capabilities.includes(e))}function dr(e){const t=O(e);return!!t&&!t.baseUrl}function pr(e,t){return t==="text"?!0:O(e)?.attachmentKinds?.includes(t)===!0}function fr(e,t){if(!e.enabled)return"ok";const n=z(e.hardLimitNanos),r=z(e.softLimitNanos);return n!==void 0&&t>=n?"hard":r!==void 0&&t>=r?"soft":"ok"}function z(e){return typeof e=="number"?e:void 0}function ze(e,t="month"){const n=new Date(e);return Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),1)}function mr(e,t="month"){const n=new Date(ze(e,t));return`${n.getUTCFullYear()}-${String(n.getUTCMonth()+1).padStart(2,"0")}`}function gr(e){return e?.listeningEnabled!==!1}const hr=[{id:"agent",label:"Agent",labelSource:"user"},{id:"team",label:"Team",labelSource:"team"},{id:"inbox",label:"Inbox",labelSource:"inbox"},{id:"channel",label:"Kanaal",labelSource:"channel"},{id:"provider",label:"Provider",labelSource:"raw"},{id:"status",label:"Status",labelSource:"raw"},{id:"handledBy",label:"Afhandelaar",labelSource:"raw"},{id:"time",label:"Tijd",labelSource:"raw"}];function V(e){return e<10?`0${e}`:`${e}`}function qe(e,t){const n=new Date(e),r=`${n.getUTCFullYear()}-${V(n.getUTCMonth()+1)}-${V(n.getUTCDate())}`;return t==="day"?r:`${r}T${V(n.getUTCHours())}`}function Je(e,t){const n=new Date(e);return n.setUTCMinutes(0,0,0),t==="day"&&n.setUTCHours(0),n.getTime()}const Er=36e5,Ar=864e5;function Sr(e,t,n){const r=n==="hour"?Er:Ar,i=[];for(let o=Je(e,n);o<=t;o+=r)i.push(qe(o,n));return i}const Ze=[{id:"resource",label:"Resource",labelSource:"raw"},{id:"origin",label:"Herkomst",labelSource:"raw"}],Qe=Ze.map(e=>e.id);function et(e,t){return`${e}.usage.${t}`}function yr(e,t){return t.map(n=>({id:et(e,n.unit),label:n.label,category:"Verbruik",valueType:n.valueType??"count",aggregation:"sum",supportedDimensions:["provider",...Qe,...n.extraDimensions??[],"time"]}))}const tt=new Set(["info","success","warning","destructive"]),q=200,J=100,Z=200,Q=12,ee=4,ce=4e3,v=500,_r=256*1024,Tr=new Set(["heading","paragraph","list","quote","code","divider","table","kpi","callout"]),nt=["http:","https:","mailto:","tel:"],br=/^[a-z][a-z0-9+.-]*:/i;function rt(e){const t=e.trim().replace(/^<|>$/g,"");if(!t)return!1;const n=br.exec(t)?.[0];return n?nt.includes(n.toLowerCase()):!t.startsWith("//")}const Ir=/^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;function Or(e){let t="",n=0;for(;n<e.length;){const r=e[n]==="!"&&e[n+1]==="[";if(e[n]!=="["&&!r){t+=e[n],n+=1;continue}const i=n+(r?2:1),o=we(e,i,"[","]");if(o<0||e[o+1]!=="("){t+=e[n],n+=1;continue}const a=we(e,o+2,"(",")");if(a<0){t+=e[n],n+=1;continue}const s=e.slice(i,o),d=e.slice(o+2,a).trim().split(/\s+/)[0]??"";t+=r||!rt(d)?s:e.slice(n,a+1),n=a+1}return t}function we(e,t,n,r){let i=1;for(let o=t;o<e.length;o+=1){if(e[o]==="\\"){o+=1;continue}if(e[o]===n)i+=1;else if(e[o]===r&&(i-=1,i===0))return o}return-1}function it(e){return Or(e).replace(Ir,(t,n,r)=>rt(r)?t:"")}function h(e,t=ce){return typeof e=="string"?it(e).slice(0,t):""}function Mr(e,t=ce){return typeof e=="string"?e.slice(0,t):""}function wr(e,t="info"){return typeof e=="string"&&tt.has(e)?e:t}function Rr(e,t=()=>{}){if(!Array.isArray(e))return[];const n=[];for(const r of e){if(n.length>=q){t(`more than ${q} blocks; the rest was dropped`);break}if(!r||typeof r!="object")continue;const i=r;if(!Tr.has(i.type)){t(`unknown block type ${String(i.type)}`);continue}const o=typeof i.block_id=="string"?{block_id:i.block_id}:{};switch(i.type){case"heading":{const a=h(i.text);if(!a){t("a heading without text");continue}const s=i.level===2||i.level===3?i.level:1;n.push({...o,type:"heading",level:s,text:a});break}case"paragraph":{const a=h(i.text);if(!a){t("a paragraph without text");continue}n.push({...o,type:"paragraph",text:a});break}case"quote":{const a=h(i.text);if(!a){t("a quote without text");continue}n.push({...o,type:"quote",text:a});break}case"code":{const a=Mr(i.text);if(!a){t("a code block without text");continue}const s=typeof i.lang=="string"?{lang:i.lang.slice(0,32)}:{};n.push({...o,type:"code",...s,text:a});break}case"divider":n.push({...o,type:"divider"});break;case"list":{const a=Array.isArray(i.items)?i.items:[],s=[];for(const m of a){if(s.length>=J){t(`more than ${J} list items`);break}const A=h(m?.text);if(!A)continue;const g=h(m?.lead,200);s.push(g?{lead:g,text:A}:{text:A})}if(s.length===0){t("a list without usable items");continue}const d=i.style==="numbered"?"numbered":"bulleted";n.push({...o,type:"list",style:d,items:s});break}case"table":{const a=Array.isArray(i.columns)?i.columns:[],s=[];for(const g of a){if(s.length>=Q){t(`more than ${Q} table columns`);break}const M=h(g?.label,v),G=g?.align==="right"?"right":void 0;s.push(G?{label:M,align:G}:{label:M})}if(s.length===0){t("a table without columns");continue}const d=Array.isArray(i.rows)?i.rows:[],m=[];for(const g of d){if(m.length>=Z){t(`more than ${Z} table rows`);break}const M=Array.isArray(g)?g:[];m.push(s.map((G,Kn)=>h(M[Kn],v)))}const A=h(i.caption,v);n.push({...o,type:"table",columns:s,rows:m,...A?{caption:A}:{}});break}case"kpi":{const a=Array.isArray(i.items)?i.items:[],s=[];for(const d of a){if(s.length>=ee){t(`more than ${ee} kpi items`);break}const m=h(d?.value,40),A=h(d?.label,80);if(!m||!A)continue;const g=d?.tone;s.push(typeof g=="string"&&tt.has(g)?{value:m,label:A,tone:g}:{value:m,label:A})}if(s.length===0){t("a kpi block without usable items");continue}n.push({...o,type:"kpi",items:s});break}case"callout":{const a=h(i.text);if(!a){t("a callout without text");continue}const s=h(i.title,200);n.push({...o,type:"callout",tone:wr(i.tone),...s?{title:s}:{},text:a});break}}}return n}function Cr(e){return JSON.stringify(e).length}function Nr(e){return{blocks:e.length,types:e.map(t=>t.type),headings:e.flatMap(t=>t.type==="heading"?[t.text]:[])}}function Re(e){return e.replace(/\|/g,"\\|").replace(/\r?\n/g," ").trim()}function Ce(e,t,n){const r=e.map((i,o)=>n?.[o]==="right"?"---:":"---");return[`| ${e.map(Re).join(" | ")} |`,`| ${r.join(" | ")} |`,...t.map(i=>`| ${i.map(Re).join(" | ")} |`)]}function kr(e){switch(e.type){case"heading":return[`${"#".repeat(e.level)} ${e.text}`];case"paragraph":return[e.text];case"quote":return e.text.split(/\r?\n/).map(t=>`> ${t}`);case"code":return[`\`\`\`${e.lang??""}`,e.text,"```"];case"divider":return["---"];case"list":return e.items.map((t,n)=>{const r=e.style==="numbered"?`${n+1}.`:"-";return t.lead?`${r} **${t.lead}** ${t.text}`:`${r} ${t.text}`});case"table":{const t=Ce(e.columns.map(n=>n.label),e.rows,e.columns.map(n=>n.align??"left"));return e.caption?[...t,"",`*${e.caption}*`]:t}case"kpi":return Ce(e.items.map(t=>t.value),[e.items.map(t=>t.label)]);case"callout":return(e.title?`**${e.title}** ${e.text}`:e.text).split(/\r?\n/).map(n=>`> ${n}`)}}function vr(e,t){const n=[],r=e.some(i=>i.type==="heading"&&i.level===1);t&&!r&&n.push(`# ${t}`);for(const i of e){const o=kr(i);o.length>0&&n.push(o.join(`
4
4
  `))}return`${n.join(`
5
5
 
6
6
  `)}
7
- `}const ce=e=>`user:${e}`,le=e=>`team:${e}`;function Nr(e){const t=new Set;for(const n of e??[])n?.id&&(n.kind==="user"&&t.add(ce(n.id)),n.kind==="team"&&t.add(le(n.id)));return[...t].sort()}function kr(e,t){return[ce(e),...t.map(le)]}function vr(e){const t=new Set;for(const n of e??[])n?.kind&&t.add(n.kind);return[...t]}const it=["done","escalated"],Dr=["open","waiting"];function Lr(e){return it.includes(e)}const ot="assignment";function xr(e){return`${ot}:${e}`}function Pr(e,t,n){if(e.direction==="inbound")return!0;if(e.author?.type==="user"&&e.author.id===t)return!1;const r=e.payload?.mentions;return Array.isArray(r)&&r.includes(t)?!0:n==="reply"}function Ur(e){return e.subjectKind&&e.subjectId?{type:e.subjectKind,id:e.subjectId}:void 0}const at=12;function $r(e,t,n=at){const r=t+1;return e?e.kind==="done"?{status:"done",waitingOn:null,turns:r,reason:e.note}:e.kind==="escalate"?{status:"escalated",waitingOn:null,turns:r,reason:e.reason}:r>=n?{status:"escalated",waitingOn:null,turns:r,reason:`na ${n} beurten nog niet afgerond, dus een mens neemt het over`}:{status:"waiting",waitingOn:e.on,turns:r}:{status:"escalated",waitingOn:null,turns:r,reason:"de agent rondde zijn beurt af zonder te zeggen wat er moet gebeuren (wachten, afronden of overdragen)"}}const Kr=new Set(["mail","message"]);function st(e,t){const n=e.settings?.signatures?.[t];return!n?.enabled||!n.body||n.body.trim()===""?null:n}function Br(e,t,n,r="html"){if(!e)return n;const i=st(e,t);return i?`${n}${r==="text"?`
7
+ `}const le=e=>`user:${e}`,ue=e=>`team:${e}`;function Dr(e){const t=new Set;for(const n of e??[])n?.id&&(n.kind==="user"&&t.add(le(n.id)),n.kind==="team"&&t.add(ue(n.id)));return[...t].sort()}function xr(e,t){return[le(e),...t.map(ue)]}function Lr(e){const t=new Set;for(const n of e??[])n?.kind&&t.add(n.kind);return[...t]}const ot=["done","escalated"],Pr=["open","waiting"];function Ur(e){return ot.includes(e)}const at="assignment";function $r(e){return`${at}:${e}`}function Kr(e,t,n,r){if(e.direction==="inbound")return!0;if(e.author?.type==="user"&&e.author.id===t)return!1;const i=e.payload?.mentions;return Array.isArray(i)&&i.includes(t)||r&&r===t?!0:n==="reply"}function Br(e){const{targetAuthorId:t,reactorId:n,agentId:r,on:i}=e;return!i||!t||t!==r?!1:n!==r}function Fr(e){return e.subjectKind&&e.subjectId?{type:e.subjectKind,id:e.subjectId}:void 0}const st=12;function Gr(e,t,n=st){const r=t+1;return e?e.kind==="done"?{status:"done",waitingOn:null,turns:r,reason:e.note}:e.kind==="escalate"?{status:"escalated",waitingOn:null,turns:r,reason:e.reason}:r>=n?{status:"escalated",waitingOn:null,turns:r,reason:`na ${n} beurten nog niet afgerond, dus een mens neemt het over`}:{status:"waiting",waitingOn:e.on,turns:r}:{status:"escalated",waitingOn:null,turns:r,reason:"de agent rondde zijn beurt af zonder te zeggen wat er moet gebeuren (wachten, afronden of overdragen)"}}const Hr=new Set(["mail","message"]);function ct(e,t){const n=e.settings?.signatures?.[t];return!n?.enabled||!n.body||n.body.trim()===""?null:n}function Wr(e,t,n,r="html"){if(!e)return n;const i=ct(e,t);return i?`${n}${r==="text"?`
8
8
 
9
- `:t==="mail"?"<br><br>-- <br>":"<br><br>"}${i.body}`:n}function Fr(e){return e.endpoints??[]}const ct=36e5,lt=864e5,y=-1/0,Gr=e=>e.score>y,I={urgent:40,high:25,normal:10,low:0};function Hr(e){return Object.fromEntries(e.map(t=>[t.resourceId,t]))}const Wr=/(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i,ut=/\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;function dt(e,t){return!!(e&&Wr.test(e)||t&&ut.test(t))}const pt=3,ft=600;function Vr(e,t){return e>=pt||t>=ft}const mt=["list-unsubscribe","list-unsubscribe-post","list-id","precedence","auto-submitted","x-auto-response-suppress","feedback-id","x-mailer"];function jr(e){const t={};for(const n of e){const r=n.name?.toLowerCase();r&&n.value!==void 0&&mt.includes(r)&&(t[r]=n.value)}return t}const Yr=/(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|notifications?|bounce|postmaster|mailer)@/i,Xr=/(^|[._+-])(newsletter|nieuwsbrief|marketing|mailing)@/i;function zr(e){const t=e.headers??{},n=e.from?.email,r=t["auto-submitted"]?.toLowerCase();if(r&&r!=="no"||t["x-auto-response-suppress"]||n&&Yr.test(n))return"automated";const i=t.precedence?.toLowerCase();if(t["list-unsubscribe"]||t["list-unsubscribe-post"]||t["list-id"]||i==="bulk"||i==="list"||e.body&&ut.test(e.body)||n&&Xr.test(n))return"marketing"}function gt(e,t){return e.lastActivityAt?!(e.seenBy??[]).includes(t):!1}const ht=["open"],Et=1e3,At={urgent:1,high:4,normal:8,low:24},St=72;function yt(e){return e.lastActivityAt??(e.createdAt?new Date(Ye(e)).getTime():0)}function _t(e,t){return Tt(t.remindersById?.[e.id],e,t.now)}function Tt(e,t,n){return!e||e.remindAt<=n?!1:!((t.lastActivityAt??0)>e.parkedAt&&t.lastActivityPreview?.direction==="inbound")}const bt=e=>He(e)==="outbound_message",It=e=>ht.includes(e);function K(e,t){return Math.max(0,(t-yt(e))/ct)}function Mt(e,t){const n=e.assignedInboxId?t?.[e.assignedInboxId]:void 0;return typeof n=="number"&&n>0?n:At[e.priority??"normal"]}function qr(e){const t={};for(const n of e)typeof n.slaHours=="number"&&n.slaHours>0&&(t[n.id]=n.slaHours);return t}function Jr(e,t,n){return!It(e.status)||e.firstResponseAt?!1:K(e,t)>Mt(e,n)}function Ot(e,t){const n=e.lastActivityPreview;return n?.direction!=="outbound"||!bt(n.type)?!1:K(e,t)<St}function Zr(e,t){if(!It(e.status))return{score:y,reasons:[]};if(e.snoozedTill&&e.snoozedTill>t.now)return{score:y,reasons:[]};if(Ot(e,t.now))return{score:y,reasons:[]};if(_t(e,t))return{score:y,reasons:[]};let n=0;const r=[],i=e.priority??"normal";I[i]>0&&(n+=I[i],r.push(`priority:${i}`)),gt(e,t.userId)&&(n+=20,r.push("unseen")),e.assignedUserId&&e.assignedUserId===t.userId&&(n+=15,r.push("assigned-to-you"));const o=K(e,t.now);if(o>0){const d=Math.min(o*2,30);n+=d,o>=1&&r.push(`waiting:${Math.round(o)}h`)}const a=e.lastActivityPreview;return a?.type==="AI_ACTION_PROPOSED"&&(n+=30,r.push("awaiting-approval")),a?.direction==="outbound"&&bt(a.type)&&(n+=10,r.push("no-reply")),!e.firstResponseAt&&e.lastActivityPreview?.direction==="inbound"&&(n+=10,r.push("awaiting-reply")),(e.tags?.some(d=>d==="marketing"||d==="automated")||dt(e.remoteParty?.resource,e.lastActivityPreview?.snippet))&&(n-=Et,r.push("bulk")),{score:n,reasons:r}}const Qr=e=>!!e.assignedUserId||!!e.assignedInboxId,ei=e=>e.status==="closed",ti=e=>({urgent:10,high:5,normal:2,low:1})[e.priority]||0,ni=(e,t=30)=>e.title?.length<=t?e.title:`${e.title.substring(0,t)}...`;function ri(e,t){const n=e.labels??[];return n.find(r=>r.locale===t)?.label??n[0]?.label??e.url}function ii(e,t,n){const r=e.translations??[];return r.find(i=>i.locale===t)??(n?r.find(i=>i.locale===n):void 0)??{locale:t}}const te=[{code:"nl",label:"Nederlands",english:"Dutch"},{code:"en",label:"English",english:"English"},{code:"de",label:"Deutsch",english:"German"},{code:"fr",label:"Français",english:"French"},{code:"es",label:"Español",english:"Spanish"},{code:"it",label:"Italiano",english:"Italian"},{code:"pt",label:"Português",english:"Portuguese"},{code:"pl",label:"Polski",english:"Polish"},{code:"sv",label:"Svenska",english:"Swedish"},{code:"da",label:"Dansk",english:"Danish"},{code:"nb",label:"Norsk bokmål",english:"Norwegian Bokmål"},{code:"fi",label:"Suomi",english:"Finnish"},{code:"tr",label:"Türkçe",english:"Turkish"}];function Rt(e){const t=(e??"").toLowerCase();return te.find(n=>n.code===t)??te.find(n=>n.code===t.split("-")[0])}function oi(e){return Rt(e)?.label??e}function ai(e){const t=Rt(e);return t?t.english===t.label?`${t.english} (${t.code})`:`${t.english} — ${t.label} (${t.code})`:e}const ue=3;function Ct(e,t){const n=new Set;let r=1,i=t.get(e)?.parentId;for(;i;){if(n.has(i)||(n.add(i),r++,r>ue+1))return 1/0;i=t.get(i)?.parentId}return r}function si(e,t,n){if(!e)return!0;if(e===t)return!1;const r=new Map(n.map(a=>[a.id,a]));if(!r.has(e)||t&&wt(e,t,r))return!1;const i=Ct(e,r),o=t?de(t,n):1;return i+o<=ue}function wt(e,t,n){const r=new Set;let i=n.get(e)?.parentId;for(;i;){if(i===t)return!0;if(r.has(i))return!1;r.add(i),i=n.get(i)?.parentId}return!1}function de(e,t,n=new Set){if(n.has(e))return 1;n.add(e);const r=t.filter(i=>i.parentId===e);return r.length?1+Math.max(...r.map(i=>de(i.id,t,n))):1}const Nt="en";function kt(e){return e.defaultLocale||e.locale||Nt}function ci(e){const t=new Set,n=[];for(const r of[kt(e),...e.locales??[]])!r||t.has(r)||(t.add(r),n.push(r));return n}function li(e,t,n){const r=e.translations??[];return r.find(i=>i.locale===t)?.name??(n?r.find(i=>i.locale===n)?.name:void 0)??e.name}const ne=["lookup","condition","parallel","for-each"];function re(e){for(const t of e){if(!ne.includes(t.type))return`staptype "${t.type}" mag niet meelezen (alleen ${ne.join(", ")})`;if(t.type==="parallel")for(const n of t.branches??[]){const r=re(n);if(r)return r}if(t.type==="for-each"){const n=re(t.body??[]);if(n)return n}}return null}function ui(e,t){switch(e.kind){case"org":return!0;case"team":return!!t.teamId&&e.teamId===t.teamId;case"personal":return e.userId===t.userId}}function di(e,t){return e.filter(n=>n.enabled&&ui(n.ownerScope,t))}function pi(e){return e.credentialScope?e.credentialScope:(e.authMode??"header")==="header"||e.oauth?.scope==="org"?"shared":"per-user"}function fi(e){return`mcp__${e}__`}const mi=1e3,gi=2e3,hi=500,Ei=12e3,Ai=4e3,vt=["contact","company","work_item"];function Si(e){if(!e)return!1;const t=e.slice(0,e.indexOf(":"));return vt.includes(t)}const yi="onboarding-source",_i=["support","billing","availability","sales","onboarding"],Ti=["keep","replace"];function Dt(e){switch(e.kind){case"user":return`user:${e.userId}`;case"team":return`team:${e.teamId}`;case"org":return"org"}}function bi(e){if(typeof e!="string")return;const t=e.trim();if(t==="org")return{kind:"org"};const n=t.indexOf(":");if(n<=0)return;const r=t.slice(0,n),i=t.slice(n+1).trim();if(i){if(r==="user")return{kind:"user",userId:i};if(r==="team")return{kind:"team",teamId:i}}}function Lt(e){return Dt(e)}function xt(e){switch(e.kind){case"personal":return{kind:"user",userId:e.userId};case"team":return{kind:"team",teamId:e.teamId};case"org":return{kind:"org"}}}const Pt=xt;function Ii(e){return e.agentId?{kind:"user",userId:e.agentId}:Pt(e.ownerScope)}function Mi(e){return Lt(e)}function Oi(e,t){if(!t)return;let n=e;for(const r of t.split(".")){if(n===null||typeof n!="object")return;n=n[r]}return n}function Ri(e,t){return e.targets.find(n=>n.activityTypes.includes(t))}function Ci(e,t){if(t)return e.targets.find(n=>n.id===t)}function Ut(e){return e?.kind==="assignment"}function wi(e){const{trigger:t,agentId:n,target:r,activityType:i,assigneeUserId:o,authorUserId:a}=e;return Ut(t)?n?r?r.activityTypes.includes(i)?o?o!==n?"assigned to someone else":a&&a===n?"the agent assigned this to itself, which would restart its own run":null:`no assignee found at ${r.assigneePath}`:`activity type ${i} does not announce an assignment for ${r.id}`:`assignment target kind "${t.targetKind}" is not declared by any installed app`:"this playbook has no agent, so an assignment can never be for it":"trigger is not an assignment trigger"}function Ni(e){return(e.startsWith("tool:")?e.slice(5):e).replace(/__/g," · ").replace(/\./g," · ").replace(/_/g," ")}const ki=[{name:"text",type:"string"},{name:"subject",type:"string"},{name:"from",type:"string"},{name:"type",type:"string"},{name:"direction",type:"string"},{name:"channelId",type:"string"},{name:"interactionId",type:"string"},{name:"itemId",type:"string"},{name:"activityId",type:"string"},{name:"authorType",type:"string"},{name:"authorName",type:"string"},{name:"textRaw",type:"string"},{name:"fromStatus",type:"string"},{name:"toStatus",type:"string"},{name:"toCategory",type:"string"},{name:"contactId",type:"string"},{name:"companyId",type:"string"},{name:"assigneeUserId",type:"string"}],vi={topics:[{name:"topicId",type:"string"},{name:"topic",type:"string"},{name:"confidence",type:"number"},{name:"reasoning",type:"string"}],question:[{name:"answer",type:"boolean"},{name:"reasoning",type:"string"}],extract:[]};function $t(e){return`${e.type}:${e.id}`}const Kt="interaction";function Bt(e){return e?.type===Kt?e.id:void 0}const Ft=64,Gt=8e3;function Di(e){const t=typeof e=="number"?e:Number(String(e??"").trim());if(!(!Number.isFinite(t)||t<=0))return Math.min(Math.max(Math.round(t),Ft),Gt)}const Li={kind:"workflow",steps:[]};function xi(e){return e?.kind==="workflow"?e.steps:[]}function Pi(e){return e?.kind==="procedure"?e.procedure:void 0}function Ht(e){const t=e?.approved??0,n=t+(e?.rejected??0);return{total:n,rate:n?t/n:0}}const Wt=10,Vt=.9;function Ui(e){const{total:t,rate:n}=Ht(e);return t>=Wt&&n>=Vt}const jt=["done","escalated","failed","stopped"];function $i(e){return jt.includes(e)}function Yt(e){return e==="waiting"}function Ki(e){return e==="running"||Yt(e)}function pe(e){return e.subjectKind&&e.subjectId?{type:e.subjectKind,id:e.subjectId}:void 0}function Bi(e){const t=pe(e);return t?$t(t):void 0}function Fi(e){return Bt(pe(e))}function Gi(e,t){const n=e.accumulatedSeconds||0;return e.runningSince?n+Math.max(0,Math.floor((t-e.runningSince)/1e3)):n}function Hi(e,t){const n=Math.max(1,Math.ceil(Math.max(0,e)/60));if(!t||t==="exact")return n*60;const r=Number(t);return!Number.isFinite(r)||r<=0?n*60:Math.ceil(n/r)*r*60}function Wi(e){const t=Math.max(0,Math.round(e/60));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`}function Vi(e){const t=Math.max(0,Math.floor(e)),n=o=>String(o).padStart(2,"0"),r=Math.floor(t/60)%60,i=Math.floor(t/3600);return i>0?`${i}:${n(r)}:${n(t%60)}`:`${n(r)}:${n(t%60)}`}function Xt(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,48).replace(/^-+|-+$/g,"")}function ji(e,t){const n=Xt(e)||"werksoort",r=new Set(t);if(!r.has(n))return n;for(let i=2;i<500;i++){const o=`${n}-${i}`;if(!r.has(o))return o}return`${n}-${r.size+1}`}function Yi(e,t){const n=e.ownerScope;return!n||n.kind==="org"?!0:t.includes(n.teamId)}function Xi(e){return e.filter(t=>!t.archived).sort(zt)}function zt(e,t){const n=(e.order??0)-(t.order??0);return n!==0?n:(e.label||"").localeCompare(t.label||"")}const qt=20,Jt=20,D=300;function _(e){return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu," ").replace(/\s+/g," ").trim()}function Zt(e){const t=e.replace(/\s+/g," ").trim();if(t.length<=D)return t;const n=t.slice(0,D),r=Math.max(n.lastIndexOf(". "),n.lastIndexOf("! "),n.lastIndexOf("? "));return r>D*.6?n.slice(0,r+1):`${n.trimEnd()}…`}function zi(e,t){const n=Zt(t.text),r=_(n);if(!r||(e.examples??[]).some(a=>_(a)===r))return null;const i=e.exampleCandidates??[],o=i.findIndex(a=>_(a.text)===r);if(o>=0){if(i[o].corrected||!t.corrected)return null;const a=[...i];return a[o]={...a[o],corrected:!0,addedAt:t.addedAt},we(a)}return we([{...t,text:n},...i]).slice(0,Jt)}function we(e){return[...e].sort((t,n)=>Number(n.corrected)-Number(t.corrected)||n.addedAt-t.addedAt)}function qi(e,t){const n=_(t),r=(e.examples??[]).filter(o=>o.trim());return{examples:r.some(o=>_(o)===n)?r:[...r,t].slice(-qt),exampleCandidates:Qt(e,t)}}function Qt(e,t){const n=_(t);return(e.exampleCandidates??[]).filter(r=>_(r.text)!==n)}function en(e,t){const n=e.ownerScope;return n?n.kind==="org"?!0:n.kind==="team"?!!t&&n.teamId===t:!1:!1}function Ji(e,t){return e.filter(n=>en(n,t))}function Zi(e){return e.type==="agent"}const Qi="WORK_COMMENT_ADDED",eo="WORK_ITEM_ASSIGNED",to="WORK_ITEM_STATUS_CHANGED";function no(e,t){const n=r=>{const i=new Date(r);return i.setHours(0,0,0,0),i.getTime()};return Math.round((n(e)-n(t))/lt)}function ro(e,t){if(e.closedAt!=null)return{score:y,reasons:[]};const n=t.remindersById?.[e.id];if(n&&n.remindAt>t.now)return{score:y,reasons:[]};let r=0;const i=[],o=e.priority??"normal";if(I[o]>0&&(r+=I[o],i.push(`priority:${o}`)),typeof e.dueDate=="number"){const a=no(e.dueDate,t.now);a<0?(r+=35,i.push("overdue")):a===0&&(r+=20,i.push("due-today"))}return e.source?.initiator==="system"&&e.source.systemReason&&(r+=15,i.push(`auto:${e.source.systemReason}`)),{score:r,reasons:i}}const tn="work_item",nn="work_project";function rn(e){return`${tn}:${e}`}function fe(e){return`${nn}:${e}`}function io(e,t,n){const r=`${e}-${t}`;return n?`${r}-${n}`:r}function oo(e){const t=/^([A-Za-z0-9]{2,8})-(\d+)(?:-(\d+))?$/.exec((e||"").trim());return t?{projectKey:t[1].toUpperCase(),sequenceNumber:Number(t[2]),...t[3]?{subSequence:Number(t[3])}:{}}:null}function ao(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,3)||"PRJ"}function so(e,t=25){const n=new Set([rn(e.id)]);e.projectId&&n.add(fe(e.projectId));for(const r of e.ancestorKeys??[])n.add(r);for(const r of e.partyKeys??[])n.add(r);return Array.from(n).slice(0,t)}function co(e){return[fe(e.id)]}const B=[{key:"open",label:"status_open",category:"todo",order:0},{key:"in_progress",label:"status_in_progress",category:"in_progress",order:1},{key:"done",label:"status_done",category:"done",order:2},{key:"cancelled",label:"status_cancelled",category:"done",order:3}],me=B.map(e=>e.key);function on(e){return e?.statuses?.length?e.statuses:B}function an(e,t){return t.find(n=>n.key===e)?.category??"todo"}function lo(e,t){return t.find(n=>n.key===e)}function uo(e){const t=on(e),n=e?.defaultStatusKey;return n&&t.some(r=>r.key===n)?n:sn(t)[0]?.key??B[0].key}function sn(e){return[...e].sort((t,n)=>{const r=(t.order??0)-(n.order??0);return r!==0?r:(t.label||"").localeCompare(n.label||"")})}function po(e,t){return an(e,t)==="done"}function cn(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,48).replace(/^-+|-+$/g,"")}function fo(e,t){const n=cn(e)||"status",r=new Set([...t,...me]);if(!r.has(n))return n;for(let i=2;i<500;i++){const o=`${n}-${i}`;if(!r.has(o))return o}return`${n}-${r.size+1}`}function mo(e){const t=[];if(!e.length)return[{index:-1,reason:"empty"}];const n=new Set;return e.forEach((r,i)=>{if(!r.key){t.push({index:i,reason:"missing_key"});return}me.includes(r.key)&&t.push({index:i,reason:"reserved_key",key:r.key}),n.has(r.key)&&t.push({index:i,reason:"duplicate_key",key:r.key}),n.add(r.key)}),e.some(r=>r.category==="todo"||r.category==="in_progress")||t.push({index:-1,reason:"no_open"}),e.some(r=>r.category==="done")||t.push({index:-1,reason:"no_done"}),t}const go=new Set(["image/png","image/jpeg","image/jpg","image/gif","image/webp"]),ho=new Set(["text/plain","text/markdown","text/csv","application/json","text/html","application/xml","text/xml"]);function ln(e){const t=(e??"").trim().toLowerCase().split(";")[0];return t?go.has(t)?"image":t==="application/pdf"?"pdf":ho.has(t)?"text":t.startsWith("audio/")?"audio":"unsupported":"unsupported"}const T=1024*1024,un={image:5*T,pdf:20*T,text:1*T,audio:20*T},Eo=25*T,Ao=5;function So(e,t){const n=ln(e);return n==="unsupported"?"unsupported":t>un[n]?"too-large":null}function yo(e){return e.access!=="read"&&e.effect!=="internal"}function dn(e){return`${e.kind}:${e.id||e.url||e.title}`}function _o(e,t=[]){const n=new Set(t),r=[],i=[];for(const o of e){const a=dn(o);n.has(a)||(n.add(a),r.push(o),i.push(a))}return{sources:r,keys:i}}const To="assist-source",bo=["blocking","due","open"];function Io(e,t){const[n,r]=(e.subjectKey??"").split(":");return n===t&&r?r:void 0}const Ne={blocking:0,due:1,open:2};function Mo(e,t){return Ne[e.band??"open"]-Ne[t.band??"open"]||(t.priority??0)-(e.priority??0)||e.id.localeCompare(t.id)}function Oo(e){return e.sessions.filter(t=>t.id!==e.exceptSessionId&&t.state==="connected"&&e.canHold(t.providerId))}function Ro(e){return e.sessions.filter(t=>t.id!==e.exceptSessionId&&t.state==="connected"&&!e.canHold(t.providerId))}function Co(e){return e.sessions.some(n=>n.id!==e.exceptSessionId&&(n.state==="connected"||n.state==="on_hold"))?{admit:!1,reason:"busy"}:{admit:!0}}function pn(e,t){const n=new Set(e.disabledIntents??[]),r=e.intentOverrides??{},i=t.intents.filter(a=>!n.has(a.intent)).map(a=>No(a,r[a.intent]));if(!e.extraIntents||e.extraIntents.length===0)return i;const o=new Set(i.map(a=>a.intent));for(const a of e.extraIntents)o.has(a.intent)||(i.push(a),o.add(a.intent));return i}function fn(e,t){const n={};for(const r of e.intents){if(!r.togglable)continue;const i=t?.[r.intent];n[r.intent]=i??r.defaultEnabled??!0}return n}function wo(e,t){const n=fn(e,t);return Object.entries(n).filter(([,r])=>!r).map(([r])=>r)}function No(e,t){return t?{intent:t.intent??e.intent,targetSchemes:t.targetSchemes??e.targetSchemes,transport:t.transport??e.transport}:e}function ko(e,t){const n=[];for(const r of e){if(!r.enabled)continue;const i=t[r.providerId];if(i)for(const o of pn(r,i))n.push({channel:r,description:i,capability:o})}return n}function vo(e,t){return t.filter(n=>n.capability.intent===e)}function mn(e,t){return t.filter(n=>n.capability.targetSchemes.includes(e))}function Do(e,t){return mn(e.scheme,t)}function Lo(e,t,n){const r=[];for(const i of e)for(const o of n)o.capability.intent===t&&o.capability.targetSchemes.includes(i.scheme)&&r.push({channelIntent:o,endpoint:i});return r}var gn=(e=>(e.MAILTO="mailto",e.SIP="sip",e.TEL="tel",e.WEBHOOK="webhook",e.USERNAME="username",e.ID="id",e.CUSTOM="custom",e.URL="url",e.TELEGRAM="telegram",e.WHATSAPP="whatsapp",e.MESSENGER="messenger",e.INSTAGRAM="instagram",e.VIBER="viber",e.SMS="sms",e.FAX="fax",e.TEAMS="teams",e.CALENDAR="calendar",e))(gn||{});const xo={mailto:"mail",sip:"tel",tel:"tel",fax:"tel",sms:"chat",teams:"chat",telegram:"chat",messenger:"chat",instagram:"chat",viber:"chat",whatsapp:"wa",webhook:"note",url:"note",calendar:"note",username:"note",id:"note",custom:"note"};function Po(e){return e?xo[e]??"note":"note"}const Uo="message_window",$o="message_templates",Ko={FROM:"from",TO:"to",CC:"cc",BCC:"bcc",ORGANIZER:"organizer",PRESENTER:"presenter",ATTENDEE:"attendee",OWNER:"owner",MEMBER:"member",GUEST:"guest",HOST:"host",PARTICIPANT:"participant"},Bo=(e,t)=>({intent:e,...t}),Fo="folder_management",Go="remote_search",Ho={ok:!1,code:"UNSUPPORTED",message:"Provider does not support this op"},Wo="context.collect",u=e=>({type:"string",description:e}),l=e=>({type:"number",description:e}),L=e=>({type:"boolean",description:e}),E=u("Sheet name. Omit for the sheet the user is looking at."),ke=u("Slide id, as `inspect` reports it.");function c(e,t,n,r,i,o){return{op:e,kinds:t,summary:n,parameters:{type:"object",properties:r,required:i},undoable:o.undoable,visible:o.visible}}const b={undoable:!1,visible:!0},p={undoable:!0,visible:!0},ve={undoable:!1,visible:!0},$={undoable:!1,visible:!1},Vo=[c("pdf.goToPage",["pdf"],"Scroll the viewer to a page.",{page:l("1-based page number.")},["page"],b),c("pdf.search",["pdf"],"Search the document and highlight the matches, as the find bar does.",{query:u("Text to find."),next:L("Jump to the next match instead of the first.")},["query"],b),c("pdf.setTool",["pdf"],"Select a markup tool for the user, so their next click draws it.",{tool:{type:"string",enum:["highlight","text","draw","image","signature","none"],description:"Which tool to arm. `none` puts the tool row back to reading."}},["tool"],b),c("pdf.fillField",["pdf"],"Fill one form field of a fillable PDF.",{field:u("Field name, exactly as `inspect` reports it under `fields`."),value:{type:["string","boolean"],description:"Text for a text field, true/false for a checkbox or radio."}},["field","value"],p),c("pdf.reorderPages",["pdf"],"Put the pages in a different order. Pages left out are deleted.",{order:{type:"array",items:{type:"number"},description:"1-based source page numbers, in the order they should end up in."}},["order"],ve),c("pdf.deletePages",["pdf"],"Remove pages, keeping the rest in order.",{pages:{type:"array",items:{type:"number"},description:"1-based page numbers."}},["pages"],ve),c("pdf.addNote",["pdf"],"Place a text note on a page. Written on save; not visible before that.",{page:l("1-based page number."),text:u("The note's text."),left:l("Distance from the left edge, in PDF points (72 per inch)."),top:l("Distance from the top edge, in PDF points."),width:l("Box width in points. Omit for a sensible default."),height:l("Box height in points. Omit for a sensible default."),fontSize:l("Font size in points. Omit for 12.")},["page","text","left","top"],$),c("pdf.highlightText",["pdf"],"Highlight a phrase on a page. Written on save; not visible before that.",{page:l("1-based page number."),text:u("The exact phrase to highlight, as it appears in the page's text."),occurrence:l("Which occurrence on that page, 1-based. Omit for the first.")},["page","text"],$)],jo=[c("sheet.setValues",["sheet"],"Write a block of values. The block's shape must match the range.",{sheet:E,range:u("A1 notation, e.g. `B2:D5` or a single `A1`."),values:{type:"array",items:{type:"array",items:{type:["string","number","boolean","null"]}},description:"Rows of cells, top-left first. `null` clears a cell."}},["range","values"],p),c("sheet.setFormula",["sheet"],"Put a formula in every cell of a range.",{sheet:E,range:u("A1 notation."),formula:u("Including the leading `=`.")},["range","formula"],p),c("sheet.setStyle",["sheet"],"Change the look of a range. Only the properties you pass are touched.",{sheet:E,range:u("A1 notation."),bold:L("Bold on or off."),italic:L("Italic on or off."),fontSize:l("Point size."),fontColor:u("CSS colour, e.g. `#b91c1c`."),background:u("CSS colour for the cell fill."),horizontalAlignment:{type:"string",enum:["left","center","right"],description:"Horizontal alignment."},numberFormat:u("Number format pattern, e.g. `#,##0.00` or `0%`.")},["range"],p),c("sheet.insertRows",["sheet"],"Insert empty rows, pushing the rest down.",{sheet:E,at:l("1-based row number to insert before."),count:l("How many. Omit for 1.")},["at"],p),c("sheet.deleteRows",["sheet"],"Delete rows, pulling the rest up.",{sheet:E,at:l("1-based first row to delete."),count:l("How many. Omit for 1.")},["at"],p),c("sheet.insertColumns",["sheet"],"Insert empty columns, pushing the rest right.",{sheet:E,at:l("1-based column number to insert before."),count:l("How many. Omit for 1.")},["at"],p),c("sheet.deleteColumns",["sheet"],"Delete columns, pulling the rest left.",{sheet:E,at:l("1-based first column to delete."),count:l("How many. Omit for 1.")},["at"],p),c("sheet.merge",["sheet"],"Merge a range into one cell.",{sheet:E,range:u("A1 notation.")},["range"],p),c("sheet.unmerge",["sheet"],"Break merged cells in a range apart.",{sheet:E,range:u("A1 notation.")},["range"],p),c("sheet.sort",["sheet"],"Sort a range on one of its columns.",{sheet:E,range:u("A1 notation covering the rows to sort, header excluded."),column:l("1-based column *within the range*, not within the sheet."),ascending:L("Ascending. Omit for ascending.")},["range","column"],p),c("sheet.insertSheet",["sheet"],"Add a new sheet.",{name:u("Name for the new sheet.")},["name"],p),c("sheet.renameSheet",["sheet"],"Rename a sheet.",{sheet:u("Current name."),name:u("New name.")},["sheet","name"],p),c("sheet.deleteSheet",["sheet"],"Remove a sheet and everything on it.",{sheet:u("Name of the sheet to delete.")},["sheet"],p),c("sheet.activate",["sheet"],"Show the user a sheet and select a range on it.",{sheet:E,range:u("A1 notation to select. Omit to only switch sheets.")},[],b)],Yo=[c("word.appendText",["word"],"Add text at the end of the document.",{text:u("The text to append.")},["text"],p),c("word.insertText",["word"],"Insert text at a character offset.",{index:l("Character offset, as `inspect` reports offsets."),text:u("The text to insert.")},["index","text"],p),c("word.insertParagraph",["word"],"Start a new paragraph at a character offset.",{index:l("Character offset. Omit for the end of the document.")},[],p),c("word.setSelection",["word"],"Put the user's cursor on a stretch of text.",{start:l("Start character offset."),end:l("End character offset. Omit for a caret.")},["start"],b)],Xo=[c("slides.setText",["slides"],"Replace the text of one shape. Written on save; not visible before that, and not undoable.",{slide:ke,element:u("Element id, as `inspect` reports it."),text:u("The new text.")},["slide","element","text"],$),c("slides.setTransform",["slides"],"Move or resize one shape. Only the values you pass change. Written on save; not visible before that, and not undoable.",{slide:ke,element:u("Element id."),left:l("Distance from the left edge, in pixels."),top:l("Distance from the top edge, in pixels."),width:l("Width in pixels."),height:l("Height in pixels.")},["slide","element"],$)],ge=[...Vo,...jo,...Yo,...Xo];function zo(e){return ge.filter(t=>t.kinds.includes(e))}function qo(e){return ge.find(t=>t.op===e)}const Jo="documents.describe",Zo="documents.inspect",Qo="documents.apply";function ea(e){const t=e.indexOf(":");if(t!==-1)return e.slice(0,t);const n=e.indexOf(".");return n===-1?e:e.slice(0,n)}const ta="installation-id";function na(e){const t=[];for(const n of Object.keys(e))for(const r of Object.keys(e[n]))t.push({lang:n,key:r,value:e[n][r]});return t}const ra="notification-source",ia=(e,t)=>`${e}.pref.${t}`,oa={ai:["account.read","account.write","agent.read","agent.write","assignment.read","assignment.write","budget.read","budget.write","connector.read","connector.write","context.read","context.write","conversation.read","conversation.write","lens.read","lens.write","message.read","message.write","playbook.read","playbook.write","profile.read","profile.write","run.read","run.write","settings.read","settings.write","tool.read","transcript.write","usage.read"],analytics:["report.read"],"app-store":["app.publish","app.read","app.write","setting.read","setting.write"],assist:["board.read"],automations:["sync.read","sync.write","webhook.read","webhook.write"],communication:["account.read","account.write","activity-type.read","activity.read","activity.write","attachment.read","attribute.read","attribute.write","calendar.read","calendar.write","channel.read","channel.write","custom-field.read","custom-field.write","folder.read","folder.write","inbox.read","inbox.write","interaction.read","interaction.write","reminder.read","template.read","template.write","topic.read","topic.write"],context:["kind.read","kind.write","memory.read","memory.write"],crm:["company.read","company.write","contact.read","contact.write"],"eylo-voip":["account.read","account.write","callflow.read","callflow.write","channel.read","channel.write","contact.read","contact.write","device.read","device.write","group.read","group.write","interaction.read","interaction.write","media.read","media.write","menu.read","menu.write","phone-number.read","phone-number.write","recording.read","recording.write","sip.read","temporal-rule.read","temporal-rule.write","user.read","user.write","vmbox.read","vmbox.write","webhook.read","webhook.write"],google:["account.read","account.write","contact.read"],kb:["article.read","article.write","category.read","category.write","help-center.read","help-center.write","kb.read","kb.write"],mail:["account.write"],meta:["account.read","account.write"],microsoft:["account.read","account.write","contact.read","sync.write"],organization:["billing.read","billing.write","settings.read","settings.write","team.read","team.write"],shopify:["account.read","account.write","order.read"],slack:["thread.read","thread.write"],storage:["artifact.read","artifact.write","file.read","file.write","mount.read","mount.write"],time:["entry.read","entry.write","work-type.read","work-type.write"],user:["user.read","user.write"],work:["item.read","item.write","project.read","project.write"]},he=9e4,hn=["out_of_office"],En=e=>hn.includes(e);function aa(e,t,n){const r=n-e<he,i=t?.status&&(!t.expiresAt||t.expiresAt>n)?t:void 0;if(!i?.status)return{online:r,status:r?"available":"offline"};const o=i.status;return!r&&!En(o)?{online:!1,status:"offline"}:{online:r,status:o,message:i.message}}function sa(e,t){const n=t-e.lastSeenAt<he,r=n||En(e.status)?e.status:"offline";return n===e.online&&r===e.status?e:{...e,online:n,status:r}}function ca(e,t){return e?.teamId&&t.includes(e.teamId)?{teamId:e.teamId,mustChoose:!1}:t.length===1?{teamId:t[0],mustChoose:!1}:{teamId:void 0,mustChoose:t.length>1}}function la(e){return e.providerAvailable&&e.allowed}const ua="resources.describe",da="resources.search",pa="resources.resolve",fa="resources.attached";function ma(e){const t=e.indexOf(":");return t===-1?e:e.slice(0,t)}const ga="/provider/scope/related",ha="/provider/scope/read",Ee="auth";function Ae(e){const t=typeof e=="string"?e.match(/apps\/([^/?#]+)/):null;return t?t[1]:null}function Ea(e){const t=Ae(e);return t?t!==Ee:typeof e=="string"&&e.startsWith("/wake")}function Aa(e){return typeof e!="string"||e===""||e==="/"?!0:Ae(e)===Ee}function Sa(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function An(e){const n=e.split("/").filter(Boolean).map(r=>r.startsWith(":")?r.endsWith("?")?"(?:/[^/]+)?":"/[^/]+":`/${Sa(r)}`).join("");return new RegExp(`^${n}\\/?$`)}function Sn(e,t){const n=e.split("/").filter(Boolean),r=t.split("/").filter(Boolean),i={};return n.forEach((o,a)=>{if(o.startsWith(":")){const s=o.endsWith("?")?o.slice(1,-1):o.slice(1),d=r[a];d&&(i[s]=d)}}),i}function yn(e){return e.publicBasePath??`/apps/${e.name}`}function ya(e){const t=[];for(const n of e){if(!n?.name)continue;const r=yn(n);for(const i of n.routes??[]){if(!i.public)continue;const o=i.path==="/"?"":i.path;t.push({appName:n.name,resource:i.resource,pattern:`${r}${o}`,props:i.props})}}return t}function _n(e,t){const n=e.split("/").filter(Boolean),r=t.split("/").filter(Boolean);for(let i=0;i<Math.min(n.length,r.length);i++){const o=n[i].startsWith(":"),a=r[i].startsWith(":");if(o!==a)return a}return n.length>r.length}function Tn(e,t){if(typeof e!="string")return null;let n=null;for(const r of t)An(r.pattern).test(e)&&(!n||_n(r.pattern,n.pattern))&&(n=r);return n?{...n,params:{...n.props,...Sn(n.pattern,e)}}:null}function _a(e,t){return Tn(e,t)!==null}const Ta=10*1024*1024,ba=25*1024*1024,Ia="sync-source",Ma="sync-target",Oa=20,Ra={afrikaans:["[Muziek]","(C) TV GELDERLAND 2021","*Thomp thomp thomp*","www.youtube.com","ä n wood s","!.."],english:["[applause]","[APPLAUSE]","(claps)","(clapping)","(audience applauds)","(keyboard clicking)","(keyboard clacking)","(clicking)","[CLICK]","[BLANK_AUDIO]","(upbeat music)","(dramatic music)","[music playing]","(electronic music)","(audience cheering)","(audience cheers)","[MUSIC]","( ( ( ( ) ( ) ( ) ( )","(laughs)","(air whooshing)","<u>Transcribed</u> by https://otter.ai","All new tonight at 6... coming up. A new look at your forecast is A new look at your forecast is","www.mooji.org","KATHRYN A new forecast is coming up... A new forecast is coming up...","KATHRYN pandemic started. increasing since the The pandemic has been","A new look at your forecast this morning... A new look at your","We'll be right back.","We'll see you next week.","Thanks for watching!","❤️ Translated by Amara.org Communit"],flemish:["*clap*","TV GELDERLAND 2020","TV Gelderland 2021","(C) TV GELDERLAND 2021","[Muziek]","Kuman","Ondertitels ingediend door de Amara.org gemeenschap","Ondertiteld door de Amara.org gemeenschap","Dank u wel voor het kijken.","Ondertiteling door de Amara.org gemeenschap","GELUID VAN MAHIH U similarly"],french:["(applaudissements)","[Applaudissements]","Sous-titres réalisés par la communauté d'Amara.org","- Bonne journée. - Bonjour.","POP POP הי","Merci d'avoir regardé cette vidéo.","Merci d'avoir regardé cette vidéo!","Merci d'avoir regardé la vidéo.","J'espère que vous avez apprécié la vidéo.","Je vous remercie de vous abonner","Merci d'avoir regardé!","❤️ par SousTitreur.com","— Sous-titrage ST'501 —","Thanks for watching!","Sous-titres réalisés par l'Amara.org","Sous-titres réalisés para la communauté d'Amara.org","Sous-titres réalisés par la communauté d'Amara.org","Sous-titres fait par Sous-titres par Amara.org","Sous-titres réalisés par les SousTitres d'Amara.org","Sous-titres par Amara.org","Sous-titres par la communauté d'Amara.org","Sous-titres réalisés pour la communauté d'Amara.org","Sous-titres réalisés par la communauté de l'Amara.org","Sous-Titres faits par la communauté d'Amara.org","Sous-titres par l'Amara.org","Sous-titres fait par la communauté d'Amara.org","Sous-titrage ST' 501","Sous-titrage ST'501","Cliquez-vous sur les sous-titres et abonnez-vous à la chaîne d'Amara.org","❤️ par SousTitreur.com"],german:["[Klicken]","(Jubel)","*lacht*","[Anhaltender Beifall]","[Applaus]","(Applaus)","* Applaus *","[MUSIK]","* mustard ml Drumglöck und knack in einem Handbewerb *","Untertitelung aufgrund der Amara.org-Community","Untertitel im Auftrag des ZDF für funk, 2017","Untertitel von Stephanie Geiges","Untertitel der Amara.org-Community","Untertitel im Auftrag des ZDF, 2017","Untertitel im Auftrag des ZDF, 2020","Untertitel im Auftrag des ZDF, 2018","Untertitel im Auftrag des ZDF, 2021","Untertitelung im Auftrag des ZDF, 2021","Copyright WDR 2021","Copyright WDR 2020","Copyright WDR 2019","SWR 2021","SWR 2020"],italian:["Alla prossima!","*applauso*","[Musica]","[Musica]","[Applausi]","*Bip bip bip bip*","(musica del NS shore)","D' 1962 alle tribunte del Gulf","Sottotitoli creati dalla comunità Amara.org","Sottotitoli di Sottotitoli di Amara.org","Sottotitoli e revisione al canale di Amara.org","Sottotitoli e revisione a cura di Amara.org","Sottotitoli e revisione a cura di QTSS","Sottotitoli e revisione a cura di QTSS.","Sottotitoli a cura di QTSS","Sottotitoli a cura di Sottotitoli"],spanish:["[música]","[Música de cierre]","[Aplausos]","(Aplausos)","www.alimmenta.com","¡Gracias por ver el vídeo!","(sonidos del celular) (Inudible distorsión)","¡Suscríbete!","Subtítulos realizados por la comunidad de Amara.org","Subtitulado por la comunidad de Amara.org","Subtítulos por la comunidad de Amara.org","Subtítulos creados por la comunidad de Amara.org","Subtítulos en español de Amara.org","Subtítulos hechos por la comunidad de Amara.org","Subtitulos por la comunidad de Amara.org","Más información www.alimmenta.com","www.mooji.org","[MÚSICA]","[Music cuts in British]"]},bn=e=>{let t=e;return Object.values(Ra).forEach(n=>{n.forEach(r=>{t=t.replaceAll(r,"")})}),t=t.replace(/\(.*?\)/g,""),t=t.replace(/\[.*?\]/g,""),t},In=6e4,Mn=8e3,On=2,Rn=.4,Ca=3,wa=new Set(["aan","als","ben","bent","bij","dan","dat","deze","die","dit","doen","door","dus","echt","een","eens","even","gaan","gaat","geen","geweest","goed","graag","had","heb","hebben","hebt","heeft","het","hier","hoe","hoor","iets","inderdaad","kan","klopt","kunnen","kunt","maar","mag","mee","meer","met","mij","mijn","misschien","moet","moeten","naar","net","niet","nog","nou","oke","ook","over","prima","toch","uhm","uit","van","veel","voor","wat","weer","weet","wel","wij","wil","wilt","worden","wordt","zeg","zeggen","zijn","zou","zult","about","and","are","been","but","can","does","for","have","just","know","like","not","okay","right","she","that","the","them","then","there","they","this","want","was","well","were","what","will","with","would","yeah","you","your"]);function Cn(e){const t=new Set;for(const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))n.length<Ca||wa.has(n)||t.add(n);return[...t]}function wn(e,t){if(!e.length)return 0;if(!t.length)return 1;const n=new Set(t),r=new Set(e);let i=0;for(const o of r)n.has(o)||(i+=1);return i/r.size}function Nn(e,t=In){const n=e.filter(a=>!a.partial&&typeof a.text=="string");if(!n.length)return{text:"",segmentCount:0};const i=n.reduce((a,s)=>Math.max(a,s.endedAt??0),0)-t;return{text:n.filter(a=>(a.endedAt??0)>=i).map(a=>bn(a.text).trim()).filter(Boolean).join(" ").replace(/\s+/g," ").trim(),segmentCount:n.length}}const kn=60;function Na(e,t,n=kn){const r=new Set(e),i=[...e];for(const o of t)!o||r.has(o)||(r.add(o),i.push(o));return i.slice(-n)}function ka(e){const{segments:t,now:n,state:r}=e;if(r.lastTriggerAt&&n-r.lastTriggerAt<Mn)return{trigger:!1,reason:"too_soon"};const i=Nn(t,e.windowMs);if(!i.text)return{trigger:!1,reason:"no_speech"};const o=i.segmentCount-(r.lastSegmentCount??0);if(r.lastQueryTerms&&o<On)return{trigger:!1,reason:"too_few_new"};const a=Cn(i.text);return a.length?r.lastQueryTerms?.length&&wn(a,r.lastQueryTerms)<Rn?{trigger:!1,reason:"same_topic"}:{trigger:!0,text:i.text,terms:a,segmentCount:i.segmentCount}:{trigger:!1,reason:"no_speech"}}const va=["personal","workspace","connections","work","ai"],Da="navNotice",F={NL:{callingCode:"31",trunkPrefix:"0",nsnMin:7,nsnMax:9},BE:{callingCode:"32",trunkPrefix:"0",nsnMin:8,nsnMax:9},LU:{callingCode:"352",nsnMin:6,nsnMax:9},DE:{callingCode:"49",trunkPrefix:"0",nsnMin:6,nsnMax:13},FR:{callingCode:"33",trunkPrefix:"0",nsnMin:9,nsnMax:9},GB:{callingCode:"44",trunkPrefix:"0",nsnMin:9,nsnMax:10},IE:{callingCode:"353",trunkPrefix:"0",nsnMin:7,nsnMax:9},ES:{callingCode:"34",nsnMin:9,nsnMax:9},PT:{callingCode:"351",nsnMin:9,nsnMax:9},IT:{callingCode:"39",nsnMin:6,nsnMax:11},AT:{callingCode:"43",trunkPrefix:"0",nsnMin:7,nsnMax:13},CH:{callingCode:"41",trunkPrefix:"0",nsnMin:9,nsnMax:9},DK:{callingCode:"45",nsnMin:8,nsnMax:8},SE:{callingCode:"46",trunkPrefix:"0",nsnMin:7,nsnMax:13},NO:{callingCode:"47",nsnMin:8,nsnMax:8},FI:{callingCode:"358",trunkPrefix:"0",nsnMin:5,nsnMax:12},PL:{callingCode:"48",nsnMin:9,nsnMax:9},US:{callingCode:"1",nsnMin:10,nsnMax:10},CA:{callingCode:"1",nsnMin:10,nsnMax:10}},vn="NL",La=15,xa=8,Pa=Array.from(new Set(Object.values(F).map(e=>e.callingCode))).sort((e,t)=>t.length-e.length);function De(e){if(e)return F[e.trim().toUpperCase()]}function x(e,t){return e.length>=t.nsnMin&&e.length<=t.nsnMax}function Le(e){if(e.length>La)return null;for(const t of Pa){if(!e.startsWith(t))continue;const n=e.slice(t.length);for(const r of Object.values(F)){if(r.callingCode!==t)continue;const i=r.trunkPrefix,o=i&&n.startsWith(i)?n.slice(i.length):n;if(x(o,r))return`+${t}${o}`}return null}return e.length<xa?null:`+${e}`}function Ua(e){let t=e.trim();const n=t.match(/^(sips?|tel|whatsapp):/i);n&&(t=t.slice(n[0].length));const r=t.indexOf("@");return r>=0&&(t=t.slice(0,r)),t.trim()}function $a(e){if(!e)return!1;const t=e.indexOf("@");if(t<=0)return!1;const n=e.slice(0,t).trim();return!/^[+\d\s().-]+$/.test(n)}function ie(e,t){if(!e)return null;const n=Ua(e);if(!n)return null;const r=n.startsWith("+"),i=n.replace(/\D/g,"");if(!i)return null;if(r)return Le(i);if(i.startsWith("00"))return Le(i.slice(2));const o=De(t)??De(vn);if(!o)return null;const a=o.trunkPrefix;if(a&&i.startsWith(a)){const s=i.slice(a.length);return x(s,o)?`+${o.callingCode}${s}`:null}if(i.startsWith(o.callingCode)){const s=i.slice(o.callingCode.length);if(x(s,o))return`+${o.callingCode}${s}`}return!a&&x(i,o)?`+${o.callingCode}${i}`:null}function Ka(e,t=9){const n=(e??"").replace(/\D/g,"");return n.length<t?null:n.slice(-t)}function Se(e){if(!e)return null;const t=e.trim().toLowerCase(),n=t.lastIndexOf("@");if(n<=0||n===t.length-1)return null;const r=t.slice(0,n).split("+")[0],i=t.slice(n+1);return!r||!i.includes(".")?null:`${r}@${i}`}function Ba(e){const t=Se(e);return t?t.slice(t.lastIndexOf("@")+1):null}const Fa=new Set(["co.uk","org.uk","gov.uk","ac.uk","com.au","co.nz","com.br","co.za"]);function Dn(e){if(!e)return null;const t=e.trim().toLowerCase().replace(/\.$/,"").split(".").filter(Boolean);if(t.length<2)return null;const n=t.slice(-2).join(".");return Fa.has(n)&&t.length>=3?t.slice(-3).join("."):n}const Ln=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","hotmail.nl","hotmail.be","hotmail.co.uk","live.com","live.nl","live.be","msn.com","yahoo.com","yahoo.co.uk","ymail.com","icloud.com","me.com","mac.com","aol.com","gmx.net","gmx.de","web.de","protonmail.com","proton.me","pm.me","tutanota.com","zoho.com","mail.com","ziggo.nl","kpnmail.nl","planet.nl","home.nl","casema.nl","chello.nl","xs4all.nl","telfort.nl","hetnet.nl","zonnet.nl","upcmail.nl","quicknet.nl","telenet.be","skynet.be","proximus.be","scarlet.be"]);function Ga(e){const t=Dn(e);return t?Ln.has(t):!1}function Ha(e){if(!e)return!1;const t=e.trim().toLowerCase();return t==="tel"||t==="sms"||t==="whatsapp"||t==="fax"}function Wa(e,t,n){if(!e||!t)return null;const r=e.trim().toLowerCase();if(r==="tel"||r==="sms"||r==="whatsapp"){const o=ie(t,n);return o?`tel:${o}`:null}if(r==="fax"){const o=ie(t,n);return o?`fax:${o}`:null}if(r==="mailto"||r==="email"){const o=Se(t);return o?`mailto:${o}`:null}const i=t.trim().toLowerCase();return i?`${r}:${i}`:null}const Va=[/<blockquote/i,/class="?gmail_quote/i,/id="?[^"]*divRplyFwdMsg/i,/id="?[^"]*mail-editor-reference-message-container/i,/-{3,}\s*Original Message\s*-{3,}/i,/\n_{5,}\s*\n/,/\bOn\b[\s\S]{0,200}?\bwrote:/i],xe=/^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i,ja=/^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;function Ya(e){const t=e.split(`
10
- `);for(let n=0;n<t.length;n++)if(ja.test(t[n])||xe.test(t[n])&&t.slice(n+1,n+4).some(r=>xe.test(r)))return t.slice(0,n).join(`
11
- `).trim();return e}const Xa=/^(?:https?:|mailto:|tel:)/i,za=/^(?:https?:|cid:|data:image\/)/i;function j(e,t){const n=e.match(new RegExp(`\\b${t}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s">]+))`,"i"));return(n?.[1]??n?.[2]??n?.[3]??"").trim()}const qa=/(!\[[^\]]*\]\([^)]*\))/;function Pe(e){return e.replace(/\s+/g," ").trim().split(qa).map((t,n)=>n%2===1?t:t.replace(/[[\]]/g,"\\$&")).join("")}function Y(e){return e.replace(/[()\s<>"]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)}function Ja(e){return e.replace(/<img\b([^>]*?)\/?>/gi,(n,r)=>{const i=j(r,"src");return za.test(i)?`![${Pe(j(r,"alt"))}](${Y(i)})`:""}).replace(/<a\b([^>]*)>([\s\S]*?)<\/a\s*>/gi,(n,r,i)=>{const o=Pe(i.replace(/<[^>]*>/g,"")),a=j(r,"href");return Xa.test(a)?`[${o||Y(a)}](${Y(a)})`:o})}const Za=/<table\b[^>]*>((?:(?!<table\b)[\s\S])*?)<\/table\s*>/i,Qa=/<tr\b[^>]*>([\s\S]*?)<\/tr\s*>/gi,es=/<(t[dh])\b([^>]*)>([\s\S]*?)<\/\1\s*>/gi;function ts(e,t){return/<table\b/i.test(e)||e.includes(`
9
+ `:t==="mail"?"<br><br>-- <br>":"<br><br>"}${i.body}`:n}function Vr(e){return e.endpoints??[]}const lt=36e5,ut=864e5,y=-1/0,jr=e=>e.score>y,I={urgent:40,high:25,normal:10,low:0};function Yr(e){return Object.fromEntries(e.map(t=>[t.resourceId,t]))}const Xr=/(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i,dt=/\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;function pt(e,t){return!!(e&&Xr.test(e)||t&&dt.test(t))}const ft=3,mt=600;function zr(e,t){return e>=ft||t>=mt}const gt=["list-unsubscribe","list-unsubscribe-post","list-id","precedence","auto-submitted","x-auto-response-suppress","feedback-id","x-mailer"];function qr(e){const t={};for(const n of e){const r=n.name?.toLowerCase();r&&n.value!==void 0&&gt.includes(r)&&(t[r]=n.value)}return t}const Jr=/(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|notifications?|bounce|postmaster|mailer)@/i,Zr=/(^|[._+-])(newsletter|nieuwsbrief|marketing|mailing)@/i;function Qr(e){const t=e.headers??{},n=e.from?.email,r=t["auto-submitted"]?.toLowerCase();if(r&&r!=="no"||t["x-auto-response-suppress"]||n&&Jr.test(n))return"automated";const i=t.precedence?.toLowerCase();if(t["list-unsubscribe"]||t["list-unsubscribe-post"]||t["list-id"]||i==="bulk"||i==="list"||e.body&&dt.test(e.body)||n&&Zr.test(n))return"marketing"}function ht(e,t){return e.lastActivityAt?!(e.seenBy??[]).includes(t):!1}const Et=["open"],At=1e3,St={urgent:1,high:4,normal:8,low:24},yt=72;function _t(e){return e.lastActivityAt??(e.createdAt?new Date(Xe(e)).getTime():0)}function Tt(e,t){return bt(t.remindersById?.[e.id],e,t.now)}function bt(e,t,n){return!e||e.remindAt<=n?!1:!((t.lastActivityAt??0)>e.parkedAt&&t.lastActivityPreview?.direction==="inbound")}const It=e=>We(e)==="outbound_message",Ot=e=>Et.includes(e);function K(e,t){return Math.max(0,(t-_t(e))/lt)}function Mt(e,t){const n=e.assignedInboxId?t?.[e.assignedInboxId]:void 0;return typeof n=="number"&&n>0?n:St[e.priority??"normal"]}function ei(e){const t={};for(const n of e)typeof n.slaHours=="number"&&n.slaHours>0&&(t[n.id]=n.slaHours);return t}function ti(e,t,n){return!Ot(e.status)||e.firstResponseAt?!1:K(e,t)>Mt(e,n)}function wt(e,t){const n=e.lastActivityPreview;return n?.direction!=="outbound"||!It(n.type)?!1:K(e,t)<yt}function ni(e,t){if(!Ot(e.status))return{score:y,reasons:[]};if(e.snoozedTill&&e.snoozedTill>t.now)return{score:y,reasons:[]};if(wt(e,t.now))return{score:y,reasons:[]};if(Tt(e,t))return{score:y,reasons:[]};let n=0;const r=[],i=e.priority??"normal";I[i]>0&&(n+=I[i],r.push(`priority:${i}`)),ht(e,t.userId)&&(n+=20,r.push("unseen")),e.assignedUserId&&e.assignedUserId===t.userId&&(n+=15,r.push("assigned-to-you"));const o=K(e,t.now);if(o>0){const d=Math.min(o*2,30);n+=d,o>=1&&r.push(`waiting:${Math.round(o)}h`)}const a=e.lastActivityPreview;return a?.type==="AI_ACTION_PROPOSED"&&(n+=30,r.push("awaiting-approval")),a?.direction==="outbound"&&It(a.type)&&(n+=10,r.push("no-reply")),!e.firstResponseAt&&e.lastActivityPreview?.direction==="inbound"&&(n+=10,r.push("awaiting-reply")),(e.tags?.some(d=>d==="marketing"||d==="automated")||pt(e.remoteParty?.resource,e.lastActivityPreview?.snippet))&&(n-=At,r.push("bulk")),{score:n,reasons:r}}const ri=e=>!!e.assignedUserId||!!e.assignedInboxId,ii=e=>e.status==="closed",oi=e=>({urgent:10,high:5,normal:2,low:1})[e.priority]||0,ai=(e,t=30)=>e.title?.length<=t?e.title:`${e.title.substring(0,t)}...`;function si(e,t){const n=e.labels??[];return n.find(r=>r.locale===t)?.label??n[0]?.label??e.url}function ci(e,t,n){const r=e.translations??[];return r.find(i=>i.locale===t)??(n?r.find(i=>i.locale===n):void 0)??{locale:t}}const te=[{code:"nl",label:"Nederlands",english:"Dutch"},{code:"en",label:"English",english:"English"},{code:"de",label:"Deutsch",english:"German"},{code:"fr",label:"Français",english:"French"},{code:"es",label:"Español",english:"Spanish"},{code:"it",label:"Italiano",english:"Italian"},{code:"pt",label:"Português",english:"Portuguese"},{code:"pl",label:"Polski",english:"Polish"},{code:"sv",label:"Svenska",english:"Swedish"},{code:"da",label:"Dansk",english:"Danish"},{code:"nb",label:"Norsk bokmål",english:"Norwegian Bokmål"},{code:"fi",label:"Suomi",english:"Finnish"},{code:"tr",label:"Türkçe",english:"Turkish"}];function Rt(e){const t=(e??"").toLowerCase();return te.find(n=>n.code===t)??te.find(n=>n.code===t.split("-")[0])}function li(e){return Rt(e)?.label??e}function ui(e){const t=Rt(e);return t?t.english===t.label?`${t.english} (${t.code})`:`${t.english} — ${t.label} (${t.code})`:e}const de=3;function Ct(e,t){const n=new Set;let r=1,i=t.get(e)?.parentId;for(;i;){if(n.has(i)||(n.add(i),r++,r>de+1))return 1/0;i=t.get(i)?.parentId}return r}function di(e,t,n){if(!e)return!0;if(e===t)return!1;const r=new Map(n.map(a=>[a.id,a]));if(!r.has(e)||t&&Nt(e,t,r))return!1;const i=Ct(e,r),o=t?pe(t,n):1;return i+o<=de}function Nt(e,t,n){const r=new Set;let i=n.get(e)?.parentId;for(;i;){if(i===t)return!0;if(r.has(i))return!1;r.add(i),i=n.get(i)?.parentId}return!1}function pe(e,t,n=new Set){if(n.has(e))return 1;n.add(e);const r=t.filter(i=>i.parentId===e);return r.length?1+Math.max(...r.map(i=>pe(i.id,t,n))):1}const kt="en";function vt(e){return e.defaultLocale||e.locale||kt}function pi(e){const t=new Set,n=[];for(const r of[vt(e),...e.locales??[]])!r||t.has(r)||(t.add(r),n.push(r));return n}function fi(e,t,n){const r=e.translations??[];return r.find(i=>i.locale===t)?.name??(n?r.find(i=>i.locale===n)?.name:void 0)??e.name}const ne=["lookup","condition","parallel","for-each"];function re(e){for(const t of e){if(!ne.includes(t.type))return`staptype "${t.type}" mag niet meelezen (alleen ${ne.join(", ")})`;if(t.type==="parallel")for(const n of t.branches??[]){const r=re(n);if(r)return r}if(t.type==="for-each"){const n=re(t.body??[]);if(n)return n}}return null}function mi(e,t){switch(e.kind){case"org":return!0;case"team":return!!t.teamId&&e.teamId===t.teamId;case"personal":return e.userId===t.userId}}function gi(e,t){return e.filter(n=>n.enabled&&mi(n.ownerScope,t))}function hi(e){return e.credentialScope?e.credentialScope:(e.authMode??"header")==="header"||e.oauth?.scope==="org"?"shared":"per-user"}function Ei(e){return`mcp__${e}__`}const Ai=1e3,Si=2e3,yi=500,_i=12e3,Ti=4e3,Dt=["contact","company","work_item"];function bi(e){if(!e)return!1;const t=e.slice(0,e.indexOf(":"));return Dt.includes(t)}const Ii="onboarding-source",Oi=["support","billing","availability","sales","onboarding"],Mi=["keep","replace"];function xt(e){switch(e.kind){case"user":return`user:${e.userId}`;case"team":return`team:${e.teamId}`;case"org":return"org"}}function wi(e){if(typeof e!="string")return;const t=e.trim();if(t==="org")return{kind:"org"};const n=t.indexOf(":");if(n<=0)return;const r=t.slice(0,n),i=t.slice(n+1).trim();if(i){if(r==="user")return{kind:"user",userId:i};if(r==="team")return{kind:"team",teamId:i}}}function Lt(e){return xt(e)}function Pt(e){switch(e.kind){case"personal":return{kind:"user",userId:e.userId};case"team":return{kind:"team",teamId:e.teamId};case"org":return{kind:"org"}}}const Ut=Pt;function Ri(e){return e.agentId?{kind:"user",userId:e.agentId}:Ut(e.ownerScope)}function Ci(e){return Lt(e)}function Ni(e,t){if(!t)return;let n=e;for(const r of t.split(".")){if(n===null||typeof n!="object")return;n=n[r]}return n}function ki(e,t){return e.targets.find(n=>n.activityTypes.includes(t))}function vi(e,t){if(t)return e.targets.find(n=>n.id===t)}function $t(e){return e?.kind==="assignment"}function Di(e){const{trigger:t,agentId:n,target:r,activityType:i,assigneeUserId:o,authorUserId:a}=e;return $t(t)?n?r?r.activityTypes.includes(i)?o?o!==n?"assigned to someone else":a&&a===n?"the agent assigned this to itself, which would restart its own run":null:`no assignee found at ${r.assigneePath}`:`activity type ${i} does not announce an assignment for ${r.id}`:`assignment target kind "${t.targetKind}" is not declared by any installed app`:"this playbook has no agent, so an assignment can never be for it":"trigger is not an assignment trigger"}function xi(e){return(e.startsWith("tool:")?e.slice(5):e).replace(/__/g," · ").replace(/\./g," · ").replace(/_/g," ")}const Li=[{name:"text",type:"string"},{name:"subject",type:"string"},{name:"from",type:"string"},{name:"type",type:"string"},{name:"direction",type:"string"},{name:"channelId",type:"string"},{name:"interactionId",type:"string"},{name:"itemId",type:"string"},{name:"activityId",type:"string"},{name:"authorType",type:"string"},{name:"authorName",type:"string"},{name:"textRaw",type:"string"},{name:"fromStatus",type:"string"},{name:"toStatus",type:"string"},{name:"toCategory",type:"string"},{name:"contactId",type:"string"},{name:"companyId",type:"string"},{name:"assigneeUserId",type:"string"}],Pi={topics:[{name:"topicId",type:"string"},{name:"topic",type:"string"},{name:"confidence",type:"number"},{name:"reasoning",type:"string"}],question:[{name:"answer",type:"boolean"},{name:"reasoning",type:"string"}],extract:[]};function Kt(e){return`${e.type}:${e.id}`}const Bt="interaction";function Ft(e){return e?.type===Bt?e.id:void 0}const Gt=64,Ht=8e3;function Ui(e){const t=typeof e=="number"?e:Number(String(e??"").trim());if(!(!Number.isFinite(t)||t<=0))return Math.min(Math.max(Math.round(t),Gt),Ht)}const $i={kind:"workflow",steps:[]};function Ki(e){return e?.kind==="workflow"?e.steps:[]}function Bi(e){return e?.kind==="procedure"?e.procedure:void 0}function Wt(e){const t=e?.approved??0,n=t+(e?.rejected??0);return{total:n,rate:n?t/n:0}}const Vt=10,jt=.9;function Fi(e){const{total:t,rate:n}=Wt(e);return t>=Vt&&n>=jt}const Yt=["done","escalated","failed","stopped"];function Gi(e){return Yt.includes(e)}function Xt(e){return e==="waiting"}function Hi(e){return e==="running"||Xt(e)}function fe(e){return e.subjectKind&&e.subjectId?{type:e.subjectKind,id:e.subjectId}:void 0}function Wi(e){const t=fe(e);return t?Kt(t):void 0}function Vi(e){return Ft(fe(e))}function ji(e){const t=[],n=new Map;for(const r of[...e].sort(Yi)){const i=n.get(r.emoji);if(i){i.push(r.actor);continue}t.push(r.emoji),n.set(r.emoji,[r.actor])}return t.map(r=>{const i=n.get(r);return{emoji:r,count:i.length,actors:i}}).sort((r,i)=>i.count-r.count||t.indexOf(r.emoji)-t.indexOf(i.emoji))}const Yi=(e,t)=>(e.createdAt??0)-(t.createdAt??0);function Xi(e,t){return t?e.actors.some(n=>n.type==="user"&&n.id===t):!1}function zi(e,t){const n=e.accumulatedSeconds||0;return e.runningSince?n+Math.max(0,Math.floor((t-e.runningSince)/1e3)):n}function qi(e,t){const n=Math.max(1,Math.ceil(Math.max(0,e)/60));if(!t||t==="exact")return n*60;const r=Number(t);return!Number.isFinite(r)||r<=0?n*60:Math.ceil(n/r)*r*60}function Ji(e){const t=Math.max(0,Math.round(e/60));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`}function Zi(e){const t=Math.max(0,Math.floor(e)),n=o=>String(o).padStart(2,"0"),r=Math.floor(t/60)%60,i=Math.floor(t/3600);return i>0?`${i}:${n(r)}:${n(t%60)}`:`${n(r)}:${n(t%60)}`}function zt(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,48).replace(/^-+|-+$/g,"")}function Qi(e,t){const n=zt(e)||"werksoort",r=new Set(t);if(!r.has(n))return n;for(let i=2;i<500;i++){const o=`${n}-${i}`;if(!r.has(o))return o}return`${n}-${r.size+1}`}function eo(e,t){const n=e.ownerScope;return!n||n.kind==="org"?!0:t.includes(n.teamId)}function to(e){return e.filter(t=>!t.archived).sort(qt)}function qt(e,t){const n=(e.order??0)-(t.order??0);return n!==0?n:(e.label||"").localeCompare(t.label||"")}const Jt=20,Zt=20,D=300;function _(e){return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu," ").replace(/\s+/g," ").trim()}function Qt(e){const t=e.replace(/\s+/g," ").trim();if(t.length<=D)return t;const n=t.slice(0,D),r=Math.max(n.lastIndexOf(". "),n.lastIndexOf("! "),n.lastIndexOf("? "));return r>D*.6?n.slice(0,r+1):`${n.trimEnd()}…`}function no(e,t){const n=Qt(t.text),r=_(n);if(!r||(e.examples??[]).some(a=>_(a)===r))return null;const i=e.exampleCandidates??[],o=i.findIndex(a=>_(a.text)===r);if(o>=0){if(i[o].corrected||!t.corrected)return null;const a=[...i];return a[o]={...a[o],corrected:!0,addedAt:t.addedAt},Ne(a)}return Ne([{...t,text:n},...i]).slice(0,Zt)}function Ne(e){return[...e].sort((t,n)=>Number(n.corrected)-Number(t.corrected)||n.addedAt-t.addedAt)}function ro(e,t){const n=_(t),r=(e.examples??[]).filter(o=>o.trim());return{examples:r.some(o=>_(o)===n)?r:[...r,t].slice(-Jt),exampleCandidates:en(e,t)}}function en(e,t){const n=_(t);return(e.exampleCandidates??[]).filter(r=>_(r.text)!==n)}function tn(e,t){const n=e.ownerScope;return n?n.kind==="org"?!0:n.kind==="team"?!!t&&n.teamId===t:!1:!1}function io(e,t){return e.filter(n=>tn(n,t))}function oo(e){return e.type==="agent"}const ao="WORK_COMMENT_ADDED",so="WORK_ITEM_ASSIGNED",co="WORK_ITEM_STATUS_CHANGED";function lo(e,t){const n=r=>{const i=new Date(r);return i.setHours(0,0,0,0),i.getTime()};return Math.round((n(e)-n(t))/ut)}function uo(e,t){if(e.closedAt!=null)return{score:y,reasons:[]};const n=t.remindersById?.[e.id];if(n&&n.remindAt>t.now)return{score:y,reasons:[]};let r=0;const i=[],o=e.priority??"normal";if(I[o]>0&&(r+=I[o],i.push(`priority:${o}`)),typeof e.dueDate=="number"){const a=lo(e.dueDate,t.now);a<0?(r+=35,i.push("overdue")):a===0&&(r+=20,i.push("due-today"))}return e.source?.initiator==="system"&&e.source.systemReason&&(r+=15,i.push(`auto:${e.source.systemReason}`)),{score:r,reasons:i}}const nn="work_item",rn="work_project",on="work_activity";function an(e){return`${nn}:${e}`}function me(e){return`${rn}:${e}`}function po(e){return`${on}:${e}`}function fo(e,t,n){const r=`${e}-${t}`;return n?`${r}-${n}`:r}function mo(e){const t=/^([A-Za-z0-9]{2,8})-(\d+)(?:-(\d+))?$/.exec((e||"").trim());return t?{projectKey:t[1].toUpperCase(),sequenceNumber:Number(t[2]),...t[3]?{subSequence:Number(t[3])}:{}}:null}function go(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,3)||"PRJ"}function ho(e,t=25){const n=new Set([an(e.id)]);e.projectId&&n.add(me(e.projectId));for(const r of e.ancestorKeys??[])n.add(r);for(const r of e.partyKeys??[])n.add(r);return Array.from(n).slice(0,t)}function Eo(e){return[me(e.id)]}const B=[{key:"open",label:"status_open",category:"todo",order:0},{key:"in_progress",label:"status_in_progress",category:"in_progress",order:1},{key:"done",label:"status_done",category:"done",order:2},{key:"cancelled",label:"status_cancelled",category:"done",order:3}],ge=B.map(e=>e.key);function sn(e){return e?.statuses?.length?e.statuses:B}function cn(e,t){return t.find(n=>n.key===e)?.category??"todo"}function Ao(e,t){return t.find(n=>n.key===e)}function So(e){const t=sn(e),n=e?.defaultStatusKey;return n&&t.some(r=>r.key===n)?n:ln(t)[0]?.key??B[0].key}function ln(e){return[...e].sort((t,n)=>{const r=(t.order??0)-(n.order??0);return r!==0?r:(t.label||"").localeCompare(n.label||"")})}function yo(e,t){return cn(e,t)==="done"}function un(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,48).replace(/^-+|-+$/g,"")}function _o(e,t){const n=un(e)||"status",r=new Set([...t,...ge]);if(!r.has(n))return n;for(let i=2;i<500;i++){const o=`${n}-${i}`;if(!r.has(o))return o}return`${n}-${r.size+1}`}function To(e){const t=[];if(!e.length)return[{index:-1,reason:"empty"}];const n=new Set;return e.forEach((r,i)=>{if(!r.key){t.push({index:i,reason:"missing_key"});return}ge.includes(r.key)&&t.push({index:i,reason:"reserved_key",key:r.key}),n.has(r.key)&&t.push({index:i,reason:"duplicate_key",key:r.key}),n.add(r.key)}),e.some(r=>r.category==="todo"||r.category==="in_progress")||t.push({index:-1,reason:"no_open"}),e.some(r=>r.category==="done")||t.push({index:-1,reason:"no_done"}),t}const bo=new Set(["image/png","image/jpeg","image/jpg","image/gif","image/webp"]),Io=new Set(["text/plain","text/markdown","text/csv","application/json","text/html","application/xml","text/xml"]);function dn(e){const t=(e??"").trim().toLowerCase().split(";")[0];return t?bo.has(t)?"image":t==="application/pdf"?"pdf":Io.has(t)?"text":t.startsWith("audio/")?"audio":"unsupported":"unsupported"}const T=1024*1024,pn={image:5*T,pdf:20*T,text:1*T,audio:20*T},Oo=25*T,Mo=5;function wo(e,t){const n=dn(e);return n==="unsupported"?"unsupported":t>pn[n]?"too-large":null}function Ro(e){return e.access!=="read"&&e.effect!=="internal"}function fn(e){return`${e.kind}:${e.id||e.url||e.title}`}function Co(e,t=[]){const n=new Set(t),r=[],i=[];for(const o of e){const a=fn(o);n.has(a)||(n.add(a),r.push(o),i.push(a))}return{sources:r,keys:i}}const No="assist-source",ko=["blocking","due","open"];function vo(e,t){const[n,r]=(e.subjectKey??"").split(":");return n===t&&r?r:void 0}const ke={blocking:0,due:1,open:2};function Do(e,t){return ke[e.band??"open"]-ke[t.band??"open"]||(t.priority??0)-(e.priority??0)||e.id.localeCompare(t.id)}function xo(e){return e.sessions.filter(t=>t.id!==e.exceptSessionId&&t.state==="connected"&&e.canHold(t.providerId))}function Lo(e){return e.sessions.filter(t=>t.id!==e.exceptSessionId&&t.state==="connected"&&!e.canHold(t.providerId))}function Po(e){return e.sessions.some(n=>n.id!==e.exceptSessionId&&(n.state==="connected"||n.state==="on_hold"))?{admit:!1,reason:"busy"}:{admit:!0}}function mn(e,t){const n=new Set(e.disabledIntents??[]),r=e.intentOverrides??{},i=t.intents.filter(a=>!n.has(a.intent)).map(a=>$o(a,r[a.intent]));if(!e.extraIntents||e.extraIntents.length===0)return i;const o=new Set(i.map(a=>a.intent));for(const a of e.extraIntents)o.has(a.intent)||(i.push(a),o.add(a.intent));return i}function gn(e,t){const n={};for(const r of e.intents){if(!r.togglable)continue;const i=t?.[r.intent];n[r.intent]=i??r.defaultEnabled??!0}return n}function Uo(e,t){const n=gn(e,t);return Object.entries(n).filter(([,r])=>!r).map(([r])=>r)}function $o(e,t){return t?{intent:t.intent??e.intent,targetSchemes:t.targetSchemes??e.targetSchemes,transport:t.transport??e.transport}:e}function Ko(e,t){const n=[];for(const r of e){if(!r.enabled)continue;const i=t[r.providerId];if(i)for(const o of mn(r,i))n.push({channel:r,description:i,capability:o})}return n}function Bo(e,t){return t.filter(n=>n.capability.intent===e)}function hn(e,t){return t.filter(n=>n.capability.targetSchemes.includes(e))}function Fo(e,t){return hn(e.scheme,t)}function Go(e,t,n){const r=[];for(const i of e)for(const o of n)o.capability.intent===t&&o.capability.targetSchemes.includes(i.scheme)&&r.push({channelIntent:o,endpoint:i});return r}var En=(e=>(e.MAILTO="mailto",e.SIP="sip",e.TEL="tel",e.WEBHOOK="webhook",e.USERNAME="username",e.ID="id",e.CUSTOM="custom",e.URL="url",e.TELEGRAM="telegram",e.WHATSAPP="whatsapp",e.MESSENGER="messenger",e.INSTAGRAM="instagram",e.VIBER="viber",e.SMS="sms",e.FAX="fax",e.TEAMS="teams",e.CALENDAR="calendar",e))(En||{});const Ho={mailto:"mail",sip:"tel",tel:"tel",fax:"tel",sms:"chat",teams:"chat",telegram:"chat",messenger:"chat",instagram:"chat",viber:"chat",whatsapp:"wa",webhook:"note",url:"note",calendar:"note",username:"note",id:"note",custom:"note"};function Wo(e){return e?Ho[e]??"note":"note"}const Vo="message_window",jo="message_templates",Yo={FROM:"from",TO:"to",CC:"cc",BCC:"bcc",ORGANIZER:"organizer",PRESENTER:"presenter",ATTENDEE:"attendee",OWNER:"owner",MEMBER:"member",GUEST:"guest",HOST:"host",PARTICIPANT:"participant"},Xo=(e,t)=>({intent:e,...t}),zo="folder_management",qo="remote_search",Jo="message_reactions",Zo={ok:!1,code:"UNSUPPORTED",message:"Provider does not support this op"},Qo="context.collect",u=e=>({type:"string",description:e}),l=e=>({type:"number",description:e}),x=e=>({type:"boolean",description:e}),E=u("Sheet name. Omit for the sheet the user is looking at."),ve=u("Slide id, as `inspect` reports it.");function c(e,t,n,r,i,o){return{op:e,kinds:t,summary:n,parameters:{type:"object",properties:r,required:i},undoable:o.undoable,visible:o.visible}}const b={undoable:!1,visible:!0},p={undoable:!0,visible:!0},De={undoable:!1,visible:!0},$={undoable:!1,visible:!1},ea=[c("pdf.goToPage",["pdf"],"Scroll the viewer to a page.",{page:l("1-based page number.")},["page"],b),c("pdf.search",["pdf"],"Search the document and highlight the matches, as the find bar does.",{query:u("Text to find."),next:x("Jump to the next match instead of the first.")},["query"],b),c("pdf.setTool",["pdf"],"Select a markup tool for the user, so their next click draws it.",{tool:{type:"string",enum:["highlight","text","draw","image","signature","none"],description:"Which tool to arm. `none` puts the tool row back to reading."}},["tool"],b),c("pdf.fillField",["pdf"],"Fill one form field of a fillable PDF.",{field:u("Field name, exactly as `inspect` reports it under `fields`."),value:{type:["string","boolean"],description:"Text for a text field, true/false for a checkbox or radio."}},["field","value"],p),c("pdf.reorderPages",["pdf"],"Put the pages in a different order. Pages left out are deleted.",{order:{type:"array",items:{type:"number"},description:"1-based source page numbers, in the order they should end up in."}},["order"],De),c("pdf.deletePages",["pdf"],"Remove pages, keeping the rest in order.",{pages:{type:"array",items:{type:"number"},description:"1-based page numbers."}},["pages"],De),c("pdf.addNote",["pdf"],"Place a text note on a page. Written on save; not visible before that.",{page:l("1-based page number."),text:u("The note's text."),left:l("Distance from the left edge, in PDF points (72 per inch)."),top:l("Distance from the top edge, in PDF points."),width:l("Box width in points. Omit for a sensible default."),height:l("Box height in points. Omit for a sensible default."),fontSize:l("Font size in points. Omit for 12.")},["page","text","left","top"],$),c("pdf.highlightText",["pdf"],"Highlight a phrase on a page. Written on save; not visible before that.",{page:l("1-based page number."),text:u("The exact phrase to highlight, as it appears in the page's text."),occurrence:l("Which occurrence on that page, 1-based. Omit for the first.")},["page","text"],$)],ta=[c("sheet.setValues",["sheet"],"Write a block of values. The block's shape must match the range.",{sheet:E,range:u("A1 notation, e.g. `B2:D5` or a single `A1`."),values:{type:"array",items:{type:"array",items:{type:["string","number","boolean","null"]}},description:"Rows of cells, top-left first. `null` clears a cell."}},["range","values"],p),c("sheet.setFormula",["sheet"],"Put a formula in every cell of a range.",{sheet:E,range:u("A1 notation."),formula:u("Including the leading `=`.")},["range","formula"],p),c("sheet.setStyle",["sheet"],"Change the look of a range. Only the properties you pass are touched.",{sheet:E,range:u("A1 notation."),bold:x("Bold on or off."),italic:x("Italic on or off."),fontSize:l("Point size."),fontColor:u("CSS colour, e.g. `#b91c1c`."),background:u("CSS colour for the cell fill."),horizontalAlignment:{type:"string",enum:["left","center","right"],description:"Horizontal alignment."},numberFormat:u("Number format pattern, e.g. `#,##0.00` or `0%`.")},["range"],p),c("sheet.insertRows",["sheet"],"Insert empty rows, pushing the rest down.",{sheet:E,at:l("1-based row number to insert before."),count:l("How many. Omit for 1.")},["at"],p),c("sheet.deleteRows",["sheet"],"Delete rows, pulling the rest up.",{sheet:E,at:l("1-based first row to delete."),count:l("How many. Omit for 1.")},["at"],p),c("sheet.insertColumns",["sheet"],"Insert empty columns, pushing the rest right.",{sheet:E,at:l("1-based column number to insert before."),count:l("How many. Omit for 1.")},["at"],p),c("sheet.deleteColumns",["sheet"],"Delete columns, pulling the rest left.",{sheet:E,at:l("1-based first column to delete."),count:l("How many. Omit for 1.")},["at"],p),c("sheet.merge",["sheet"],"Merge a range into one cell.",{sheet:E,range:u("A1 notation.")},["range"],p),c("sheet.unmerge",["sheet"],"Break merged cells in a range apart.",{sheet:E,range:u("A1 notation.")},["range"],p),c("sheet.sort",["sheet"],"Sort a range on one of its columns.",{sheet:E,range:u("A1 notation covering the rows to sort, header excluded."),column:l("1-based column *within the range*, not within the sheet."),ascending:x("Ascending. Omit for ascending.")},["range","column"],p),c("sheet.insertSheet",["sheet"],"Add a new sheet.",{name:u("Name for the new sheet.")},["name"],p),c("sheet.renameSheet",["sheet"],"Rename a sheet.",{sheet:u("Current name."),name:u("New name.")},["sheet","name"],p),c("sheet.deleteSheet",["sheet"],"Remove a sheet and everything on it.",{sheet:u("Name of the sheet to delete.")},["sheet"],p),c("sheet.activate",["sheet"],"Show the user a sheet and select a range on it.",{sheet:E,range:u("A1 notation to select. Omit to only switch sheets.")},[],b)],na=[c("word.replaceParagraph",["word"],"Rewrite one whole paragraph, keeping its style. This is the verb for shortening or rephrasing something; call it once per paragraph.",{at:l("The offset the paragraph starts at, exactly as `inspect` prints it."),text:u("The new text for that paragraph. A newline starts a further paragraph.")},["at","text"],p),c("word.replaceRange",["word"],"Replace a stretch of text inside a paragraph - a sentence, a phrase. To rewrite whole paragraphs use word.replaceParagraph: a range covering several paragraph styles is refused, because a replacement carries one style and would set the whole span in the first.",{start:l("Character offset where the replaced text starts, as `inspect` reports offsets."),end:l("Character offset just past the last character to replace."),text:u("The replacement text. A newline starts a new paragraph.")},["start","end","text"],p),c("word.insertText",["word"],"Insert text at a character offset, without removing anything.",{index:l("Character offset, as `inspect` reports offsets."),text:u("The text to insert.")},["index","text"],p),c("word.appendText",["word"],"Add text at the end of the document.",{text:u("The text to append.")},["text"],p),c("word.insertParagraph",["word"],"Start a new paragraph, optionally with text in it.",{text:u("Paragraph text. Newlines start further paragraphs."),index:l("Character offset to insert at. Omit for the end of the document.")},[],p),c("word.setSelection",["word"],"Put the user's cursor on a stretch of text, and move the reading window there: the page context carries one window of a long document, and the text around this offset arrives in the next turn.",{start:l("Start character offset."),end:l("End character offset. Omit for a caret.")},["start"],b)],ra=[c("slides.setText",["slides"],"Replace the text of one shape. Written on save; not visible before that, and not undoable.",{slide:ve,element:u("Element id, as `inspect` reports it."),text:u("The new text.")},["slide","element","text"],$),c("slides.setTransform",["slides"],"Move or resize one shape. Only the values you pass change. Written on save; not visible before that, and not undoable.",{slide:ve,element:u("Element id."),left:l("Distance from the left edge, in pixels."),top:l("Distance from the top edge, in pixels."),width:l("Width in pixels."),height:l("Height in pixels.")},["slide","element"],$)],he=[...ea,...ta,...na,...ra];function ia(e){return he.filter(t=>t.kinds.includes(e))}function oa(e){return he.find(t=>t.op===e)}const aa="documents.describe",sa="documents.inspect",ca="documents.apply";function la(e){const t=e.indexOf(":");if(t!==-1)return e.slice(0,t);const n=e.indexOf(".");return n===-1?e:e.slice(0,n)}const ua="installation-id";function da(e){const t=[];for(const n of Object.keys(e))for(const r of Object.keys(e[n]))t.push({lang:n,key:r,value:e[n][r]});return t}const pa="notification-source",fa=(e,t)=>`${e}.pref.${t}`,ma={ai:["account.read","account.write","agent.read","agent.write","assignment.read","assignment.write","budget.read","budget.write","connector.read","connector.write","context.read","context.write","conversation.read","conversation.write","lens.read","lens.write","message.read","message.write","playbook.read","playbook.write","profile.read","profile.write","run.read","run.write","settings.read","settings.write","tool.read","transcript.write","usage.read"],analytics:["report.read"],"app-store":["app.publish","app.read","app.write","setting.read","setting.write"],assist:["board.read"],automations:["sync.read","sync.write","webhook.read","webhook.write"],communication:["account.read","account.write","activity-type.read","activity.read","activity.write","attachment.read","attribute.read","attribute.write","calendar.read","calendar.write","channel.read","channel.write","custom-field.read","custom-field.write","folder.read","folder.write","inbox.read","inbox.write","interaction.read","interaction.write","reaction.read","reaction.write","reminder.read","template.read","template.write","topic.read","topic.write"],context:["kind.read","kind.write","memory.read","memory.write"],crm:["company.read","company.write","contact.read","contact.write"],"eylo-voip":["account.read","account.write","callflow.read","callflow.write","channel.read","channel.write","contact.read","contact.write","device.read","device.write","group.read","group.write","interaction.read","interaction.write","media.read","media.write","menu.read","menu.write","phone-number.read","phone-number.write","recording.read","recording.write","sip.read","temporal-rule.read","temporal-rule.write","user.read","user.write","vmbox.read","vmbox.write","webhook.read","webhook.write"],google:["account.read","account.write","contact.read"],kb:["article.read","article.write","category.read","category.write","help-center.read","help-center.write","kb.read","kb.write"],mail:["account.write"],meta:["account.read","account.write"],microsoft:["account.read","account.write","contact.read","sync.write"],organization:["billing.read","billing.write","settings.read","settings.write","team.read","team.write"],shopify:["account.read","account.write","order.read"],slack:["thread.read","thread.write"],storage:["artifact.read","artifact.write","file.read","file.write","mount.read","mount.write"],time:["entry.read","entry.write","work-type.read","work-type.write"],user:["user.read","user.write"],work:["item.read","item.write","project.read","project.write"]},Ee=9e4,An=["out_of_office"],Sn=e=>An.includes(e);function ga(e,t,n){const r=n-e<Ee,i=t?.status&&(!t.expiresAt||t.expiresAt>n)?t:void 0;if(!i?.status)return{online:r,status:r?"available":"offline"};const o=i.status;return!r&&!Sn(o)?{online:!1,status:"offline"}:{online:r,status:o,message:i.message}}function ha(e,t){const n=t-e.lastSeenAt<Ee,r=n||Sn(e.status)?e.status:"offline";return n===e.online&&r===e.status?e:{...e,online:n,status:r}}function Ea(e,t){return e?.teamId&&t.includes(e.teamId)?{teamId:e.teamId,mustChoose:!1}:t.length===1?{teamId:t[0],mustChoose:!1}:{teamId:void 0,mustChoose:t.length>1}}function Aa(e){return e.providerAvailable&&e.allowed}const Sa="resources.describe",ya="resources.search",_a="resources.resolve",Ta="resources.attached";function ba(e){const t=e.indexOf(":");return t===-1?e:e.slice(0,t)}const Ia="/provider/scope/related",Oa="/provider/scope/read",Ae="auth";function Se(e){const t=typeof e=="string"?e.match(/apps\/([^/?#]+)/):null;return t?t[1]:null}function Ma(e){const t=Se(e);return t?t!==Ae:typeof e=="string"&&e.startsWith("/wake")}function wa(e){return typeof e!="string"||e===""||e==="/"?!0:Se(e)===Ae}function Ra(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function yn(e){const n=e.split("/").filter(Boolean).map(r=>r.startsWith(":")?r.endsWith("?")?"(?:/[^/]+)?":"/[^/]+":`/${Ra(r)}`).join("");return new RegExp(`^${n}\\/?$`)}function _n(e,t){const n=e.split("/").filter(Boolean),r=t.split("/").filter(Boolean),i={};return n.forEach((o,a)=>{if(o.startsWith(":")){const s=o.endsWith("?")?o.slice(1,-1):o.slice(1),d=r[a];d&&(i[s]=d)}}),i}function Tn(e){return e.publicBasePath??`/apps/${e.name}`}function Ca(e){const t=[];for(const n of e){if(!n?.name)continue;const r=Tn(n);for(const i of n.routes??[]){if(!i.public)continue;const o=i.path==="/"?"":i.path;t.push({appName:n.name,resource:i.resource,pattern:`${r}${o}`,props:i.props})}}return t}function bn(e,t){const n=e.split("/").filter(Boolean),r=t.split("/").filter(Boolean);for(let i=0;i<Math.min(n.length,r.length);i++){const o=n[i].startsWith(":"),a=r[i].startsWith(":");if(o!==a)return a}return n.length>r.length}function In(e,t){if(typeof e!="string")return null;let n=null;for(const r of t)yn(r.pattern).test(e)&&(!n||bn(r.pattern,n.pattern))&&(n=r);return n?{...n,params:{...n.props,..._n(n.pattern,e)}}:null}function Na(e,t){return In(e,t)!==null}const ka=10*1024*1024,va=25*1024*1024,Da="sync-source",xa="sync-target",La=20,Pa={afrikaans:["[Muziek]","(C) TV GELDERLAND 2021","*Thomp thomp thomp*","www.youtube.com","ä n wood s","!.."],english:["[applause]","[APPLAUSE]","(claps)","(clapping)","(audience applauds)","(keyboard clicking)","(keyboard clacking)","(clicking)","[CLICK]","[BLANK_AUDIO]","(upbeat music)","(dramatic music)","[music playing]","(electronic music)","(audience cheering)","(audience cheers)","[MUSIC]","( ( ( ( ) ( ) ( ) ( )","(laughs)","(air whooshing)","<u>Transcribed</u> by https://otter.ai","All new tonight at 6... coming up. A new look at your forecast is A new look at your forecast is","www.mooji.org","KATHRYN A new forecast is coming up... A new forecast is coming up...","KATHRYN pandemic started. increasing since the The pandemic has been","A new look at your forecast this morning... A new look at your","We'll be right back.","We'll see you next week.","Thanks for watching!","❤️ Translated by Amara.org Communit"],flemish:["*clap*","TV GELDERLAND 2020","TV Gelderland 2021","(C) TV GELDERLAND 2021","[Muziek]","Kuman","Ondertitels ingediend door de Amara.org gemeenschap","Ondertiteld door de Amara.org gemeenschap","Dank u wel voor het kijken.","Ondertiteling door de Amara.org gemeenschap","GELUID VAN MAHIH U similarly"],french:["(applaudissements)","[Applaudissements]","Sous-titres réalisés par la communauté d'Amara.org","- Bonne journée. - Bonjour.","POP POP הי","Merci d'avoir regardé cette vidéo.","Merci d'avoir regardé cette vidéo!","Merci d'avoir regardé la vidéo.","J'espère que vous avez apprécié la vidéo.","Je vous remercie de vous abonner","Merci d'avoir regardé!","❤️ par SousTitreur.com","— Sous-titrage ST'501 —","Thanks for watching!","Sous-titres réalisés par l'Amara.org","Sous-titres réalisés para la communauté d'Amara.org","Sous-titres réalisés par la communauté d'Amara.org","Sous-titres fait par Sous-titres par Amara.org","Sous-titres réalisés par les SousTitres d'Amara.org","Sous-titres par Amara.org","Sous-titres par la communauté d'Amara.org","Sous-titres réalisés pour la communauté d'Amara.org","Sous-titres réalisés par la communauté de l'Amara.org","Sous-Titres faits par la communauté d'Amara.org","Sous-titres par l'Amara.org","Sous-titres fait par la communauté d'Amara.org","Sous-titrage ST' 501","Sous-titrage ST'501","Cliquez-vous sur les sous-titres et abonnez-vous à la chaîne d'Amara.org","❤️ par SousTitreur.com"],german:["[Klicken]","(Jubel)","*lacht*","[Anhaltender Beifall]","[Applaus]","(Applaus)","* Applaus *","[MUSIK]","* mustard ml Drumglöck und knack in einem Handbewerb *","Untertitelung aufgrund der Amara.org-Community","Untertitel im Auftrag des ZDF für funk, 2017","Untertitel von Stephanie Geiges","Untertitel der Amara.org-Community","Untertitel im Auftrag des ZDF, 2017","Untertitel im Auftrag des ZDF, 2020","Untertitel im Auftrag des ZDF, 2018","Untertitel im Auftrag des ZDF, 2021","Untertitelung im Auftrag des ZDF, 2021","Copyright WDR 2021","Copyright WDR 2020","Copyright WDR 2019","SWR 2021","SWR 2020"],italian:["Alla prossima!","*applauso*","[Musica]","[Musica]","[Applausi]","*Bip bip bip bip*","(musica del NS shore)","D' 1962 alle tribunte del Gulf","Sottotitoli creati dalla comunità Amara.org","Sottotitoli di Sottotitoli di Amara.org","Sottotitoli e revisione al canale di Amara.org","Sottotitoli e revisione a cura di Amara.org","Sottotitoli e revisione a cura di QTSS","Sottotitoli e revisione a cura di QTSS.","Sottotitoli a cura di QTSS","Sottotitoli a cura di Sottotitoli"],spanish:["[música]","[Música de cierre]","[Aplausos]","(Aplausos)","www.alimmenta.com","¡Gracias por ver el vídeo!","(sonidos del celular) (Inudible distorsión)","¡Suscríbete!","Subtítulos realizados por la comunidad de Amara.org","Subtitulado por la comunidad de Amara.org","Subtítulos por la comunidad de Amara.org","Subtítulos creados por la comunidad de Amara.org","Subtítulos en español de Amara.org","Subtítulos hechos por la comunidad de Amara.org","Subtitulos por la comunidad de Amara.org","Más información www.alimmenta.com","www.mooji.org","[MÚSICA]","[Music cuts in British]"]},On=e=>{let t=e;return Object.values(Pa).forEach(n=>{n.forEach(r=>{t=t.replaceAll(r,"")})}),t=t.replace(/\(.*?\)/g,""),t=t.replace(/\[.*?\]/g,""),t},Mn=6e4,wn=8e3,Rn=2,Cn=.4,Ua=3,$a=new Set(["aan","als","ben","bent","bij","dan","dat","deze","die","dit","doen","door","dus","echt","een","eens","even","gaan","gaat","geen","geweest","goed","graag","had","heb","hebben","hebt","heeft","het","hier","hoe","hoor","iets","inderdaad","kan","klopt","kunnen","kunt","maar","mag","mee","meer","met","mij","mijn","misschien","moet","moeten","naar","net","niet","nog","nou","oke","ook","over","prima","toch","uhm","uit","van","veel","voor","wat","weer","weet","wel","wij","wil","wilt","worden","wordt","zeg","zeggen","zijn","zou","zult","about","and","are","been","but","can","does","for","have","just","know","like","not","okay","right","she","that","the","them","then","there","they","this","want","was","well","were","what","will","with","would","yeah","you","your"]);function Nn(e){const t=new Set;for(const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))n.length<Ua||$a.has(n)||t.add(n);return[...t]}function kn(e,t){if(!e.length)return 0;if(!t.length)return 1;const n=new Set(t),r=new Set(e);let i=0;for(const o of r)n.has(o)||(i+=1);return i/r.size}function vn(e,t=Mn){const n=e.filter(a=>!a.partial&&typeof a.text=="string");if(!n.length)return{text:"",segmentCount:0};const i=n.reduce((a,s)=>Math.max(a,s.endedAt??0),0)-t;return{text:n.filter(a=>(a.endedAt??0)>=i).map(a=>On(a.text).trim()).filter(Boolean).join(" ").replace(/\s+/g," ").trim(),segmentCount:n.length}}const Dn=60;function Ka(e,t,n=Dn){const r=new Set(e),i=[...e];for(const o of t)!o||r.has(o)||(r.add(o),i.push(o));return i.slice(-n)}function Ba(e){const{segments:t,now:n,state:r}=e;if(r.lastTriggerAt&&n-r.lastTriggerAt<wn)return{trigger:!1,reason:"too_soon"};const i=vn(t,e.windowMs);if(!i.text)return{trigger:!1,reason:"no_speech"};const o=i.segmentCount-(r.lastSegmentCount??0);if(r.lastQueryTerms&&o<Rn)return{trigger:!1,reason:"too_few_new"};const a=Nn(i.text);return a.length?r.lastQueryTerms?.length&&kn(a,r.lastQueryTerms)<Cn?{trigger:!1,reason:"same_topic"}:{trigger:!0,text:i.text,terms:a,segmentCount:i.segmentCount}:{trigger:!1,reason:"no_speech"}}const Fa=["personal","workspace","connections","work","ai"],Ga="navNotice",F={NL:{callingCode:"31",trunkPrefix:"0",nsnMin:7,nsnMax:9},BE:{callingCode:"32",trunkPrefix:"0",nsnMin:8,nsnMax:9},LU:{callingCode:"352",nsnMin:6,nsnMax:9},DE:{callingCode:"49",trunkPrefix:"0",nsnMin:6,nsnMax:13},FR:{callingCode:"33",trunkPrefix:"0",nsnMin:9,nsnMax:9},GB:{callingCode:"44",trunkPrefix:"0",nsnMin:9,nsnMax:10},IE:{callingCode:"353",trunkPrefix:"0",nsnMin:7,nsnMax:9},ES:{callingCode:"34",nsnMin:9,nsnMax:9},PT:{callingCode:"351",nsnMin:9,nsnMax:9},IT:{callingCode:"39",nsnMin:6,nsnMax:11},AT:{callingCode:"43",trunkPrefix:"0",nsnMin:7,nsnMax:13},CH:{callingCode:"41",trunkPrefix:"0",nsnMin:9,nsnMax:9},DK:{callingCode:"45",nsnMin:8,nsnMax:8},SE:{callingCode:"46",trunkPrefix:"0",nsnMin:7,nsnMax:13},NO:{callingCode:"47",nsnMin:8,nsnMax:8},FI:{callingCode:"358",trunkPrefix:"0",nsnMin:5,nsnMax:12},PL:{callingCode:"48",nsnMin:9,nsnMax:9},US:{callingCode:"1",nsnMin:10,nsnMax:10},CA:{callingCode:"1",nsnMin:10,nsnMax:10}},xn="NL",Ha=15,Wa=8,Va=Array.from(new Set(Object.values(F).map(e=>e.callingCode))).sort((e,t)=>t.length-e.length);function xe(e){if(e)return F[e.trim().toUpperCase()]}function L(e,t){return e.length>=t.nsnMin&&e.length<=t.nsnMax}function Le(e){if(e.length>Ha)return null;for(const t of Va){if(!e.startsWith(t))continue;const n=e.slice(t.length);for(const r of Object.values(F)){if(r.callingCode!==t)continue;const i=r.trunkPrefix,o=i&&n.startsWith(i)?n.slice(i.length):n;if(L(o,r))return`+${t}${o}`}return null}return e.length<Wa?null:`+${e}`}function ja(e){let t=e.trim();const n=t.match(/^(sips?|tel|whatsapp):/i);n&&(t=t.slice(n[0].length));const r=t.indexOf("@");return r>=0&&(t=t.slice(0,r)),t.trim()}function Ya(e){if(!e)return!1;const t=e.indexOf("@");if(t<=0)return!1;const n=e.slice(0,t).trim();return!/^[+\d\s().-]+$/.test(n)}function ie(e,t){if(!e)return null;const n=ja(e);if(!n)return null;const r=n.startsWith("+"),i=n.replace(/\D/g,"");if(!i)return null;if(r)return Le(i);if(i.startsWith("00"))return Le(i.slice(2));const o=xe(t)??xe(xn);if(!o)return null;const a=o.trunkPrefix;if(a&&i.startsWith(a)){const s=i.slice(a.length);return L(s,o)?`+${o.callingCode}${s}`:null}if(i.startsWith(o.callingCode)){const s=i.slice(o.callingCode.length);if(L(s,o))return`+${o.callingCode}${s}`}return!a&&L(i,o)?`+${o.callingCode}${i}`:null}function Xa(e,t=9){const n=(e??"").replace(/\D/g,"");return n.length<t?null:n.slice(-t)}function ye(e){if(!e)return null;const t=e.trim().toLowerCase(),n=t.lastIndexOf("@");if(n<=0||n===t.length-1)return null;const r=t.slice(0,n).split("+")[0],i=t.slice(n+1);return!r||!i.includes(".")?null:`${r}@${i}`}function za(e){const t=ye(e);return t?t.slice(t.lastIndexOf("@")+1):null}const qa=new Set(["co.uk","org.uk","gov.uk","ac.uk","com.au","co.nz","com.br","co.za"]);function Ln(e){if(!e)return null;const t=e.trim().toLowerCase().replace(/\.$/,"").split(".").filter(Boolean);if(t.length<2)return null;const n=t.slice(-2).join(".");return qa.has(n)&&t.length>=3?t.slice(-3).join("."):n}const Pn=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","hotmail.nl","hotmail.be","hotmail.co.uk","live.com","live.nl","live.be","msn.com","yahoo.com","yahoo.co.uk","ymail.com","icloud.com","me.com","mac.com","aol.com","gmx.net","gmx.de","web.de","protonmail.com","proton.me","pm.me","tutanota.com","zoho.com","mail.com","ziggo.nl","kpnmail.nl","planet.nl","home.nl","casema.nl","chello.nl","xs4all.nl","telfort.nl","hetnet.nl","zonnet.nl","upcmail.nl","quicknet.nl","telenet.be","skynet.be","proximus.be","scarlet.be"]);function Ja(e){const t=Ln(e);return t?Pn.has(t):!1}function Za(e){if(!e)return!1;const t=e.trim().toLowerCase();return t==="tel"||t==="sms"||t==="whatsapp"||t==="fax"}function Qa(e,t,n){if(!e||!t)return null;const r=e.trim().toLowerCase();if(r==="tel"||r==="sms"||r==="whatsapp"){const o=ie(t,n);return o?`tel:${o}`:null}if(r==="fax"){const o=ie(t,n);return o?`fax:${o}`:null}if(r==="mailto"||r==="email"){const o=ye(t);return o?`mailto:${o}`:null}const i=t.trim().toLowerCase();return i?`${r}:${i}`:null}const es=[/<blockquote/i,/class="?gmail_quote/i,/id="?[^"]*divRplyFwdMsg/i,/id="?[^"]*mail-editor-reference-message-container/i,/-{3,}\s*Original Message\s*-{3,}/i,/\n_{5,}\s*\n/,/\bOn\b[\s\S]{0,200}?\bwrote:/i],Pe=/^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i,ts=/^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;function ns(e){const t=e.split(`
10
+ `);for(let n=0;n<t.length;n++)if(ts.test(t[n])||Pe.test(t[n])&&t.slice(n+1,n+4).some(r=>Pe.test(r)))return t.slice(0,n).join(`
11
+ `).trim();return e}const rs=/^(?:https?:|mailto:|tel:)/i,is=/^(?:https?:|cid:|data:image\/)/i;function j(e,t){const n=e.match(new RegExp(`\\b${t}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s">]+))`,"i"));return(n?.[1]??n?.[2]??n?.[3]??"").trim()}const os=/(!\[[^\]]*\]\([^)]*\))/;function Ue(e){return e.replace(/\s+/g," ").trim().split(os).map((t,n)=>n%2===1?t:t.replace(/[[\]]/g,"\\$&")).join("")}function Y(e){return e.replace(/[()\s<>"]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)}function as(e){return e.replace(/<img\b([^>]*?)\/?>/gi,(n,r)=>{const i=j(r,"src");return is.test(i)?`![${Ue(j(r,"alt"))}](${Y(i)})`:""}).replace(/<a\b([^>]*)>([\s\S]*?)<\/a\s*>/gi,(n,r,i)=>{const o=Ue(i.replace(/<[^>]*>/g,"")),a=j(r,"href");return rs.test(a)?`[${o||Y(a)}](${Y(a)})`:o})}const ss=/<table\b[^>]*>((?:(?!<table\b)[\s\S])*?)<\/table\s*>/i,cs=/<tr\b[^>]*>([\s\S]*?)<\/tr\s*>/gi,ls=/<(t[dh])\b([^>]*)>([\s\S]*?)<\/\1\s*>/gi;function us(e,t){return/<table\b/i.test(e)||e.includes(`
12
12
 
13
- |`)||t.includes("![")||t.length>200}const ns=40,rs={left:"---",center:":---:",right:"---:"};function is(e){const t=e.match(/align\s*[=:]\s*["']?\s*(right|center)/i);return t?t[1].toLowerCase():"left"}function os(e){return e.replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim().replace(/\|/g,"\\|")}function as(e){const t=[];for(const a of e.matchAll(Qa)){const s=[];for(const d of a[1].matchAll(es)){const f=os(d[3]);if(ts(d[3],f))return null;s.push({text:f,align:is(d[2])})}if(s.length===0)return null;s.some(d=>d.text!=="")&&t.push(s)}const n=t[0]?.length??0;if(t.length<2||n<2||t.some(a=>a.length!==n))return null;const r=a=>`| ${a.map(s=>s.text).join(" | ")} |`,i=t[1].map(a=>rs[a.align]).join(" | "),o=t.slice(1).map(r).join(`
13
+ |`)||t.includes("![")||t.length>200}const ds=40,ps={left:"---",center:":---:",right:"---:"};function fs(e){const t=e.match(/align\s*[=:]\s*["']?\s*(right|center)/i);return t?t[1].toLowerCase():"left"}function ms(e){return e.replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim().replace(/\|/g,"\\|")}function gs(e){const t=[];for(const a of e.matchAll(cs)){const s=[];for(const d of a[1].matchAll(ls)){const m=ms(d[3]);if(us(d[3],m))return null;s.push({text:m,align:fs(d[2])})}if(s.length===0)return null;s.some(d=>d.text!=="")&&t.push(s)}const n=t[0]?.length??0;if(t.length<2||n<2||t.some(a=>a.length!==n))return null;const r=a=>`| ${a.map(s=>s.text).join(" | ")} |`,i=t[1].map(a=>ps[a.align]).join(" | "),o=t.slice(1).map(r).join(`
14
14
  `);return`
15
15
 
16
16
  ${r(t[0])}
17
17
  | ${i} |
18
18
  ${o}
19
19
 
20
- `}function ss(e){return e.replace(/<\/(t[dh])\s*>/gi," ").replace(/<\/tr\s*>/gi,`
21
- `).replace(/<(?:tbody|thead|tfoot|caption|colgroup|col|tr|t[dh])\b[^>]*>/gi,"").replace(/<\/(?:tbody|thead|tfoot|caption|colgroup)\s*>/gi,"")}function cs(e){let t=e;for(let n=0;n<ns;n++){const r=Za.exec(t);if(!r||r.index===void 0)break;const o=as(r[1])??`
20
+ `}function hs(e){return e.replace(/<\/(t[dh])\s*>/gi," ").replace(/<\/tr\s*>/gi,`
21
+ `).replace(/<(?:tbody|thead|tfoot|caption|colgroup|col|tr|t[dh])\b[^>]*>/gi,"").replace(/<\/(?:tbody|thead|tfoot|caption|colgroup)\s*>/gi,"")}function Es(e){let t=e;for(let n=0;n<ds;n++){const r=ss.exec(t);if(!r||r.index===void 0)break;const o=gs(r[1])??`
22
22
 
23
- ${ss(r[1])}
23
+ ${hs(r[1])}
24
24
 
25
- `;t=t.slice(0,r.index)+o+t.slice(r.index+r[0].length)}return t}function Ue(e,t){let n=e;return n=n.replace(/<(script|style)[\s\S]*?<\/\1>/gi,""),n=n.replace(/<!--[\s\S]*?-->/g,""),n=n.replace(/<br\s*\/?>/gi,`
26
- `),t&&(n=cs(Ja(n))),n=n.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi,`
25
+ `;t=t.slice(0,r.index)+o+t.slice(r.index+r[0].length)}return t}function $e(e,t){let n=e;return n=n.replace(/<(script|style)[\s\S]*?<\/\1>/gi,""),n=n.replace(/<!--[\s\S]*?-->/g,""),n=n.replace(/<br\s*\/?>/gi,`
26
+ `),t&&(n=Es(as(n))),n=n.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi,`
27
27
 
28
28
  `),n=n.replace(/<\/(div|li|tr)>/gi,`
29
- `),n=n.replace(/<\/(td|th)>/gi," "),n=n.replace(/<[^>]+>/g,""),n=n.replace(/<[^>]*$/,""),n}function $e(e){return!Number.isInteger(e)||e<0||e>1114111?null:String.fromCodePoint(e)}const ls={euro:"€",pound:"£",yen:"¥",cent:"¢",copy:"©",reg:"®",trade:"™",deg:"°",plusmn:"±",times:"×",middot:"·",bull:"•",hellip:"…",mdash:"—",ndash:"–",lsquo:"‘",rsquo:"’",ldquo:"“",rdquo:"”",apos:"'"};function Ke(e){return e.replace(/&nbsp;/gi," ").replace(/&([a-z]+);/gi,(t,n)=>ls[n.toLowerCase()]??t).replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&#(\d+);/g,(t,n)=>$e(Number(n))??t).replace(/&#x([0-9a-f]+);/gi,(t,n)=>$e(parseInt(n,16))??t).replace(/&amp;/gi,"&")}function Be(e){return e.replace(/\r/g,"").replace(/[ \t]+/g," ").replace(/ *\n */g,`
29
+ `),n=n.replace(/<\/(td|th)>/gi," "),n=n.replace(/<[^>]+>/g,""),n=n.replace(/<[^>]*$/,""),n}function Ke(e){return!Number.isInteger(e)||e<0||e>1114111?null:String.fromCodePoint(e)}const As={euro:"€",pound:"£",yen:"¥",cent:"¢",copy:"©",reg:"®",trade:"™",deg:"°",plusmn:"±",times:"×",middot:"·",bull:"•",hellip:"…",mdash:"—",ndash:"–",lsquo:"‘",rsquo:"’",ldquo:"“",rdquo:"”",apos:"'"};function Be(e){return e.replace(/&nbsp;/gi," ").replace(/&([a-z]+);/gi,(t,n)=>As[n.toLowerCase()]??t).replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&#(\d+);/g,(t,n)=>Ke(Number(n))??t).replace(/&#x([0-9a-f]+);/gi,(t,n)=>Ke(parseInt(n,16))??t).replace(/&amp;/gi,"&")}function Fe(e){return e.replace(/\r/g,"").replace(/[ \t]+/g," ").replace(/ *\n */g,`
30
30
  `).replace(/\n{3,}/g,`
31
31
 
32
- `).trim()}const xn=/<\s*(html|body|div|p|table|br|span)\b/i;function us(e){return xn.test(e)}function ds(e){return Pn(e,!1)}function ps(e){return Pn(e,!0)}function Pn(e,t){if(typeof e!="string"||!e)return"";let n=e.length;for(const a of Va){const s=e.search(a);s>=0&&s<n&&(n=s)}const r=e.slice(0,n);let i=Be(Ke(Ue(r,t)));return i||(i=Be(Ke(Ue(e,t)))),Ya(i)||i}exports.ACTIVE_ASSIGNMENT_STATUSES=Dr;exports.ACTIVITY_CATALOG=S;exports.AI_ATTACHMENT_LIMITS=un;exports.AI_ATTACHMENT_MAX_PER_TURN=Ao;exports.AI_ATTACHMENT_TURN_BUDGET=Eo;exports.AI_VENDORS=ae;exports.ALLOWED_LINK_SCHEMES=tt;exports.APP_PERMISSIONS=oa;exports.ARTIFACT_MAX_BLOCKS=q;exports.ARTIFACT_MAX_BODY_BYTES=Ar;exports.ARTIFACT_MAX_CELL_LEN=v;exports.ARTIFACT_MAX_KPI_ITEMS=ee;exports.ARTIFACT_MAX_LIST_ITEMS=J;exports.ARTIFACT_MAX_TABLE_COLUMNS=Q;exports.ARTIFACT_MAX_TABLE_ROWS=Z;exports.ARTIFACT_MAX_TEXT_LEN=se;exports.ASSIGNMENT_SCOPE_KIND=ot;exports.ASSIST_BANDS=bo;exports.ASSIST_SOURCE_PROVIDER_GROUP=To;exports.ATTENTION_STATUSES=ht;exports.AUTH_APP_NAME=Ee;exports.AUTO_READY_MIN_PROPOSALS=Wt;exports.AUTO_READY_RATE=Vt;exports.ActivityTypeRegistry=je;exports.BUILT_IN_ONLY=tr;exports.BULK_PENALTY=Et;exports.CADENCE_FLOOR_MS=Mn;exports.CADENCE_MIN_NEW_SEGMENTS=On;exports.CADENCE_MIN_NOVELTY=Rn;exports.CADENCE_WINDOW_MS=In;exports.CLASSIFY_VARS=vi;exports.CONTEXT_COLLECT_SERVICE=Wo;exports.CORE_DIMENSIONS=fr;exports.CommunicationScheme=gn;exports.DAY_MS=lt;exports.DEFAULT_MEMORY_BUDGET=Ai;exports.DEFAULT_PHONE_REGION=vn;exports.DOCUMENT_APPLY_SERVICE=Qo;exports.DOCUMENT_DESCRIBE_SERVICE=Jo;exports.DOCUMENT_INSPECT_SERVICE=Zo;exports.DOCUMENT_OPERATIONS=ge;exports.EMPTY_WORKFLOW=Li;exports.FEATURE_FOLDER_MANAGEMENT=Fo;exports.FEATURE_REMOTE_SEARCH=Go;exports.FOLLOW_UP_HOURS=St;exports.HOUR_MS=ct;exports.HTML_BODY_RE=xn;exports.INELIGIBLE=y;exports.INSTALLATION_HEADER=ta;exports.INTERACTION_KIND=Kt;exports.InteractionParticipantRole=Ko;exports.KB_FALLBACK_LOCALE=Nt;exports.KB_LOCALES=te;exports.LOOSE_STATUSES=B;exports.MAIL_HINT_HEADERS=mt;exports.MAX_ACTIONS=k;exports.MAX_ASSIGNMENT_TURNS=at;exports.MAX_BLOCKS=X;exports.MAX_COLLECTION_DEPTH=ue;exports.MAX_EDITABLE_FILE_BYTES=Ta;exports.MAX_FIELDS=w;exports.MAX_LIST_ITEMS=N;exports.MAX_MEMORY_BROWSE=mi;exports.MAX_MEMORY_BUDGET=Ei;exports.MAX_MEMORY_CHARS=gi;exports.MAX_SHOWN_KEYS=kn;exports.MAX_TOPIC_CANDIDATES=Jt;exports.MAX_TOPIC_EXAMPLES=qt;exports.MAX_TOPIC_EXAMPLE_CHARS=D;exports.MAX_VIEWABLE_FILE_BYTES=ba;exports.MIN_MEMORY_BUDGET=hi;exports.NAV_NOTICE_SLOT=Da;exports.NOTIFICATION_SOURCE_PROVIDER_GROUP=ra;exports.ONBOARDING_SOURCE_PROVIDER_GROUP=yi;exports.PHONE_REGIONS=F;exports.PRESENCE_ONLINE_WINDOW_MS=he;exports.PRESENCE_SURVIVES_OFFLINE=hn;exports.PROFILE_TOOL_DISPOSITIONS=Ti;exports.PROVIDER_FEATURE_MESSAGE_TEMPLATES=$o;exports.PROVIDER_FEATURE_MESSAGE_WINDOW=Uo;exports.PUBLIC_EMAIL_DOMAINS=Ln;exports.READ_STEP_TYPES=ne;exports.RELATED_SUBJECT_KINDS=vt;exports.RESERVED_STATUS_KEYS=me;exports.RESOURCE_ATTACHED_SERVICE=fa;exports.RESOURCE_DESCRIBE_SERVICE=ua;exports.RESOURCE_RESOLVE_SERVICE=pa;exports.RESOURCE_SEARCH_SERVICE=da;exports.SCOPE_READ_ROUTE=ha;exports.SCOPE_RELATED_ROUTE=ga;exports.SETTINGS_CATEGORIES=va;exports.SIGNATURE_INTENTS=Kr;exports.SLA_HOURS_BY_PRIORITY=At;exports.STEP_MAX_TOKENS_MAX=Gt;exports.STEP_MAX_TOKENS_MIN=Ft;exports.SUMMARY_MIN_LAST_CHARS=ft;exports.SUMMARY_MIN_MESSAGES=pt;exports.SYNC_RUN_MAX_ERRORS=Oa;exports.SYNC_SOURCE_PROVIDER_GROUP=Ia;exports.SYNC_TARGET_PROVIDER_GROUP=Ma;exports.TERMINAL_ASSIGNMENT_STATUSES=it;exports.TERMINAL_RUN_STATUSES=jt;exports.TRIGGER_VARS=ki;exports.UNSUPPORTED=Ho;exports.USAGE_DIMENSIONS=Je;exports.USAGE_DIMENSION_IDS=Ze;exports.WORK_AREAS=_i;exports.WORK_COMMENT_ADDED=Qi;exports.WORK_ITEM_ASSIGNED=eo;exports.WORK_ITEM_SCOPE_KIND=tn;exports.WORK_ITEM_STATUS_CHANGED=to;exports.WORK_PROJECT_SCOPE_KIND=nn;exports.W_PRIORITY=I;exports.acceptExampleCandidate=qi;exports.actingIdentityKey=Lt;exports.activeWorkTypes=Xi;exports.activityIconOf=Gn;exports.activityJoinUrl=Jn;exports.activitySnippet=We;exports.activityTextParams=Ve;exports.activityTimelineText=qn;exports.activityTimestamp=Ye;exports.activityTypeInfo=m;exports.actorKey=Mi;exports.addExampleCandidate=zi;exports.agePresenceEntry=sa;exports.aiAttachmentKind=ln;exports.aiAttachmentRejection=So;exports.aiBudgetLimit=z;exports.aiBudgetPeriodKey=dr;exports.aiBudgetPeriodStart=Xe;exports.aiBudgetState=ur;exports.aiVendorAcceptsAttachment=lr;exports.aiVendorDefaultModel=ar;exports.aiVendorLabel=or;exports.aiVendorNeedsBaseUrl=cr;exports.aiVendorsWith=sr;exports.appNameFromPath=Ae;exports.applyRounding=Hi;exports.applySignature=Br;exports.approvalRate=Ht;exports.artifactBodyBytes=Or;exports.artifactOutline=Rr;exports.artifactToMarkdown=wr;exports.assignmentMismatch=wi;exports.assignmentScopeKey=xr;exports.assignmentSubject=Ur;exports.buildActivityPreview=Qn;exports.buildChannelIntents=ko;exports.buildShareKeys=Nr;exports.buildWindow=Nn;exports.canNestUnder=si;exports.carriesText=jn;exports.categoryLabel=li;exports.categoryOf=an;exports.channelKindForScheme=Po;exports.channelKindOf=Hn;exports.clampStepMaxTokens=Di;exports.classifyMail=zr;exports.cleanMessageMarkdown=ps;exports.cleanMessageText=ds;exports.compareAssistRank=Mo;exports.compareWorkTypes=zt;exports.decideAssignmentState=$r;exports.decideCadence=ka;exports.decideIncomingCall=Co;exports.defaultLocaleOf=kt;exports.defaultStatusKey=uo;exports.defineIntent=Bo;exports.depthOf=Ct;exports.derivePresence=aa;exports.disabledIntentsFromCapabilities=wo;exports.documentKindOf=ea;exports.elapsedSeconds=Gi;exports.emailDomain=Ba;exports.endpointKey=Wa;exports.extractParams=Sn;exports.extractTerms=Cn;exports.filterByEndpoint=Do;exports.filterByIntent=vo;exports.filterByTargetScheme=mn;exports.findAiVendor=M;exports.flattenLocales=na;exports.floorToPeriod=qe;exports.formatActingIdentity=Dt;exports.formatClock=Vi;exports.formatHm=Wi;exports.formatItemKey=io;exports.formatPeriod=ze;exports.freshSources=_o;exports.getActivitySeenUserIds=nr;exports.getContactEndpoints=Fr;exports.getShortTitle=ni;exports.getUrgencyScore=ti;exports.heightOf=de;exports.helpCenterText=ii;exports.humanizeAction=Ni;exports.interactionIdOf=Bt;exports.isAgentUser=Zi;exports.isAssigned=Qr;exports.isAssignmentTerminal=Lr;exports.isAssignmentTrigger=Ut;exports.isAutoReady=Ui;exports.isAwaitingThem=Ot;exports.isChatMessageActivity=ir;exports.isClosed=ei;exports.isConnectedType=Xn;exports.isDeepLink=Ea;exports.isDescendant=wt;exports.isEligible=Gr;exports.isEmailActivity=rr;exports.isHtmlBody=us;exports.isInFlight=Ki;exports.isInteractionUnseen=gt;exports.isLandingPath=Aa;exports.isLikelyBulk=dt;exports.isMessageShape=oe;exports.isMessageType=Wn;exports.isMoreSpecificPattern=_n;exports.isOutwardTool=yo;exports.isParked=_t;exports.isPaused=Yt;exports.isPlaybookAuthoredType=Yn;exports.isPublicEmailDomain=Ga;exports.isPublicPath=_a;exports.isReminderActive=Tt;exports.isReplyableType=Vn;exports.isSlaAtRisk=Jr;exports.isTerminal=$i;exports.isThreadLongEnough=Vr;exports.isTranscriptType=zn;exports.isWorkClosed=po;exports.isWorkTypeVisible=Yi;exports.itemDossierKeys=so;exports.ladderFor=on;exports.linkLabel=ri;exports.listeningAllowed=pr;exports.localeInstruction=ai;exports.localeName=oi;exports.localesOf=ci;exports.looksLikeEmail=$a;exports.matchContactToIntents=Lo;exports.matchPublicRoute=Tn;exports.mcpCredentialScope=pi;exports.mcpToolPrefix=fi;exports.mergeShownKeys=Na;exports.messageCountsAs=He;exports.needsPhoneRegion=Ha;exports.normalizeArtifactBlocks=Mr;exports.normalizeBlocks=Kn;exports.normalizeEmail=Se;exports.normalizeExample=_;exports.notificationPrefKey=ia;exports.novelty=wn;exports.operationDescriptor=qo;exports.operationsForKind=zo;exports.parkMarksById=Hr;exports.parseActingIdentity=bi;exports.parseItemKey=oo;exports.pathToRegex=An;exports.periodsInRange=hr;exports.phoneSuffix=Ka;exports.pickMailHeaders=jr;exports.plainTextFromMarkdown=Fe;exports.playbookActor=Pt;exports.procedureOf=Pi;exports.projectDossierKeys=co;exports.publicBasePathFor=yn;exports.publicRoutePatterns=ya;exports.readPath=P;exports.readStepError=re;exports.recencyOf=yt;exports.refKey=$t;exports.registrableDomain=Dn;exports.rejectExampleCandidate=Qt;exports.relatedByDefault=Si;exports.resolveAccountCapabilities=fn;exports.resolveActivityText=U;exports.resolveChannelIntents=pn;exports.resolveSignature=st;exports.resolveWorkMode=ca;exports.resourceKindOf=ma;exports.runActor=Ii;exports.runInteractionId=Fi;exports.sanitizeInline=rt;exports.sanitizeTranscript=bn;exports.scoreInteraction=Zr;exports.scoreWorkItem=ro;exports.selectLenses=di;exports.sessionsHoldCannotReach=Ro;exports.sessionsToHold=Oo;exports.shareKeyForTeam=le;exports.shareKeyForUser=ce;exports.shareKeysForViewer=kr;exports.shouldRunAudioPipeline=la;exports.slaHoursByInbox=qr;exports.slaHoursFor=Mt;exports.sortStatuses=sn;exports.sourceKey=dn;exports.statusIn=lo;exports.stepsOf=xi;exports.stripHtml=Ge;exports.subjectKeyOf=Bi;exports.subjectOf=pe;exports.subjectRef=Io;exports.suggestProjectKey=ao;exports.targetById=Ci;exports.targetForActivityType=Ri;exports.toActingIdentity=xt;exports.toE164=ie;exports.toolSourceKinds=vr;exports.topicOfferedForTeam=en;exports.topicsForTeam=Ji;exports.truncateExample=Zt;exports.uniqueWorkStatusKey=fo;exports.uniqueWorkTypeKey=ji;exports.usageMetricId=Qe;exports.usageMetrics=Er;exports.validateStatuses=mo;exports.valueAtPath=Oi;exports.waitHoursOf=K;exports.wakesAssignment=Pr;exports.workItemScopeKey=rn;exports.workProjectScopeKey=fe;exports.workStatusKey=cn;exports.workTypeKey=Xt;
32
+ `).trim()}const Un=/<\s*(html|body|div|p|table|br|span)\b/i;function Ss(e){return Un.test(e)}function ys(e){return $n(e,!1)}function _s(e){return $n(e,!0)}function $n(e,t){if(typeof e!="string"||!e)return"";let n=e.length;for(const a of es){const s=e.search(a);s>=0&&s<n&&(n=s)}const r=e.slice(0,n);let i=Fe(Be($e(r,t)));return i||(i=Fe(Be($e(e,t)))),ns(i)||i}exports.ACTIVE_ASSIGNMENT_STATUSES=Pr;exports.ACTIVITY_CATALOG=S;exports.AI_ATTACHMENT_LIMITS=pn;exports.AI_ATTACHMENT_MAX_PER_TURN=Mo;exports.AI_ATTACHMENT_TURN_BUDGET=Oo;exports.AI_VENDORS=se;exports.ALLOWED_LINK_SCHEMES=nt;exports.APP_PERMISSIONS=ma;exports.ARTIFACT_MAX_BLOCKS=q;exports.ARTIFACT_MAX_BODY_BYTES=_r;exports.ARTIFACT_MAX_CELL_LEN=v;exports.ARTIFACT_MAX_KPI_ITEMS=ee;exports.ARTIFACT_MAX_LIST_ITEMS=J;exports.ARTIFACT_MAX_TABLE_COLUMNS=Q;exports.ARTIFACT_MAX_TABLE_ROWS=Z;exports.ARTIFACT_MAX_TEXT_LEN=ce;exports.ASSIGNMENT_SCOPE_KIND=at;exports.ASSIST_BANDS=ko;exports.ASSIST_SOURCE_PROVIDER_GROUP=No;exports.ATTENTION_STATUSES=Et;exports.AUTH_APP_NAME=Ae;exports.AUTO_READY_MIN_PROPOSALS=Vt;exports.AUTO_READY_RATE=jt;exports.ActivityTypeRegistry=Ye;exports.BUILT_IN_ONLY=ir;exports.BULK_PENALTY=At;exports.CADENCE_FLOOR_MS=wn;exports.CADENCE_MIN_NEW_SEGMENTS=Rn;exports.CADENCE_MIN_NOVELTY=Cn;exports.CADENCE_WINDOW_MS=Mn;exports.CLASSIFY_VARS=Pi;exports.CONTEXT_COLLECT_SERVICE=Qo;exports.CORE_DIMENSIONS=hr;exports.CommunicationScheme=En;exports.DAY_MS=ut;exports.DEFAULT_MEMORY_BUDGET=Ti;exports.DEFAULT_PHONE_REGION=xn;exports.DOCUMENT_APPLY_SERVICE=ca;exports.DOCUMENT_DESCRIBE_SERVICE=aa;exports.DOCUMENT_INSPECT_SERVICE=sa;exports.DOCUMENT_OPERATIONS=he;exports.EMPTY_WORKFLOW=$i;exports.FEATURE_FOLDER_MANAGEMENT=zo;exports.FEATURE_MESSAGE_REACTIONS=Jo;exports.FEATURE_REMOTE_SEARCH=qo;exports.FOLLOW_UP_HOURS=yt;exports.HOUR_MS=lt;exports.HTML_BODY_RE=Un;exports.INELIGIBLE=y;exports.INSTALLATION_HEADER=ua;exports.INTERACTION_KIND=Bt;exports.InteractionParticipantRole=Yo;exports.KB_FALLBACK_LOCALE=kt;exports.KB_LOCALES=te;exports.LOOSE_STATUSES=B;exports.MAIL_HINT_HEADERS=gt;exports.MAX_ACTIONS=k;exports.MAX_ASSIGNMENT_TURNS=st;exports.MAX_BLOCKS=X;exports.MAX_COLLECTION_DEPTH=de;exports.MAX_EDITABLE_FILE_BYTES=ka;exports.MAX_FIELDS=C;exports.MAX_LIST_ITEMS=N;exports.MAX_MEMORY_BROWSE=Ai;exports.MAX_MEMORY_BUDGET=_i;exports.MAX_MEMORY_CHARS=Si;exports.MAX_SHOWN_KEYS=Dn;exports.MAX_TOPIC_CANDIDATES=Zt;exports.MAX_TOPIC_EXAMPLES=Jt;exports.MAX_TOPIC_EXAMPLE_CHARS=D;exports.MAX_VIEWABLE_FILE_BYTES=va;exports.MIN_MEMORY_BUDGET=yi;exports.NAV_NOTICE_SLOT=Ga;exports.NOTIFICATION_SOURCE_PROVIDER_GROUP=pa;exports.ONBOARDING_SOURCE_PROVIDER_GROUP=Ii;exports.PHONE_REGIONS=F;exports.PRESENCE_ONLINE_WINDOW_MS=Ee;exports.PRESENCE_SURVIVES_OFFLINE=An;exports.PROFILE_TOOL_DISPOSITIONS=Mi;exports.PROVIDER_FEATURE_MESSAGE_TEMPLATES=jo;exports.PROVIDER_FEATURE_MESSAGE_WINDOW=Vo;exports.PUBLIC_EMAIL_DOMAINS=Pn;exports.READ_STEP_TYPES=ne;exports.RELATED_SUBJECT_KINDS=Dt;exports.RESERVED_STATUS_KEYS=ge;exports.RESOURCE_ATTACHED_SERVICE=Ta;exports.RESOURCE_DESCRIBE_SERVICE=Sa;exports.RESOURCE_RESOLVE_SERVICE=_a;exports.RESOURCE_SEARCH_SERVICE=ya;exports.SCOPE_READ_ROUTE=Oa;exports.SCOPE_RELATED_ROUTE=Ia;exports.SETTINGS_CATEGORIES=Fa;exports.SIGNATURE_INTENTS=Hr;exports.SLA_HOURS_BY_PRIORITY=St;exports.STEP_MAX_TOKENS_MAX=Ht;exports.STEP_MAX_TOKENS_MIN=Gt;exports.SUMMARY_MIN_LAST_CHARS=mt;exports.SUMMARY_MIN_MESSAGES=ft;exports.SYNC_RUN_MAX_ERRORS=La;exports.SYNC_SOURCE_PROVIDER_GROUP=Da;exports.SYNC_TARGET_PROVIDER_GROUP=xa;exports.TERMINAL_ASSIGNMENT_STATUSES=ot;exports.TERMINAL_RUN_STATUSES=Yt;exports.TRIGGER_VARS=Li;exports.UNSUPPORTED=Zo;exports.USAGE_DIMENSIONS=Ze;exports.USAGE_DIMENSION_IDS=Qe;exports.WORK_ACTIVITY_SCOPE_KIND=on;exports.WORK_AREAS=Oi;exports.WORK_COMMENT_ADDED=ao;exports.WORK_ITEM_ASSIGNED=so;exports.WORK_ITEM_SCOPE_KIND=nn;exports.WORK_ITEM_STATUS_CHANGED=co;exports.WORK_PROJECT_SCOPE_KIND=rn;exports.W_PRIORITY=I;exports.acceptExampleCandidate=ro;exports.actingIdentityKey=Lt;exports.activeWorkTypes=to;exports.activityIconOf=Wn;exports.activityJoinUrl=er;exports.activitySnippet=Ve;exports.activityTextParams=je;exports.activityTimelineText=Qn;exports.activityTimestamp=Xe;exports.activityTypeInfo=f;exports.actorKey=Ci;exports.addExampleCandidate=no;exports.agePresenceEntry=ha;exports.aiAttachmentKind=dn;exports.aiAttachmentRejection=wo;exports.aiBudgetLimit=z;exports.aiBudgetPeriodKey=mr;exports.aiBudgetPeriodStart=ze;exports.aiBudgetState=fr;exports.aiVendorAcceptsAttachment=pr;exports.aiVendorDefaultModel=lr;exports.aiVendorLabel=cr;exports.aiVendorNeedsBaseUrl=dr;exports.aiVendorsWith=ur;exports.appNameFromPath=Se;exports.applyRounding=qi;exports.applySignature=Wr;exports.approvalRate=Wt;exports.artifactBodyBytes=Cr;exports.artifactOutline=Nr;exports.artifactToMarkdown=vr;exports.assignmentMismatch=Di;exports.assignmentScopeKey=$r;exports.assignmentSubject=Fr;exports.buildActivityPreview=nr;exports.buildChannelIntents=Ko;exports.buildShareKeys=Dr;exports.buildWindow=vn;exports.canNestUnder=di;exports.carriesText=zn;exports.categoryLabel=fi;exports.categoryOf=cn;exports.channelKindForScheme=Wo;exports.channelKindOf=Vn;exports.clampStepMaxTokens=Ui;exports.classifyMail=Qr;exports.cleanMessageMarkdown=_s;exports.cleanMessageText=ys;exports.compareAssistRank=Do;exports.compareWorkTypes=qt;exports.decideAssignmentState=Gr;exports.decideCadence=Ba;exports.decideIncomingCall=Po;exports.defaultLocaleOf=vt;exports.defaultStatusKey=So;exports.defineIntent=Xo;exports.depthOf=Ct;exports.derivePresence=ga;exports.disabledIntentsFromCapabilities=Uo;exports.documentKindOf=la;exports.elapsedSeconds=zi;exports.emailDomain=za;exports.endpointKey=Qa;exports.extractParams=_n;exports.extractTerms=Nn;exports.filterByEndpoint=Fo;exports.filterByIntent=Bo;exports.filterByTargetScheme=hn;exports.findAiVendor=O;exports.flattenLocales=da;exports.floorToPeriod=Je;exports.formatActingIdentity=xt;exports.formatClock=Zi;exports.formatHm=Ji;exports.formatItemKey=fo;exports.formatPeriod=qe;exports.freshSources=Co;exports.getActivitySeenUserIds=or;exports.getContactEndpoints=Vr;exports.getShortTitle=ai;exports.getUrgencyScore=oi;exports.hasReacted=Xi;exports.heightOf=pe;exports.helpCenterText=ci;exports.humanizeAction=xi;exports.interactionIdOf=Ft;exports.isAgentUser=oo;exports.isAssigned=ri;exports.isAssignmentTerminal=Ur;exports.isAssignmentTrigger=$t;exports.isAutoReady=Fi;exports.isAwaitingThem=wt;exports.isChatMessageActivity=sr;exports.isClosed=ii;exports.isConnectedType=Jn;exports.isDeepLink=Ma;exports.isDescendant=Nt;exports.isEligible=jr;exports.isEmailActivity=ar;exports.isHtmlBody=Ss;exports.isInFlight=Hi;exports.isInteractionUnseen=ht;exports.isLandingPath=wa;exports.isLikelyBulk=pt;exports.isMessageShape=oe;exports.isMessageType=jn;exports.isMoreSpecificPattern=bn;exports.isNoteShape=ae;exports.isOutwardTool=Ro;exports.isParked=Tt;exports.isPaused=Xt;exports.isPlaybookAuthoredType=qn;exports.isPublicEmailDomain=Ja;exports.isPublicPath=Na;exports.isReminderActive=bt;exports.isReplyableType=Xn;exports.isSlaAtRisk=ti;exports.isTerminal=Gi;exports.isThreadLongEnough=zr;exports.isTranscriptType=Zn;exports.isWorkClosed=yo;exports.isWorkTypeVisible=eo;exports.itemDossierKeys=ho;exports.ladderFor=sn;exports.linkLabel=si;exports.listeningAllowed=gr;exports.localeInstruction=ui;exports.localeName=li;exports.localesOf=pi;exports.looksLikeEmail=Ya;exports.matchContactToIntents=Go;exports.matchPublicRoute=In;exports.mcpCredentialScope=hi;exports.mcpToolPrefix=Ei;exports.mergeShownKeys=Ka;exports.messageCountsAs=We;exports.needsPhoneRegion=Za;exports.nestsUnderParent=Yn;exports.normalizeArtifactBlocks=Rr;exports.normalizeBlocks=Fn;exports.normalizeEmail=ye;exports.normalizeExample=_;exports.notificationPrefKey=fa;exports.novelty=kn;exports.operationDescriptor=oa;exports.operationsForKind=ia;exports.parkMarksById=Yr;exports.parseActingIdentity=wi;exports.parseItemKey=mo;exports.pathToRegex=yn;exports.periodsInRange=Sr;exports.phoneSuffix=Xa;exports.pickMailHeaders=qr;exports.plainTextFromMarkdown=Ge;exports.playbookActor=Ut;exports.procedureOf=Bi;exports.projectDossierKeys=Eo;exports.publicBasePathFor=Tn;exports.publicRoutePatterns=Ca;exports.reactionWakesAssignment=Br;exports.readPath=P;exports.readStepError=re;exports.recencyOf=_t;exports.refKey=Kt;exports.registrableDomain=Ln;exports.rejectExampleCandidate=en;exports.relatedByDefault=bi;exports.resolveAccountCapabilities=gn;exports.resolveActivityText=U;exports.resolveChannelIntents=mn;exports.resolveSignature=ct;exports.resolveWorkMode=Ea;exports.resourceKindOf=ba;exports.runActor=Ri;exports.runInteractionId=Vi;exports.sanitizeInline=it;exports.sanitizeTranscript=On;exports.scoreInteraction=ni;exports.scoreWorkItem=uo;exports.selectLenses=gi;exports.sessionsHoldCannotReach=Lo;exports.sessionsToHold=xo;exports.shareKeyForTeam=ue;exports.shareKeyForUser=le;exports.shareKeysForViewer=xr;exports.shouldRunAudioPipeline=Aa;exports.slaHoursByInbox=ei;exports.slaHoursFor=Mt;exports.sortStatuses=ln;exports.sourceKey=fn;exports.statusIn=Ao;exports.stepsOf=Ki;exports.stripHtml=He;exports.subjectKeyOf=Wi;exports.subjectOf=fe;exports.subjectRef=vo;exports.suggestProjectKey=go;exports.summarizeReactions=ji;exports.targetById=vi;exports.targetForActivityType=ki;exports.toActingIdentity=Pt;exports.toE164=ie;exports.toolSourceKinds=Lr;exports.topicOfferedForTeam=tn;exports.topicsForTeam=io;exports.truncateExample=Qt;exports.uniqueWorkStatusKey=_o;exports.uniqueWorkTypeKey=Qi;exports.usageMetricId=et;exports.usageMetrics=yr;exports.validateStatuses=To;exports.valueAtPath=Ni;exports.waitHoursOf=K;exports.wakesAssignment=Kr;exports.workActivityScopeKey=po;exports.workItemScopeKey=an;exports.workProjectScopeKey=me;exports.workStatusKey=un;exports.workTypeKey=zt;
package/dist/index.d.ts CHANGED
@@ -28,6 +28,7 @@ export * from './entities/memory';
28
28
  export * from './entities/onboarding';
29
29
  export * from './entities/organization';
30
30
  export * from './entities/playbook';
31
+ export * from './entities/reaction';
31
32
  export * from './entities/read-state';
32
33
  export * from './entities/resource-reminder';
33
34
  export * from './entities/scope';