AnonSec Shell
Server IP : 185.86.78.101  /  Your IP : 216.73.216.124
Web Server : Apache
System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /www/wwwroot/mifepriston.org/node_modules/postcss-reduce-idents/dist/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /www/wwwroot/mifepriston.org/node_modules/postcss-reduce-idents/dist/lib/counter.js
"use strict";

exports.__esModule = true;

var _postcssValueParser = require("postcss-value-parser");

var _postcssValueParser2 = _interopRequireDefault(_postcssValueParser);

var _cache = require("./cache");

var _cache2 = _interopRequireDefault(_cache);

var _isNum = require("./isNum");

var _isNum2 = _interopRequireDefault(_isNum);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var RESERVED_KEYWORDS = ["unset", "initial", "inherit", "none"];

var cache = {};
var declOneCache = [];
var declTwoCache = [];

exports.default = {
    collect: function collect(node, encoder) {
        var prop = node.prop,
            type = node.type;


        if (type !== 'decl') {
            return;
        }

        if (/counter-(reset|increment)/.test(prop)) {
            node.value = (0, _postcssValueParser2.default)(node.value).walk(function (child) {
                if (child.type === 'word' && !(0, _isNum2.default)(child) && RESERVED_KEYWORDS.indexOf(child.value) === -1) {
                    (0, _cache2.default)(child.value, encoder, cache);
                    child.value = cache[child.value].ident;
                }

                if (child.type === 'space') {
                    child.value = ' ';
                }
            });
            declOneCache.push(node);
        } else if (/content/.test(prop)) {
            declTwoCache.push(node);
        }
    },
    transform: function transform() {
        declTwoCache.forEach(function (decl) {
            decl.value = (0, _postcssValueParser2.default)(decl.value).walk(function (node) {
                var type = node.type,
                    value = node.value;

                if (type === 'function' && (value === 'counter' || value === 'counters')) {
                    (0, _postcssValueParser.walk)(node.nodes, function (child) {
                        if (child.type === 'word' && child.value in cache) {
                            cache[child.value].count++;
                            child.value = cache[child.value].ident;
                        } else if (child.type === 'div') {
                            child.before = child.after = '';
                        }
                    });
                }
                if (type === 'space') {
                    node.value = ' ';
                }
                return false;
            }).toString();
        });
        declOneCache.forEach(function (decl) {
            decl.value = decl.value.walk(function (node) {
                if (node.type === 'word' && !(0, _isNum2.default)(node)) {
                    Object.keys(cache).forEach(function (key) {
                        var cached = cache[key];
                        if (cached.ident === node.value && !cached.count) {
                            node.value = key;
                        }
                    });
                }
            }).toString();
        });

        // reset cache after transform
        cache = {};
        declOneCache = [];
        declTwoCache = [];
    }
};
module.exports = exports["default"];

Anon7 - 2022
AnonSec Team