import{isString as e,isRegExp as r}from"../../utils/validateTypes.mjs";import t from"../../utils/getRuleSelector.mjs";import s from"../../utils/hasPrefix.mjs";import o from"../../utils/isAutoprefixable.mjs";import i from"../../utils/isStandardSyntaxRule.mjs";import l from"../../utils/optionsMatches.mjs";import m from"../../utils/parseSelector.mjs";import u from"../../utils/report.mjs";import a from"../../utils/ruleMessages.mjs";import n from"../../utils/validateOptions.mjs";const p="selector-no-vendor-prefix",f=a(p,{rejected:e=>`Unexpected vendor-prefixed selector "${e}"`}),c=(a,c)=>(d,x)=>{n(x,p,{actual:a},{actual:c,possible:{ignoreSelectors:[e,r]},optional:!0})&&d.walkRules(e=>{if(!s(e.selector))return;if(!i(e))return;const r=m(t(e),x,e);r&&r.walkPseudos(t=>{const{value:s}=t;if(!o.selector(s))return;if(l(c,"ignoreSelectors",s))return;const i=t.sourceIndex,m=i+s.length;u({result:x,ruleName:p,message:f.rejected,messageArgs:[s],node:e,index:i,endIndex:m,fix:{apply:()=>{t.value=o.unprefix(s),e.selector=r.toString()},node:e}})})})};c.ruleName=p,c.messages=f,c.meta={url:"https://stylelint.io/user-guide/rules/selector-no-vendor-prefix",fixable:!0};export{c as default};