import{__require as e}from"../../../../postcss-value-parser/lib/index.mjs";import r from"../../../../../_virtual/index13.mjs";import{__require as t}from"../../utils/declarationValueIndex.mjs";import{__require as n}from"../../utils/isNativeCssFunction.mjs";import{__require as s}from"../../utils/validateTypes.mjs";import{__require as i}from"../../utils/namespace.mjs";import{__require as a}from"../../utils/optionsHaveIgnored.mjs";import{__require as u}from"../../utils/parseFunctionArguments.mjs";import{__require as o}from"../../utils/ruleUrl.mjs";var l,m;function c(){if(m)return l;m=1;const c=e(),{utils:p}=r,d=t(),f=n(),{isString:g}=s(),_=i(),x=a(),{parseFunctionArguments:v}=u(),j=o(),q=_("at-function-named-arguments"),w=p.ruleMessages(q,{expected:"Expected a named parameter to be used in function call",rejected:"Unexpected a named parameter in function call"}),y={url:j(q)},F=/^\$\S*/;function I(e,r){return(t,n)=>{if(!p.validateOptions(n,q,{actual:e,possible:["always","never"]},{actual:r,possible:{ignore:["single-argument"],ignoreFunctions:[g]},optional:!0}))return;const s=x(r,"single-argument");t.walkDecls(t=>{const i=d(t);c(t.value).walk(a=>{if("function"!==a.type||f(a.value)||""===a.value)return;if(r&&r.ignoreFunctions&&r.ignoreFunctions.some(e=>{const r=a.value.replace(/^#{/,"");if(!/^\/.*\//.test(e))return e===r;const t=e.split("/");return new RegExp(t[1],t[2]||"").test(r)}))return;const u=v(c.stringify(a));if(1===u.length&&s)return;const o=i+a.sourceIndex;u.forEach(({key:r,index:s,endIndex:i})=>{switch(e){case"never":if(!r)return;p.report({message:w.rejected,node:t,result:n,ruleName:q,index:o+s,endIndex:o+i});break;case"always":if(r&&F.test(r))return;p.report({message:w.expected,node:t,result:n,ruleName:q,index:o+s,endIndex:o+i})}})})})}}return I.ruleName=q,I.messages=w,I.meta=y,l=I}export{c as __require};