import n from"./getAtRuleParams.mjs";import t from"./getRuleSelector.mjs";import{isString as r,isObject as e}from"./validateTypes.mjs";function o(n){return u(n)+(n.raws.afterName?.length??0)}function f(n){const t=n.source?.end?.offset;if(!t)return n.toString().length-1;const r=n.raws?.after?.length;return r?t-(r+1):t-1}function u(n){return 1+n.name.length}function i(t){return o(t)+n(t).length}function s(n){const{prop:t}=n.raws,r=e(t);return g([r&&"prefix"in t&&t.prefix,r&&"raw"in t&&t.raw||n.prop,r&&"suffix"in t&&t.suffix])}function c(n){const{between:t,value:r}=n.raws;return s(n)+g([t||":",r&&"prefix"in r&&r.prefix])}function a(n){return t(n).length}function l(n){const t=n.source?.end?.offset;if(!t)return n.toString().length-1;const r=n.raws?.after?.length;return r?t-(r+1):t-1}function g(n){return n.reduce((n,t)=>r(t)?n+t.length:n,0)}export{f as atRuleAfterIndex,u as atRuleAfterNameIndex,i as atRuleBetweenIndex,o as atRuleParamIndex,s as declarationBetweenIndex,c as declarationValueIndex,l as ruleAfterIndex,a as ruleBetweenIndex};