import{isRegExp as e,isString as t}from"../../utils/validateTypes.mjs";import{atRuleParamIndex as s}from"../../utils/nodeFieldIndices.mjs";import{atRuleRegexes as r}from"../../utils/regexes.mjs";import m from"../../utils/isStandardSyntaxKeyframesName.mjs";import a from"../../utils/report.mjs";import i from"../../utils/ruleMessages.mjs";import o from"../../utils/validateOptions.mjs";const l="keyframes-name-pattern",n=i(l,{expected:(e,t)=>`Expected "${e}" to match pattern "${t}"`}),p=i=>(p,u)=>{if(!o(u,l,{actual:i,possible:[e,t]}))return;const d=t(i)?new RegExp(i):i;p.walkAtRules(r.keyframesName,e=>{const t=e.params;if(!m(t))return;if(d.test(t))return;const r=s(e),o=r+t.length;a({index:r,endIndex:o,message:n.expected,messageArgs:[t,i],node:e,ruleName:l,result:u})})};p.ruleName=l,p.messages=n,p.meta={url:"https://stylelint.io/user-guide/rules/keyframes-name-pattern"};export{p as default};