%PDF- %PDF-
Direktori : /www/specpages-backup/node_modules/less/lib/less/tree/ |
Current File : /www/specpages-backup/node_modules/less/lib/less/tree/atrule.js.map |
{"version":3,"file":"atrule.js","sourceRoot":"","sources":["../../../src/less/tree/atrule.js"],"names":[],"mappings":";;;;;AAAA,gDAA0B;AAC1B,wDAAkC;AAClC,sDAAgC;AAChC,0DAAoC;AAEpC,IAAM,MAAM,GAAG,UACX,IAAI,EACJ,KAAK,EACL,KAAK,EACL,KAAK,EACL,eAAe,EACf,SAAS,EACT,QAAQ,EACR,cAAc;IAEd,IAAI,CAAC,CAAC;IAEN,IAAI,CAAC,IAAI,GAAI,IAAI,CAAC;IAClB,IAAI,CAAC,KAAK,GAAG,CAAC,KAAK,YAAY,cAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACtF,IAAI,KAAK,EAAE;QACP,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACtB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;SACtB;aAAM;YACH,IAAI,CAAC,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,GAAG,CAAC,IAAI,kBAAQ,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,oBAAoB,EAAE,CAAC;SAC3G;QACD,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACpC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,YAAY,GAAG,IAAI,CAAC;SACrC;QACD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;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QAClB,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAChB,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,EAAE,EAAE;YAC1B,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;SACpC;QACD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAChB,OAAO,CAAC,QAAQ,EAAE,CAAC;QACnB,OAAO;KACV;IAED,iBAAiB;IACjB,IAAM,SAAS,GAAG,OAAK,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAG,CAAC;IAE5D,IAAM,UAAU,GAAM,SAAS,OAAI,CAAC;IACpC,IAAI,CAAC,OAAO,EAAE;QACV,MAAM,CAAC,GAAG,CAAC,OAAK,SAAS,MAAG,CAAC,CAAC;KACjC;SAAM;QACH,MAAM,CAAC,GAAG,CAAC,OAAK,UAAY,CAAC,CAAC;QAC9B,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACjC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,EAAE,EAAE;YAC1B,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YACvB,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;SACpC;QACD,MAAM,CAAC,GAAG,CAAI,SAAS,MAAG,CAAC,CAAC;KAC/B;IAED,OAAO,CAAC,QAAQ,EAAE,CAAC;AACvB,CAAC,CAAC;AAEF,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,QAAQ,CAAC;AACjC,kBAAe,MAAM,CAAC","sourcesContent":["import Node from './node';\nimport Selector from './selector';\nimport Ruleset from './ruleset';\nimport Anonymous from './anonymous';\n\nconst AtRule = function(\n name,\n value,\n rules,\n index,\n currentFileInfo,\n debugInfo,\n isRooted,\n visibilityInfo\n) {\n let i;\n\n this.name = name;\n this.value = (value instanceof Node) ? value : (value ? new Anonymous(value) : value);\n if (rules) {\n if (Array.isArray(rules)) {\n this.rules = rules;\n } else {\n this.rules = [rules];\n this.rules[0].selectors = (new Selector([], null, null, index, currentFileInfo)).createEmptySelectors();\n }\n for (i = 0; i < this.rules.length; i++) {\n this.rules[i].allowImports = true;\n }\n this.setParent(this.rules, this);\n }\n this._index = index;\n this._fileInfo = currentFileInfo;\n this.debugInfo = debugInfo;\n this.isRooted = isRooted || false;\n this.copyVisibilityInfo(visibilityInfo);\n this.allowRoot = true;\n};\n\nAtRule.prototype = new Node();\n\nAtRule.prototype.accept = function(visitor) {\n const value = this.value;\n const rules = this.rules;\n if (rules) {\n this.rules = visitor.visitArray(rules);\n }\n if (value) {\n this.value = visitor.visit(value);\n }\n};\n\nAtRule.prototype.isRulesetLike = function() {\n return this.rules || !this.isCharset();\n};\n\nAtRule.prototype.isCharset = function() {\n return '@charset' === this.name;\n};\n\nAtRule.prototype.genCSS = function(context, output) {\n const value = this.value;\n const rules = this.rules;\n output.add(this.name, this.fileInfo(), this.getIndex());\n if (value) {\n output.add(' ');\n value.genCSS(context, output);\n }\n if (rules) {\n this.outputRuleset(context, output, rules);\n } else {\n output.add(';');\n }\n};\n\nAtRule.prototype.eval = function(context) {\n let mediaPathBackup;\n let mediaBlocksBackup;\n let value = this.value;\n let rules = this.rules;\n\n // media stored inside other atrule should not bubble over it\n // backpup media bubbling information\n mediaPathBackup = context.mediaPath;\n mediaBlocksBackup = context.mediaBlocks;\n // deleted media bubbling information\n context.mediaPath = [];\n context.mediaBlocks = [];\n\n if (value) {\n value = value.eval(context);\n }\n if (rules) {\n // assuming that there is only one rule at this point - that is how parser constructs the rule\n rules = [rules[0].eval(context)];\n rules[0].root = true;\n }\n // restore media bubbling information\n context.mediaPath = mediaPathBackup;\n context.mediaBlocks = mediaBlocksBackup;\n\n return new AtRule(this.name, value, rules,\n this.getIndex(), this.fileInfo(), this.debugInfo, this.isRooted, this.visibilityInfo());\n};\n\nAtRule.prototype.variable = function(name) {\n if (this.rules) {\n // assuming that there is only one rule at this point - that is how parser constructs the rule\n return Ruleset.prototype.variable.call(this.rules[0], name);\n }\n};\n\nAtRule.prototype.find = function(...args) {\n if (this.rules) {\n // assuming that there is only one rule at this point - that is how parser constructs the rule\n return Ruleset.prototype.find.apply(this.rules[0], args);\n }\n};\n\nAtRule.prototype.rulesets = function() {\n if (this.rules) {\n // assuming that there is only one rule at this point - that is how parser constructs the rule\n return Ruleset.prototype.rulesets.apply(this.rules[0]);\n }\n};\n\nAtRule.prototype.outputRuleset = function(context, output, rules) {\n const ruleCnt = rules.length;\n let i;\n context.tabLevel = (context.tabLevel | 0) + 1;\n\n // Compressed\n if (context.compress) {\n output.add('{');\n for (i = 0; i < ruleCnt; i++) {\n rules[i].genCSS(context, output);\n }\n output.add('}');\n context.tabLevel--;\n return;\n }\n\n // Non-compressed\n const tabSetStr = `\\n${Array(context.tabLevel).join(' ')}`;\n\n const tabRuleStr = `${tabSetStr} `;\n if (!ruleCnt) {\n output.add(` {${tabSetStr}}`);\n } else {\n output.add(` {${tabRuleStr}`);\n rules[0].genCSS(context, output);\n for (i = 1; i < ruleCnt; i++) {\n output.add(tabRuleStr);\n rules[i].genCSS(context, output);\n }\n output.add(`${tabSetStr}}`);\n }\n\n context.tabLevel--;\n};\n\nAtRule.prototype.type = 'AtRule';\nexport default AtRule;\n"]}