import e from"../../../../../_virtual/index13.mjs";import{__require as r}from"../../utils/validateTypes.mjs";import{__require as t}from"../../utils/namespace.mjs";import{__require as s}from"../../utils/optionsHaveIgnored.mjs";import{__require as o}from"../../utils/ruleUrl.mjs";var a,i;function l(){if(i)return a;i=1;const{utils:l}=e,{isRegExp:n,isString:p}=r(),u=t(),m=s(),c=o(),g=u("dollar-variable-pattern"),f=l.ruleMessages(g,{expected:(e,r)=>`Expected "${e}" to match pattern "${r}"`}),_={url:c(g)};function d(e,r){return(t,s)=>{if(!l.validateOptions(s,g,{actual:e,possible:[n,p]},{actual:r,possible:{ignore:["local","global"]},optional:!0}))return;const o=p(e)?new RegExp(e):e;t.walkDecls(t=>{const{prop:a}=t;if("$"!==a[0])return;if(m(r,"global")&&"root"===t.parent.type||m(r,"local")&&"root"!==t.parent.type)return;const i=a.slice(1);o.test(i)||l.report({message:f.expected,messageArgs:[i,e],node:t,result:s,ruleName:g,word:a})})}}return d.ruleName=g,d.messages=f,d.meta=_,a=d}export{l as __require};