openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
1 lines • 1.27 kB
JavaScript
import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{GN as t,JN as n,Qb as r,Xs as i,Zs as a,cx as o,dx as s,qN as c,sx as l}from"./_2_____________________________.js";import{c as u,d,l as f,n as p,s as m,u as h}from"./presenter-CRCK6EVn.js";function g(e){let t=new Date(e),n=new Date;return{days:b(t)-b(n),date:r(e,{month:`short`,day:`numeric`,...t.getFullYear()===n.getFullYear()?{}:{year:`numeric`}})}}function _(e){let{days:t,date:r}=g(e);if(t===0)return l(e);let i=t===1?n(`chat.sessionAutomation.tomorrow`):r;return n(`chat.sessionAutomation.onceAt`,{day:i,time:l(e)})}function v(e){if(e===null)return n(`cron.scheduleLabel.noNextRun`);let{days:t,date:r}=g(e),i=l(e);return t===0?n(`cron.scheduleLabel.nextRunToday`,{time:i}):t===1?n(`cron.scheduleLabel.nextRunTomorrow`,{time:i}):n(`cron.scheduleLabel.nextRunOn`,{day:r,time:i})}function y(e){if(e.kind===`at`){let t=Date.parse(e.at);if(Number.isFinite(t))return _(t)}return e.kind===`every`?n(`chat.sessionAutomation.everyDuration`,{duration:d(e.everyMs)?.map(e=>o({...e,unitDisplay:`long`})).join(` `)??n(`common.na`)}):p({schedule:e})}var b;function x(){return(x=e((()=>{h(),i(),u(),s(),m(),t(),c(a),c(f),b=e=>Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())/864e5})))()}export{y as n,v as r,x as t};