585 lines
55 KiB
JavaScript
585 lines
55 KiB
JavaScript
"use strict";
|
|
|
|
var postcss = require('postcss');
|
|
|
|
var gonzales = require('gonzales-pe');
|
|
|
|
var DEFAULT_RAWS_ROOT = {
|
|
before: ''
|
|
};
|
|
var DEFAULT_RAWS_RULE = {
|
|
before: '',
|
|
between: ''
|
|
};
|
|
var DEFAULT_RAWS_DECL = {
|
|
before: '',
|
|
between: '',
|
|
semicolon: false
|
|
};
|
|
var DEFAULT_COMMENT_DECL = {
|
|
before: ''
|
|
};
|
|
var SUPPORTED_AT_KEYWORDS = ['media'];
|
|
|
|
var SassParser =
|
|
/*#__PURE__*/
|
|
function () {
|
|
function SassParser(input) {
|
|
this.input = input;
|
|
}
|
|
|
|
var _proto = SassParser.prototype;
|
|
|
|
_proto.parse = function parse() {
|
|
try {
|
|
this.node = gonzales.parse(this.input.css, {
|
|
syntax: 'sass'
|
|
});
|
|
} catch (error) {
|
|
throw this.input.error(error.message, error.line, 1);
|
|
}
|
|
|
|
this.lines = this.input.css.match(/^.*(\r?\n|$)/gm);
|
|
this.root = this.stylesheet(this.node);
|
|
};
|
|
|
|
_proto.extractSource = function extractSource(start, end) {
|
|
var nodeLines = this.lines.slice(start.line - 1, end.line);
|
|
nodeLines[0] = nodeLines[0].substring(start.column - 1);
|
|
var last = nodeLines.length - 1;
|
|
nodeLines[last] = nodeLines[last].substring(0, end.column);
|
|
return nodeLines.join('');
|
|
};
|
|
|
|
_proto.stylesheet = function stylesheet(node) {
|
|
var _this = this;
|
|
|
|
// Create and set parameters for Root node
|
|
var root = postcss.root();
|
|
root.source = {
|
|
start: node.start,
|
|
end: node.end,
|
|
input: this.input // Raws for root node
|
|
|
|
};
|
|
root.raws = {
|
|
semicolon: DEFAULT_RAWS_ROOT.semicolon,
|
|
before: DEFAULT_RAWS_ROOT.before // Store spaces before root (if exist)
|
|
|
|
};
|
|
this.raws = {
|
|
before: ''
|
|
};
|
|
node.content.forEach(function (contentNode) {
|
|
return _this.process(contentNode, root);
|
|
});
|
|
return root;
|
|
};
|
|
|
|
_proto.process = function process(node, parent) {
|
|
if (this[node.type]) return this[node.type](node, parent) || null;
|
|
return null;
|
|
};
|
|
|
|
_proto.ruleset = function ruleset(node, parent) {
|
|
var _this2 = this;
|
|
|
|
// Loop to find the deepest ruleset node
|
|
this.raws.multiRuleProp = '';
|
|
node.content.forEach(function (contentNode) {
|
|
switch (contentNode.type) {
|
|
case 'block':
|
|
{
|
|
// Create Rule node
|
|
var rule = postcss.rule();
|
|
rule.selector = ''; // Object to store raws for Rule
|
|
|
|
var ruleRaws = {
|
|
before: _this2.raws.before || DEFAULT_RAWS_RULE.before,
|
|
between: DEFAULT_RAWS_RULE.between // Variable to store spaces and symbols before declaration property
|
|
|
|
};
|
|
_this2.raws.before = '';
|
|
_this2.raws.comment = false; // Look up throw all nodes in current ruleset node
|
|
|
|
node.content.filter(function (content) {
|
|
return content.type === 'block';
|
|
}).forEach(function (innerContentNode) {
|
|
return _this2.process(innerContentNode, rule);
|
|
});
|
|
|
|
if (rule.nodes.length) {
|
|
// Write selector to Rule
|
|
rule.selector = _this2.extractSource(node.start, contentNode.start).slice(0, -1).replace(/\s+$/, function (spaces) {
|
|
ruleRaws.between = spaces;
|
|
return '';
|
|
}); // Set parameters for Rule node
|
|
|
|
rule.parent = parent;
|
|
rule.source = {
|
|
start: node.start,
|
|
end: node.end,
|
|
input: _this2.input
|
|
};
|
|
rule.raws = ruleRaws;
|
|
parent.nodes.push(rule);
|
|
}
|
|
|
|
break;
|
|
}
|
|
|
|
default:
|
|
}
|
|
});
|
|
};
|
|
|
|
_proto.block = function block(node, parent) {
|
|
var _this3 = this;
|
|
|
|
// If nested rules exist, wrap current rule in new rule node
|
|
if (this.raws.multiRule) {
|
|
if (this.raws.multiRulePropVariable) {
|
|
this.raws.multiRuleProp = "$" + this.raws.multiRuleProp;
|
|
}
|
|
|
|
var multiRule = Object.assign(postcss.rule(), {
|
|
source: {
|
|
start: {
|
|
line: node.start.line - 1,
|
|
column: node.start.column
|
|
},
|
|
end: node.end,
|
|
input: this.input
|
|
},
|
|
raws: {
|
|
before: this.raws.before || DEFAULT_RAWS_RULE.before,
|
|
between: DEFAULT_RAWS_RULE.between
|
|
},
|
|
parent: parent,
|
|
selector: (this.raws.customProperty ? '--' : '') + this.raws.multiRuleProp
|
|
});
|
|
parent.push(multiRule);
|
|
parent = multiRule;
|
|
}
|
|
|
|
this.raws.before = ''; // Looking for declaration node in block node
|
|
|
|
node.content.forEach(function (contentNode) {
|
|
return _this3.process(contentNode, parent);
|
|
});
|
|
|
|
if (this.raws.multiRule) {
|
|
this.raws.beforeMulti = this.raws.before;
|
|
}
|
|
};
|
|
|
|
_proto.declaration = function declaration(node, parent) {
|
|
var _this4 = this;
|
|
|
|
var isBlockInside = false; // Create Declaration node
|
|
|
|
var declarationNode = postcss.decl();
|
|
declarationNode.prop = ''; // Object to store raws for Declaration
|
|
|
|
var declarationRaws = Object.assign(declarationNode.raws, {
|
|
before: this.raws.before || DEFAULT_RAWS_DECL.before,
|
|
between: DEFAULT_RAWS_DECL.between,
|
|
semicolon: DEFAULT_RAWS_DECL.semicolon
|
|
});
|
|
this.raws.property = false;
|
|
this.raws.betweenBefore = false;
|
|
this.raws.comment = false; // Looking for property and value node in declaration node
|
|
|
|
node.content.forEach(function (contentNode) {
|
|
switch (contentNode.type) {
|
|
case 'customProperty':
|
|
_this4.raws.customProperty = true;
|
|
// fall through
|
|
|
|
case 'property':
|
|
{
|
|
/* this.raws.property to detect is property is already defined in current object */
|
|
_this4.raws.property = true;
|
|
_this4.raws.multiRuleProp = contentNode.content[0].content;
|
|
_this4.raws.multiRulePropVariable = contentNode.content[0].type === 'variable';
|
|
|
|
_this4.process(contentNode, declarationNode);
|
|
|
|
break;
|
|
}
|
|
|
|
case 'propertyDelimiter':
|
|
{
|
|
if (_this4.raws.property && !_this4.raws.betweenBefore) {
|
|
/* If property is already defined and there's no ':' before it */
|
|
declarationRaws.between += contentNode.content;
|
|
_this4.raws.multiRuleProp += contentNode.content;
|
|
} else {
|
|
/* If ':' goes before property declaration, like :width 100px */
|
|
_this4.raws.betweenBefore = true;
|
|
declarationRaws.before += contentNode.content;
|
|
_this4.raws.multiRuleProp += contentNode.content;
|
|
}
|
|
|
|
break;
|
|
}
|
|
|
|
case 'space':
|
|
{
|
|
declarationRaws.between += contentNode.content;
|
|
break;
|
|
}
|
|
|
|
case 'value':
|
|
{
|
|
// Look up for a value for current property
|
|
switch (contentNode.content[0].type) {
|
|
case 'block':
|
|
{
|
|
isBlockInside = true; // If nested rules exist
|
|
|
|
if (Array.isArray(contentNode.content[0].content)) {
|
|
_this4.raws.multiRule = true;
|
|
}
|
|
|
|
_this4.process(contentNode.content[0], parent);
|
|
|
|
break;
|
|
}
|
|
|
|
case 'variable':
|
|
{
|
|
declarationNode.value = '$';
|
|
|
|
_this4.process(contentNode, declarationNode);
|
|
|
|
break;
|
|
}
|
|
|
|
case 'color':
|
|
{
|
|
declarationNode.value = '#';
|
|
|
|
_this4.process(contentNode, declarationNode);
|
|
|
|
break;
|
|
}
|
|
|
|
case 'number':
|
|
{
|
|
if (contentNode.content.length > 1) {
|
|
declarationNode.value = contentNode.content.join('');
|
|
} else {
|
|
_this4.process(contentNode, declarationNode);
|
|
}
|
|
|
|
break;
|
|
}
|
|
|
|
case 'parentheses':
|
|
{
|
|
declarationNode.value = '(';
|
|
|
|
_this4.process(contentNode, declarationNode);
|
|
|
|
break;
|
|
}
|
|
|
|
default:
|
|
{
|
|
_this4.process(contentNode, declarationNode);
|
|
}
|
|
}
|
|
|
|
break;
|
|
}
|
|
|
|
default:
|
|
}
|
|
});
|
|
|
|
if (!isBlockInside) {
|
|
// Set parameters for Declaration node
|
|
declarationNode.source = {
|
|
start: node.start,
|
|
end: node.end,
|
|
input: this.input
|
|
};
|
|
declarationNode.parent = parent;
|
|
parent.nodes.push(declarationNode);
|
|
}
|
|
|
|
this.raws.before = '';
|
|
this.raws.customProperty = false;
|
|
this.raws.multiRuleProp = '';
|
|
this.raws.property = false;
|
|
};
|
|
|
|
_proto.customProperty = function customProperty(node, parent) {
|
|
this.property(node, parent);
|
|
parent.prop = "--" + parent.prop;
|
|
};
|
|
|
|
_proto.property = function property(node, parent) {
|
|
// Set property for Declaration node
|
|
switch (node.content[0].type) {
|
|
case 'variable':
|
|
{
|
|
parent.prop += '$';
|
|
break;
|
|
}
|
|
|
|
case 'interpolation':
|
|
{
|
|
this.raws.interpolation = true;
|
|
parent.prop += '#{';
|
|
break;
|
|
}
|
|
|
|
default:
|
|
}
|
|
|
|
parent.prop += node.content[0].content;
|
|
|
|
if (this.raws.interpolation) {
|
|
parent.prop += '}';
|
|
this.raws.interpolation = false;
|
|
}
|
|
};
|
|
|
|
_proto.value = function value(node, parent) {
|
|
if (!parent.value) {
|
|
parent.value = '';
|
|
} // Set value for Declaration node
|
|
|
|
|
|
if (node.content.length) {
|
|
node.content.forEach(function (contentNode) {
|
|
switch (contentNode.type) {
|
|
case 'important':
|
|
{
|
|
parent.raws.important = contentNode.content;
|
|
parent.important = true;
|
|
var match = parent.value.match(/^(.*?)(\s*)$/);
|
|
|
|
if (match) {
|
|
parent.raws.important = match[2] + parent.raws.important;
|
|
parent.value = match[1];
|
|
}
|
|
|
|
break;
|
|
}
|
|
|
|
case 'parentheses':
|
|
{
|
|
parent.value += contentNode.content.join('') + ')';
|
|
break;
|
|
}
|
|
|
|
case 'percentage':
|
|
{
|
|
parent.value += contentNode.content.join('') + '%';
|
|
break;
|
|
}
|
|
|
|
default:
|
|
{
|
|
if (contentNode.content.constructor === Array) {
|
|
parent.value += contentNode.content.join('');
|
|
} else {
|
|
parent.value += contentNode.content;
|
|
}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
};
|
|
|
|
_proto.singlelineComment = function singlelineComment(node, parent) {
|
|
return this.comment(node, parent, true);
|
|
};
|
|
|
|
_proto.multilineComment = function multilineComment(node, parent) {
|
|
return this.comment(node, parent, false);
|
|
};
|
|
|
|
_proto.comment = function comment(node, parent, inline) {
|
|
// https://github.com/nodesecurity/eslint-plugin-security#detect-unsafe-regex
|
|
// eslint-disable-next-line security/detect-unsafe-regex
|
|
var text = node.content.match(/^(\s*)((?:\S[\S\s]*?)?)(\s*)$/);
|
|
this.raws.comment = true;
|
|
var comment = Object.assign(postcss.comment(), {
|
|
text: text[2],
|
|
raws: {
|
|
before: this.raws.before || DEFAULT_COMMENT_DECL.before,
|
|
left: text[1],
|
|
right: text[3],
|
|
inline: inline
|
|
},
|
|
source: {
|
|
start: {
|
|
line: node.start.line,
|
|
column: node.start.column
|
|
},
|
|
end: node.end,
|
|
input: this.input
|
|
},
|
|
parent: parent
|
|
});
|
|
|
|
if (this.raws.beforeMulti) {
|
|
comment.raws.before += this.raws.beforeMulti;
|
|
this.raws.beforeMulti = undefined;
|
|
}
|
|
|
|
parent.nodes.push(comment);
|
|
this.raws.before = '';
|
|
};
|
|
|
|
_proto.space = function space(node, parent) {
|
|
// Spaces before root and rule
|
|
switch (parent.type) {
|
|
case 'root':
|
|
{
|
|
this.raws.before += node.content;
|
|
break;
|
|
}
|
|
|
|
case 'rule':
|
|
{
|
|
if (this.raws.comment) {
|
|
this.raws.before += node.content;
|
|
} else if (this.raws.loop) {
|
|
parent.selector += node.content;
|
|
} else {
|
|
this.raws.before = (this.raws.before || '\n') + node.content;
|
|
}
|
|
|
|
break;
|
|
}
|
|
|
|
default:
|
|
}
|
|
};
|
|
|
|
_proto.declarationDelimiter = function declarationDelimiter(node) {
|
|
this.raws.before += node.content;
|
|
};
|
|
|
|
_proto.loop = function loop(node, parent) {
|
|
var _this5 = this;
|
|
|
|
var loop = postcss.rule();
|
|
this.raws.comment = false;
|
|
this.raws.multiRule = false;
|
|
this.raws.loop = true;
|
|
loop.selector = '';
|
|
loop.raws = {
|
|
before: this.raws.before || DEFAULT_RAWS_RULE.before,
|
|
between: DEFAULT_RAWS_RULE.between
|
|
};
|
|
|
|
if (this.raws.beforeMulti) {
|
|
loop.raws.before += this.raws.beforeMulti;
|
|
this.raws.beforeMulti = undefined;
|
|
}
|
|
|
|
node.content.forEach(function (contentNode, i) {
|
|
if (node.content[i + 1] && node.content[i + 1].type === 'block') {
|
|
_this5.raws.loop = false;
|
|
}
|
|
|
|
_this5.process(contentNode, loop);
|
|
});
|
|
parent.nodes.push(loop);
|
|
this.raws.loop = false;
|
|
};
|
|
|
|
_proto.atrule = function atrule(node, parent) {
|
|
var _this6 = this;
|
|
|
|
// Skip unsupported @xxx rules
|
|
var supportedNode = node.content[0].content.some(function (contentNode) {
|
|
return SUPPORTED_AT_KEYWORDS.includes(contentNode.content);
|
|
});
|
|
if (!supportedNode) return;
|
|
var atrule = postcss.rule();
|
|
atrule.selector = '';
|
|
atrule.raws = {
|
|
before: this.raws.before || DEFAULT_RAWS_RULE.before,
|
|
between: DEFAULT_RAWS_RULE.between
|
|
};
|
|
node.content.forEach(function (contentNode, i) {
|
|
if (contentNode.type === 'space') {
|
|
var prevNodeType = node.content[i - 1].type;
|
|
|
|
switch (prevNodeType) {
|
|
case 'atkeyword':
|
|
case 'ident':
|
|
atrule.selector += contentNode.content;
|
|
break;
|
|
|
|
default:
|
|
}
|
|
|
|
return;
|
|
}
|
|
|
|
_this6.process(contentNode, atrule);
|
|
});
|
|
parent.nodes.push(atrule);
|
|
};
|
|
|
|
_proto.parentheses = function parentheses(node, parent) {
|
|
parent.selector += '(';
|
|
node.content.forEach(function (contentNode) {
|
|
if (typeof contentNode.content === 'string') {
|
|
parent.selector += contentNode.content;
|
|
}
|
|
|
|
if (typeof contentNode.content === 'object') {
|
|
contentNode.content.forEach(function (childrenContentNode) {
|
|
if (contentNode.type === 'variable') parent.selector += '$';
|
|
parent.selector += childrenContentNode.content;
|
|
});
|
|
}
|
|
});
|
|
parent.selector += ')';
|
|
};
|
|
|
|
_proto.interpolation = function interpolation(node, parent) {
|
|
var _this7 = this;
|
|
|
|
parent.selector += '#{';
|
|
node.content.forEach(function (contentNode) {
|
|
_this7.process(contentNode, parent);
|
|
});
|
|
parent.selector += '}';
|
|
};
|
|
|
|
_proto.atkeyword = function atkeyword(node, parent) {
|
|
parent.selector += "@" + node.content;
|
|
};
|
|
|
|
_proto.operator = function operator(node, parent) {
|
|
parent.selector += node.content;
|
|
};
|
|
|
|
_proto.variable = function variable(node, parent) {
|
|
if (this.raws.loop) {
|
|
parent.selector += "$" + node.content[0].content;
|
|
return;
|
|
}
|
|
|
|
parent.selector += "$" + node.content;
|
|
};
|
|
|
|
_proto.ident = function ident(node, parent) {
|
|
parent.selector += node.content;
|
|
};
|
|
|
|
return SassParser;
|
|
}();
|
|
|
|
module.exports = SassParser;
|
|
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhcnNlci5lczYiXSwibmFtZXMiOlsicG9zdGNzcyIsInJlcXVpcmUiLCJnb256YWxlcyIsIkRFRkFVTFRfUkFXU19ST09UIiwiYmVmb3JlIiwiREVGQVVMVF9SQVdTX1JVTEUiLCJiZXR3ZWVuIiwiREVGQVVMVF9SQVdTX0RFQ0wiLCJzZW1pY29sb24iLCJERUZBVUxUX0NPTU1FTlRfREVDTCIsIlNVUFBPUlRFRF9BVF9LRVlXT1JEUyIsIlNhc3NQYXJzZXIiLCJpbnB1dCIsInBhcnNlIiwibm9kZSIsImNzcyIsInN5bnRheCIsImVycm9yIiwibWVzc2FnZSIsImxpbmUiLCJsaW5lcyIsIm1hdGNoIiwicm9vdCIsInN0eWxlc2hlZXQiLCJleHRyYWN0U291cmNlIiwic3RhcnQiLCJlbmQiLCJub2RlTGluZXMiLCJzbGljZSIsInN1YnN0cmluZyIsImNvbHVtbiIsImxhc3QiLCJsZW5ndGgiLCJqb2luIiwic291cmNlIiwicmF3cyIsImNvbnRlbnQiLCJmb3JFYWNoIiwiY29udGVudE5vZGUiLCJwcm9jZXNzIiwicGFyZW50IiwidHlwZSIsInJ1bGVzZXQiLCJtdWx0aVJ1bGVQcm9wIiwicnVsZSIsInNlbGVjdG9yIiwicnVsZVJhd3MiL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gICAgICAgdGhpcy5yYXdzLmJlZm9yZSA9ICcnXG4gICAgICAgICAgdGhpcy5yYXdzLmNvbW1lbnQgPSBmYWxzZVxuXG4gICAgICAgICAgLy8gTG9vayB1cCB0aHJvdyBhbGwgbm9kZXMgaW4gY3VycmVudCBydWxlc2V0IG5vZGVcbiAgICAgICAgICBub2RlLmNvbnRlbnRcbiAgICAgICAgICAgIC5maWx0ZXIoY29udGVudCA9PiBjb250ZW50LnR5cGUgPT09ICdibG9jaycpXG4gICAgICAgICAgICAuZm9yRWFjaChpbm5lckNvbnRlbnROb2RlID0+IHRoaXMucHJvY2Vzcyhpbm5lckNvbnRlbnROb2RlLCBydWxlKSlcblxuICAgICAgICAgIGlmIChydWxlLm5vZGVzLmxlbmd0aCkge1xuICAgICAgICAgICAgLy8gV3JpdGUgc2VsZWN0b3IgdG8gUnVsZVxuICAgICAgICAgICAgcnVsZS5zZWxlY3RvciA9IHRoaXMuZXh0cmFjdFNvdXJjZShcbiAgICAgICAgICAgICAgbm9kZS5zdGFydCxcbiAgICAgICAgICAgICAgY29udGVudE5vZGUuc3RhcnRcbiAgICAgICAgICAgICkuc2xpY2UoMCwgLTEpLnJlcGxhY2UoL1xccyskLywgc3BhY2VzID0+IHtcbiAgICAgICAgICAgICAgcnVsZVJhd3MuYmV0d2VlbiA9IHNwYWNlc1xuICAgICAgICAgICAgICByZXR1cm4gJydcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAvLyBTZXQgcGFyYW1ldGVycyBmb3IgUnVsZSBub2RlXG4gICAgICAgICAgICBydWxlLnBhcmVudCA9IHBhcmVudFxuICAgICAgICAgICAgcnVsZS5zb3VyY2UgPSB7XG4gICAgICAgICAgICAgIHN0YXJ0OiBub2RlLnN0YXJ0LFxuICAgICAgICAgICAgICBlbmQ6IG5vZGUuZW5kLFxuICAgICAgICAgICAgICBpbnB1dDogdGhpcy5pbnB1dFxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcnVsZS5yYXdzID0gcnV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JZiBwcm9wZXJ0eSBpcyBhbHJlYWR5IGRlZmluZWQgYW5kIHRoZXJlJ3Mgbm8gJzonIGJlZm9yZSBpdCAqL1xuICAgICAgICAgICAgZGVjbGFyYXRpb25SYXdzLmJldHdlZW4gKz0gY29udGVudE5vZGUuY29udGVudFxuICAgICAgICAgICAgdGhpcy5yYXdzLm11bHRpUnVsZVByb3AgKz0gY29udGVudE5vZGUuY29udGVudFxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAvKiBJZiAnOicgZ29lcyBiZWZvcmUgcHJvcGVydHkgZGVjbGFyYXRpb24sIGxpa2UgOndpZHRoIDEwMHB4ICovXG4gICAgICAgICAgICB0aGlzLnJhd3MuYmV0d2VlbkJlZm9yZSA9IHRydWVcbiAgICAgICAgICAgIGRlY2xhcmF0aW9uUmF3cy5iZWZvcmUgKz0gY29udGVudE5vZGUuY29udGVudFxuICAgICAgICAgICAgdGhpcy5yYXdzLm11bHRpUnVsZVByb3AgKz0gY29udGVudE5vZGUuY29udGVudFxuICAgICAgICAgIH1cbiAgICAgICAgICBicmVha1xuICAgICAgICB9XG4gICAgICAgIGNhc2UgJ3NwYWNlJzoge1xuICAgICAgICAgIGRlY2xhcmF0aW9uUmF3cy5iZXR3ZWVuICs9IGNvbnRlbnROb2RlLmNvbnRlbnRcbiAgICAgICAgICBicmVha1xuICAgICAgICB9XG4gICAgICAgIGNhc2UgJ3ZhbHVlJzoge1xuICAgICAgICAgIC8vIExvb2sgdXAgZm9yIGEgdmFsdWUgZm9yIGN1cnJlbnQgcHJvcGVydHlcbiAgICAgICAgICBzd2l0Y2ggKGNvbnRlbnROb2RlLmNvbnRlbnRbMF0udHlwZSkge1xuICAgICAgICAgICAgY2FzZSAnYmxvY2snOiB7XG4gICAgICAgICAgICAgIGlzQmxvY2tJbnNpZGUgPSB0cnVlXG4gICAgICAgICAgICAgIC8vIElmIG5lc3RlZCBydWxlcyBleGlzdFxuICAgICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShjb250ZW50Tm9kZS5jb250ZW50WzBdLmNvbnRlbnQpKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5yYXdzLm11bHRpUnVsZSA9IHRydWVcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB0aGlzLnByb2Nlc3MoY29udGVudE5vZGUuY29udGVudFswXSwgcGFyZW50KVxuICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSAndmFyaWFibGUnOiB7XG4gICAgICAgICAgICAgIGRlY2xhcmF0aW9uTm9kZS52YWx1ZSA9ICckJ1xuICAgICAgICAgICAgICB0aGlzLnByb2Nlc3MoY29udGVudE5vZGUsIGRlY2xhcmF0aW9uTm9kZSlcbiAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgJ2NvbG9yJzoge1xuICAgICAgICAgICAgICBkZWNsYXJhdGlvbk5vZGUudmFsdWUgPSAnIydcbiAgICAgICAgICAgICAgdGhpcy5wcm9jZXNzKGNvbnRlbnROb2RlLCBkZWNsYXJhdGlvbk5vZGUpXG4gICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlICdudW1iZXInOiB7XG4gICAgICAgICAgICAgIGlmIChjb250ZW50Tm9kZS5jb250ZW50Lmxlbmd0aCA+IDEpIHtcbiAgICAgICAgICAgICAgICBkZWNsYXJhdGlvbk5vZGUudmFsdWUgPSBjb250ZW50Tm9kZS5jb250ZW50LmpvaW4oJycpXG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5wcm9jZXNzKGNvbnRlbnROb2RlLCBkZWNsYXJhdGlvbk5vZGUpXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgJ3BhcmVudGhlc2VzJzoge1xuICAgICAgICAgICAgICB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1wb3J0YW50ID0gdHJ1ZVxuICAgICAgICAgICAgbGV0IG1hdGNoID0gcGFyZW50LnZhbHVlLm1hdGNoKC9eKC4qPykoXFxzKikkLylcbiAgICAgICAgICAgIGlmIChtYXRjaCkge1xuICAgICAgICAgICAgICBwYXJlbnQucmF3cy5pbXBvcnRhbnQgPSBtYXRjaFsyXSArIHBhcmVudC5yYXdzLmltcG9ydGFudFxuICAgICAgICAgICAgICBwYXJlbnQudmFsdWUgPSBtYXRjaFsxXVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSAncGFyZW50aGVzZXMnOiB7XG4gICAgICAgICAgICBwYXJlbnQudmFsdWUgKz0gY29udGVudE5vZGUuY29udGVudC5qb2luKCcnKSArICcpJ1xuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSAncGVyY2VudGFnZSc6IHtcbiAgICAgICAgICAgIHBhcmVudC52YWx1ZSArPSBjb250ZW50Tm9kZS5jb250ZW50LmpvaW4oJycpICsgJyUnXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBkZWZhdWx0OiB7XG4gICAgICAgICAgICBpZiAoY29udGVudE5vZGUuY29udGVudC5jb25zdHJ1Y3RvciA9PT0gQXJyYXkpIHtcbiAgICAgICAgICAgICAgcGFyZW50LnZhbHVlICs9IGNvbnRlbnROb2RlLmNvbnRlbnQuam9pbignJylcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHBhcmVudC52YWx1ZSArPSBjb250ZW50Tm9kZS5jb250ZW50XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KVxuICAgIH1cbiAgfVxuXG4gIHNpbmdsZWxpbmVDb21tZW50IChub2RlLCBwYXJlbnQpIHtcbiAgICByZXR1cm4gdGhpcy5jb21tZW50KG5vZGUsIHBhcmVudCwgdHJ1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zdHJpbmcnKSB7XG4gICAgICAgIHBhcmVudC5zZWxlY3RvciArPSBjb250ZW50Tm9kZS5jb250ZW50XG4gICAgICB9XG5cbiAgICAgIGlmICh0eXBlb2YgY29udGVudE5vZGUuY29udGVudCA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgY29udGVudE5vZGUuY29udGVudC5mb3JFYWNoKGNoaWxkcmVuQ29udGVudE5vZGUgPT4ge1xuICAgICAgICAgIGlmIChjb250ZW50Tm9kZS50eXBlID09PSAndmFyaWFibGUnKSBwYXJlbnQuc2VsZWN0b3IgKz0gJyQnXG4gICAgICAgICAgcGFyZW50LnNlbGVjdG9yICs9IGNoaWxkcmVuQ29udGVudE5vZGUuY29udGVudFxuICAgICAgICB9KVxuICAgICAgfVxuICAgIH0pXG4gICAgcGFyZW50LnNlbGVjdG9yICs9ICcpJ1xuICB9XG5cbiAgaW50ZXJwb2xhdGlvbiAobm9kZSwgcGFyZW50KSB7XG4gICAgcGFyZW50LnNlbGVjdG9yICs9ICcjeydcbiAgICBub2RlLmNvbnRlbnQuZm9yRWFjaChjb250ZW50Tm9kZSA9PiB7XG4gICAgICB0aGlzLnByb2Nlc3MoY29udGVudE5vZGUsIHBhcmVudClcbiAgICB9KVxuICAgIHBhcmVudC5zZWxlY3RvciArPSAnfSdcbiAgfVxuXG4gIGF0a2V5d29yZCAobm9kZSwgcGFyZW50KSB7XG4gICAgcGFyZW50LnNlbGVjdG9yICs9IGBAJHsgbm9kZS5jb250ZW50IH1gXG4gIH1cblxuICBvcGVyYXRvciAobm9kZSwgcGFyZW50KSB7XG4gICAgcGFyZW50LnNlbGVjdG9yICs9IG5vZGUuY29udGVudFxuICB9XG5cbiAgdmFyaWFibGUgKG5vZGUsIHBhcmVudCkge1xuICAgIGlmICh0aGlzLnJhd3MubG9vcCkge1xuICAgICAgcGFyZW50LnNlbGVjdG9yICs9IGAkJHsgbm9kZS5jb250ZW50WzBdLmNvbnRlbnQgfWBcbiAgICAgIHJldHVyblxuICAg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