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,CAAC,CAAC;YACpB,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;YACxB,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;YACpB,OAAO,IAAI,cAAY,CAAC,CAAC,IAAI,kBAAY,CAAC,CAAC,MAAM,GAAG,CAAC,YAAM,MAAM,CAAC,IAAI,CAAC,IAAI,CAAG,CAAC;SAClF;QACD,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,OAAO,IAAI,OAAO,CAAC,QAAQ,IAAI,CAAC,CAAC,EAAE;YACjD,OAAO,IAAI,oBAAkB,CAAC,CAAC,KAAO,CAAC;SAC1C;QACD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;IAED,SAAS,KAAK,CAAC,CAAC,EAAE,QAAQ;QACtB,IAAI,CAAC,OAAO,CAAC,cAAc,IAAI,OAAO,CAAC,cAAc,KAAK,MAAM,EAAE;YAC9D,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;SAC1B;aAAM,IAAI,OAAO,CAAC,cAAc,KAAK,SAAS,EAAE;YAC7C,YAAY,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;SAC7B;aAAM,IAAI,OAAO,OAAO,CAAC,cAAc,KAAK,UAAU,EAAE;YACrD,OAAO,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC;SAC9C;IACL,CAAC;IAED,OAAO;QACH,GAAG,EAAE,KAAK;QACV,MAAM,EAAE,WAAW;KACtB,CAAC;AACN,CAAC,EAAC","sourcesContent":["import * as utils from './utils';\nimport browser from './browser';\n\nexport default (window, less, options) => {\n\n function errorHTML(e, rootHref) {\n const id = `less-error-message:${utils.extractId(rootHref || '')}`;\n const template = '
{content}
in ${filenameNoPath} `;\n\n const errorline = (e, i, classname) => {\n if (e.extract[i] !== undefined) {\n errors.push(template.replace(/\\{line\\}/, (parseInt(e.line, 10) || 0) + (i - 1))\n .replace(/\\{class\\}/, classname)\n .replace(/\\{content\\}/, e.extract[i]));\n }\n };\n\n if (e.line) {\n errorline(e, 0, '');\n errorline(e, 1, 'line');\n errorline(e, 2, '');\n content += `on line ${e.line}, column ${e.column + 1}: