Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.112
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
html_old /
iNetty /
node_modules /
svgo /
lib /
Delete
Unzip
Name
Size
Permission
Date
Action
svgo
[ DIR ]
drwxr-xr-x
2022-04-21 14:33
css-tools.js
6.35
KB
-rw-r--r--
2022-04-21 14:30
parser.js
6.37
KB
-rw-r--r--
2022-04-21 14:30
path.js
8.21
KB
-rw-r--r--
2022-04-21 14:30
stringifier.js
7.76
KB
-rw-r--r--
2022-04-21 14:30
style.js
7.82
KB
-rw-r--r--
2022-04-21 14:30
svgo-node.js
2.74
KB
-rw-r--r--
2022-04-21 14:30
svgo.js
2.34
KB
-rw-r--r--
2022-04-21 14:30
types.ts
3.07
KB
-rw-r--r--
2022-04-21 14:30
xast.js
2.69
KB
-rw-r--r--
2022-04-21 14:30
Save
Rename
'use strict'; const { defaultPlugins, resolvePluginConfig, extendDefaultPlugins, } = require('./svgo/config.js'); const { parseSvg } = require('./parser.js'); const { stringifySvg } = require('./stringifier.js'); const { invokePlugins } = require('./svgo/plugins.js'); const JSAPI = require('./svgo/jsAPI.js'); const { encodeSVGDatauri } = require('./svgo/tools.js'); exports.extendDefaultPlugins = extendDefaultPlugins; const optimize = (input, config) => { if (config == null) { config = {}; } if (typeof config !== 'object') { throw Error('Config should be an object'); } const maxPassCount = config.multipass ? 10 : 1; let prevResultSize = Number.POSITIVE_INFINITY; let svgjs = null; const info = {}; if (config.path != null) { info.path = config.path; } for (let i = 0; i < maxPassCount; i += 1) { info.multipassCount = i; // TODO throw this error in v3 try { svgjs = parseSvg(input, config.path); } catch (error) { return { error: error.toString(), modernError: error }; } if (svgjs.error != null) { if (config.path != null) { svgjs.path = config.path; } return svgjs; } const plugins = config.plugins || defaultPlugins; if (Array.isArray(plugins) === false) { throw Error( "Invalid plugins list. Provided 'plugins' in config should be an array." ); } const resolvedPlugins = plugins.map(resolvePluginConfig); const globalOverrides = {}; if (config.floatPrecision != null) { globalOverrides.floatPrecision = config.floatPrecision; } svgjs = invokePlugins(svgjs, info, resolvedPlugins, null, globalOverrides); svgjs = stringifySvg(svgjs, config.js2svg); if (svgjs.data.length < prevResultSize) { input = svgjs.data; prevResultSize = svgjs.data.length; } else { if (config.datauri) { svgjs.data = encodeSVGDatauri(svgjs.data, config.datauri); } if (config.path != null) { svgjs.path = config.path; } return svgjs; } } return svgjs; }; exports.optimize = optimize; /** * The factory that creates a content item with the helper methods. * * @param {Object} data which is passed to jsAPI constructor * @returns {JSAPI} content item */ const createContentItem = (data) => { return new JSAPI(data); }; exports.createContentItem = createContentItem;