import{isString as e,isRegExp as s}from"../../utils/validateTypes.mjs";import{atRuleParamIndex as t}from"../../utils/nodeFieldIndices.mjs";import{atRuleRegexes as r}from"../../utils/regexes.mjs";import m from"../../utils/findMediaFeatureNames.mjs";import i from"../../utils/getAtRuleParams.mjs";import o from"../../utils/isCustomMediaQuery.mjs";import{mediaFeatureNames as a}from"../../reference/mediaFeatures.mjs";import u from"../../utils/optionsMatches.mjs";import n from"../../utils/report.mjs";import l from"../../utils/ruleMessages.mjs";import d from"../../utils/validateOptions.mjs";import f from"../../utils/vendor.mjs";const p="media-feature-name-no-unknown",j=l(p,{rejected:e=>`Unexpected unknown media feature name "${e}"`}),c=(l,c)=>(g,x)=>{d(x,p,{actual:l},{actual:c,possible:{ignoreMediaFeatureNames:[e,s]},optional:!0})&&g.walkAtRules(r.mediaName,e=>{m(i(e),s=>{const[,,r,m,{value:i}]=s;if(o(i))return;if(u(c,"ignoreMediaFeatureNames",i))return;if(f.prefix(i)||a.has(i.toLowerCase()))return;const l=t(e);n({message:j.rejected,messageArgs:[i],node:e,index:l+r,endIndex:l+m+1,ruleName:p,result:x})})})};c.ruleName=p,c.messages=j,c.meta={url:"https://stylelint.io/user-guide/rules/media-feature-name-no-unknown"};export{c as default};