import{__require as e}from"../../../../postcss-selector-parser/dist/index.mjs";import r from"../../../../../_virtual/index13.mjs";import{__require as s}from"../../utils/namespace.mjs";import{__require as t}from"../../utils/parseSelector.mjs";import{__require as n}from"../../utils/ruleUrl.mjs";var i,o;function a(){if(o)return i;o=1;const{isAttribute:a,isClassName:l,isCombinator:u,isIdentifier:m,isPseudoClass:c,isPseudoElement:d}=e(),{utils:p}=r,f=s(),_=t(),x=n(),g=f("selector-no-union-class-name"),j=p.ruleMessages(g,{rejected:"Unexpected union class name with the parent selector (&)"}),h={url:x(g)},q=[l,u,a,m,c,d];function v(e){return(r,s)=>{p.validateOptions(s,g,{actual:e})&&r.walkRules(/&/,e=>{const r=[],t=w(e.parent);if(t&&_(t,s,e,e=>{e.walk(e=>r.push(e))}),0===r.length)return;const n=r[r.length-1];l(n)&&_(e.selector,s,e,r=>{r.walkNesting(r=>{const t=r.next();t&&(q.some(e=>e(t))||p.report({ruleName:g,result:s,node:e,message:j.rejected,index:r.sourceIndex,endIndex:r.sourceIndex+e.selector.length}))})})})}}function w(e){return void 0!==e.selector?e.selector:e.parent?w(e.parent):void 0}return v.ruleName=g,v.messages=j,v.meta=h,i=v}export{a as __require};