import{atRuleRegexes as e}from"../../utils/regexes.mjs";import{declarationValueIndex as r}from"../../utils/nodeFieldIndices.mjs";import t from"../../utils/getLexer.mjs";import s from"../../utils/isStandardSyntaxAtRule.mjs";import o from"../../utils/isStandardSyntaxDeclaration.mjs";import n from"../../utils/report.mjs";import a from"../../utils/ruleMessages.mjs";import i from"../../utils/validateOptions.mjs";const u="at-rule-descriptor-value-no-unknown",l=a(u,{rejected:(e,r)=>`Unexpected unknown value "${r}" for descriptor "${e}"`}),m=(a,m,d)=>(m,p)=>{i(p,u,{actual:a})&&m.walkAtRules(e.unsupportedNestingNames,e=>{s(e)&&e.walkDecls(s=>{if(!o(s))return;const{prop:a,value:i}=s,m=t(d),{error:c}=m.matchAtruleDescriptor(e.name,a,i);if(!c)return;if("SyntaxMatchError"!==c.name)return;const f=r(s),g=f+i.length;n({message:l.rejected,messageArgs:[a,i],node:s,index:f,endIndex:g,ruleName:u,result:p})})})};m.ruleName=u,m.messages=l,m.meta={url:"https://stylelint.io/user-guide/rules/at-rule-descriptor-value-no-unknown"};export{m as default};