in templates/legacy/windows-admin-center-extension-template/gulps/gulp-svg-code/svg-code-convert.js [38:84]
var _loop_1 = function (key) {
var content = current[key];
segments.push(key);
if (typeof content === 'object') {
var segs = segments.slice(0);
nested.push({ content: content, segs: segs });
}
else if (typeof content === 'string') {
var cssName = '.svg-' + segments.join('--');
this_1.outputCss.push(cssName + ' {\r\n');
this_1.outputCss.push(this_1.indent(1) + 'background-image: url("data:image/svg+xml;');
this_1.outputTs.push(this_1.indent(segments.length) + 'export const ' + key + ' = \'');
var lines = content.split('\r');
var svg_1 = '';
lines.forEach(function (value, index, array) {
value = value.replace('\n', '');
if (value && value.length > 1) {
var skip = false;
for (var _i = 0, ignores_1 = ignores; _i < ignores_1.length; _i++) {
var item = ignores_1[_i];
if (value.indexOf(item) >= 0) {
skip = true;
break;
}
}
if (!skip) {
svg_1 += value;
// this.outputCss.push(value);
_this.outputTs.push(value);
}
}
});
svg_1 = this_1.replaceAll(svg_1, '"', '\'');
svg_1 = this_1.replaceAll(svg_1, '%', '%25');
svg_1 = this_1.replaceAll(svg_1, '#', '%23');
svg_1 = this_1.replaceAll(svg_1, '{', '%7B');
svg_1 = this_1.replaceAll(svg_1, '}', '%7D');
svg_1 = this_1.replaceAll(svg_1, '<', '%3C');
svg_1 = this_1.replaceAll(svg_1, '>', '%3E');
this_1.outputCss.push('charset=utf8,' + svg_1);
this_1.outputCss.push('");\r\n');
this_1.outputCss.push('}\r\n');
this_1.outputCss.push('\r\n');
this_1.outputTs.push('\';\r\n');
}
segments.pop();
};