import"./useForm-CcjrODHR.js";import{m as c}from"./index-B_2CoVdl.js";import{h as u,i as d}from"./componentMap-CzCGDP7x.js";import"./JAreaLinkage-CSgDAlrn.js";import"./JSelectUser-BQIJUcBR.js";import"./JSelectDept-wKz_Qtmc.js";import"./JCodeEditor-esTLnfS3.js";import"./JAddInput-YFlAniYT.js";import"./JPopup-BJBYqoWe.js";import{C as n}from"./EasyCronInput-DclSHT47.js";import"./JEllipsis-Cn7GCKHR.js";import"./JDictSelectTag-CxpDdimB.js";const m={validator({},o){if(!o)return Promise.resolve();const e=o.split(" ").filter(r=>!!r);if(e.length>7)return Promise.reject("Cron表达式最多7项！");let i=o;if(e.length===7){const r=e[6];if(r!=="*"&&r!=="?"){let t=[];if(r.indexOf("-")>=0?t=r.split("-"):r.indexOf("/")?t=r.split("/"):t=[r],t.some(s=>isNaN(Number(s))))return Promise.reject("Cron表达式参数[年]错误："+r)}i=e.slice(0,6).join(" ")}try{return n.parseExpression(i).next(),Promise.resolve()}catch(r){return Promise.reject("Cron表达式错误："+r)}}},k=m.validator;export{k as J};
