import{__require as e}from"../../../../postcss-value-parser/lib/index.mjs";import t from"../../../../../_virtual/index13.mjs";import{__require as a}from"../../utils/getAtRuleParams.mjs";import{__require as s}from"../../utils/namespace.mjs";import{__require as r}from"../../utils/ruleUrl.mjs";var o,l;function n(){if(l)return o;l=1;const n=e(),{utils:c}=t,i=a(),u=s(),m=r(),p=/^#{\s*/m,d={red:"color",blue:"color",green:"color",mix:"color",hue:"color",saturation:"color",lightness:"color",complement:"color","adjust-color":"color","scale-color":"color","change-color":"color","ie-hex-str":"color","map-get":"map","map-merge":"map","map-remove":"map","map-keys":"map","map-values":"map","map-has-key":"map",unquote:"string",quote:"string","str-length":"string","str-insert":"string","str-index":"string","str-slice":"string","to-upper-case":"string","to-lower-case":"string","unique-id":"string",percentage:"math",ceil:"math",floor:"math",abs:"math",random:"math",unit:"math",unitless:"math",comparable:"math",length:"list",nth:"list","set-nth":"list",join:"list",append:"list",zip:"list",index:"list","list-separator":"list","feature-exists":"meta","variable-exists":"meta","global-variable-exists":"meta","function-exists":"meta","mixin-exists":"meta",inspect:"meta","get-function":"meta","type-of":"meta",call:"meta","content-exists":"meta",keywords:"meta","selector-nest":"selector","selector-append":"selector","selector-replace":"selector","selector-unify":"selector","is-superselector":"selector","simple-selectors":"selector","selector-parse":"selector","selector-extend":"selector",lighten:"color","adjust-hue":"color",darken:"color",desaturate:"color",opacify:"color",transparentize:"color"},$={"adjust-color":"adjust","scale-color":"scale","change-color":"change","map-get":"get","map-merge":"merge","map-remove":"remove","map-keys":"keys","map-values":"values","map-has-key":"has-key","str-length":"length","str-insert":"insert","str-index":"index","str-slice":"slice",unitless:"is-unitless",comparable:"compatible","list-separator":"separator","selector-nest":"nest","selector-append":"append","selector-replace":"replace","selector-unify":"unify","selector-parse":"parse","selector-extend":"extend",lighten:"adjust","adjust-hue":"adjust",darken:"adjust",desaturate:"adjust",opacify:"adjust",saturate:"adjust",transparentize:"adjust"},g={lighten:["lighten($color, $amount)","adjust($color, $lightness: $amount)"],"adjust-hue":["adjust-hue($color, $amount)","adjust($color, $hue: $amount)"],darken:["darken($color, $amount)","adjust($color, $lightness: -$amount)"],desaturate:["desaturate($color, $amount)","adjust($color, $saturation: -$amount)"],opacify:["opacify($color, $amount)","adjust($color, $alpha: -$amount)"],saturate:["saturate($color, $amount)","adjust($color, $saturation: $amount)"],transparentize:["transparentize($color, $amount)","adjust($color, $alpha: -$amount)"]},h=u("no-global-function-names"),j=c.ruleMessages(h,{rejectedFullMessage:e=>e,rejected:e=>function(e){const t=d[e],a=$[e],s=g[e];if(a){if(s){const[e,a]=s;return`Expected ${t}.${a} instead of ${e}`}return`Expected ${t}.${a} instead of ${e}`}return`Expected ${t}.${e} instead of ${e}`}(e)}),f={url:m(h)};function x(e){return(t,a)=>{function s(e,t){n(t).walk(t=>{const s=t.value.replace(p,"");"function"===t.type&&""!==s&&d[s]&&c.report({message:j.rejected(s),node:e,word:s,result:a,ruleName:h})})}c.validateOptions(a,h,{actual:e})&&(t.walkDecls(e=>{s(e,e.value)}),t.walkAtRules(e=>{s(e,i(e))}))}}return x.ruleName=h,x.messages=j,x.meta=f,o=x}export{n as __require};