%PDF- %PDF-
Direktori : /www/specpages-backup/node_modules/less/lib/less/tree/ |
Current File : /www/specpages-backup/node_modules/less/lib/less/tree/import.js.map |
{"version":3,"file":"import.js","sourceRoot":"","sources":["../../../src/less/tree/import.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAC1B,kDAA4B;AAC5B,8CAAwB;AACxB,oDAA8B;AAC9B,sDAAgC;AAChC,0DAAoC;AACpC,8CAAkC;AAClC,6DAAsC;AAEtC,EAAE;AACF,mBAAmB;AACnB,EAAE;AACF,0DAA0D;AAC1D,6DAA6D;AAC7D,wDAAwD;AACxD,oEAAoE;AACpE,EAAE;AACF,mEAAmE;AACnE,mEAAmE;AACnE,yCAAyC;AACzC,EAAE;AACF,IAAM,MAAM,GAAG,UAAS,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,cAAc;IACnF,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACvB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACpB,IAAI,CAAC,SAAS,GAAG,eAAe,CAAC;IACjC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACjB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IACzB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IAEtB,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;QACxD,IAAI,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;KACxD;SAAM;QACH,IAAM,SAAS,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QACjC,IAAI,SAAS,IAAI,yBAAyB,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;YACxD,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;SACnB;KACJ;IACD,IAAI,CAAC,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AAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;KAClF;SAAM,IAAI,IAAI,CAAC,GAAG,EAAE;QACjB,IAAM,SAAS,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAC1F,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,IAAI,CAAC,KAAK,EAAE;YAC9B,MAAM,IAAI,CAAC,KAAK,CAAC;SACpB;QACD,OAAO,SAAS,CAAC;KACpB;SAAM,IAAI,IAAI,CAAC,IAAI,EAAE;QAClB,OAAO,GAAG,IAAI,iBAAO,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QAC9D,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAE7B,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,eAAK,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;KACxF;SAAM;QACH,OAAO,EAAE,CAAC;KACb;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,QAAQ,CAAC;AACjC,kBAAe,MAAM,CAAC","sourcesContent":["import Node from './node';\nimport Media from './media';\nimport URL from './url';\nimport Quoted from './quoted';\nimport Ruleset from './ruleset';\nimport Anonymous from './anonymous';\nimport * as utils from '../utils';\nimport LessError from '../less-error';\n\n//\n// CSS @import node\n//\n// The general strategy here is that we don't want to wait\n// for the parsing to be completed, before we start importing\n// the file. That's because in the context of a browser,\n// most of the time will be spent waiting for the server to respond.\n//\n// On creation, we push the import path to our import queue, though\n// `import,push`, we also pass it a callback, which it'll call once\n// the file has been fetched, and parsed.\n//\nconst Import = function(path, features, options, index, currentFileInfo, visibilityInfo) {\n this.options = options;\n this._index = index;\n this._fileInfo = currentFileInfo;\n this.path = path;\n this.features = features;\n this.allowRoot = true;\n\n if (this.options.less !== undefined || this.options.inline) {\n this.css = !this.options.less || this.options.inline;\n } else {\n const pathValue = this.getPath();\n if (pathValue && /[#\\.\\&\\?]css([\\?;].*)?$/.test(pathValue)) {\n this.css = true;\n }\n }\n this.copyVisibilityInfo(visibilityInfo);\n this.setParent(this.features, this);\n this.setParent(this.path, this);\n}\n\nImport.prototype = new Node();\n\nImport.prototype.accept = function(visitor) {\n if (this.features) {\n this.features = visitor.visit(this.features);\n }\n this.path = visitor.visit(this.path);\n if (!this.options.isPlugin && !this.options.inline && this.root) {\n this.root = visitor.visit(this.root);\n }\n};\n\nImport.prototype.genCSS = function(context, output) {\n if (this.css && this.path._fileInfo.reference === undefined) {\n output.add('@import ', this._fileInfo, this._index);\n this.path.genCSS(context, output);\n if (this.features) {\n output.add(' ');\n this.features.genCSS(context, output);\n }\n output.add(';');\n }\n};\n\nImport.prototype.getPath = function() {\n return (this.path instanceof URL) ?\n this.path.value.value : this.path.value;\n};\n\nImport.prototype.isVariableImport = function() {\n let path = this.path;\n if (path instanceof URL) {\n path = path.value;\n }\n if (path instanceof Quoted) {\n return path.containsVariables();\n }\n\n return true;\n};\n\nImport.prototype.evalForImport = function(context) {\n let path = this.path;\n\n if (path instanceof URL) {\n path = path.value;\n }\n\n return new Import(path.eval(context), this.features, this.options, this._index, this._fileInfo, this.visibilityInfo());\n};\n\nImport.prototype.evalPath = function(context) {\n const path = this.path.eval(context);\n const fileInfo = this._fileInfo;\n\n if (!(path instanceof URL)) {\n // Add the rootpath if the URL requires a rewrite\n const pathValue = path.value;\n if (fileInfo &&\n pathValue &&\n context.pathRequiresRewrite(pathValue)) {\n path.value = context.rewritePath(pathValue, fileInfo.rootpath);\n } else {\n path.value = context.normalizePath(path.value);\n }\n }\n\n return path;\n};\n\nImport.prototype.eval = function(context) {\n const result = this.doEval(context);\n if (this.options.reference || this.blocksVisibility()) {\n if (result.length || result.length === 0) {\n result.forEach(node => {\n node.addVisibilityBlock();\n }\n );\n } else {\n result.addVisibilityBlock();\n }\n }\n return result;\n};\n\nImport.prototype.doEval = function(context) {\n let ruleset;\n let registry;\n const features = this.features && this.features.eval(context);\n\n if (this.options.isPlugin) {\n if (this.root && this.root.eval) {\n try {\n this.root.eval(context);\n }\n catch (e) {\n e.message = 'Plugin error during evaluation';\n throw new LessError(e, this.root.imports, this.root.filename);\n }\n }\n registry = context.frames[0] && context.frames[0].functionRegistry;\n if ( registry && this.root && this.root.functions ) {\n registry.addMultiple( this.root.functions );\n }\n\n return [];\n }\n\n if (this.skip) {\n if (typeof this.skip === 'function') {\n this.skip = this.skip();\n }\n if (this.skip) {\n return [];\n }\n }\n if (this.options.inline) {\n const contents = new Anonymous(this.root, 0,\n {\n filename: this.importedFilename,\n reference: this.path._fileInfo && this.path._fileInfo.reference\n }, true, true);\n\n return this.features ? new Media([contents], this.features.value) : [contents];\n } else if (this.css) {\n const newImport = new Import(this.evalPath(context), features, this.options, this._index);\n if (!newImport.css && this.error) {\n throw this.error;\n }\n return newImport;\n } else if (this.root) {\n ruleset = new Ruleset(null, utils.copyArray(this.root.rules));\n ruleset.evalImports(context);\n\n return this.features ? new Media(ruleset.rules, this.features.value) : ruleset.rules;\n } else {\n return [];\n }\n};\n\nImport.prototype.type = 'Import';\nexport default Import;\n"]}