import{isBoolean as e,isString as t,isRegExp as s}from"../../utils/validateTypes.mjs";import r from"../../utils/getRuleSelector.mjs";import i from"../../utils/getStrippedSelectorSource.mjs";import o from"../../utils/isKeyframeRule.mjs";import l from"../../utils/isStandardSyntaxRule.mjs";import m from"../../utils/matchesStringOrRegExp.mjs";import a from"../../utils/optionsMatches.mjs";import n from"../../utils/parseSelector.mjs";import u from"../../utils/report.mjs";import p from"../../utils/ruleMessages.mjs";import c from"../../utils/validateOptions.mjs";const d="selector-disallowed-list",f=p(d,{rejected:e=>`Unexpected selector "${e}"`}),g=(p,g)=>(j,y)=>{if(!c(y,d,{actual:p,possible:[t,s]},{actual:g,possible:{ignore:["inside-block","keyframe-selectors"],splitList:[e]},optional:!0}))return;const x=a(g,"ignore","inside-block"),S=a(g,"ignore","keyframe-selectors"),h=g&&g.splitList;j.walkRules(e=>{if(!l(e))return;if(S&&o(e))return;if(x){const{parent:t}=e;if(t&&"root"!==t.type)return}function t(t,s,r){m(t,p)&&u({result:y,ruleName:d,message:f.rejected,messageArgs:[t],node:e,index:s,endIndex:r})}const s=r(e);h?n(s,y,e)?.each(e=>{const{selector:s,index:r,endIndex:o}=i(e);t(s,r,o)}):t(s,0,s.length)})};g.primaryOptionArray=!0,g.ruleName=d,g.messages=f,g.meta={url:"https://stylelint.io/user-guide/rules/selector-disallowed-list"};export{g as default};