import e from"../../../../../_virtual/index13.mjs";import{__require as r}from"../../utils/namespace.mjs";import{__require as t}from"../../utils/ruleUrl.mjs";var a,o;function s(){if(o)return a;o=1;const{utils:s}=e,n=r(),u=t(),i=n("at-root-no-redundant");const l=s.ruleMessages(i,{rejected:"Unexpected @at-root rule"}),m={url:u(i),fixable:!0};function p(e){return(r,t)=>{s.validateOptions(t,i,{actual:e})&&r.walkAtRules("at-root",e=>{if("root"===e.parent.type||e.params.split(",").every(e=>e.replace(/#{.*}/g,"").includes("&"))||function(e){let r=e.parent;for(;r;){if("atrule"===r.type&&"keyframes"===r.name)return!0;r=r.parent}return!1}(e)){const r=()=>{e.after(e.toString().replace(/@at-root\s/,"")),e.next().raws=e.raws,e.remove()};s.report({message:l.rejected,node:e,result:t,ruleName:i,word:`@${e.name}`,fix:r})}})}}return p.ruleName=i,p.messages=l,p.meta=m,a=p}export{s as __require};