1function i(a,r){switch(r){case"text":return a.text;case"tag":return a.tag;case"role":return a.role_id;case"prio":return a.prio;case"age_days":return a.created_at}}function u(a,r){var t;return(t=r.conditions)!=null&&t.length?r.conditions.every(e=>{const n=i(a,e.field);return e.op==="contains"?String(n??"").toLowerCase().includes(String(e.value).toLowerCase()):e.op==="equals"?String(n??"")===String(e.value):e.op==="gte"&&e.field==="age_days"?(Date.now()-new Date(n).getTime())/864e5>=Number(e.value):e.op==="gte"?Number(n)>=Number(e.value):!1}):!0}function o(a){const r={};for(const t of a)if(t.type==="set_prio")r.prio=t.value;else if(t.type==="set_tag")r.tag=t.value;else if(t.type==="set_role")r.role_id=t.value;else if(t.type==="mark_important")r.important=!0;else if(t.type==="set_due"){const e=new Date;t.value==="tomorrow"?e.setDate(e.getDate()+1):t.value==="next_week"&&e.setDate(e.getDate()+7),r.due_date=e.toISOString().slice(0,10)}return r}export{o as applyActions,u as matchesRule};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.