@nyaruka/temba-components 0.159.0 → 0.159.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/CHANGELOG.md CHANGED
@@ -4,8 +4,21 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ #### [v0.159.2](https://github.com/nyaruka/temba-components/compare/v0.159.1...v0.159.2)
8
+
9
+ - Rename ContactEvents to ContactTimeline and make campaign pills clickable [`#1022`](https://github.com/nyaruka/temba-components/pull/1022)
10
+
11
+ #### [v0.159.1](https://github.com/nyaruka/temba-components/compare/v0.159.0...v0.159.1)
12
+
13
+ > 28 May 2026
14
+
15
+ - Handle airtime_created events in contact chat [`#1020`](https://github.com/nyaruka/temba-components/pull/1020)
16
+ - Stabilize ContentList icon column width across parallel test runs [`#1021`](https://github.com/nyaruka/temba-components/pull/1021)
17
+
7
18
  #### [v0.159.0](https://github.com/nyaruka/temba-components/compare/v0.158.1...v0.159.0)
8
19
 
20
+ > 27 May 2026
21
+
9
22
  - Add ContactEvents timeline component replacing ContactPending [`#1019`](https://github.com/nyaruka/temba-components/pull/1019)
10
23
  - Add ContentList layout polish: search UX, label dropdown, list subtitles [`#1016`](https://github.com/nyaruka/temba-components/pull/1016)
11
24
  - Bump serialize-javascript from 6.0.2 to 7.0.5 [`#1017`](https://github.com/nyaruka/temba-components/pull/1017)
@@ -3477,7 +3477,7 @@ const{I:nh}=at,sh=t=>t,rh=()=>document.createComment(""),ah=(t,e,i)=>{const o=t.
3477
3477
  </div>`}
3478
3478
  <slot class="header" name="header"></slot>
3479
3479
  <slot class="footer" name="footer"></slot>
3480
- </div>`}}var xh;e([gt({type:Array})],yh.prototype,"messageGroups",void 0),e([gt({type:Boolean})],yh.prototype,"fetching",void 0),e([gt({type:Boolean,attribute:!1})],yh.prototype,"hideTopScroll",void 0),e([gt({type:Boolean,attribute:!1})],yh.prototype,"hideBottomScroll",void 0),e([gt({type:String,attribute:"avatar"})],yh.prototype,"defaultAvatar",void 0),e([gt({type:Boolean})],yh.prototype,"agent",void 0),e([gt({type:Boolean})],yh.prototype,"avatars",void 0),e([gt({type:Boolean,attribute:!1})],yh.prototype,"endOfHistory",void 0),e([gt({type:Object,attribute:!1})],yh.prototype,"oldestEventDate",void 0),e([gt({type:Boolean,attribute:!1})],yh.prototype,"showNewMessageNotification",void 0),e([gt({type:Object})],yh.prototype,"showMessageLogsAfter",void 0),e([gt({type:Boolean})],yh.prototype,"hasFooter",void 0),e([gt({type:Boolean})],yh.prototype,"showTimestamps",void 0),e([gt({type:String,attribute:!1})],yh.prototype,"searchHighlight",void 0),e([gt({type:String,attribute:!1})],yh.prototype,"highlightMessageUuid",void 0),function(t){t.AIRTIME_TRANSFERRED="airtime_transferred",t.BROADCAST_CREATED="broadcast_created",t.CALL_CREATED="call_created",t.CALL_MISSED="call_missed",t.CALL_RECEIVED="call_received",t.CHAT_STARTED="chat_started",t.CONTACT_FIELD_CHANGED="contact_field_changed",t.CONTACT_GROUPS_CHANGED="contact_groups_changed",t.CONTACT_LANGUAGE_CHANGED="contact_language_changed",t.CONTACT_NAME_CHANGED="contact_name_changed",t.CONTACT_STATUS_CHANGED="contact_status_changed",t.CONTACT_URNS_CHANGED="contact_urns_changed",t.EMAIL_CREATED="email_created",t.EMAIL_SENT="email_sent",t.ERROR="error",t.FAILURE="failure",t.FLOW_ENTERED="flow_entered",t.INPUT_LABELS_ADDED="input_labels_added",t.IVR_CREATED="ivr_created",t.MSG_CREATED="msg_created",t.MSG_RECEIVED="msg_received",t.OPTIN_REQUESTED="optin_requested",t.OPTIN_STARTED="optin_started",t.OPTIN_STOPPED="optin_stopped",t.RESTHOOK_CALLED="resthook_called",t.RUN_ENDED="run_ended",t.RUN_RESULT_CHANGED="run_result_changed",t.RUN_STARTED="run_started",t.SERVICE_CALLED="service_called",t.SESSION_TRIGGERED="session_triggered",t.TICKET_ASSIGNEE_CHANGED="ticket_assignee_changed",t.TICKET_CLOSED="ticket_closed",t.TICKET_NOTE_ADDED="ticket_note_added",t.TICKET_OPENED="ticket_opened",t.TICKET_REOPENED="ticket_reopened",t.TICKET_TOPIC_CHANGED="ticket_topic_changed",t.WARNING="warning",t.WEBHOOK_CALLED="webhook_called"}(xh||(xh={}));const wh=(t,e,i={})=>{const o=i.icon?V`<temba-label
3480
+ </div>`}}var xh;e([gt({type:Array})],yh.prototype,"messageGroups",void 0),e([gt({type:Boolean})],yh.prototype,"fetching",void 0),e([gt({type:Boolean,attribute:!1})],yh.prototype,"hideTopScroll",void 0),e([gt({type:Boolean,attribute:!1})],yh.prototype,"hideBottomScroll",void 0),e([gt({type:String,attribute:"avatar"})],yh.prototype,"defaultAvatar",void 0),e([gt({type:Boolean})],yh.prototype,"agent",void 0),e([gt({type:Boolean})],yh.prototype,"avatars",void 0),e([gt({type:Boolean,attribute:!1})],yh.prototype,"endOfHistory",void 0),e([gt({type:Object,attribute:!1})],yh.prototype,"oldestEventDate",void 0),e([gt({type:Boolean,attribute:!1})],yh.prototype,"showNewMessageNotification",void 0),e([gt({type:Object})],yh.prototype,"showMessageLogsAfter",void 0),e([gt({type:Boolean})],yh.prototype,"hasFooter",void 0),e([gt({type:Boolean})],yh.prototype,"showTimestamps",void 0),e([gt({type:String,attribute:!1})],yh.prototype,"searchHighlight",void 0),e([gt({type:String,attribute:!1})],yh.prototype,"highlightMessageUuid",void 0),function(t){t.AIRTIME_CREATED="airtime_created",t.AIRTIME_TRANSFERRED="airtime_transferred",t.BROADCAST_CREATED="broadcast_created",t.CALL_CREATED="call_created",t.CALL_MISSED="call_missed",t.CALL_RECEIVED="call_received",t.CHAT_STARTED="chat_started",t.CONTACT_FIELD_CHANGED="contact_field_changed",t.CONTACT_GROUPS_CHANGED="contact_groups_changed",t.CONTACT_LANGUAGE_CHANGED="contact_language_changed",t.CONTACT_NAME_CHANGED="contact_name_changed",t.CONTACT_STATUS_CHANGED="contact_status_changed",t.CONTACT_URNS_CHANGED="contact_urns_changed",t.EMAIL_CREATED="email_created",t.EMAIL_SENT="email_sent",t.ERROR="error",t.FAILURE="failure",t.FLOW_ENTERED="flow_entered",t.INPUT_LABELS_ADDED="input_labels_added",t.IVR_CREATED="ivr_created",t.MSG_CREATED="msg_created",t.MSG_RECEIVED="msg_received",t.OPTIN_REQUESTED="optin_requested",t.OPTIN_STARTED="optin_started",t.OPTIN_STOPPED="optin_stopped",t.RESTHOOK_CALLED="resthook_called",t.RUN_ENDED="run_ended",t.RUN_RESULT_CHANGED="run_result_changed",t.RUN_STARTED="run_started",t.SERVICE_CALLED="service_called",t.SESSION_TRIGGERED="session_triggered",t.TICKET_ASSIGNEE_CHANGED="ticket_assignee_changed",t.TICKET_CLOSED="ticket_closed",t.TICKET_NOTE_ADDED="ticket_note_added",t.TICKET_OPENED="ticket_opened",t.TICKET_REOPENED="ticket_reopened",t.TICKET_TOPIC_CHANGED="ticket_topic_changed",t.WARNING="warning",t.WEBHOOK_CALLED="webhook_called"}(xh||(xh={}));const wh=(t,e,i={})=>{const o=i.icon?V`<temba-label
3481
3481
  icon=${i.icon}
3482
3482
  type=${t}
3483
3483
  ?clickable=${!!i.href}
@@ -3519,7 +3519,11 @@ const{I:nh}=at,sh=t=>t,rh=()=>document.createComment(""),ah=(t,e,i)=>{const o=t.
3519
3519
  >
3520
3520
  <span style="font-size: 16px; line-height: 1.4;">${e}</span>
3521
3521
  <span style="flex: 1; line-height: 1.4;">${t.text}</span>
3522
- </div>`}return null})(t,e);break;case xh.AIRTIME_TRANSFERRED:i=(t=>0===parseFloat(t.amount)?V`<div>Airtime transfer failed</div>`:V`<div style=${Eh}>
3522
+ </div>`}return null})(t,e);break;case xh.AIRTIME_CREATED:i=(t=>{var e,i;const o=null!==(i=null===(e=t._status)||void 0===e?void 0:e.status)&&void 0!==i?i:"created",n=V`${Ah(t.amount)} ${t.currency}`;switch(o){case"reversed":return V`<div>Airtime transfer reversed</div>`;case"rejected":case"cancelled":case"declined":return V`<div>Airtime transfer failed</div>`;case"completed":return V`<div style=${Eh}>
3523
+ Transferred ${n} of airtime
3524
+ </div>`;default:return V`<div style=${Eh}>
3525
+ Sending ${n} of airtime
3526
+ </div>`}})(t);break;case xh.AIRTIME_TRANSFERRED:i=(t=>0===parseFloat(t.amount)?V`<div>Airtime transfer failed</div>`:V`<div style=${Eh}>
3523
3527
  Transferred ${Ah(t.amount)} ${t.currency} of airtime
3524
3528
  </div>`)(t);break;case xh.CALL_CREATED:case xh.CALL_MISSED:case xh.CALL_RECEIVED:i=(t=>t.type===xh.CALL_CREATED?V`<div>Call started</div>`:t.type===xh.CALL_MISSED?V`<div>Call missed</div>`:t.type===xh.CALL_RECEIVED?V`<div>Call answered</div>`:void 0)(t);break;case xh.CHAT_STARTED:i=(t=>t.params?V`<div>Chat referral</div>`:V`<div>Chat started</div>`)(t);break;case xh.CONTACT_FIELD_CHANGED:i=(t=>t.value&&t.value.text?V`<div style=${Eh}>
3525
3529
  Updated ${Ch(t.field)} to ${Ah(t.value.text)}
@@ -6693,16 +6697,49 @@ const{I:nh}=at,sh=t=>t,rh=()=>document.createComment(""),ah=(t,e,i)=>{const o=t.
6693
6697
  ></temba-icon>
6694
6698
  </div>
6695
6699
  </div>
6696
- `}return null}}e([gt({type:Boolean})],su.prototype,"hasMore",void 0),e([gt({type:Boolean})],su.prototype,"expanded",void 0);const ru=["#1a86d0","#e8843f","#ec407a","#2bb2a6","#0a5290","#a25320","#a02153","#176a61"];class au extends ih{constructor(){super(...arguments),this.lang_now="Now",this.lang_show_older="Show older events",this.lang_show_more="Show more upcoming events",this.lang_more="Show more",this.lang_campaigns_label="Campaigns",this.lang_empty="No events for this contact yet.",this.lang_projected_info="This is a projected timeline based on current schedules. Past entries may not reflect what actually happened, and upcoming entries are limited to the next year.",this.olderEvents=[],this.newerEvents=[],this.nextBefore=null,this.nextAfter=null,this.loadingMore=!1,this.loadingMoreFuture=!1,this.campaignColors={}}static get styles(){return l`
6700
+ `}return null}}e([gt({type:Boolean})],su.prototype,"hasMore",void 0),e([gt({type:Boolean})],su.prototype,"expanded",void 0);const ru=["#1a86d0","#e8843f","#ec407a","#2bb2a6","#0a5290","#a25320","#a02153","#176a61"];class au extends ih{constructor(){super(...arguments),this.lang_now="Now",this.lang_show_older="Show older events",this.lang_show_more="Show more upcoming events",this.lang_more="Show more",this.lang_campaigns_label="Campaigns",this.lang_empty="No upcoming events",this.lang_empty_help="Events appear here when a contact joins a campaign. Scheduled flows and messages will also show up here.",this.lang_campaigns_link="View campaigns",this.lang_projected_info="This is a projected timeline based on current schedules. Past entries may not reflect what actually happened, and upcoming entries are limited to the next year.",this.olderEvents=[],this.newerEvents=[],this.nextBefore=null,this.nextAfter=null,this.loadingMore=!1,this.loadingMoreFuture=!1,this.campaignColors={}}static get styles(){return l`
6697
6701
  :host {
6698
6702
  display: block;
6699
6703
  }
6700
6704
 
6705
+ /* empty state follows the list design system: centered icon, a short
6706
+ title, muted explanatory copy, and a single call-to-action link */
6701
6707
  .empty {
6702
- padding: 4em 1em;
6708
+ display: flex;
6709
+ flex-direction: column;
6710
+ align-items: center;
6703
6711
  text-align: center;
6712
+ padding: 7em 1em 4em;
6704
6713
  color: var(--text-color);
6705
- opacity: 0.55;
6714
+ }
6715
+
6716
+ .empty temba-icon {
6717
+ margin-bottom: 0.75em;
6718
+ --icon-color: var(--text-3, #7b8593);
6719
+ }
6720
+
6721
+ .empty-title {
6722
+ font-weight: 600;
6723
+ margin-bottom: 0.4em;
6724
+ }
6725
+
6726
+ .empty-help {
6727
+ font-size: 0.875em;
6728
+ line-height: 1.5;
6729
+ max-width: 22em;
6730
+ margin-bottom: 1em;
6731
+ color: var(--text-3, #7b8593);
6732
+ }
6733
+
6734
+ .empty-link {
6735
+ font-size: 0.875em;
6736
+ font-weight: 500;
6737
+ color: var(--color-link-primary);
6738
+ text-decoration: none;
6739
+ }
6740
+
6741
+ .empty-link:hover {
6742
+ text-decoration: underline;
6706
6743
  }
6707
6744
 
6708
6745
  /* row of campaign pills the contact is currently a member of */
@@ -6725,7 +6762,8 @@ const{I:nh}=at,sh=t=>t,rh=()=>document.createComment(""),ah=(t,e,i)=>{const o=t.
6725
6762
  }
6726
6763
 
6727
6764
  /* each pill is colored with its campaign's hue - background, border
6728
- and text all derived from --pill-hue. read-only badges, not links */
6765
+ and text all derived from --pill-hue. clickable links to the
6766
+ campaign's read page */
6729
6767
  .campaign-pill {
6730
6768
  display: inline-flex;
6731
6769
  align-items: center;
@@ -6743,6 +6781,21 @@ const{I:nh}=at,sh=t=>t,rh=()=>document.createComment(""),ah=(t,e,i)=>{const o=t.
6743
6781
  border: 1px solid
6744
6782
  color-mix(in srgb, var(--pill-hue) 25%, var(--color-widget-bg, #fff));
6745
6783
  color: var(--pill-hue);
6784
+ cursor: pointer;
6785
+ transition: background 100ms ease-in-out;
6786
+ }
6787
+
6788
+ .campaign-pill:hover {
6789
+ background: color-mix(
6790
+ in srgb,
6791
+ var(--pill-hue) 22%,
6792
+ var(--color-widget-bg, #fff)
6793
+ );
6794
+ }
6795
+
6796
+ .campaign-pill:focus-visible {
6797
+ outline: 2px solid var(--pill-hue);
6798
+ outline-offset: 1px;
6746
6799
  }
6747
6800
 
6748
6801
  /* status-badge dot leading each campaign pill, in the same hue */
@@ -7004,7 +7057,7 @@ const{I:nh}=at,sh=t=>t,rh=()=>document.createComment(""),ah=(t,e,i)=>{const o=t.
7004
7057
  -webkit-box-orient: vertical;
7005
7058
  overflow: hidden;
7006
7059
  }
7007
- `}async loadEvents(){if(!this.contact)return void(this.data=null);const t=this.contact;try{const e=await this.store.getUrl(`/contact/events/${encodeURIComponent(this.contact)}/`,{force:!0});if(this.contact!==t)return;this.data=e.json}catch(t){}}refresh(){this.loadEvents()}updated(t){var e,i;if(super.updated(t),t.has("contact")&&(this.campaignColors={},this.data=null,this.loadingMore=!1,this.loadingMoreFuture=!1,this.loadEvents()),t.has("data")&&(this.olderEvents=[],this.newerEvents=[],this.nextBefore=this.data&&null!==(e=this.data.next_before)&&void 0!==e?e:null,this.nextAfter=this.data&&null!==(i=this.data.next_after)&&void 0!==i?i:null,this.data&&this.assignCampaignColors([...this.data.past||[],...this.data.future||[]]),null!==this.data&&void 0!==this.data)){const t="number"==typeof this.data.future_count?this.data.future_count:Array.isArray(this.data.future)?this.data.future.length:0;this.fireCustomEvent(Uo.DetailsChanged,{count:t})}}assignCampaignColors(t){for(const e of t){if(e.type!==Fo.CampaignEvent||!e.campaign)continue;const t=e.campaign.uuid;if(!this.campaignColors[t]){const e=Object.keys(this.campaignColors).length;this.campaignColors[t]=ru[e%ru.length]}}}getCampaignColor(t){return this.campaignColors[t]||ru[0]}getColor(t){return t.type===Fo.ScheduledTrigger?"#16a34a":t.type===Fo.CampaignEvent&&t.campaign?this.getCampaignColor(t.campaign.uuid):"#8e5ea7"}getDotIcon(t){return t.type===Fo.ScheduledTrigger?zo.trigger:t.type!==Fo.CampaignEvent?zo.broadcast:null}handleEventClicked(t){this.fireCustomEvent(Uo.Selection,t)}handlePillClicked(t,e){t.stopPropagation(),this.fireCustomEvent(Uo.Selection,e)}handleActivationKey(t,e){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),e())}async handleShowOlder(){var t;if(this.loadingMore||!this.nextBefore)return;this.loadingMore=!0;const e=this.contact,i=`/contact/events/${encodeURIComponent(this.contact)}/?before=${encodeURIComponent(this.nextBefore)}`;try{const o=await this.store.getUrl(i,{force:!0});if(this.contact!==e)return;const n=o.json,s=n.past||[];this.assignCampaignColors(s),this.olderEvents=[...this.olderEvents,...s],this.nextBefore=null!==(t=n.next_before)&&void 0!==t?t:null}catch(t){if(this.contact!==e)return;this.nextBefore=null}finally{this.contact===e&&(this.loadingMore=!1)}}async handleShowMore(){var t;if(this.loadingMoreFuture||!this.nextAfter)return;this.loadingMoreFuture=!0;const e=this.contact,i=`/contact/events/${encodeURIComponent(this.contact)}/?after=${encodeURIComponent(this.nextAfter)}`;try{const o=await this.store.getUrl(i,{force:!0});if(this.contact!==e)return;const n=o.json,s=n.future||[];this.assignCampaignColors(s),this.newerEvents=[...this.newerEvents,...s],this.nextAfter=null!==(t=n.next_after)&&void 0!==t?t:null}catch(t){if(this.contact!==e)return;this.nextAfter=null}finally{this.contact===e&&(this.loadingMoreFuture=!1)}}renderTime(t){var e;return V`
7060
+ `}async loadEvents(){if(!this.contact)return void(this.data=null);const t=this.contact;try{const e=await this.store.getUrl(`/contact/timeline/${encodeURIComponent(this.contact)}/`,{force:!0});if(this.contact!==t)return;this.data=e.json}catch(t){}}refresh(){this.loadEvents()}updated(t){var e,i;if(super.updated(t),t.has("contact")&&(this.campaignColors={},this.data=null,this.loadingMore=!1,this.loadingMoreFuture=!1,this.loadEvents()),t.has("data")&&(this.olderEvents=[],this.newerEvents=[],this.nextBefore=this.data&&null!==(e=this.data.next_before)&&void 0!==e?e:null,this.nextAfter=this.data&&null!==(i=this.data.next_after)&&void 0!==i?i:null,this.data&&this.assignCampaignColors([...this.data.past||[],...this.data.future||[]]),null!==this.data&&void 0!==this.data)){const t="number"==typeof this.data.future_count?this.data.future_count:Array.isArray(this.data.future)?this.data.future.length:0;this.fireCustomEvent(Uo.DetailsChanged,{count:t})}}assignCampaignColors(t){for(const e of t){if(e.type!==Fo.CampaignEvent||!e.campaign)continue;const t=e.campaign.uuid;if(!this.campaignColors[t]){const e=Object.keys(this.campaignColors).length;this.campaignColors[t]=ru[e%ru.length]}}}getCampaignColor(t){return this.campaignColors[t]||ru[0]}getColor(t){return t.type===Fo.ScheduledTrigger?"#16a34a":t.type===Fo.CampaignEvent&&t.campaign?this.getCampaignColor(t.campaign.uuid):"#8e5ea7"}getDotIcon(t){return t.type===Fo.ScheduledTrigger?zo.trigger:t.type!==Fo.CampaignEvent?zo.broadcast:null}handleEventClicked(t){this.fireCustomEvent(Uo.Selection,t)}handlePillClicked(t,e){t.stopPropagation(),this.fireCustomEvent(Uo.Selection,e)}handleActivationKey(t,e){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),e())}async handleShowOlder(){var t;if(this.loadingMore||!this.nextBefore)return;this.loadingMore=!0;const e=this.contact,i=`/contact/timeline/${encodeURIComponent(this.contact)}/?before=${encodeURIComponent(this.nextBefore)}`;try{const o=await this.store.getUrl(i,{force:!0});if(this.contact!==e)return;const n=o.json,s=n.past||[];this.assignCampaignColors(s),this.olderEvents=[...this.olderEvents,...s],this.nextBefore=null!==(t=n.next_before)&&void 0!==t?t:null}catch(t){if(this.contact!==e)return;this.nextBefore=null}finally{this.contact===e&&(this.loadingMore=!1)}}async handleShowMore(){var t;if(this.loadingMoreFuture||!this.nextAfter)return;this.loadingMoreFuture=!0;const e=this.contact,i=`/contact/timeline/${encodeURIComponent(this.contact)}/?after=${encodeURIComponent(this.nextAfter)}`;try{const o=await this.store.getUrl(i,{force:!0});if(this.contact!==e)return;const n=o.json,s=n.future||[];this.assignCampaignColors(s),this.newerEvents=[...this.newerEvents,...s],this.nextAfter=null!==(t=n.next_after)&&void 0!==t?t:null}catch(t){if(this.contact!==e)return;this.nextAfter=null}finally{this.contact===e&&(this.loadingMoreFuture=!1)}}renderTime(t){var e;return V`
7008
7061
  <temba-tip text=${this.store.formatDate(t.scheduled)} position="top">
7009
7062
  ${this.store.getShortDurationFromIso(t.scheduled,null===(e=this.data)||void 0===e?void 0:e.now)}
7010
7063
  </temba-tip>
@@ -7039,12 +7092,23 @@ const{I:nh}=at,sh=t=>t,rh=()=>document.createComment(""),ah=(t,e,i)=>{const o=t.
7039
7092
  ${t.map(t=>V`<div
7040
7093
  class="campaign-pill"
7041
7094
  style="--pill-hue:${this.getCampaignColor(t.uuid)}"
7095
+ role="button"
7096
+ tabindex="0"
7097
+ @click=${e=>this.handlePillClicked(e,t)}
7098
+ @keydown=${e=>this.handleActivationKey(e,()=>this.handlePillClicked(e,t))}
7042
7099
  >
7043
7100
  <span class="campaign-dot"></span>${t.name}
7044
7101
  </div>`)}
7045
7102
  </div>
7046
7103
  `}render(){if(!this.data)return V``;const t=Array.isArray(this.data.campaigns)?this.data.campaigns:[],e=[...Array.isArray(this.data.future)?this.data.future:[],...this.newerEvents],i=[...Array.isArray(this.data.past)?this.data.past:[],...this.olderEvents];if(0===t.length&&0===e.length&&0===i.length)return V`<div class="empty">
7047
- <slot name="empty">${this.lang_empty}</slot>
7104
+ <slot name="empty">
7105
+ <temba-icon name=${zo.schedule} size="2"></temba-icon>
7106
+ <div class="empty-title">${this.lang_empty}</div>
7107
+ <div class="empty-help">${this.lang_empty_help}</div>
7108
+ <a class="empty-link" href="/campaign/" onclick="goto(event)"
7109
+ >${this.lang_campaigns_link}</a
7110
+ >
7111
+ </slot>
7048
7112
  </div>`;const o=[];return this.nextBefore&&o.push({kind:"more-past"}),[...i].reverse().forEach(t=>o.push({kind:"event",event:t,past:!0})),o.push({kind:"now"}),e.forEach(t=>o.push({kind:"event",event:t,past:!1})),this.nextAfter&&o.push({kind:"more-future"}),V`
7049
7113
  ${this.renderCampaigns(t)}
7050
7114
  <div class="timeline">
@@ -7122,7 +7186,7 @@ const{I:nh}=at,sh=t=>t,rh=()=>document.createComment(""),ah=(t,e,i)=>{const o=t.
7122
7186
  </div>`,this.renderEvent(t.event),i,n)})}
7123
7187
  </div>
7124
7188
  ${e.length>0?V`<div class="projection-note">${this.lang_projected_info}</div>`:null}
7125
- `}}e([gt({type:String})],au.prototype,"contact",void 0),e([gt({type:Object,attribute:!1})],au.prototype,"data",void 0),e([gt({type:String})],au.prototype,"lang_now",void 0),e([gt({type:String})],au.prototype,"lang_show_older",void 0),e([gt({type:String})],au.prototype,"lang_show_more",void 0),e([gt({type:String})],au.prototype,"lang_more",void 0),e([gt({type:String})],au.prototype,"lang_campaigns_label",void 0),e([gt({type:String})],au.prototype,"lang_empty",void 0),e([gt({type:String})],au.prototype,"lang_projected_info",void 0),e([ft()],au.prototype,"olderEvents",void 0),e([ft()],au.prototype,"newerEvents",void 0),e([ft()],au.prototype,"nextBefore",void 0),e([ft()],au.prototype,"nextAfter",void 0),e([ft()],au.prototype,"loadingMore",void 0),e([ft()],au.prototype,"loadingMoreFuture",void 0);class lu extends Mo{constructor(){super(...arguments),this.range=!1,this.min=0,this.max=100,this.circleX=0,this.grabbed=!1}static get styles(){return l`
7189
+ `}}e([gt({type:String})],au.prototype,"contact",void 0),e([gt({type:Object,attribute:!1})],au.prototype,"data",void 0),e([gt({type:String})],au.prototype,"lang_now",void 0),e([gt({type:String})],au.prototype,"lang_show_older",void 0),e([gt({type:String})],au.prototype,"lang_show_more",void 0),e([gt({type:String})],au.prototype,"lang_more",void 0),e([gt({type:String})],au.prototype,"lang_campaigns_label",void 0),e([gt({type:String})],au.prototype,"lang_empty",void 0),e([gt({type:String})],au.prototype,"lang_empty_help",void 0),e([gt({type:String})],au.prototype,"lang_campaigns_link",void 0),e([gt({type:String})],au.prototype,"lang_projected_info",void 0),e([ft()],au.prototype,"olderEvents",void 0),e([ft()],au.prototype,"newerEvents",void 0),e([ft()],au.prototype,"nextBefore",void 0),e([ft()],au.prototype,"nextAfter",void 0),e([ft()],au.prototype,"loadingMore",void 0),e([ft()],au.prototype,"loadingMoreFuture",void 0);class lu extends Mo{constructor(){super(...arguments),this.range=!1,this.min=0,this.max=100,this.circleX=0,this.grabbed=!1}static get styles(){return l`
7126
7190
  :host {
7127
7191
  display: block;
7128
7192
  }
@@ -9063,9 +9127,20 @@ const{I:nh}=at,sh=t=>t,rh=()=>document.createComment(""),ah=(t,e,i)=>{const o=t.
9063
9127
  padding: 0 6px 0 0;
9064
9128
  --icon-color: var(--text-3);
9065
9129
  }
9130
+ /* Reserve the icon's footprint on the wrapper itself so the
9131
+ icon column's intrinsic width is the same whether
9132
+ <temba-icon> has upgraded or not — without this, the column
9133
+ briefly measures as just the cell's right-padding (6px) and
9134
+ the downstream pinned columns end up positioned ~14px to
9135
+ the left, which races with whatever moment we snapshot.
9136
+ <temba-icon size="1"> renders at 1em, so we reserve 1em
9137
+ square and let the icon paint into it. */
9066
9138
  .icon-inner {
9067
9139
  display: flex;
9068
9140
  align-items: center;
9141
+ justify-content: center;
9142
+ width: 1em;
9143
+ height: 1em;
9069
9144
  }
9070
9145
  tr.row.selected .icon-cell {
9071
9146
  --icon-color: var(--accent-700);
@@ -10758,7 +10833,7 @@ background: #ccc;
10758
10833
  ${this.renderUploader()}
10759
10834
  </div>
10760
10835
  </div>
10761
- </div>`}}e([gt({type:String,attribute:!1})],Hu.prototype,"endpoint",void 0),e([gt({type:Boolean})],Hu.prototype,"pendingDrop",void 0),e([gt({type:Boolean})],Hu.prototype,"ignoreDrops",void 0),e([gt({type:String})],Hu.prototype,"icon",void 0),e([gt({type:String})],Hu.prototype,"accept",void 0),e([gt({type:Number})],Hu.prototype,"max",void 0),e([gt({type:Array})],Hu.prototype,"attachments",void 0),e([gt({type:Boolean,attribute:!1})],Hu.prototype,"uploading",void 0);let Wu="dev";try{Wu="0.159.0"}catch(t){}const Vu=Wu,Zu=[{type:"has_any_word",name:"has any of the words",operands:1},{type:"has_all_words",name:"has all of the words",operands:1},{type:"has_phrase",name:"has the phrase",operands:1},{type:"has_only_phrase",name:"has only the phrase",operands:1},{type:"has_beginning",name:"starts with",operands:1},{type:"has_text",name:"has some text",operands:0,categoryName:"Has Text"},{type:"has_number",name:"has a number",operands:0,categoryName:"Has Number"},{type:"has_number_between",name:"has a number between",operands:2},{type:"has_number_lt",name:"has a number below",operands:1},{type:"has_number_lte",name:"has a number at or below",operands:1},{type:"has_number_eq",name:"has a number equal to",operands:1},{type:"has_number_gte",name:"has a number at or above",operands:1},{type:"has_number_gt",name:"has a number above",operands:1},{type:"has_date",name:"has a date",operands:0,categoryName:"Has Date"},{type:"has_date_lt",name:"has a date before",operands:1},{type:"has_date_eq",name:"has a date equal to",operands:1},{type:"has_date_gt",name:"has a date after",operands:1},{type:"has_time",name:"has a time",operands:0,categoryName:"Has Time"},{type:"has_phone",name:"has a phone number",operands:0,categoryName:"Has Phone"},{type:"has_email",name:"has an email",operands:0,categoryName:"Has Email"},{type:"has_state",name:"has state",operands:0,categoryName:"Has State",filter:"locations"},{type:"has_district",name:"has district",operands:1,categoryName:"Has District",filter:"locations"},{type:"has_ward",name:"has ward",operands:2,categoryName:"Has Ward",filter:"locations"},{type:"has_group",name:"is in the group",operands:1,visibility:"hidden"},{type:"has_category",name:"has the category",operands:0,visibility:"hidden"},{type:"has_error",name:"has an error",operands:0,categoryName:"Has Error",visibility:"hidden"},{type:"has_value",name:"is not empty",operands:0,categoryName:"Not Empty",visibility:"hidden"},{type:"has_pattern",name:"matches regex",operands:1}],Yu=t=>Zu.filter(e=>"hidden"!==e.visibility&&(!e.filter||!!t&&t.includes(e.filter))),Ku=new Set(["has_beginning","has_number","has_number_between","has_number_lt","has_number_lte","has_number_eq","has_number_gte","has_number_gt","has_pattern"]),Gu=t=>Zu.find(e=>e.type===t),Xu=t=>t.map(t=>({value:t.type,name:t.name})),Qu={type:"text",required:!1,maxLength:64,placeholder:"(optional)",helpText:"The name to use to reference this result in the flow"},Ju={type:"checkbox",label:"Require rules to be localized",helpText:"Each language must specify its own rules for this node"},tp={type:"checkbox",label:"Require categories to be localized",helpText:t=>{var e;const i=null===(e=t.result_name)||void 0===e?void 0:e.trim();if(i){return`Only enable if you plan to use @results.${i.toLowerCase().replace(/\s+/g,"_")}.category_localized`}return"Only enable if you plan to use category_localized in your expressions for this result"},conditions:{visible:t=>!!t.result_name}},ep={label:"Save Result",localizable:!1,items:["result_name"],collapsed:t=>!(t._isNew&&t.result_name),getValueCount:t=>!!t.result_name},ip={type:"accordion",multi:!0,sections:[ep,{label:"Localization",localizable:!1,items:["localizeRules","localizeCategories"],collapsed:!0,getValueCount:t=>!(!t.localizeRules&&!t.localizeCategories)}]},op={type:"accordion",multi:!0,sections:[ep]},np={type:"accordion",multi:!0,sections:[ep,{label:"Localization",localizable:!1,items:["localizeCategories"],collapsed:!0,getValueCount:t=>!!t.localizeCategories}]};function sp(t,e){var i,o;const n=(null===(i=t.router)||void 0===i?void 0:i.categories)||[],s={};n.forEach(t=>{const i=t.uuid,o=e[i];s[i]={originalName:t.name,localizedName:o&&o.name?Array.isArray(o.name)?o.name[0]||"":o.name:""}});const r=(null===(o=t.router)||void 0===o?void 0:o.cases)||[],a={};return r.forEach(t=>{var i,o;if(!(null===(i=t.arguments)||void 0===i?void 0:i.length)||!t.arguments.some(t=>t))return;const n=e[t.uuid],s=(null===(o=Gu(t.type))||void 0===o?void 0:o.name)||t.type;a[t.uuid]={operatorName:s,originalArguments:[...t.arguments],localizedArguments:(null==n?void 0:n.arguments)?[...n.arguments]:t.arguments.map(()=>"")}}),{categories:s,rules:a}}function rp(t,e){const i={};return t.categories&&Object.keys(t.categories).forEach(e=>{var o,n;const s=t.categories[e],r=(null===(o=s.localizedName)||void 0===o?void 0:o.trim())||"",a=(null===(n=s.originalName)||void 0===n?void 0:n.trim())||"";r&&r!==a&&(i[e]={name:[r]})}),t.rules&&Object.keys(t.rules).forEach(e=>{const o=t.rules[e],n=o.localizedArguments||[],s=o.originalArguments||[],r=n.some((t,e)=>(null==t?void 0:t.trim())&&t.trim()!==(s[e]||""));r&&(i[e]={arguments:n.map(t=>(null==t?void 0:t.trim())||"")})}),i}function ap(t,e,i,o=[]){const n=[],s=[],r=[];return t.forEach(t=>{const a=re(e,t.name),l=a?i.find(t=>t.uuid===a.exit_uuid):null,d=(null==l?void 0:l.uuid)||Gt(),c=(null==a?void 0:a.uuid)||Gt();if(n.push({uuid:c,name:t.name,exit_uuid:d}),s.push({uuid:d,destination_uuid:(null==l?void 0:l.destination_uuid)||null}),t.case){const e=t.case.arguments[0],i=o.find(t=>{var i;return(null===(i=t.arguments)||void 0===i?void 0:i[0])===e});r.push({uuid:(null==i?void 0:i.uuid)||Gt(),type:t.case.type,arguments:t.case.arguments,category_uuid:c})}}),{categories:n,exits:s,cases:r}}function lp(t,e,i,o,n){const s=n.some(t=>se(t,"Other"))?null:re(i,"Other"),r=s?o.find(t=>t.uuid===s.exit_uuid):null,a=(null==r?void 0:r.uuid)||Gt(),l=(null==s?void 0:s.uuid)||Gt();return t.push({uuid:l,name:"Other",exit_uuid:a}),e.push({uuid:a,destination_uuid:(null==r?void 0:r.destination_uuid)||null}),l}function dp(t){return e=>{const i={};return t(e,i),{valid:0===Object.keys(i).length,errors:i}}}function cp(t){return t.toLocalizationFormData?t.toLocalizationFormData:"categories"===t.localizable?sp:Array.isArray(t.localizable)?(e=t.localizable,(t,i)=>{const o={uuid:t.uuid};return e.forEach(t=>{const e=i[t];o[t]=Array.isArray(e)&&e[0]||""}),o}):void 0;var e}function hp(t){return t.fromLocalizationFormData?t.fromLocalizationFormData:"categories"===t.localizable?rp:Array.isArray(t.localizable)?(e=t.localizable,(t,i)=>{const o={};return e.forEach(e=>{const n=t[e];n&&""!==n.trim()&&n!==i[e]&&(o[e]=[n])}),o}):void 0;var e}const up="undefined"!=typeof navigator&&/Mac|iPod|iPhone|iPad/.test(navigator.platform);function pp(t){return 0!==t.button||!(!up||!t.ctrlKey)}function mp(t){if(t.dependency){const e=t.dependency.name||t.dependency.key;return`Cannot find a ${t.dependency.type} for ${e}`}return t.description}function gp(t){const e=20*Math.round(t/20);return Math.max(e,0)}const fp="font-family:SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;font-size:0.95em",vp={[nc.ExpressionPrefix]:`color:${Cc.expression};font-weight:600;${fp}`,[nc.Identifier]:`color:${Cc.expression};${fp}`,[nc.FunctionName]:`color:${Cc.fn};font-weight:900;${fp}`,[nc.StringLiteral]:`color:${Cc.string};${fp}`,[nc.NumberLiteral]:`color:${Cc.number};${fp}`,[nc.Keyword]:`color:${Cc.keyword};${fp}`,[nc.Operator]:`color:${Cc.operator};${fp}`,[nc.ContextRef]:`color:${Cc.expression};${fp}`,[nc.Separator]:`color:${Cc.operator};${fp}`,[nc.Arrow]:`color:${Cc.operator};${fp}`,[nc.Bracket]:`color:${Cc.operator};${fp}`,[nc.Paren]:`color:${Cc.paren};${fp}`,[nc.Whitespace]:fp},bp=[[/claude|anthropic/i,"anthropic"],[/gpt|openai|o1|o3|o4/i,"openai"],[/gemini|google/i,"gemini"],[/azure|microsoft/i,"azure"],[/deepseek/i,"deepseek"]],yp=(t,e=!1)=>{const i=cc(t||"",e?Gd:Kd),o=[];for(const t of i){const e=!!vp[t.type],i=o[o.length-1];i&&i.isExpr===e?i.tokens.push(t):o.push({isExpr:e,tokens:[t]})}const n=t=>{const e=vp[t.type];if(!e){const e=t.text.split("\n");return V`${e.map((t,e)=>V`${e>0?V`<br />`:null}${t}`)}`}const i=t.text.split("\n");return V`${i.map((t,i)=>V`${i>0?V`<br />`:null}${t?V`<span style="${e}">${t}</span>`:null}`)}`};return V`${o.map(t=>{const e=V`${t.tokens.map(n)}`;return t.isExpr?V`<span style="hyphens:none">${e}</span>`:e})}`},xp=(t,e,i=3)=>V`<div
10836
+ </div>`}}e([gt({type:String,attribute:!1})],Hu.prototype,"endpoint",void 0),e([gt({type:Boolean})],Hu.prototype,"pendingDrop",void 0),e([gt({type:Boolean})],Hu.prototype,"ignoreDrops",void 0),e([gt({type:String})],Hu.prototype,"icon",void 0),e([gt({type:String})],Hu.prototype,"accept",void 0),e([gt({type:Number})],Hu.prototype,"max",void 0),e([gt({type:Array})],Hu.prototype,"attachments",void 0),e([gt({type:Boolean,attribute:!1})],Hu.prototype,"uploading",void 0);let Wu="dev";try{Wu="0.159.2"}catch(t){}const Vu=Wu,Zu=[{type:"has_any_word",name:"has any of the words",operands:1},{type:"has_all_words",name:"has all of the words",operands:1},{type:"has_phrase",name:"has the phrase",operands:1},{type:"has_only_phrase",name:"has only the phrase",operands:1},{type:"has_beginning",name:"starts with",operands:1},{type:"has_text",name:"has some text",operands:0,categoryName:"Has Text"},{type:"has_number",name:"has a number",operands:0,categoryName:"Has Number"},{type:"has_number_between",name:"has a number between",operands:2},{type:"has_number_lt",name:"has a number below",operands:1},{type:"has_number_lte",name:"has a number at or below",operands:1},{type:"has_number_eq",name:"has a number equal to",operands:1},{type:"has_number_gte",name:"has a number at or above",operands:1},{type:"has_number_gt",name:"has a number above",operands:1},{type:"has_date",name:"has a date",operands:0,categoryName:"Has Date"},{type:"has_date_lt",name:"has a date before",operands:1},{type:"has_date_eq",name:"has a date equal to",operands:1},{type:"has_date_gt",name:"has a date after",operands:1},{type:"has_time",name:"has a time",operands:0,categoryName:"Has Time"},{type:"has_phone",name:"has a phone number",operands:0,categoryName:"Has Phone"},{type:"has_email",name:"has an email",operands:0,categoryName:"Has Email"},{type:"has_state",name:"has state",operands:0,categoryName:"Has State",filter:"locations"},{type:"has_district",name:"has district",operands:1,categoryName:"Has District",filter:"locations"},{type:"has_ward",name:"has ward",operands:2,categoryName:"Has Ward",filter:"locations"},{type:"has_group",name:"is in the group",operands:1,visibility:"hidden"},{type:"has_category",name:"has the category",operands:0,visibility:"hidden"},{type:"has_error",name:"has an error",operands:0,categoryName:"Has Error",visibility:"hidden"},{type:"has_value",name:"is not empty",operands:0,categoryName:"Not Empty",visibility:"hidden"},{type:"has_pattern",name:"matches regex",operands:1}],Yu=t=>Zu.filter(e=>"hidden"!==e.visibility&&(!e.filter||!!t&&t.includes(e.filter))),Ku=new Set(["has_beginning","has_number","has_number_between","has_number_lt","has_number_lte","has_number_eq","has_number_gte","has_number_gt","has_pattern"]),Gu=t=>Zu.find(e=>e.type===t),Xu=t=>t.map(t=>({value:t.type,name:t.name})),Qu={type:"text",required:!1,maxLength:64,placeholder:"(optional)",helpText:"The name to use to reference this result in the flow"},Ju={type:"checkbox",label:"Require rules to be localized",helpText:"Each language must specify its own rules for this node"},tp={type:"checkbox",label:"Require categories to be localized",helpText:t=>{var e;const i=null===(e=t.result_name)||void 0===e?void 0:e.trim();if(i){return`Only enable if you plan to use @results.${i.toLowerCase().replace(/\s+/g,"_")}.category_localized`}return"Only enable if you plan to use category_localized in your expressions for this result"},conditions:{visible:t=>!!t.result_name}},ep={label:"Save Result",localizable:!1,items:["result_name"],collapsed:t=>!(t._isNew&&t.result_name),getValueCount:t=>!!t.result_name},ip={type:"accordion",multi:!0,sections:[ep,{label:"Localization",localizable:!1,items:["localizeRules","localizeCategories"],collapsed:!0,getValueCount:t=>!(!t.localizeRules&&!t.localizeCategories)}]},op={type:"accordion",multi:!0,sections:[ep]},np={type:"accordion",multi:!0,sections:[ep,{label:"Localization",localizable:!1,items:["localizeCategories"],collapsed:!0,getValueCount:t=>!!t.localizeCategories}]};function sp(t,e){var i,o;const n=(null===(i=t.router)||void 0===i?void 0:i.categories)||[],s={};n.forEach(t=>{const i=t.uuid,o=e[i];s[i]={originalName:t.name,localizedName:o&&o.name?Array.isArray(o.name)?o.name[0]||"":o.name:""}});const r=(null===(o=t.router)||void 0===o?void 0:o.cases)||[],a={};return r.forEach(t=>{var i,o;if(!(null===(i=t.arguments)||void 0===i?void 0:i.length)||!t.arguments.some(t=>t))return;const n=e[t.uuid],s=(null===(o=Gu(t.type))||void 0===o?void 0:o.name)||t.type;a[t.uuid]={operatorName:s,originalArguments:[...t.arguments],localizedArguments:(null==n?void 0:n.arguments)?[...n.arguments]:t.arguments.map(()=>"")}}),{categories:s,rules:a}}function rp(t,e){const i={};return t.categories&&Object.keys(t.categories).forEach(e=>{var o,n;const s=t.categories[e],r=(null===(o=s.localizedName)||void 0===o?void 0:o.trim())||"",a=(null===(n=s.originalName)||void 0===n?void 0:n.trim())||"";r&&r!==a&&(i[e]={name:[r]})}),t.rules&&Object.keys(t.rules).forEach(e=>{const o=t.rules[e],n=o.localizedArguments||[],s=o.originalArguments||[],r=n.some((t,e)=>(null==t?void 0:t.trim())&&t.trim()!==(s[e]||""));r&&(i[e]={arguments:n.map(t=>(null==t?void 0:t.trim())||"")})}),i}function ap(t,e,i,o=[]){const n=[],s=[],r=[];return t.forEach(t=>{const a=re(e,t.name),l=a?i.find(t=>t.uuid===a.exit_uuid):null,d=(null==l?void 0:l.uuid)||Gt(),c=(null==a?void 0:a.uuid)||Gt();if(n.push({uuid:c,name:t.name,exit_uuid:d}),s.push({uuid:d,destination_uuid:(null==l?void 0:l.destination_uuid)||null}),t.case){const e=t.case.arguments[0],i=o.find(t=>{var i;return(null===(i=t.arguments)||void 0===i?void 0:i[0])===e});r.push({uuid:(null==i?void 0:i.uuid)||Gt(),type:t.case.type,arguments:t.case.arguments,category_uuid:c})}}),{categories:n,exits:s,cases:r}}function lp(t,e,i,o,n){const s=n.some(t=>se(t,"Other"))?null:re(i,"Other"),r=s?o.find(t=>t.uuid===s.exit_uuid):null,a=(null==r?void 0:r.uuid)||Gt(),l=(null==s?void 0:s.uuid)||Gt();return t.push({uuid:l,name:"Other",exit_uuid:a}),e.push({uuid:a,destination_uuid:(null==r?void 0:r.destination_uuid)||null}),l}function dp(t){return e=>{const i={};return t(e,i),{valid:0===Object.keys(i).length,errors:i}}}function cp(t){return t.toLocalizationFormData?t.toLocalizationFormData:"categories"===t.localizable?sp:Array.isArray(t.localizable)?(e=t.localizable,(t,i)=>{const o={uuid:t.uuid};return e.forEach(t=>{const e=i[t];o[t]=Array.isArray(e)&&e[0]||""}),o}):void 0;var e}function hp(t){return t.fromLocalizationFormData?t.fromLocalizationFormData:"categories"===t.localizable?rp:Array.isArray(t.localizable)?(e=t.localizable,(t,i)=>{const o={};return e.forEach(e=>{const n=t[e];n&&""!==n.trim()&&n!==i[e]&&(o[e]=[n])}),o}):void 0;var e}const up="undefined"!=typeof navigator&&/Mac|iPod|iPhone|iPad/.test(navigator.platform);function pp(t){return 0!==t.button||!(!up||!t.ctrlKey)}function mp(t){if(t.dependency){const e=t.dependency.name||t.dependency.key;return`Cannot find a ${t.dependency.type} for ${e}`}return t.description}function gp(t){const e=20*Math.round(t/20);return Math.max(e,0)}const fp="font-family:SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;font-size:0.95em",vp={[nc.ExpressionPrefix]:`color:${Cc.expression};font-weight:600;${fp}`,[nc.Identifier]:`color:${Cc.expression};${fp}`,[nc.FunctionName]:`color:${Cc.fn};font-weight:900;${fp}`,[nc.StringLiteral]:`color:${Cc.string};${fp}`,[nc.NumberLiteral]:`color:${Cc.number};${fp}`,[nc.Keyword]:`color:${Cc.keyword};${fp}`,[nc.Operator]:`color:${Cc.operator};${fp}`,[nc.ContextRef]:`color:${Cc.expression};${fp}`,[nc.Separator]:`color:${Cc.operator};${fp}`,[nc.Arrow]:`color:${Cc.operator};${fp}`,[nc.Bracket]:`color:${Cc.operator};${fp}`,[nc.Paren]:`color:${Cc.paren};${fp}`,[nc.Whitespace]:fp},bp=[[/claude|anthropic/i,"anthropic"],[/gpt|openai|o1|o3|o4/i,"openai"],[/gemini|google/i,"gemini"],[/azure|microsoft/i,"azure"],[/deepseek/i,"deepseek"]],yp=(t,e=!1)=>{const i=cc(t||"",e?Gd:Kd),o=[];for(const t of i){const e=!!vp[t.type],i=o[o.length-1];i&&i.isExpr===e?i.tokens.push(t):o.push({isExpr:e,tokens:[t]})}const n=t=>{const e=vp[t.type];if(!e){const e=t.text.split("\n");return V`${e.map((t,e)=>V`${e>0?V`<br />`:null}${t}`)}`}const i=t.text.split("\n");return V`${i.map((t,i)=>V`${i>0?V`<br />`:null}${t?V`<span style="${e}">${t}</span>`:null}`)}`};return V`${o.map(t=>{const e=V`${t.tokens.map(n)}`;return t.isExpr?V`<span style="hyphens:none">${e}</span>`:e})}`},xp=(t,e,i=3)=>V`<div
10762
10837
  style="display: -webkit-box; -webkit-line-clamp: ${i}; -webkit-box-orient: vertical; overflow: hidden; word-wrap: break-word; overflow-wrap: break-word; hyphens: auto;"
10763
10838
  title="${e}"
10764
10839
  >
@@ -18339,7 +18414,7 @@ function(t){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.
18339
18414
  <path class="area" d=${`${r} L90,22 L0,22 Z`}></path>
18340
18415
  <polyline class="line" points=${s}></polyline>
18341
18416
  </svg>
18342
- `}renderFlowStatus(t){const e=(t.status||"active").toString().toLowerCase(),i="archived"===e?"archived":"active",o="archived"===e?"Archived":"Active";return this.renderStatusPill(i,o)}}),HC("temba-list",Oh),HC("temba-sortable-list",jd),HC("temba-run-list",cu),HC("temba-flow-details",hu),HC("temba-label",Qh),HC("temba-menu",Zh),HC("temba-contact-search",Fh),HC("temba-icon",qh),HC("temba-dropdown",Kh),HC("temba-tabs",Gh),HC("temba-tab",Xh),HC("temba-contact-badges",su),HC("temba-contact-events",au),HC("temba-slider",lu),HC("temba-content-menu",yu),HC("temba-compose",_u),HC("temba-color-picker",Cu),HC("temba-resizer",Su),HC("temba-thumbnail",Tu),HC("temba-webchat",Ru),HC("temba-image-picker",Bu),HC("temba-mask",Fu),HC("temba-user",Ll),HC("temba-template-editor",qu),HC("temba-toast",Uu),HC("temba-chat",yh),HC("temba-media-picker",Hu),HC("temba-flow-editor",Eg),HC("temba-editor-toolbar",dg),HC("temba-message-table",jC),HC("temba-node-editor",cC),HC("temba-flow-node",_g),HC("temba-sticky-note",Tg),HC("temba-canvas-menu",Dg),HC("temba-node-type-selector",Mg),HC("temba-contact-notepad",zg),HC("temba-progress",Ig),HC("temba-start-progress",Lg),HC("temba-shortcuts",Og),HC("temba-popup-select",Pg),HC("temba-user-select",Rg),HC("temba-workspace-select",Ng),HC("temba-chart",Xk),HC("temba-key-value-editor",uC),HC("temba-array-editor",pC),HC("temba-message-editor",mC),HC("temba-rich-edit",gC),HC("temba-accordion",bC),HC("temba-accordion-section",yC),HC("temba-expression-highlight",fC),HC("temba-floating-tab",Cg),HC("temba-floating-window",vC),HC("temba-simulator",SC),HC("temba-flow-search",IC),HC("temba-issues-window",LC),HC("temba-revisions-window",FC),HC("temba-auto-translate",UC);class WC extends ct{static get styles(){return l`
18417
+ `}renderFlowStatus(t){const e=(t.status||"active").toString().toLowerCase(),i="archived"===e?"archived":"active",o="archived"===e?"Archived":"Active";return this.renderStatusPill(i,o)}}),HC("temba-list",Oh),HC("temba-sortable-list",jd),HC("temba-run-list",cu),HC("temba-flow-details",hu),HC("temba-label",Qh),HC("temba-menu",Zh),HC("temba-contact-search",Fh),HC("temba-icon",qh),HC("temba-dropdown",Kh),HC("temba-tabs",Gh),HC("temba-tab",Xh),HC("temba-contact-badges",su),HC("temba-contact-timeline",au),HC("temba-slider",lu),HC("temba-content-menu",yu),HC("temba-compose",_u),HC("temba-color-picker",Cu),HC("temba-resizer",Su),HC("temba-thumbnail",Tu),HC("temba-webchat",Ru),HC("temba-image-picker",Bu),HC("temba-mask",Fu),HC("temba-user",Ll),HC("temba-template-editor",qu),HC("temba-toast",Uu),HC("temba-chat",yh),HC("temba-media-picker",Hu),HC("temba-flow-editor",Eg),HC("temba-editor-toolbar",dg),HC("temba-message-table",jC),HC("temba-node-editor",cC),HC("temba-flow-node",_g),HC("temba-sticky-note",Tg),HC("temba-canvas-menu",Dg),HC("temba-node-type-selector",Mg),HC("temba-contact-notepad",zg),HC("temba-progress",Ig),HC("temba-start-progress",Lg),HC("temba-shortcuts",Og),HC("temba-popup-select",Pg),HC("temba-user-select",Rg),HC("temba-workspace-select",Ng),HC("temba-chart",Xk),HC("temba-key-value-editor",uC),HC("temba-array-editor",pC),HC("temba-message-editor",mC),HC("temba-rich-edit",gC),HC("temba-accordion",bC),HC("temba-accordion-section",yC),HC("temba-expression-highlight",fC),HC("temba-floating-tab",Cg),HC("temba-floating-window",vC),HC("temba-simulator",SC),HC("temba-flow-search",IC),HC("temba-issues-window",LC),HC("temba-revisions-window",FC),HC("temba-auto-translate",UC);class WC extends ct{static get styles(){return l`
18343
18418
  :host {
18344
18419
  line-height: normal;
18345
18420
  }