/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/eslint-plugin-vue-scoped-css@3.0.0/dist/index.mjs
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
import{createRequire}from"node:module";import lodash from"lodash";import*as postcss from"postcss";import postcssSafeParser from"postcss-safe-parser";import selectorParser from"postcss-selector-parser";import*as vueParser from"vue-eslint-parser";import{AST}from"vue-eslint-parser";import eslintUtils from"@eslint-community/eslint-utils";var Node=class{constructor(e,t,n,s,r,o){this.type=t,this.loc=n,this.start=s,this.end=r,this.range=[s,r],this.node=e,this.lang=o}},HasParentNode=class extends Node{constructor(e,t,n,s,r,o){super(e,t,n,s,r,o.parent.lang),this.parent=o.parent}},VCSSParsingError=class extends Node{constructor(e,t,n,s,r){super(e,"VCSSParsingError",t,n,s,r.lang),this.message=r.message}},VCSSStyleSheet=class extends Node{constructor(e,t,n,s,r){super(e,"VCSSStyleSheet",t,n,s,r.lang),this.nodes=r.nodes??[],this.comments=r.comments??[],this.errors=r.errors??[]}copy(e){return copyStdNode(this,e)}},VCSSStyleRule=class extends HasParentNode{constructor(e,t,n,s,r){if(super(e,"VCSSStyleRule",t,n,s,r),this.selectorText=r.selectorText??e.selector,null!=r.rawSelectorText)this.rawSelectorText=r.rawSelectorText;else{const t=e.raws;this.rawSelectorText=t.selector?t.selector.raw:e.selector}this.selectors=r.selectors??[],this.nodes=r.nodes??[]}copy(e){return copyStdNode(this,e)}},VCSSDeclarationProperty=class extends HasParentNode{constructor(e,t,n,s,r){super(e,"VCSSDeclarationProperty",t,n,s,r),this.property=r.property??e.prop,this.value=getProp(r,e,"value"),this.important=r.important??Boolean(e.important)}copy(e){return copyStdNode(this,e)}},VCSSAtRule=class extends HasParentNode{constructor(e,t,n,s,r){super(e,"VCSSAtRule",t,n,s,r),this.node=e,this.name=getProp(r,e,"name"),this.identifier=r.identifier,this.paramsText=r.paramsText??e.params,null!=r.rawParamsText?this.rawParamsText=r.rawParamsText:this.rawParamsText=e.raws.params?.raw??e.params,this.selectors=r.selectors??void 0,this.nodes=r.nodes??[]}copy(e){return copyStdNode(this,e)}},VCSSUnknown=class extends HasParentNode{constructor(e,t,n,s,r){super(e,"VCSSUnknown",t,n,s,r),this.nodes=r.nodes??[],this.unknownType=r.unknownType}copy(e){return copyStdNode(this,e)}},VCSSSelector=class extends HasParentNode{constructor(e,t,n,s,r){super(e,"VCSSSelector",t,n,s,r),this.nodes=r.nodes??[],this.parent=r.parent}copy(e){return copyStdNode(this,e)}get selector(){return this.nodes.map((e=>e.selector)).join("")}},VCSSTypeSelector=class extends HasParentNode{constructor(e,t,n,s,r){super(e,"VCSSTypeSelector",t,n,s,r),this.value=getProp(r,e,"value"),this.selector=this.value}copy(e){return copyStdNode(this,e)}},VCSSIDSelector=class extends HasParentNode{constructor(e,t,n,s,r){super(e,"VCSSIDSelector",t,n,s,r),this.value=getProp(r,e,"value"),this.selector=`#${this.value}`}copy(e){return copyStdNode(this,e)}},VCSSClassSelector=class extends HasParentNode{constructor(e,t,n,s,r){super(e,"VCSSClassSelector",t,n,s,r),this.value=getProp(r,e,"value"),this.selector=`.${this.value}`}copy(e){return copyStdNode(this,e)}},VCSSNestingSelector=class extends HasParentNode{constructor(e,t,n,s,r){super(e,"VCSSNestingSelector",t,n,s,r),this.value=getProp(r,e,"value"),this.selector=this.value}copy(e){return copyStdNode(this,e)}},VCSSUniversalSelector=class extends HasParentNode{constructor(e,t,n,s,r){super(e,"VCSSUniversalSelector",t,n,s,r),this.value=getProp(r,e,"value"),this.selector=this.value}copy(e){return copyStdNode(this,e)}},VCSSAttributeSelector=class extends HasParentNode{constructor(e,t,n,s,r){super(e,"VCSSAttributeSelector",t,n,s,r),this.attribute=getProp(r,e,"attribute"),this.operator=getProp(r,e,"operator")??null,this.value=getProp(r,e,"value")??null,this.quoteMark=getProp(r,e,"quoteMark")??null;const o=e.raws;null!=r.insensitiveFlag?this.insensitiveFlag=r.insensitiveFlag:null!=o.insensitiveFlag?this.insensitiveFlag=o.insensitiveFlag:e.insensitive?this.insensitiveFlag="i":this.insensitiveFlag=null,this.selector=this.refreshSelector()}refreshSelector(){let e=`[${this.attribute}`;return null!=this.operator&&(e+=this.operator,null!=this.value&&(e+=this.quoteMark?this.quoteMark+this.value+this.quoteMark:this.value)),null!=this.insensitiveFlag&&(e+=` ${this.insensitiveFlag}`),e+="]",e}copy(e){return copyStdNode(this,e)}},VCSSSelectorPseudo=class extends HasParentNode{constructor(e,t,n,s,r){super(e,"VCSSSelectorPseudo",t,n,s,r),this.value=getProp(r,e,"value"),this.nodes=r.nodes??[]}copy(e){return copyStdNode(this,e)}get selector(){if(!this.nodes.length)return this.value;const e=this.nodes.map((e=>e.selector)).join(",");return`${this.value}(${e})`}},VCSSSelectorCombinator=class extends HasParentNode{constructor(e,t,n,s,r){super(e,"VCSSSelectorCombinator",t,n,s,r),this.value=getProp(r,e,"value"),this.selector=this.value}copy(e){return copyStdNode(this,e)}},VCSSUnknownSelector=class extends HasParentNode{constructor(e,t,n,s,r){super(e,"VCSSUnknownSelector",t,n,s,r),this.value=getProp(r,e,"value")||"",this.selector=this.value}copy(e){return copyStdNode(this,e)}},VCSSComment=class e extends HasParentNode{constructor(e,t,n,s,r,o){super(e,"VCSSComment",n,s,r,o),this.node=e,this.text=t}copy(t){const n=t?.parent??this.parent;return new e(t?.node??this.node,t?.text??this.text,t?.loc??this.loc,t?.start??this.start,t?.end??this.end,{...this,...t,parent:n})}},VCSSInlineComment=class e extends HasParentNode{constructor(e,t,n,s,r,o){super(e,"VCSSInlineComment",n,s,r,o),this.node=e,this.text=t}copy(t){const n=t?.parent??this.parent;return new e(t?.node??this.node,t?.text??this.text,t?.loc??this.loc,t?.start??this.start,t?.end??this.end,{...this,...t,parent:n})}};function getProp(e,t,n){return null!=e?.[n]?e[n]:t[n]}function copyStdNode(e,t){return new(0,e.constructor)(t?.node??e.node,t?.loc??e.loc,t?.start??e.start,t?.end??e.end,{...e,...t})}function isVCSSAtRule(e){return"VCSSAtRule"===e?.type}function isVCSSStyleRule(e){return"VCSSStyleRule"===e?.type}function isVCSSStyleSheet(e){return"VCSSStyleSheet"===e?.type}function isVCSSDeclarationProperty(e){return"VCSSDeclarationProperty"===e?.type}function isVCSSComment(e){return"VCSSComment"===e?.type||"VCSSInlineComment"===e?.type}function isVCSSContainerNode(e){return isVCSSAtRule(e)||isVCSSStyleRule(e)||isVCSSStyleSheet(e)||"VCSSUnknown"===e?.type}function hasSelectorNodes(e){return!(!isVCSSStyleRule(e)&&!isNestingAtRule(e))}function hasNodesSelector(e){return null!=e&&("VCSSSelector"===e.type||"VCSSSelectorPseudo"===e.type)}function normalizePseudoParams(e,t){const n=[];let s=[];for(const r of t)if("VCSSSelector"===r.type){if(s.length){const t=s[0],r=s[s.length-1],o={start:t.loc.start,end:r.loc.end};n.push(new VCSSSelector(s[0],o,t.start,r.end,{parent:e,nodes:s})),s=[]}n.push(r)}else s.push(r);if(s.length){const t=s[0],r=s[s.length-1],o={start:t.loc.start,end:r.loc.end};n.push(new VCSSSelector(s[0],o,t.start,r.end,{parent:e,nodes:s})),s=[]}return n}function isVueSpecialPseudo(e){return isVDeepPseudo(e)||isVSlottedPseudo(e)||isVGlobalPseudo(e)}function isVDeepPseudoV2(e){return!!isVDeepPseudo(e)&&0===e.nodes.length}function isVDeepPseudo(e){if(isPseudo(e)){const t=e.value.trim();return"::v-deep"===t||":deep"===t}return!1}function isVSlottedPseudo(e){if(isPseudo(e)){const t=e.value.trim();return"::v-slotted"===t||":slotted"===t}return!1}function isVGlobalPseudo(e){if(isPseudo(e)){const t=e.value.trim();return"::v-global"===t||":global"===t}return!1}function isPseudoEmptyArguments(e){return 0===e.nodes.length||1===e.nodes.length&&0===e.nodes[0].nodes.length}function isTypeSelector(e){return"VCSSTypeSelector"===e?.type}function isIDSelector(e){return"VCSSIDSelector"===e?.type}function isClassSelector(e){return"VCSSClassSelector"===e?.type}function isUniversalSelector(e){return"VCSSUniversalSelector"===e?.type}function isNestingSelector(e){return"VCSSNestingSelector"===e?.type}function isPseudo(e){return"VCSSSelectorPseudo"===e?.type}function isSelectorCombinator(e){return"VCSSSelectorCombinator"===e?.type}function isDescendantCombinator(e){return isSelectorCombinator(e)&&""===e.value.trim()}function isChildCombinator(e){return isSelectorCombinator(e)&&">"===e.value.trim()}function isAdjacentSiblingCombinator(e){return isSelectorCombinator(e)&&"+"===e.value.trim()}function isGeneralSiblingCombinator(e){return isSelectorCombinator(e)&&"~"===e.value.trim()}function isDeepCombinator(e){if(isSelectorCombinator(e)){const t=e.value.trim();return">>>"===t||"/deep/"===t}return!1}function isNestingAtRule(e){return null!=e&&(isVCSSAtRule(e)&&"nest"===e.name&&"@"===e.identifier)}function*findNestingSelectors(e){for(const t of e)isNestingSelector(t)&&(yield{nestingIndex:e.indexOf(t),node:t,nodes:e}),hasNodesSelector(t)&&(yield*findNestingSelectors(t.nodes))}function findNestingSelector(e){for(const t of findNestingSelectors(e))return t;return null}function isPostCSSContainer(e){return null!=e.nodes}function isPostCSSSPContainer(e){return null!=e.nodes}function hasTemplateBlock(e){const{ast:t}=e.sourceCode;return Boolean(t.templateBody)}function isDefined(e){return null!=e}var CSSSelectorParser=class{constructor(e,t){this.lang="css",this.sourceCode=e,this.commentContainer=t}parse(e,t,n){const s=this.parseInternal(e);return this._postcssSelectorParserNodeChiildrenToASTNodes(t,s,n)}parseInternal(e){return selectorParser().astSync(e)}parseCommentsInternal(e){return selectorParser().astSync(e)}_postcssSelectorParserNodeChiildrenToASTNodes(e,t,n){const s=removeInvalidDescendantCombinator(t.nodes.map((t=>this._postcssSelectorParserNodeToASTNode(e,t,n))).filter(isDefined));if(s.length!==t.nodes.length){if("selector"===t.type){const e=s[0];n.loc.start={...e.loc.start},n.start=e.start,n.range=[e.start,n.range[1]]}if("selector"===t.type){const e=s[s.length-1];n.loc.end={...e.loc.end},n.end=e.end,n.range=[n.range[0],e.end]}}return s}_postcssSelectorParserNodeToASTNode(e,t,n){const{sourceCode:s}=this;function r(e){return e.column>=0?s.getIndexFromLoc(e):s.getIndexFromLoc({line:e.line,column:0})+e.column}const o={start:getESLintLineAndColumnFromPostCSSSelectorParserNode(e,t,"start"),end:getESLintLineAndColumnFromPostCSSSelectorParserNode(e,t,"end")},i=r(o.start),l=r(o.end),a=this[typeToConvertMethodName$1(t.type)](t,o,i,l,n);return null==a?null:(this.parseRawsSpaces(a,t,n),isPostCSSSPContainer(t)&&("VCSSSelectorPseudo"===a.type?a.nodes=normalizePseudoParams(a,this._postcssSelectorParserNodeChiildrenToASTNodes(e,t,a)):"VCSSSelector"===a.type&&(a.nodes=this._postcssSelectorParserNodeChiildrenToASTNodes(e,t,a))),a)}parseRawsSpaces(e,t,n){if(!hasRaws$1(t)||!t.raws.spaces)return;const{after:s,before:r}=t.raws.spaces;if(s?.trim()&&this.parseCommentsInternal(s).walkComments((t=>{this._postcssSelectorParserNodeToASTNode(e.loc.end,t,n)})),r?.trim()){const t=this.sourceCode.getLocFromIndex(e.range[0]-r.length);this.parseCommentsInternal(r).walkComments((e=>{this._postcssSelectorParserNodeToASTNode(t,e,n)}))}}convertSelectorNode(e,t,n,s,r){const o=this.sourceCode,i=o.text;let l=i.slice(n,s);const a=/^\s+/u.exec(l);a?.[0]&&(n+=a[0].length,t.start=this.sourceCode.getLocFromIndex(n),l=l.slice(a[0].length));const c=/\s+$/u.exec(l);return c?.[0]&&(s-=c[0].length,t.end=this.sourceCode.getLocFromIndex(s),l=l.slice(0,-c[0].length)),function(){const e=/^\(\s*/u.exec(l);if(!e?.[0])return;let r=!1;for(let e=s-1;e<i.length;e++){const t=i[e];if(")"===t){r=!0;break}if(t?.trim()&&e!==s-1)return}if(!r)return;n+=e[0].length,t.start=o.getLocFromIndex(n),l=l.slice(e[0].length)}(),function(){const e=/\s*\)$/u.exec(l);if(!e?.[0])return;let r=!1;for(let e=n-1;e>=0;e--){const t=i[e];if("("===t){r=!0;break}if(t?.trim())return}if(!r)return;s-=e[0].length,t.end=o.getLocFromIndex(s),l=l.slice(0,-e[0].length)}(),new VCSSSelector(e,t,n,s,{parent:r})}convertTagNode(e,t,n,s,r){return new VCSSTypeSelector(e,t,n,s,{parent:r})}convertIdNode(e,t,n,s,r){return new VCSSIDSelector(e,t,n,s,{parent:r})}convertClassNode(e,t,n,s,r){return new VCSSClassSelector(e,t,n,s,{parent:r})}convertNestingNode(e,t,n,s,r){return new VCSSNestingSelector(e,t,n,s,{parent:r})}convertUniversalNode(e,t,n,s,r){return new VCSSUniversalSelector(e,t,n,s,{parent:r})}convertAttributeNode(e,t,n,s,r){return new VCSSAttributeSelector(e,t,n,s,{parent:r})}convertPseudoNode(e,t,n,s,r){return new VCSSSelectorPseudo(e,t,n,s,{parent:r})}convertCombinatorNode(e,t,n,s,r){const o=new VCSSSelectorCombinator(e,t,n,s,{parent:r});return adjustEndLocation(o,n+o.value.length,this.sourceCode),o}convertStringNode(e,t,n,s,r){const o=new VCSSUnknownSelector(e,t,n,s,{parent:r});return adjustEndLocation(o,n+o.value.length,this.sourceCode),o}convertCommentNode(e,t,n,s,r){const o=e.value.replace(/^\s*\/\*/u,"").replace(/\*\/\s*$/u,"");return this.commentContainer.push(new VCSSComment(e,o,t,n,s,{parent:r})),null}convertUnknownTypeNode(e,t,n,s,r){return new VCSSUnknownSelector(e,t,n,s,{parent:r})}};function getESLintLineAndColumnFromPostCSSSelectorParserNode(e,t,n){const s=t.source&&t.source[n]||{line:0,column:1};let{line:r}=s,o=s.column-1;return 1===r?(r=e.line,o=e.column+o):r=e.line+r-1,"end"===n&&o++,{line:r,column:o}}function adjustEndLocation(e,t,n){if(e.range[1]===t)return;e.range[1]=t,e.end=t,e.loc.end=n.getLocFromIndex(t);let s=e.parent;for(;s&&s.end<t;)s.end=t,s.range[1]=t,s.loc.end={...e.loc.end},s=s.parent}function removeInvalidDescendantCombinator(e){const t=[];let n=null;for(let s=0;s<e.length;s++){const r=e[s];if(isDescendantCombinator(r)){if(0===t.length)continue;if(isSelectorCombinator(n)||isVDeepPseudoV2(n))continue;if(isSelectorCombinator(e[s+1]))continue}else isVueSpecialPseudo(r)&&n&&!isSelectorCombinator(n)&&t.push(new VCSSSelectorCombinator(r.node,r.loc,r.start,r.end,{parent:r.parent,value:" "}));t.push(r),n=r}return t}const convertNodeTypes$1={tag:"convertTagNode",string:"convertStringNode",selector:"convertSelectorNode",pseudo:"convertPseudoNode",nesting:"convertNestingNode",id:"convertIdNode",comment:"convertCommentNode",combinator:"convertCombinatorNode",class:"convertClassNode",attribute:"convertAttributeNode",universal:"convertUniversalNode"};function typeToConvertMethodName$1(e){return"root"===e?"convertUnknownTypeNode":convertNodeTypes$1[e]||"convertUnknownTypeNode"}function hasRaws$1(e){return null!=e.raws}var CSSParser=class{constructor(e,t){this._selectorParser=null,this.anyErrors=[],this.sourceCode=e,this.commentContainer=[],this.lang=t}parse(e,t){const{sourceCode:n}=this;this.commentContainer=[],this._selectorParser=this.createSelectorParser(),this.anyErrors=[];try{const n=this.parseInternal(e),s=this._postcssNodeToASTNode(t,n);return s.comments=this.commentContainer,s.errors.push(...this.collectErrors(this.anyErrors,t)),s}catch(s){const r=n.getIndexFromLoc(t),o=r+e.length;return new VCSSStyleSheet(null,{start:t,end:n.getLocFromIndex(o)},r,o,{errors:this.collectErrors([...this.anyErrors,s],t),lang:this.lang})}}addError(e){this.anyErrors.push(e)}collectErrors(e,t){const n=[],s=new Set;for(const r of e){const e=null!=r.line&&null!=r.column?getESLintLineAndColumnFromPostCSSPosition(t,r):t,o=r.reason||r.message,i=`[${e.line}:${e.column}]: ${o}`;if(s.has(i))continue;s.add(i);const l=this.sourceCode.getIndexFromLoc(e);n.push(new VCSSParsingError(null,{start:e,end:e},l,l,{lang:this.lang,message:o}))}return n}get selectorParser(){return this._selectorParser||(this._selectorParser=this.createSelectorParser())}_postcssNodeToASTNode(e,t,n){const{sourceCode:s}=this,r=getESLintLineAndColumnFromPostCSSNode(e,t,"start")||{line:0,column:1},o=s.getIndexFromLoc(r),i=getESLintLineAndColumnFromPostCSSNode(e,t,"end")||s.getLocFromIndex(s.getIndexFromLoc(e)+t.source.input.css.length),l=s.getIndexFromLoc(i),a={start:r,end:i},c=this[typeToConvertMethodName(t.type)](t,a,o,l,n);return null==c?null:(isPostCSSContainer(t)&&isVCSSContainerNode(c)&&(c.nodes=t.nodes.map((t=>this._postcssNodeToASTNode(e,t,c))).filter(isDefined)),c)}parseInternal(e){try{return postcss.parse(e)}catch(t){return this.addError(t),postcssSafeParser(e)}}createSelectorParser(){return new CSSSelectorParser(this.sourceCode,this.commentContainer)}convertRootNode(e,t,n,s){return new VCSSStyleSheet(e,t,n,s,{lang:this.lang})}convertRuleNode(e,t,n,s,r){const o=new VCSSStyleRule(e,t,n,s,{parent:r,rawSelectorText:this.getRaw(e,"selector")?.raw??null});return o.selectors=this.selectorParser.parse(o.rawSelectorText,o.loc.start,o),this.getRaw(e,"between")?.trim()&&this.parseRuleRawsBetween(e,o),o}parseRuleRawsBetween(e,t){const n=this.getRaw(e,"between"),s=this.getRaw(e,"selector")?.raw??e.selector,r=t.range[0]+s.length,o=this.parseInternal(n||"");this._postcssNodeToASTNode(this.sourceCode.getLocFromIndex(r),o)}convertAtruleNode(e,t,n,s,r){const o=new VCSSAtRule(e,t,n,s,{parent:r,rawParamsText:this.getRaw(e,"params")?.raw??null,identifier:this.getRaw(e,"identifier")??"@"});if("nest"===e.name){const t=o.range[0]+o.identifier.length+o.name.length+(this.getRaw(e,"afterName")||"").length;o.selectors=this.selectorParser.parse(o.rawParamsText,this.sourceCode.getLocFromIndex(t),o)}return this.getRaw(e,"afterName")?.trim()&&this.parseAtruleRawsAfterName(e,o),this.getRaw(e,"between")?.trim()&&this.parseAtruleRawsBetween(e,o),o}parseAtruleRawsAfterName(e,t){const n=this.getRaw(e,"afterName"),s=t.range[0]+t.identifier.length+t.name.length,r=this.parseInternal(n||"");this._postcssNodeToASTNode(this.sourceCode.getLocFromIndex(s),r)}parseAtruleRawsBetween(e,t){const n=this.getRaw(e,"between"),s=this.getRaw(e,"params")?.raw??e.params,r=t.range[0]+t.identifier.length+t.name.length+(this.getRaw(e,"afterName")||"").length+s.length,o=this.parseInternal(n||"");this._postcssNodeToASTNode(this.sourceCode.getLocFromIndex(r),o)}convertDeclNode(e,t,n,s,r){let o=e.prop,i=1,l=this.sourceCode.text.slice(n,n+o.length);for(;o!==l;)o=l.slice(0,i)+e.prop,i++,l=this.sourceCode.text.slice(n,n+o.length);return new VCSSDeclarationProperty(e,t,n,s,{parent:r,property:o})}convertCommentNode(e,t,n,s,r){return this.commentContainer.push(new VCSSComment(e,e.text,t,n,s,{parent:r})),null}convertUnknownTypeNode(e,t,n,s,r){return new VCSSUnknown(e,t,n,s,{parent:r,unknownType:e.type})}getRaw(e,t){return e.raws[t]}};function getESLintLineAndColumnFromPostCSSPosition(e,t){let{line:n}=t,s=t.column-1;return 1===n?(n=e.line,s=e.column+s):n=e.line+n-1,{line:n,column:s}}function getESLintLineAndColumnFromPostCSSNode(e,t,n){const s=t.source[n];if(!s)return null;const{line:r,column:o}=getESLintLineAndColumnFromPostCSSPosition(e,s);return"end"===n&&"root"!==t.type?{line:r,column:o+1}:{line:r,column:o}}const convertNodeTypes={root:"convertRootNode",atrule:"convertAtruleNode",rule:"convertRuleNode",decl:"convertDeclNode",comment:"convertCommentNode"};function typeToConvertMethodName(e){return convertNodeTypes[e]||"convertUnknownTypeNode"}const _require=createRequire(import.meta.url);function loadOptionalDep(e){try{return _require(e)}catch(t){const n=t,s="string"==typeof n.message?n.message:"";if("MODULE_NOT_FOUND"!==n.code||!s.includes(e))throw n;return null}}var SourceCodeLocationResolver=class{constructor(e){const t=[0];let n;const s=/\r\n|[\n\r\u2028\u2029]/gu;for(;n=s.exec(e);)t.push(n.index+n[0].length);this.text=e,this.lineStartIndices=t}getLocFromIndex(e){const t=this.text,n=this.lineStartIndices;if(e===t.length)return{line:n.length,column:e-n[n.length-1]};const s=lodash.sortedLastIndex(n,e);return{line:s,column:e-n[s-1]}}getIndexFromLoc(e){return this.lineStartIndices[e.line-1]+e.column}},RemapIndexContext=class{constructor(){this.mappers=[],this.orgIndex=0,this.newIndex=0,this.batchLengthOrg=0,this.batchLengthNew=0}applyEq(e){if(e<=0)return;this.flush();const t=this.newIndex+e,n=this.orgIndex+e;this.addMap([this.orgIndex,n],[this.newIndex,t]),this.newIndex=t,this.orgIndex=n}applyIns(e){this.batchLengthNew+=e}applyDel(e){this.batchLengthOrg+=e}flush(){if(this.batchLengthNew||this.batchLengthOrg){const e=this.newIndex+this.batchLengthNew,t=this.orgIndex+this.batchLengthOrg;this.addMap([this.orgIndex,t],[this.newIndex,e]),this.newIndex=e,this.orgIndex=t,this.batchLengthOrg=0,this.batchLengthNew=0}}addMap(e,t){e[0]===t[0]&&e[1]===t[1]||this.mappers.unshift({org:e,new:t})}hasMapping(){return this.mappers.length>0}remapIndex(e){for(const t of this.mappers){if(t.new[0]<=e&&e<t.new[1]){const n=e-t.new[0];return Math.min(t.org[0]+n,t.org[1]-1)}if(e===t.new[1])return t.org[1]}return e}},Pattern=class{constructor(e,t){if(this.finished=!1,this.lastResult=null,this.name=e,!t.flags.includes("g"))throw new Error("'pattern' should contains 'g' flag.");this.pattern=t}exec(e,t){if(this.finished)return null;const{lastResult:n,pattern:s}=this;if(n&&n.index>=t)return n;s.lastIndex=t;const r=this.lastResult=s.exec(e);return r||(this.finished=!0),r}};function*definePatternsSearchGenerator(e,t){const n=Object.entries(e).map((([e,t])=>new Pattern(e,t)));let s=0;for(;;){let e=null,r="";for(const o of n){const n=o.exec(t,s);n&&(!e||n.index<e.index)&&(e=n,r=o.name)}if(!e)return;s=e.index+e[0].length,yield{name:r,result:e}}}var ReplaceSelectorContext=class{constructor(e,t,n,s,r){this.cssSelector=e,this.remapContext=n,this.replaces=s,this.comments=r,this.cssSourceCode=new SourceCodeLocationResolver(e),this.originalSourceCode=new SourceCodeLocationResolver(t)}hasReplace(){return this.remapContext.hasMapping()||Boolean(this.replaces.length||this.comments.length)}};function replaceSelector(e,t,n=[],s=[]){const r=new RemapIndexContext,o=[],i=[],l=[];let a=0;for(const{name:c,result:u}of definePatternsSearchGenerator({block:/\/\*[\s\S]+?\*\//gu,dstr:/"(?:[^"\\]|\\.)*"/gu,sstr:/'(?:[^'\\]|\\.)*'/gu,...n.reduce(((e,t,n)=>(e[`${n}comment`]=t.regexp,e)),{}),...t.reduce(((e,t,n)=>(e[`${n}text`]=t.regexp,e)),{}),...s.reduce(((e,t,n)=>(e[`${n}trivial`]=t.regexp,e)),{})},e)){const d=e.slice(a,u.index),p=u[0];if("block"===c||"dstr"===c||"sstr"===c){l.push(d),l.push(p),r.applyEq(d.length),r.applyEq(p.length),a=u.index+p.length;continue}let m,f;c.endsWith("comment")?(m=n,f=i):c.endsWith("text")?(m=t,f=o):(m=s,f=[]);const g=parseInt(c,10),h=m[g].replace;let S=randomStr();for(;l.includes(S)||e.includes(S);)S=randomStr();l.push(d);const y=h(u,S,{beforeCss:l});f.push({start:u.index,original:p,random:S,replace:y,restore:m[g].restore}),l.push(y),r.applyEq(d.length),r.applyIns(y.length),r.applyDel(p.length),a=u.index+p.length}const c=e.slice(a);return l.push(c),r.applyEq(c.length),r.flush(),new ReplaceSelectorContext(l.join(""),e,r,o,i)}function restoreReplacedSelector(e,t){let n=e;const{remapContext:s,replaces:r,comments:o,originalSourceCode:i,cssSourceCode:l,cssSelector:a}=t;if(n.source){let e=null,t=null;if(n.source.start){const t=n.source.start,r=l.getIndexFromLoc({line:t.line,column:t.column-1}),o=s.remapIndex(r),a=i.getLocFromIndex(o);a.column++,n.source.start=a,e=r}if(n.source.end){const e=n.source.end,r=l.getIndexFromLoc({line:e.line,column:e.column}),o=s.remapIndex(r);n.source.end=i.getLocFromIndex(o),t=r}const c=null!=e&&null!=t?a.slice(e,t):null;let u;for(;u=restoreReplaceds(n,r,c);)n=u;for(;restoreComments(n,o,c););}if(isPostCSSSPContainer(n))for(let e=0;e<n.nodes.length;e++)n.nodes[e]=restoreReplacedSelector(n.nodes[e],t);return n}function restoreReplaceds(e,t,n){if(!t.length)return null;const s=[];"tag"===e.type||"class"===e.type||"id"===e.type||"combinator"===e.type||"pseudo"===e.type||"string"===e.type?s.push("value"):"attribute"===e.type&&(s.push("attribute"),s.push("value"));for(let r=0;r<t.length;r++){const o=t[r];if(null==n||n.includes(o.random))for(const n of s){if(o.restore){const n=o.restore(e,o.random,o.original);if(n)return t.splice(r,1),n}if(restoreReplaceNodeProp(e,n,o))return t.splice(r,1),e}}return null}function restoreComments(e,t,n){if(!t.length)return!1;const s=[];"comment"===e.type&&s.push("value"),hasRaws(e)&&(s.push("raws.spaces.after"),s.push("raws.spaces.before"));for(let r=0;r<t.length;r++){const o=t[r];if("comment"!==e.type||null==n||n.includes(o.random))for(const n of s)if(restoreReplaceNodeProp(e,n,o))return t.splice(r,1),!0}return!1}function restoreReplaceNodeProp(e,t,n){const s=`${lodash.get(e,t,"")||""}`;if(s.includes(n.replace)){const r=s.replace(n.replace,n.original);return lodash.set(e,t,r),t.startsWith("raws")||lodash.set(e,`raws.${t}`,r),!0}return!1}function hasRaws(e){return null!=e.raws}function randomStr(){return Array.from(Array(16)).map((()=>"abcdefghijklmnopqrstuvwxyz0123456789"[Math.floor(36*Math.random())])).join("")}var SCSSSelectorParser=class extends CSSSelectorParser{parseInternal(e){const t=replaceSelector(e,[{regexp:/#\{[\s\S]+?\}/gu,replace:(e,t)=>`_${t}_`}],[{regexp:/\/\/[^\n\r\u2028\u2029]*/gu,replace:(e,t)=>`/*${t}*/`}]),n=selectorParser().astSync(t.cssSelector);return t.hasReplace()?restoreReplacedSelector(n,t):n}parseCommentsInternal(e){return this.parseInternal(e)}convertCommentNode(e,t,n,s,r){if(e.value.startsWith("//")){const o=e.value.replace(/^\s*\/\//u,"");return this.commentContainer.push(new VCSSInlineComment(e,o,t,n,s,{parent:r})),null}return super.convertCommentNode(e,t,n,s,r)}},SCSSParser=class extends CSSParser{#e;constructor(e,t){super(e,t),this.#e=loadOptionalDep("postcss-scss")}parseInternal(e){if(!this.#e)throw new Error("postcss-scss is required to parse SCSS. Please install it: npm install --save-dev postcss-scss");return this.#e.parse(e)}createSelectorParser(){return new SCSSSelectorParser(this.sourceCode,this.commentContainer)}convertCommentNode(e,t,n,s,r){return e.raws?.inline?(this.commentContainer.push(new VCSSInlineComment(e,e.text,t,n,s,{parent:r})),null):super.convertCommentNode(e,t,n,s,r)}getRaw(e,t){const n=super.getRaw(e,t);if(null!=n){const e=n.scss;if(null!=e)return{raw:e,value:n.value}}return n}};function replaceStylusNesting(e,t){return`[${t}]`}function restoreStylusNesting(e,t,n){if("attribute"!==e.type)return null;if(!e.attribute.includes(t))return null;const s=selectorParser.nesting({...e});return s.value=n,s}var StylusSelectorParser=class extends CSSSelectorParser{parseInternal(e){const t=replaceSelector(e,[{regexp:/\{[\s\S]+?\}/gu,replace:(e,t)=>`_${t}_`},{regexp:/\^\[[\s\S]+?\]/gu,replace:replaceStylusNesting,restore:restoreStylusNesting},{regexp:/~\//gu,replace:replaceStylusNesting,restore:restoreStylusNesting},{regexp:/(?:\.\.\/)+/gu,replace:replaceStylusNesting,restore:restoreStylusNesting},{regexp:/\//gu,replace:replaceStylusNesting,restore:restoreStylusNesting}],[{regexp:/\/\/[^\n\r\u2028\u2029]*/gu,replace:(e,t)=>`/*${t}*/`}],[{regexp:/([\n\r\u2028\u2029])(\s*)/gu,replace(t,n,{beforeCss:s}){const r=[...s];let o=r.pop();for(;null!=o&&(o.startsWith("/*")||!o.trim());)o=r.pop();if(o?.trim().endsWith(","))return t[0];let i,l=e.slice(t.index);for(;(i=l.replace(/^\s*\/\/[^\n\r\u2028\u2029]*\s*/gu,"").replace(/^\s*\/\*[\s\S]+?\*\/\s*/gu,"").trim())&&i!==l;)l=i;return l.startsWith(",")?t[0]:`${t[1]},${t[2]}`}}]),n=selectorParser().astSync(t.cssSelector);return t.hasReplace()?restoreReplacedSelector(n,t):n}parseCommentsInternal(e){return this.parseInternal(e)}convertCommentNode(e,t,n,s,r){if(e.value.startsWith("//")){const o=e.value.replace(/^\s*\/\//u,"");return this.commentContainer.push(new VCSSInlineComment(e,o,t,n,s,{parent:r})),null}return super.convertCommentNode(e,t,n,s,r)}},StylusParser=class extends CSSParser{#t;constructor(e,t){super(e,t),this.#t=loadOptionalDep("postcss-styl")}parseInternal(e){if(!this.#t)throw new Error("postcss-styl is required to parse Stylus. Please install it: npm install --save-dev postcss-styl");return this.#t.parse(e)}createSelectorParser(){return new StylusSelectorParser(this.sourceCode,this.commentContainer)}convertCommentNode(e,t,n,s,r){return e.raws?.inline?(this.commentContainer.push(new VCSSInlineComment(e,e.text,t,n,s,{parent:r})),null):super.convertCommentNode(e,t,n,s,r)}getRaw(e,t){if("between"===t||"before"===t||"after"===t){const n=super.getRaw(e,`stylus${t[0].toUpperCase()}${t.slice(1)}`);if(n)return n}const n=super.getRaw(e,t);if(null!=n){const e=n.stylus;if(null!=e)return{raw:e,value:n.value}}return n}};function isSupportedStyleLang(e){return"css"===e||"scss"===e||"stylus"===e}function escapeRegExp(e){return e.replace(/[$(-+.?[-^{-}]/gu,"\\$&")}const PARSERS={scss:SCSSParser,css:CSSParser,stylus:StylusParser};function parse$1(e,t,n,s){return new(isSupportedStyleLang(s)?PARSERS[s]:CSSParser)(e,s).parse(n,t)}function getInvalidEOFError(e,t){let n=e.sourceCode.ast.templateBody?.errors,s=!1;if(null==n){const t=e.sourceCode;if(!t.parserServices.getDocumentFragment)return null;const r=t.parserServices.getDocumentFragment();if(s=!0,n=r?.errors,null==n)return null}const r=n.find((e=>"string"==typeof e.code&&e.code.startsWith("eof-")&&t.range[0]<=e.index&&e.index<t.range[1]))||n.find((e=>"string"==typeof e.code&&e.code.startsWith("eof-")));return r?{error:r,inDocumentFragment:s}:null}function getStyleElements(e){let t=null;const n=e.sourceCode;if(n.parserServices.getDocumentFragment)t=n.parserServices.getDocumentFragment();else{const{ast:e}=n,s=e.templateBody;s&&(t=s.parent)}return t?t.children.filter(isVElement$1).filter((e=>"style"===e.name)):[]}function isScoped(e){const{startTag:t}=e;return t.attributes.some((e=>"scoped"===e.key.name))}function isCssModule(e){const{startTag:t}=e;return t.attributes.some((e=>"module"===e.key.name))}function getLang(e){const{startTag:t}=e,n=t.attributes.find((e=>"lang"===e.key.name))||null;return"VAttribute"===n?.type&&"VLiteral"===n.value?.type&&n.value.value}function isValidStyleContext(e){return!e.invalid}var StyleContextImpl=class{constructor(e,t){const n=t.sourceCode;this.styleElement=e,this.sourceCode=n;const{startTag:s,endTag:r}=e;this.invalid=null;const o=getInvalidEOFError(t,e);o?this.invalid={message:o.error.message,needReport:o.inDocumentFragment,loc:{line:o.error.lineNumber,column:o.error.column}}:null!=r||s.selfClosing||(this.invalid={message:"Missing end tag",needReport:!0,loc:s.loc.end}),this.scoped=Boolean(e&&isScoped(e)),this.module=Boolean(e&&isCssModule(e)),this.lang=(e&&getLang(e)||"css").toLowerCase(),this.invalid?(this.cssText=null,this.cssNode=null):(this.cssText=r?n.text.slice(s.range[1],r.range[0]):"",this.cssNode=parse$1(n,s.loc.end,this.cssText,this.lang))}traverseNodes(e){this.cssNode&&traverseNodes$2(this.cssNode,e)}traverseSelectorNodes(e){this.traverseNodes({enterNode(t){if(hasSelectorNodes(t))for(const n of t.selectors)traverseSelectorNodes(n,e)}})}};function traverseNodes$2(e,t){if(t.break=!1,t.enterNode(e),!t.exit&&!t.break){if(isVCSSContainerNode(e))for(const n of e.nodes){if(traverseNodes$2(n,t),t.break)break;if(t.exit)return}t.leaveNode?.(e)}}function traverseSelectorNodes(e,t){if(t.break=!1,t.enterNode(e),!t.exit&&!t.break){if("VCSSSelector"===e.type||"VCSSSelectorPseudo"===e.type)for(const n of e.nodes){if(traverseSelectorNodes(n,t),t.break)break;if(t.exit)return}t.leaveNode?.(e)}}function createStyleContexts(e){return getStyleElements(e).map((t=>new StyleContextImpl(t,e)))}function isVElement$1(e){return"VElement"===e?.type}const COMMENT_DIRECTIVE_B=/^\s*(eslint-(?:en|dis)able)(?:\s+(\S|\S[\s\S]*\S))?\s*$/u,COMMENT_DIRECTIVE_L=/^\s*(eslint-disable(?:-next)?-line)(?:\s+(\S|\S[\s\S]*\S))?\s*$/u;function stripDirectiveComment(e){return e.split(/\s-{2,}\s/u)[0]}function parse(e,t){const n=e.exec(stripDirectiveComment(t));return null==n?null:{type:n[1],rules:(n[2]||"").split(",").map((e=>e.trim())).filter(Boolean)}}function enable(e,t,n){0===n.length?e.enableAll(t):e.enableRules(t,n)}function disable(e,t,n){0===n.length?e.disableAll(t):e.disableRules(t,n)}function processBlock(e,t){const n=parse(COMMENT_DIRECTIVE_B,t.text);null!=n&&("eslint-disable"===n.type?disable(e,t.loc.start,n.rules):enable(e,t.loc.start,n.rules))}function processLine(e,t){const n=parse(COMMENT_DIRECTIVE_L,t.text);if(null!=n&&t.loc.start.line===t.loc.end.line){const s=t.loc.start.line+("eslint-disable-line"===n.type?0:1),r=-1;n.rules.length?e.disableLineRules({line:s,column:r},n.rules):e.disableLineAll({line:s,column:r})}}var CommentDirectives=class{constructor(e){this._disableLines={},this._disableBlocks={};for(const t of e){const e=t.cssNode;if(null!=e){for(const t of e.comments)processBlock(this,t),processLine(this,t);this.clear(e.loc.end)}}for(const e of Object.keys(this._disableBlocks))this._disableBlocks[e].sort(((e,t)=>compareLoc(e.loc,t.loc)))}disableLineAll(e){(this._disableLines[e.line]||(this._disableLines[e.line]={all:!0})).all=!0}disableLineRules(e,t){const n=this._disableLines[e.line]||(this._disableLines[e.line]={all:!1});for(const e of t)n[e]=!0}disableAll(e){(this._disableBlocks.all||(this._disableBlocks.all=[])).push({loc:e,disable:!0})}disableRules(e,t){for(const n of t)(this._disableBlocks[n]||(this._disableBlocks[n]=[])).push({loc:e,disable:!0})}enableAll(e){(this._disableBlocks.all||(this._disableBlocks.all=[])).push({loc:e,disable:!1})}enableRules(e,t){for(const n of t)(this._disableBlocks[n]||(this._disableBlocks[n]=[])).push({loc:e,disable:!1})}clear(e){for(const t of Object.keys(this._disableBlocks))this._disableBlocks[t].push({loc:e,disable:!1})}isEnabled(e,t){const n=hasSourceLocation(t)?t.loc:t.node?.loc;if(!n)return!1;const s=n.start||n,r=this._disableLines[s.line];if(r&&(r.all||r[e]))return!1;for(const t of[e,"all"]){const e=this._disableBlocks[t];if(e){let t=!1;for(const n of e){if(compareLoc(s,n.loc)<0)break;t=n.disable}if(t)return!1}}return!0}},CommentDirectivesReporter=class{constructor(e,t){this.context=e,this.commentDirectives=t}report(e){this.commentDirectives.isEnabled(this.context.id,e)&&this.context.report(e)}};function createCommentDirectives(e){return new CommentDirectives(e)}function createCommentDirectivesReporter(e,t){return new CommentDirectivesReporter(e,t)}function compare(e,t){return e===t?0:e>t?1:-1}function compareLoc(e,t){const n=compare(e.line,t.line);return 0!==n?n:compare(e.column,t.column)}function hasSourceLocation(e){return null!=e.loc}function unwrapTypesExpression(e){return"TSAsExpression"===e?.type?e.expression:e}function getStringFromNode(e,t){const n=eslintUtils.getStaticValue(e,getScope(t.sourceCode.scopeManager,e));return n&&"string"==typeof n.value?n.value:null}function getScope(e,t){const n="Program"!==t.type;for(let s=t;s;s=s.parent){const t=e.acquire(s,n);if(t)return"function-expression-name"===t.type?t.childScopes[0]:t}return e.scopes[0]}const traverseNodes$1=AST.traverseNodes;function getVueComponentObject(e){if("ExportDefaultDeclaration"!==e.type)return null;const t=unwrapTypesExpression(e.declaration);if("ObjectExpression"===t.type)return t;if("CallExpression"===t.type&&t.arguments.length>=1){const e=t.callee;if("MemberExpression"===e.type){const n=unwrapTypesExpression(e.object);if("Identifier"===n.type&&"Vue"===n.name&&"Identifier"===e.property.type&&"extend"===e.property.name){const e=unwrapTypesExpression(t.arguments[0]);if("ObjectExpression"===e.type)return e}}if("Identifier"===e.type&&"defineComponent"===e.name){const e=unwrapTypesExpression(t.arguments[0]);if("ObjectExpression"===e.type)return e}}return null}const vueComponentCache=new WeakMap;function findVueComponent(e){const t=vueComponentCache.get(e);if(void 0!==t&&t.cachedAt>Date.now()-1e3)return t.component;const n=e.sourceCode,s=n.getAllComments().filter((e=>e.value.includes("@vue/component"))),r=[];function o(e){return!!r.some((t=>t.loc.start.line===e.loc.start.line))||(r.push(e),!1)}let i=null,l=!1;return traverseNodes$1(n.ast,{visitorKeys:n.visitorKeys,enterNode(e){if(!l)if("ObjectExpression"===e.type){if(!s.some((t=>t.loc.end.line===e.loc.start.line-1))||o(e))return;i=e}else if("ExportDefaultDeclaration"===e.type){const t=getVueComponentObject(e);if(!t||o(t))return;i=t,l=Boolean(e)}},leaveNode(){}}),vueComponentCache.set(e,{component:i,cachedAt:Date.now()}),i}const traverseNodes=AST.traverseNodes,UNKNOWN=Symbol("unknown");var VueComponentContext=class{constructor(e,t){this.properties=null,this.node=e,this.context=t}findVueComponentProperty(e){const t=this.properties||(this.properties=extractVueComponentProperties(this.node,this.context));return t[UNKNOWN]||t.data===UNKNOWN||t.data[UNKNOWN]||t.computed===UNKNOWN||t.computed[UNKNOWN]?null:t.data[e]?t.data[e]:t.computed[e]?t.computed[e]:null}getClassesOperatedByClassList(e,t){return getClassesOperatedByClassList(this.node,e,t,this.context)}};function createVueComponentContext(e){const t=findVueComponent(e);return t?new VueComponentContext(t,e):null}function extractVueComponentProperties(e,t){const n={data:{},computed:{}};for(const s of e.properties){if("Property"!==s.type){n[UNKNOWN]=!0;continue}const e=getPropertyOrIdentifierName(s);"data"===e?n.data=extractVueComponentData(s.value,t):"computed"===e&&(n.computed=extractVueComponentComputed(s.value,t))}return n}function extractVueComponentData(e,t){const n=[];if("ArrowFunctionExpression"===e.type&&"BlockStatement"===e.body.type||"FunctionExpression"===e.type)if("BlockStatement"===e.body.type)for(const s of getReturnStatements(e.body,t))s.argument&&n.push(s.argument);else n.push(e.body);else if("ArrowFunctionExpression"===e.type&&"BlockStatement"!==e.body.type)n.push(e.body);else{if("ObjectExpression"!==e.type)return UNKNOWN;n.push(e)}const s={};for(const e of n)if("ObjectExpression"===e.type)for(const t of e.properties)if("Property"===t.type){const e=getPropertyOrIdentifierName(t);null==e?s[UNKNOWN]=!0:(s[e]||(s[e]=[])).push(t.value)}else s[UNKNOWN]=!0;else s[UNKNOWN]=!0;return s}function extractVueComponentComputed(e,t){if("ObjectExpression"!==e.type)return UNKNOWN;const n={};for(const s of e.properties){if("Property"!==s.type){n[UNKNOWN]=!0;continue}const e=getPropertyOrIdentifierName(s);if(!e){n[UNKNOWN]=!0;continue}const r=n[e]||(n[e]=[]),o=s.value;let i=o;if("ObjectExpression"===o.type){const e=o.properties.filter(isProperty).find((e=>"get"===getPropertyOrIdentifierName(e)));e&&(i=e.value)}if("ArrowFunctionExpression"===i.type&&"BlockStatement"===i.body.type||"FunctionExpression"===i.type)if("BlockStatement"===i.body.type){const e=getReturnStatements(i.body,t).map((e=>e.argument)).filter(isDefined);r.push(...e)}else r.push(i.body);else"ArrowFunctionExpression"===i.type&&"BlockStatement"!==i.body.type?r.push(i.body):n[UNKNOWN]=!0}return n}function getClassesOperatedByClassList(e,t,n,s){const r=[];return traverseNodes(e,{visitorKeys:s.sourceCode.visitorKeys,enterNode(e){if("CallExpression"!==e.type||"MemberExpression"!==e.callee.type)return;const s=e.callee.object;if("classList"!==getPropertyOrIdentifierName(s))return;if("MemberExpression"===s.type&&"$el"===getPropertyOrIdentifierName(s.object)&&!n)return;if(null!=t){const e="MemberExpression"===s.type&&"Super"!==s.object.type?get$RefName(s.object):null;if(null!=e&&!t.some((t=>t.matchString(e))))return}const o=getClassesArguments(e);r.push(...o)},leaveNode(){}}),r}function getReturnStatements(e,t){const n=[],s=[];return traverseNodes(e,{visitorKeys:t.sourceCode.visitorKeys,enterNode(e){s.length||("ArrowFunctionExpression"===e.type||"FunctionExpression"===e.type||"FunctionDeclaration"===e.type?s.unshift(e):"ReturnStatement"===e.type&&n.push(e))},leaveNode(e){s[0]===e&&s.shift()}}),n}function getPropertyOrIdentifierName(e){if("Identifier"===e.type)return e.name;if("MemberExpression"===e.type){if("Identifier"===e.property.type&&!e.computed)return e.property.name;if("Literal"===e.property.type&&e.computed)return getLiteralString(e.property)}else if("Property"===e.type){if("Identifier"===e.key.type&&!e.computed)return e.key.name;if("Literal"===e.key.type)return getLiteralString(e.key)}return null}function get$RefName(e){if("MemberExpression"!==e.type)return null;const{object:t}=e;return"$refs"!==getPropertyOrIdentifierName(t)?null:getPropertyOrIdentifierName(e)}function getClassesArguments(e){const t=getPropertyOrIdentifierName(e.callee);return"add"===t||"remove"===t?e.arguments:"toggle"===t||"contains"===t?[e.arguments[0]]:"replace"===t?[e.arguments[0],e.arguments[1]]:[]}function getLiteralString(e){return"string"==typeof e.value?e.value:`${e.value}`}function isProperty(e){return"Property"===e.type}const CACHE=new WeakMap;function getCache(e){const{ast:t}=e.sourceCode;if(CACHE.has(t))return CACHE.get(t);const n={};return CACHE.set(t,n),n}function getStyleContexts(e){const t=getCache(e);return t.styles?t.styles:t.styles=createStyleContexts(e)}function getCommentDirectivesReporter(e){return createCommentDirectivesReporter(e,getCommentDirectives(e))}function getVueComponentContext(e){const t=getCache(e);return t.vueComponent?t.vueComponent:t.vueComponent=createVueComponentContext(e)}function getCommentDirectives(e){const t=getCache(e);return t.comment?t.comment:t.comment=createCommentDirectives(getStyleContexts(e))}const styleTypesAttrs=["scoped","module"];var enforce_style_type_default={meta:{docs:{description:"enforce the `<style>` tags to be plain or have the `scoped` or `module` attribute",categories:["vue2-recommended","vue3-recommended"],default:"warn",url:"https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/enforce-style-type.html",suggestion:!0},fixable:null,messages:{add:"Add attribute `{{ attribute }}`.",remove:"Remove attribute `{{ attribute }}`.",removeMultiple:"Remove attributes {{ attributes }}.",change:"Change `{{ fromAttribute }}` to `{{ toAttribute }}` attribute.",forbiddenStyle:"`{{ attribute }}` attribute is forbidden.",forbiddenPlain:"Missing attribute {{ attributes }}.",forbiddenScopedModule:"Cannot use both `scoped` and `module` attributes."},schema:[{type:"object",properties:{allows:{type:"array",minItems:1,uniqueItems:!0,items:{type:"string",enum:["plain","scoped","module"]}}},additionalProperties:!1}],type:"suggestion",hasSuggestions:!0},create(e){const t=getStyleContexts(e).filter(isValidStyleContext);if(!t.length)return{};const n=getCommentDirectivesReporter(e),s=e.sourceCode.parserServices.getTemplateBodyTokenStore?.(),{options:r}=e,o=r[0]?.allows??["scoped"],i=1===o.length&&o[0];function l(e,t){const{attributes:n}=t.parent,r=s.getTokenBefore(t),o=s.getTokenAfter(t);return[e.removeRange([r.range[1],1===n.length?o.range[0]:t.range[1]])]}function a(e,t){const s=e.startTag.attributes.find((e=>e.key.name===t)),r=s.key.name;n.report({node:s,messageId:"forbiddenStyle",data:{attribute:t},suggest:[i&&"plain"!==i?{messageId:"change",data:{fromAttribute:r,toAttribute:i},fix:e=>e.replaceText(s,i)}:{messageId:"remove",data:{attribute:r},fix:e=>l(e,s)}]})}function c(e){n.report({node:e.startTag,messageId:"forbiddenPlain",data:{attributes:o.map((e=>`\`${e}\``)).join(" or ")},suggest:i?[{messageId:"add",data:{attribute:i},fix(t){const n=s.getLastToken(e.startTag);return n&&t.insertTextBefore(n,` ${i}`)}}]:void 0})}function u(e){const t=e.startTag.attributes.filter((e=>styleTypesAttrs.includes(e.key.name)&&!o.includes(e.key.name)));n.report({node:e.startTag,messageId:"forbiddenScopedModule",suggest:t.length?[1===t.length?{messageId:"remove",data:{attribute:t[0].key.name.toString()},fix:e=>l(e,t[0])}:{messageId:"removeMultiple",data:{attributes:t.map((e=>`\`${e.key.name}\``)).join(", ")},fix:e=>lodash.flatMap(t,(t=>l(e,t)))}]:void 0})}return{"Program:exit"(){for(const e of t)e.scoped&&e.module?u(e.styleElement):e.scoped?o.includes("scoped")||a(e.styleElement,"scoped"):e.module?o.includes("module")||a(e.styleElement,"module"):o.includes("plain")||c(e.styleElement)}}}},no_deprecated_deep_combinator_default={meta:{docs:{description:"disallow using deprecated deep combinators",categories:["vue3-recommended"],default:"warn",url:"https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/no-deprecated-deep-combinator.html"},fixable:"code",messages:{deprecated:"The deep combinator `{{value}}` is deprecated."},schema:[],type:"suggestion"},create(e){const t=getStyleContexts(e).filter(isValidStyleContext).filter((e=>e.scoped));if(!t.length)return{};const n=getCommentDirectivesReporter(e);function s(t){t.traverseSelectorNodes({enterNode(t){isDeepCombinator(t)&&function(t){n.report({node:t,loc:t.loc,messageId:"deprecated",data:{value:t.value.trim()},fix(n){const s=e.sourceCode.text,r=[...t.range];let o="::v-deep";return s[r[0]-1]?.trim()&&(o=` ${o}`),s[r[1]]?.trim()&&(o=`${o} `),n.replaceTextRange(r,o)}})}(t)}})}return{"Program:exit"(){for(const e of t)s(e)}}}};function getElements(e,t){const n=e.sourceCode.ast.templateBody;return n?[...function*e(n){t(n)&&(yield n);for(const t of n.children)isVElement(t)&&(yield*e(t))}(n)]:[]}function isVElement(e){return"VElement"===e?.type}function isTransitionElement(e){return"VElement"===e.type&&("transition"===e.name||"Transition"===e.rawName)}function isTransitionGroupElement(e){return"VElement"===e.type&&("transition-group"===e.name||"TransitionGroup"===e.rawName)}function findAttribute(e,t){return"VElement"===e.type?findAttribute(e.startTag,t):e.attributes.find((e=>isVDirective(e)?!!isVBind(e.key)&&getArgument(e.key)===t:e.key.name===t))||null}function isVDirective(e){return"VAttribute"===e.type&&e.directive}function isVBind(e){return isVDirectiveKeyV6(e)?"bind"===e.name.name:"bind"===e.name}function getArgument(e){if(isVDirectiveKeyV6(e)){const t=e.argument;return null==t||"VExpressionContainer"===t.type?null:"VIdentifier"===t.type?t.name:null}const t=e.argument;return null==t||/^\[.*\]$/u.test(t)?null:t||""}function isVDirectiveKeyV6(e){return"string"!=typeof e.name}function getReferenceExpressions(e,t){if("ConditionalExpression"===e.type){const{consequent:n,alternate:s}=e;return[...getReferenceExpressions(n,t)??[n],...getReferenceExpressions(s,t)??[s]]}if("LogicalExpression"===e.type){const{left:n,right:s}=e;return[...getReferenceExpressions(n,t)??[n],...getReferenceExpressions(s,t)??[s]]}if("Identifier"!==e.type)return[e];if(!withinTemplate(e,t))return[e];const n=getVueComponentContext(t);if(!n)return null;const s=n.findVueComponentProperty(e.name);return null==s?null:s}function withinTemplate(e,t){const n=t.sourceCode.ast.templateBody?.range??[0,0];return n[0]<=e.range[0]&&e.range[1]<=n[1]}function getAttributeValueNodes(e,t,n){const s=[],r=t.toLowerCase(),{startTag:o}=e;for(const e of o.attributes)if(isVDirective(e)){const{key:t,value:o}=e;if(null==o)continue;if(!isVBind(t))continue;const i=getArgument(t);if(null==i)return null;if(i!==r)continue;const{expression:l}=o;if(null==l)continue;if("VGenericExpression"===l.type)continue;const a=getReferenceExpressions(l,n);if(!a)return null;for(const e of a)s.push(e)}else{const{key:t,value:n}=e;if(null==n)continue;t.name===r&&s.push(n)}return s}var Interpolation=class{constructor(e){this.text=e}};function css_default$2(e){return[e.value]}function processText$1(e){const t=[],n=e;let s=0;const r=/#\{[\s\S]*?\}/gu;let o=null;for(;o=r.exec(n);)t.push(n.slice(s,o.index)),t.push(new Interpolation(n.slice(o.index,r.lastIndex))),s=r.lastIndex;return t.push(n.slice(s)),t}function processValue$1(e){const t=[],n=e;let s=0;const r=/#\{[\s\S]*?\}|\$[\w-]+/gu;let o=null;for(;o=r.exec(n);)t.push(n.slice(s,o.index)),t.push(new Interpolation(n.slice(o.index,r.lastIndex))),s=r.lastIndex;return t.push(n.slice(s)),t}function scss_default$2(e){return processText$1(e.value)}function processText(e){const t=[],n=e;let s=0;const r=/\{[\s\S]*?\}/gu;let o=null;for(;o=r.exec(n);)t.push(n.slice(s,o.index)),t.push(new Interpolation(n.slice(o.index,r.lastIndex))),s=r.lastIndex;return t.push(n.slice(s)),t}function processValue(e){return e.includes("+")||e.includes("$")?[new Interpolation(e)]:[e]}function stylus_default$2(e){return processText(e.value)}const BUILDERS$2={css:css_default$2,scss:scss_default$2,stylus:stylus_default$2};function getSelectorTemplateElements(e){return(isSupportedStyleLang(e.lang)?BUILDERS$2[e.lang]:css_default$2)(e)}function css_default$1(e){return[e]}function scss_default$1(e){return processText$1(e)}function stylus_default$1(e){return processText(e)}const BUILDERS$1={css:css_default$1,scss:scss_default$1,stylus:stylus_default$1};function getAtRuleParamsTemplateElements(e,t){return(isSupportedStyleLang(t)?BUILDERS$1[t]:css_default$1)(e.trim())}function css_default(e){return[e]}function scss_default(e){return processValue$1(e)}function stylus_default(e){return processValue(e)}const BUILDERS={css:css_default,scss:scss_default,stylus:stylus_default};function getDeclValueTemplateElements(e,t){return(isSupportedStyleLang(t)?BUILDERS[t]:css_default)(e.trim())}var Template=class e{static{this.interpolationTemplate=new e([new Interpolation("?")])}constructor(e){if(this.string=null,this._text=null,this._regexp=null,this.elements=e.filter(isDefined).filter((e=>""!==e)).reduce(((e,t)=>{if(e.length){const n=e.length-1,s=e[n];if("string"==typeof t&&"string"==typeof s)return e[n]=s+t,e;if("string"!=typeof t&&"string"!=typeof s)return e[n]=new Interpolation(s.text+t.text),e}return e.push(t),e}),[]),1===this.elements.length){const e=this.elements[0];"string"==typeof e&&(this.string=e)}else 0===this.elements.length&&(this.string="")}static of(t){return new e([t])}static ofSelector(t){return new e(getSelectorTemplateElements(t))}static ofParams(t){return new e(getAtRuleParamsTemplateElements(t.paramsText.trim(),t.lang))}static ofDeclValue(t,n){return new e("string"==typeof t?getDeclValueTemplateElements(t,n||""):getDeclValueTemplateElements(t.value,t.lang))}static ofNode(t){if("VLiteral"===t.type)return e.of(t.value);if("Literal"===t.type)return e.of(`${t.value}`);if("TemplateLiteral"===t.type){const n=[];for(const e of t.quasis)n.push(e.value.cooked||e.value.raw),n.push(new Interpolation("${}"));return n.pop(),new e(n)}if("BinaryExpression"===t.type&&"+"===t.operator){const n=e.ofNode(t.left),s=e.ofNode(t.right);if(n&&s)return n.concat(s);if(n)return n.concat(e.interpolationTemplate);if(s)return e.interpolationTemplate.concat(s)}return null}match(e){return null!=this.string&&null!=e.string?this.string===e.string:!!this.regexp.test(e.text)||!!e.regexp.test(this.text)}matchString(e){return null!=this.string?this.string===e:!!this.regexp.test(e)}endsWith(e){if(null!=this.string)return this.string.endsWith(e);const t=this.elements[this.elements.length-1];return"string"==typeof t&&t.endsWith(e),!0}concat(t){return new e("string"==typeof t?[...this.elements,t]:[...this.elements,...t.elements])}hasString(e){return this.elements.some((t=>"string"==typeof t&&t.includes(e)))}divide(t){const n=[];let s=[];for(const r of this.elements)if("string"==typeof r)if(r.search(t)>=0){const o=r.split(t);for(s.push(o.shift()),n.push(new e(s));o.length>1;)n.push(new e([o.shift()]));s=[o.shift()]}else s.push(r);else s.push(r);return s.length&&n.push(new e(s)),n}toLowerCase(){return new e(this.elements.map((e=>"string"==typeof e?e.toLowerCase():e)))}get text(){return this._text||(this._text=this.buildText())}get regexp(){return this._regexp||(this._regexp=this.buildRegexp())}buildRegexp(){let e="^";for(const t of this.elements)e+="string"==typeof t?escapeRegExp(t):"[\\s\\S]*";return e+="$",new RegExp(e,"u")}buildText(){let e="";for(const t of this.elements)e+="string"==typeof t?t:"";return e}},no_deprecated_v_enter_v_leave_class_default={meta:{docs:{description:"disallow v-enter and v-leave classes.",categories:[],default:"warn",url:"https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/no-deprecated-v-enter-v-leave-class.html"},fixable:null,messages:{deprecatedClass:"The `v-{{kind}}` class is renamed in Vue 3.",deprecatedProps:"The `{{kind}}-class` prop is renamed in Vue 3. Rename to `{{kind}}-from-class`."},schema:[],type:"suggestion"},create(e){const t=getStyleContexts(e).filter(isValidStyleContext).filter((e=>e.scoped)),n=getCommentDirectivesReporter(e),s=new Map,r=new Map;function o(e,t,s){n.report({node:e,loc:e.loc,messageId:t,data:{kind:s}})}function i(e,t){s.set(e.string||e,{className:e,kind:t})}function l(e){r.set(e.string||e,{className:e})}function a(e){const t=new Map,n=new Set;let i=!1;!function e(o){for(const l of o){if(isDeepCombinator(l)||isVueSpecialPseudo(l)){i=!0;break}if("VCSSClassSelector"===l.type){for(const{className:e,kind:n}of s.values())if(e.matchString(l.value)){t.set(l,n);break}for(const{className:e}of r.values())if(e.matchString(l.value)){n.add(l.value);break}}else"VCSSSelectorPseudo"!==l.type&&"VCSSSelector"!==l.type||e(l.nodes)}return!i}(e);for(const[e,s]of t)n.has(`${e.value}-from`)||o(e,"deprecatedClass",s);return!i}function c(e){if(!function(e){return isVCSSAtRule(e)&&"keyframes"===e.name&&"@"===e.identifier}(e))if("VCSSStyleRule"===e.type){if(!a(e.selectors))return;for(const t of e.nodes)c(t)}else if("VCSSAtRule"===e.type){if(e.selectors&&!a(e.selectors))return;for(const t of e.nodes)c(t)}}function u(e){const t=findAttribute(e,"enter-class"),n=findAttribute(e,"enter-from-class");t&&!n&&o(t.key,"deprecatedProps","enter");const s=findAttribute(e,"leave-class"),r=findAttribute(e,"leave-from-class");return s&&!r&&o(s.key,"deprecatedProps","leave"),{hasEnterClass:t||n,hasLeaveClass:s||r}}return{"Program:exit"(){for(const t of getElements(e,(e=>isTransitionElement(e)||isTransitionGroupElement(e)))){const{hasEnterClass:n,hasLeaveClass:s}=u(t);if(n&&s)continue;const r=getAttributeValueNodes(t,"name",e);if(!r)return;if(r.length)for(const e of r){const t=Template.ofNode(e);if(null==t)return;n||(i(t.concat("-enter"),"enter"),l(t.concat("-enter-from"))),s||(i(t.concat("-leave"),"leave"),l(t.concat("-leave-from")))}else n||(i(Template.of("v-enter"),"enter"),l(Template.of("v-enter-from"))),s||(i(Template.of("v-leave"),"leave"),l(Template.of("v-leave-from")))}for(const e of t)for(const t of e.cssNode.nodes)c(t)}}}},no_parent_of_v_global_default={meta:{docs:{description:"disallow parent selector for `::v-global` pseudo-element",categories:["vue3-recommended"],default:"warn",url:"https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/no-parent-of-v-global.html"},fixable:null,messages:{unexpected:"The parent selector of the `::v-global()` pseudo-element is useless."},schema:[],type:"suggestion"},create(e){const t=getStyleContexts(e).filter(isValidStyleContext).filter((e=>e.scoped));if(!t.length)return{};const n=getCommentDirectivesReporter(e);function s(e){e.traverseSelectorNodes({enterNode(e){isVGlobalPseudo(e)&&e.parent.nodes.indexOf(e)>0&&function(e){n.report({node:e,loc:e.loc,messageId:"unexpected"})}(e)}})}return{"Program:exit"(){for(const e of t)s(e)}}}},no_parsing_error_default={meta:{docs:{description:"disallow parsing errors in `<style>`",categories:["vue2-recommended","vue3-recommended"],default:"warn",url:"https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/no-parsing-error.html"},fixable:null,messages:{parsingError:"Parsing error: {{message}}."},schema:[],type:"problem"},create(e){const t=getStyleContexts(e);if(!t.length)return{};const n=getCommentDirectivesReporter(e);function s(e){n.report({node:e,loc:e.loc.start,messageId:"parsingError",data:{message:e.message.endsWith(".")?e.message.slice(0,-1):e.message}})}function r(e){n.report({node:e.styleElement,loc:e.invalid.loc,messageId:"parsingError",data:{message:e.invalid.message}})}return{"Program:exit"(){for(const e of t)if(null!=e.invalid)e.invalid.needReport&&r(e);else for(const t of e.cssNode?.errors||[])s(t)}}}},no_unused_keyframes_default={meta:{docs:{description:"disallow `@keyframes` which don't use in Scoped CSS",categories:["vue2-recommended","vue3-recommended"],default:"warn",url:"https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/no-unused-keyframes.html"},fixable:null,messages:{unused:"The @keyframes `{{params}}` is unused."},schema:[{type:"object",properties:{checkUnscoped:{type:"boolean"}},additionalProperties:!1}],type:"suggestion"},create(e){const t=Boolean(e.options[0]?.checkUnscoped),n=getStyleContexts(e).filter(isValidStyleContext).filter((e=>e.scoped||t));if(!n.length)return{};const s=getCommentDirectivesReporter(e),r=e.sourceCode;function o(e){const t=e.range[0]+e.identifier.length+e.name.length+(e.node.raws.afterName||"").length,n=t+e.rawParamsText.length;s.report({node:e,loc:{start:r.getLocFromIndex(t),end:r.getLocFromIndex(n)},messageId:"unused",data:{params:e.paramsText}})}function i(e){const{keyframes:t,animationNames:n,animations:s}=function(e){const t=[],n=[],s=[];return e.traverseNodes({enterNode(e){"VCSSAtRule"===e.type?/-?keyframes$/u.test(e.name)&&"@"===e.identifier&&t.push({params:Template.ofParams(e),node:e}):"VCSSDeclarationProperty"===e.type&&(/^(?:-\w+-)?animation-name$/u.test(e.property)&&n.push(e),/^(?:-\w+-)?animation$/u.test(e.property)&&s.push(e))}}),{keyframes:t,animationNames:n,animations:s}}(e);for(const e of n)for(const n of e.value.split(",").map((e=>e.trim()))){const s=Template.ofDeclValue(n,e.lang);for(let e=t.length-1;e>=0;e--){const{params:n}=t[e];s.match(n)&&t.splice(e,1)}}for(const e of s)for(const n of e.value.split(",").map((e=>e.trim()))){const s=n.trim().split(/\s+/u);for(const n of s){const s=Template.ofDeclValue(n,e.lang);for(let e=t.length-1;e>=0;e--){const{params:n}=t[e];s.match(n)&&t.splice(e,1)}}}for(const{node:e}of t)o(e)}return{"Program:exit"(){for(const e of n)i(e)}}}},ResolvedSelectors=class{constructor(e,t){this.selectors=[],this.children=[],this.container=e,this.parent=t,this.level=(t?.level??-1)+1}},ResolvedSelector=class{constructor(e,t){this.owner=e,this.selector=t}},CSSSelectorResolver=class{resolveSelectors(e){return this.resolveNodesSelectors(e.nodes,null)}resolveNodesSelectors(e,t){const n=[];for(const s of e)this.isIgnoreNode(s)||(hasSelectorNodes(s)?n.push(this.resolveNodeSelectors(s,t)):isVCSSContainerNode(s)&&n.push(...this.resolveNodesSelectors(s.nodes,t)));return n}resolveNodeSelectors(e,t){const n=e.selectors.filter(hasNodesSelector),s=new ResolvedSelectors(e,t);if(t)for(const r of n.filter(hasNodesSelector))s.selectors.push(...this.resolveNestingSelectors(s,r.nodes,t,e));else s.selectors.push(...n.map((e=>new ResolvedSelector(s,e.nodes))));return isVCSSContainerNode(e)&&s.children.push(...this.resolveNodesSelectors(e.nodes,s)),s}isIgnoreNode(e){return isVCSSAtRule(e)&&"keyframes"===e.name&&"@"===e.identifier}resolveNestingSelectors(e,t,n,s){return isNestingAtRule(s)?this.resolveSelectorForNestContaining(e,t,findNestingSelector(t),n,s):0===t.findIndex(isNestingSelector)?this.resolveSelectorForNestPrefixed(e,t,n,s):[new ResolvedSelector(e,t)]}resolveSelectorForNestPrefixed(e,t,n,s){if(!t.length||!isNestingSelector(t[0]))return[new ResolvedSelector(e,t)];const r=t.slice(1);return this.resolveSelectorForNestConcat(e,r,n,s)}resolveSelectorForNestConcat(e,t,n,s){if(!n){const n=[...t];return isDescendantCombinator(n[0])&&n.shift(),isDescendantCombinator(n[n.length-1])&&n.pop(),[new ResolvedSelector(e,[...n])]}return n.selectors.map((n=>{const s=[...t],r=[...n.selector];return r.length>0&&isSelectorCombinator(r[r.length-1])&&s.length>0&&isSelectorCombinator(s[0])&&(isDescendantCombinator(s[0])?s.shift():isDescendantCombinator(r[r.length-1])&&r.pop()),new ResolvedSelector(e,[...r,...s])}))}resolveSelectorForNestContaining(e,t,n,s,r){if(!n)return[new ResolvedSelector(e,t)];const{nestingIndex:o,nodes:i,node:l}=n,a=i.slice(0,o),c=i.slice(o+1),u=a.length>0?a[a.length-1]:null,d=c.length>0?c[0]:null,p=u&&u.range[1]===l.range[0]&&!isSelectorCombinator(u),m=d&&l.range[1]===d.range[0]&&isTypeSelector(d);let f;if(s)f=s.selectors.map((t=>{const n=[...a],s=[...c],r=[...t.selector],o=p&&isTypeSelector(r[0]),i=m&&!isSelectorCombinator(r[r.length-1]);return o&&i&&1===r.length?n.push(newNestingConcatBothSelectorNodes(n.pop(),r.shift(),s.shift(),l)):(o&&n.push(newNestingConcatLeftSelectorNodes(n.pop(),r.shift(),l)),i&&s.unshift(newNestingConcatRightSelectorNodes(r.pop(),s.shift(),l))),new ResolvedSelector(e,[...n,...r,...s])}));else{const t=[...a],n=[...c];for(;isDescendantCombinator(t[0]);)t.shift();if(isDescendantCombinator(n[0]))for(;isDescendantCombinator(t[t.length-1]);)t.pop();for(;0===t.length&&isDescendantCombinator(n[0]);)n.shift();for(;isDescendantCombinator(n[n.length-1]);)n.pop();f=[new ResolvedSelector(e,[...t,...n])]}let g=l;for(;!t.includes(g);){const t=g.parent,n=t.parent.nodes.indexOf(t),s=t.parent.nodes.slice(0,n),r=t.parent.nodes.slice(n+1);f=f.map((n=>{const o=t.copy();return o.nodes=n.selector,new ResolvedSelector(e,[...s,o,...r])})),g=t}return f}};function newNestingConcatBothSelectorNodes(e,t,n,s){const r={start:e.loc.start,end:n.loc.end};return e.copy({loc:r,start:e.range[0],end:n.range[1],parent:e.parent,value:`${e.value}${t.selector}${n.selector}`})}function newNestingConcatLeftSelectorNodes(e,t,n){const s={start:e.loc.start,end:n.loc.end};return e.copy({loc:s,start:e.range[0],end:n.range[1],parent:e.parent,value:`${e.value}${t.selector}`})}function newNestingConcatRightSelectorNodes(e,t,n){const s={start:n.loc.start,end:t.loc.end};return e.copy({node:t.node,loc:s,start:n.range[0],end:t.range[1],parent:t.parent,value:`${e.value}${t.selector}`})}var SCSSSelectorResolver=class extends CSSSelectorResolver{resolveNestingSelectors(e,t,n,s){return isNestingAtRule(s)?this.resolveSelectorForNestContaining(e,t,findNestingSelector(t),n,s):this.resolveSelectorForSCSSNesting(e,t,n,s)}resolveSelectorForSCSSNesting(e,t,n,s){const r=findNestingSelector(t);if(null!=r){let o=this.resolveSelectorForNestContaining(e,t,r,n,s),i=!0;for(;i;){i=!1;const t=[];for(const r of o){const o=findNextNestingSelector$1(r,s);o&&(i=!0,t.push(...this.resolveSelectorForNestContaining(e,r.selector,o,n,s)))}if(!i)break;o=t}return o}const o=t[0];if(isSelectorCombinator(o))return this.resolveSelectorForNestConcat(e,t,n,s);const i=new VCSSSelectorCombinator(o.node,{start:o.loc.start,end:o.loc.start},o.range[0],o.range[0],o.parent);return i.value=" ",i.selector=" ",this.resolveSelectorForNestConcat(e,[i,...t],n,s)}};function findNextNestingSelector$1(e,t){for(const n of findNestingSelectors(e.selector)){let e=n.node.parent;for(;e&&"VCSSAtRule"!==e.type&&"VCSSStyleRule"!==e.type;)e=e.parent;if(e===t)return n}return null}var StylusSelectorResolver=class extends CSSSelectorResolver{resolveNestingSelectors(e,t,n,s){return isNestingAtRule(s)?this.resolveSelectorForNestContaining(e,t,findNestingSelector(t),n,s):this.resolveSelectorForStylusNesting(e,t,n,s)}resolveSelectorForStylusNesting(e,t,n,s){const r=findNestingSelector(t);if(null!=r){const o=n?this.getNestingParentSelectors(n,r):null;let i=this.resolveSelectorForNestContaining(e,t,r,o,s),l=!0;for(;l;){l=!1;const t=[];for(const r of i){const o=findNextNestingSelector(r,s);if(o){l=!0;const i=n?this.getNestingParentSelectors(n,o):null;t.push(...this.resolveSelectorForNestContaining(e,r.selector,o,i,s))}}if(!l)break;i=t}return i}const o=t[0];if(isSelectorCombinator(o))return this.resolveSelectorForNestConcat(e,t,n,s);const i=new VCSSSelectorCombinator(o.node,{start:o.loc.start,end:o.loc.start},o.range[0],o.range[0],o.parent);return i.value=" ",i.selector=" ",this.resolveSelectorForNestConcat(e,[i,...t],n,s)}getNestingParentSelectors(e,t){if("&"===t.node.value)return e;const n=/^\^\[([\s\S]+?)\]$/u.exec(t.node.value);if(n){const t=n[1],s=toArray(e),r=parsePartialRefValue(t,s.length);return r?0===r.start?s[r.end]:this.buildRangeResolveNestingSelectors(s.slice(r.start,r.end+1)):null}if("~/"===t.node.value&&0===t.nestingIndex)return toArray(e)[0];if(/^(?:\.\.\/)+$/u.test(t.node.value)&&0===t.nestingIndex){const n=toArray(e),s=n.length-t.node.value.length/3-1;return n.length>s&&s>=0?n[s]:null}return"/"===t.node.value&&0===t.nestingIndex?null:e}buildRangeResolveNestingSelectors(e){const t=[...e];let n=null,s=t.shift();for(;null!=s;){const e=new ResolvedSelectors(s.container,n);for(const t of s.container.selectors.filter(hasNodesSelector)){const r=this.resolveNestingSelectors(e,t.nodes,n,s.container);e.selectors.push(...r)}n=e,s=t.shift()}return n}};function findNextNestingSelector(e,t){for(const n of findNestingSelectors(e.selector)){let e=n.node.parent;for(;e&&"VCSSAtRule"!==e.type&&"VCSSStyleRule"!==e.type;)e=e.parent;if(e===t)return n}return null}function parsePartialRefValue(e,t){function n(e,n=0){return e>=0?e:t+e+n}const s=Number(e);if(Number.isInteger(s)){const e=n(s,-1);return e<0||t<=e?null:{start:0,end:e}}const r=/^([+-]?\d+)\.\.([+-]?\d+)$/u.exec(e);if(r){const e=n(Number(r[1])),s=n(Number(r[2]));return e<0||t<=e||s<0||t<=s||s<e?null:{start:e,end:s}}return null}function toArray(e){const t=[e];let n=e.parent;for(;null!=n;)t.unshift(n),n=n.parent;return t}const RESOLVERS={scss:SCSSSelectorResolver,css:CSSSelectorResolver,stylus:StylusSelectorResolver};function getResolvedSelectors(e){const t=e.lang;return extractSelectors((new(isSupportedStyleLang(t)?RESOLVERS[t]:CSSSelectorResolver)).resolveSelectors(e.cssNode))}function extractSelectors(e){const t=[];for(const n of e)t.push(...n.selectors),t.push(...extractSelectors(n.children));return t}function isRootElement(e){return"VElement"===e.type&&isRootTemplate(e.parent)}function isRootTemplate(e){return"VElement"===e.type&&"template"===e.name&&"VDocumentFragment"===e.parent.type}function isSkipElement(e){return"VElement"===e.type&&("template"===e.name||isTransitionElement(e))}function isSlotElement(e){return"VElement"===e.type&&"slot"===e.name}function getWrapperTransition(e){let t=e.parent;for(;"VElement"===t.type;){if(isTransitionElement(t)||isTransitionGroupElement(t))return t;if(!isSlotElement(t)&&!isSkipElement(t))return null;t=t.parent}return null}function isElementWrappedInTransition(e){return Boolean(getWrapperTransition(e))}function getParentElement(e){if(isRootElement(e))return null;let t=e.parent;for(;t&&(isSkipElement(t)||isSlotElement(t));){if(isRootElement(t))return null;t=t.parent}return"VElement"===t?.type?t:null}const TRANSITION_CLASS_BASES=["enter","enter-from","enter-active","enter-to","leave","leave-from","leave-active","leave-to"],TRANSITION_GROUP_CLASS_BASES=[...TRANSITION_CLASS_BASES,"move"];var QueryContext=class{constructor(e){this.elements=[],this.document=e||this}queryStep(e){return new ElementsQueryContext(queryStep(this.elements,e,this.document),this.document)}reverseQueryStep(e){return new ElementsQueryContext(reverseQueryStep(this.elements,e,this.document),this.document)}filter(e){return new ElementsQueryContext(this.elements.filter(e),this.document)}split(){return this.elements.map((e=>new ElementsQueryContext([e],this.document)))}},VueDocumentQueryContext=class extends QueryContext{constructor(e,t){super();const{ast:n}=e.sourceCode;this.elements=n.templateBody?[...genDescendantElements([n.templateBody])]:[],this.context=e,this.options=t,t.captureClassesFromDoc.length>0?this.docsModifiers=getStyleContexts(e).filter(isValidStyleContext).filter((e=>e.scoped)).map((e=>extractClassesFromDoc(e,t.captureClassesFromDoc))).reduce(((e,t)=>e.concat(t)),[]):this.docsModifiers=[]}};function extractClassesFromDoc(e,t){const n=new Set;for(const s of e.cssNode.comments)for(const e of t){let t;for(e.lastIndex=0;t=e.exec(s.text);)if(t.length>1)for(const e of t.slice(1))n.add(e);else n.add(t[0])}return[...n]}var ElementsQueryContext=class extends QueryContext{constructor(e,t){super(t),this.elements=[...e]}};function createQueryContext(e,t){return new VueDocumentQueryContext(e,t)}function*queryStep(e,t,n){if(isSelectorCombinator(t)){if(isChildCombinator(t))return void(yield*genChildElements(e));if(isDescendantCombinator(t)||isDeepCombinator(t))return void(yield*genDescendantElements(e));if(isAdjacentSiblingCombinator(t))return void(yield*genAdjacentSiblingElements(e));if(isGeneralSiblingCombinator(t))return void(yield*genGeneralSiblingElements(e))}else{if(isVDeepPseudo(t))return void(yield*genVDeepElements(e,normalizePseudoParams(t,t.nodes),s));if(isVSlottedPseudo(t))return void(yield*genVSlottedElements(e,normalizePseudoParams(t,t.nodes),s));if(isVGlobalPseudo(t))return void(yield*genVGlobalElements(e,normalizePseudoParams(t,t.nodes),n,s))}function s(e,t){return t.reduce(((e,t)=>[...queryStep(e,t,n)]),e)}isTypeSelector(t)?yield*genElementsByTagName(e,Template.ofSelector(t)):isIDSelector(t)?yield*genElementsById(e,Template.ofSelector(t),n):isClassSelector(t)?yield*genElementsByClassName(e,Template.ofSelector(t),n):(isUniversalSelector(t),yield*e)}function*reverseQueryStep(e,t,n){if(isSelectorCombinator(t)){if(isChildCombinator(t))return void(yield*genParentElements(e));if(isDescendantCombinator(t)||isDeepCombinator(t))return void(yield*genAncestorElements(e));if(isAdjacentSiblingCombinator(t))return void(yield*genPrevAdjacentSiblingElements(e));if(isGeneralSiblingCombinator(t))return void(yield*genPrevGeneralSiblingElements(e))}else{if(isVDeepPseudo(t))return void(yield*genVDeepElements(e,normalizePseudoParams(t,t.nodes),s));if(isVSlottedPseudo(t))return void(yield*genVSlottedElements(e,normalizePseudoParams(t,t.nodes),s));if(isVGlobalPseudo(t))return void(yield*genVGlobalElements(e,normalizePseudoParams(t,t.nodes),n,s))}function s(e,t){return t.reduceRight(((e,t)=>[...reverseQueryStep(e,t,n)]),e)}yield*queryStep(e,t,n)}function*genDescendantElements(e){const t=new Set;for(const n of genChildElements(e))if(!t.has(n)){yield n,t.add(n);for(const e of genDescendantElements([n]))t.has(e)||(yield e,t.add(e))}}function*genAncestorElements(e){const t=new Set;for(const n of genParentElements(e)){yield n,t.add(n);for(const e of genAncestorElements([n]))t.has(e)||(yield e,t.add(e))}}function*genChildElements(e){function*t(e){for(const n of e.children.filter(isVElement))isSkipElement(n)?yield*t(n):isSlotElement(n)?(yield n,yield*t(n)):yield n}for(const n of e)isSlotElement(n)||(yield*t(n))}function genParentElements(e){return iterateUnique((function*(){for(const t of e)yield getParentElement(t)}))}function genAdjacentSiblingElements(e){return iterateUnique((function*(){for(const t of e){hasVFor(t)&&(yield t);const e=getVForTemplate(t);if(e){const n=[...genChildElements([e])];yield n[n.indexOf(t)+1]||n[0]}const n=getParentElement(t);if(n){const e=[...genChildElements([n])];yield e[e.indexOf(t)+1]}}}))}function genPrevAdjacentSiblingElements(e){return iterateUnique((function*(){for(const t of e){hasVFor(t)&&(yield t);const e=getVForTemplate(t);if(e){const n=[...genChildElements([e])];yield n[n.indexOf(t)-1]||n[n.length-1]}const n=getParentElement(t);if(n){const e=[...genChildElements([n])];yield e[e.indexOf(t)-1]}}}))}function genGeneralSiblingElements(e){return iterateUnique((function*(){for(const t of e){hasVFor(t)&&(yield t);const e=getVForTemplate(t);e&&(yield*genChildElements([e]));const n=getParentElement(t);if(n){const e=[...genChildElements([n])],s=e.indexOf(t);yield*e.slice(s+1)}}}))}function genPrevGeneralSiblingElements(e){return iterateUnique((function*(){for(const t of e){hasVFor(t)&&(yield t);const e=getVForTemplate(t);e&&(yield*genChildElements([e]));const n=getParentElement(t);if(n){const e=[...genChildElements([n])],s=e.indexOf(t);yield*e.slice(0,s)}}}))}function*genVDeepElements(e,t,n){t.length?yield*iterateUnique((function*(){for(const s of t)yield*n(e,s.nodes)})):yield*e}function genVSlottedElements(e,t,n){return iterateUnique((function*(){for(const t of e)isSlotElement(t)&&(yield t);for(const r of t){const t=n(e,r.nodes);for(const e of t)s(e)&&(yield e)}}));function s(e){return!!isSlotElement(e)||Boolean(e&&e.parent&&s(e.parent))}}function genVGlobalElements(e,t,n,s){return iterateUnique((function*(){for(const e of t)yield*s(n.elements,e.nodes)}))}function*genElementsByTagName(e,t){for(const n of e)("component"===n.name||"slot"===n.name||t.toLowerCase().matchString(n.name))&&(yield n)}function*genElementsById(e,t,n){for(const s of e)matchId(s,t,n)&&(yield s)}function*genElementsByClassName(e,t,n){let s=null;if(n.options.ignoreBEMModifier&&t.hasString("--")){const e=t.divide("--");e.pop(),e.length&&(s=e.reduce(((e,t)=>e.concat(t))))}for(const r of n.docsModifiers){if(r.startsWith(":"))continue;const n=r.startsWith(".")?r.slice(1):r;if(t.matchString(n))return void(yield*e);if(s&&s.matchString(n))return void(yield*e)}for(const r of e)(matchClassName(r,t,n)||s&&matchClassName(r,s,n))&&(yield r)}function matchId(e,t,n){const s=getAttributeValueNodes(e,"id",n.context);if(null==s)return!0;for(const e of s){const n=Template.ofNode(e);if(null==n)return!0;if(n.match(t))return!0}return!1}function matchClassName(e,t,n){if(isElementWrappedInTransition(e)){const s=getWrapperTransition(e);if(null!=s&&matchTransitionClassName(s,t,n))return!0}const s=lodash.uniq(["class",...n.options.extraClassAttributes]);for(const r of s)if(matchClassNameForAttribute(e,r,t,n))return!0;const r=getRefNames(e,n),o=getVueComponentContext(n.context);return!(!o||!o.getClassesOperatedByClassList(r,isRootElement(e)).filter((e=>"Literal"===e.type)).some((e=>matchClassNameExpression(e,t,n))))}function matchClassNameForAttribute(e,t,n,s){const r=getAttributeValueNodes(e,t,s.context);if(null==r)return!0;for(const e of r)if("VLiteral"===e.type){if(includesClassName(e.value,n))return!0}else if(matchClassNameExpression(e,n,s))return!0;return!1}function getRefNames(e,t){const n=getAttributeValueNodes(e,"ref",t.context);if(null==n)return null;const s=[];for(const e of n){const t=Template.ofNode(e);if(null==t)return null;s.push(t)}return s}function matchTransitionClassName(e,t,n){const s=isTransitionElement(e)?TRANSITION_CLASS_BASES:TRANSITION_GROUP_CLASS_BASES,r=getAttributeValueNodes(e,"name",n.context);for(const o of s){const s=getAttributeValueNodes(e,`${o}-class`,n.context);if(null==s)return!0;if(s.length)for(const e of s){const n=Template.ofNode(e);if(null==n)return!0;if(n.match(t))return!0}else if(null==r){if(t.endsWith(`-${o}`))return!0}else if(0===r.length){if(t.matchString(`v-${o}`))return!0}else for(const e of r){const n=Template.ofNode(e);if(null==n)return!0;if(t.match(n.concat(`-${o}`)))return!0}}return!1}function matchClassNameExpression(e,t,n){const s=Template.ofNode(e);if(null!=s){if(includesClassName(s,t))return!0}else if("Identifier"===e.type){const s=getStringFromNode(e,n.context);if(null==s)return!0;if(includesClassName(s,t))return!0}else if("ArrayExpression"===e.type){if(matchClassNameForArrayExpression(e,t,n))return!0}else{if("ObjectExpression"!==e.type)return!0;if(matchClassNameForObjectExpression(e,t,n))return!0}return!1}function matchClassNameForArrayExpression(e,t,n){for(const s of e.elements)if("SpreadElement"===s.type){if(matchClassNameExpression(s.argument,t,n))return!0}else{const e=getReferenceExpressions(s,n.context);if(e)for(const s of e)if(matchClassNameExpression(s,t,n))return!0}return!1}function matchClassNameForObjectExpression(e,t,n){for(const s of e.properties){if("Property"!==s.type)return!0;if(s.computed){if("Identifier"!==s.key.type&&"Literal"!==s.key.type&&"TemplateLiteral"!==s.key.type&&"BinaryExpression"!==s.key.type)return!0;if(matchClassNameExpression(s.key,t,n))return!0}else if("Identifier"===s.key.type){if(includesClassName(s.key.name,t))return!0}else if("Literal"===s.key.type&&includesClassName(`${s.key.value}`,t))return!0}return!1}function includesClassName(e,t){return"string"==typeof e?e.split(/\s+/u).some((e=>t.matchString(e))):e.divide(/\s+/u).some((e=>t.match(e)))}function*iterateUnique(e){const t=new Set;for(const n of e())null==n||t.has(n)||(yield n,t.add(n))}function hasVFor(e){return e.startTag.attributes.some((e=>e.directive&&"for"===e.key.name.name))}function getVForTemplate(e){let t=e.parent;for(;t;){if("VElement"!==t.type||"template"!==t.name)return null;if(hasVFor(t))return t;t=t.parent}return null}const RE_REGEXP_STR=/^\/(.+)\/([A-Za-z]*)$/u;function toRegExp(e,t){const n=RE_REGEXP_STR.exec(e);if(n){let e;return e=t?[...new Set(n[2]+t)].join(""):n[2],new RegExp(n[1],e)}return new RegExp(e,t)}function parseQueryOptions(e){const{ignoreBEMModifier:t,captureClassesFromDoc:n,extraClassAttributes:s}=e||{};return{ignoreBEMModifier:t??!1,captureClassesFromDoc:n?.map((e=>toRegExp(e,"g")))??[],extraClassAttributes:s??[]}}function getScopedSelectors$1(e){return getResolvedSelectors(e).map(getScopedSelector$1).filter(isDefined)}function getScopedSelector$1(e){const{selector:t}=e,n=t.findIndex((e=>isDeepCombinator(e)||isVueSpecialPseudo(e)));let s;if(n>=0){const e=t[n];if(isDeepCombinator(e)||isVDeepPseudo(e)){s=t.slice(0,n);const e=s.pop();e&&!isDescendantCombinator(e)&&s.push(e)}else if(isVSlottedPseudo(e))s=t.slice(0,n+1);else{if(isVGlobalPseudo(e))return null;s=[...t]}}else s=[...t];const r=[];for(const e of s.reverse()){if(isSelectorCombinator(e)&&!isChildCombinator(e)&&!isAdjacentSiblingCombinator(e)&&!isGeneralSiblingCombinator(e))break;r.push(e)}return r.reverse()}var no_unused_selector_default={meta:{docs:{description:"disallow selectors defined in Scoped CSS that don't use in `<template>`",categories:["vue2-recommended","vue3-recommended"],default:"warn",url:"https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/no-unused-selector.html"},fixable:null,messages:{unused:"The selector `{{selector}}` is unused."},schema:[{type:"object",properties:{ignoreBEMModifier:{type:"boolean"},captureClassesFromDoc:{type:"array",items:[{type:"string"}],minItems:0,uniqueItems:!0},checkUnscoped:{type:"boolean"},extraClassAttributes:{type:"array",items:{type:"string"},minItems:0,uniqueItems:!0}},additionalProperties:!1}],type:"suggestion"},create(e){if(!hasTemplateBlock(e))return{};const t=Boolean(e.options[0]?.checkUnscoped),n=getStyleContexts(e).filter(isValidStyleContext).filter((e=>e.scoped||t));if(!n.length)return{};const s=getCommentDirectivesReporter(e),r=new Set;function o(e,t){const n=[];let o=e,i=[...t].reverse();for(;i.length;){const e=i.findIndex(isSelectorCombinator);let t=null,s=[];e>=0?(t=i[e],s=i.slice(0,e),i=i.slice(e+1)):(s=i,i=[]);const r=s.filter(isClassSelector),l=s.filter((e=>isSelectorCombinator(e)||isTypeSelector(e)||isIDSelector(e)||isUniversalSelector(e)||isVueSpecialPseudo(e)));for(const e of l)o=o.reverseQueryStep(e);const a=o.filter(isRootElement);if(a.elements.length)for(const e of r)if(a.reverseQueryStep(e).elements.length)return;for(const e of r)o=o.reverseQueryStep(e);if(n.push(...s),t){if(!o.elements.length)break;if(o.elements.some(isRootElement))return;o=o.reverseQueryStep(t),n.push(t)}}var l;o.elements.length||(l=n.reverse(),r.has(l[0])||(s.report({loc:{start:l[0].loc.start,end:l[l.length-1].loc.end},messageId:"unused",data:{selector:l.map((e=>e.selector)).join("")}}),r.add(l[0])))}return{"Program:exit"(){const t=createQueryContext(e,parseQueryOptions(e.options[0]));for(const e of n)for(const n of getScopedSelectors$1(e))o(t,n)}}}},require_scoped_default={meta:{deprecated:!0,docs:{description:"enforce the `<style>` tags to has the `scoped` attribute",categories:["vue2-recommended","vue3-recommended"],default:"warn",url:"https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/require-scoped.html",suggestion:!0,replacedBy:["enforce-style-type"]},fixable:null,messages:{missing:"Missing `scoped` attribute.",forbidden:"`scoped` attribute are forbidden.",add:"Add `scoped` attribute.",remove:"Remove `scoped` attribute."},schema:[{enum:["always","never"]}],type:"suggestion",hasSuggestions:!0},create(e){const t="never"!==e.options[0],n=getStyleContexts(e).filter(isValidStyleContext);if(!n.length)return{};const s=getCommentDirectivesReporter(e),r=e.sourceCode.parserServices.getTemplateBodyTokenStore?.();function o(e){s.report({node:e.startTag,messageId:"missing",data:{},suggest:[{messageId:"add",fix(t){const n=r.getLastToken(e.startTag);return n&&t.insertTextBefore(n," scoped")}}]})}function i(e){const t=e.startTag.attributes.find((e=>"scoped"===e.key.name));s.report({node:t,messageId:"forbidden",data:{},suggest:[{messageId:"remove",fix:e=>e.remove(t)}]})}return{"Program:exit"(){for(const e of n)t&&!e.scoped?o(e.styleElement):!t&&e.scoped&&i(e.styleElement)}}}};function getScopedSelectors(e){return getResolvedSelectors(e).map(getScopedSelector).filter(isDefined)}function getScopedSelector(e){const{selector:t}=e,n=t.findIndex((e=>isDeepCombinator(e)||isVueSpecialPseudo(e)));if(n>=0){const e=t[n];if(isDeepCombinator(e)||isVDeepPseudo(e)){const e=t.slice(0,n),s=e.pop();return s&&!isDescendantCombinator(s)&&e.push(s),e}return isVSlottedPseudo(e)?t.slice(0,n+1):isVGlobalPseudo(e)?null:[...t]}return[...t]}var require_selector_used_inside_default={meta:{docs:{description:"disallow selectors defined that is not used inside `<template>`",categories:[],default:"warn",url:"https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/require-selector-used-inside.html"},fixable:null,messages:{unused:"The selector `{{selector}}` is unused in the template."},schema:[{type:"object",properties:{ignoreBEMModifier:{type:"boolean"},captureClassesFromDoc:{type:"array",items:[{type:"string"}],minItems:0,uniqueItems:!0},checkUnscoped:{type:"boolean"}},additionalProperties:!1}],type:"suggestion"},create(e){if(!hasTemplateBlock(e))return{};const t=Boolean(e.options[0]?.checkUnscoped),n=getStyleContexts(e).filter(isValidStyleContext).filter((e=>e.scoped||t));if(!n.length)return{};const s=getCommentDirectivesReporter(e),r=new Set;function o(e){const t=e[e.length-1];r.has(t)||(s.report({loc:{start:e[0].loc.start,end:t.loc.end},messageId:"unused",data:{selector:e.map((e=>e.selector)).join("")}}),r.add(t))}function i(e,t){let n=e;const s=t.filter((e=>isSelectorCombinator(e)||isTypeSelector(e)||isIDSelector(e)||isClassSelector(e)||isUniversalSelector(e)||isVueSpecialPseudo(e)));for(let e=0;e<s.length;e++){const t=s[e];if(n=n.queryStep(t),!n.elements.length){o(s.slice(0,e+1));break}}}return{"Program:exit"(){const t=createQueryContext(e,parseQueryOptions(e.options[0]));for(const e of n)for(const n of getScopedSelectors(e))i(t,n)}}}},require_v_deep_argument_default={meta:{docs:{description:"require selector argument to be passed to `::v-deep()`",categories:["vue3-recommended"],default:"warn",url:"https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/require-v-deep-argument.html"},fixable:"code",messages:{missingArguments:"Need to pass argument to the `::v-deep` pseudo-element."},schema:[],type:"suggestion"},create(e){const t=getStyleContexts(e).filter(isValidStyleContext).filter((e=>e.scoped));if(!t.length)return{};const n=getCommentDirectivesReporter(e);function s(e){return hasSelectorNodes(e.parent)?e.parent:isVCSSAtRule(e.parent)?null:s(e.parent)}function r(t){n.report({node:t,loc:t.loc,messageId:"missingArguments",fix(n){if(!isVDeepPseudoV2(t))return null;const r=t.parent.nodes,o=r[r.indexOf(t)+1];if(!o)return null;const i=[t.range[0]+t.value.length,o.range[0]];if(e.sourceCode.text.slice(...i).trim())return null;if(!s(t)?.nodes.every((e=>isVCSSDeclarationProperty(e)||isVCSSComment(e))))return null;const l=r[r.length-1];return[n.removeRange(i),n.insertTextAfterRange(i,"("),n.insertTextAfterRange(l.range,")")]}})}function o(e){e.traverseSelectorNodes({enterNode(e){(isVDeepPseudoV2(e)||isVDeepPseudo(e)&&isPseudoEmptyArguments(e))&&r(e)}})}return{"Program:exit"(){for(const e of t)o(e)}}}},require_v_global_argument_default={meta:{docs:{description:"require selector argument to be passed to `::v-global()`",categories:["vue3-recommended"],default:"warn",url:"https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/require-v-global-argument.html"},fixable:null,messages:{missingArguments:"Need to pass argument to the `::v-global` pseudo-element."},schema:[],type:"suggestion"},create(e){const t=getStyleContexts(e).filter(isValidStyleContext).filter((e=>e.scoped));if(!t.length)return{};const n=getCommentDirectivesReporter(e);function s(e){e.traverseSelectorNodes({enterNode(e){isVGlobalPseudo(e)&&isPseudoEmptyArguments(e)&&function(e){n.report({node:e,loc:e.loc,messageId:"missingArguments"})}(e)}})}return{"Program:exit"(){for(const e of t)s(e)}}}},require_v_slotted_argument_default={meta:{docs:{description:"require selector argument to be passed to `::v-slotted()`",categories:["vue3-recommended"],default:"warn",url:"https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/require-v-slotted-argument.html"},fixable:null,messages:{missingArguments:"Need to pass argument to the `::v-slotted` pseudo-element."},schema:[],type:"suggestion"},create(e){const t=getStyleContexts(e).filter(isValidStyleContext).filter((e=>e.scoped));if(!t.length)return{};const n=getCommentDirectivesReporter(e);function s(e){e.traverseSelectorNodes({enterNode(e){isVSlottedPseudo(e)&&isPseudoEmptyArguments(e)&&function(e){n.report({node:e,loc:e.loc,messageId:"missingArguments"})}(e)}})}return{"Program:exit"(){for(const e of t)s(e)}}}},v_deep_pseudo_style_default={meta:{docs:{description:"enforce `:deep()`/`::v-deep()` style",categories:["vue3-recommended"],default:"warn",url:"https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/v-deep-pseudo-style.html"},fixable:"code",messages:{expectedDeep:"Expected ':deep()' instead of '::v-deep()'.",expectedVDeep:"Expected '::v-deep()' instead of ':deep()'."},schema:[{enum:[":deep","::v-deep"]}],type:"suggestion"},create(e){const t=getStyleContexts(e).filter(isValidStyleContext).filter((e=>e.scoped));if(!t.length)return{};const n=e.options[0]||":deep",s=getCommentDirectivesReporter(e);function r(t){t.value!==n&&function(t){s.report({node:t,loc:t.loc,messageId:":deep"===n?"expectedDeep":"expectedVDeep",fix(s){const r=e.sourceCode.text.slice(...t.range);return s.replaceTextRange(t.range,r.replace(/^(\s*)(?::deep|::v-deep)(\s*\()/u,((e,t,s)=>`${t}${n}${s}`)))}})}(t)}function o(e){e.traverseSelectorNodes({enterNode(e){isVDeepPseudo(e)&&!isPseudoEmptyArguments(e)&&r(e)}})}return{"Program:exit"(){for(const e of t)o(e)}}}},v_global_pseudo_style_default={meta:{docs:{description:"enforce `:global()`/`::v-global()` style",categories:["vue3-recommended"],default:"warn",url:"https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/v-global-pseudo-style.html"},fixable:"code",messages:{expectedGlobal:"Expected ':global()' instead of '::v-global()'.",expectedVGlobal:"Expected '::v-global()' instead of ':global()'."},schema:[{enum:[":global","::v-global"]}],type:"suggestion"},create(e){const t=getStyleContexts(e).filter(isValidStyleContext).filter((e=>e.scoped));if(!t.length)return{};const n=e.options[0]||":global",s=getCommentDirectivesReporter(e);function r(t){t.value!==n&&function(t){s.report({node:t,loc:t.loc,messageId:":global"===n?"expectedGlobal":"expectedVGlobal",fix(s){const r=e.sourceCode.text.slice(...t.range);return s.replaceTextRange(t.range,r.replace(/^(\s*)(?::global|::v-global)(\s*\()/u,((e,t,s)=>`${t}${n}${s}`)))}})}(t)}function o(e){e.traverseSelectorNodes({enterNode(e){isVGlobalPseudo(e)&&!isPseudoEmptyArguments(e)&&r(e)}})}return{"Program:exit"(){for(const e of t)o(e)}}}},v_slotted_pseudo_style_default={meta:{docs:{description:"enforce `:slotted()`/`::v-slotted()` style",categories:["vue3-recommended"],default:"warn",url:"https://future-architect.github.io/eslint-plugin-vue-scoped-css/rules/v-slotted-pseudo-style.html"},fixable:"code",messages:{expectedSlotted:"Expected ':slotted()' instead of '::v-slotted()'.",expectedVSlotted:"Expected '::v-slotted()' instead of ':slotted()'."},schema:[{enum:[":slotted","::v-slotted"]}],type:"suggestion"},create(e){const t=getStyleContexts(e).filter(isValidStyleContext).filter((e=>e.scoped));if(!t.length)return{};const n=e.options[0]||":slotted",s=getCommentDirectivesReporter(e);function r(t){t.value!==n&&function(t){s.report({node:t,loc:t.loc,messageId:":slotted"===n?"expectedSlotted":"expectedVSlotted",fix(s){const r=e.sourceCode.text.slice(...t.range);return s.replaceTextRange(t.range,r.replace(/^(\s*)(?::slotted|::v-slotted)(\s*\()/u,((e,t,s)=>`${t}${n}${s}`)))}})}(t)}function o(e){e.traverseSelectorNodes({enterNode(e){isVSlottedPseudo(e)&&!isPseudoEmptyArguments(e)&&r(e)}})}return{"Program:exit"(){for(const e of t)o(e)}}}};const baseRules=[{rule:enforce_style_type_default,ruleName:"enforce-style-type",ruleId:"vue-scoped-css/enforce-style-type"},{rule:no_deprecated_deep_combinator_default,ruleName:"no-deprecated-deep-combinator",ruleId:"vue-scoped-css/no-deprecated-deep-combinator"},{rule:no_deprecated_v_enter_v_leave_class_default,ruleName:"no-deprecated-v-enter-v-leave-class",ruleId:"vue-scoped-css/no-deprecated-v-enter-v-leave-class"},{rule:no_parent_of_v_global_default,ruleName:"no-parent-of-v-global",ruleId:"vue-scoped-css/no-parent-of-v-global"},{rule:no_parsing_error_default,ruleName:"no-parsing-error",ruleId:"vue-scoped-css/no-parsing-error"},{rule:no_unused_keyframes_default,ruleName:"no-unused-keyframes",ruleId:"vue-scoped-css/no-unused-keyframes"},{rule:no_unused_selector_default,ruleName:"no-unused-selector",ruleId:"vue-scoped-css/no-unused-selector"},{rule:require_scoped_default,ruleName:"require-scoped",ruleId:"vue-scoped-css/require-scoped"},{rule:require_selector_used_inside_default,ruleName:"require-selector-used-inside",ruleId:"vue-scoped-css/require-selector-used-inside"},{rule:require_v_deep_argument_default,ruleName:"require-v-deep-argument",ruleId:"vue-scoped-css/require-v-deep-argument"},{rule:require_v_global_argument_default,ruleName:"require-v-global-argument",ruleId:"vue-scoped-css/require-v-global-argument"},{rule:require_v_slotted_argument_default,ruleName:"require-v-slotted-argument",ruleId:"vue-scoped-css/require-v-slotted-argument"},{rule:v_deep_pseudo_style_default,ruleName:"v-deep-pseudo-style",ruleId:"vue-scoped-css/v-deep-pseudo-style"},{rule:v_global_pseudo_style_default,ruleName:"v-global-pseudo-style",ruleId:"vue-scoped-css/v-global-pseudo-style"},{rule:v_slotted_pseudo_style_default,ruleName:"v-slotted-pseudo-style",ruleId:"vue-scoped-css/v-slotted-pseudo-style"}],rules$1=baseRules.map((e=>{const t=e.rule;return t.meta.docs.ruleName=e.ruleName,t.meta.docs.ruleId=e.ruleId,t}));function collectRules(e){return rules$1.reduce(((t,n)=>(e&&!n.meta.docs.categories.includes(e)||n.meta.deprecated||(t[n.meta.docs.ruleId||""]=n.meta.docs.default||"error"),t)),{})}var base_default=[{plugins:{get"vue-scoped-css"(){return lib_default}},name:"vue-scoped-css/base/plugins"},{files:["*.vue","**/*.vue"],languageOptions:{parser:vueParser},name:"vue-scoped-css/base/options"}],recommended_default=[...base_default,{rules:collectRules("vue3-recommended"),name:"vue-scoped-css/recommended"}],vue2_recommended_default=[...base_default,{rules:collectRules("vue2-recommended"),name:"vue-scoped-css/vue2-recommended"}],all_default=[...base_default,{rules:collectRules(),name:"vue-scoped-css/all"}];const configs={base:base_default,recommended:recommended_default,"vue2-recommended":vue2_recommended_default,all:all_default,"flat/base":base_default,"flat/recommended":recommended_default,"flat/vue2-recommended":vue2_recommended_default,"flat/all":all_default},rules=rules$1.reduce(((e,t)=>(e[t.meta.docs?.ruleName||""]=t,e)),{});var lib_default={configs:configs,rules:rules};export{lib_default as default};
//# sourceMappingURL=/sm/f1808ca5f5f53ccf02004ecd896deb98e0115978b1a61dde13d44568a5f0fb02.map