new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1,134 @@
|
||||
var _fs
|
||||
try {
|
||||
_fs = require('graceful-fs')
|
||||
} catch (_) {
|
||||
_fs = require('fs')
|
||||
}
|
||||
|
||||
function readFile (file, options, callback) {
|
||||
if (callback == null) {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
|
||||
if (typeof options === 'string') {
|
||||
options = {encoding: options}
|
||||
}
|
||||
|
||||
options = options || {}
|
||||
var fs = options.fs || _fs
|
||||
|
||||
var shouldThrow = true
|
||||
if ('throws' in options) {
|
||||
shouldThrow = options.throws
|
||||
}
|
||||
|
||||
fs.readFile(file, options, function (err, data) {
|
||||
if (err) return callback(err)
|
||||
|
||||
data = stripBom(data)
|
||||
|
||||
var obj
|
||||
try {
|
||||
obj = JSON.parse(data, options ? options.reviver : null)
|
||||
} catch (err2) {
|
||||
if (shouldThrow) {
|
||||
err2.message = file + ': ' + err2.message
|
||||
return callback(err2)
|
||||
} else {
|
||||
return callback(null, null)
|
||||
}
|
||||
}
|
||||
|
||||
callback(null, obj)
|
||||
})
|
||||
}
|
||||
|
||||
function readFileSync (file, options) {
|
||||
options = options || {}
|
||||
if (typeof options === 'string') {
|
||||
options = {encoding: options}
|
||||
}
|
||||
|
||||
var fs = options.fs || _fs
|
||||
|
||||
var shouldThrow = true
|
||||
if ('throws' in options) {
|
||||
shouldThrow = options.throws
|
||||
}
|
||||
|
||||
try {
|
||||
var content = fs.readFileSync(file, options)
|
||||
content = stripBom(content)
|
||||
return JSON.parse(content, options.reviver)
|
||||
} catch (err) {
|
||||
if (shouldThrow) {
|
||||
err.message = file + ': ' + err.message
|
||||
throw err
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function stringify (obj, options) {
|
||||
var spaces
|
||||
var EOL = '\n'
|
||||
if (typeof options === 'object' && options !== null) {
|
||||
if (options.spaces) {
|
||||
spaces = options.spaces
|
||||
}
|
||||
if (options.EOL) {
|
||||
EOL = options.EOL
|
||||
}
|
||||
}
|
||||
|
||||
var str = JSON.stringify(obj, options ? options.replacer : null, spaces)
|
||||
|
||||
return str.replace(/\n/g, EOL) + EOL
|
||||
}
|
||||
|
||||
function writeFile (file, obj, options, callback) {
|
||||
if (callback == null) {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
options = options || {}
|
||||
var fs = options.fs || _fs
|
||||
|
||||
var str = ''
|
||||
try {
|
||||
str = stringify(obj, options)
|
||||
} catch (err) {
|
||||
// Need to return whether a callback was passed or not
|
||||
if (callback) callback(err, null)
|
||||
return
|
||||
}
|
||||
|
||||
fs.writeFile(file, str, options, callback)
|
||||
}
|
||||
|
||||
function writeFileSync (file, obj, options) {
|
||||
options = options || {}
|
||||
var fs = options.fs || _fs
|
||||
|
||||
var str = stringify(obj, options)
|
||||
// not sure if fs.writeFileSync returns anything, but just in case
|
||||
return fs.writeFileSync(file, str, options)
|
||||
}
|
||||
|
||||
function stripBom (content) {
|
||||
// we do this because JSON.parse would convert it to a utf8 string if encoding wasn't specified
|
||||
if (Buffer.isBuffer(content)) content = content.toString('utf8')
|
||||
content = content.replace(/^\uFEFF/, '')
|
||||
return content
|
||||
}
|
||||
|
||||
var jsonfile = {
|
||||
readFile: readFile,
|
||||
readFileSync: readFileSync,
|
||||
writeFile: writeFile,
|
||||
writeFileSync: writeFileSync
|
||||
}
|
||||
|
||||
module.exports = jsonfile
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,102 @@
|
||||
{
|
||||
"name": "svelte-i18n",
|
||||
"version": "3.6.0",
|
||||
"main": "dist/runtime.cjs.js",
|
||||
"module": "dist/runtime.esm.js",
|
||||
"types": "dist/runtime.d.ts",
|
||||
"bin": {
|
||||
"svelte-i18n": "dist/cli.js"
|
||||
},
|
||||
"license": "MIT",
|
||||
"description": "Internationalization library for Svelte",
|
||||
"author": "Christian Kaisermann <christian@kaisermann.me>",
|
||||
"repository": "https://github.com/kaisermann/svelte-i18n",
|
||||
"keywords": [
|
||||
"svelte",
|
||||
"i18n",
|
||||
"internationalization",
|
||||
"localization",
|
||||
"translation"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 16"
|
||||
},
|
||||
"volta": {
|
||||
"node": "16.0.0"
|
||||
},
|
||||
"files": [
|
||||
"dist/"
|
||||
],
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{ts,js}": [
|
||||
"eslint --fix",
|
||||
"prettier --write"
|
||||
],
|
||||
"*.json": [
|
||||
"prettier --write"
|
||||
]
|
||||
},
|
||||
"peerDependencies": {
|
||||
"svelte": "^3.25.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.20.2",
|
||||
"@babel/preset-env": "^7.20.2",
|
||||
"@kiwi/eslint-config": "^1.19.5",
|
||||
"@kiwi/prettier-config": "^1.19.5",
|
||||
"@rollup/plugin-commonjs": "^23.0.2",
|
||||
"@rollup/plugin-terser": "^0.1.0",
|
||||
"@rollup/plugin-typescript": "^9.0.2",
|
||||
"@types/cli-color": "^2.0.2",
|
||||
"@types/dlv": "^1.1.2",
|
||||
"@types/estree": "1.0.0",
|
||||
"@types/intl": "^1.2.0",
|
||||
"@types/jest": "^29.2.3",
|
||||
"@types/node": "^18.11.9",
|
||||
"@types/sade": "^1.7.4",
|
||||
"babel-core": "^7.0.0-bridge.0",
|
||||
"babel-jest": "^29.3.1",
|
||||
"conventional-changelog-cli": "^2.2.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.28.0",
|
||||
"full-icu": "^1.5.0",
|
||||
"husky": "^4.3.8",
|
||||
"jest": "^29.3.1",
|
||||
"jest-environment-jsdom": "^29.3.1",
|
||||
"lint-staged": "^13.0.3",
|
||||
"prettier": "^2.7.1",
|
||||
"rollup": "^3.3.0",
|
||||
"rollup-plugin-auto-external": "^2.0.0",
|
||||
"rollup-plugin-dts": "^5.0.0",
|
||||
"sass": "^1.56.1",
|
||||
"svelte": "^3.53.1",
|
||||
"svelte-preprocess": "^4.10.7",
|
||||
"ts-jest": "^29.0.3",
|
||||
"typescript": "^4.9.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"cli-color": "^2.0.3",
|
||||
"deepmerge": "^4.2.2",
|
||||
"estree-walker": "^2",
|
||||
"intl-messageformat": "^9.13.0",
|
||||
"sade": "^1.8.1",
|
||||
"tiny-glob": "^0.2.9"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rm -rf dist/",
|
||||
"build": "rollup -c",
|
||||
"dev": "rollup -c -w",
|
||||
"test": "cross-env NODE_ICU_DATA=node_modules/full-icu jest",
|
||||
"test:ci": "pnpm test -- --silent",
|
||||
"lint": "eslint \"{src,test}/**/*.ts\"",
|
||||
"format": "prettier --loglevel silent --write \"{src,test}/**/*.ts\"",
|
||||
"release": " git add package.json && git commit -m \"chore(release): v$npm_package_version :tada:\"",
|
||||
"prebuild": "pnpm clean",
|
||||
"version": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1 && git add CHANGELOG.md"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"is-typedarray","version":"1.0.0","files":{"LICENSE.md":{"checkedAt":1678883669892,"integrity":"sha512-UYETA37gNUDKrmMFiphSX5pKZ0Jb2MNZb2l77Vrh0gU/5292uFpO77gMxRn3sD02jPS0RSiMTKfKy151I/M5Yg==","mode":420,"size":1073},"package.json":{"checkedAt":1678883672496,"integrity":"sha512-yhVALIycO1zwCevQC5PBOb5GORgkk1wzK6l61nGSKafqiboNJmVESSm2L0hm+/ktBetosi15mVJGvZrpNVSe+A==","mode":420,"size":665},"README.md":{"checkedAt":1678883672496,"integrity":"sha512-un62VjLFu7eO24s1uraPG68ZOHuxLZalo2Uz9/OEA4xcuaP8Hw1qAdc30/iig0Hf854IaqBdmcFVrHZ2aygmiA==","mode":420,"size":558},"index.js":{"checkedAt":1678883672496,"integrity":"sha512-1bRwgjMEZencAnom3E80+JbgRlxn9QPEcvyr2iAF8opKeRtrfgKMoOGPDxnxXn872pyx3N/EG0Mp/mi1MPxuVQ==","mode":420,"size":1016},"test.js":{"checkedAt":1678883672496,"integrity":"sha512-Bta6LhQrV/suHb96vAXeoSjrSBnDwjwbiQ6xwRVjyNgAak21jTXNAcWuAkD5RYLX0uegz9Qe4V7VjfaNxddKgQ==","mode":420,"size":1095}}}
|
||||
@@ -0,0 +1,86 @@
|
||||
(*
|
||||
Copyright (c) 2015-present, Facebook, Inc.
|
||||
|
||||
This source code is licensed under the MIT license found in the
|
||||
LICENSE file at
|
||||
https://github.com/facebookincubator/create-react-app/blob/master/LICENSE
|
||||
*)
|
||||
|
||||
property targetTab: null
|
||||
property targetTabIndex: -1
|
||||
property targetWindow: null
|
||||
|
||||
on run argv
|
||||
set theURL to item 1 of argv
|
||||
|
||||
with timeout of 2 seconds
|
||||
tell application "Chrome"
|
||||
|
||||
if (count every window) = 0 then
|
||||
make new window
|
||||
end if
|
||||
|
||||
-- 1: Looking for tab running debugger
|
||||
-- then, Reload debugging tab if found
|
||||
-- then return
|
||||
set found to my lookupTabWithUrl(theURL)
|
||||
if found then
|
||||
set targetWindow's active tab index to targetTabIndex
|
||||
tell targetTab to reload
|
||||
tell targetWindow to activate
|
||||
set index of targetWindow to 1
|
||||
return
|
||||
end if
|
||||
|
||||
-- 2: Looking for Empty tab
|
||||
-- In case debugging tab was not found
|
||||
-- We try to find an empty tab instead
|
||||
set found to my lookupTabWithUrl("chrome://newtab/")
|
||||
if found then
|
||||
set targetWindow's active tab index to targetTabIndex
|
||||
set URL of targetTab to theURL
|
||||
tell targetWindow to activate
|
||||
return
|
||||
end if
|
||||
|
||||
-- 3: Create new tab
|
||||
-- both debugging and empty tab were not found
|
||||
-- make a new tab with url
|
||||
tell window 1
|
||||
activate
|
||||
make new tab with properties {URL:theURL}
|
||||
end tell
|
||||
end tell
|
||||
end timeout
|
||||
end run
|
||||
|
||||
-- Function:
|
||||
-- Lookup tab with given url
|
||||
-- if found, store tab, index, and window in properties
|
||||
-- (properties were declared on top of file)
|
||||
on lookupTabWithUrl(lookupUrl)
|
||||
tell application "Chrome"
|
||||
-- Find a tab with the given url
|
||||
set found to false
|
||||
set theTabIndex to -1
|
||||
repeat with theWindow in every window
|
||||
set theTabIndex to 0
|
||||
repeat with theTab in every tab of theWindow
|
||||
set theTabIndex to theTabIndex + 1
|
||||
if (theTab's URL as string) contains lookupUrl then
|
||||
-- assign tab, tab index, and window to properties
|
||||
set targetTab to theTab
|
||||
set targetTabIndex to theTabIndex
|
||||
set targetWindow to theWindow
|
||||
set found to true
|
||||
exit repeat
|
||||
end if
|
||||
end repeat
|
||||
|
||||
if found then
|
||||
exit repeat
|
||||
end if
|
||||
end repeat
|
||||
end tell
|
||||
return found
|
||||
end lookupTabWithUrl
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H","36":"C K L G M N O"},C:{"1":"RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"DC tB I v J D E F A B C K L G M N O EC FC","33":"0 1 2 3 4 5 6 7 8 9 w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB"},D:{"1":"XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","36":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB"},E:{"1":"B C K L G 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I HC zB","36":"v J D E F A IC JC KC LC"},F:{"1":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e","2":"F B C PC QC RC SC qB AC TC rB","36":"0 1 2 3 4 5 6 7 8 9 G M N O w g x y z AB BB CB DB EB FB GB HB IB JB"},G:{"1":"cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","2":"zB UC","36":"E BC VC WC XC YC ZC aC bC"},H:{"2":"oC"},I:{"1":"f","36":"tB I pC qC rC sC BC tC uC"},J:{"36":"D A"},K:{"1":"h","2":"A B C qB AC rB"},L:{"1":"H"},M:{"1":"H"},N:{"36":"A B"},O:{"1":"vC"},P:{"1":"g yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C","36":"I wC xC"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"BD","33":"AD"}},B:5,C:"::placeholder CSS pseudo-element"};
|
||||
@@ -0,0 +1,2 @@
|
||||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=function(t,n,e,i,o){for(n=n.split?n.split("."):n,i=0;i<n.length;i++)t=t?t[n[i]]:o;return t===o?e:t}:"function"==typeof define&&define.amd?define(function(){return function(t,n,e,i,o){for(n=n.split?n.split("."):n,i=0;i<n.length;i++)t=t?t[n[i]]:o;return t===o?e:t}}):t.dlv=function(t,n,e,i,o){for(n=n.split?n.split("."):n,i=0;i<n.length;i++)t=t?t[n[i]]:o;return t===o?e:t}}(this);
|
||||
//# sourceMappingURL=dlv.umd.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "node-domexception",
|
||||
"version": "1.0.0",
|
||||
"description": "An implementation of the DOMException class from NodeJS",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jimmywarting/node-domexception.git"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.5.0"
|
||||
},
|
||||
"author": "Jimmy Wärting",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jimmywarting/node-domexception/issues"
|
||||
},
|
||||
"homepage": "https://github.com/jimmywarting/node-domexception#readme"
|
||||
}
|
||||
@@ -0,0 +1,318 @@
|
||||
"use strict";
|
||||
|
||||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
var _toDate = _interopRequireDefault(require("./lib/toDate"));
|
||||
|
||||
var _toFloat = _interopRequireDefault(require("./lib/toFloat"));
|
||||
|
||||
var _toInt = _interopRequireDefault(require("./lib/toInt"));
|
||||
|
||||
var _toBoolean = _interopRequireDefault(require("./lib/toBoolean"));
|
||||
|
||||
var _equals = _interopRequireDefault(require("./lib/equals"));
|
||||
|
||||
var _contains = _interopRequireDefault(require("./lib/contains"));
|
||||
|
||||
var _matches = _interopRequireDefault(require("./lib/matches"));
|
||||
|
||||
var _isEmail = _interopRequireDefault(require("./lib/isEmail"));
|
||||
|
||||
var _isURL = _interopRequireDefault(require("./lib/isURL"));
|
||||
|
||||
var _isMACAddress = _interopRequireDefault(require("./lib/isMACAddress"));
|
||||
|
||||
var _isIP = _interopRequireDefault(require("./lib/isIP"));
|
||||
|
||||
var _isIPRange = _interopRequireDefault(require("./lib/isIPRange"));
|
||||
|
||||
var _isFQDN = _interopRequireDefault(require("./lib/isFQDN"));
|
||||
|
||||
var _isDate = _interopRequireDefault(require("./lib/isDate"));
|
||||
|
||||
var _isTime = _interopRequireDefault(require("./lib/isTime"));
|
||||
|
||||
var _isBoolean = _interopRequireDefault(require("./lib/isBoolean"));
|
||||
|
||||
var _isLocale = _interopRequireDefault(require("./lib/isLocale"));
|
||||
|
||||
var _isAlpha = _interopRequireWildcard(require("./lib/isAlpha"));
|
||||
|
||||
var _isAlphanumeric = _interopRequireWildcard(require("./lib/isAlphanumeric"));
|
||||
|
||||
var _isNumeric = _interopRequireDefault(require("./lib/isNumeric"));
|
||||
|
||||
var _isPassportNumber = _interopRequireDefault(require("./lib/isPassportNumber"));
|
||||
|
||||
var _isPort = _interopRequireDefault(require("./lib/isPort"));
|
||||
|
||||
var _isLowercase = _interopRequireDefault(require("./lib/isLowercase"));
|
||||
|
||||
var _isUppercase = _interopRequireDefault(require("./lib/isUppercase"));
|
||||
|
||||
var _isIMEI = _interopRequireDefault(require("./lib/isIMEI"));
|
||||
|
||||
var _isAscii = _interopRequireDefault(require("./lib/isAscii"));
|
||||
|
||||
var _isFullWidth = _interopRequireDefault(require("./lib/isFullWidth"));
|
||||
|
||||
var _isHalfWidth = _interopRequireDefault(require("./lib/isHalfWidth"));
|
||||
|
||||
var _isVariableWidth = _interopRequireDefault(require("./lib/isVariableWidth"));
|
||||
|
||||
var _isMultibyte = _interopRequireDefault(require("./lib/isMultibyte"));
|
||||
|
||||
var _isSemVer = _interopRequireDefault(require("./lib/isSemVer"));
|
||||
|
||||
var _isSurrogatePair = _interopRequireDefault(require("./lib/isSurrogatePair"));
|
||||
|
||||
var _isInt = _interopRequireDefault(require("./lib/isInt"));
|
||||
|
||||
var _isFloat = _interopRequireWildcard(require("./lib/isFloat"));
|
||||
|
||||
var _isDecimal = _interopRequireDefault(require("./lib/isDecimal"));
|
||||
|
||||
var _isHexadecimal = _interopRequireDefault(require("./lib/isHexadecimal"));
|
||||
|
||||
var _isOctal = _interopRequireDefault(require("./lib/isOctal"));
|
||||
|
||||
var _isDivisibleBy = _interopRequireDefault(require("./lib/isDivisibleBy"));
|
||||
|
||||
var _isHexColor = _interopRequireDefault(require("./lib/isHexColor"));
|
||||
|
||||
var _isRgbColor = _interopRequireDefault(require("./lib/isRgbColor"));
|
||||
|
||||
var _isHSL = _interopRequireDefault(require("./lib/isHSL"));
|
||||
|
||||
var _isISRC = _interopRequireDefault(require("./lib/isISRC"));
|
||||
|
||||
var _isIBAN = _interopRequireWildcard(require("./lib/isIBAN"));
|
||||
|
||||
var _isBIC = _interopRequireDefault(require("./lib/isBIC"));
|
||||
|
||||
var _isMD = _interopRequireDefault(require("./lib/isMD5"));
|
||||
|
||||
var _isHash = _interopRequireDefault(require("./lib/isHash"));
|
||||
|
||||
var _isJWT = _interopRequireDefault(require("./lib/isJWT"));
|
||||
|
||||
var _isJSON = _interopRequireDefault(require("./lib/isJSON"));
|
||||
|
||||
var _isEmpty = _interopRequireDefault(require("./lib/isEmpty"));
|
||||
|
||||
var _isLength = _interopRequireDefault(require("./lib/isLength"));
|
||||
|
||||
var _isByteLength = _interopRequireDefault(require("./lib/isByteLength"));
|
||||
|
||||
var _isUUID = _interopRequireDefault(require("./lib/isUUID"));
|
||||
|
||||
var _isMongoId = _interopRequireDefault(require("./lib/isMongoId"));
|
||||
|
||||
var _isAfter = _interopRequireDefault(require("./lib/isAfter"));
|
||||
|
||||
var _isBefore = _interopRequireDefault(require("./lib/isBefore"));
|
||||
|
||||
var _isIn = _interopRequireDefault(require("./lib/isIn"));
|
||||
|
||||
var _isLuhnNumber = _interopRequireDefault(require("./lib/isLuhnNumber"));
|
||||
|
||||
var _isCreditCard = _interopRequireDefault(require("./lib/isCreditCard"));
|
||||
|
||||
var _isIdentityCard = _interopRequireDefault(require("./lib/isIdentityCard"));
|
||||
|
||||
var _isEAN = _interopRequireDefault(require("./lib/isEAN"));
|
||||
|
||||
var _isISIN = _interopRequireDefault(require("./lib/isISIN"));
|
||||
|
||||
var _isISBN = _interopRequireDefault(require("./lib/isISBN"));
|
||||
|
||||
var _isISSN = _interopRequireDefault(require("./lib/isISSN"));
|
||||
|
||||
var _isTaxID = _interopRequireDefault(require("./lib/isTaxID"));
|
||||
|
||||
var _isMobilePhone = _interopRequireWildcard(require("./lib/isMobilePhone"));
|
||||
|
||||
var _isEthereumAddress = _interopRequireDefault(require("./lib/isEthereumAddress"));
|
||||
|
||||
var _isCurrency = _interopRequireDefault(require("./lib/isCurrency"));
|
||||
|
||||
var _isBtcAddress = _interopRequireDefault(require("./lib/isBtcAddress"));
|
||||
|
||||
var _isISO = _interopRequireDefault(require("./lib/isISO6391"));
|
||||
|
||||
var _isISO2 = _interopRequireDefault(require("./lib/isISO8601"));
|
||||
|
||||
var _isRFC = _interopRequireDefault(require("./lib/isRFC3339"));
|
||||
|
||||
var _isISO31661Alpha = _interopRequireDefault(require("./lib/isISO31661Alpha2"));
|
||||
|
||||
var _isISO31661Alpha2 = _interopRequireDefault(require("./lib/isISO31661Alpha3"));
|
||||
|
||||
var _isISO3 = _interopRequireDefault(require("./lib/isISO4217"));
|
||||
|
||||
var _isBase = _interopRequireDefault(require("./lib/isBase32"));
|
||||
|
||||
var _isBase2 = _interopRequireDefault(require("./lib/isBase58"));
|
||||
|
||||
var _isBase3 = _interopRequireDefault(require("./lib/isBase64"));
|
||||
|
||||
var _isDataURI = _interopRequireDefault(require("./lib/isDataURI"));
|
||||
|
||||
var _isMagnetURI = _interopRequireDefault(require("./lib/isMagnetURI"));
|
||||
|
||||
var _isMimeType = _interopRequireDefault(require("./lib/isMimeType"));
|
||||
|
||||
var _isLatLong = _interopRequireDefault(require("./lib/isLatLong"));
|
||||
|
||||
var _isPostalCode = _interopRequireWildcard(require("./lib/isPostalCode"));
|
||||
|
||||
var _ltrim = _interopRequireDefault(require("./lib/ltrim"));
|
||||
|
||||
var _rtrim = _interopRequireDefault(require("./lib/rtrim"));
|
||||
|
||||
var _trim = _interopRequireDefault(require("./lib/trim"));
|
||||
|
||||
var _escape = _interopRequireDefault(require("./lib/escape"));
|
||||
|
||||
var _unescape = _interopRequireDefault(require("./lib/unescape"));
|
||||
|
||||
var _stripLow = _interopRequireDefault(require("./lib/stripLow"));
|
||||
|
||||
var _whitelist = _interopRequireDefault(require("./lib/whitelist"));
|
||||
|
||||
var _blacklist = _interopRequireDefault(require("./lib/blacklist"));
|
||||
|
||||
var _isWhitelisted = _interopRequireDefault(require("./lib/isWhitelisted"));
|
||||
|
||||
var _normalizeEmail = _interopRequireDefault(require("./lib/normalizeEmail"));
|
||||
|
||||
var _isSlug = _interopRequireDefault(require("./lib/isSlug"));
|
||||
|
||||
var _isLicensePlate = _interopRequireDefault(require("./lib/isLicensePlate"));
|
||||
|
||||
var _isStrongPassword = _interopRequireDefault(require("./lib/isStrongPassword"));
|
||||
|
||||
var _isVAT = _interopRequireDefault(require("./lib/isVAT"));
|
||||
|
||||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var version = '13.9.0';
|
||||
var validator = {
|
||||
version: version,
|
||||
toDate: _toDate.default,
|
||||
toFloat: _toFloat.default,
|
||||
toInt: _toInt.default,
|
||||
toBoolean: _toBoolean.default,
|
||||
equals: _equals.default,
|
||||
contains: _contains.default,
|
||||
matches: _matches.default,
|
||||
isEmail: _isEmail.default,
|
||||
isURL: _isURL.default,
|
||||
isMACAddress: _isMACAddress.default,
|
||||
isIP: _isIP.default,
|
||||
isIPRange: _isIPRange.default,
|
||||
isFQDN: _isFQDN.default,
|
||||
isBoolean: _isBoolean.default,
|
||||
isIBAN: _isIBAN.default,
|
||||
isBIC: _isBIC.default,
|
||||
isAlpha: _isAlpha.default,
|
||||
isAlphaLocales: _isAlpha.locales,
|
||||
isAlphanumeric: _isAlphanumeric.default,
|
||||
isAlphanumericLocales: _isAlphanumeric.locales,
|
||||
isNumeric: _isNumeric.default,
|
||||
isPassportNumber: _isPassportNumber.default,
|
||||
isPort: _isPort.default,
|
||||
isLowercase: _isLowercase.default,
|
||||
isUppercase: _isUppercase.default,
|
||||
isAscii: _isAscii.default,
|
||||
isFullWidth: _isFullWidth.default,
|
||||
isHalfWidth: _isHalfWidth.default,
|
||||
isVariableWidth: _isVariableWidth.default,
|
||||
isMultibyte: _isMultibyte.default,
|
||||
isSemVer: _isSemVer.default,
|
||||
isSurrogatePair: _isSurrogatePair.default,
|
||||
isInt: _isInt.default,
|
||||
isIMEI: _isIMEI.default,
|
||||
isFloat: _isFloat.default,
|
||||
isFloatLocales: _isFloat.locales,
|
||||
isDecimal: _isDecimal.default,
|
||||
isHexadecimal: _isHexadecimal.default,
|
||||
isOctal: _isOctal.default,
|
||||
isDivisibleBy: _isDivisibleBy.default,
|
||||
isHexColor: _isHexColor.default,
|
||||
isRgbColor: _isRgbColor.default,
|
||||
isHSL: _isHSL.default,
|
||||
isISRC: _isISRC.default,
|
||||
isMD5: _isMD.default,
|
||||
isHash: _isHash.default,
|
||||
isJWT: _isJWT.default,
|
||||
isJSON: _isJSON.default,
|
||||
isEmpty: _isEmpty.default,
|
||||
isLength: _isLength.default,
|
||||
isLocale: _isLocale.default,
|
||||
isByteLength: _isByteLength.default,
|
||||
isUUID: _isUUID.default,
|
||||
isMongoId: _isMongoId.default,
|
||||
isAfter: _isAfter.default,
|
||||
isBefore: _isBefore.default,
|
||||
isIn: _isIn.default,
|
||||
isLuhnNumber: _isLuhnNumber.default,
|
||||
isCreditCard: _isCreditCard.default,
|
||||
isIdentityCard: _isIdentityCard.default,
|
||||
isEAN: _isEAN.default,
|
||||
isISIN: _isISIN.default,
|
||||
isISBN: _isISBN.default,
|
||||
isISSN: _isISSN.default,
|
||||
isMobilePhone: _isMobilePhone.default,
|
||||
isMobilePhoneLocales: _isMobilePhone.locales,
|
||||
isPostalCode: _isPostalCode.default,
|
||||
isPostalCodeLocales: _isPostalCode.locales,
|
||||
isEthereumAddress: _isEthereumAddress.default,
|
||||
isCurrency: _isCurrency.default,
|
||||
isBtcAddress: _isBtcAddress.default,
|
||||
isISO6391: _isISO.default,
|
||||
isISO8601: _isISO2.default,
|
||||
isRFC3339: _isRFC.default,
|
||||
isISO31661Alpha2: _isISO31661Alpha.default,
|
||||
isISO31661Alpha3: _isISO31661Alpha2.default,
|
||||
isISO4217: _isISO3.default,
|
||||
isBase32: _isBase.default,
|
||||
isBase58: _isBase2.default,
|
||||
isBase64: _isBase3.default,
|
||||
isDataURI: _isDataURI.default,
|
||||
isMagnetURI: _isMagnetURI.default,
|
||||
isMimeType: _isMimeType.default,
|
||||
isLatLong: _isLatLong.default,
|
||||
ltrim: _ltrim.default,
|
||||
rtrim: _rtrim.default,
|
||||
trim: _trim.default,
|
||||
escape: _escape.default,
|
||||
unescape: _unescape.default,
|
||||
stripLow: _stripLow.default,
|
||||
whitelist: _whitelist.default,
|
||||
blacklist: _blacklist.default,
|
||||
isWhitelisted: _isWhitelisted.default,
|
||||
normalizeEmail: _normalizeEmail.default,
|
||||
toString: toString,
|
||||
isSlug: _isSlug.default,
|
||||
isStrongPassword: _isStrongPassword.default,
|
||||
isTaxID: _isTaxID.default,
|
||||
isDate: _isDate.default,
|
||||
isTime: _isTime.default,
|
||||
isLicensePlate: _isLicensePlate.default,
|
||||
isVAT: _isVAT.default,
|
||||
ibanLocales: _isIBAN.locales
|
||||
};
|
||||
var _default = validator;
|
||||
exports.default = _default;
|
||||
module.exports = exports.default;
|
||||
module.exports.default = exports.default;
|
||||
@@ -0,0 +1,54 @@
|
||||
'use strict';
|
||||
module.exports = {
|
||||
wrap: wrapRange,
|
||||
limit: limitRange,
|
||||
validate: validateRange,
|
||||
test: testRange,
|
||||
curry: curry,
|
||||
name: name
|
||||
};
|
||||
|
||||
function wrapRange(min, max, value) {
|
||||
var maxLessMin = max - min;
|
||||
return ((value - min) % maxLessMin + maxLessMin) % maxLessMin + min;
|
||||
}
|
||||
|
||||
function limitRange(min, max, value) {
|
||||
return Math.max(min, Math.min(max, value));
|
||||
}
|
||||
|
||||
function validateRange(min, max, value, minExclusive, maxExclusive) {
|
||||
if (!testRange(min, max, value, minExclusive, maxExclusive)) {
|
||||
throw new Error(value + ' is outside of range [' + min + ',' + max + ')');
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function testRange(min, max, value, minExclusive, maxExclusive) {
|
||||
return !(
|
||||
value < min ||
|
||||
value > max ||
|
||||
(maxExclusive && (value === max)) ||
|
||||
(minExclusive && (value === min))
|
||||
);
|
||||
}
|
||||
|
||||
function name(min, max, minExcl, maxExcl) {
|
||||
return (minExcl ? '(' : '[') + min + ',' + max + (maxExcl ? ')' : ']');
|
||||
}
|
||||
|
||||
function curry(min, max, minExclusive, maxExclusive) {
|
||||
var boundNameFn = name.bind(null, min, max, minExclusive, maxExclusive);
|
||||
return {
|
||||
wrap: wrapRange.bind(null, min, max),
|
||||
limit: limitRange.bind(null, min, max),
|
||||
validate: function(value) {
|
||||
return validateRange(min, max, value, minExclusive, maxExclusive);
|
||||
},
|
||||
test: function(value) {
|
||||
return testRange(min, max, value, minExclusive, maxExclusive);
|
||||
},
|
||||
toString: boundNameFn,
|
||||
name: boundNameFn
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
const {MAX_LENGTH} = require('../internal/constants')
|
||||
const { re, t } = require('../internal/re')
|
||||
const SemVer = require('../classes/semver')
|
||||
|
||||
const parseOptions = require('../internal/parse-options')
|
||||
const parse = (version, options) => {
|
||||
options = parseOptions(options)
|
||||
|
||||
if (version instanceof SemVer) {
|
||||
return version
|
||||
}
|
||||
|
||||
if (typeof version !== 'string') {
|
||||
return null
|
||||
}
|
||||
|
||||
if (version.length > MAX_LENGTH) {
|
||||
return null
|
||||
}
|
||||
|
||||
const r = options.loose ? re[t.LOOSE] : re[t.FULL]
|
||||
if (!r.test(version)) {
|
||||
return null
|
||||
}
|
||||
|
||||
try {
|
||||
return new SemVer(version, options)
|
||||
} catch (er) {
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = parse
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"degenerator","version":"3.0.2","files":{"dist/src/index.js":{"checkedAt":1678883672075,"integrity":"sha512-b6KyJS+O03IMluEDgr8YlD3lLEL/yu5XXthEUYclb+2cHD9Yjattb5+CHs4qeh8P2vAPF6iWCvpu+9f8MsEYdw==","mode":420,"size":7199},"package.json":{"checkedAt":1678883672075,"integrity":"sha512-5HHYKY3cvrrdisGoYyAVFltBsxE6quTkw4FdiKbdNv3OJaRmuUizxJfQifz1vil0O+RRAlb3Nkf9n3WEAROJLw==","mode":420,"size":1456},"dist/src/index.js.map":{"checkedAt":1678883672081,"integrity":"sha512-r5OmdMEMu/sCzIMapnjPG1v6tiOSdqFYyYnY/RyjYAfqDap/VpKmD5oOCjMgZt0KKchyx7mzzB1VCe4HVPQTtw==","mode":420,"size":5275},"README.md":{"checkedAt":1678883672087,"integrity":"sha512-9ArJQOMoQHWXJFRbd12KcdLm9goF0JDI8U15J6dL9rBIA0vgwPGvxNu3aQ4yK/MdaJyFWfgmuA0Y2Qj1LUybXA==","mode":420,"size":3968},"dist/src/index.d.ts":{"checkedAt":1678883672087,"integrity":"sha512-w1JE69jpHiLDGx98ouIApoE+tuoPApU8UCma+XWY4uW+Gg8hBHKboRT8DX5o9N/sZkqK4XkYg+D9q5WpEavaaA==","mode":420,"size":879}}}
|
||||
@@ -0,0 +1,5 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.WHITE_SPACE_REGEX = void 0;
|
||||
// @generated from regex-gen.ts
|
||||
exports.WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
|
||||
@@ -0,0 +1,478 @@
|
||||
import Declaration, { DeclarationProps } from './declaration.js'
|
||||
import Comment, { CommentProps } from './comment.js'
|
||||
import { Stringifier, Syntax } from './postcss.js'
|
||||
import AtRule, { AtRuleProps } from './at-rule.js'
|
||||
import Rule, { RuleProps } from './rule.js'
|
||||
import Warning, { WarningOptions } from './warning.js'
|
||||
import CssSyntaxError from './css-syntax-error.js'
|
||||
import Result from './result.js'
|
||||
import Input from './input.js'
|
||||
import Root from './root.js'
|
||||
import Document from './document.js'
|
||||
import Container from './container.js'
|
||||
|
||||
export type ChildNode = AtRule | Rule | Declaration | Comment
|
||||
|
||||
export type AnyNode = AtRule | Rule | Declaration | Comment | Root | Document
|
||||
|
||||
export type ChildProps =
|
||||
| AtRuleProps
|
||||
| RuleProps
|
||||
| DeclarationProps
|
||||
| CommentProps
|
||||
|
||||
export interface Position {
|
||||
/**
|
||||
* Source offset in file. It starts from 0.
|
||||
*/
|
||||
offset: number
|
||||
|
||||
/**
|
||||
* Source line in file. In contrast to `offset` it starts from 1.
|
||||
*/
|
||||
column: number
|
||||
|
||||
/**
|
||||
* Source column in file.
|
||||
*/
|
||||
line: number
|
||||
}
|
||||
|
||||
export interface Range {
|
||||
/**
|
||||
* Start position, inclusive.
|
||||
*/
|
||||
start: Position
|
||||
|
||||
/**
|
||||
* End position, exclusive.
|
||||
*/
|
||||
end: Position
|
||||
}
|
||||
|
||||
export interface Source {
|
||||
/**
|
||||
* The file source of the node.
|
||||
*/
|
||||
input: Input
|
||||
/**
|
||||
* The inclusive starting position of the node’s source.
|
||||
*/
|
||||
start?: Position
|
||||
/**
|
||||
* The inclusive ending position of the node's source.
|
||||
*/
|
||||
end?: Position
|
||||
}
|
||||
|
||||
export interface NodeProps {
|
||||
source?: Source
|
||||
}
|
||||
|
||||
interface NodeErrorOptions {
|
||||
/**
|
||||
* Plugin name that created this error. PostCSS will set it automatically.
|
||||
*/
|
||||
plugin?: string
|
||||
/**
|
||||
* A word inside a node's string, that should be highlighted as source
|
||||
* of error.
|
||||
*/
|
||||
word?: string
|
||||
/**
|
||||
* An index inside a node's string that should be highlighted as source
|
||||
* of error.
|
||||
*/
|
||||
index?: number
|
||||
/**
|
||||
* An ending index inside a node's string that should be highlighted as
|
||||
* source of error.
|
||||
*/
|
||||
endIndex?: number
|
||||
}
|
||||
|
||||
/**
|
||||
* All node classes inherit the following common methods.
|
||||
*
|
||||
* You should not extend this classes to create AST for selector or value
|
||||
* parser.
|
||||
*/
|
||||
export default abstract class Node {
|
||||
/**
|
||||
* tring representing the node’s type. Possible values are `root`, `atrule`,
|
||||
* `rule`, `decl`, or `comment`.
|
||||
*
|
||||
* ```js
|
||||
* new Declaration({ prop: 'color', value: 'black' }).type //=> 'decl'
|
||||
* ```
|
||||
*/
|
||||
type: string
|
||||
|
||||
/**
|
||||
* The node’s parent node.
|
||||
*
|
||||
* ```js
|
||||
* root.nodes[0].parent === root
|
||||
* ```
|
||||
*/
|
||||
parent: Document | Container | undefined
|
||||
|
||||
/**
|
||||
* The input source of the node.
|
||||
*
|
||||
* The property is used in source map generation.
|
||||
*
|
||||
* If you create a node manually (e.g., with `postcss.decl()`),
|
||||
* that node will not have a `source` property and will be absent
|
||||
* from the source map. For this reason, the plugin developer should
|
||||
* consider cloning nodes to create new ones (in which case the new node’s
|
||||
* source will reference the original, cloned node) or setting
|
||||
* the `source` property manually.
|
||||
*
|
||||
* ```js
|
||||
* decl.source.input.from //=> '/home/ai/a.sass'
|
||||
* decl.source.start //=> { line: 10, column: 2 }
|
||||
* decl.source.end //=> { line: 10, column: 12 }
|
||||
* ```
|
||||
*
|
||||
* ```js
|
||||
* // Bad
|
||||
* const prefixed = postcss.decl({
|
||||
* prop: '-moz-' + decl.prop,
|
||||
* value: decl.value
|
||||
* })
|
||||
*
|
||||
* // Good
|
||||
* const prefixed = decl.clone({ prop: '-moz-' + decl.prop })
|
||||
* ```
|
||||
*
|
||||
* ```js
|
||||
* if (atrule.name === 'add-link') {
|
||||
* const rule = postcss.rule({ selector: 'a', source: atrule.source })
|
||||
* atrule.parent.insertBefore(atrule, rule)
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
source?: Source
|
||||
|
||||
/**
|
||||
* Information to generate byte-to-byte equal node string as it was
|
||||
* in the origin input.
|
||||
*
|
||||
* Every parser saves its own properties,
|
||||
* but the default CSS parser uses:
|
||||
*
|
||||
* * `before`: the space symbols before the node. It also stores `*`
|
||||
* and `_` symbols before the declaration (IE hack).
|
||||
* * `after`: the space symbols after the last child of the node
|
||||
* to the end of the node.
|
||||
* * `between`: the symbols between the property and value
|
||||
* for declarations, selector and `{` for rules, or last parameter
|
||||
* and `{` for at-rules.
|
||||
* * `semicolon`: contains true if the last child has
|
||||
* an (optional) semicolon.
|
||||
* * `afterName`: the space between the at-rule name and its parameters.
|
||||
* * `left`: the space symbols between `/*` and the comment’s text.
|
||||
* * `right`: the space symbols between the comment’s text
|
||||
* and <code>*/</code>.
|
||||
* * `important`: the content of the important statement,
|
||||
* if it is not just `!important`.
|
||||
*
|
||||
* PostCSS cleans selectors, declaration values and at-rule parameters
|
||||
* from comments and extra spaces, but it stores origin content in raws
|
||||
* properties. As such, if you don’t change a declaration’s value,
|
||||
* PostCSS will use the raw value with comments.
|
||||
*
|
||||
* ```js
|
||||
* const root = postcss.parse('a {\n color:black\n}')
|
||||
* root.first.first.raws //=> { before: '\n ', between: ':' }
|
||||
* ```
|
||||
*/
|
||||
raws: any
|
||||
|
||||
/**
|
||||
* @param defaults Value for node properties.
|
||||
*/
|
||||
constructor(defaults?: object)
|
||||
|
||||
/**
|
||||
* Returns a `CssSyntaxError` instance containing the original position
|
||||
* of the node in the source, showing line and column numbers and also
|
||||
* a small excerpt to facilitate debugging.
|
||||
*
|
||||
* If present, an input source map will be used to get the original position
|
||||
* of the source, even from a previous compilation step
|
||||
* (e.g., from Sass compilation).
|
||||
*
|
||||
* This method produces very useful error messages.
|
||||
*
|
||||
* ```js
|
||||
* if (!variables[name]) {
|
||||
* throw decl.error(`Unknown variable ${name}`, { word: name })
|
||||
* // CssSyntaxError: postcss-vars:a.sass:4:3: Unknown variable $black
|
||||
* // color: $black
|
||||
* // a
|
||||
* // ^
|
||||
* // background: white
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @param message Error description.
|
||||
* @param opts Options.
|
||||
*
|
||||
* @return Error object to throw it.
|
||||
*/
|
||||
error(message: string, options?: NodeErrorOptions): CssSyntaxError
|
||||
|
||||
/**
|
||||
* This method is provided as a convenience wrapper for `Result#warn`.
|
||||
*
|
||||
* ```js
|
||||
* Declaration: {
|
||||
* bad: (decl, { result }) => {
|
||||
* decl.warn(result, 'Deprecated property bad')
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @param result The `Result` instance that will receive the warning.
|
||||
* @param text Warning message.
|
||||
* @param opts Warning Options.
|
||||
*
|
||||
* @return Created warning object.
|
||||
*/
|
||||
warn(result: Result, text: string, opts?: WarningOptions): Warning
|
||||
|
||||
/**
|
||||
* Removes the node from its parent and cleans the parent properties
|
||||
* from the node and its children.
|
||||
*
|
||||
* ```js
|
||||
* if (decl.prop.match(/^-webkit-/)) {
|
||||
* decl.remove()
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @return Node to make calls chain.
|
||||
*/
|
||||
remove(): this
|
||||
|
||||
/**
|
||||
* Returns a CSS string representing the node.
|
||||
*
|
||||
* ```js
|
||||
* new Rule({ selector: 'a' }).toString() //=> "a {}"
|
||||
* ```
|
||||
*
|
||||
* @param stringifier A syntax to use in string generation.
|
||||
* @return CSS string of this node.
|
||||
*/
|
||||
toString(stringifier?: Stringifier | Syntax): string
|
||||
|
||||
/**
|
||||
* Assigns properties to the current node.
|
||||
*
|
||||
* ```js
|
||||
* decl.assign({ prop: 'word-wrap', value: 'break-word' })
|
||||
* ```
|
||||
*
|
||||
* @param overrides New properties to override the node.
|
||||
* @return Current node to methods chain.
|
||||
*/
|
||||
assign(overrides: object): this
|
||||
|
||||
/**
|
||||
* Returns an exact clone of the node.
|
||||
*
|
||||
* The resulting cloned node and its (cloned) children will retain
|
||||
* code style properties.
|
||||
*
|
||||
* ```js
|
||||
* decl.raws.before //=> "\n "
|
||||
* const cloned = decl.clone({ prop: '-moz-' + decl.prop })
|
||||
* cloned.raws.before //=> "\n "
|
||||
* cloned.toString() //=> -moz-transform: scale(0)
|
||||
* ```
|
||||
*
|
||||
* @param overrides New properties to override in the clone.
|
||||
* @return Clone of the node.
|
||||
*/
|
||||
clone(overrides?: object): this
|
||||
|
||||
/**
|
||||
* Shortcut to clone the node and insert the resulting cloned node
|
||||
* before the current node.
|
||||
*
|
||||
* ```js
|
||||
* decl.cloneBefore({ prop: '-moz-' + decl.prop })
|
||||
* ```
|
||||
*
|
||||
* @param overrides Mew properties to override in the clone.
|
||||
*
|
||||
* @return New node
|
||||
*/
|
||||
cloneBefore(overrides?: object): this
|
||||
|
||||
/**
|
||||
* Shortcut to clone the node and insert the resulting cloned node
|
||||
* after the current node.
|
||||
*
|
||||
* @param overrides New properties to override in the clone.
|
||||
* @return New node.
|
||||
*/
|
||||
cloneAfter(overrides?: object): this
|
||||
|
||||
/**
|
||||
* Inserts node(s) before the current node and removes the current node.
|
||||
*
|
||||
* ```js
|
||||
* AtRule: {
|
||||
* mixin: atrule => {
|
||||
* atrule.replaceWith(mixinRules[atrule.params])
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @param nodes Mode(s) to replace current one.
|
||||
* @return Current node to methods chain.
|
||||
*/
|
||||
replaceWith(
|
||||
...nodes: (ChildNode | ChildProps | ChildNode[] | ChildProps[])[]
|
||||
): this
|
||||
|
||||
/**
|
||||
* Returns the next child of the node’s parent.
|
||||
* Returns `undefined` if the current node is the last child.
|
||||
*
|
||||
* ```js
|
||||
* if (comment.text === 'delete next') {
|
||||
* const next = comment.next()
|
||||
* if (next) {
|
||||
* next.remove()
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @return Next node.
|
||||
*/
|
||||
next(): ChildNode | undefined
|
||||
|
||||
/**
|
||||
* Returns the previous child of the node’s parent.
|
||||
* Returns `undefined` if the current node is the first child.
|
||||
*
|
||||
* ```js
|
||||
* const annotation = decl.prev()
|
||||
* if (annotation.type === 'comment') {
|
||||
* readAnnotation(annotation.text)
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @return Previous node.
|
||||
*/
|
||||
prev(): ChildNode | undefined
|
||||
|
||||
/**
|
||||
* Insert new node before current node to current node’s parent.
|
||||
*
|
||||
* Just alias for `node.parent.insertBefore(node, add)`.
|
||||
*
|
||||
* ```js
|
||||
* decl.before('content: ""')
|
||||
* ```
|
||||
*
|
||||
* @param newNode New node.
|
||||
* @return This node for methods chain.
|
||||
*/
|
||||
before(newNode: Node | ChildProps | string | Node[]): this
|
||||
|
||||
/**
|
||||
* Insert new node after current node to current node’s parent.
|
||||
*
|
||||
* Just alias for `node.parent.insertAfter(node, add)`.
|
||||
*
|
||||
* ```js
|
||||
* decl.after('color: black')
|
||||
* ```
|
||||
*
|
||||
* @param newNode New node.
|
||||
* @return This node for methods chain.
|
||||
*/
|
||||
after(newNode: Node | ChildProps | string | Node[]): this
|
||||
|
||||
/**
|
||||
* Finds the Root instance of the node’s tree.
|
||||
*
|
||||
* ```js
|
||||
* root.nodes[0].nodes[0].root() === root
|
||||
* ```
|
||||
*
|
||||
* @return Root parent.
|
||||
*/
|
||||
root(): Root
|
||||
|
||||
/**
|
||||
* Returns a `Node#raws` value. If the node is missing
|
||||
* the code style property (because the node was manually built or cloned),
|
||||
* PostCSS will try to autodetect the code style property by looking
|
||||
* at other nodes in the tree.
|
||||
*
|
||||
* ```js
|
||||
* const root = postcss.parse('a { background: white }')
|
||||
* root.nodes[0].append({ prop: 'color', value: 'black' })
|
||||
* root.nodes[0].nodes[1].raws.before //=> undefined
|
||||
* root.nodes[0].nodes[1].raw('before') //=> ' '
|
||||
* ```
|
||||
*
|
||||
* @param prop Name of code style property.
|
||||
* @param defaultType Name of default value, it can be missed
|
||||
* if the value is the same as prop.
|
||||
* @return {string} Code style value.
|
||||
*/
|
||||
raw(prop: string, defaultType?: string): string
|
||||
|
||||
/**
|
||||
* Clear the code style properties for the node and its children.
|
||||
*
|
||||
* ```js
|
||||
* node.raws.before //=> ' '
|
||||
* node.cleanRaws()
|
||||
* node.raws.before //=> undefined
|
||||
* ```
|
||||
*
|
||||
* @param keepBetween Keep the `raws.between` symbols.
|
||||
*/
|
||||
cleanRaws(keepBetween?: boolean): void
|
||||
|
||||
/**
|
||||
* Fix circular links on `JSON.stringify()`.
|
||||
*
|
||||
* @return Cleaned object.
|
||||
*/
|
||||
toJSON(): object
|
||||
|
||||
/**
|
||||
* Convert string index to line/column.
|
||||
*
|
||||
* @param index The symbol number in the node’s string.
|
||||
* @return Symbol position in file.
|
||||
*/
|
||||
positionInside(index: number): Position
|
||||
|
||||
/**
|
||||
* Get the position for a word or an index inside the node.
|
||||
*
|
||||
* @param opts Options.
|
||||
* @return Position.
|
||||
*/
|
||||
positionBy(opts?: Pick<WarningOptions, 'word' | 'index'>): Position
|
||||
|
||||
/**
|
||||
* Get the range for a word or start and end index inside the node.
|
||||
* The start index is inclusive; the end index is exclusive.
|
||||
*
|
||||
* @param opts Options.
|
||||
* @return Range.
|
||||
*/
|
||||
rangeBy(opts?: Pick<WarningOptions, 'word' | 'index' | 'endIndex'>): Range
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = require("./is-implemented")() ? Array.prototype.findIndex : require("./shim");
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"schedulePromise.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/schedulePromise.ts"],"names":[],"mappings":";;;AAAA,qDAAoD;AACpD,oDAAmD;AACnD,wDAAuD;AAGvD,SAAgB,eAAe,CAAI,KAAqB,EAAE,SAAwB;IAChF,OAAO,qBAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,yBAAW,CAAC,SAAS,CAAC,EAAE,qBAAS,CAAC,SAAS,CAAC,CAAC,CAAC;AAC7E,CAAC;AAFD,0CAEC"}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,26 @@
|
||||
"use strict";
|
||||
|
||||
var callable = require("../../../object/valid-callable")
|
||||
, ensureValue = require("../../../object/valid-value")
|
||||
, some = Array.prototype.some
|
||||
, apply = Function.prototype.apply;
|
||||
|
||||
module.exports = function (predicate /*, thisArg*/) {
|
||||
var k, self;
|
||||
self = Object(ensureValue(this));
|
||||
callable(predicate);
|
||||
|
||||
return some.call(
|
||||
self,
|
||||
function (value, index) {
|
||||
if (apply.call(predicate, this, arguments)) {
|
||||
k = index;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
arguments[1]
|
||||
)
|
||||
? k
|
||||
: -1;
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
import { operate } from '../util/lift';
|
||||
import { noop } from '../util/noop';
|
||||
import { createOperatorSubscriber } from './OperatorSubscriber';
|
||||
import { innerFrom } from '../observable/innerFrom';
|
||||
export function debounce(durationSelector) {
|
||||
return operate((source, subscriber) => {
|
||||
let hasValue = false;
|
||||
let lastValue = null;
|
||||
let durationSubscriber = null;
|
||||
const emit = () => {
|
||||
durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();
|
||||
durationSubscriber = null;
|
||||
if (hasValue) {
|
||||
hasValue = false;
|
||||
const value = lastValue;
|
||||
lastValue = null;
|
||||
subscriber.next(value);
|
||||
}
|
||||
};
|
||||
source.subscribe(createOperatorSubscriber(subscriber, (value) => {
|
||||
durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();
|
||||
hasValue = true;
|
||||
lastValue = value;
|
||||
durationSubscriber = createOperatorSubscriber(subscriber, emit, noop);
|
||||
innerFrom(durationSelector(value)).subscribe(durationSubscriber);
|
||||
}, () => {
|
||||
emit();
|
||||
subscriber.complete();
|
||||
}, undefined, () => {
|
||||
lastValue = durationSubscriber = null;
|
||||
}));
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=debounce.js.map
|
||||
@@ -0,0 +1,247 @@
|
||||
import { SHA2 } from './_sha2.js';
|
||||
import u64 from './_u64.js';
|
||||
import { wrapConstructor } from './utils.js';
|
||||
|
||||
// Round contants (first 32 bits of the fractional parts of the cube roots of the first 80 primes 2..409):
|
||||
// prettier-ignore
|
||||
const [SHA512_Kh, SHA512_Kl] = u64.split([
|
||||
'0x428a2f98d728ae22', '0x7137449123ef65cd', '0xb5c0fbcfec4d3b2f', '0xe9b5dba58189dbbc',
|
||||
'0x3956c25bf348b538', '0x59f111f1b605d019', '0x923f82a4af194f9b', '0xab1c5ed5da6d8118',
|
||||
'0xd807aa98a3030242', '0x12835b0145706fbe', '0x243185be4ee4b28c', '0x550c7dc3d5ffb4e2',
|
||||
'0x72be5d74f27b896f', '0x80deb1fe3b1696b1', '0x9bdc06a725c71235', '0xc19bf174cf692694',
|
||||
'0xe49b69c19ef14ad2', '0xefbe4786384f25e3', '0x0fc19dc68b8cd5b5', '0x240ca1cc77ac9c65',
|
||||
'0x2de92c6f592b0275', '0x4a7484aa6ea6e483', '0x5cb0a9dcbd41fbd4', '0x76f988da831153b5',
|
||||
'0x983e5152ee66dfab', '0xa831c66d2db43210', '0xb00327c898fb213f', '0xbf597fc7beef0ee4',
|
||||
'0xc6e00bf33da88fc2', '0xd5a79147930aa725', '0x06ca6351e003826f', '0x142929670a0e6e70',
|
||||
'0x27b70a8546d22ffc', '0x2e1b21385c26c926', '0x4d2c6dfc5ac42aed', '0x53380d139d95b3df',
|
||||
'0x650a73548baf63de', '0x766a0abb3c77b2a8', '0x81c2c92e47edaee6', '0x92722c851482353b',
|
||||
'0xa2bfe8a14cf10364', '0xa81a664bbc423001', '0xc24b8b70d0f89791', '0xc76c51a30654be30',
|
||||
'0xd192e819d6ef5218', '0xd69906245565a910', '0xf40e35855771202a', '0x106aa07032bbd1b8',
|
||||
'0x19a4c116b8d2d0c8', '0x1e376c085141ab53', '0x2748774cdf8eeb99', '0x34b0bcb5e19b48a8',
|
||||
'0x391c0cb3c5c95a63', '0x4ed8aa4ae3418acb', '0x5b9cca4f7763e373', '0x682e6ff3d6b2b8a3',
|
||||
'0x748f82ee5defb2fc', '0x78a5636f43172f60', '0x84c87814a1f0ab72', '0x8cc702081a6439ec',
|
||||
'0x90befffa23631e28', '0xa4506cebde82bde9', '0xbef9a3f7b2c67915', '0xc67178f2e372532b',
|
||||
'0xca273eceea26619c', '0xd186b8c721c0c207', '0xeada7dd6cde0eb1e', '0xf57d4f7fee6ed178',
|
||||
'0x06f067aa72176fba', '0x0a637dc5a2c898a6', '0x113f9804bef90dae', '0x1b710b35131c471b',
|
||||
'0x28db77f523047d84', '0x32caab7b40c72493', '0x3c9ebe0a15c9bebc', '0x431d67c49c100d4c',
|
||||
'0x4cc5d4becb3e42b6', '0x597f299cfc657e2a', '0x5fcb6fab3ad6faec', '0x6c44198c4a475817'
|
||||
].map(n => BigInt(n)));
|
||||
|
||||
// Temporary buffer, not used to store anything between runs
|
||||
const SHA512_W_H = new Uint32Array(80);
|
||||
const SHA512_W_L = new Uint32Array(80);
|
||||
|
||||
export class SHA512 extends SHA2<SHA512> {
|
||||
// We cannot use array here since array allows indexing by variable which means optimizer/compiler cannot use registers.
|
||||
// Also looks cleaner and easier to verify with spec.
|
||||
// Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):
|
||||
// h -- high 32 bits, l -- low 32 bits
|
||||
Ah = 0x6a09e667 | 0;
|
||||
Al = 0xf3bcc908 | 0;
|
||||
Bh = 0xbb67ae85 | 0;
|
||||
Bl = 0x84caa73b | 0;
|
||||
Ch = 0x3c6ef372 | 0;
|
||||
Cl = 0xfe94f82b | 0;
|
||||
Dh = 0xa54ff53a | 0;
|
||||
Dl = 0x5f1d36f1 | 0;
|
||||
Eh = 0x510e527f | 0;
|
||||
El = 0xade682d1 | 0;
|
||||
Fh = 0x9b05688c | 0;
|
||||
Fl = 0x2b3e6c1f | 0;
|
||||
Gh = 0x1f83d9ab | 0;
|
||||
Gl = 0xfb41bd6b | 0;
|
||||
Hh = 0x5be0cd19 | 0;
|
||||
Hl = 0x137e2179 | 0;
|
||||
|
||||
constructor() {
|
||||
super(128, 64, 16, false);
|
||||
}
|
||||
// prettier-ignore
|
||||
protected get(): [
|
||||
number, number, number, number, number, number, number, number,
|
||||
number, number, number, number, number, number, number, number
|
||||
] {
|
||||
const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
|
||||
return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];
|
||||
}
|
||||
// prettier-ignore
|
||||
protected set(
|
||||
Ah: number, Al: number, Bh: number, Bl: number, Ch: number, Cl: number, Dh: number, Dl: number,
|
||||
Eh: number, El: number, Fh: number, Fl: number, Gh: number, Gl: number, Hh: number, Hl: number
|
||||
) {
|
||||
this.Ah = Ah | 0;
|
||||
this.Al = Al | 0;
|
||||
this.Bh = Bh | 0;
|
||||
this.Bl = Bl | 0;
|
||||
this.Ch = Ch | 0;
|
||||
this.Cl = Cl | 0;
|
||||
this.Dh = Dh | 0;
|
||||
this.Dl = Dl | 0;
|
||||
this.Eh = Eh | 0;
|
||||
this.El = El | 0;
|
||||
this.Fh = Fh | 0;
|
||||
this.Fl = Fl | 0;
|
||||
this.Gh = Gh | 0;
|
||||
this.Gl = Gl | 0;
|
||||
this.Hh = Hh | 0;
|
||||
this.Hl = Hl | 0;
|
||||
}
|
||||
protected process(view: DataView, offset: number) {
|
||||
// Extend the first 16 words into the remaining 64 words w[16..79] of the message schedule array
|
||||
for (let i = 0; i < 16; i++, offset += 4) {
|
||||
SHA512_W_H[i] = view.getUint32(offset);
|
||||
SHA512_W_L[i] = view.getUint32((offset += 4));
|
||||
}
|
||||
for (let i = 16; i < 80; i++) {
|
||||
// s0 := (w[i-15] rightrotate 1) xor (w[i-15] rightrotate 8) xor (w[i-15] rightshift 7)
|
||||
const W15h = SHA512_W_H[i - 15] | 0;
|
||||
const W15l = SHA512_W_L[i - 15] | 0;
|
||||
const s0h = u64.rotrSH(W15h, W15l, 1) ^ u64.rotrSH(W15h, W15l, 8) ^ u64.shrSH(W15h, W15l, 7);
|
||||
const s0l = u64.rotrSL(W15h, W15l, 1) ^ u64.rotrSL(W15h, W15l, 8) ^ u64.shrSL(W15h, W15l, 7);
|
||||
// s1 := (w[i-2] rightrotate 19) xor (w[i-2] rightrotate 61) xor (w[i-2] rightshift 6)
|
||||
const W2h = SHA512_W_H[i - 2] | 0;
|
||||
const W2l = SHA512_W_L[i - 2] | 0;
|
||||
const s1h = u64.rotrSH(W2h, W2l, 19) ^ u64.rotrBH(W2h, W2l, 61) ^ u64.shrSH(W2h, W2l, 6);
|
||||
const s1l = u64.rotrSL(W2h, W2l, 19) ^ u64.rotrBL(W2h, W2l, 61) ^ u64.shrSL(W2h, W2l, 6);
|
||||
// SHA256_W[i] = s0 + s1 + SHA256_W[i - 7] + SHA256_W[i - 16];
|
||||
const SUMl = u64.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);
|
||||
const SUMh = u64.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);
|
||||
SHA512_W_H[i] = SUMh | 0;
|
||||
SHA512_W_L[i] = SUMl | 0;
|
||||
}
|
||||
let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
|
||||
// Compression function main loop, 80 rounds
|
||||
for (let i = 0; i < 80; i++) {
|
||||
// S1 := (e rightrotate 14) xor (e rightrotate 18) xor (e rightrotate 41)
|
||||
const sigma1h = u64.rotrSH(Eh, El, 14) ^ u64.rotrSH(Eh, El, 18) ^ u64.rotrBH(Eh, El, 41);
|
||||
const sigma1l = u64.rotrSL(Eh, El, 14) ^ u64.rotrSL(Eh, El, 18) ^ u64.rotrBL(Eh, El, 41);
|
||||
//const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;
|
||||
const CHIh = (Eh & Fh) ^ (~Eh & Gh);
|
||||
const CHIl = (El & Fl) ^ (~El & Gl);
|
||||
// T1 = H + sigma1 + Chi(E, F, G) + SHA512_K[i] + SHA512_W[i]
|
||||
// prettier-ignore
|
||||
const T1ll = u64.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);
|
||||
const T1h = u64.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);
|
||||
const T1l = T1ll | 0;
|
||||
// S0 := (a rightrotate 28) xor (a rightrotate 34) xor (a rightrotate 39)
|
||||
const sigma0h = u64.rotrSH(Ah, Al, 28) ^ u64.rotrBH(Ah, Al, 34) ^ u64.rotrBH(Ah, Al, 39);
|
||||
const sigma0l = u64.rotrSL(Ah, Al, 28) ^ u64.rotrBL(Ah, Al, 34) ^ u64.rotrBL(Ah, Al, 39);
|
||||
const MAJh = (Ah & Bh) ^ (Ah & Ch) ^ (Bh & Ch);
|
||||
const MAJl = (Al & Bl) ^ (Al & Cl) ^ (Bl & Cl);
|
||||
Hh = Gh | 0;
|
||||
Hl = Gl | 0;
|
||||
Gh = Fh | 0;
|
||||
Gl = Fl | 0;
|
||||
Fh = Eh | 0;
|
||||
Fl = El | 0;
|
||||
({ h: Eh, l: El } = u64.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));
|
||||
Dh = Ch | 0;
|
||||
Dl = Cl | 0;
|
||||
Ch = Bh | 0;
|
||||
Cl = Bl | 0;
|
||||
Bh = Ah | 0;
|
||||
Bl = Al | 0;
|
||||
const All = u64.add3L(T1l, sigma0l, MAJl);
|
||||
Ah = u64.add3H(All, T1h, sigma0h, MAJh);
|
||||
Al = All | 0;
|
||||
}
|
||||
// Add the compressed chunk to the current hash value
|
||||
({ h: Ah, l: Al } = u64.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));
|
||||
({ h: Bh, l: Bl } = u64.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));
|
||||
({ h: Ch, l: Cl } = u64.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));
|
||||
({ h: Dh, l: Dl } = u64.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));
|
||||
({ h: Eh, l: El } = u64.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));
|
||||
({ h: Fh, l: Fl } = u64.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));
|
||||
({ h: Gh, l: Gl } = u64.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));
|
||||
({ h: Hh, l: Hl } = u64.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));
|
||||
this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);
|
||||
}
|
||||
protected roundClean() {
|
||||
SHA512_W_H.fill(0);
|
||||
SHA512_W_L.fill(0);
|
||||
}
|
||||
destroy() {
|
||||
this.buffer.fill(0);
|
||||
this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
class SHA512_224 extends SHA512 {
|
||||
// h -- high 32 bits, l -- low 32 bits
|
||||
Ah = 0x8c3d37c8 | 0;
|
||||
Al = 0x19544da2 | 0;
|
||||
Bh = 0x73e19966 | 0;
|
||||
Bl = 0x89dcd4d6 | 0;
|
||||
Ch = 0x1dfab7ae | 0;
|
||||
Cl = 0x32ff9c82 | 0;
|
||||
Dh = 0x679dd514 | 0;
|
||||
Dl = 0x582f9fcf | 0;
|
||||
Eh = 0x0f6d2b69 | 0;
|
||||
El = 0x7bd44da8 | 0;
|
||||
Fh = 0x77e36f73 | 0;
|
||||
Fl = 0x04c48942 | 0;
|
||||
Gh = 0x3f9d85a8 | 0;
|
||||
Gl = 0x6a1d36c8 | 0;
|
||||
Hh = 0x1112e6ad | 0;
|
||||
Hl = 0x91d692a1 | 0;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.outputLen = 28;
|
||||
}
|
||||
}
|
||||
|
||||
class SHA512_256 extends SHA512 {
|
||||
// h -- high 32 bits, l -- low 32 bits
|
||||
Ah = 0x22312194 | 0;
|
||||
Al = 0xfc2bf72c | 0;
|
||||
Bh = 0x9f555fa3 | 0;
|
||||
Bl = 0xc84c64c2 | 0;
|
||||
Ch = 0x2393b86b | 0;
|
||||
Cl = 0x6f53b151 | 0;
|
||||
Dh = 0x96387719 | 0;
|
||||
Dl = 0x5940eabd | 0;
|
||||
Eh = 0x96283ee2 | 0;
|
||||
El = 0xa88effe3 | 0;
|
||||
Fh = 0xbe5e1e25 | 0;
|
||||
Fl = 0x53863992 | 0;
|
||||
Gh = 0x2b0199fc | 0;
|
||||
Gl = 0x2c85b8aa | 0;
|
||||
Hh = 0x0eb72ddc | 0;
|
||||
Hl = 0x81c52ca2 | 0;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.outputLen = 32;
|
||||
}
|
||||
}
|
||||
|
||||
class SHA384 extends SHA512 {
|
||||
// h -- high 32 bits, l -- low 32 bits
|
||||
Ah = 0xcbbb9d5d | 0;
|
||||
Al = 0xc1059ed8 | 0;
|
||||
Bh = 0x629a292a | 0;
|
||||
Bl = 0x367cd507 | 0;
|
||||
Ch = 0x9159015a | 0;
|
||||
Cl = 0x3070dd17 | 0;
|
||||
Dh = 0x152fecd8 | 0;
|
||||
Dl = 0xf70e5939 | 0;
|
||||
Eh = 0x67332667 | 0;
|
||||
El = 0xffc00b31 | 0;
|
||||
Fh = 0x8eb44a87 | 0;
|
||||
Fl = 0x68581511 | 0;
|
||||
Gh = 0xdb0c2e0d | 0;
|
||||
Gl = 0x64f98fa7 | 0;
|
||||
Hh = 0x47b5481d | 0;
|
||||
Hl = 0xbefa4fa4 | 0;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.outputLen = 48;
|
||||
}
|
||||
}
|
||||
|
||||
export const sha512 = wrapConstructor(() => new SHA512());
|
||||
export const sha512_224 = wrapConstructor(() => new SHA512_224());
|
||||
export const sha512_256 = wrapConstructor(() => new SHA512_256());
|
||||
export const sha384 = wrapConstructor(() => new SHA384());
|
||||
@@ -0,0 +1,14 @@
|
||||
Copyright (c) 2016, Rebecca Turner <me@re-becca.org>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
@@ -0,0 +1,540 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.unescapeValue = unescapeValue;
|
||||
exports["default"] = void 0;
|
||||
|
||||
var _cssesc = _interopRequireDefault(require("cssesc"));
|
||||
|
||||
var _unesc = _interopRequireDefault(require("../util/unesc"));
|
||||
|
||||
var _namespace = _interopRequireDefault(require("./namespace"));
|
||||
|
||||
var _types = require("./types");
|
||||
|
||||
var _CSSESC_QUOTE_OPTIONS;
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
||||
|
||||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||||
|
||||
var deprecate = require("util-deprecate");
|
||||
|
||||
var WRAPPED_IN_QUOTES = /^('|")([^]*)\1$/;
|
||||
var warnOfDeprecatedValueAssignment = deprecate(function () {}, "Assigning an attribute a value containing characters that might need to be escaped is deprecated. " + "Call attribute.setValue() instead.");
|
||||
var warnOfDeprecatedQuotedAssignment = deprecate(function () {}, "Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead.");
|
||||
var warnOfDeprecatedConstructor = deprecate(function () {}, "Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");
|
||||
|
||||
function unescapeValue(value) {
|
||||
var deprecatedUsage = false;
|
||||
var quoteMark = null;
|
||||
var unescaped = value;
|
||||
var m = unescaped.match(WRAPPED_IN_QUOTES);
|
||||
|
||||
if (m) {
|
||||
quoteMark = m[1];
|
||||
unescaped = m[2];
|
||||
}
|
||||
|
||||
unescaped = (0, _unesc["default"])(unescaped);
|
||||
|
||||
if (unescaped !== value) {
|
||||
deprecatedUsage = true;
|
||||
}
|
||||
|
||||
return {
|
||||
deprecatedUsage: deprecatedUsage,
|
||||
unescaped: unescaped,
|
||||
quoteMark: quoteMark
|
||||
};
|
||||
}
|
||||
|
||||
function handleDeprecatedContructorOpts(opts) {
|
||||
if (opts.quoteMark !== undefined) {
|
||||
return opts;
|
||||
}
|
||||
|
||||
if (opts.value === undefined) {
|
||||
return opts;
|
||||
}
|
||||
|
||||
warnOfDeprecatedConstructor();
|
||||
|
||||
var _unescapeValue = unescapeValue(opts.value),
|
||||
quoteMark = _unescapeValue.quoteMark,
|
||||
unescaped = _unescapeValue.unescaped;
|
||||
|
||||
if (!opts.raws) {
|
||||
opts.raws = {};
|
||||
}
|
||||
|
||||
if (opts.raws.value === undefined) {
|
||||
opts.raws.value = opts.value;
|
||||
}
|
||||
|
||||
opts.value = unescaped;
|
||||
opts.quoteMark = quoteMark;
|
||||
return opts;
|
||||
}
|
||||
|
||||
var Attribute = /*#__PURE__*/function (_Namespace) {
|
||||
_inheritsLoose(Attribute, _Namespace);
|
||||
|
||||
function Attribute(opts) {
|
||||
var _this;
|
||||
|
||||
if (opts === void 0) {
|
||||
opts = {};
|
||||
}
|
||||
|
||||
_this = _Namespace.call(this, handleDeprecatedContructorOpts(opts)) || this;
|
||||
_this.type = _types.ATTRIBUTE;
|
||||
_this.raws = _this.raws || {};
|
||||
Object.defineProperty(_this.raws, 'unquoted', {
|
||||
get: deprecate(function () {
|
||||
return _this.value;
|
||||
}, "attr.raws.unquoted is deprecated. Call attr.value instead."),
|
||||
set: deprecate(function () {
|
||||
return _this.value;
|
||||
}, "Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")
|
||||
});
|
||||
_this._constructed = true;
|
||||
return _this;
|
||||
}
|
||||
/**
|
||||
* Returns the Attribute's value quoted such that it would be legal to use
|
||||
* in the value of a css file. The original value's quotation setting
|
||||
* used for stringification is left unchanged. See `setValue(value, options)`
|
||||
* if you want to control the quote settings of a new value for the attribute.
|
||||
*
|
||||
* You can also change the quotation used for the current value by setting quoteMark.
|
||||
*
|
||||
* Options:
|
||||
* * quoteMark {'"' | "'" | null} - Use this value to quote the value. If this
|
||||
* option is not set, the original value for quoteMark will be used. If
|
||||
* indeterminate, a double quote is used. The legal values are:
|
||||
* * `null` - the value will be unquoted and characters will be escaped as necessary.
|
||||
* * `'` - the value will be quoted with a single quote and single quotes are escaped.
|
||||
* * `"` - the value will be quoted with a double quote and double quotes are escaped.
|
||||
* * preferCurrentQuoteMark {boolean} - if true, prefer the source quote mark
|
||||
* over the quoteMark option value.
|
||||
* * smart {boolean} - if true, will select a quote mark based on the value
|
||||
* and the other options specified here. See the `smartQuoteMark()`
|
||||
* method.
|
||||
**/
|
||||
|
||||
|
||||
var _proto = Attribute.prototype;
|
||||
|
||||
_proto.getQuotedValue = function getQuotedValue(options) {
|
||||
if (options === void 0) {
|
||||
options = {};
|
||||
}
|
||||
|
||||
var quoteMark = this._determineQuoteMark(options);
|
||||
|
||||
var cssescopts = CSSESC_QUOTE_OPTIONS[quoteMark];
|
||||
var escaped = (0, _cssesc["default"])(this._value, cssescopts);
|
||||
return escaped;
|
||||
};
|
||||
|
||||
_proto._determineQuoteMark = function _determineQuoteMark(options) {
|
||||
return options.smart ? this.smartQuoteMark(options) : this.preferredQuoteMark(options);
|
||||
}
|
||||
/**
|
||||
* Set the unescaped value with the specified quotation options. The value
|
||||
* provided must not include any wrapping quote marks -- those quotes will
|
||||
* be interpreted as part of the value and escaped accordingly.
|
||||
*/
|
||||
;
|
||||
|
||||
_proto.setValue = function setValue(value, options) {
|
||||
if (options === void 0) {
|
||||
options = {};
|
||||
}
|
||||
|
||||
this._value = value;
|
||||
this._quoteMark = this._determineQuoteMark(options);
|
||||
|
||||
this._syncRawValue();
|
||||
}
|
||||
/**
|
||||
* Intelligently select a quoteMark value based on the value's contents. If
|
||||
* the value is a legal CSS ident, it will not be quoted. Otherwise a quote
|
||||
* mark will be picked that minimizes the number of escapes.
|
||||
*
|
||||
* If there's no clear winner, the quote mark from these options is used,
|
||||
* then the source quote mark (this is inverted if `preferCurrentQuoteMark` is
|
||||
* true). If the quoteMark is unspecified, a double quote is used.
|
||||
*
|
||||
* @param options This takes the quoteMark and preferCurrentQuoteMark options
|
||||
* from the quoteValue method.
|
||||
*/
|
||||
;
|
||||
|
||||
_proto.smartQuoteMark = function smartQuoteMark(options) {
|
||||
var v = this.value;
|
||||
var numSingleQuotes = v.replace(/[^']/g, '').length;
|
||||
var numDoubleQuotes = v.replace(/[^"]/g, '').length;
|
||||
|
||||
if (numSingleQuotes + numDoubleQuotes === 0) {
|
||||
var escaped = (0, _cssesc["default"])(v, {
|
||||
isIdentifier: true
|
||||
});
|
||||
|
||||
if (escaped === v) {
|
||||
return Attribute.NO_QUOTE;
|
||||
} else {
|
||||
var pref = this.preferredQuoteMark(options);
|
||||
|
||||
if (pref === Attribute.NO_QUOTE) {
|
||||
// pick a quote mark that isn't none and see if it's smaller
|
||||
var quote = this.quoteMark || options.quoteMark || Attribute.DOUBLE_QUOTE;
|
||||
var opts = CSSESC_QUOTE_OPTIONS[quote];
|
||||
var quoteValue = (0, _cssesc["default"])(v, opts);
|
||||
|
||||
if (quoteValue.length < escaped.length) {
|
||||
return quote;
|
||||
}
|
||||
}
|
||||
|
||||
return pref;
|
||||
}
|
||||
} else if (numDoubleQuotes === numSingleQuotes) {
|
||||
return this.preferredQuoteMark(options);
|
||||
} else if (numDoubleQuotes < numSingleQuotes) {
|
||||
return Attribute.DOUBLE_QUOTE;
|
||||
} else {
|
||||
return Attribute.SINGLE_QUOTE;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Selects the preferred quote mark based on the options and the current quote mark value.
|
||||
* If you want the quote mark to depend on the attribute value, call `smartQuoteMark(opts)`
|
||||
* instead.
|
||||
*/
|
||||
;
|
||||
|
||||
_proto.preferredQuoteMark = function preferredQuoteMark(options) {
|
||||
var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark;
|
||||
|
||||
if (quoteMark === undefined) {
|
||||
quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark;
|
||||
}
|
||||
|
||||
if (quoteMark === undefined) {
|
||||
quoteMark = Attribute.DOUBLE_QUOTE;
|
||||
}
|
||||
|
||||
return quoteMark;
|
||||
};
|
||||
|
||||
_proto._syncRawValue = function _syncRawValue() {
|
||||
var rawValue = (0, _cssesc["default"])(this._value, CSSESC_QUOTE_OPTIONS[this.quoteMark]);
|
||||
|
||||
if (rawValue === this._value) {
|
||||
if (this.raws) {
|
||||
delete this.raws.value;
|
||||
}
|
||||
} else {
|
||||
this.raws.value = rawValue;
|
||||
}
|
||||
};
|
||||
|
||||
_proto._handleEscapes = function _handleEscapes(prop, value) {
|
||||
if (this._constructed) {
|
||||
var escaped = (0, _cssesc["default"])(value, {
|
||||
isIdentifier: true
|
||||
});
|
||||
|
||||
if (escaped !== value) {
|
||||
this.raws[prop] = escaped;
|
||||
} else {
|
||||
delete this.raws[prop];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
_proto._spacesFor = function _spacesFor(name) {
|
||||
var attrSpaces = {
|
||||
before: '',
|
||||
after: ''
|
||||
};
|
||||
var spaces = this.spaces[name] || {};
|
||||
var rawSpaces = this.raws.spaces && this.raws.spaces[name] || {};
|
||||
return Object.assign(attrSpaces, spaces, rawSpaces);
|
||||
};
|
||||
|
||||
_proto._stringFor = function _stringFor(name, spaceName, concat) {
|
||||
if (spaceName === void 0) {
|
||||
spaceName = name;
|
||||
}
|
||||
|
||||
if (concat === void 0) {
|
||||
concat = defaultAttrConcat;
|
||||
}
|
||||
|
||||
var attrSpaces = this._spacesFor(spaceName);
|
||||
|
||||
return concat(this.stringifyProperty(name), attrSpaces);
|
||||
}
|
||||
/**
|
||||
* returns the offset of the attribute part specified relative to the
|
||||
* start of the node of the output string.
|
||||
*
|
||||
* * "ns" - alias for "namespace"
|
||||
* * "namespace" - the namespace if it exists.
|
||||
* * "attribute" - the attribute name
|
||||
* * "attributeNS" - the start of the attribute or its namespace
|
||||
* * "operator" - the match operator of the attribute
|
||||
* * "value" - The value (string or identifier)
|
||||
* * "insensitive" - the case insensitivity flag;
|
||||
* @param part One of the possible values inside an attribute.
|
||||
* @returns -1 if the name is invalid or the value doesn't exist in this attribute.
|
||||
*/
|
||||
;
|
||||
|
||||
_proto.offsetOf = function offsetOf(name) {
|
||||
var count = 1;
|
||||
|
||||
var attributeSpaces = this._spacesFor("attribute");
|
||||
|
||||
count += attributeSpaces.before.length;
|
||||
|
||||
if (name === "namespace" || name === "ns") {
|
||||
return this.namespace ? count : -1;
|
||||
}
|
||||
|
||||
if (name === "attributeNS") {
|
||||
return count;
|
||||
}
|
||||
|
||||
count += this.namespaceString.length;
|
||||
|
||||
if (this.namespace) {
|
||||
count += 1;
|
||||
}
|
||||
|
||||
if (name === "attribute") {
|
||||
return count;
|
||||
}
|
||||
|
||||
count += this.stringifyProperty("attribute").length;
|
||||
count += attributeSpaces.after.length;
|
||||
|
||||
var operatorSpaces = this._spacesFor("operator");
|
||||
|
||||
count += operatorSpaces.before.length;
|
||||
var operator = this.stringifyProperty("operator");
|
||||
|
||||
if (name === "operator") {
|
||||
return operator ? count : -1;
|
||||
}
|
||||
|
||||
count += operator.length;
|
||||
count += operatorSpaces.after.length;
|
||||
|
||||
var valueSpaces = this._spacesFor("value");
|
||||
|
||||
count += valueSpaces.before.length;
|
||||
var value = this.stringifyProperty("value");
|
||||
|
||||
if (name === "value") {
|
||||
return value ? count : -1;
|
||||
}
|
||||
|
||||
count += value.length;
|
||||
count += valueSpaces.after.length;
|
||||
|
||||
var insensitiveSpaces = this._spacesFor("insensitive");
|
||||
|
||||
count += insensitiveSpaces.before.length;
|
||||
|
||||
if (name === "insensitive") {
|
||||
return this.insensitive ? count : -1;
|
||||
}
|
||||
|
||||
return -1;
|
||||
};
|
||||
|
||||
_proto.toString = function toString() {
|
||||
var _this2 = this;
|
||||
|
||||
var selector = [this.rawSpaceBefore, '['];
|
||||
selector.push(this._stringFor('qualifiedAttribute', 'attribute'));
|
||||
|
||||
if (this.operator && (this.value || this.value === '')) {
|
||||
selector.push(this._stringFor('operator'));
|
||||
selector.push(this._stringFor('value'));
|
||||
selector.push(this._stringFor('insensitiveFlag', 'insensitive', function (attrValue, attrSpaces) {
|
||||
if (attrValue.length > 0 && !_this2.quoted && attrSpaces.before.length === 0 && !(_this2.spaces.value && _this2.spaces.value.after)) {
|
||||
attrSpaces.before = " ";
|
||||
}
|
||||
|
||||
return defaultAttrConcat(attrValue, attrSpaces);
|
||||
}));
|
||||
}
|
||||
|
||||
selector.push(']');
|
||||
selector.push(this.rawSpaceAfter);
|
||||
return selector.join('');
|
||||
};
|
||||
|
||||
_createClass(Attribute, [{
|
||||
key: "quoted",
|
||||
get: function get() {
|
||||
var qm = this.quoteMark;
|
||||
return qm === "'" || qm === '"';
|
||||
},
|
||||
set: function set(value) {
|
||||
warnOfDeprecatedQuotedAssignment();
|
||||
}
|
||||
/**
|
||||
* returns a single (`'`) or double (`"`) quote character if the value is quoted.
|
||||
* returns `null` if the value is not quoted.
|
||||
* returns `undefined` if the quotation state is unknown (this can happen when
|
||||
* the attribute is constructed without specifying a quote mark.)
|
||||
*/
|
||||
|
||||
}, {
|
||||
key: "quoteMark",
|
||||
get: function get() {
|
||||
return this._quoteMark;
|
||||
}
|
||||
/**
|
||||
* Set the quote mark to be used by this attribute's value.
|
||||
* If the quote mark changes, the raw (escaped) value at `attr.raws.value` of the attribute
|
||||
* value is updated accordingly.
|
||||
*
|
||||
* @param {"'" | '"' | null} quoteMark The quote mark or `null` if the value should be unquoted.
|
||||
*/
|
||||
,
|
||||
set: function set(quoteMark) {
|
||||
if (!this._constructed) {
|
||||
this._quoteMark = quoteMark;
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._quoteMark !== quoteMark) {
|
||||
this._quoteMark = quoteMark;
|
||||
|
||||
this._syncRawValue();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "qualifiedAttribute",
|
||||
get: function get() {
|
||||
return this.qualifiedName(this.raws.attribute || this.attribute);
|
||||
}
|
||||
}, {
|
||||
key: "insensitiveFlag",
|
||||
get: function get() {
|
||||
return this.insensitive ? 'i' : '';
|
||||
}
|
||||
}, {
|
||||
key: "value",
|
||||
get: function get() {
|
||||
return this._value;
|
||||
},
|
||||
set:
|
||||
/**
|
||||
* Before 3.0, the value had to be set to an escaped value including any wrapped
|
||||
* quote marks. In 3.0, the semantics of `Attribute.value` changed so that the value
|
||||
* is unescaped during parsing and any quote marks are removed.
|
||||
*
|
||||
* Because the ambiguity of this semantic change, if you set `attr.value = newValue`,
|
||||
* a deprecation warning is raised when the new value contains any characters that would
|
||||
* require escaping (including if it contains wrapped quotes).
|
||||
*
|
||||
* Instead, you should call `attr.setValue(newValue, opts)` and pass options that describe
|
||||
* how the new value is quoted.
|
||||
*/
|
||||
function set(v) {
|
||||
if (this._constructed) {
|
||||
var _unescapeValue2 = unescapeValue(v),
|
||||
deprecatedUsage = _unescapeValue2.deprecatedUsage,
|
||||
unescaped = _unescapeValue2.unescaped,
|
||||
quoteMark = _unescapeValue2.quoteMark;
|
||||
|
||||
if (deprecatedUsage) {
|
||||
warnOfDeprecatedValueAssignment();
|
||||
}
|
||||
|
||||
if (unescaped === this._value && quoteMark === this._quoteMark) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._value = unescaped;
|
||||
this._quoteMark = quoteMark;
|
||||
|
||||
this._syncRawValue();
|
||||
} else {
|
||||
this._value = v;
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "insensitive",
|
||||
get: function get() {
|
||||
return this._insensitive;
|
||||
}
|
||||
/**
|
||||
* Set the case insensitive flag.
|
||||
* If the case insensitive flag changes, the raw (escaped) value at `attr.raws.insensitiveFlag`
|
||||
* of the attribute is updated accordingly.
|
||||
*
|
||||
* @param {true | false} insensitive true if the attribute should match case-insensitively.
|
||||
*/
|
||||
,
|
||||
set: function set(insensitive) {
|
||||
if (!insensitive) {
|
||||
this._insensitive = false; // "i" and "I" can be used in "this.raws.insensitiveFlag" to store the original notation.
|
||||
// When setting `attr.insensitive = false` both should be erased to ensure correct serialization.
|
||||
|
||||
if (this.raws && (this.raws.insensitiveFlag === 'I' || this.raws.insensitiveFlag === 'i')) {
|
||||
this.raws.insensitiveFlag = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
this._insensitive = insensitive;
|
||||
}
|
||||
}, {
|
||||
key: "attribute",
|
||||
get: function get() {
|
||||
return this._attribute;
|
||||
},
|
||||
set: function set(name) {
|
||||
this._handleEscapes("attribute", name);
|
||||
|
||||
this._attribute = name;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Attribute;
|
||||
}(_namespace["default"]);
|
||||
|
||||
exports["default"] = Attribute;
|
||||
Attribute.NO_QUOTE = null;
|
||||
Attribute.SINGLE_QUOTE = "'";
|
||||
Attribute.DOUBLE_QUOTE = '"';
|
||||
var CSSESC_QUOTE_OPTIONS = (_CSSESC_QUOTE_OPTIONS = {
|
||||
"'": {
|
||||
quotes: 'single',
|
||||
wrap: true
|
||||
},
|
||||
'"': {
|
||||
quotes: 'double',
|
||||
wrap: true
|
||||
}
|
||||
}, _CSSESC_QUOTE_OPTIONS[null] = {
|
||||
isIdentifier: true
|
||||
}, _CSSESC_QUOTE_OPTIONS);
|
||||
|
||||
function defaultAttrConcat(attrValue, attrSpaces) {
|
||||
return "" + attrSpaces.before + attrValue + attrSpaces.after;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
type IsAny<T> = 0 extends (1 & T) ? true : false; // https://stackoverflow.com/a/49928360/3406963
|
||||
type IsNever<T> = [T] extends [never] ? true : false;
|
||||
type IsUnknown<T> = IsNever<T> extends false ? T extends unknown ? unknown extends T ? IsAny<T> extends false ? true : false : false : false : false;
|
||||
|
||||
/**
|
||||
Create a function type with a return type of your choice and the same parameters as the given function type.
|
||||
|
||||
Use-case: You want to define a wrapped function that returns something different while receiving the same parameters. For example, you might want to wrap a function that can throw an error into one that will return `undefined` instead.
|
||||
|
||||
@example
|
||||
```
|
||||
import type {SetReturnType} from 'type-fest';
|
||||
|
||||
type MyFunctionThatCanThrow = (foo: SomeType, bar: unknown) => SomeOtherType;
|
||||
|
||||
type MyWrappedFunction = SetReturnType<MyFunctionThatCanThrow, SomeOtherType | undefined>;
|
||||
//=> type MyWrappedFunction = (foo: SomeType, bar: unknown) => SomeOtherType | undefined;
|
||||
```
|
||||
|
||||
@category Function
|
||||
*/
|
||||
export type SetReturnType<Fn extends (...args: any[]) => any, TypeToReturn> =
|
||||
// Just using `Parameters<Fn>` isn't ideal because it doesn't handle the `this` fake parameter.
|
||||
Fn extends (this: infer ThisArg, ...args: infer Arguments) => any ? (
|
||||
// If a function did not specify the `this` fake parameter, it will be inferred to `unknown`.
|
||||
// We want to detect this situation just to display a friendlier type upon hovering on an IntelliSense-powered IDE.
|
||||
IsUnknown<ThisArg> extends true ? (...args: Arguments) => TypeToReturn : (this: ThisArg, ...args: Arguments) => TypeToReturn
|
||||
) : (
|
||||
// This part should be unreachable, but we make it meaningful just in case…
|
||||
(...args: Parameters<Fn>) => TypeToReturn
|
||||
);
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"J D E F A B CC"},B:{"1":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB EC FC","2":"DC","4":"tB"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC"},E:{"1":"I v J D E F A B C K L G HC zB IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 F B C G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e PC QC RC SC qB AC TC rB"},G:{"1":"E VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","2":"zB UC BC"},H:{"2":"oC"},I:{"1":"tB I f sC BC tC uC","2":"pC qC rC"},J:{"1":"D A"},K:{"1":"h rB","2":"A B C qB AC"},L:{"1":"H"},M:{"1":"H"},N:{"1":"A B"},O:{"1":"vC"},P:{"1":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"AD BD"}},B:1,C:"contenteditable attribute (basic support)"};
|
||||
@@ -0,0 +1,28 @@
|
||||
var baseToString = require('./_baseToString');
|
||||
|
||||
/**
|
||||
* Converts `value` to a string. An empty string is returned for `null`
|
||||
* and `undefined` values. The sign of `-0` is preserved.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to convert.
|
||||
* @returns {string} Returns the converted string.
|
||||
* @example
|
||||
*
|
||||
* _.toString(null);
|
||||
* // => ''
|
||||
*
|
||||
* _.toString(-0);
|
||||
* // => '-0'
|
||||
*
|
||||
* _.toString([1, 2, 3]);
|
||||
* // => '1,2,3'
|
||||
*/
|
||||
function toString(value) {
|
||||
return value == null ? '' : baseToString(value);
|
||||
}
|
||||
|
||||
module.exports = toString;
|
||||
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
var ensureArray = require("../../object/ensure-array")
|
||||
, firstIndex = require("./first-index");
|
||||
|
||||
module.exports = function () { return firstIndex.call(ensureArray(this)) === null; };
|
||||
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* Convert input to process stdout
|
||||
*/
|
||||
|
||||
//implementation
|
||||
var Converter = require("../../core/Converter.js");
|
||||
function _initConverter(){
|
||||
var csvConverter = new Converter();
|
||||
var started = false;
|
||||
var writeStream = process.stdout;
|
||||
csvConverter.on("record_parsed",function(rowJSON){
|
||||
if (started){
|
||||
writeStream.write(",\n");
|
||||
}
|
||||
writeStream.write(JSON.stringify(rowJSON)); //write parsed JSON object one by one.
|
||||
if (started === false){
|
||||
started = true;
|
||||
}
|
||||
});
|
||||
writeStream.write("[\n"); //write array symbol
|
||||
|
||||
csvConverter.on("end_parsed",function(){
|
||||
writeStream.write("\n]"); //end array symbol
|
||||
});
|
||||
csvConverter.on("error",function(err){
|
||||
console.error(err);
|
||||
process.exit(-1);
|
||||
});
|
||||
return csvConverter;
|
||||
}
|
||||
function convertFile(fileName){
|
||||
var csvConverter=_initConverter();
|
||||
csvConverter.from(fileName);
|
||||
}
|
||||
|
||||
function convertString(csvString){
|
||||
var csvConverter=_initConverter();
|
||||
csvConverter.from(csvString);
|
||||
}
|
||||
//module interfaces
|
||||
module.exports.convertFile = convertFile;
|
||||
module.exports.convertString = convertString;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"groupBy.js","sourceRoot":"","sources":["../../../../src/internal/operators/groupBy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAuIpF,MAAM,UAAU,OAAO,CACrB,WAA4B,EAC5B,gBAAgH,EAChH,QAAyE,EACzE,SAAkC;IAElC,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,OAAqC,CAAC;QAC1C,IAAI,CAAC,gBAAgB,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE;YAC/D,OAAO,GAAG,gBAAyC,CAAC;SACrD;aAAM;YACL,CAAG,QAAQ,GAAyB,gBAAgB,SAAzC,EAAE,OAAO,GAAgB,gBAAgB,QAAhC,EAAE,SAAS,GAAK,gBAAgB,UAArB,CAAsB,CAAC;SACvD;QAGD,IAAM,MAAM,GAAG,IAAI,GAAG,EAAuB,CAAC;QAG9C,IAAM,MAAM,GAAG,UAAC,EAAkC;YAChD,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YACnB,EAAE,CAAC,UAAU,CAAC,CAAC;QACjB,CAAC,CAAC;QAIF,IAAM,WAAW,GAAG,UAAC,GAAQ,IAAK,OAAA,MAAM,CAAC,UAAC,QAAQ,IAAK,OAAA,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,EAAnB,CAAmB,CAAC,EAAzC,CAAyC,CAAC;QAG5E,IAAI,YAAY,GAAG,CAAC,CAAC;QAGrB,IAAI,iBAAiB,GAAG,KAAK,CAAC;QAS9B,IAAM,uBAAuB,GAAG,IAAI,kBAAkB,CACpD,UAAU,EACV,UAAC,KAAQ;YAIP,IAAI;gBACF,IAAM,KAAG,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;gBAE/B,IAAI,OAAK,GAAG,MAAM,CAAC,GAAG,CAAC,KAAG,CAAC,CAAC;gBAC5B,IAAI,CAAC,OAAK,EAAE;oBAEV,MAAM,CAAC,GAAG,CAAC,KAAG,EAAE,CAAC,OAAK,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,IAAI,OAAO,EAAO,CAAC,CAAC,CAAC;oBAKxE,IAAM,OAAO,GAAG,uBAAuB,CAAC,KAAG,EAAE,OAAK,CAAC,CAAC;oBACpD,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;oBAEzB,IAAI,QAAQ,EAAE;wBACZ,IAAM,oBAAkB,GAAG,wBAAwB,CAMjD,OAAY,EACZ;4BAGE,OAAM,CAAC,QAAQ,EAAE,CAAC;4BAClB,oBAAkB,aAAlB,oBAAkB,uBAAlB,oBAAkB,CAAE,WAAW,EAAE,CAAC;wBACpC,CAAC,EAED,SAAS,EAGT,SAAS,EAET,cAAM,OAAA,MAAM,CAAC,MAAM,CAAC,KAAG,CAAC,EAAlB,CAAkB,CACzB,CAAC;wBAGF,uBAAuB,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,oBAAkB,CAAC,CAAC,CAAC;qBACzF;iBACF;gBAGD,OAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;aAC9C;YAAC,OAAO,GAAG,EAAE;gBACZ,WAAW,CAAC,GAAG,CAAC,CAAC;aAClB;QACH,CAAC,EAED,cAAM,OAAA,MAAM,CAAC,UAAC,QAAQ,IAAK,OAAA,QAAQ,CAAC,QAAQ,EAAE,EAAnB,CAAmB,CAAC,EAAzC,CAAyC,EAE/C,WAAW,EAKX,cAAM,OAAA,MAAM,CAAC,KAAK,EAAE,EAAd,CAAc,EACpB;YACE,iBAAiB,GAAG,IAAI,CAAC;YAIzB,OAAO,YAAY,KAAK,CAAC,CAAC;QAC5B,CAAC,CACF,CAAC;QAGF,MAAM,CAAC,SAAS,CAAC,uBAAuB,CAAC,CAAC;QAO1C,SAAS,uBAAuB,CAAC,GAAM,EAAE,YAA8B;YACrE,IAAM,MAAM,GAAQ,IAAI,UAAU,CAAI,UAAC,eAAe;gBACpD,YAAY,EAAE,CAAC;gBACf,IAAM,QAAQ,GAAG,YAAY,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;gBACzD,OAAO;oBACL,QAAQ,CAAC,WAAW,EAAE,CAAC;oBAIvB,EAAE,YAAY,KAAK,CAAC,IAAI,iBAAiB,IAAI,uBAAuB,CAAC,WAAW,EAAE,CAAC;gBACrF,CAAC,CAAC;YACJ,CAAC,CAAC,CAAC;YACH,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;YACjB,OAAO,MAAM,CAAC;QAChB,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,7 @@
|
||||
var DATA_URI_PATTERN = /^data:(\S*?)?(;charset=[^;]+)?(;[^,]+?)?,(.+)/;
|
||||
|
||||
function isDataUriResource(uri) {
|
||||
return DATA_URI_PATTERN.test(uri);
|
||||
}
|
||||
|
||||
module.exports = isDataUriResource;
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('isMap', require('../isMap'), require('./_falseOptions'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,9 @@
|
||||
export default function normalizeKey(key) {
|
||||
// Cast the key to a string, as that's all we can set as a key.
|
||||
if (typeof key !== 'string') {
|
||||
console.warn(`${key} used as a key, but it is not a string.`);
|
||||
key = String(key);
|
||||
}
|
||||
|
||||
return key;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.joinPathSegments = void 0;
|
||||
function joinPathSegments(a, b, separator) {
|
||||
/**
|
||||
* The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`).
|
||||
*/
|
||||
if (a.endsWith(separator)) {
|
||||
return a + b;
|
||||
}
|
||||
return a + separator + b;
|
||||
}
|
||||
exports.joinPathSegments = joinPathSegments;
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0.00259,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0.00259,"53":0,"54":0,"55":0,"56":0.00259,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0.01811,"73":0,"74":0,"75":0.00259,"76":0,"77":0,"78":0.00517,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0.00259,"97":0,"98":0,"99":0.00259,"100":0,"101":0,"102":0.06209,"103":0.00259,"104":0.00259,"105":0.00259,"106":0.00517,"107":0.00776,"108":0.03622,"109":0.45531,"110":0.33631,"111":0,"112":0,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.02846,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0.00259,"38":0,"39":0.00259,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0.00259,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0.00517,"75":0,"76":0,"77":0,"78":0,"79":0.01035,"80":0,"81":0.00517,"83":0.00259,"84":0,"85":0,"86":0.03104,"87":0.00776,"88":0.00259,"89":0.03104,"90":0.0207,"91":0.00259,"92":0.00259,"93":0.00259,"94":0.00259,"95":0.00776,"96":0.00259,"97":0.00259,"98":0.00259,"99":0.00259,"100":0,"101":0.00517,"102":0.01552,"103":0.00517,"104":0.00259,"105":0.01294,"106":0.01294,"107":0.01035,"108":0.05433,"109":1.57548,"110":0.94943,"111":0,"112":0,"113":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0.00259,"29":0,"30":0.00259,"31":0,"32":0.01294,"33":0,"34":0,"35":0,"36":0,"37":0.00776,"38":0,"39":0,"40":0,"41":0,"42":0.00259,"43":0,"44":0,"45":0,"46":0.01811,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0.01552,"60":0.04139,"62":0,"63":0.04915,"64":0.00517,"65":0.00259,"66":0.05691,"67":0.19661,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0.00259,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0.00259,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0.06209,"95":0.11642,"9.5-9.6":0,"10.0-10.1":0,"10.5":0,"10.6":0,"11.1":0,"11.5":0,"11.6":0,"12.1":0.00259},B:{"12":0.00517,"13":0,"14":0.08537,"15":0,"16":0,"17":0.00259,"18":0.00776,"79":0,"80":0,"81":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0.00259,"90":0,"91":0,"92":0.00776,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0.00259,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0.00259,"107":0.01035,"108":0.03881,"109":0.36994,"110":0.39322},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,_:"0","3.1":0,"3.2":0,"5.1":0,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0,"12.1":0,"13.1":0.02587,"14.1":0.00517,"15.1":0,"15.2-15.3":0,"15.4":0.00259,"15.5":0.00259,"15.6":0.00776,"16.0":0.00259,"16.1":0.00259,"16.2":0.01294,"16.3":0.04139,"16.4":0},G:{"8":0.00316,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0.00189,"6.0-6.1":0,"7.0-7.1":0,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.10611,"10.0-10.2":0,"10.3":0.01832,"11.0-11.2":0.02716,"11.3-11.4":0.00126,"12.0-12.1":0.15411,"12.2-12.5":0.85579,"13.0-13.1":0.00568,"13.2":0.00189,"13.3":0.01705,"13.4-13.7":0.01768,"14.0-14.4":0.25137,"14.5-14.8":0.14147,"15.0-15.1":0.08211,"15.2-15.3":0.10674,"15.4":0.13074,"15.5":0.22674,"15.6":0.20779,"16.0":0.67516,"16.1":0.62084,"16.2":0.91895,"16.3":1.26569,"16.4":0.01326},P:{"4":0.03048,"20":0.30483,"5.0-5.4":0,"6.2-6.4":0.01016,"7.2-7.4":0.06097,"8.2":0,"9.2":0.04064,"10.1":0,"11.1-11.2":0.01016,"12.0":0,"13.0":0.02032,"14.0":0.01016,"15.0":0.01016,"16.0":0.02032,"17.0":0.06097,"18.0":0.14225,"19.0":0.45724},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0.00573,"4.2-4.3":0.01145,"4.4":0,"4.4.3-4.4.4":0.27834},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.02328,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0.01483,_:"3.0-3.1"},J:{"7":0,"10":0.00741},O:{"0":0.60045},H:{"0":4.58987},L:{"0":80.02752},R:{_:"0"},M:{"0":0.1112},Q:{"13.1":0.02965}};
|
||||
@@ -0,0 +1,22 @@
|
||||
module.exports = function walk(nodes, cb, bubble) {
|
||||
var i, max, node, result;
|
||||
|
||||
for (i = 0, max = nodes.length; i < max; i += 1) {
|
||||
node = nodes[i];
|
||||
if (!bubble) {
|
||||
result = cb(node, i, nodes);
|
||||
}
|
||||
|
||||
if (
|
||||
result !== false &&
|
||||
node.type === "function" &&
|
||||
Array.isArray(node.nodes)
|
||||
) {
|
||||
walk(node.nodes, cb, bubble);
|
||||
}
|
||||
|
||||
if (bubble) {
|
||||
cb(node, i, nodes);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* A specialized version of `_.reduce` for arrays without support for
|
||||
* iteratee shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} [array] The array to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @param {*} [accumulator] The initial value.
|
||||
* @param {boolean} [initAccum] Specify using the first element of `array` as
|
||||
* the initial value.
|
||||
* @returns {*} Returns the accumulated value.
|
||||
*/
|
||||
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
||||
var index = -1,
|
||||
length = array == null ? 0 : array.length;
|
||||
|
||||
if (initAccum && length) {
|
||||
accumulator = array[++index];
|
||||
}
|
||||
while (++index < length) {
|
||||
accumulator = iteratee(accumulator, array[index], index, array);
|
||||
}
|
||||
return accumulator;
|
||||
}
|
||||
|
||||
module.exports = arrayReduce;
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"A B","2":"J D E F CC"},B:{"1":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"1":"0 1 2 3 4 5 6 7 8 9 z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"DC tB I v J D E F A B C K L G M N O w g x y EC FC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC"},E:{"1":"I v J D E F A B C K L G HC zB IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 F B C G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e PC QC RC SC qB AC TC rB"},G:{"1":"E VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","2":"zB UC BC"},H:{"2":"oC"},I:{"1":"f BC tC uC","4":"tB I pC qC rC sC"},J:{"1":"D A"},K:{"1":"A B C h qB AC rB"},L:{"1":"H"},M:{"1":"H"},N:{"1":"A B"},O:{"1":"vC"},P:{"1":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"AD BD"}},B:1,C:"Range input type"};
|
||||
@@ -0,0 +1,3 @@
|
||||
const compare = require('./compare')
|
||||
const gt = (a, b, loose) => compare(a, b, loose) > 0
|
||||
module.exports = gt
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"mapTo.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/mapTo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C,oFAAoF;AACpF,wBAAgB,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,gBAAgB,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AACjE;;;;KAIK;AACL,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"}
|
||||
@@ -0,0 +1,3 @@
|
||||
import { Node } from 'estree';
|
||||
export declare const UNKNOWN: {};
|
||||
export declare function gather_possible_values(node: Node, set: Set<string | {}>): void;
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('some', require('../some'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,39 @@
|
||||
import Plugin from '../../lib/plugin/Plugin.js';
|
||||
|
||||
class MyPlugin extends Plugin {
|
||||
init() {
|
||||
this.log.info(`${this.namespace}:${this.getContext('name')}:init`);
|
||||
}
|
||||
getName() {
|
||||
this.log.info(`${this.namespace}:${this.getContext('name')}:getName`);
|
||||
return 'new-project-name';
|
||||
}
|
||||
getLatestVersion() {
|
||||
this.log.info(`${this.namespace}:${this.getContext('name')}:getLatestVersion`);
|
||||
return '1.2.3';
|
||||
}
|
||||
getIncrement() {
|
||||
this.log.info(`${this.namespace}:${this.getContext('name')}:getIncrement`);
|
||||
return 'minor';
|
||||
}
|
||||
getIncrementedVersionCI() {
|
||||
this.log.info(`${this.namespace}:${this.getContext('name')}:getIncrementedVersionCI`);
|
||||
}
|
||||
beforeBump() {
|
||||
this.log.info(`${this.namespace}:${this.getContext('name')}:beforeBump`);
|
||||
}
|
||||
bump(version) {
|
||||
this.log.info(`${this.namespace}:${this.getContext('name')}:bump:${version}`);
|
||||
}
|
||||
beforeRelease() {
|
||||
this.log.info(`${this.namespace}:${this.getContext('name')}:beforeRelease`);
|
||||
}
|
||||
release() {
|
||||
this.log.info(`${this.namespace}:${this.getContext('name')}:release`);
|
||||
}
|
||||
afterRelease() {
|
||||
this.log.info(`${this.namespace}:${this.getContext('name')}:afterRelease`);
|
||||
}
|
||||
}
|
||||
|
||||
export default MyPlugin;
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user