@opencxh/domain 1.172.1 → 1.172.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities/activity/blocks.d.ts +30 -30
- package/dist/entities/activity/catalog.d.ts +63 -86
- package/dist/entities/activity/descriptor.d.ts +31 -32
- package/dist/entities/activity/index.d.ts +2 -2
- package/dist/entities/activity/preview.d.ts +7 -7
- package/dist/entities/activity/resolve.d.ts +37 -38
- package/dist/entities/activity/types.d.ts +34 -34
- package/dist/entities/ai-account/types.d.ts +3 -3
- package/dist/entities/ai-account/vendors.d.ts +25 -32
- package/dist/entities/ai-budget/types.d.ts +5 -5
- package/dist/entities/ai-conversation/types.d.ts +12 -12
- package/dist/entities/ai-profile/types.d.ts +14 -21
- package/dist/entities/ai-settings/types.d.ts +12 -13
- package/dist/entities/analytics/index.d.ts +4 -4
- package/dist/entities/analytics/source.d.ts +1 -1
- package/dist/entities/analytics/usage.d.ts +23 -28
- package/dist/entities/artifact/blocks.d.ts +54 -69
- package/dist/entities/artifact/markdown.d.ts +2 -3
- package/dist/entities/artifact/types.d.ts +46 -54
- package/dist/entities/assignment/types.d.ts +74 -88
- package/dist/entities/channel/index.d.ts +1 -1
- package/dist/entities/channel/signature.d.ts +8 -9
- package/dist/entities/communication/index.d.ts +1 -1
- package/dist/entities/contact/index.d.ts +1 -1
- package/dist/entities/custom-field-def/types.d.ts +14 -14
- package/dist/entities/external-identity/types.d.ts +45 -50
- package/dist/entities/interaction/index.d.ts +1 -1
- package/dist/entities/interaction/types.d.ts +44 -47
- package/dist/entities/live-lens/types.d.ts +39 -44
- package/dist/entities/mcp/types.d.ts +53 -57
- package/dist/entities/memory/alias.d.ts +7 -7
- package/dist/entities/memory/browse.d.ts +21 -21
- package/dist/entities/memory/ingest.d.ts +24 -28
- package/dist/entities/memory/item.d.ts +53 -58
- package/dist/entities/memory/kind.d.ts +25 -25
- package/dist/entities/memory/query.d.ts +49 -51
- package/dist/entities/playbook/actor.d.ts +17 -17
- package/dist/entities/playbook/assignment.d.ts +54 -63
- package/dist/entities/playbook/index.d.ts +2 -2
- package/dist/entities/playbook/labels.d.ts +4 -4
- package/dist/entities/playbook/trigger-vars.d.ts +14 -15
- package/dist/entities/playbook/types.d.ts +172 -302
- package/dist/entities/resource-reminder/types.d.ts +8 -9
- package/dist/entities/time-entry/duration.d.ts +11 -11
- package/dist/entities/time-entry/types.d.ts +59 -59
- package/dist/entities/time-entry/work-type.d.ts +21 -24
- package/dist/entities/topic/examples.d.ts +26 -27
- package/dist/entities/topic/scope.d.ts +11 -12
- package/dist/entities/topic/types.d.ts +26 -28
- package/dist/entities/user/types.d.ts +24 -28
- package/dist/entities/webhook/types.d.ts +6 -6
- package/dist/entities/work/keys.d.ts +25 -26
- package/dist/entities/work/ladder.d.ts +48 -52
- package/dist/entities/work/types.d.ts +108 -114
- package/dist/index.cjs +6 -6
- package/dist/index.d.ts +29 -28
- package/dist/index.js +1377 -1242
- package/dist/platform/account.d.ts +34 -38
- package/dist/platform/ai-tools.d.ts +48 -52
- package/dist/platform/api.d.ts +9 -10
- package/dist/platform/author.d.ts +7 -9
- package/dist/platform/capabilities.d.ts +3 -3
- package/dist/platform/communication.d.ts +163 -204
- package/dist/platform/context.d.ts +8 -8
- package/dist/platform/identity.d.ts +16 -19
- package/dist/platform/kernel.d.ts +1 -1
- package/dist/platform/manifest.d.ts +2 -2
- package/dist/platform/media.d.ts +13 -15
- package/dist/platform/permission.d.ts +39 -0
- package/dist/platform/permission.test.d.ts +1 -0
- package/dist/platform/presence.d.ts +30 -30
- package/dist/platform/provider.d.ts +14 -15
- package/dist/platform/resource-source.d.ts +43 -45
- package/dist/platform/resource.d.ts +17 -23
- package/dist/platform/scope.d.ts +35 -61
- package/dist/platform/services.d.ts +4 -4
- package/dist/platform/storage.d.ts +1 -1
- package/dist/platform/sync-source.d.ts +196 -216
- package/dist/platform/transcript-cadence.d.ts +37 -41
- package/dist/platform/ui.d.ts +6 -6
- package/dist/text/endpoint.d.ts +11 -27
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function zt(e){return e.type==="EMAIL_RECEIVED"||e.type==="EMAIL_SENT"}function Yt(e){return e.type==="CHAT_MESSAGE_SENT"||e.type==="CHAT_MESSAGE_RECEIVED"}const D=10,_=10,T=10,b=5,qt=new Set(["header","section","context","divider","image","list","actions","attachments"]);function w(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 Jt(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(!qt.has(r.type)){t("unknown block type "+String(r.type));continue}switch(r.type){case"header":if(!w(r.text)){t("a header without text");continue}break;case"context":if(!w(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>_&&(t("more than "+_+" fields in a section"),r.fields=r.fields.slice(0,_));break;case"list":if(!Array.isArray(r.items)||r.items.length===0){t("a list without items");continue}r.items.length>T&&(t("more than "+T+" list items"),r.items=r.items.slice(0,T));break;case"actions":{const a=Array.isArray(r.elements)?r.elements:[],o=a.filter(s=>s&&s.action_id&&s.invoke&&w(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 be(e){return e.replace(/<style[\s\S]*?<\/style>/gi," ").replace(/<script[\s\S]*?<\/script>/gi," ").replace(/<[^>]+>/g," ").replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/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 oe(e){return e?` — ${Math.floor(e/60)}m ${e%60}s`:""}function L(e){return e?.split("@")?.[0]||e||""}function S(e){return e.map(t=>t.name).join(", ")}function se(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 — ${L(e.payload.from)}`:`Outbound call started — ${L(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${oe(e.payload.duration)}`},VOICE_CALL_MISSED:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Gemiste oproep",timeline:e=>`Missed call — ${L(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:ce},EMAIL_SENT:{shape:"message",component:"communication:EmailActivity",channelKind:"mail",icon:"mail",replyable:!0,carriesText:!0,countsAs:"outbound_message",snippet:ce},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=>`${S(e.payload.members)} toegevoegd`,timeline:e=>{const t=S(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=>`${S(e.payload.members)} verlaten`,timeline:e=>{const t=S(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=>`${se(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=>`${se(e.payload.callType)} ended${oe(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 ce(e){const t=e.payload,n=t.bodySnippet?.trim()||be(t.body??"");return t.subject?`${t.subject} — ${n}`:n}function c(e){return m[e]}function Zt(e){return c(e)?.icon??"circle"}function Qt(e){return c(e)?.channelKind}function W(e){return e==="message"||e==="note"}function en(e){return W(c(e)?.shape)}function tn(e){return c(e)?.replyable===!0}function nn(e){return c(e)?.carriesText===!0}function rn(e){return c(e)?.countsAs}function an(e){return c(e)?.playbookAuthored===!0}function on(e){return c(e)?.connected===!0}function sn(e){const t=c(e);return t?.shape==="artifact"&&t?.carriesText===!0}function Ie(e){const t=c(e.type)?.snippet;return t?t(e):""}function cn(e,t){const n=c(e.type)?.timeline;return n?n(e,t):e.type.replace(/_/g," ").toLowerCase()}function ln(e){const t=c(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[a,o]of Object.entries(e.params??{}))i[a]=N(t,o);const r=n(e.key,i);return r===e.key?null:r}function Me(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]=N(t,r);return{key:e.key,params:n}}const un=e=>e;function le(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 ue(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 Ce{constructor(t=[],n=un){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 le(t);const n=this.declared.get(t);return n?ue(n):void 0}triggerable(){const t=Object.keys(m).filter(i=>m[i].triggerable).map(le),n=[...this.declared.values()].map(ue).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}isMessage(t){return W(this.get(t)?.shape)}isReplyable(t){return this.get(t)?.replyable===!0}carriesText(t){return this.get(t)?.carriesText===!0}countsAs(t){return this.get(t)?.countsAs}channelKind(t){return this.get(t)?.channelKind}isTranscript(t){const n=this.get(t);return n?.shape==="artifact"&&n.carriesText}get translator(){return this.translate}}const dn=new Ce,de=140;function pn(e){const t=e.trim();return t.length<=de?t:t.slice(0,de-1).trimEnd()+"…"}function fn(e,t){const n=Me(t?.text,e),i=t?O(t.text,e,r=>r):null;return{activityId:e.id,type:e.type,snippet:pn(i??Ie(e)),authorName:e.author?.name??"",direction:e.direction,createdAt:e.createdAt??Date.now(),...n?{snippetKey:n.key,snippetParams:n.params}:{}}}function mn(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 gn(e){return e.createdAt??0}const hn=[{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 x(e){return e<10?`0${e}`:`${e}`}function Ne(e,t){const n=new Date(e),i=`${n.getUTCFullYear()}-${x(n.getUTCMonth()+1)}-${x(n.getUTCDate())}`;return t==="day"?i:`${i}T${x(n.getUTCHours())}`}function Oe(e,t){const n=new Date(e);return n.setUTCMinutes(0,0,0),t==="day"&&n.setUTCHours(0),n.getTime()}const An=36e5,yn=864e5;function Sn(e,t,n){const i=n==="hour"?An:yn,r=[];for(let a=Oe(e,n);a<=t;a+=i)r.push(Ne(a,n));return r}const Re=[{id:"resource",label:"Resource",labelSource:"raw"},{id:"origin",label:"Herkomst",labelSource:"raw"}],ke=Re.map(e=>e.id);function ve(e,t){return`${e}.usage.${t}`}function _n(e,t){return t.map(n=>({id:ve(e,n.unit),label:n.label,category:"Verbruik",valueType:n.valueType??"count",aggregation:"sum",supportedDimensions:["provider",...ke,...n.extraDimensions??[],"time"]}))}const we=new Set(["info","success","warning","destructive"]),P=200,$=100,K=200,U=12,B=4,X=4e3,I=500,Tn=256*1024,bn=new Set(["heading","paragraph","list","quote","code","divider","table","kpi","callout"]),Le=["http:","https:","mailto:","tel:"],In=/^[a-z][a-z0-9+.-]*:/i;function xe(e){const t=e.trim().replace(/^<|>$/g,"");if(!t)return!1;const n=In.exec(t)?.[0];return n?Le.includes(n.toLowerCase()):!t.startsWith("//")}const Mn=/^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;function Cn(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=pe(e,r,"[","]");if(a<0||e[a+1]!=="("){t+=e[n],n+=1;continue}const o=pe(e,a+2,"(",")");if(o<0){t+=e[n],n+=1;continue}const s=e.slice(r,a),l=e.slice(a+2,o).trim().split(/\s+/)[0]??"";t+=i||!xe(l)?s:e.slice(n,o+1),n=o+1}return t}function pe(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 De(e){return Cn(e).replace(Mn,(t,n,i)=>xe(i)?t:"")}function d(e,t=X){return typeof e=="string"?De(e).slice(0,t):""}function Nn(e,t=X){return typeof e=="string"?e.slice(0,t):""}function On(e,t="info"){return typeof e=="string"&&we.has(e)?e:t}function Rn(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 r=i;if(!bn.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=Nn(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>=$){t("more than "+$+" 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 l=r.style==="numbered"?"numbered":"bulleted";n.push({...a,type:"list",style:l,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 A=d(u?.label,I),v=u?.align==="right"?"right":void 0;s.push(v?{label:A,align:v}:{label:A})}if(s.length===0){t("a table without columns");continue}const l=Array.isArray(r.rows)?r.rows:[],p=[];for(const u of l){if(p.length>=K){t("more than "+K+" table rows");break}const A=Array.isArray(u)?u:[];p.push(s.map((v,Xt)=>d(A[Xt],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 l of o){if(s.length>=B){t("more than "+B+" kpi items");break}const p=d(l?.value,40),f=d(l?.label,80);if(!p||!f)continue;const u=l?.tone;s.push(typeof u=="string"&&we.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:On(r.tone),...s?{title:s}:{},text:o});break}}}return n}function kn(e){return JSON.stringify(e).length}function vn(e){return{blocks:e.length,types:e.map(t=>t.type),headings:e.flatMap(t=>t.type==="heading"?[t.text]:[])}}function fe(e){return e.replace(/\|/g,"\\|").replace(/\r?\n/g," ").trim()}function me(e,t,n){const i=e.map((r,a)=>n?.[a]==="right"?"---:":"---");return[`| ${e.map(fe).join(" | ")} |`,`| ${i.join(" | ")} |`,...t.map(r=>`| ${r.map(fe).join(" | ")} |`)]}function wn(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=me(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 me(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 Ln(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=wn(r);a.length>0&&n.push(a.join(`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=10,_=10,T=10,b=5,zt=new Set(["header","section","context","divider","image","list","actions","attachments"]);function v(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 Yt(e,t=()=>{}){if(!Array.isArray(e))return[];const n=[];for(const r of e){if(n.length>=D){t("more than "+D+" blocks; the rest was dropped");break}if(!r||typeof r!="object")continue;const i=r;if(!zt.has(i.type)){t("unknown block type "+String(i.type));continue}switch(i.type){case"header":if(!v(i.text)){t("a header without text");continue}break;case"context":if(!v(i.text)){t("a context block without text");continue}break;case"image":if(!i.url||!i.alt){t("an image without url or alt");continue}break;case"section":Array.isArray(i.fields)&&i.fields.length>_&&(t("more than "+_+" fields in a section"),i.fields=i.fields.slice(0,_));break;case"list":if(!Array.isArray(i.items)||i.items.length===0){t("a list without items");continue}i.items.length>T&&(t("more than "+T+" list items"),i.items=i.items.slice(0,T));break;case"actions":{const a=Array.isArray(i.elements)?i.elements:[],o=a.filter(s=>s&&s.action_id&&s.invoke&&v(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"),i.elements=o.slice(0,b);break}}n.push(i)}return n}function be(e){return e.replace(/<style[\s\S]*?<\/style>/gi," ").replace(/<script[\s\S]*?<\/script>/gi," ").replace(/<[^>]+>/g," ").replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/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 oe(e){return e?` — ${Math.floor(e/60)}m ${e%60}s`:""}function L(e){return e?.split("@")?.[0]||e||""}function S(e){return e.map(t=>t.name).join(", ")}function se(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 — ${L(e.payload.from)}`:`Outbound call started — ${L(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${oe(e.payload.duration)}`},VOICE_CALL_MISSED:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Gemiste oproep",timeline:e=>`Missed call — ${L(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:ce},EMAIL_SENT:{shape:"message",component:"communication:EmailActivity",channelKind:"mail",icon:"mail",replyable:!0,carriesText:!0,countsAs:"outbound_message",snippet:ce},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=>`${S(e.payload.members)} toegevoegd`,timeline:e=>{const t=S(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=>`${S(e.payload.members)} verlaten`,timeline:e=>{const t=S(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=>`${se(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=>`${se(e.payload.callType)} ended${oe(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 ce(e){const t=e.payload,n=t.bodySnippet?.trim()||be(t.body??"");return t.subject?`${t.subject} — ${n}`:n}function c(e){return m[e]}function qt(e){return c(e)?.icon??"circle"}function Jt(e){return c(e)?.channelKind}function W(e){return e==="message"||e==="note"}function Zt(e){return W(c(e)?.shape)}function Qt(e){return c(e)?.replyable===!0}function en(e){return c(e)?.carriesText===!0}function tn(e){return c(e)?.countsAs}function nn(e){return c(e)?.playbookAuthored===!0}function rn(e){return c(e)?.connected===!0}function an(e){const t=c(e);return t?.shape==="artifact"&&t?.carriesText===!0}function Ie(e){const t=c(e.type)?.snippet;return t?t(e):""}function on(e,t){const n=c(e.type)?.timeline;return n?n(e,t):e.type.replace(/_/g," ").toLowerCase()}function sn(e){const t=c(e.type)?.joinUrl;return t?t(e):void 0}function w(e,t){let n=e;for(const r of t.split(".")){if(n==null||typeof n!="object")return"";n=n[r]}return n==null?"":typeof n=="string"?n:typeof n=="number"||typeof n=="boolean"?String(n):""}function N(e,t,n){if(e===void 0)return null;if(typeof e=="string")return e||null;if("value"in e)return w(t,e.value)||null;const r={};for(const[a,o]of Object.entries(e.params??{}))r[a]=w(t,o);const i=n(e.key,r);return i===e.key?null:i}function Me(e,t){if(!e||typeof e=="string"||"value"in e)return null;const n={};for(const[r,i]of Object.entries(e.params??{}))n[r]=w(t,i);return{key:e.key,params:n}}const le=140;function cn(e){const t=e.trim();return t.length<=le?t:t.slice(0,le-1).trimEnd()+"…"}function ln(e,t){const n=Me(t?.text,e),r=t?N(t.text,e,i=>i):null;return{activityId:e.id,type:e.type,snippet:cn(r??Ie(e)),authorName:e.author?.name??"",direction:e.direction,createdAt:e.createdAt??Date.now(),...n?{snippetKey:n.key,snippetParams:n.params}:{}}}const un=e=>e;function ue(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 de(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 Ce{constructor(t=[],n=un){this.translate=n;for(const r of t)r?.type&&(r.type in m||this.declared.has(r.type)||this.declared.set(r.type,r))}declared=new Map;get(t){if(t in m)return ue(t);const n=this.declared.get(t);return n?de(n):void 0}triggerable(){const t=Object.keys(m).filter(r=>m[r].triggerable).map(ue),n=[...this.declared.values()].map(de).filter(r=>r.triggerable);return[...t,...n]}timelineText(t,n){const r=m[t.type];if(r?.timeline)return r.timeline(t,n);const i=this.declared.get(t.type);return N(i?.text,t,this.translate)??t.type.replace(/_/g," ").toLowerCase()}snippet(t){const n=m[t.type];if(n?.snippet)return n.snippet(t);const r=this.declared.get(t.type);return N(r?.text,t,this.translate)??""}descriptor(t){return this.declared.get(t)}blocks(t){const n=this.declared.get(t)?.render;return n?.length?n:void 0}isMessage(t){return W(this.get(t)?.shape)}isReplyable(t){return this.get(t)?.replyable===!0}carriesText(t){return this.get(t)?.carriesText===!0}countsAs(t){return this.get(t)?.countsAs}channelKind(t){return this.get(t)?.channelKind}isTranscript(t){const n=this.get(t);return n?.shape==="artifact"&&n.carriesText}get translator(){return this.translate}}const dn=new Ce;function pn(e,t,n=[]){const r=e.createdAt;if(!r)return[];const i=new Set(n);return e.author.type==="user"&&e.author.id&&i.add(e.author.id),Object.entries(t).filter(([a,o])=>o>=r&&!i.has(a)).map(([a])=>a)}function fn(e){return e.createdAt??0}function mn(e){return e.type==="EMAIL_RECEIVED"||e.type==="EMAIL_SENT"}function gn(e){return e.type==="CHAT_MESSAGE_SENT"||e.type==="CHAT_MESSAGE_RECEIVED"}const X=[{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 X.find(t=>t.id===e)}function hn(e){return E(e)?.label??e}function En(e,t="gpt-5-mini"){return E(e)?.defaultModel??t}function An(e){return X.filter(t=>t.capabilities.includes(e))}function yn(e){const t=E(e);return!!t&&!t.baseUrl}function Sn(e,t){return t==="text"?!0:E(e)?.attachmentKinds?.includes(t)===!0}function _n(e,t){if(!e.enabled)return"ok";const n=P(e.hardLimitNanos),r=P(e.softLimitNanos);return n!==void 0&&t>=n?"hard":r!==void 0&&t>=r?"soft":"ok"}function P(e){return typeof e=="number"?e:void 0}function we(e,t="month"){const n=new Date(e);return Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),1)}function Tn(e,t="month"){const n=new Date(we(e,t));return`${n.getUTCFullYear()}-${String(n.getUTCMonth()+1).padStart(2,"0")}`}function bn(e){return e?.listeningEnabled!==!1}function In(e){const t=[];for(const n of Object.keys(e))for(const r of Object.keys(e[n]))t.push({lang:n,key:r,value:e[n][r]});return t}const Mn=[{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 x(e){return e<10?`0${e}`:`${e}`}function Ne(e,t){const n=new Date(e),r=`${n.getUTCFullYear()}-${x(n.getUTCMonth()+1)}-${x(n.getUTCDate())}`;return t==="day"?r:`${r}T${x(n.getUTCHours())}`}function Oe(e,t){const n=new Date(e);return n.setUTCMinutes(0,0,0),t==="day"&&n.setUTCHours(0),n.getTime()}const Cn=36e5,wn=864e5;function Nn(e,t,n){const r=n==="hour"?Cn:wn,i=[];for(let a=Oe(e,n);a<=t;a+=r)i.push(Ne(a,n));return i}const ke=[{id:"resource",label:"Resource",labelSource:"raw"},{id:"origin",label:"Herkomst",labelSource:"raw"}],Re=ke.map(e=>e.id);function ve(e,t){return`${e}.usage.${t}`}function On(e,t){return t.map(n=>({id:ve(e,n.unit),label:n.label,category:"Verbruik",valueType:n.valueType??"count",aggregation:"sum",supportedDimensions:["provider",...Re,...n.extraDimensions??[],"time"]}))}const Le=new Set(["info","success","warning","destructive"]),$=200,K=100,U=200,B=12,F=4,z=4e3,I=500,kn=256*1024,Rn=new Set(["heading","paragraph","list","quote","code","divider","table","kpi","callout"]),xe=["http:","https:","mailto:","tel:"],vn=/^[a-z][a-z0-9+.-]*:/i;function De(e){const t=e.trim().replace(/^<|>$/g,"");if(!t)return!1;const n=vn.exec(t)?.[0];return n?xe.includes(n.toLowerCase()):!t.startsWith("//")}const Ln=/^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;function xn(e){let t="",n=0;for(;n<e.length;){const r=e[n]==="!"&&e[n+1]==="[";if(e[n]!=="["&&!r){t+=e[n],n+=1;continue}const i=n+(r?2:1),a=pe(e,i,"[","]");if(a<0||e[a+1]!=="("){t+=e[n],n+=1;continue}const o=pe(e,a+2,"(",")");if(o<0){t+=e[n],n+=1;continue}const s=e.slice(i,a),l=e.slice(a+2,o).trim().split(/\s+/)[0]??"";t+=r||!De(l)?s:e.slice(n,o+1),n=o+1}return t}function pe(e,t,n,r){let i=1;for(let a=t;a<e.length;a+=1){if(e[a]==="\\"){a+=1;continue}if(e[a]===n)i+=1;else if(e[a]===r&&(i-=1,i===0))return a}return-1}function Pe(e){return xn(e).replace(Ln,(t,n,r)=>De(r)?t:"")}function d(e,t=z){return typeof e=="string"?Pe(e).slice(0,t):""}function Dn(e,t=z){return typeof e=="string"?e.slice(0,t):""}function Pn(e,t="info"){return typeof e=="string"&&Le.has(e)?e:t}function $n(e,t=()=>{}){if(!Array.isArray(e))return[];const n=[];for(const r of e){if(n.length>=$){t("more than "+$+" blocks; the rest was dropped");break}if(!r||typeof r!="object")continue;const i=r;if(!Rn.has(i.type)){t("unknown block type "+String(i.type));continue}const a=typeof i.block_id=="string"?{block_id:i.block_id}:{};switch(i.type){case"heading":{const o=d(i.text);if(!o){t("a heading without text");continue}const s=i.level===2||i.level===3?i.level:1;n.push({...a,type:"heading",level:s,text:o});break}case"paragraph":{const o=d(i.text);if(!o){t("a paragraph without text");continue}n.push({...a,type:"paragraph",text:o});break}case"quote":{const o=d(i.text);if(!o){t("a quote without text");continue}n.push({...a,type:"quote",text:o});break}case"code":{const o=Dn(i.text);if(!o){t("a code block without text");continue}const s=typeof i.lang=="string"?{lang:i.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(i.items)?i.items:[],s=[];for(const p of o){if(s.length>=K){t("more than "+K+" 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 l=i.style==="numbered"?"numbered":"bulleted";n.push({...a,type:"list",style:l,items:s});break}case"table":{const o=Array.isArray(i.columns)?i.columns:[],s=[];for(const u of o){if(s.length>=B){t("more than "+B+" table columns");break}const A=d(u?.label,I),R=u?.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(i.rows)?i.rows:[],p=[];for(const u of l){if(p.length>=U){t("more than "+U+" table rows");break}const A=Array.isArray(u)?u:[];p.push(s.map((R,Xt)=>d(A[Xt],I)))}const f=d(i.caption,I);n.push({...a,type:"table",columns:s,rows:p,...f?{caption:f}:{}});break}case"kpi":{const o=Array.isArray(i.items)?i.items:[],s=[];for(const l of o){if(s.length>=F){t("more than "+F+" kpi items");break}const p=d(l?.value,40),f=d(l?.label,80);if(!p||!f)continue;const u=l?.tone;s.push(typeof u=="string"&&Le.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(i.text);if(!o){t("a callout without text");continue}const s=d(i.title,200);n.push({...a,type:"callout",tone:Pn(i.tone),...s?{title:s}:{},text:o});break}}}return n}function Kn(e){return JSON.stringify(e).length}function Un(e){return{blocks:e.length,types:e.map(t=>t.type),headings:e.flatMap(t=>t.type==="heading"?[t.text]:[])}}function fe(e){return e.replace(/\|/g,"\\|").replace(/\r?\n/g," ").trim()}function me(e,t,n){const r=e.map((i,a)=>n?.[a]==="right"?"---:":"---");return[`| ${e.map(fe).join(" | ")} |`,`| ${r.join(" | ")} |`,...t.map(i=>`| ${i.map(fe).join(" | ")} |`)]}function Bn(e){switch(e.type){case"heading":return[`${"#".repeat(e.level)} ${e.text}`];case"paragraph":return[e.text];case"quote":return e.text.split(/\r?\n/).map(t=>`> ${t}`);case"code":return[`\`\`\`${e.lang??""}`,e.text,"```"];case"divider":return["---"];case"list":return e.items.map((t,n)=>{const r=e.style==="numbered"?`${n+1}.`:"-";return t.lead?`${r} **${t.lead}** ${t.text}`:`${r} ${t.text}`});case"table":{const t=me(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 me(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 Fn(e,t){const n=[],r=e.some(i=>i.type==="heading"&&i.level===1);t&&!r&&n.push(`# ${t}`);for(const i of e){const a=Bn(i);a.length>0&&n.push(a.join(`
|
|
2
2
|
`))}return`${n.join(`
|
|
3
3
|
|
|
4
4
|
`)}
|
|
5
|
-
`}const z=e=>`user:${e}`,Y=e=>`team:${e}`;function xn(e){const t=new Set;for(const n of e??[])n?.id&&(n.kind==="user"&&t.add(z(n.id)),n.kind==="team"&&t.add(Y(n.id)));return[...t].sort()}function Dn(e,t){return[z(e),...t.map(Y)]}function Pn(e){const t=new Set;for(const n of e??[])n?.kind&&t.add(n.kind);return[...t]}const Pe=["done","escalated"];function $n(e){return Pe.includes(e)}const $e="assignment";function Kn(e){return`${$e}:${e}`}function Un(e,t,n){if(e.direction==="inbound")return!0;if(e.author?.type==="user"&&e.author.id===t)return!1;const i=e.payload?.mentions;return Array.isArray(i)&&i.includes(t)?!0:n==="reply"}function Bn(e){return e.subjectKind&&e.subjectId?{type:e.subjectKind,id:e.subjectId}:void 0}const Ke=12;function Fn(e,t,n=Ke){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 F=["lookup","condition","parallel","for-each"];function G(e){for(const t of e){if(!F.includes(t.type))return`staptype "${t.type}" mag niet meelezen (alleen ${F.join(", ")})`;if(t.type==="parallel")for(const n of t.branches??[]){const i=G(n);if(i)return i}if(t.type==="for-each"){const n=G(t.body??[]);if(n)return n}}return null}function Gn(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 jn(e,t){return e.filter(n=>n.enabled&&Gn(n.ownerScope,t))}function Vn(e){return(e.startsWith("tool:")?e.slice(5):e).replace(/__/g," · ").replace(/\./g," · ").replace(/_/g," ")}const Hn=[{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"}],Wn={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 Ue(e){switch(e.kind){case"user":return`user:${e.userId}`;case"team":return`team:${e.teamId}`;case"org":return"org"}}function Xn(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 Be(e){return Ue(e)}function Fe(e){switch(e.kind){case"personal":return{kind:"user",userId:e.userId};case"team":return{kind:"team",teamId:e.teamId};case"org":return{kind:"org"}}}const Ge=Fe;function zn(e){return e.agentId?{kind:"user",userId:e.agentId}:Ge(e.ownerScope)}function Yn(e){return Be(e)}function qn(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 Jn(e,t){return e.targets.find(n=>n.activityTypes.includes(t))}function Zn(e,t){if(t)return e.targets.find(n=>n.id===t)}function je(e){return e?.kind==="assignment"}function Qn(e){const{trigger:t,agentId:n,target:i,activityType:r,assigneeUserId:a,authorUserId:o}=e;return je(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 Ve(e){return`${e.type}:${e.id}`}const He="interaction";function We(e){return e?.type===He?e.id:void 0}const Xe=64,ze=8e3;function ei(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),ze)}const ti={kind:"workflow",steps:[]};function ni(e){return e?.kind==="workflow"?e.steps:[]}function ii(e){return e?.kind==="procedure"?e.procedure:void 0}const Ye=["done","escalated","failed","stopped"];function ri(e){return Ye.includes(e)}function qe(e){return e==="waiting"}function ai(e){return e==="running"||qe(e)}function q(e){return e.subjectKind&&e.subjectId?{type:e.subjectKind,id:e.subjectId}:void 0}function oi(e){const t=q(e);return t?Ve(t):void 0}function si(e){return We(q(e))}function ci(e,t){const n=e.labels??[];return n.find(i=>i.locale===t)?.label??n[0]?.label??e.url}function li(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 j=[{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 Je(e){const t=(e??"").toLowerCase();return j.find(n=>n.code===t)??j.find(n=>n.code===t.split("-")[0])}function ui(e){return Je(e)?.label??e}function di(e){const t=Je(e);return t?t.english===t.label?`${t.english} (${t.code})`:`${t.english} — ${t.label} (${t.code})`:e}const J=3;function Ze(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>J+1))return 1/0;r=t.get(r)?.parentId}return i}function pi(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&&Qe(e,t,i))return!1;const r=Ze(e,i),a=t?Z(t,n):1;return r+a<=J}function Qe(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 Z(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=>Z(r.id,t,n))):1}const et="en";function tt(e){return e.defaultLocale||e.locale||et}function fi(e){const t=new Set,n=[];for(const i of[tt(e),...e.locales??[]])!i||t.has(i)||(t.add(i),n.push(i));return n}function mi(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 nt=20,it=20,M=300;function g(e){return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu," ").replace(/\s+/g," ").trim()}function rt(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 gi(e,t){const n=rt(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},ge(o)}return ge([{...t,text:n},...r]).slice(0,it)}function ge(e){return[...e].sort((t,n)=>Number(n.corrected)-Number(t.corrected)||n.addedAt-t.addedAt)}function hi(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(-nt),exampleCandidates:at(e,t)}}function at(e,t){const n=g(t);return(e.exampleCandidates??[]).filter(i=>g(i.text)!==n)}function ot(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=>ot(n,t))}const Q=[{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 Q.find(t=>t.id===e)}function Ai(e){return E(e)?.label??e}function yi(e,t="gpt-5-mini"){return E(e)?.defaultModel??t}function Si(e){return Q.filter(t=>t.capabilities.includes(e))}function _i(e){const t=E(e);return!!t&&!t.baseUrl}function Ti(e,t){return t==="text"?!0:E(e)?.attachmentKinds?.includes(t)===!0}function bi(e,t){if(!e.enabled)return"ok";const n=V(e.hardLimitNanos),i=V(e.softLimitNanos);return n!==void 0&&t>=n?"hard":i!==void 0&&t>=i?"soft":"ok"}function V(e){return typeof e=="number"?e:void 0}function st(e,t="month"){const n=new Date(e);return Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),1)}function Ii(e,t="month"){const n=new Date(st(e,t));return`${n.getUTCFullYear()}-${String(n.getUTCMonth()+1).padStart(2,"0")}`}function Mi(e){return e?.listeningEnabled!==!1}function Ci(e){return e.credentialScope?e.credentialScope:(e.authMode??"header")==="header"||e.oauth?.scope==="org"?"shared":"per-user"}function Ni(e){return`mcp__${e}__`}const Oi=new Set(["mail","message"]);function ct(e,t){const n=e.settings?.signatures?.[t];return!n||!n.enabled||!n.body||n.body.trim()===""?null:n}function Ri(e,t,n,i="html"){if(!e)return n;const r=ct(e,t);return r?`${n}${i==="text"?`
|
|
5
|
+
`}const Y=e=>`user:${e}`,q=e=>`team:${e}`;function Gn(e){const t=new Set;for(const n of e??[])n?.id&&(n.kind==="user"&&t.add(Y(n.id)),n.kind==="team"&&t.add(q(n.id)));return[...t].sort()}function jn(e,t){return[Y(e),...t.map(q)]}function Vn(e){const t=new Set;for(const n of e??[])n?.kind&&t.add(n.kind);return[...t]}const $e=["done","escalated"];function Hn(e){return $e.includes(e)}const Ke="assignment";function Wn(e){return`${Ke}:${e}`}function Xn(e,t,n){if(e.direction==="inbound")return!0;if(e.author?.type==="user"&&e.author.id===t)return!1;const r=e.payload?.mentions;return Array.isArray(r)&&r.includes(t)?!0:n==="reply"}function zn(e){return e.subjectKind&&e.subjectId?{type:e.subjectKind,id:e.subjectId}:void 0}const Ue=12;function Yn(e,t,n=Ue){const r=t+1;return e?e.kind==="done"?{status:"done",waitingOn:null,turns:r,reason:e.note}:e.kind==="escalate"?{status:"escalated",waitingOn:null,turns:r,reason:e.reason}:r>=n?{status:"escalated",waitingOn:null,turns:r,reason:`na ${n} beurten nog niet afgerond, dus een mens neemt het over`}:{status:"waiting",waitingOn:e.on,turns:r}:{status:"escalated",waitingOn:null,turns:r,reason:"de agent rondde zijn beurt af zonder te zeggen wat er moet gebeuren (wachten, afronden of overdragen)"}}const qn=new Set(["mail","message"]);function Be(e,t){const n=e.settings?.signatures?.[t];return!n||!n.enabled||!n.body||n.body.trim()===""?null:n}function Jn(e,t,n,r="html"){if(!e)return n;const i=Be(e,t);return i?`${n}${r==="text"?`
|
|
6
6
|
|
|
7
|
-
`:t==="mail"?"<br><br>-- <br>":"<br><br>"}${r.body}`:n}function ki(e){return e.endpoints??[]}const vi=e=>!!e.assignedUserId||!!e.assignedInboxId,wi=e=>e.status==="closed",Li=e=>({urgent:10,high:5,normal:2,low:1})[e.priority]||0,xi=(e,t=30)=>e.title?.length<=t?e.title:`${e.title.substring(0,t)}...`;function Di(e,t){return e.lastActivityAt?!(e.seenBy??[]).includes(t):!1}const Pi=1e3,$i=2e3,Ki=500,Ui=12e3,Bi=4e3,lt=["contact","company"];function Fi(e){if(!e)return!1;const t=e.slice(0,e.indexOf(":"));return lt.includes(t)}function Gi(e,t){const n=e.accumulatedSeconds||0;return e.runningSince?n+Math.max(0,Math.floor((t-e.runningSince)/1e3)):n}function ji(e,t){const n=Math.max(1,Math.ceil(Math.max(0,e)/60));if(!t||t==="exact")return n*60;const i=Number(t);return!Number.isFinite(i)||i<=0?n*60:Math.ceil(n/i)*i*60}function Vi(e){const t=Math.max(0,Math.round(e/60));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`}function Hi(e){const t=Math.max(0,Math.floor(e)),n=a=>String(a).padStart(2,"0"),i=Math.floor(t/60)%60,r=Math.floor(t/3600);return r>0?`${r}:${n(i)}:${n(t%60)}`:`${n(i)}:${n(t%60)}`}function ut(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,48).replace(/^-+|-+$/g,"")}function Wi(e,t){const n=ut(e)||"werksoort",i=new Set(t);if(!i.has(n))return n;for(let r=2;r<500;r++){const a=`${n}-${r}`;if(!i.has(a))return a}return`${n}-${i.size+1}`}function Xi(e,t){const n=e.ownerScope;return!n||n.kind==="org"?!0:t.includes(n.teamId)}function zi(e){return e.filter(t=>!t.archived).sort(dt)}function dt(e,t){const n=(e.order??0)-(t.order??0);return n!==0?n:(e.label||"").localeCompare(t.label||"")}function Yi(e){return e.type==="agent"}const pt="work_item",ft="work_project";function mt(e){return`${pt}:${e}`}function ee(e){return`${ft}:${e}`}function qi(e,t,n){const i=`${e}-${t}`;return n?`${i}-${n}`:i}function Ji(e){const t=/^([A-Za-z0-9]{2,8})-(\d+)(?:-(\d+))?$/.exec((e||"").trim());return t?{projectKey:t[1].toUpperCase(),sequenceNumber:Number(t[2]),...t[3]?{subSequence:Number(t[3])}:{}}:null}function Zi(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,3)||"PRJ"}function Qi(e,t=25){const n=new Set([mt(e.id)]);e.projectId&&n.add(ee(e.projectId));for(const i of e.ancestorKeys??[])n.add(i);for(const i of e.partyKeys??[])n.add(i);return Array.from(n).slice(0,t)}function er(e){return[ee(e.id)]}const R=[{key:"open",label:"status_open",category:"todo",order:0},{key:"in_progress",label:"status_in_progress",category:"in_progress",order:1},{key:"done",label:"status_done",category:"done",order:2}],te=R.map(e=>e.key);function gt(e){return e?.statuses?.length?e.statuses:R}function ht(e,t){return t.find(n=>n.key===e)?.category??"todo"}function tr(e,t){return t.find(n=>n.key===e)}function nr(e){const t=gt(e),n=e?.defaultStatusKey;return n&&t.some(i=>i.key===n)?n:Et(t)[0]?.key??R[0].key}function Et(e){return[...e].sort((t,n)=>{const i=(t.order??0)-(n.order??0);return i!==0?i:(t.label||"").localeCompare(n.label||"")})}function ir(e,t){return ht(e,t)==="done"}function At(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,48).replace(/^-+|-+$/g,"")}function rr(e,t){const n=At(e)||"status",i=new Set([...t,...te]);if(!i.has(n))return n;for(let r=2;r<500;r++){const a=`${n}-${r}`;if(!i.has(a))return a}return`${n}-${i.size+1}`}function ar(e){const t=[];if(!e.length)return[{index:-1,reason:"empty"}];const n=new Set;return e.forEach((i,r)=>{if(!i.key){t.push({index:r,reason:"missing_key"});return}te.includes(i.key)&&t.push({index:r,reason:"reserved_key",key:i.key}),n.has(i.key)&&t.push({index:r,reason:"duplicate_key",key:i.key}),n.add(i.key)}),e.some(i=>i.category==="todo"||i.category==="in_progress")||t.push({index:-1,reason:"no_open"}),e.some(i=>i.category==="done")||t.push({index:-1,reason:"no_done"}),t}const k={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}},yt="NL",or=15,sr=8,cr=Array.from(new Set(Object.values(k).map(e=>e.callingCode))).sort((e,t)=>t.length-e.length);function he(e){if(e)return k[e.trim().toUpperCase()]}function C(e,t){return e.length>=t.nsnMin&&e.length<=t.nsnMax}function Ee(e){if(e.length>or)return null;for(const t of cr){if(!e.startsWith(t))continue;const n=e.slice(t.length);for(const i of Object.values(k)){if(i.callingCode!==t)continue;const r=i.trunkPrefix,a=r&&n.startsWith(r)?n.slice(r.length):n;if(C(a,i))return`+${t}${a}`}return null}return e.length<sr?null:`+${e}`}function lr(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 ur(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 H(e,t){if(!e)return null;const n=lr(e);if(!n)return null;const i=n.startsWith("+"),r=n.replace(/\D/g,"");if(!r)return null;if(i)return Ee(r);if(r.startsWith("00"))return Ee(r.slice(2));const a=he(t)??he(yt);if(!a)return null;const o=a.trunkPrefix;if(o&&r.startsWith(o)){const s=r.slice(o.length);return C(s,a)?`+${a.callingCode}${s}`:null}if(r.startsWith(a.callingCode)){const s=r.slice(a.callingCode.length);if(C(s,a))return`+${a.callingCode}${s}`}return!o&&C(r,a)?`+${a.callingCode}${r}`:null}function dr(e,t=9){const n=(e??"").replace(/\D/g,"");return n.length<t?null:n.slice(-t)}function ne(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 pr(e){const t=ne(e);return t?t.slice(t.lastIndexOf("@")+1):null}const fr=new Set(["co.uk","org.uk","gov.uk","ac.uk","com.au","co.nz","com.br","co.za"]);function St(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 fr.has(n)&&t.length>=3?t.slice(-3).join("."):n}const _t=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 mr(e){const t=St(e);return t?_t.has(t):!1}function gr(e){if(!e)return!1;const t=e.trim().toLowerCase();return t==="tel"||t==="sms"||t==="whatsapp"||t==="fax"}function hr(e,t,n){if(!e||!t)return null;const i=e.trim().toLowerCase();if(i==="tel"||i==="sms"||i==="whatsapp"){const a=H(t,n);return a?`tel:${a}`:null}if(i==="fax"){const a=H(t,n);return a?`fax:${a}`:null}if(i==="mailto"||i==="email"){const a=ne(t);return a?`mailto:${a}`:null}const r=t.trim().toLowerCase();return r?`${i}:${r}`:null}const Er=/(\*\*|__)(?=\S)([\s\S]*?\S)\1/g,Ar=/(\*|_)(?=\S)([^*_\n]*?\S)\1/g;function yr(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>"}${i.body}`:n}function Zn(e){return e.endpoints??[]}const Qn=e=>!!e.assignedUserId||!!e.assignedInboxId,er=e=>e.status==="closed",tr=e=>({urgent:10,high:5,normal:2,low:1})[e.priority]||0,nr=(e,t=30)=>e.title?.length<=t?e.title:`${e.title.substring(0,t)}...`;function rr(e,t){return e.lastActivityAt?!(e.seenBy??[]).includes(t):!1}function ir(e,t){const n=e.labels??[];return n.find(r=>r.locale===t)?.label??n[0]?.label??e.url}function ar(e,t,n){const r=e.translations??[];return r.find(i=>i.locale===t)??(n?r.find(i=>i.locale===n):void 0)??{locale:t}}const 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 Fe(e){const t=(e??"").toLowerCase();return G.find(n=>n.code===t)??G.find(n=>n.code===t.split("-")[0])}function or(e){return Fe(e)?.label??e}function sr(e){const t=Fe(e);return t?t.english===t.label?`${t.english} (${t.code})`:`${t.english} — ${t.label} (${t.code})`:e}const J=3;function Ge(e,t){const n=new Set;let r=1,i=t.get(e)?.parentId;for(;i;){if(n.has(i)||(n.add(i),r++,r>J+1))return 1/0;i=t.get(i)?.parentId}return r}function cr(e,t,n){if(!e)return!0;if(e===t)return!1;const r=new Map(n.map(o=>[o.id,o]));if(!r.has(e)||t&&je(e,t,r))return!1;const i=Ge(e,r),a=t?Z(t,n):1;return i+a<=J}function je(e,t,n){const r=new Set;let i=n.get(e)?.parentId;for(;i;){if(i===t)return!0;if(r.has(i))return!1;r.add(i),i=n.get(i)?.parentId}return!1}function Z(e,t,n=new Set){if(n.has(e))return 1;n.add(e);const r=t.filter(i=>i.parentId===e);return r.length?1+Math.max(...r.map(i=>Z(i.id,t,n))):1}const Ve="en";function He(e){return e.defaultLocale||e.locale||Ve}function lr(e){const t=new Set,n=[];for(const r of[He(e),...e.locales??[]])!r||t.has(r)||(t.add(r),n.push(r));return n}function ur(e,t,n){const r=e.translations??[];return r.find(i=>i.locale===t)?.name??(n?r.find(i=>i.locale===n)?.name:void 0)??e.name}const j=["lookup","condition","parallel","for-each"];function V(e){for(const t of e){if(!j.includes(t.type))return`staptype "${t.type}" mag niet meelezen (alleen ${j.join(", ")})`;if(t.type==="parallel")for(const n of t.branches??[]){const r=V(n);if(r)return r}if(t.type==="for-each"){const n=V(t.body??[]);if(n)return n}}return null}function dr(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 pr(e,t){return e.filter(n=>n.enabled&&dr(n.ownerScope,t))}function fr(e){return e.credentialScope?e.credentialScope:(e.authMode??"header")==="header"||e.oauth?.scope==="org"?"shared":"per-user"}function mr(e){return`mcp__${e}__`}const gr=1e3,hr=2e3,Er=500,Ar=12e3,yr=4e3,We=["contact","company"];function Sr(e){if(!e)return!1;const t=e.slice(0,e.indexOf(":"));return We.includes(t)}function Xe(e){switch(e.kind){case"user":return`user:${e.userId}`;case"team":return`team:${e.teamId}`;case"org":return"org"}}function _r(e){if(typeof e!="string")return;const t=e.trim();if(t==="org")return{kind:"org"};const n=t.indexOf(":");if(n<=0)return;const r=t.slice(0,n),i=t.slice(n+1).trim();if(i){if(r==="user")return{kind:"user",userId:i};if(r==="team")return{kind:"team",teamId:i}}}function ze(e){return Xe(e)}function Ye(e){switch(e.kind){case"personal":return{kind:"user",userId:e.userId};case"team":return{kind:"team",teamId:e.teamId};case"org":return{kind:"org"}}}const qe=Ye;function Tr(e){return e.agentId?{kind:"user",userId:e.agentId}:qe(e.ownerScope)}function br(e){return ze(e)}function Ir(e,t){if(!t)return;let n=e;for(const r of t.split(".")){if(n===null||typeof n!="object")return;n=n[r]}return n}function Mr(e,t){return e.targets.find(n=>n.activityTypes.includes(t))}function Cr(e,t){if(t)return e.targets.find(n=>n.id===t)}function Je(e){return e?.kind==="assignment"}function wr(e){const{trigger:t,agentId:n,target:r,activityType:i,assigneeUserId:a,authorUserId:o}=e;return Je(t)?n?r?r.activityTypes.includes(i)?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 ${r.assigneePath}`:`activity type ${i} does not announce an assignment for ${r.id}`:`assignment target kind "${t.targetKind}" is not declared by any installed app`:"this playbook has no agent, so an assignment can never be for it":"trigger is not an assignment trigger"}function Nr(e){return(e.startsWith("tool:")?e.slice(5):e).replace(/__/g," · ").replace(/\./g," · ").replace(/_/g," ")}const Or=[{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"}],kr={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 Ze(e){return`${e.type}:${e.id}`}const Qe="interaction";function et(e){return e?.type===Qe?e.id:void 0}const tt=64,nt=8e3;function Rr(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),tt),nt)}const vr={kind:"workflow",steps:[]};function Lr(e){return e?.kind==="workflow"?e.steps:[]}function xr(e){return e?.kind==="procedure"?e.procedure:void 0}const rt=["done","escalated","failed","stopped"];function Dr(e){return rt.includes(e)}function it(e){return e==="waiting"}function Pr(e){return e==="running"||it(e)}function Q(e){return e.subjectKind&&e.subjectId?{type:e.subjectKind,id:e.subjectId}:void 0}function $r(e){const t=Q(e);return t?Ze(t):void 0}function Kr(e){return et(Q(e))}function Ur(e,t){const n=e.accumulatedSeconds||0;return e.runningSince?n+Math.max(0,Math.floor((t-e.runningSince)/1e3)):n}function Br(e,t){const n=Math.max(1,Math.ceil(Math.max(0,e)/60));if(!t||t==="exact")return n*60;const r=Number(t);return!Number.isFinite(r)||r<=0?n*60:Math.ceil(n/r)*r*60}function Fr(e){const t=Math.max(0,Math.round(e/60));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`}function Gr(e){const t=Math.max(0,Math.floor(e)),n=a=>String(a).padStart(2,"0"),r=Math.floor(t/60)%60,i=Math.floor(t/3600);return i>0?`${i}:${n(r)}:${n(t%60)}`:`${n(r)}:${n(t%60)}`}function at(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,48).replace(/^-+|-+$/g,"")}function jr(e,t){const n=at(e)||"werksoort",r=new Set(t);if(!r.has(n))return n;for(let i=2;i<500;i++){const a=`${n}-${i}`;if(!r.has(a))return a}return`${n}-${r.size+1}`}function Vr(e,t){const n=e.ownerScope;return!n||n.kind==="org"?!0:t.includes(n.teamId)}function Hr(e){return e.filter(t=>!t.archived).sort(ot)}function ot(e,t){const n=(e.order??0)-(t.order??0);return n!==0?n:(e.label||"").localeCompare(t.label||"")}const st=20,ct=20,M=300;function g(e){return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu," ").replace(/\s+/g," ").trim()}function lt(e){const t=e.replace(/\s+/g," ").trim();if(t.length<=M)return t;const n=t.slice(0,M),r=Math.max(n.lastIndexOf(". "),n.lastIndexOf("! "),n.lastIndexOf("? "));return r>M*.6?n.slice(0,r+1):`${n.trimEnd()}…`}function Wr(e,t){const n=lt(t.text),r=g(n);if(!r||(e.examples??[]).some(o=>g(o)===r))return null;const i=e.exampleCandidates??[],a=i.findIndex(o=>g(o.text)===r);if(a>=0){if(i[a].corrected||!t.corrected)return null;const o=[...i];return o[a]={...o[a],corrected:!0,addedAt:t.addedAt},ge(o)}return ge([{...t,text:n},...i]).slice(0,ct)}function ge(e){return[...e].sort((t,n)=>Number(n.corrected)-Number(t.corrected)||n.addedAt-t.addedAt)}function Xr(e,t){const n=g(t),r=(e.examples??[]).filter(a=>a.trim());return{examples:r.some(a=>g(a)===n)?r:[...r,t].slice(-st),exampleCandidates:ut(e,t)}}function ut(e,t){const n=g(t);return(e.exampleCandidates??[]).filter(r=>g(r.text)!==n)}function dt(e,t){const n=e.ownerScope;return n?n.kind==="org"?!0:n.kind==="team"?!!t&&n.teamId===t:!1:!1}function zr(e,t){return e.filter(n=>dt(n,t))}function Yr(e){return e.type==="agent"}const pt="work_item",ft="work_project";function mt(e){return`${pt}:${e}`}function ee(e){return`${ft}:${e}`}function qr(e,t,n){const r=`${e}-${t}`;return n?`${r}-${n}`:r}function Jr(e){const t=/^([A-Za-z0-9]{2,8})-(\d+)(?:-(\d+))?$/.exec((e||"").trim());return t?{projectKey:t[1].toUpperCase(),sequenceNumber:Number(t[2]),...t[3]?{subSequence:Number(t[3])}:{}}:null}function Zr(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,3)||"PRJ"}function Qr(e,t=25){const n=new Set([mt(e.id)]);e.projectId&&n.add(ee(e.projectId));for(const r of e.ancestorKeys??[])n.add(r);for(const r of e.partyKeys??[])n.add(r);return Array.from(n).slice(0,t)}function ei(e){return[ee(e.id)]}const O=[{key:"open",label:"status_open",category:"todo",order:0},{key:"in_progress",label:"status_in_progress",category:"in_progress",order:1},{key:"done",label:"status_done",category:"done",order:2}],te=O.map(e=>e.key);function gt(e){return e?.statuses?.length?e.statuses:O}function ht(e,t){return t.find(n=>n.key===e)?.category??"todo"}function ti(e,t){return t.find(n=>n.key===e)}function ni(e){const t=gt(e),n=e?.defaultStatusKey;return n&&t.some(r=>r.key===n)?n:Et(t)[0]?.key??O[0].key}function Et(e){return[...e].sort((t,n)=>{const r=(t.order??0)-(n.order??0);return r!==0?r:(t.label||"").localeCompare(n.label||"")})}function ri(e,t){return ht(e,t)==="done"}function At(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,48).replace(/^-+|-+$/g,"")}function ii(e,t){const n=At(e)||"status",r=new Set([...t,...te]);if(!r.has(n))return n;for(let i=2;i<500;i++){const a=`${n}-${i}`;if(!r.has(a))return a}return`${n}-${r.size+1}`}function ai(e){const t=[];if(!e.length)return[{index:-1,reason:"empty"}];const n=new Set;return e.forEach((r,i)=>{if(!r.key){t.push({index:i,reason:"missing_key"});return}te.includes(r.key)&&t.push({index:i,reason:"reserved_key",key:r.key}),n.has(r.key)&&t.push({index:i,reason:"duplicate_key",key:r.key}),n.add(r.key)}),e.some(r=>r.category==="todo"||r.category==="in_progress")||t.push({index:-1,reason:"no_open"}),e.some(r=>r.category==="done")||t.push({index:-1,reason:"no_done"}),t}const oi=new Set(["image/png","image/jpeg","image/jpg","image/gif","image/webp"]),si=new Set(["text/plain","text/markdown","text/csv","application/json","text/html","application/xml","text/xml"]);function yt(e){const t=(e??"").trim().toLowerCase().split(";")[0];return t?oi.has(t)?"image":t==="application/pdf"?"pdf":si.has(t)?"text":t.startsWith("audio/")?"audio":"unsupported":"unsupported"}const h=1024*1024,St={image:5*h,pdf:20*h,text:1*h,audio:20*h},ci=25*h,li=5;function ui(e,t){const n=yt(e);return n==="unsupported"?"unsupported":t>St[n]?"too-large":null}function _t(e){return`${e.kind}:${e.id||e.url||e.title}`}function di(e,t=[]){const n=new Set(t),r=[],i=[];for(const a of e){const o=_t(a);n.has(o)||(n.add(o),r.push(a),i.push(o))}return{sources:r,keys:i}}function pi(e){return e.sessions.filter(t=>t.id!==e.exceptSessionId&&t.state==="connected"&&e.canHold(t.providerId))}function fi(e){return e.sessions.filter(t=>t.id!==e.exceptSessionId&&t.state==="connected"&&!e.canHold(t.providerId))}function mi(e){return e.sessions.some(n=>n.id!==e.exceptSessionId&&(n.state==="connected"||n.state==="on_hold"))?{admit:!1,reason:"busy"}:{admit:!0}}function Tt(e,t){const n=new Set(e.disabledIntents??[]),r=e.intentOverrides??{},i=t.intents.filter(o=>!n.has(o.intent)).map(o=>hi(o,r[o.intent]));if(!e.extraIntents||e.extraIntents.length===0)return i;const a=new Set(i.map(o=>o.intent));for(const o of e.extraIntents)a.has(o.intent)||(i.push(o),a.add(o.intent));return i}function bt(e,t){const n={};for(const r of e.intents){if(!r.togglable)continue;const i=t?.[r.intent];n[r.intent]=i??r.defaultEnabled??!0}return n}function gi(e,t){const n=bt(e,t);return Object.entries(n).filter(([,r])=>!r).map(([r])=>r)}function hi(e,t){return t?{intent:t.intent??e.intent,targetSchemes:t.targetSchemes??e.targetSchemes,transport:t.transport??e.transport}:e}function Ei(e,t){const n=[];for(const r of e){if(!r.enabled)continue;const i=t[r.providerId];if(i)for(const a of Tt(r,i))n.push({channel:r,description:i,capability:a})}return n}function Ai(e,t){return t.filter(n=>n.capability.intent===e)}function It(e,t){return t.filter(n=>n.capability.targetSchemes.includes(e))}function yi(e,t){return It(e.scheme,t)}function Si(e,t,n){const r=[];for(const i of e)for(const a of n)a.capability.intent===t&&a.capability.targetSchemes.includes(i.scheme)&&r.push({channelIntent:a,endpoint:i});return r}var Mt=(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))(Mt||{});const _i={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 Ti(e){return e?_i[e]??"note":"note"}const bi="message_window",Ii="message_templates",Mi={FROM:"from",TO:"to",CC:"cc",BCC:"bcc",ORGANIZER:"organizer",PRESENTER:"presenter",ATTENDEE:"attendee",OWNER:"owner",MEMBER:"member",GUEST:"guest",HOST:"host",PARTICIPANT:"participant"},Ci=(e,t)=>({intent:e,...t}),wi="folder_management",Ni="remote_search",Oi={ok:!1,code:"UNSUPPORTED",message:"Provider does not support this op"},ki="installation-id",Ri={ai:["account.read","account.write","agent.read","agent.write","assignment.read","budget.read","budget.write","connector.read","connector.write","context.read","context.write","conversation.read","conversation.write","lens.read","lens.write","message.read","message.write","playbook.read","playbook.write","profile.read","profile.write","run.read","run.write","settings.read","settings.write","tool.read","transcript.write","usage.read"],analytics:["report.read"],"app-store":["app.publish","app.read","app.write","setting.read","setting.write"],automations:["sync.read","sync.write","webhook.read","webhook.write"],communication:["account.read","account.write","activity-type.read","activity.read","activity.write","attachment.read","attribute.read","attribute.write","calendar.read","calendar.write","channel.read","channel.write","custom-field.read","custom-field.write","folder.read","folder.write","inbox.read","inbox.write","interaction.read","interaction.write","reminder.read","task.read","task.write","template.read","template.write","topic.read","topic.write"],context:["kind.read","kind.write","memory.read","memory.write"],crm:["company.read","company.write","contact.read","contact.write"],"eylo-voip":["account.read","account.write","callflow.read","callflow.write","channel.read","channel.write","contact.read","contact.write","device.read","device.write","group.read","group.write","interaction.read","interaction.write","media.read","media.write","menu.read","menu.write","phone-number.read","phone-number.write","recording.read","recording.write","sip.read","temporal-rule.read","temporal-rule.write","user.read","user.write","vmbox.read","vmbox.write","webhook.read","webhook.write"],google:["account.read","account.write","contact.read"],kb:["article.read","article.write","category.read","category.write","help-center.read","help-center.write","kb.read","kb.write"],mail:["account.write"],meta:["account.read","account.write"],microsoft:["account.read","account.write","contact.read","sync.write"],organization:["billing.read","billing.write","settings.read","settings.write","team.read","team.write"],shopify:["account.read","account.write","order.read"],slack:["thread.read","thread.write"],storage:["artifact.read","artifact.write","file.read","file.write","mount.read","mount.write"],time:["entry.read","entry.write","work-type.read","work-type.write"],user:["user.read","user.write"],work:["item.read","item.write","project.read","project.write"]},ne=9e4,Ct=["out_of_office"],wt=e=>Ct.includes(e);function vi(e,t,n){const r=n-e<ne,i=t?.status&&(!t.expiresAt||t.expiresAt>n)?t:void 0;if(!i?.status)return{online:r,status:r?"available":"offline"};const a=i.status;return!r&&!wt(a)?{online:!1,status:"offline"}:{online:r,status:a,message:i.message}}function Li(e,t){const n=t-e.lastSeenAt<ne,r=n||wt(e.status)?e.status:"offline";return n===e.online&&r===e.status?e:{...e,online:n,status:r}}function xi(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 Di(e){return e.providerAvailable&&e.allowed}const Pi="resources.describe",$i="resources.search",Ki="resources.resolve";function Ui(e){const t=e.indexOf(":");return t===-1?e:e.slice(0,t)}const re="auth";function ie(e){const t=typeof e=="string"?e.match(/apps\/([^/?#]+)/):null;return t?t[1]:null}function Bi(e){const t=ie(e);return t?t!==re:typeof e=="string"&&e.startsWith("/wake")}function Fi(e){return typeof e!="string"||e===""||e==="/"?!0:ie(e)===re}function Gi(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Nt(e){const n=e.split("/").filter(Boolean).map(r=>r.startsWith(":")?r.endsWith("?")?"(?:/[^/]+)?":"/[^/]+":"/"+Gi(r)).join("");return new RegExp(`^${n}\\/?$`)}function Ot(e,t){const n=e.split("/").filter(Boolean),r=t.split("/").filter(Boolean),i={};return n.forEach((a,o)=>{if(a.startsWith(":")){const s=a.endsWith("?")?a.slice(1,-1):a.slice(1),l=r[o];l&&(i[s]=l)}}),i}function kt(e){return e.publicBasePath??`/apps/${e.name}`}function ji(e){const t=[];for(const n of e){if(!n?.name)continue;const r=kt(n);for(const i of n.routes??[]){if(!i.public)continue;const a=i.path==="/"?"":i.path;t.push({appName:n.name,resource:i.resource,pattern:`${r}${a}`,props:i.props})}}return t}function Rt(e,t){const n=e.split("/").filter(Boolean),r=t.split("/").filter(Boolean);for(let i=0;i<Math.min(n.length,r.length);i++){const a=n[i].startsWith(":"),o=r[i].startsWith(":");if(a!==o)return o}return n.length>r.length}function vt(e,t){if(typeof e!="string")return null;let n=null;for(const r of t)Nt(r.pattern).test(e)&&(!n||Rt(r.pattern,n.pattern))&&(n=r);return n?{...n,params:{...n.props,...Ot(n.pattern,e)}}:null}function Vi(e,t){return vt(e,t)!==null}const Hi="sync-source",Wi="sync-target",Xi=20,zi={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]"]},Lt=e=>{let t=e;return Object.values(zi).forEach(n=>{n.forEach(r=>{t=t.replaceAll(r,"")})}),t=t.replace(/\(.*?\)/g,""),t=t.replace(/\[.*?\]/g,""),t},xt=6e4,Dt=8e3,Pt=2,$t=.4,Yi=3,qi=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 Kt(e){const t=new Set;for(const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))n.length<Yi||qi.has(n)||t.add(n);return[...t]}function Ut(e,t){if(!e.length)return 0;if(!t.length)return 1;const n=new Set(t),r=new Set(e);let i=0;for(const a of r)n.has(a)||(i+=1);return i/r.size}function Bt(e,t=xt){const n=e.filter(o=>!o.partial&&typeof o.text=="string");if(!n.length)return{text:"",segmentCount:0};const i=n.reduce((o,s)=>Math.max(o,s.endedAt??0),0)-t;return{text:n.filter(o=>(o.endedAt??0)>=i).map(o=>Lt(o.text).trim()).filter(Boolean).join(" ").replace(/\s+/g," ").trim(),segmentCount:n.length}}const Ft=60;function Ji(e,t,n=Ft){const r=new Set(e),i=[...e];for(const a of t)!a||r.has(a)||(r.add(a),i.push(a));return i.slice(-n)}function Zi(e){const{segments:t,now:n,state:r}=e;if(r.lastTriggerAt&&n-r.lastTriggerAt<Dt)return{trigger:!1,reason:"too_soon"};const i=Bt(t,e.windowMs);if(!i.text)return{trigger:!1,reason:"no_speech"};const a=i.segmentCount-(r.lastSegmentCount??0);if(r.lastQueryTerms&&a<Pt)return{trigger:!1,reason:"too_few_new"};const o=Kt(i.text);return o.length?r.lastQueryTerms?.length&&Ut(o,r.lastQueryTerms)<$t?{trigger:!1,reason:"same_topic"}:{trigger:!0,text:i.text,terms:o,segmentCount:i.segmentCount}:{trigger:!1,reason:"no_speech"}}const k={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}},Gt="NL",Qi=15,ea=8,ta=Array.from(new Set(Object.values(k).map(e=>e.callingCode))).sort((e,t)=>t.length-e.length);function he(e){if(e)return k[e.trim().toUpperCase()]}function C(e,t){return e.length>=t.nsnMin&&e.length<=t.nsnMax}function Ee(e){if(e.length>Qi)return null;for(const t of ta){if(!e.startsWith(t))continue;const n=e.slice(t.length);for(const r of Object.values(k)){if(r.callingCode!==t)continue;const i=r.trunkPrefix,a=i&&n.startsWith(i)?n.slice(i.length):n;if(C(a,r))return`+${t}${a}`}return null}return e.length<ea?null:`+${e}`}function na(e){let t=e.trim();const n=t.match(/^(sips?|tel|whatsapp):/i);n&&(t=t.slice(n[0].length));const r=t.indexOf("@");return r>=0&&(t=t.slice(0,r)),t.trim()}function ra(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 H(e,t){if(!e)return null;const n=na(e);if(!n)return null;const r=n.startsWith("+"),i=n.replace(/\D/g,"");if(!i)return null;if(r)return Ee(i);if(i.startsWith("00"))return Ee(i.slice(2));const a=he(t)??he(Gt);if(!a)return null;const o=a.trunkPrefix;if(o&&i.startsWith(o)){const s=i.slice(o.length);return C(s,a)?`+${a.callingCode}${s}`:null}if(i.startsWith(a.callingCode)){const s=i.slice(a.callingCode.length);if(C(s,a))return`+${a.callingCode}${s}`}return!o&&C(i,a)?`+${a.callingCode}${i}`:null}function ia(e,t=9){const n=(e??"").replace(/\D/g,"");return n.length<t?null:n.slice(-t)}function ae(e){if(!e)return null;const t=e.trim().toLowerCase(),n=t.lastIndexOf("@");if(n<=0||n===t.length-1)return null;const r=t.slice(0,n).split("+")[0],i=t.slice(n+1);return!r||!i.includes(".")?null:`${r}@${i}`}function aa(e){const t=ae(e);return t?t.slice(t.lastIndexOf("@")+1):null}const oa=new Set(["co.uk","org.uk","gov.uk","ac.uk","com.au","co.nz","com.br","co.za"]);function jt(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 oa.has(n)&&t.length>=3?t.slice(-3).join("."):n}const Vt=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 sa(e){const t=jt(e);return t?Vt.has(t):!1}function ca(e){if(!e)return!1;const t=e.trim().toLowerCase();return t==="tel"||t==="sms"||t==="whatsapp"||t==="fax"}function la(e,t,n){if(!e||!t)return null;const r=e.trim().toLowerCase();if(r==="tel"||r==="sms"||r==="whatsapp"){const a=H(t,n);return a?`tel:${a}`:null}if(r==="fax"){const a=H(t,n);return a?`fax:${a}`:null}if(r==="mailto"||r==="email"){const a=ae(t);return a?`mailto:${a}`:null}const i=t.trim().toLowerCase();return i?`${r}:${i}`:null}const ua=/(\*\*|__)(?=\S)([\s\S]*?\S)\1/g,da=/(\*|_)(?=\S)([^*_\n]*?\S)\1/g;function pa(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(
|
|
10
|
-
`);for(let n=0;n<t.length;n++)if(
|
|
9
|
+
`),t=t.replace(ua,"$2"),t=t.replace(da,"$2"),t=t.replace(/~~(?=\S)([\s\S]*?\S)~~/g,"$1"),t=t.replace(/`([^`\n]+)`/g,"$1"),t.replace(/\s+/g," ").trim()}const fa=[/<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],Ae=/^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i,ma=/^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;function ga(e){const t=e.split(`
|
|
10
|
+
`);for(let n=0;n<t.length;n++)if(ma.test(t[n])||Ae.test(t[n])&&t.slice(n+1,n+4).some(r=>Ae.test(r)))return t.slice(0,n).join(`
|
|
11
11
|
`).trim();return e}function ye(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
|
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
`),t=t.replace(/<\/(td|th)>/gi," "),t=t.replace(/<[^>]+>/g,""),t=t.replace(/<[^>]*$/,""),t}function Se(e){return!Number.isInteger(e)||e<0||e>1114111?null:String.fromCodePoint(e)}function _e(e){return e.replace(/ /gi," ").replace(/</gi,"<").replace(/>/gi,">").replace(/"/gi,'"').replace(/&#(\d+);/g,(t,n)=>Se(Number(n))??t).replace(/&#x([0-9a-f]+);/gi,(t,n)=>Se(parseInt(n,16))??t).replace(/&/gi,"&")}function Te(e){return e.replace(/\r/g,"").replace(/[ \t]+/g," ").replace(/ *\n */g,`
|
|
16
16
|
`).replace(/\n{3,}/g,`
|
|
17
17
|
|
|
18
|
-
`).trim()}function br(e){if(typeof e!="string"||!e)return"";let t=e.length;for(const a of Sr){const o=e.search(a);o>=0&&o<t&&(t=o)}const n=e.slice(0,t);let i=Te(_e(ye(n)));return i||(i=Te(_e(ye(e)))),Tr(i)||i}const Ir=/(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i,Mr=/\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;function Cr(e,t){return!!(e&&Ir.test(e)||t&&Mr.test(t))}const Tt=3,bt=600;function Nr(e,t){return e>=Tt||t>=bt}const Or=new Set(["image/png","image/jpeg","image/jpg","image/gif","image/webp"]),Rr=new Set(["text/plain","text/markdown","text/csv","application/json","text/html","application/xml","text/xml"]);function It(e){const t=(e??"").trim().toLowerCase().split(";")[0];return t?Or.has(t)?"image":t==="application/pdf"?"pdf":Rr.has(t)?"text":t.startsWith("audio/")?"audio":"unsupported":"unsupported"}const h=1024*1024,Mt={image:5*h,pdf:20*h,text:1*h,audio:20*h},kr=25*h,vr=5;function wr(e,t){const n=It(e);return n==="unsupported"?"unsupported":t>Mt[n]?"too-large":null}function Ct(e){return`${e.kind}:${e.id||e.url||e.title}`}function Lr(e,t=[]){const n=new Set(t),i=[],r=[];for(const a of e){const o=Ct(a);n.has(o)||(n.add(o),i.push(a),r.push(o))}return{sources:i,keys:r}}function xr(e){return e.sessions.filter(t=>t.id!==e.exceptSessionId&&t.state==="connected"&&e.canHold(t.providerId))}function Dr(e){return e.sessions.filter(t=>t.id!==e.exceptSessionId&&t.state==="connected"&&!e.canHold(t.providerId))}function Pr(e){return e.sessions.some(n=>n.id!==e.exceptSessionId&&(n.state==="connected"||n.state==="on_hold"))?{admit:!1,reason:"busy"}:{admit:!0}}function Nt(e,t){const n=new Set(e.disabledIntents??[]),i=e.intentOverrides??{},r=t.intents.filter(o=>!n.has(o.intent)).map(o=>Kr(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 Ot(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 $r(e,t){const n=Ot(e,t);return Object.entries(n).filter(([,i])=>!i).map(([i])=>i)}function Kr(e,t){return t?{intent:t.intent??e.intent,targetSchemes:t.targetSchemes??e.targetSchemes,transport:t.transport??e.transport}:e}function Ur(e,t){const n=[];for(const i of e){if(!i.enabled)continue;const r=t[i.providerId];if(r)for(const a of Nt(i,r))n.push({channel:i,description:r,capability:a})}return n}function Br(e,t){return t.filter(n=>n.capability.intent===e)}function Rt(e,t){return t.filter(n=>n.capability.targetSchemes.includes(e))}function Fr(e,t){return Rt(e.scheme,t)}function Gr(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 kt=(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))(kt||{});const jr={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 Vr(e){return e?jr[e]??"note":"note"}const Hr="message_window",Wr="message_templates",Xr={FROM:"from",TO:"to",CC:"cc",BCC:"bcc",ORGANIZER:"organizer",PRESENTER:"presenter",ATTENDEE:"attendee",OWNER:"owner",MEMBER:"member",GUEST:"guest",HOST:"host",PARTICIPANT:"participant"},zr=(e,t)=>({intent:e,...t}),Yr="folder_management",qr="remote_search",Jr={ok:!1,code:"UNSUPPORTED",message:"Provider does not support this op"},Zr="resources.describe",Qr="resources.search",ea="resources.resolve";function ta(e){const t=e.indexOf(":");return t===-1?e:e.slice(0,t)}const ie="auth";function re(e){const t=typeof e=="string"?e.match(/apps\/([^/?#]+)/):null;return t?t[1]:null}function na(e){const t=re(e);return t?t!==ie:typeof e=="string"&&e.startsWith("/wake")}function ia(e){return typeof e!="string"||e===""||e==="/"?!0:re(e)===ie}function ra(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function vt(e){const n=e.split("/").filter(Boolean).map(i=>i.startsWith(":")?i.endsWith("?")?"(?:/[^/]+)?":"/[^/]+":"/"+ra(i)).join("");return new RegExp(`^${n}\\/?$`)}function wt(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),l=i[o];l&&(r[s]=l)}}),r}function Lt(e){return e.publicBasePath??`/apps/${e.name}`}function aa(e){const t=[];for(const n of e){if(!n?.name)continue;const i=Lt(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 xt(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 Dt(e,t){if(typeof e!="string")return null;let n=null;for(const i of t)vt(i.pattern).test(e)&&(!n||xt(i.pattern,n.pattern))&&(n=i);return n?{...n,params:{...n.props,...wt(n.pattern,e)}}:null}function oa(e,t){return Dt(e,t)!==null}const sa="sync-source",ca="sync-target",la=20,ua={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]"]},Pt=e=>{let t=e;return Object.values(ua).forEach(n=>{n.forEach(i=>{t=t.replaceAll(i,"")})}),t=t.replace(/\(.*?\)/g,""),t=t.replace(/\[.*?\]/g,""),t},$t=6e4,Kt=8e3,Ut=2,Bt=.4,da=3,pa=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 Ft(e){const t=new Set;for(const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))n.length<da||pa.has(n)||t.add(n);return[...t]}function Gt(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 jt(e,t=$t){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=>Pt(o.text).trim()).filter(Boolean).join(" ").replace(/\s+/g," ").trim(),segmentCount:n.length}}const Vt=60;function fa(e,t,n=Vt){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 ma(e){const{segments:t,now:n,state:i}=e;if(i.lastTriggerAt&&n-i.lastTriggerAt<Kt)return{trigger:!1,reason:"too_soon"};const r=jt(t,e.windowMs);if(!r.text)return{trigger:!1,reason:"no_speech"};const a=r.segmentCount-(i.lastSegmentCount??0);if(i.lastQueryTerms&&a<Ut)return{trigger:!1,reason:"too_few_new"};const o=Ft(r.text);return o.length?i.lastQueryTerms?.length&&Gt(o,i.lastQueryTerms)<Bt?{trigger:!1,reason:"same_topic"}:{trigger:!0,text:r.text,terms:o,segmentCount:r.segmentCount}:{trigger:!1,reason:"no_speech"}}const ae=9e4,Ht=["out_of_office"],Wt=e=>Ht.includes(e);function ga(e,t,n){const i=n-e<ae,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 ha(e,t){const n=t-e.lastSeenAt<ae,i=n||Wt(e.status)?e.status:"offline";return n===e.online&&i===e.status?e:{...e,online:n,status:i}}function Ea(e,t){return e?.teamId&&t.includes(e.teamId)?{teamId:e.teamId,mustChoose:!1}:t.length===1?{teamId:t[0],mustChoose:!1}:{teamId:void 0,mustChoose:t.length>1}}function Aa(e){return e.providerAvailable&&e.allowed}const ya="installation-id";exports.ACTIVITY_CATALOG=m;exports.AI_ATTACHMENT_LIMITS=Mt;exports.AI_ATTACHMENT_MAX_PER_TURN=vr;exports.AI_ATTACHMENT_TURN_BUDGET=kr;exports.AI_VENDORS=Q;exports.ALLOWED_LINK_SCHEMES=Le;exports.ARTIFACT_MAX_BLOCKS=P;exports.ARTIFACT_MAX_BODY_BYTES=Tn;exports.ARTIFACT_MAX_CELL_LEN=I;exports.ARTIFACT_MAX_KPI_ITEMS=B;exports.ARTIFACT_MAX_LIST_ITEMS=$;exports.ARTIFACT_MAX_TABLE_COLUMNS=U;exports.ARTIFACT_MAX_TABLE_ROWS=K;exports.ARTIFACT_MAX_TEXT_LEN=X;exports.ASSIGNMENT_SCOPE_KIND=$e;exports.AUTH_APP_NAME=ie;exports.ActivityTypeRegistry=Ce;exports.BUILT_IN_ONLY=dn;exports.CADENCE_FLOOR_MS=Kt;exports.CADENCE_MIN_NEW_SEGMENTS=Ut;exports.CADENCE_MIN_NOVELTY=Bt;exports.CADENCE_WINDOW_MS=$t;exports.CLASSIFY_VARS=Wn;exports.CORE_DIMENSIONS=hn;exports.CommunicationScheme=kt;exports.DEFAULT_MEMORY_BUDGET=Bi;exports.DEFAULT_PHONE_REGION=yt;exports.EMPTY_WORKFLOW=ti;exports.FEATURE_FOLDER_MANAGEMENT=Yr;exports.FEATURE_REMOTE_SEARCH=qr;exports.INSTALLATION_HEADER=ya;exports.INTERACTION_KIND=He;exports.InteractionParticipantRole=Xr;exports.KB_FALLBACK_LOCALE=et;exports.KB_LOCALES=j;exports.LOOSE_STATUSES=R;exports.MAX_ACTIONS=b;exports.MAX_ASSIGNMENT_TURNS=Ke;exports.MAX_BLOCKS=D;exports.MAX_COLLECTION_DEPTH=J;exports.MAX_FIELDS=_;exports.MAX_LIST_ITEMS=T;exports.MAX_MEMORY_BROWSE=Pi;exports.MAX_MEMORY_BUDGET=Ui;exports.MAX_MEMORY_CHARS=$i;exports.MAX_SHOWN_KEYS=Vt;exports.MAX_TOPIC_CANDIDATES=it;exports.MAX_TOPIC_EXAMPLES=nt;exports.MAX_TOPIC_EXAMPLE_CHARS=M;exports.MIN_MEMORY_BUDGET=Ki;exports.PHONE_REGIONS=k;exports.PRESENCE_ONLINE_WINDOW_MS=ae;exports.PRESENCE_SURVIVES_OFFLINE=Ht;exports.PROVIDER_FEATURE_MESSAGE_TEMPLATES=Wr;exports.PROVIDER_FEATURE_MESSAGE_WINDOW=Hr;exports.PUBLIC_EMAIL_DOMAINS=_t;exports.READ_STEP_TYPES=F;exports.RELATED_SUBJECT_KINDS=lt;exports.RESERVED_STATUS_KEYS=te;exports.RESOURCE_DESCRIBE_SERVICE=Zr;exports.RESOURCE_RESOLVE_SERVICE=ea;exports.RESOURCE_SEARCH_SERVICE=Qr;exports.SIGNATURE_INTENTS=Oi;exports.STEP_MAX_TOKENS_MAX=ze;exports.STEP_MAX_TOKENS_MIN=Xe;exports.SUMMARY_MIN_LAST_CHARS=bt;exports.SUMMARY_MIN_MESSAGES=Tt;exports.SYNC_RUN_MAX_ERRORS=la;exports.SYNC_SOURCE_PROVIDER_GROUP=sa;exports.SYNC_TARGET_PROVIDER_GROUP=ca;exports.TERMINAL_ASSIGNMENT_STATUSES=Pe;exports.TERMINAL_RUN_STATUSES=Ye;exports.TRIGGER_VARS=Hn;exports.UNSUPPORTED=Jr;exports.USAGE_DIMENSIONS=Re;exports.USAGE_DIMENSION_IDS=ke;exports.WORK_ITEM_SCOPE_KIND=pt;exports.WORK_PROJECT_SCOPE_KIND=ft;exports.acceptExampleCandidate=hi;exports.actingIdentityKey=Be;exports.activeWorkTypes=zi;exports.activityIconOf=Zt;exports.activityJoinUrl=ln;exports.activitySnippet=Ie;exports.activityTextParams=Me;exports.activityTimelineText=cn;exports.activityTimestamp=gn;exports.activityTypeInfo=c;exports.actorKey=Yn;exports.addExampleCandidate=gi;exports.agePresenceEntry=ha;exports.aiAttachmentKind=It;exports.aiAttachmentRejection=wr;exports.aiBudgetLimit=V;exports.aiBudgetPeriodKey=Ii;exports.aiBudgetPeriodStart=st;exports.aiBudgetState=bi;exports.aiVendorAcceptsAttachment=Ti;exports.aiVendorDefaultModel=yi;exports.aiVendorLabel=Ai;exports.aiVendorNeedsBaseUrl=_i;exports.aiVendorsWith=Si;exports.appNameFromPath=re;exports.applyRounding=ji;exports.applySignature=Ri;exports.artifactBodyBytes=kn;exports.artifactOutline=vn;exports.artifactToMarkdown=Ln;exports.assignmentMismatch=Qn;exports.assignmentScopeKey=Kn;exports.assignmentSubject=Bn;exports.buildActivityPreview=fn;exports.buildChannelIntents=Ur;exports.buildShareKeys=xn;exports.buildWindow=jt;exports.canNestUnder=pi;exports.carriesText=nn;exports.categoryLabel=mi;exports.categoryOf=ht;exports.channelKindForScheme=Vr;exports.channelKindOf=Qt;exports.clampStepMaxTokens=ei;exports.cleanMessageText=br;exports.compareWorkTypes=dt;exports.decideAssignmentState=Fn;exports.decideCadence=ma;exports.decideIncomingCall=Pr;exports.defaultLocaleOf=tt;exports.defaultStatusKey=nr;exports.defineIntent=zr;exports.depthOf=Ze;exports.derivePresence=ga;exports.disabledIntentsFromCapabilities=$r;exports.elapsedSeconds=Gi;exports.emailDomain=pr;exports.endpointKey=hr;exports.extractParams=wt;exports.extractTerms=Ft;exports.filterByEndpoint=Fr;exports.filterByIntent=Br;exports.filterByTargetScheme=Rt;exports.findAiVendor=E;exports.flattenLocales=En;exports.floorToPeriod=Oe;exports.formatActingIdentity=Ue;exports.formatClock=Hi;exports.formatHm=Vi;exports.formatItemKey=qi;exports.formatPeriod=Ne;exports.freshSources=Lr;exports.getActivitySeenUserIds=mn;exports.getContactEndpoints=ki;exports.getShortTitle=xi;exports.getUrgencyScore=Li;exports.heightOf=Z;exports.helpCenterText=li;exports.humanizeAction=Vn;exports.interactionIdOf=We;exports.isAgentUser=Yi;exports.isAssigned=vi;exports.isAssignmentTerminal=$n;exports.isAssignmentTrigger=je;exports.isChatMessageActivity=Yt;exports.isClosed=wi;exports.isConnectedType=on;exports.isDeepLink=na;exports.isDescendant=Qe;exports.isEmailActivity=zt;exports.isInFlight=ai;exports.isInteractionUnseen=Di;exports.isLandingPath=ia;exports.isLikelyBulk=Cr;exports.isMessageShape=W;exports.isMessageType=en;exports.isMoreSpecificPattern=xt;exports.isPaused=qe;exports.isPlaybookAuthoredType=an;exports.isPublicEmailDomain=mr;exports.isPublicPath=oa;exports.isReplyableType=tn;exports.isTerminal=ri;exports.isThreadLongEnough=Nr;exports.isTranscriptType=sn;exports.isWorkClosed=ir;exports.isWorkTypeVisible=Xi;exports.itemDossierKeys=Qi;exports.ladderFor=gt;exports.linkLabel=ci;exports.listeningAllowed=Mi;exports.localeInstruction=di;exports.localeName=ui;exports.localesOf=fi;exports.looksLikeEmail=ur;exports.matchContactToIntents=Gr;exports.matchPublicRoute=Dt;exports.mcpCredentialScope=Ci;exports.mcpToolPrefix=Ni;exports.mergeShownKeys=fa;exports.messageCountsAs=rn;exports.needsPhoneRegion=gr;exports.normalizeArtifactBlocks=Rn;exports.normalizeBlocks=Jt;exports.normalizeEmail=ne;exports.normalizeExample=g;exports.novelty=Gt;exports.parseActingIdentity=Xn;exports.parseItemKey=Ji;exports.pathToRegex=vt;exports.periodsInRange=Sn;exports.phoneSuffix=dr;exports.plainTextFromMarkdown=yr;exports.playbookActor=Ge;exports.procedureOf=ii;exports.projectDossierKeys=er;exports.publicBasePathFor=Lt;exports.publicRoutePatterns=aa;exports.readPath=N;exports.readStepError=G;exports.refKey=Ve;exports.registrableDomain=St;exports.rejectExampleCandidate=at;exports.relatedByDefault=Fi;exports.resolveAccountCapabilities=Ot;exports.resolveActivityText=O;exports.resolveChannelIntents=Nt;exports.resolveSignature=ct;exports.resolveWorkMode=Ea;exports.resourceKindOf=ta;exports.runActor=zn;exports.runInteractionId=si;exports.sanitizeInline=De;exports.sanitizeTranscript=Pt;exports.selectLenses=jn;exports.sessionsHoldCannotReach=Dr;exports.sessionsToHold=xr;exports.shareKeyForTeam=Y;exports.shareKeyForUser=z;exports.shareKeysForViewer=Dn;exports.shouldRunAudioPipeline=Aa;exports.sortStatuses=Et;exports.sourceKey=Ct;exports.statusIn=tr;exports.stepsOf=ni;exports.stripHtml=be;exports.subjectKeyOf=oi;exports.subjectOf=q;exports.suggestProjectKey=Zi;exports.targetById=Zn;exports.targetForActivityType=Jn;exports.toActingIdentity=Fe;exports.toE164=H;exports.toolSourceKinds=Pn;exports.topicOfferedForTeam=ot;exports.topicsForTeam=Ei;exports.truncateExample=rt;exports.uniqueWorkStatusKey=rr;exports.uniqueWorkTypeKey=Wi;exports.usageMetricId=ve;exports.usageMetrics=_n;exports.validateStatuses=ar;exports.valueAtPath=qn;exports.wakesAssignment=Un;exports.workItemScopeKey=mt;exports.workProjectScopeKey=ee;exports.workStatusKey=At;exports.workTypeKey=ut;
|
|
18
|
+
`).trim()}function ha(e){if(typeof e!="string"||!e)return"";let t=e.length;for(const a of fa){const o=e.search(a);o>=0&&o<t&&(t=o)}const n=e.slice(0,t);let r=Te(_e(ye(n)));return r||(r=Te(_e(ye(e)))),ga(r)||r}const Ea=/(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i,Aa=/\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;function ya(e,t){return!!(e&&Ea.test(e)||t&&Aa.test(t))}const Ht=3,Wt=600;function Sa(e,t){return e>=Ht||t>=Wt}exports.ACTIVITY_CATALOG=m;exports.AI_ATTACHMENT_LIMITS=St;exports.AI_ATTACHMENT_MAX_PER_TURN=li;exports.AI_ATTACHMENT_TURN_BUDGET=ci;exports.AI_VENDORS=X;exports.ALLOWED_LINK_SCHEMES=xe;exports.APP_PERMISSIONS=Ri;exports.ARTIFACT_MAX_BLOCKS=$;exports.ARTIFACT_MAX_BODY_BYTES=kn;exports.ARTIFACT_MAX_CELL_LEN=I;exports.ARTIFACT_MAX_KPI_ITEMS=F;exports.ARTIFACT_MAX_LIST_ITEMS=K;exports.ARTIFACT_MAX_TABLE_COLUMNS=B;exports.ARTIFACT_MAX_TABLE_ROWS=U;exports.ARTIFACT_MAX_TEXT_LEN=z;exports.ASSIGNMENT_SCOPE_KIND=Ke;exports.AUTH_APP_NAME=re;exports.ActivityTypeRegistry=Ce;exports.BUILT_IN_ONLY=dn;exports.CADENCE_FLOOR_MS=Dt;exports.CADENCE_MIN_NEW_SEGMENTS=Pt;exports.CADENCE_MIN_NOVELTY=$t;exports.CADENCE_WINDOW_MS=xt;exports.CLASSIFY_VARS=kr;exports.CORE_DIMENSIONS=Mn;exports.CommunicationScheme=Mt;exports.DEFAULT_MEMORY_BUDGET=yr;exports.DEFAULT_PHONE_REGION=Gt;exports.EMPTY_WORKFLOW=vr;exports.FEATURE_FOLDER_MANAGEMENT=wi;exports.FEATURE_REMOTE_SEARCH=Ni;exports.INSTALLATION_HEADER=ki;exports.INTERACTION_KIND=Qe;exports.InteractionParticipantRole=Mi;exports.KB_FALLBACK_LOCALE=Ve;exports.KB_LOCALES=G;exports.LOOSE_STATUSES=O;exports.MAX_ACTIONS=b;exports.MAX_ASSIGNMENT_TURNS=Ue;exports.MAX_BLOCKS=D;exports.MAX_COLLECTION_DEPTH=J;exports.MAX_FIELDS=_;exports.MAX_LIST_ITEMS=T;exports.MAX_MEMORY_BROWSE=gr;exports.MAX_MEMORY_BUDGET=Ar;exports.MAX_MEMORY_CHARS=hr;exports.MAX_SHOWN_KEYS=Ft;exports.MAX_TOPIC_CANDIDATES=ct;exports.MAX_TOPIC_EXAMPLES=st;exports.MAX_TOPIC_EXAMPLE_CHARS=M;exports.MIN_MEMORY_BUDGET=Er;exports.PHONE_REGIONS=k;exports.PRESENCE_ONLINE_WINDOW_MS=ne;exports.PRESENCE_SURVIVES_OFFLINE=Ct;exports.PROVIDER_FEATURE_MESSAGE_TEMPLATES=Ii;exports.PROVIDER_FEATURE_MESSAGE_WINDOW=bi;exports.PUBLIC_EMAIL_DOMAINS=Vt;exports.READ_STEP_TYPES=j;exports.RELATED_SUBJECT_KINDS=We;exports.RESERVED_STATUS_KEYS=te;exports.RESOURCE_DESCRIBE_SERVICE=Pi;exports.RESOURCE_RESOLVE_SERVICE=Ki;exports.RESOURCE_SEARCH_SERVICE=$i;exports.SIGNATURE_INTENTS=qn;exports.STEP_MAX_TOKENS_MAX=nt;exports.STEP_MAX_TOKENS_MIN=tt;exports.SUMMARY_MIN_LAST_CHARS=Wt;exports.SUMMARY_MIN_MESSAGES=Ht;exports.SYNC_RUN_MAX_ERRORS=Xi;exports.SYNC_SOURCE_PROVIDER_GROUP=Hi;exports.SYNC_TARGET_PROVIDER_GROUP=Wi;exports.TERMINAL_ASSIGNMENT_STATUSES=$e;exports.TERMINAL_RUN_STATUSES=rt;exports.TRIGGER_VARS=Or;exports.UNSUPPORTED=Oi;exports.USAGE_DIMENSIONS=ke;exports.USAGE_DIMENSION_IDS=Re;exports.WORK_ITEM_SCOPE_KIND=pt;exports.WORK_PROJECT_SCOPE_KIND=ft;exports.acceptExampleCandidate=Xr;exports.actingIdentityKey=ze;exports.activeWorkTypes=Hr;exports.activityIconOf=qt;exports.activityJoinUrl=sn;exports.activitySnippet=Ie;exports.activityTextParams=Me;exports.activityTimelineText=on;exports.activityTimestamp=fn;exports.activityTypeInfo=c;exports.actorKey=br;exports.addExampleCandidate=Wr;exports.agePresenceEntry=Li;exports.aiAttachmentKind=yt;exports.aiAttachmentRejection=ui;exports.aiBudgetLimit=P;exports.aiBudgetPeriodKey=Tn;exports.aiBudgetPeriodStart=we;exports.aiBudgetState=_n;exports.aiVendorAcceptsAttachment=Sn;exports.aiVendorDefaultModel=En;exports.aiVendorLabel=hn;exports.aiVendorNeedsBaseUrl=yn;exports.aiVendorsWith=An;exports.appNameFromPath=ie;exports.applyRounding=Br;exports.applySignature=Jn;exports.artifactBodyBytes=Kn;exports.artifactOutline=Un;exports.artifactToMarkdown=Fn;exports.assignmentMismatch=wr;exports.assignmentScopeKey=Wn;exports.assignmentSubject=zn;exports.buildActivityPreview=ln;exports.buildChannelIntents=Ei;exports.buildShareKeys=Gn;exports.buildWindow=Bt;exports.canNestUnder=cr;exports.carriesText=en;exports.categoryLabel=ur;exports.categoryOf=ht;exports.channelKindForScheme=Ti;exports.channelKindOf=Jt;exports.clampStepMaxTokens=Rr;exports.cleanMessageText=ha;exports.compareWorkTypes=ot;exports.decideAssignmentState=Yn;exports.decideCadence=Zi;exports.decideIncomingCall=mi;exports.defaultLocaleOf=He;exports.defaultStatusKey=ni;exports.defineIntent=Ci;exports.depthOf=Ge;exports.derivePresence=vi;exports.disabledIntentsFromCapabilities=gi;exports.elapsedSeconds=Ur;exports.emailDomain=aa;exports.endpointKey=la;exports.extractParams=Ot;exports.extractTerms=Kt;exports.filterByEndpoint=yi;exports.filterByIntent=Ai;exports.filterByTargetScheme=It;exports.findAiVendor=E;exports.flattenLocales=In;exports.floorToPeriod=Oe;exports.formatActingIdentity=Xe;exports.formatClock=Gr;exports.formatHm=Fr;exports.formatItemKey=qr;exports.formatPeriod=Ne;exports.freshSources=di;exports.getActivitySeenUserIds=pn;exports.getContactEndpoints=Zn;exports.getShortTitle=nr;exports.getUrgencyScore=tr;exports.heightOf=Z;exports.helpCenterText=ar;exports.humanizeAction=Nr;exports.interactionIdOf=et;exports.isAgentUser=Yr;exports.isAssigned=Qn;exports.isAssignmentTerminal=Hn;exports.isAssignmentTrigger=Je;exports.isChatMessageActivity=gn;exports.isClosed=er;exports.isConnectedType=rn;exports.isDeepLink=Bi;exports.isDescendant=je;exports.isEmailActivity=mn;exports.isInFlight=Pr;exports.isInteractionUnseen=rr;exports.isLandingPath=Fi;exports.isLikelyBulk=ya;exports.isMessageShape=W;exports.isMessageType=Zt;exports.isMoreSpecificPattern=Rt;exports.isPaused=it;exports.isPlaybookAuthoredType=nn;exports.isPublicEmailDomain=sa;exports.isPublicPath=Vi;exports.isReplyableType=Qt;exports.isTerminal=Dr;exports.isThreadLongEnough=Sa;exports.isTranscriptType=an;exports.isWorkClosed=ri;exports.isWorkTypeVisible=Vr;exports.itemDossierKeys=Qr;exports.ladderFor=gt;exports.linkLabel=ir;exports.listeningAllowed=bn;exports.localeInstruction=sr;exports.localeName=or;exports.localesOf=lr;exports.looksLikeEmail=ra;exports.matchContactToIntents=Si;exports.matchPublicRoute=vt;exports.mcpCredentialScope=fr;exports.mcpToolPrefix=mr;exports.mergeShownKeys=Ji;exports.messageCountsAs=tn;exports.needsPhoneRegion=ca;exports.normalizeArtifactBlocks=$n;exports.normalizeBlocks=Yt;exports.normalizeEmail=ae;exports.normalizeExample=g;exports.novelty=Ut;exports.parseActingIdentity=_r;exports.parseItemKey=Jr;exports.pathToRegex=Nt;exports.periodsInRange=Nn;exports.phoneSuffix=ia;exports.plainTextFromMarkdown=pa;exports.playbookActor=qe;exports.procedureOf=xr;exports.projectDossierKeys=ei;exports.publicBasePathFor=kt;exports.publicRoutePatterns=ji;exports.readPath=w;exports.readStepError=V;exports.refKey=Ze;exports.registrableDomain=jt;exports.rejectExampleCandidate=ut;exports.relatedByDefault=Sr;exports.resolveAccountCapabilities=bt;exports.resolveActivityText=N;exports.resolveChannelIntents=Tt;exports.resolveSignature=Be;exports.resolveWorkMode=xi;exports.resourceKindOf=Ui;exports.runActor=Tr;exports.runInteractionId=Kr;exports.sanitizeInline=Pe;exports.sanitizeTranscript=Lt;exports.selectLenses=pr;exports.sessionsHoldCannotReach=fi;exports.sessionsToHold=pi;exports.shareKeyForTeam=q;exports.shareKeyForUser=Y;exports.shareKeysForViewer=jn;exports.shouldRunAudioPipeline=Di;exports.sortStatuses=Et;exports.sourceKey=_t;exports.statusIn=ti;exports.stepsOf=Lr;exports.stripHtml=be;exports.subjectKeyOf=$r;exports.subjectOf=Q;exports.suggestProjectKey=Zr;exports.targetById=Cr;exports.targetForActivityType=Mr;exports.toActingIdentity=Ye;exports.toE164=H;exports.toolSourceKinds=Vn;exports.topicOfferedForTeam=dt;exports.topicsForTeam=zr;exports.truncateExample=lt;exports.uniqueWorkStatusKey=ii;exports.uniqueWorkTypeKey=jr;exports.usageMetricId=ve;exports.usageMetrics=On;exports.validateStatuses=ai;exports.valueAtPath=Ir;exports.wakesAssignment=Xn;exports.workItemScopeKey=mt;exports.workProjectScopeKey=ee;exports.workStatusKey=At;exports.workTypeKey=at;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
export * from './entities/activity';
|
|
2
|
-
export * from './entities/analytics';
|
|
3
|
-
export * from './entities/artifact';
|
|
4
|
-
export * from './entities/attribute';
|
|
5
|
-
export * from './entities/assignment';
|
|
6
|
-
export * from './entities/live-lens';
|
|
7
|
-
export * from './entities/playbook';
|
|
8
|
-
export * from './entities/kb';
|
|
9
|
-
export * from './entities/topic';
|
|
10
2
|
export * from './entities/ai-account';
|
|
11
3
|
export * from './entities/ai-budget';
|
|
12
4
|
export * from './entities/ai-context';
|
|
@@ -14,63 +6,72 @@ export * from './entities/ai-conversation';
|
|
|
14
6
|
export * from './entities/ai-message';
|
|
15
7
|
export * from './entities/ai-profile';
|
|
16
8
|
export * from './entities/ai-settings/types';
|
|
17
|
-
export * from './entities/
|
|
9
|
+
export * from './entities/analytics';
|
|
10
|
+
export * from './entities/artifact';
|
|
11
|
+
export * from './entities/assignment';
|
|
12
|
+
export * from './entities/attribute';
|
|
13
|
+
export * from './entities/calendar-event';
|
|
18
14
|
export * from './entities/channel';
|
|
19
15
|
export * from './entities/communication';
|
|
20
16
|
export * from './entities/company';
|
|
21
17
|
export * from './entities/contact';
|
|
22
|
-
export * from './entities/scope';
|
|
23
18
|
export * from './entities/contact-source';
|
|
24
19
|
export * from './entities/custom-field-def';
|
|
25
|
-
export * from './entities/calendar-event';
|
|
26
20
|
export * from './entities/draft';
|
|
21
|
+
export * from './entities/external-identity';
|
|
27
22
|
export * from './entities/inbox';
|
|
28
23
|
export * from './entities/interaction';
|
|
24
|
+
export * from './entities/kb';
|
|
25
|
+
export * from './entities/live-lens';
|
|
26
|
+
export * from './entities/mcp';
|
|
29
27
|
export * from './entities/memory';
|
|
30
|
-
export * from './entities/
|
|
28
|
+
export * from './entities/organization';
|
|
29
|
+
export * from './entities/playbook';
|
|
31
30
|
export * from './entities/read-state';
|
|
32
31
|
export * from './entities/resource-reminder';
|
|
32
|
+
export * from './entities/scope';
|
|
33
|
+
export * from './entities/task';
|
|
33
34
|
export * from './entities/team';
|
|
34
35
|
export * from './entities/time-entry';
|
|
35
|
-
export * from './entities/
|
|
36
|
-
export * from './entities/external-identity';
|
|
36
|
+
export * from './entities/topic';
|
|
37
37
|
export * from './entities/user';
|
|
38
38
|
export * from './entities/webhook';
|
|
39
39
|
export * from './entities/work';
|
|
40
|
-
export * from './text/endpoint';
|
|
41
|
-
export * from './text/markdown';
|
|
42
|
-
export * from './text/message';
|
|
43
|
-
export * from './text/triage';
|
|
44
40
|
export * from './platform/account';
|
|
45
41
|
export * from './platform/ai-attachments';
|
|
46
42
|
export * from './platform/ai-tools';
|
|
47
43
|
export * from './platform/api';
|
|
48
44
|
export * from './platform/author';
|
|
49
|
-
export * from './platform/common';
|
|
50
45
|
export * from './platform/call-lines';
|
|
51
46
|
export * from './platform/capabilities';
|
|
52
|
-
export * from './platform/
|
|
47
|
+
export * from './platform/common';
|
|
53
48
|
export * from './platform/communication';
|
|
49
|
+
export * from './platform/context';
|
|
54
50
|
export * from './platform/federated';
|
|
55
51
|
export * from './platform/identity';
|
|
52
|
+
export * from './platform/installation';
|
|
56
53
|
export * from './platform/intents';
|
|
57
54
|
export * from './platform/kernel';
|
|
58
55
|
export * from './platform/localization';
|
|
59
56
|
export * from './platform/manifest';
|
|
57
|
+
export * from './platform/media';
|
|
60
58
|
export * from './platform/menu';
|
|
59
|
+
export * from './platform/permission';
|
|
60
|
+
export * from './platform/presence';
|
|
61
|
+
export * from './platform/provider';
|
|
62
|
+
export * from './platform/push';
|
|
61
63
|
export * from './platform/resource';
|
|
62
64
|
export * from './platform/resource-source';
|
|
63
65
|
export * from './platform/routing';
|
|
64
66
|
export * from './platform/scope';
|
|
65
|
-
export * from './platform/settings';
|
|
66
67
|
export * from './platform/services';
|
|
68
|
+
export * from './platform/settings';
|
|
69
|
+
export * from './platform/storage';
|
|
67
70
|
export * from './platform/sync-source';
|
|
68
|
-
export * from './platform/ui';
|
|
69
|
-
export * from './platform/media';
|
|
70
71
|
export * from './platform/transcript-cadence';
|
|
71
72
|
export * from './platform/transcript-sanitize';
|
|
72
|
-
export * from './platform/
|
|
73
|
-
export * from './
|
|
74
|
-
export * from './
|
|
75
|
-
export * from './
|
|
76
|
-
export * from './
|
|
73
|
+
export * from './platform/ui';
|
|
74
|
+
export * from './text/endpoint';
|
|
75
|
+
export * from './text/markdown';
|
|
76
|
+
export * from './text/message';
|
|
77
|
+
export * from './text/triage';
|