@opencxh/domain 1.154.0 → 1.158.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.
Files changed (35) hide show
  1. package/dist/entities/activity/catalog.d.ts +23 -0
  2. package/dist/entities/ai-profile/types.d.ts +19 -6
  3. package/dist/entities/ai-settings/types.d.ts +27 -0
  4. package/dist/entities/ai-settings/types.test.d.ts +1 -0
  5. package/dist/entities/assignment/index.d.ts +1 -0
  6. package/dist/entities/assignment/types.d.ts +142 -0
  7. package/dist/entities/assignment/types.test.d.ts +1 -0
  8. package/dist/entities/live-lens/index.d.ts +1 -0
  9. package/dist/entities/live-lens/types.d.ts +81 -0
  10. package/dist/entities/live-lens/types.test.d.ts +1 -0
  11. package/dist/entities/playbook/actor.d.ts +20 -0
  12. package/dist/entities/playbook/assignment.d.ts +123 -0
  13. package/dist/entities/playbook/assignment.test.d.ts +1 -0
  14. package/dist/entities/playbook/index.d.ts +1 -0
  15. package/dist/entities/playbook/status.test.d.ts +1 -0
  16. package/dist/entities/playbook/trigger-vars.d.ts +34 -3
  17. package/dist/entities/playbook/types.d.ts +412 -33
  18. package/dist/entities/read-state/types.d.ts +1 -5
  19. package/dist/entities/user/types.d.ts +56 -0
  20. package/dist/index.cjs +8 -8
  21. package/dist/index.d.ts +6 -0
  22. package/dist/index.js +1022 -523
  23. package/dist/platform/ai-tools.d.ts +20 -0
  24. package/dist/platform/audio-gate.test.d.ts +1 -0
  25. package/dist/platform/context.d.ts +16 -0
  26. package/dist/platform/presence.d.ts +59 -0
  27. package/dist/platform/resource.d.ts +39 -0
  28. package/dist/platform/sdk.d.ts +6 -0
  29. package/dist/platform/tool-sources.test.d.ts +1 -0
  30. package/dist/platform/transcript-cadence.d.ts +93 -0
  31. package/dist/platform/transcript-cadence.test.d.ts +1 -0
  32. package/dist/platform/transcript-sanitize.d.ts +1 -0
  33. package/dist/platform/transcript-sanitize.test.d.ts +1 -0
  34. package/dist/platform/work-mode.test.d.ts +1 -0
  35. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -1,18 +1,18 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=10,T=10,b=10,S=5,mt=new Set(["header","section","context","divider","image","list","actions","attachments"]);function x(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 gt(e,t=()=>{}){if(!Array.isArray(e))return[];const n=[];for(const i of e){if(n.length>=P){t("more than "+P+" blocks; the rest was dropped");break}if(!i||typeof i!="object")continue;const a=i;if(!mt.has(a.type)){t("unknown block type "+String(a.type));continue}switch(a.type){case"header":if(!x(a.text)){t("a header without text");continue}break;case"context":if(!x(a.text)){t("a context block without text");continue}break;case"image":if(!a.url||!a.alt){t("an image without url or alt");continue}break;case"section":Array.isArray(a.fields)&&a.fields.length>T&&(t("more than "+T+" fields in a section"),a.fields=a.fields.slice(0,T));break;case"list":if(!Array.isArray(a.items)||a.items.length===0){t("a list without items");continue}a.items.length>b&&(t("more than "+b+" list items"),a.items=a.items.slice(0,b));break;case"actions":{const r=Array.isArray(a.elements)?a.elements:[],o=r.filter(s=>s&&s.action_id&&s.invoke&&x(s.text));if(o.length!==r.length&&t("an action without action_id, invoke or text"),o.length===0)continue;o.length>S&&t("more than "+S+" actions"),a.elements=o.slice(0,S);break}}n.push(a)}return n}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 _(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 Z(e){return e?` — ${Math.floor(e/60)}m ${e%60}s`:""}function v(e){return e?.split("@")?.[0]||e||""}function y(e){return e.map(t=>t.name).join(", ")}function ee(e){return e==="meeting"?"Meeting":e==="video"?"Video call":"Audio call"}const m={VOICE_CALL_STARTED:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Gesprek gestart",timeline:e=>e.direction==="inbound"?`Inbound call started — ${v(e.payload.from)}`:`Outbound call started — ${v(e.payload.to)}`},VOICE_CALL_ANSWERED:{shape:"event",channelKind:"voice",icon:"phone",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?` (${_(e.payload.duration)})`:""}`,timeline:e=>`Call ended${Z(e.payload.duration)}`},VOICE_CALL_MISSED:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Gemiste oproep",timeline:e=>`Missed call — ${v(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",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?` (${_(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=>`${y(e.payload.members)} toegevoegd`,timeline:e=>{const t=y(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=>`${y(e.payload.members)} verlaten`,timeline:e=>{const t=y(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=>`${ee(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?` (${_(e.payload.duration)})`:""}`,timeline:e=>`${ee(e.payload.callType)} ended${Z(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",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?` (${_(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}`}};function te(e){const t=e.payload,n=t.bodySnippet?.trim()||he(t.body??"");return t.subject?`${t.subject} — ${n}`:n}function p(e){return m[e]}function ht(e){return p(e)?.icon??"circle"}function Et(e){return p(e)?.channelKind}function At(e){const t=p(e)?.shape;return t==="message"||t==="note"}function _t(e){return p(e)?.replyable===!0}function yt(e){return p(e)?.carriesText===!0}function Tt(e){return p(e)?.countsAs}function bt(e){return p(e)?.playbookAuthored===!0}function Ee(e){const t=p(e.type)?.snippet;return t?t(e):""}function St(e,t){const n=p(e.type)?.timeline;return n?n(e,t):e.type.replace(/_/g," ").toLowerCase()}function It(e){const t=p(e.type)?.joinUrl;return t?t(e):void 0}function N(e,t){let n=e;for(const i of t.split(".")){if(n==null||typeof n!="object")return"";n=n[i]}return n==null?"":typeof n=="string"?n:typeof n=="number"||typeof n=="boolean"?String(n):""}function O(e,t,n){if(e===void 0)return null;if(typeof e=="string")return e||null;if("value"in e)return N(t,e.value)||null;const i={};for(const[r,o]of Object.entries(e.params??{}))i[r]=N(t,o);const a=n(e.key,i);return a===e.key?null:a}function Ae(e,t){if(!e||typeof e=="string"||"value"in e)return null;const n={};for(const[i,a]of Object.entries(e.params??{}))n[i]=N(t,a);return{key:e.key,params:n}}const Mt=e=>e;function ne(e){const t=m[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 ie(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 _e{constructor(t=[],n=Mt){this.translate=n;for(const i of t)i?.type&&(i.type in m||this.declared.has(i.type)||this.declared.set(i.type,i))}declared=new Map;get(t){if(t in m)return ne(t);const n=this.declared.get(t);return n?ie(n):void 0}triggerable(){const t=Object.keys(m).filter(i=>m[i].triggerable).map(ne),n=[...this.declared.values()].map(ie).filter(i=>i.triggerable);return[...t,...n]}timelineText(t,n){const i=m[t.type];if(i?.timeline)return i.timeline(t,n);const a=this.declared.get(t.type);return O(a?.text,t,this.translate)??t.type.replace(/_/g," ").toLowerCase()}snippet(t){const n=m[t.type];if(n?.snippet)return n.snippet(t);const i=this.declared.get(t.type);return O(i?.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}get translator(){return this.translate}}const Ct=new _e,ae=140;function Nt(e){const t=e.trim();return t.length<=ae?t:t.slice(0,ae-1).trimEnd()+"…"}function Ot(e,t){const n=Ae(t?.text,e),i=t?O(t.text,e,a=>a):null;return{activityId:e.id,type:e.type,snippet:Nt(i??Ee(e)),authorName:e.author?.name??"",direction:e.direction,createdAt:e.createdAt??Date.now(),...n?{snippetKey:n.key,snippetParams:n.params}:{}}}function Lt(e,t,n=[]){const i=e.createdAt;if(!i)return[];const a=new Set(n);return e.author.type==="user"&&e.author.id&&a.add(e.author.id),Object.entries(t).filter(([r,o])=>o>=i&&!a.has(r)).map(([r])=>r)}function Rt(e){return e.createdAt??0}const xt=[{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 vt(e){const t=[];for(const n of Object.keys(e))for(const i of Object.keys(e[n]))t.push({lang:n,key:i,value:e[n][i]});return t}function k(e){return e<10?`0${e}`:`${e}`}function ye(e,t){const n=new Date(e),i=`${n.getUTCFullYear()}-${k(n.getUTCMonth()+1)}-${k(n.getUTCDate())}`;return t==="day"?i:`${i}T${k(n.getUTCHours())}`}function Te(e,t){const n=new Date(e);return n.setUTCMinutes(0,0,0),t==="day"&&n.setUTCHours(0),n.getTime()}const kt=36e5,Pt=864e5;function Dt(e,t,n){const i=n==="hour"?kt:Pt,a=[];for(let r=Te(e,n);r<=t;r+=i)a.push(ye(r,n));return a}const be=[{id:"resource",label:"Resource",labelSource:"raw"},{id:"origin",label:"Herkomst",labelSource:"raw"}],Se=be.map(e=>e.id);function Ie(e,t){return`${e}.usage.${t}`}function $t(e,t){return t.map(n=>({id:Ie(e,n.unit),label:n.label,category:"Verbruik",valueType:n.valueType??"count",aggregation:"sum",supportedDimensions:["provider",...Se,...n.extraDimensions??[],"time"]}))}const Me=new Set(["info","success","warning","destructive"]),D=200,$=100,U=200,w=12,K=4,V=4e3,I=500,Ut=256*1024,wt=new Set(["heading","paragraph","list","quote","code","divider","table","kpi","callout"]),Ce=["http:","https:","mailto:","tel:"],Kt=/^[a-z][a-z0-9+.-]*:/i;function Ne(e){const t=e.trim().replace(/^<|>$/g,"");if(!t)return!1;const n=Kt.exec(t)?.[0];return n?Ce.includes(n.toLowerCase()):!t.startsWith("//")}const Bt=/^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;function Ft(e){let t="",n=0;for(;n<e.length;){const i=e[n]==="!"&&e[n+1]==="[";if(e[n]!=="["&&!i){t+=e[n],n+=1;continue}const a=n+(i?2:1),r=re(e,a,"[","]");if(r<0||e[r+1]!=="("){t+=e[n],n+=1;continue}const o=re(e,r+2,"(",")");if(o<0){t+=e[n],n+=1;continue}const s=e.slice(a,r),l=e.slice(r+2,o).trim().split(/\s+/)[0]??"";t+=i||!Ne(l)?s:e.slice(n,o+1),n=o+1}return t}function re(e,t,n,i){let a=1;for(let r=t;r<e.length;r+=1){if(e[r]==="\\"){r+=1;continue}if(e[r]===n)a+=1;else if(e[r]===i&&(a-=1,a===0))return r}return-1}function Oe(e){return Ft(e).replace(Bt,(t,n,i)=>Ne(i)?t:"")}function u(e,t=V){return typeof e=="string"?Oe(e).slice(0,t):""}function Gt(e,t=V){return typeof e=="string"?e.slice(0,t):""}function Vt(e,t="info"){return typeof e=="string"&&Me.has(e)?e:t}function Ht(e,t=()=>{}){if(!Array.isArray(e))return[];const n=[];for(const i of e){if(n.length>=D){t("more than "+D+" blocks; the rest was dropped");break}if(!i||typeof i!="object")continue;const a=i;if(!wt.has(a.type)){t("unknown block type "+String(a.type));continue}const r=typeof a.block_id=="string"?{block_id:a.block_id}:{};switch(a.type){case"heading":{const o=u(a.text);if(!o){t("a heading without text");continue}const s=a.level===2||a.level===3?a.level:1;n.push({...r,type:"heading",level:s,text:o});break}case"paragraph":{const o=u(a.text);if(!o){t("a paragraph without text");continue}n.push({...r,type:"paragraph",text:o});break}case"quote":{const o=u(a.text);if(!o){t("a quote without text");continue}n.push({...r,type:"quote",text:o});break}case"code":{const o=Gt(a.text);if(!o){t("a code block without text");continue}const s=typeof a.lang=="string"?{lang:a.lang.slice(0,32)}:{};n.push({...r,type:"code",...s,text:o});break}case"divider":n.push({...r,type:"divider"});break;case"list":{const o=Array.isArray(a.items)?a.items:[],s=[];for(const d of o){if(s.length>=$){t("more than "+$+" list items");break}const f=u(d?.text);if(!f)continue;const c=u(d?.lead,200);s.push(c?{lead:c,text:f}:{text:f})}if(s.length===0){t("a list without usable items");continue}const l=a.style==="numbered"?"numbered":"bulleted";n.push({...r,type:"list",style:l,items:s});break}case"table":{const o=Array.isArray(a.columns)?a.columns:[],s=[];for(const c of o){if(s.length>=w){t("more than "+w+" table columns");break}const A=u(c?.label,I),R=c?.align==="right"?"right":void 0;s.push(R?{label:A,align:R}:{label:A})}if(s.length===0){t("a table without columns");continue}const l=Array.isArray(a.rows)?a.rows:[],d=[];for(const c of l){if(d.length>=U){t("more than "+U+" table rows");break}const A=Array.isArray(c)?c:[];d.push(s.map((R,ft)=>u(A[ft],I)))}const f=u(a.caption,I);n.push({...r,type:"table",columns:s,rows:d,...f?{caption:f}:{}});break}case"kpi":{const o=Array.isArray(a.items)?a.items:[],s=[];for(const l of o){if(s.length>=K){t("more than "+K+" kpi items");break}const d=u(l?.value,40),f=u(l?.label,80);if(!d||!f)continue;const c=l?.tone;s.push(typeof c=="string"&&Me.has(c)?{value:d,label:f,tone:c}:{value:d,label:f})}if(s.length===0){t("a kpi block without usable items");continue}n.push({...r,type:"kpi",items:s});break}case"callout":{const o=u(a.text);if(!o){t("a callout without text");continue}const s=u(a.title,200);n.push({...r,type:"callout",tone:Vt(a.tone),...s?{title:s}:{},text:o});break}}}return n}function Xt(e){return JSON.stringify(e).length}function jt(e){return{blocks:e.length,types:e.map(t=>t.type),headings:e.flatMap(t=>t.type==="heading"?[t.text]:[])}}function oe(e){return e.replace(/\|/g,"\\|").replace(/\r?\n/g," ").trim()}function se(e,t,n){const i=e.map((a,r)=>n?.[r]==="right"?"---:":"---");return[`| ${e.map(oe).join(" | ")} |`,`| ${i.join(" | ")} |`,...t.map(a=>`| ${a.map(oe).join(" | ")} |`)]}function Wt(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 i=e.style==="numbered"?`${n+1}.`:"-";return t.lead?`${i} **${t.lead}** ${t.text}`:`${i} ${t.text}`});case"table":{const t=se(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 se(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 Yt(e,t){const n=[],i=e.some(a=>a.type==="heading"&&a.level===1);t&&!i&&n.push(`# ${t}`);for(const a of e){const r=Wt(a);r.length>0&&n.push(r.join(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=10,S=10,_=10,b=5,xt=new Set(["header","section","context","divider","image","list","actions","attachments"]);function k(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 Dt(e,t=()=>{}){if(!Array.isArray(e))return[];const n=[];for(const i of e){if(n.length>=x){t("more than "+x+" blocks; the rest was dropped");break}if(!i||typeof i!="object")continue;const r=i;if(!xt.has(r.type)){t("unknown block type "+String(r.type));continue}switch(r.type){case"header":if(!k(r.text)){t("a header without text");continue}break;case"context":if(!k(r.text)){t("a context block without text");continue}break;case"image":if(!r.url||!r.alt){t("an image without url or alt");continue}break;case"section":Array.isArray(r.fields)&&r.fields.length>S&&(t("more than "+S+" fields in a section"),r.fields=r.fields.slice(0,S));break;case"list":if(!Array.isArray(r.items)||r.items.length===0){t("a list without items");continue}r.items.length>_&&(t("more than "+_+" list items"),r.items=r.items.slice(0,_));break;case"actions":{const a=Array.isArray(r.elements)?r.elements:[],o=a.filter(s=>s&&s.action_id&&s.invoke&&k(s.text));if(o.length!==a.length&&t("an action without action_id, invoke or text"),o.length===0)continue;o.length>b&&t("more than "+b+" actions"),r.elements=o.slice(0,b);break}}n.push(r)}return n}function ye(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 y(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 ne(e){return e?` — ${Math.floor(e/60)}m ${e%60}s`:""}function w(e){return e?.split("@")?.[0]||e||""}function T(e){return e.map(t=>t.name).join(", ")}function ie(e){return e==="meeting"?"Meeting":e==="video"?"Video call":"Audio call"}const m={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?` (${y(e.payload.duration)})`:""}`,timeline:e=>`Call ended${ne(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?` (${y(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:re},EMAIL_SENT:{shape:"message",component:"communication:EmailActivity",channelKind:"mail",icon:"mail",replyable:!0,carriesText:!0,countsAs:"outbound_message",snippet:re},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=>`${T(e.payload.members)} toegevoegd`,timeline:e=>{const t=T(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=>`${T(e.payload.members)} verlaten`,timeline:e=>{const t=T(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=>`${ie(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?` (${y(e.payload.duration)})`:""}`,timeline:e=>`${ie(e.payload.callType)} ended${ne(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?` (${y(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}`}};function re(e){const t=e.payload,n=t.bodySnippet?.trim()||ye(t.body??"");return t.subject?`${t.subject} — ${n}`:n}function l(e){return m[e]}function Pt(e){return l(e)?.icon??"circle"}function $t(e){return l(e)?.channelKind}function Ut(e){const t=l(e)?.shape;return t==="message"||t==="note"}function Kt(e){return l(e)?.replyable===!0}function Bt(e){return l(e)?.carriesText===!0}function Ft(e){return l(e)?.countsAs}function Gt(e){return l(e)?.playbookAuthored===!0}function jt(e){return l(e)?.connected===!0}function Vt(e){const t=l(e);return t?.shape==="artifact"&&t?.carriesText===!0}function Te(e){const t=l(e.type)?.snippet;return t?t(e):""}function Ht(e,t){const n=l(e.type)?.timeline;return n?n(e,t):e.type.replace(/_/g," ").toLowerCase()}function Wt(e){const t=l(e.type)?.joinUrl;return t?t(e):void 0}function C(e,t){let n=e;for(const i of t.split(".")){if(n==null||typeof n!="object")return"";n=n[i]}return n==null?"":typeof n=="string"?n:typeof n=="number"||typeof n=="boolean"?String(n):""}function O(e,t,n){if(e===void 0)return null;if(typeof e=="string")return e||null;if("value"in e)return C(t,e.value)||null;const i={};for(const[a,o]of Object.entries(e.params??{}))i[a]=C(t,o);const r=n(e.key,i);return r===e.key?null:r}function Se(e,t){if(!e||typeof e=="string"||"value"in e)return null;const n={};for(const[i,r]of Object.entries(e.params??{}))n[i]=C(t,r);return{key:e.key,params:n}}const Xt=e=>e;function ae(e){const t=m[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 oe(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 _e{constructor(t=[],n=Xt){this.translate=n;for(const i of t)i?.type&&(i.type in m||this.declared.has(i.type)||this.declared.set(i.type,i))}declared=new Map;get(t){if(t in m)return ae(t);const n=this.declared.get(t);return n?oe(n):void 0}triggerable(){const t=Object.keys(m).filter(i=>m[i].triggerable).map(ae),n=[...this.declared.values()].map(oe).filter(i=>i.triggerable);return[...t,...n]}timelineText(t,n){const i=m[t.type];if(i?.timeline)return i.timeline(t,n);const r=this.declared.get(t.type);return O(r?.text,t,this.translate)??t.type.replace(/_/g," ").toLowerCase()}snippet(t){const n=m[t.type];if(n?.snippet)return n.snippet(t);const i=this.declared.get(t.type);return O(i?.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}get translator(){return this.translate}}const zt=new _e,se=140;function Yt(e){const t=e.trim();return t.length<=se?t:t.slice(0,se-1).trimEnd()+"…"}function qt(e,t){const n=Se(t?.text,e),i=t?O(t.text,e,r=>r):null;return{activityId:e.id,type:e.type,snippet:Yt(i??Te(e)),authorName:e.author?.name??"",direction:e.direction,createdAt:e.createdAt??Date.now(),...n?{snippetKey:n.key,snippetParams:n.params}:{}}}function Jt(e,t,n=[]){const i=e.createdAt;if(!i)return[];const r=new Set(n);return e.author.type==="user"&&e.author.id&&r.add(e.author.id),Object.entries(t).filter(([a,o])=>o>=i&&!r.has(a)).map(([a])=>a)}function Qt(e){return e.createdAt??0}const Zt=[{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 en(e){const t=[];for(const n of Object.keys(e))for(const i of Object.keys(e[n]))t.push({lang:n,key:i,value:e[n][i]});return t}function R(e){return e<10?`0${e}`:`${e}`}function be(e,t){const n=new Date(e),i=`${n.getUTCFullYear()}-${R(n.getUTCMonth()+1)}-${R(n.getUTCDate())}`;return t==="day"?i:`${i}T${R(n.getUTCHours())}`}function Ie(e,t){const n=new Date(e);return n.setUTCMinutes(0,0,0),t==="day"&&n.setUTCHours(0),n.getTime()}const tn=36e5,nn=864e5;function rn(e,t,n){const i=n==="hour"?tn:nn,r=[];for(let a=Ie(e,n);a<=t;a+=i)r.push(be(a,n));return r}const Me=[{id:"resource",label:"Resource",labelSource:"raw"},{id:"origin",label:"Herkomst",labelSource:"raw"}],Ne=Me.map(e=>e.id);function Ce(e,t){return`${e}.usage.${t}`}function an(e,t){return t.map(n=>({id:Ce(e,n.unit),label:n.label,category:"Verbruik",valueType:n.valueType??"count",aggregation:"sum",supportedDimensions:["provider",...Ne,...n.extraDimensions??[],"time"]}))}const Oe=new Set(["info","success","warning","destructive"]),D=200,P=100,$=200,U=12,K=4,H=4e3,I=500,on=256*1024,sn=new Set(["heading","paragraph","list","quote","code","divider","table","kpi","callout"]),ve=["http:","https:","mailto:","tel:"],ln=/^[a-z][a-z0-9+.-]*:/i;function Le(e){const t=e.trim().replace(/^<|>$/g,"");if(!t)return!1;const n=ln.exec(t)?.[0];return n?ve.includes(n.toLowerCase()):!t.startsWith("//")}const cn=/^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;function un(e){let t="",n=0;for(;n<e.length;){const i=e[n]==="!"&&e[n+1]==="[";if(e[n]!=="["&&!i){t+=e[n],n+=1;continue}const r=n+(i?2:1),a=le(e,r,"[","]");if(a<0||e[a+1]!=="("){t+=e[n],n+=1;continue}const o=le(e,a+2,"(",")");if(o<0){t+=e[n],n+=1;continue}const s=e.slice(r,a),c=e.slice(a+2,o).trim().split(/\s+/)[0]??"";t+=i||!Le(c)?s:e.slice(n,o+1),n=o+1}return t}function le(e,t,n,i){let r=1;for(let a=t;a<e.length;a+=1){if(e[a]==="\\"){a+=1;continue}if(e[a]===n)r+=1;else if(e[a]===i&&(r-=1,r===0))return a}return-1}function ke(e){return un(e).replace(cn,(t,n,i)=>Le(i)?t:"")}function d(e,t=H){return typeof e=="string"?ke(e).slice(0,t):""}function dn(e,t=H){return typeof e=="string"?e.slice(0,t):""}function pn(e,t="info"){return typeof e=="string"&&Oe.has(e)?e:t}function fn(e,t=()=>{}){if(!Array.isArray(e))return[];const n=[];for(const i of e){if(n.length>=D){t("more than "+D+" blocks; the rest was dropped");break}if(!i||typeof i!="object")continue;const r=i;if(!sn.has(r.type)){t("unknown block type "+String(r.type));continue}const a=typeof r.block_id=="string"?{block_id:r.block_id}:{};switch(r.type){case"heading":{const o=d(r.text);if(!o){t("a heading without text");continue}const s=r.level===2||r.level===3?r.level:1;n.push({...a,type:"heading",level:s,text:o});break}case"paragraph":{const o=d(r.text);if(!o){t("a paragraph without text");continue}n.push({...a,type:"paragraph",text:o});break}case"quote":{const o=d(r.text);if(!o){t("a quote without text");continue}n.push({...a,type:"quote",text:o});break}case"code":{const o=dn(r.text);if(!o){t("a code block without text");continue}const s=typeof r.lang=="string"?{lang:r.lang.slice(0,32)}:{};n.push({...a,type:"code",...s,text:o});break}case"divider":n.push({...a,type:"divider"});break;case"list":{const o=Array.isArray(r.items)?r.items:[],s=[];for(const p of o){if(s.length>=P){t("more than "+P+" list items");break}const f=d(p?.text);if(!f)continue;const u=d(p?.lead,200);s.push(u?{lead:u,text:f}:{text:f})}if(s.length===0){t("a list without usable items");continue}const c=r.style==="numbered"?"numbered":"bulleted";n.push({...a,type:"list",style:c,items:s});break}case"table":{const o=Array.isArray(r.columns)?r.columns:[],s=[];for(const u of o){if(s.length>=U){t("more than "+U+" table columns");break}const E=d(u?.label,I),L=u?.align==="right"?"right":void 0;s.push(L?{label:E,align:L}:{label:E})}if(s.length===0){t("a table without columns");continue}const c=Array.isArray(r.rows)?r.rows:[],p=[];for(const u of c){if(p.length>=$){t("more than "+$+" table rows");break}const E=Array.isArray(u)?u:[];p.push(s.map((L,Rt)=>d(E[Rt],I)))}const f=d(r.caption,I);n.push({...a,type:"table",columns:s,rows:p,...f?{caption:f}:{}});break}case"kpi":{const o=Array.isArray(r.items)?r.items:[],s=[];for(const c of o){if(s.length>=K){t("more than "+K+" kpi items");break}const p=d(c?.value,40),f=d(c?.label,80);if(!p||!f)continue;const u=c?.tone;s.push(typeof u=="string"&&Oe.has(u)?{value:p,label:f,tone:u}:{value:p,label:f})}if(s.length===0){t("a kpi block without usable items");continue}n.push({...a,type:"kpi",items:s});break}case"callout":{const o=d(r.text);if(!o){t("a callout without text");continue}const s=d(r.title,200);n.push({...a,type:"callout",tone:pn(r.tone),...s?{title:s}:{},text:o});break}}}return n}function mn(e){return JSON.stringify(e).length}function gn(e){return{blocks:e.length,types:e.map(t=>t.type),headings:e.flatMap(t=>t.type==="heading"?[t.text]:[])}}function ce(e){return e.replace(/\|/g,"\\|").replace(/\r?\n/g," ").trim()}function ue(e,t,n){const i=e.map((r,a)=>n?.[a]==="right"?"---:":"---");return[`| ${e.map(ce).join(" | ")} |`,`| ${i.join(" | ")} |`,...t.map(r=>`| ${r.map(ce).join(" | ")} |`)]}function hn(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 i=e.style==="numbered"?`${n+1}.`:"-";return t.lead?`${i} **${t.lead}** ${t.text}`:`${i} ${t.text}`});case"table":{const t=ue(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 ue(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 An(e,t){const n=[],i=e.some(r=>r.type==="heading"&&r.level===1);t&&!i&&n.push(`# ${t}`);for(const r of e){const a=hn(r);a.length>0&&n.push(a.join(`
2
2
  `))}return`${n.join(`
3
3
 
4
4
  `)}
5
- `}const H=e=>`user:${e}`,X=e=>`team:${e}`;function zt(e){const t=new Set;for(const n of e??[])n?.id&&(n.kind==="user"&&t.add(H(n.id)),n.kind==="team"&&t.add(X(n.id)));return[...t].sort()}function qt(e,t){return[H(e),...t.map(X)]}function Jt(e){const t=new Set;for(const n of e??[])n?.kind&&t.add(n.kind);return[...t]}function Qt(e){return(e.startsWith("tool:")?e.slice(5):e).replace(/__/g," · ").replace(/\./g," · ").replace(/_/g," ")}const Zt=[{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:"activityId",type:"string"},{name:"authorType",type:"string"},{name:"authorName",type:"string"},{name:"textRaw",type:"string"},{name:"fromStatus",type:"string"},{name:"toStatus",type:"string"},{name:"contactId",type:"string"},{name:"companyId",type:"string"}],en={topics:[{name:"topic",type:"string"},{name:"confidence",type:"number"}],question:[{name:"answer",type:"boolean"},{name:"confidence",type:"number"}],extract:[]};function Le(e){switch(e.kind){case"user":return`user:${e.userId}`;case"team":return`team:${e.teamId}`;case"org":return"org"}}function tn(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 i=t.slice(0,n),a=t.slice(n+1).trim();if(a){if(i==="user")return{kind:"user",userId:a};if(i==="team")return{kind:"team",teamId:a}}}function Re(e){return Le(e)}function nn(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"}}}function an(e){return Re(e)}const xe=64,ve=8e3;function rn(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),xe),ve)}const ke=["done","escalated","failed","timed_out","stopped"],Pe=["awaiting_approval","awaiting_reply"];function De(e){return ke.includes(e)}function on(e){return De(e)}function sn(e){return Pe.includes(e)}function ln(e,t){const n=e.labels??[];return n.find(i=>i.locale===t)?.label??n[0]?.label??e.url}function cn(e,t,n){const i=e.translations??[];return i.find(a=>a.locale===t)??(n?i.find(a=>a.locale===n):void 0)??{locale:t}}const B=[{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 $e(e){const t=(e??"").toLowerCase();return B.find(n=>n.code===t)??B.find(n=>n.code===t.split("-")[0])}function un(e){return $e(e)?.label??e}function pn(e){const t=$e(e);return t?t.english===t.label?`${t.english} (${t.code})`:`${t.english} — ${t.label} (${t.code})`:e}const j=3;function Ue(e,t){const n=new Set;let i=1,a=t.get(e)?.parentId;for(;a;){if(n.has(a)||(n.add(a),i++,i>j+1))return 1/0;a=t.get(a)?.parentId}return i}function dn(e,t,n){if(!e)return!0;if(e===t)return!1;const i=new Map(n.map(o=>[o.id,o]));if(!i.has(e)||t&&we(e,t,i))return!1;const a=Ue(e,i),r=t?W(t,n):1;return a+r<=j}function we(e,t,n){const i=new Set;let a=n.get(e)?.parentId;for(;a;){if(a===t)return!0;if(i.has(a))return!1;i.add(a),a=n.get(a)?.parentId}return!1}function W(e,t,n=new Set){if(n.has(e))return 1;n.add(e);const i=t.filter(a=>a.parentId===e);return i.length?1+Math.max(...i.map(a=>W(a.id,t,n))):1}const Ke="en";function Be(e){return e.defaultLocale||e.locale||Ke}function fn(e){const t=new Set,n=[];for(const i of[Be(e),...e.locales??[]])!i||t.has(i)||(t.add(i),n.push(i));return n}function mn(e,t,n){const i=e.translations??[];return i.find(a=>a.locale===t)?.name??(n?i.find(a=>a.locale===n)?.name:void 0)??e.name}const Fe=20,Ge=20,M=300;function g(e){return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu," ").replace(/\s+/g," ").trim()}function Ve(e){const t=e.replace(/\s+/g," ").trim();if(t.length<=M)return t;const n=t.slice(0,M),i=Math.max(n.lastIndexOf(". "),n.lastIndexOf("! "),n.lastIndexOf("? "));return i>M*.6?n.slice(0,i+1):`${n.trimEnd()}…`}function gn(e,t){const n=Ve(t.text),i=g(n);if(!i||(e.examples??[]).some(o=>g(o)===i))return null;const a=e.exampleCandidates??[],r=a.findIndex(o=>g(o.text)===i);if(r>=0){if(a[r].corrected||!t.corrected)return null;const o=[...a];return o[r]={...o[r],corrected:!0,addedAt:t.addedAt},le(o)}return le([{...t,text:n},...a]).slice(0,Ge)}function le(e){return[...e].sort((t,n)=>Number(n.corrected)-Number(t.corrected)||n.addedAt-t.addedAt)}function hn(e,t){const n=g(t),i=(e.examples??[]).filter(r=>r.trim());return{examples:i.some(r=>g(r)===n)?i:[...i,t].slice(-Fe),exampleCandidates:He(e,t)}}function He(e,t){const n=g(t);return(e.exampleCandidates??[]).filter(i=>g(i.text)!==n)}function Xe(e,t){const n=e.ownerScope;return n?n.kind==="org"?!0:n.kind==="team"?!!t&&n.teamId===t:!1:!1}function En(e,t){return e.filter(n=>Xe(n,t))}const Y=[{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 E(e){return Y.find(t=>t.id===e)}function An(e){return E(e)?.label??e}function _n(e,t="gpt-5-mini"){return E(e)?.defaultModel??t}function yn(e){return Y.filter(t=>t.capabilities.includes(e))}function Tn(e){const t=E(e);return!!t&&!t.baseUrl}function bn(e,t){return t==="text"?!0:E(e)?.attachmentKinds?.includes(t)===!0}function Sn(e,t){if(!e.enabled)return"ok";const n=F(e.hardLimitNanos),i=F(e.softLimitNanos);return n!==void 0&&t>=n?"hard":i!==void 0&&t>=i?"soft":"ok"}function F(e){return typeof e=="number"?e:void 0}function je(e,t="month"){const n=new Date(e);return Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),1)}function In(e,t="month"){const n=new Date(je(e,t));return`${n.getUTCFullYear()}-${String(n.getUTCMonth()+1).padStart(2,"0")}`}const Mn=new Set(["mail","message"]);function We(e,t){const n=e.settings?.signatures?.[t];return!n||!n.enabled||!n.body||n.body.trim()===""?null:n}function Cn(e,t,n,i="html"){if(!e)return n;const a=We(e,t);return a?`${n}${i==="text"?`
5
+ `}const W=e=>`user:${e}`,X=e=>`team:${e}`;function En(e){const t=new Set;for(const n of e??[])n?.id&&(n.kind==="user"&&t.add(W(n.id)),n.kind==="team"&&t.add(X(n.id)));return[...t].sort()}function yn(e,t){return[W(e),...t.map(X)]}function Tn(e){const t=new Set;for(const n of e??[])n?.kind&&t.add(n.kind);return[...t]}const we=["done","escalated"];function Sn(e){return we.includes(e)}const Re="assignment";function _n(e){return`${Re}:${e}`}function bn(e){return e.subjectKind&&e.subjectId?{type:e.subjectKind,id:e.subjectId}:void 0}const xe=12;function In(e,t,n=xe){const i=t+1;return e?e.kind==="done"?{status:"done",waitingOn:null,turns:i,reason:e.note}:e.kind==="escalate"?{status:"escalated",waitingOn:null,turns:i,reason:e.reason}:i>=n?{status:"escalated",waitingOn:null,turns:i,reason:`na ${n} beurten nog niet afgerond, dus een mens neemt het over`}:{status:"waiting",waitingOn:e.on,turns:i}:{status:"escalated",waitingOn:null,turns:i,reason:"de agent rondde zijn beurt af zonder te zeggen wat er moet gebeuren (wachten, afronden of overdragen)"}}const B=["lookup","condition","parallel","for-each"];function F(e){for(const t of e){if(!B.includes(t.type))return`staptype "${t.type}" mag niet meelezen (alleen ${B.join(", ")})`;if(t.type==="parallel")for(const n of t.branches??[]){const i=F(n);if(i)return i}if(t.type==="for-each"){const n=F(t.body??[]);if(n)return n}}return null}function Mn(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 Nn(e,t){return e.filter(n=>n.enabled&&Mn(n.ownerScope,t))}function Cn(e){return(e.startsWith("tool:")?e.slice(5):e).replace(/__/g," · ").replace(/\./g," · ").replace(/_/g," ")}const On=[{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:"activityId",type:"string"},{name:"authorType",type:"string"},{name:"authorName",type:"string"},{name:"textRaw",type:"string"},{name:"fromStatus",type:"string"},{name:"toStatus",type:"string"},{name:"contactId",type:"string"},{name:"companyId",type:"string"},{name:"assigneeUserId",type:"string"}],vn={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 De(e){switch(e.kind){case"user":return`user:${e.userId}`;case"team":return`team:${e.teamId}`;case"org":return"org"}}function Ln(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 i=t.slice(0,n),r=t.slice(n+1).trim();if(r){if(i==="user")return{kind:"user",userId:r};if(i==="team")return{kind:"team",teamId:r}}}function Pe(e){return De(e)}function $e(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"}}}function kn(e){return e.agentId?{kind:"user",userId:e.agentId}:$e(e.ownerScope)}function wn(e){return Pe(e)}function Rn(e,t){if(!t)return;let n=e;for(const i of t.split(".")){if(n===null||typeof n!="object")return;n=n[i]}return n}function xn(e,t){return e.targets.find(n=>n.activityTypes.includes(t))}function Dn(e,t){if(t)return e.targets.find(n=>n.id===t)}function Ue(e){return e?.kind==="assignment"}function Pn(e){const{trigger:t,agentId:n,target:i,activityType:r,assigneeUserId:a,authorUserId:o}=e;return Ue(t)?n?i?i.activityTypes.includes(r)?a?a!==n?"assigned to someone else":o&&o===n?"the agent assigned this to itself, which would restart its own run":null:`no assignee found at ${i.assigneePath}`:`activity type ${r} does not announce an assignment for ${i.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 Ke(e){return`${e.type}:${e.id}`}const Be="interaction";function Fe(e){return e?.type===Be?e.id:void 0}const Ge=64,je=8e3;function $n(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),Ge),je)}const Un={kind:"workflow",steps:[]};function Kn(e){return e?.kind==="workflow"?e.steps:[]}function Bn(e){return e?.kind==="procedure"?e.procedure:void 0}const Ve=["done","escalated","failed","stopped"];function Fn(e){return Ve.includes(e)}function He(e){return e==="waiting"}function Gn(e){return e==="running"||He(e)}function z(e){return e.subjectKind&&e.subjectId?{type:e.subjectKind,id:e.subjectId}:void 0}function jn(e){const t=z(e);return t?Ke(t):void 0}function Vn(e){return Fe(z(e))}function Hn(e,t){const n=e.labels??[];return n.find(i=>i.locale===t)?.label??n[0]?.label??e.url}function Wn(e,t,n){const i=e.translations??[];return i.find(r=>r.locale===t)??(n?i.find(r=>r.locale===n):void 0)??{locale:t}}const G=[{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 We(e){const t=(e??"").toLowerCase();return G.find(n=>n.code===t)??G.find(n=>n.code===t.split("-")[0])}function Xn(e){return We(e)?.label??e}function zn(e){const t=We(e);return t?t.english===t.label?`${t.english} (${t.code})`:`${t.english} — ${t.label} (${t.code})`:e}const Y=3;function Xe(e,t){const n=new Set;let i=1,r=t.get(e)?.parentId;for(;r;){if(n.has(r)||(n.add(r),i++,i>Y+1))return 1/0;r=t.get(r)?.parentId}return i}function Yn(e,t,n){if(!e)return!0;if(e===t)return!1;const i=new Map(n.map(o=>[o.id,o]));if(!i.has(e)||t&&ze(e,t,i))return!1;const r=Xe(e,i),a=t?q(t,n):1;return r+a<=Y}function ze(e,t,n){const i=new Set;let r=n.get(e)?.parentId;for(;r;){if(r===t)return!0;if(i.has(r))return!1;i.add(r),r=n.get(r)?.parentId}return!1}function q(e,t,n=new Set){if(n.has(e))return 1;n.add(e);const i=t.filter(r=>r.parentId===e);return i.length?1+Math.max(...i.map(r=>q(r.id,t,n))):1}const Ye="en";function qe(e){return e.defaultLocale||e.locale||Ye}function qn(e){const t=new Set,n=[];for(const i of[qe(e),...e.locales??[]])!i||t.has(i)||(t.add(i),n.push(i));return n}function Jn(e,t,n){const i=e.translations??[];return i.find(r=>r.locale===t)?.name??(n?i.find(r=>r.locale===n)?.name:void 0)??e.name}const Je=20,Qe=20,M=300;function g(e){return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu," ").replace(/\s+/g," ").trim()}function Ze(e){const t=e.replace(/\s+/g," ").trim();if(t.length<=M)return t;const n=t.slice(0,M),i=Math.max(n.lastIndexOf(". "),n.lastIndexOf("! "),n.lastIndexOf("? "));return i>M*.6?n.slice(0,i+1):`${n.trimEnd()}…`}function Qn(e,t){const n=Ze(t.text),i=g(n);if(!i||(e.examples??[]).some(o=>g(o)===i))return null;const r=e.exampleCandidates??[],a=r.findIndex(o=>g(o.text)===i);if(a>=0){if(r[a].corrected||!t.corrected)return null;const o=[...r];return o[a]={...o[a],corrected:!0,addedAt:t.addedAt},de(o)}return de([{...t,text:n},...r]).slice(0,Qe)}function de(e){return[...e].sort((t,n)=>Number(n.corrected)-Number(t.corrected)||n.addedAt-t.addedAt)}function Zn(e,t){const n=g(t),i=(e.examples??[]).filter(a=>a.trim());return{examples:i.some(a=>g(a)===n)?i:[...i,t].slice(-Je),exampleCandidates:et(e,t)}}function et(e,t){const n=g(t);return(e.exampleCandidates??[]).filter(i=>g(i.text)!==n)}function tt(e,t){const n=e.ownerScope;return n?n.kind==="org"?!0:n.kind==="team"?!!t&&n.teamId===t:!1:!1}function ei(e,t){return e.filter(n=>tt(n,t))}const J=[{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 A(e){return J.find(t=>t.id===e)}function ti(e){return A(e)?.label??e}function ni(e,t="gpt-5-mini"){return A(e)?.defaultModel??t}function ii(e){return J.filter(t=>t.capabilities.includes(e))}function ri(e){const t=A(e);return!!t&&!t.baseUrl}function ai(e,t){return t==="text"?!0:A(e)?.attachmentKinds?.includes(t)===!0}function oi(e,t){if(!e.enabled)return"ok";const n=j(e.hardLimitNanos),i=j(e.softLimitNanos);return n!==void 0&&t>=n?"hard":i!==void 0&&t>=i?"soft":"ok"}function j(e){return typeof e=="number"?e:void 0}function nt(e,t="month"){const n=new Date(e);return Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),1)}function si(e,t="month"){const n=new Date(nt(e,t));return`${n.getUTCFullYear()}-${String(n.getUTCMonth()+1).padStart(2,"0")}`}function li(e){return e?.listeningEnabled!==!1}const ci=new Set(["mail","message"]);function it(e,t){const n=e.settings?.signatures?.[t];return!n||!n.enabled||!n.body||n.body.trim()===""?null:n}function ui(e,t,n,i="html"){if(!e)return n;const r=it(e,t);return r?`${n}${i==="text"?`
6
6
 
7
- `:t==="mail"?"<br><br>-- <br>":"<br><br>"}${a.body}`:n}function Nn(e){return e.endpoints??[]}const On=e=>!!e.assignedUserId||!!e.assignedInboxId,Ln=e=>e.status==="closed",Rn=e=>({urgent:10,high:5,normal:2,low:1})[e.priority]||0,xn=(e,t=30)=>e.title?.length<=t?e.title:`${e.title.substring(0,t)}...`;function vn(e,t){return e.lastActivityAt?!(e.seenBy??[]).includes(t):!1}const kn=1e3,Pn=2e3,Dn=500,$n=12e3,Un=4e3,Ye=["contact","company"];function wn(e){if(!e)return!1;const t=e.slice(0,e.indexOf(":"));return Ye.includes(t)}const L={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}},ze="NL",Kn=15,Bn=8,Fn=Array.from(new Set(Object.values(L).map(e=>e.callingCode))).sort((e,t)=>t.length-e.length);function ce(e){if(e)return L[e.trim().toUpperCase()]}function C(e,t){return e.length>=t.nsnMin&&e.length<=t.nsnMax}function ue(e){if(e.length>Kn)return null;for(const t of Fn){if(!e.startsWith(t))continue;const n=e.slice(t.length);for(const i of Object.values(L)){if(i.callingCode!==t)continue;const a=i.trunkPrefix,r=a&&n.startsWith(a)?n.slice(a.length):n;if(C(r,i))return`+${t}${r}`}return null}return e.length<Bn?null:`+${e}`}function Gn(e){let t=e.trim();const n=t.match(/^(sips?|tel|whatsapp):/i);n&&(t=t.slice(n[0].length));const i=t.indexOf("@");return i>=0&&(t=t.slice(0,i)),t.trim()}function Vn(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 G(e,t){if(!e)return null;const n=Gn(e);if(!n)return null;const i=n.startsWith("+"),a=n.replace(/\D/g,"");if(!a)return null;if(i)return ue(a);if(a.startsWith("00"))return ue(a.slice(2));const r=ce(t)??ce(ze);if(!r)return null;const o=r.trunkPrefix;if(o&&a.startsWith(o)){const s=a.slice(o.length);return C(s,r)?`+${r.callingCode}${s}`:null}if(a.startsWith(r.callingCode)){const s=a.slice(r.callingCode.length);if(C(s,r))return`+${r.callingCode}${s}`}return!o&&C(a,r)?`+${r.callingCode}${a}`:null}function Hn(e,t=9){const n=(e??"").replace(/\D/g,"");return n.length<t?null:n.slice(-t)}function z(e){if(!e)return null;const t=e.trim().toLowerCase(),n=t.lastIndexOf("@");if(n<=0||n===t.length-1)return null;const i=t.slice(0,n).split("+")[0],a=t.slice(n+1);return!i||!a.includes(".")?null:`${i}@${a}`}function Xn(e){const t=z(e);return t?t.slice(t.lastIndexOf("@")+1):null}const jn=new Set(["co.uk","org.uk","gov.uk","ac.uk","com.au","co.nz","com.br","co.za"]);function qe(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 jn.has(n)&&t.length>=3?t.slice(-3).join("."):n}const Je=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 Wn(e){const t=qe(e);return t?Je.has(t):!1}function Yn(e){if(!e)return!1;const t=e.trim().toLowerCase();return t==="tel"||t==="sms"||t==="whatsapp"||t==="fax"}function zn(e,t,n){if(!e||!t)return null;const i=e.trim().toLowerCase();if(i==="tel"||i==="sms"||i==="whatsapp"){const r=G(t,n);return r?`tel:${r}`:null}if(i==="fax"){const r=G(t,n);return r?`fax:${r}`:null}if(i==="mailto"||i==="email"){const r=z(t);return r?`mailto:${r}`:null}const a=t.trim().toLowerCase();return a?`${i}:${a}`:null}const qn=/(\*\*|__)(?=\S)([\s\S]*?\S)\1/g,Jn=/(\*|_)(?=\S)([^*_\n]*?\S)\1/g;function Qn(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(`
7
+ `:t==="mail"?"<br><br>-- <br>":"<br><br>"}${r.body}`:n}function di(e){return e.endpoints??[]}const pi=e=>!!e.assignedUserId||!!e.assignedInboxId,fi=e=>e.status==="closed",mi=e=>({urgent:10,high:5,normal:2,low:1})[e.priority]||0,gi=(e,t=30)=>e.title?.length<=t?e.title:`${e.title.substring(0,t)}...`;function hi(e,t){return e.lastActivityAt?!(e.seenBy??[]).includes(t):!1}const Ai=1e3,Ei=2e3,yi=500,Ti=12e3,Si=4e3,rt=["contact","company"];function _i(e){if(!e)return!1;const t=e.slice(0,e.indexOf(":"));return rt.includes(t)}function bi(e){return e.type==="agent"}const v={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}},at="NL",Ii=15,Mi=8,Ni=Array.from(new Set(Object.values(v).map(e=>e.callingCode))).sort((e,t)=>t.length-e.length);function pe(e){if(e)return v[e.trim().toUpperCase()]}function N(e,t){return e.length>=t.nsnMin&&e.length<=t.nsnMax}function fe(e){if(e.length>Ii)return null;for(const t of Ni){if(!e.startsWith(t))continue;const n=e.slice(t.length);for(const i of Object.values(v)){if(i.callingCode!==t)continue;const r=i.trunkPrefix,a=r&&n.startsWith(r)?n.slice(r.length):n;if(N(a,i))return`+${t}${a}`}return null}return e.length<Mi?null:`+${e}`}function Ci(e){let t=e.trim();const n=t.match(/^(sips?|tel|whatsapp):/i);n&&(t=t.slice(n[0].length));const i=t.indexOf("@");return i>=0&&(t=t.slice(0,i)),t.trim()}function Oi(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 V(e,t){if(!e)return null;const n=Ci(e);if(!n)return null;const i=n.startsWith("+"),r=n.replace(/\D/g,"");if(!r)return null;if(i)return fe(r);if(r.startsWith("00"))return fe(r.slice(2));const a=pe(t)??pe(at);if(!a)return null;const o=a.trunkPrefix;if(o&&r.startsWith(o)){const s=r.slice(o.length);return N(s,a)?`+${a.callingCode}${s}`:null}if(r.startsWith(a.callingCode)){const s=r.slice(a.callingCode.length);if(N(s,a))return`+${a.callingCode}${s}`}return!o&&N(r,a)?`+${a.callingCode}${r}`:null}function vi(e,t=9){const n=(e??"").replace(/\D/g,"");return n.length<t?null:n.slice(-t)}function Q(e){if(!e)return null;const t=e.trim().toLowerCase(),n=t.lastIndexOf("@");if(n<=0||n===t.length-1)return null;const i=t.slice(0,n).split("+")[0],r=t.slice(n+1);return!i||!r.includes(".")?null:`${i}@${r}`}function Li(e){const t=Q(e);return t?t.slice(t.lastIndexOf("@")+1):null}const ki=new Set(["co.uk","org.uk","gov.uk","ac.uk","com.au","co.nz","com.br","co.za"]);function ot(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 ki.has(n)&&t.length>=3?t.slice(-3).join("."):n}const st=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 wi(e){const t=ot(e);return t?st.has(t):!1}function Ri(e){if(!e)return!1;const t=e.trim().toLowerCase();return t==="tel"||t==="sms"||t==="whatsapp"||t==="fax"}function xi(e,t,n){if(!e||!t)return null;const i=e.trim().toLowerCase();if(i==="tel"||i==="sms"||i==="whatsapp"){const a=V(t,n);return a?`tel:${a}`:null}if(i==="fax"){const a=V(t,n);return a?`fax:${a}`:null}if(i==="mailto"||i==="email"){const a=Q(t);return a?`mailto:${a}`:null}const r=t.trim().toLowerCase();return r?`${i}:${r}`:null}const Di=/(\*\*|__)(?=\S)([\s\S]*?\S)\1/g,Pi=/(\*|_)(?=\S)([^*_\n]*?\S)\1/g;function $i(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(`
8
8
  `).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(`
9
- `),t=t.replace(qn,"$2"),t=t.replace(Jn,"$2"),t=t.replace(/~~(?=\S)([\s\S]*?\S)~~/g,"$1"),t=t.replace(/`([^`\n]+)`/g,"$1"),t.replace(/\s+/g," ").trim()}const Zn=[/<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,ei=/^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;function ti(e){const t=e.split(`
10
- `);for(let n=0;n<t.length;n++)if(ei.test(t[n])||pe.test(t[n])&&t.slice(n+1,n+4).some(i=>pe.test(i)))return t.slice(0,n).join(`
11
- `).trim();return e}function de(e){let t=e;return t=t.replace(/<(script|style)[\s\S]*?<\/\1>/gi,""),t=t.replace(/<br\s*\/?>/gi,`
9
+ `),t=t.replace(Di,"$2"),t=t.replace(Pi,"$2"),t=t.replace(/~~(?=\S)([\s\S]*?\S)~~/g,"$1"),t=t.replace(/`([^`\n]+)`/g,"$1"),t.replace(/\s+/g," ").trim()}const Ui=[/<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],me=/^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i,Ki=/^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;function Bi(e){const t=e.split(`
10
+ `);for(let n=0;n<t.length;n++)if(Ki.test(t[n])||me.test(t[n])&&t.slice(n+1,n+4).some(i=>me.test(i)))return t.slice(0,n).join(`
11
+ `).trim();return e}function ge(e){let t=e;return t=t.replace(/<(script|style)[\s\S]*?<\/\1>/gi,""),t=t.replace(/<br\s*\/?>/gi,`
12
12
  `),t=t.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi,`
13
13
 
14
14
  `),t=t.replace(/<\/(div|li|tr)>/gi,`
15
- `),t=t.replace(/<\/(td|th)>/gi," "),t=t.replace(/<[^>]+>/g,""),t=t.replace(/<[^>]*$/,""),t}function fe(e){return!Number.isInteger(e)||e<0||e>1114111?null:String.fromCodePoint(e)}function me(e){return e.replace(/&nbsp;/gi," ").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&#(\d+);/g,(t,n)=>fe(Number(n))??t).replace(/&#x([0-9a-f]+);/gi,(t,n)=>fe(parseInt(n,16))??t).replace(/&amp;/gi,"&")}function ge(e){return e.replace(/\r/g,"").replace(/[ \t]+/g," ").replace(/ *\n */g,`
15
+ `),t=t.replace(/<\/(td|th)>/gi," "),t=t.replace(/<[^>]+>/g,""),t=t.replace(/<[^>]*$/,""),t}function he(e){return!Number.isInteger(e)||e<0||e>1114111?null:String.fromCodePoint(e)}function Ae(e){return e.replace(/&nbsp;/gi," ").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&#(\d+);/g,(t,n)=>he(Number(n))??t).replace(/&#x([0-9a-f]+);/gi,(t,n)=>he(parseInt(n,16))??t).replace(/&amp;/gi,"&")}function Ee(e){return e.replace(/\r/g,"").replace(/[ \t]+/g," ").replace(/ *\n */g,`
16
16
  `).replace(/\n{3,}/g,`
17
17
 
18
- `).trim()}function ni(e){if(typeof e!="string"||!e)return"";let t=e.length;for(const r of Zn){const o=e.search(r);o>=0&&o<t&&(t=o)}const n=e.slice(0,t);let i=ge(me(de(n)));return i||(i=ge(me(de(e)))),ti(i)||i}const ii=/(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i,ai=/\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;function ri(e,t){return!!(e&&ii.test(e)||t&&ai.test(t))}const Qe=3,Ze=600;function oi(e,t){return e>=Qe||t>=Ze}const si=new Set(["image/png","image/jpeg","image/jpg","image/gif","image/webp"]),li=new Set(["text/plain","text/markdown","text/csv","application/json","text/html","application/xml","text/xml"]);function et(e){const t=(e??"").trim().toLowerCase().split(";")[0];return t?si.has(t)?"image":t==="application/pdf"?"pdf":li.has(t)?"text":t.startsWith("audio/")?"audio":"unsupported":"unsupported"}const h=1024*1024,tt={image:5*h,pdf:20*h,text:1*h,audio:20*h},ci=25*h,ui=5;function pi(e,t){const n=et(e);return n==="unsupported"?"unsupported":t>tt[n]?"too-large":null}function nt(e,t){const n=new Set(e.disabledIntents??[]),i=e.intentOverrides??{},a=t.intents.filter(o=>!n.has(o.intent)).map(o=>fi(o,i[o.intent]));if(!e.extraIntents||e.extraIntents.length===0)return a;const r=new Set(a.map(o=>o.intent));for(const o of e.extraIntents)r.has(o.intent)||(a.push(o),r.add(o.intent));return a}function it(e,t){const n={};for(const i of e.intents){if(!i.togglable)continue;const a=t?.[i.intent];n[i.intent]=a??i.defaultEnabled??!0}return n}function di(e,t){const n=it(e,t);return Object.entries(n).filter(([,i])=>!i).map(([i])=>i)}function fi(e,t){return t?{intent:t.intent??e.intent,targetSchemes:t.targetSchemes??e.targetSchemes,transport:t.transport??e.transport}:e}function mi(e,t){const n=[];for(const i of e){if(!i.enabled)continue;const a=t[i.providerId];if(a)for(const r of nt(i,a))n.push({channel:i,description:a,capability:r})}return n}function gi(e,t){return t.filter(n=>n.capability.intent===e)}function at(e,t){return t.filter(n=>n.capability.targetSchemes.includes(e))}function hi(e,t){return at(e.scheme,t)}function Ei(e,t,n){const i=[];for(const a of e)for(const r of n)r.capability.intent===t&&r.capability.targetSchemes.includes(a.scheme)&&i.push({channelIntent:r,endpoint:a});return i}var rt=(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))(rt||{});const Ai={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 _i(e){return e?Ai[e]??"note":"note"}const yi="message_window",Ti="message_templates",bi={FROM:"from",TO:"to",CC:"cc",BCC:"bcc",ORGANIZER:"organizer",PRESENTER:"presenter",ATTENDEE:"attendee",OWNER:"owner",MEMBER:"member",GUEST:"guest",HOST:"host",PARTICIPANT:"participant"},Si=(e,t)=>({intent:e,...t}),Ii="folder_management",Mi="remote_search",Ci={ok:!1,code:"UNSUPPORTED",message:"Provider does not support this op"},q="auth";function J(e){const t=typeof e=="string"?e.match(/apps\/([^/?#]+)/):null;return t?t[1]:null}function Ni(e){const t=J(e);return t?t!==q:typeof e=="string"&&e.startsWith("/wake")}function Oi(e){return typeof e!="string"||e===""||e==="/"?!0:J(e)===q}function Li(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ot(e){const n=e.split("/").filter(Boolean).map(i=>i.startsWith(":")?i.endsWith("?")?"(?:/[^/]+)?":"/[^/]+":"/"+Li(i)).join("");return new RegExp(`^${n}\\/?$`)}function st(e,t){const n=e.split("/").filter(Boolean),i=t.split("/").filter(Boolean),a={};return n.forEach((r,o)=>{if(r.startsWith(":")){const s=r.endsWith("?")?r.slice(1,-1):r.slice(1),l=i[o];l&&(a[s]=l)}}),a}function lt(e){return e.publicBasePath??`/apps/${e.name}`}function Ri(e){const t=[];for(const n of e){if(!n?.name)continue;const i=lt(n);for(const a of n.routes??[]){if(!a.public)continue;const r=a.path==="/"?"":a.path;t.push({appName:n.name,resource:a.resource,pattern:`${i}${r}`,props:a.props})}}return t}function ct(e,t){const n=e.split("/").filter(Boolean),i=t.split("/").filter(Boolean);for(let a=0;a<Math.min(n.length,i.length);a++){const r=n[a].startsWith(":"),o=i[a].startsWith(":");if(r!==o)return o}return n.length>i.length}function ut(e,t){if(typeof e!="string")return null;let n=null;for(const i of t)ot(i.pattern).test(e)&&(!n||ct(i.pattern,n.pattern))&&(n=i);return n?{...n,params:{...n.props,...st(n.pattern,e)}}:null}function xi(e,t){return ut(e,t)!==null}const Q=9e4,pt=["out_of_office"],dt=e=>pt.includes(e);function vi(e,t,n){const i=n-e<Q,a=t?.status&&(!t.expiresAt||t.expiresAt>n)?t:void 0;if(!a?.status)return{online:i,status:i?"available":"offline"};const r=a.status;return!i&&!dt(r)?{online:!1,status:"offline"}:{online:i,status:r,message:a.message}}function ki(e,t){const n=t-e.lastSeenAt<Q,i=n||dt(e.status)?e.status:"offline";return n===e.online&&i===e.status?e:{...e,online:n,status:i}}const Pi="installation-id";exports.ACTIVITY_CATALOG=m;exports.AI_ATTACHMENT_LIMITS=tt;exports.AI_ATTACHMENT_MAX_PER_TURN=ui;exports.AI_ATTACHMENT_TURN_BUDGET=ci;exports.AI_VENDORS=Y;exports.ALLOWED_LINK_SCHEMES=Ce;exports.ARTIFACT_MAX_BLOCKS=D;exports.ARTIFACT_MAX_BODY_BYTES=Ut;exports.ARTIFACT_MAX_CELL_LEN=I;exports.ARTIFACT_MAX_KPI_ITEMS=K;exports.ARTIFACT_MAX_LIST_ITEMS=$;exports.ARTIFACT_MAX_TABLE_COLUMNS=w;exports.ARTIFACT_MAX_TABLE_ROWS=U;exports.ARTIFACT_MAX_TEXT_LEN=V;exports.AUTH_APP_NAME=q;exports.ActivityTypeRegistry=_e;exports.BUILT_IN_ONLY=Ct;exports.CLASSIFY_VARS=en;exports.CORE_DIMENSIONS=xt;exports.CommunicationScheme=rt;exports.DEFAULT_MEMORY_BUDGET=Un;exports.DEFAULT_PHONE_REGION=ze;exports.FEATURE_FOLDER_MANAGEMENT=Ii;exports.FEATURE_REMOTE_SEARCH=Mi;exports.INSTALLATION_HEADER=Pi;exports.InteractionParticipantRole=bi;exports.KB_FALLBACK_LOCALE=Ke;exports.KB_LOCALES=B;exports.MAX_ACTIONS=S;exports.MAX_BLOCKS=P;exports.MAX_COLLECTION_DEPTH=j;exports.MAX_FIELDS=T;exports.MAX_LIST_ITEMS=b;exports.MAX_MEMORY_BROWSE=kn;exports.MAX_MEMORY_BUDGET=$n;exports.MAX_MEMORY_CHARS=Pn;exports.MAX_TOPIC_CANDIDATES=Ge;exports.MAX_TOPIC_EXAMPLES=Fe;exports.MAX_TOPIC_EXAMPLE_CHARS=M;exports.MIN_MEMORY_BUDGET=Dn;exports.PAUSED_RUN_STATUSES=Pe;exports.PHONE_REGIONS=L;exports.PRESENCE_ONLINE_WINDOW_MS=Q;exports.PRESENCE_SURVIVES_OFFLINE=pt;exports.PROVIDER_FEATURE_MESSAGE_TEMPLATES=Ti;exports.PROVIDER_FEATURE_MESSAGE_WINDOW=yi;exports.PUBLIC_EMAIL_DOMAINS=Je;exports.RELATED_SUBJECT_KINDS=Ye;exports.SIGNATURE_INTENTS=Mn;exports.STEP_MAX_TOKENS_MAX=ve;exports.STEP_MAX_TOKENS_MIN=xe;exports.SUMMARY_MIN_LAST_CHARS=Ze;exports.SUMMARY_MIN_MESSAGES=Qe;exports.TERMINAL_RUN_STATUSES=ke;exports.TRIGGER_VARS=Zt;exports.UNSUPPORTED=Ci;exports.USAGE_DIMENSIONS=be;exports.USAGE_DIMENSION_IDS=Se;exports.acceptExampleCandidate=hn;exports.actingIdentityKey=Re;exports.activityIconOf=ht;exports.activityJoinUrl=It;exports.activitySnippet=Ee;exports.activityTextParams=Ae;exports.activityTimelineText=St;exports.activityTimestamp=Rt;exports.activityTypeInfo=p;exports.actorKey=an;exports.addExampleCandidate=gn;exports.agePresenceEntry=ki;exports.aiAttachmentKind=et;exports.aiAttachmentRejection=pi;exports.aiBudgetLimit=F;exports.aiBudgetPeriodKey=In;exports.aiBudgetPeriodStart=je;exports.aiBudgetState=Sn;exports.aiVendorAcceptsAttachment=bn;exports.aiVendorDefaultModel=_n;exports.aiVendorLabel=An;exports.aiVendorNeedsBaseUrl=Tn;exports.aiVendorsWith=yn;exports.appNameFromPath=J;exports.applySignature=Cn;exports.artifactBodyBytes=Xt;exports.artifactOutline=jt;exports.artifactToMarkdown=Yt;exports.buildActivityPreview=Ot;exports.buildChannelIntents=mi;exports.buildShareKeys=zt;exports.canNestUnder=dn;exports.carriesText=yt;exports.categoryLabel=mn;exports.channelKindForScheme=_i;exports.channelKindOf=Et;exports.clampStepMaxTokens=rn;exports.cleanMessageText=ni;exports.defaultLocaleOf=Be;exports.defineIntent=Si;exports.depthOf=Ue;exports.derivePresence=vi;exports.disabledIntentsFromCapabilities=di;exports.emailDomain=Xn;exports.endpointKey=zn;exports.extractParams=st;exports.filterByEndpoint=hi;exports.filterByIntent=gi;exports.filterByTargetScheme=at;exports.findAiVendor=E;exports.flattenLocales=vt;exports.floorToPeriod=Te;exports.formatActingIdentity=Le;exports.formatPeriod=ye;exports.getActivitySeenUserIds=Lt;exports.getContactEndpoints=Nn;exports.getShortTitle=xn;exports.getUrgencyScore=Rn;exports.heightOf=W;exports.helpCenterText=cn;exports.humanizeAction=Qt;exports.isAssigned=On;exports.isClosed=Ln;exports.isDeepLink=Ni;exports.isDescendant=we;exports.isInteractionUnseen=vn;exports.isLandingPath=Oi;exports.isLikelyBulk=ri;exports.isMessageType=At;exports.isMoreSpecificPattern=ct;exports.isPaused=sn;exports.isPlaybookAuthoredType=bt;exports.isPublicEmailDomain=Wn;exports.isPublicPath=xi;exports.isReplyableType=_t;exports.isRetryable=on;exports.isTerminal=De;exports.isThreadLongEnough=oi;exports.linkLabel=ln;exports.localeInstruction=pn;exports.localeName=un;exports.localesOf=fn;exports.looksLikeEmail=Vn;exports.matchContactToIntents=Ei;exports.matchPublicRoute=ut;exports.messageCountsAs=Tt;exports.needsPhoneRegion=Yn;exports.normalizeArtifactBlocks=Ht;exports.normalizeBlocks=gt;exports.normalizeEmail=z;exports.normalizeExample=g;exports.parseActingIdentity=tn;exports.pathToRegex=ot;exports.periodsInRange=Dt;exports.phoneSuffix=Hn;exports.plainTextFromMarkdown=Qn;exports.playbookActor=nn;exports.publicBasePathFor=lt;exports.publicRoutePatterns=Ri;exports.readPath=N;exports.registrableDomain=qe;exports.rejectExampleCandidate=He;exports.relatedByDefault=wn;exports.resolveAccountCapabilities=it;exports.resolveActivityText=O;exports.resolveChannelIntents=nt;exports.resolveSignature=We;exports.sanitizeInline=Oe;exports.shareKeyForTeam=X;exports.shareKeyForUser=H;exports.shareKeysForViewer=qt;exports.stripHtml=he;exports.toE164=G;exports.toolSourceKinds=Jt;exports.topicOfferedForTeam=Xe;exports.topicsForTeam=En;exports.truncateExample=Ve;exports.usageMetricId=Ie;exports.usageMetrics=$t;
18
+ `).trim()}function Fi(e){if(typeof e!="string"||!e)return"";let t=e.length;for(const a of Ui){const o=e.search(a);o>=0&&o<t&&(t=o)}const n=e.slice(0,t);let i=Ee(Ae(ge(n)));return i||(i=Ee(Ae(ge(e)))),Bi(i)||i}const Gi=/(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i,ji=/\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;function Vi(e,t){return!!(e&&Gi.test(e)||t&&ji.test(t))}const lt=3,ct=600;function Hi(e,t){return e>=lt||t>=ct}const Wi=new Set(["image/png","image/jpeg","image/jpg","image/gif","image/webp"]),Xi=new Set(["text/plain","text/markdown","text/csv","application/json","text/html","application/xml","text/xml"]);function ut(e){const t=(e??"").trim().toLowerCase().split(";")[0];return t?Wi.has(t)?"image":t==="application/pdf"?"pdf":Xi.has(t)?"text":t.startsWith("audio/")?"audio":"unsupported":"unsupported"}const h=1024*1024,dt={image:5*h,pdf:20*h,text:1*h,audio:20*h},zi=25*h,Yi=5;function qi(e,t){const n=ut(e);return n==="unsupported"?"unsupported":t>dt[n]?"too-large":null}function pt(e){return`${e.kind}:${e.id||e.url||e.title}`}function Ji(e,t=[]){const n=new Set(t),i=[],r=[];for(const a of e){const o=pt(a);n.has(o)||(n.add(o),i.push(a),r.push(o))}return{sources:i,keys:r}}function ft(e,t){const n=new Set(e.disabledIntents??[]),i=e.intentOverrides??{},r=t.intents.filter(o=>!n.has(o.intent)).map(o=>Zi(o,i[o.intent]));if(!e.extraIntents||e.extraIntents.length===0)return r;const a=new Set(r.map(o=>o.intent));for(const o of e.extraIntents)a.has(o.intent)||(r.push(o),a.add(o.intent));return r}function mt(e,t){const n={};for(const i of e.intents){if(!i.togglable)continue;const r=t?.[i.intent];n[i.intent]=r??i.defaultEnabled??!0}return n}function Qi(e,t){const n=mt(e,t);return Object.entries(n).filter(([,i])=>!i).map(([i])=>i)}function Zi(e,t){return t?{intent:t.intent??e.intent,targetSchemes:t.targetSchemes??e.targetSchemes,transport:t.transport??e.transport}:e}function er(e,t){const n=[];for(const i of e){if(!i.enabled)continue;const r=t[i.providerId];if(r)for(const a of ft(i,r))n.push({channel:i,description:r,capability:a})}return n}function tr(e,t){return t.filter(n=>n.capability.intent===e)}function gt(e,t){return t.filter(n=>n.capability.targetSchemes.includes(e))}function nr(e,t){return gt(e.scheme,t)}function ir(e,t,n){const i=[];for(const r of e)for(const a of n)a.capability.intent===t&&a.capability.targetSchemes.includes(r.scheme)&&i.push({channelIntent:a,endpoint:r});return i}var ht=(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))(ht||{});const rr={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 ar(e){return e?rr[e]??"note":"note"}const or="message_window",sr="message_templates",lr={FROM:"from",TO:"to",CC:"cc",BCC:"bcc",ORGANIZER:"organizer",PRESENTER:"presenter",ATTENDEE:"attendee",OWNER:"owner",MEMBER:"member",GUEST:"guest",HOST:"host",PARTICIPANT:"participant"},cr=(e,t)=>({intent:e,...t}),ur="folder_management",dr="remote_search",pr={ok:!1,code:"UNSUPPORTED",message:"Provider does not support this op"},Z="auth";function ee(e){const t=typeof e=="string"?e.match(/apps\/([^/?#]+)/):null;return t?t[1]:null}function fr(e){const t=ee(e);return t?t!==Z:typeof e=="string"&&e.startsWith("/wake")}function mr(e){return typeof e!="string"||e===""||e==="/"?!0:ee(e)===Z}function gr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function At(e){const n=e.split("/").filter(Boolean).map(i=>i.startsWith(":")?i.endsWith("?")?"(?:/[^/]+)?":"/[^/]+":"/"+gr(i)).join("");return new RegExp(`^${n}\\/?$`)}function Et(e,t){const n=e.split("/").filter(Boolean),i=t.split("/").filter(Boolean),r={};return n.forEach((a,o)=>{if(a.startsWith(":")){const s=a.endsWith("?")?a.slice(1,-1):a.slice(1),c=i[o];c&&(r[s]=c)}}),r}function yt(e){return e.publicBasePath??`/apps/${e.name}`}function hr(e){const t=[];for(const n of e){if(!n?.name)continue;const i=yt(n);for(const r of n.routes??[]){if(!r.public)continue;const a=r.path==="/"?"":r.path;t.push({appName:n.name,resource:r.resource,pattern:`${i}${a}`,props:r.props})}}return t}function Tt(e,t){const n=e.split("/").filter(Boolean),i=t.split("/").filter(Boolean);for(let r=0;r<Math.min(n.length,i.length);r++){const a=n[r].startsWith(":"),o=i[r].startsWith(":");if(a!==o)return o}return n.length>i.length}function St(e,t){if(typeof e!="string")return null;let n=null;for(const i of t)At(i.pattern).test(e)&&(!n||Tt(i.pattern,n.pattern))&&(n=i);return n?{...n,params:{...n.props,...Et(n.pattern,e)}}:null}function Ar(e,t){return St(e,t)!==null}const Er={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]"]},_t=e=>{let t=e;return Object.values(Er).forEach(n=>{n.forEach(i=>{t=t.replaceAll(i,"")})}),t=t.replace(/\(.*?\)/g,""),t=t.replace(/\[.*?\]/g,""),t},bt=6e4,It=8e3,Mt=2,Nt=.4,yr=3,Tr=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 Ct(e){const t=new Set;for(const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))n.length<yr||Tr.has(n)||t.add(n);return[...t]}function Ot(e,t){if(!e.length)return 0;if(!t.length)return 1;const n=new Set(t),i=new Set(e);let r=0;for(const a of i)n.has(a)||(r+=1);return r/i.size}function vt(e,t=bt){const n=e.filter(o=>!o.partial&&typeof o.text=="string");if(!n.length)return{text:"",segmentCount:0};const r=n.reduce((o,s)=>Math.max(o,s.endedAt??0),0)-t;return{text:n.filter(o=>(o.endedAt??0)>=r).map(o=>_t(o.text).trim()).filter(Boolean).join(" ").replace(/\s+/g," ").trim(),segmentCount:n.length}}const Lt=60;function Sr(e,t,n=Lt){const i=new Set(e),r=[...e];for(const a of t)!a||i.has(a)||(i.add(a),r.push(a));return r.slice(-n)}function _r(e){const{segments:t,now:n,state:i}=e;if(i.lastTriggerAt&&n-i.lastTriggerAt<It)return{trigger:!1,reason:"too_soon"};const r=vt(t,e.windowMs);if(!r.text)return{trigger:!1,reason:"no_speech"};const a=r.segmentCount-(i.lastSegmentCount??0);if(i.lastQueryTerms&&a<Mt)return{trigger:!1,reason:"too_few_new"};const o=Ct(r.text);return o.length?i.lastQueryTerms?.length&&Ot(o,i.lastQueryTerms)<Nt?{trigger:!1,reason:"same_topic"}:{trigger:!0,text:r.text,terms:o,segmentCount:r.segmentCount}:{trigger:!1,reason:"no_speech"}}const te=9e4,kt=["out_of_office"],wt=e=>kt.includes(e);function br(e,t,n){const i=n-e<te,r=t?.status&&(!t.expiresAt||t.expiresAt>n)?t:void 0;if(!r?.status)return{online:i,status:i?"available":"offline"};const a=r.status;return!i&&!wt(a)?{online:!1,status:"offline"}:{online:i,status:a,message:r.message}}function Ir(e,t){const n=t-e.lastSeenAt<te,i=n||wt(e.status)?e.status:"offline";return n===e.online&&i===e.status?e:{...e,online:n,status:i}}function Mr(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 Nr(e){return e.providerAvailable&&e.allowed}const Cr="installation-id";exports.ACTIVITY_CATALOG=m;exports.AI_ATTACHMENT_LIMITS=dt;exports.AI_ATTACHMENT_MAX_PER_TURN=Yi;exports.AI_ATTACHMENT_TURN_BUDGET=zi;exports.AI_VENDORS=J;exports.ALLOWED_LINK_SCHEMES=ve;exports.ARTIFACT_MAX_BLOCKS=D;exports.ARTIFACT_MAX_BODY_BYTES=on;exports.ARTIFACT_MAX_CELL_LEN=I;exports.ARTIFACT_MAX_KPI_ITEMS=K;exports.ARTIFACT_MAX_LIST_ITEMS=P;exports.ARTIFACT_MAX_TABLE_COLUMNS=U;exports.ARTIFACT_MAX_TABLE_ROWS=$;exports.ARTIFACT_MAX_TEXT_LEN=H;exports.ASSIGNMENT_SCOPE_KIND=Re;exports.AUTH_APP_NAME=Z;exports.ActivityTypeRegistry=_e;exports.BUILT_IN_ONLY=zt;exports.CADENCE_FLOOR_MS=It;exports.CADENCE_MIN_NEW_SEGMENTS=Mt;exports.CADENCE_MIN_NOVELTY=Nt;exports.CADENCE_WINDOW_MS=bt;exports.CLASSIFY_VARS=vn;exports.CORE_DIMENSIONS=Zt;exports.CommunicationScheme=ht;exports.DEFAULT_MEMORY_BUDGET=Si;exports.DEFAULT_PHONE_REGION=at;exports.EMPTY_WORKFLOW=Un;exports.FEATURE_FOLDER_MANAGEMENT=ur;exports.FEATURE_REMOTE_SEARCH=dr;exports.INSTALLATION_HEADER=Cr;exports.INTERACTION_KIND=Be;exports.InteractionParticipantRole=lr;exports.KB_FALLBACK_LOCALE=Ye;exports.KB_LOCALES=G;exports.MAX_ACTIONS=b;exports.MAX_ASSIGNMENT_TURNS=xe;exports.MAX_BLOCKS=x;exports.MAX_COLLECTION_DEPTH=Y;exports.MAX_FIELDS=S;exports.MAX_LIST_ITEMS=_;exports.MAX_MEMORY_BROWSE=Ai;exports.MAX_MEMORY_BUDGET=Ti;exports.MAX_MEMORY_CHARS=Ei;exports.MAX_SHOWN_KEYS=Lt;exports.MAX_TOPIC_CANDIDATES=Qe;exports.MAX_TOPIC_EXAMPLES=Je;exports.MAX_TOPIC_EXAMPLE_CHARS=M;exports.MIN_MEMORY_BUDGET=yi;exports.PHONE_REGIONS=v;exports.PRESENCE_ONLINE_WINDOW_MS=te;exports.PRESENCE_SURVIVES_OFFLINE=kt;exports.PROVIDER_FEATURE_MESSAGE_TEMPLATES=sr;exports.PROVIDER_FEATURE_MESSAGE_WINDOW=or;exports.PUBLIC_EMAIL_DOMAINS=st;exports.READ_STEP_TYPES=B;exports.RELATED_SUBJECT_KINDS=rt;exports.SIGNATURE_INTENTS=ci;exports.STEP_MAX_TOKENS_MAX=je;exports.STEP_MAX_TOKENS_MIN=Ge;exports.SUMMARY_MIN_LAST_CHARS=ct;exports.SUMMARY_MIN_MESSAGES=lt;exports.TERMINAL_ASSIGNMENT_STATUSES=we;exports.TERMINAL_RUN_STATUSES=Ve;exports.TRIGGER_VARS=On;exports.UNSUPPORTED=pr;exports.USAGE_DIMENSIONS=Me;exports.USAGE_DIMENSION_IDS=Ne;exports.acceptExampleCandidate=Zn;exports.actingIdentityKey=Pe;exports.activityIconOf=Pt;exports.activityJoinUrl=Wt;exports.activitySnippet=Te;exports.activityTextParams=Se;exports.activityTimelineText=Ht;exports.activityTimestamp=Qt;exports.activityTypeInfo=l;exports.actorKey=wn;exports.addExampleCandidate=Qn;exports.agePresenceEntry=Ir;exports.aiAttachmentKind=ut;exports.aiAttachmentRejection=qi;exports.aiBudgetLimit=j;exports.aiBudgetPeriodKey=si;exports.aiBudgetPeriodStart=nt;exports.aiBudgetState=oi;exports.aiVendorAcceptsAttachment=ai;exports.aiVendorDefaultModel=ni;exports.aiVendorLabel=ti;exports.aiVendorNeedsBaseUrl=ri;exports.aiVendorsWith=ii;exports.appNameFromPath=ee;exports.applySignature=ui;exports.artifactBodyBytes=mn;exports.artifactOutline=gn;exports.artifactToMarkdown=An;exports.assignmentMismatch=Pn;exports.assignmentScopeKey=_n;exports.assignmentSubject=bn;exports.buildActivityPreview=qt;exports.buildChannelIntents=er;exports.buildShareKeys=En;exports.buildWindow=vt;exports.canNestUnder=Yn;exports.carriesText=Bt;exports.categoryLabel=Jn;exports.channelKindForScheme=ar;exports.channelKindOf=$t;exports.clampStepMaxTokens=$n;exports.cleanMessageText=Fi;exports.decideAssignmentState=In;exports.decideCadence=_r;exports.defaultLocaleOf=qe;exports.defineIntent=cr;exports.depthOf=Xe;exports.derivePresence=br;exports.disabledIntentsFromCapabilities=Qi;exports.emailDomain=Li;exports.endpointKey=xi;exports.extractParams=Et;exports.extractTerms=Ct;exports.filterByEndpoint=nr;exports.filterByIntent=tr;exports.filterByTargetScheme=gt;exports.findAiVendor=A;exports.flattenLocales=en;exports.floorToPeriod=Ie;exports.formatActingIdentity=De;exports.formatPeriod=be;exports.freshSources=Ji;exports.getActivitySeenUserIds=Jt;exports.getContactEndpoints=di;exports.getShortTitle=gi;exports.getUrgencyScore=mi;exports.heightOf=q;exports.helpCenterText=Wn;exports.humanizeAction=Cn;exports.interactionIdOf=Fe;exports.isAgentUser=bi;exports.isAssigned=pi;exports.isAssignmentTerminal=Sn;exports.isAssignmentTrigger=Ue;exports.isClosed=fi;exports.isConnectedType=jt;exports.isDeepLink=fr;exports.isDescendant=ze;exports.isInFlight=Gn;exports.isInteractionUnseen=hi;exports.isLandingPath=mr;exports.isLikelyBulk=Vi;exports.isMessageType=Ut;exports.isMoreSpecificPattern=Tt;exports.isPaused=He;exports.isPlaybookAuthoredType=Gt;exports.isPublicEmailDomain=wi;exports.isPublicPath=Ar;exports.isReplyableType=Kt;exports.isTerminal=Fn;exports.isThreadLongEnough=Hi;exports.isTranscriptType=Vt;exports.linkLabel=Hn;exports.listeningAllowed=li;exports.localeInstruction=zn;exports.localeName=Xn;exports.localesOf=qn;exports.looksLikeEmail=Oi;exports.matchContactToIntents=ir;exports.matchPublicRoute=St;exports.mergeShownKeys=Sr;exports.messageCountsAs=Ft;exports.needsPhoneRegion=Ri;exports.normalizeArtifactBlocks=fn;exports.normalizeBlocks=Dt;exports.normalizeEmail=Q;exports.normalizeExample=g;exports.novelty=Ot;exports.parseActingIdentity=Ln;exports.pathToRegex=At;exports.periodsInRange=rn;exports.phoneSuffix=vi;exports.plainTextFromMarkdown=$i;exports.playbookActor=$e;exports.procedureOf=Bn;exports.publicBasePathFor=yt;exports.publicRoutePatterns=hr;exports.readPath=C;exports.readStepError=F;exports.refKey=Ke;exports.registrableDomain=ot;exports.rejectExampleCandidate=et;exports.relatedByDefault=_i;exports.resolveAccountCapabilities=mt;exports.resolveActivityText=O;exports.resolveChannelIntents=ft;exports.resolveSignature=it;exports.resolveWorkMode=Mr;exports.runActor=kn;exports.runInteractionId=Vn;exports.sanitizeInline=ke;exports.sanitizeTranscript=_t;exports.selectLenses=Nn;exports.shareKeyForTeam=X;exports.shareKeyForUser=W;exports.shareKeysForViewer=yn;exports.shouldRunAudioPipeline=Nr;exports.sourceKey=pt;exports.stepsOf=Kn;exports.stripHtml=ye;exports.subjectKeyOf=jn;exports.subjectOf=z;exports.targetById=Dn;exports.targetForActivityType=xn;exports.toE164=V;exports.toolSourceKinds=Tn;exports.topicOfferedForTeam=tt;exports.topicsForTeam=ei;exports.truncateExample=Ze;exports.usageMetricId=Ce;exports.usageMetrics=an;exports.valueAtPath=Rn;
package/dist/index.d.ts CHANGED
@@ -2,6 +2,8 @@ export * from './entities/activity';
2
2
  export * from './entities/analytics';
3
3
  export * from './entities/artifact';
4
4
  export * from './entities/attribute';
5
+ export * from './entities/assignment';
6
+ export * from './entities/live-lens';
5
7
  export * from './entities/playbook';
6
8
  export * from './entities/kb';
7
9
  export * from './entities/topic';
@@ -11,6 +13,7 @@ export * from './entities/ai-context';
11
13
  export * from './entities/ai-conversation';
12
14
  export * from './entities/ai-message';
13
15
  export * from './entities/ai-profile';
16
+ export * from './entities/ai-settings/types';
14
17
  export * from './entities/mcp';
15
18
  export * from './entities/channel';
16
19
  export * from './entities/communication';
@@ -54,6 +57,7 @@ export * from './platform/localization';
54
57
  export * from './platform/manifest';
55
58
  export * from './platform/menu';
56
59
  export * from './platform/reactive';
60
+ export * from './platform/resource';
57
61
  export * from './platform/routing';
58
62
  export * from './platform/scope';
59
63
  export * from './platform/sdk';
@@ -62,6 +66,8 @@ export * from './platform/service-registry';
62
66
  export * from './platform/services';
63
67
  export * from './platform/ui';
64
68
  export * from './platform/media';
69
+ export * from './platform/transcript-cadence';
70
+ export * from './platform/transcript-sanitize';
65
71
  export * from './platform/provider';
66
72
  export * from './platform/push';
67
73
  export * from './platform/presence';