HEX
Server: LiteSpeed
System: Linux w5304130.sdnsbox.com 4.18.0-425.3.1.lve.el8.x86_64 #1 SMP Tue Nov 22 22:59:23 EST 2022 x86_64
User: makefitmeserver (1001)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: //usr/local/lib/node_modules/less/lib/less/tree/debug-info.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * @deprecated The dumpLineNumbers option is deprecated. Use sourcemaps instead.
 * This will be removed in a future version.
 *
 * @param {Object} ctx - Context object with debugInfo
 * @returns {string} Debug info as CSS comment
 */
function asComment(ctx) {
    return "/* line ".concat(ctx.debugInfo.lineNumber, ", ").concat(ctx.debugInfo.fileName, " */\n");
}
/**
 * @deprecated The dumpLineNumbers option is deprecated. Use sourcemaps instead.
 * This function generates Sass-compatible debug info using @media -sass-debug-info syntax.
 * This format had short-lived usage and is no longer recommended.
 * This will be removed in a future version.
 *
 * @param {Object} ctx - Context object with debugInfo
 * @returns {string} Sass-compatible debug info as @media query
 */
function asMediaQuery(ctx) {
    var filenameWithProtocol = ctx.debugInfo.fileName;
    if (!/^[a-z]+:\/\//i.test(filenameWithProtocol)) {
        filenameWithProtocol = "file://".concat(filenameWithProtocol);
    }
    return "@media -sass-debug-info{filename{font-family:".concat(filenameWithProtocol.replace(/([.:/\\])/g, function (a) {
        if (a == '\\') {
            a = '/';
        }
        return "\\".concat(a);
    }), "}line{font-family:\\00003").concat(ctx.debugInfo.lineNumber, "}}\n");
}
/**
 * Generates debug information (line numbers) for CSS output.
 *
 * @param {Object} context - Context object with dumpLineNumbers option
 * @param {Object} ctx - Context object with debugInfo
 * @param {string} [lineSeparator] - Separator between comment and media query (for 'all' mode)
 * @returns {string} Debug info string
 *
 * @deprecated The dumpLineNumbers option is deprecated. Use sourcemaps instead.
 * All modes ('comments', 'mediaquery', 'all') are deprecated and will be removed in a future version.
 * The 'mediaquery' and 'all' modes generate Sass-compatible @media -sass-debug-info output
 * which had short-lived usage and is no longer recommended.
 */
function debugInfo(context, ctx, lineSeparator) {
    var result = '';
    if (context.dumpLineNumbers && !context.compress) {
        switch (context.dumpLineNumbers) {
            case 'comments':
                result = asComment(ctx);
                break;
            case 'mediaquery':
                result = asMediaQuery(ctx);
                break;
            case 'all':
                result = asComment(ctx) + (lineSeparator || '') + asMediaQuery(ctx);
                break;
        }
    }
    return result;
}
exports.default = debugInfo;
//# sourceMappingURL=debug-info.js.map